aboutsummaryrefslogtreecommitdiff
path: root/entity
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
parenta0cc9155572b22ac1afd4636593f72a18372187b (diff)
Add freeze status on enemies near bunny when freeze used
Diffstat (limited to 'entity')
-rw-r--r--entity/actions.gbasm28
-rw-r--r--entity/bunny.gbasm6
2 files changed, 22 insertions, 12 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
diff --git a/entity/bunny.gbasm b/entity/bunny.gbasm
index e5106e2..7d5a5d0 100644
--- a/entity/bunny.gbasm
+++ b/entity/bunny.gbasm
@@ -100,10 +100,12 @@ Move_Bunny:
CP $0f
JP NZ, =End_movement.end
LD A, $mem_bunny_direction
- BIT 3, A
+ LD D, A
+ AND $07
+ BIT 3, D
+ LD $mem_bunny_direction, A
JR Z, =End_movement.end
- LD D, A
LD A, $mem_bunny_x
LD B, A
LD A, $mem_bunny_y