; SpinBoostBlock.asm
;			by Maddy, allegedly

; Created for 'Me, Reaping' in Super "Sonic Saves the World" World
; When the player touches this block, it vanishes and puts the player in spinfly state.
; It also refills the player's flight timer.

; Feel free to reuse this code however you want. Credit is appreciated :)

; Usage: This is a GPS block file

db $42
JMP Mario : JMP Mario : JMP Mario
JMP Return : JMP Return : JMP Return : JMP Return
JMP Mario : JMP Mario : JMP Mario

Mario:
	; set cape phase
	LDA #$00
	STA $1407
	
	; set p-speed
	LDA #$0C
	STA $72
	
	; set spinning
	LDA #$01
	STA $140D
	
	; set cape rise timer
	LDA #$50
	STA $149F
	
	; set y speed
	LDA #$A4
	STA $7D
	
	; sfx
	LDA #$25
	STA $1DFC

	%create_smoke()
	%erase_block()
	
Return:
	RTL

print "Puts the player in spinfly and recharges flight time."
