aboutsummaryrefslogtreecommitdiff
path: root/enemiesattacks/basic.gbasm
diff options
context:
space:
mode:
Diffstat (limited to 'enemiesattacks/basic.gbasm')
-rw-r--r--enemiesattacks/basic.gbasm33
1 files changed, 20 insertions, 13 deletions
diff --git a/enemiesattacks/basic.gbasm b/enemiesattacks/basic.gbasm
index ed2a633..2f08858 100644
--- a/enemiesattacks/basic.gbasm
+++ b/enemiesattacks/basic.gbasm
@@ -3,19 +3,16 @@ Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D
OR $10
LD D, A
- ; For Future Attacks: This is an attack that would freeze the bunny and move -4 x the entity
- ; LD A, $01
- ; LD $mem_bunny_status, A
- ; LD A, $02
- ; LD $mem_bunny_flags, A
- ; LD A, $mem_bunny_direction
- ; AND $07
- ; LD $mem_bunny_direction, A
- ; CALL =Fix_Bunny_screen
-
- ; LD A, B
- ; SUB $04
- ; LD B, A
+ PUSH BC
+ LD A, $mem_bunny_direction
+ AND $08
+ LD B, A
+ LD A, $mem_bunny_flags
+ AND $01
+ OR B
+ CP $09
+ POP BC
+ RET Z
LD A, $mem_bunny_health
SUB $01
@@ -29,4 +26,14 @@ Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D
LD $mem_bunny_health, A
.Skip_health_underflow_fix:
+ LD A, $mem_bunny_flags
+ SET 3, A
+ LD $mem_bunny_flags, A
+
+ LD A, $mem_moving_animation_step
+ LD B, A
+ LD A, $1f
+ SUB B
+ LD $mem_blinking_animation_counter, A
+
RET