aboutsummaryrefslogtreecommitdiff
path: root/entity/actions.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-12-09 16:09:02 +0900
committerAstatin <[email protected]>2024-12-09 16:09:02 +0900
commit0aebab4bd7a436a0a20168c573b87cb77d86def9 (patch)
tree9b888a66a87f242958644dd30e172e38a02fe380 /entity/actions.gbasm
parenta0cc9155572b22ac1afd4636593f72a18372187b (diff)
Add freeze status on enemies near bunny when freeze used
Diffstat (limited to 'entity/actions.gbasm')
-rw-r--r--entity/actions.gbasm28
1 files changed, 18 insertions, 10 deletions
diff --git a/entity/actions.gbasm b/entity/actions.gbasm
index 1225ab2..f7a6e77 100644
--- a/entity/actions.gbasm
+++ b/entity/actions.gbasm
@@ -152,6 +152,10 @@ Open_Dialogue:
RET
Fox_Turn:
+ LD A, $mem_map_loading_flags
+ BIT 3, A
+ RET Z
+
PUSH HL
PUSH BC
PUSH DE
@@ -163,10 +167,16 @@ Fox_Turn:
LD A, (HL+)
LD D, A
+ Fox_Turn.Should_turn_be_skipped:
+ LD A, L
+ AND $f0
+ ADD $08
+ LD L, A
+
+ BIT 0, (HL)
+ JP NZ, =Fox_Turn.Skip_turn
+
Fox_Turn.Start_action_or_movement:
- LD A, $mem_map_loading_flags
- BIT 3, A
- JP Z, =Fox_Turn.Start_action_or_movement.end
LD A, $mem_moving_animation_step
CP $00
JP NZ, =Fox_Turn.Start_action_or_movement.end
@@ -372,23 +382,19 @@ Fox_Turn:
Fox_Turn.Start_action_or_movement.end:
Fox_Turn.End_movement:
- LD A, $mem_map_loading_flags
- BIT 3, A
- JP Z, =Fox_Turn.End_movement.end
LD A, $mem_moving_animation_step
CP $0f
JP NZ, =Fox_Turn.End_movement.end
+ LD A, D
+ AND $07
BIT 3, D
+ LD D, A
JR Z, =Fox_Turn.End_movement.end
LD A, $01
.ADD_A_TO_DIRECTION_BC
Fox_Turn.End_movement.end:
Fox_Turn.Health_check:
- LD A, $mem_map_loading_flags
- BIT 3, A
- JP Z, =Fox_Turn.Health_check.end
-
LD A, $mem_moving_animation_step
CP $03
JR NZ, =Fox_Turn.Health_check.end
@@ -419,6 +425,8 @@ Fox_Turn:
LD (HL+), A
LD A, D
LD (HL+), A
+
+ Fox_Turn.Skip_Turn:
POP DE
POP BC
POP HL