projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d69bca
)
take damage code is now only run when the player is not in iframe mode
author
Lukas Krickl
<lukas@krickl.dev>
Wed, 9 Oct 2024 04:02:02 +0000
(06:02 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Wed, 9 Oct 2024 04:02:02 +0000
(06:02 +0200)
src/player.s
patch
|
blob
|
history
diff --git
a/src/player.s
b/src/player.s
index 3b39871e37b07ec4473adb4b6ea92b6bc366168b..7a1ed33c65ccff1ea7290d7a4b1880496065538c 100644
(file)
--- 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