From: Lukas Krickl Date: Wed, 9 Oct 2024 04:02:02 +0000 (+0200) Subject: take damage code is now only run when the player is not in iframe mode X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=56702351ac20991778a182eb64714efaab08880c;p=gbrg%2F.git take damage code is now only run when the player is not in iframe mode --- diff --git a/src/player.s b/src/player.s index 3b39871..7a1ed33 100644 --- a/src/player.s +++ b/src/player.s @@ -273,6 +273,16 @@ player_use_resource: player_take_damage: ld [tmp], a ; tmp store a + ; if iframes are on, do nothing + push hl + ld de, player_timer_i ; go to timer + add hl, de + ld a, [hl] ; load timer into a + pop hl ; back to base + cp a, 0 + ret nz + + ; set damage anim timer ld a, DAMAGE_ANIM_LEN ld [damage_anim], a