lorom

org $828957

JSR $F720		;let's hi-jack the main game loop...

org $82F720	;make sure this is free space

LDA $008D	;unused ram to use as counter
CMP #$002C	;change this to change how fast samus receives damage. smaller values = faster
BEQ Damage	;branch to the damaging section
INC $008D	;if the counter hadn't reached chosen value yet, increase it
STZ $0590	;original code that was replaced by that JSR
RTS		;return

Damage:		;damage routine
STZ $008D	;reset timer
DEC $09C2	;cause 1 unit of damage. add more of this to take away more health at once
STZ $0590	;original code that was replaced by JSR
RTS		;return