diff --git a/Items/magic_rings.asm b/Items/magic_rings.asm index f8fbc15..5905e51 100644 --- a/Items/magic_rings.asm +++ b/Items/magic_rings.asm @@ -65,4 +65,22 @@ org $06ECBF JSL MagicRing_CheckForBlast pullpc -; Heart - Slowly regenerate hearts \ No newline at end of file +; Heart - Slowly regenerate hearts +MagicRings_CheckForHeart: +{ + LDA.l MAGICRINGS : AND.b #$01 : BEQ ++ + LDA.l CURHP : CMP.l MAXHP : BCS ++ + LDA.l FrameCounter : LSR #2 : AND.b #$3F : BEQ + + JMP ++ + + + LDA.l CURHP : CLC : ADC.b #$01 : STA.l CURHP + ++ + LDA.b $F5 + AND.b #$80 + RTL +} + +pushpc +org $07810C + JSL MagicRings_CheckForHeart +pullpc \ No newline at end of file