From 18d7d064daf704193f8dff6b2ef3ae68b7fc3aac Mon Sep 17 00:00:00 2001 From: Astatin Date: Tue, 18 Feb 2025 19:03:42 +0900 Subject: Did a bunch of things I honestly don't remember everything but now basic attack is broken --- enemiesattacks/basic.gbasm | 33 ++++++++++++++++++++------------- enemiesattacks/freeze.gbasm | 11 +++++++++++ enemiesattacks/laser.gbasm | 1 + 3 files changed, 32 insertions(+), 13 deletions(-) (limited to 'enemiesattacks') 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 diff --git a/enemiesattacks/freeze.gbasm b/enemiesattacks/freeze.gbasm index ba393c8..4c755fd 100644 --- a/enemiesattacks/freeze.gbasm +++ b/enemiesattacks/freeze.gbasm @@ -3,6 +3,17 @@ Freeze_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D OR $10 LD D, 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, $01 LD $mem_bunny_status, A LD A, $02 diff --git a/enemiesattacks/laser.gbasm b/enemiesattacks/laser.gbasm index 4a0d029..2c1cebb 100644 --- a/enemiesattacks/laser.gbasm +++ b/enemiesattacks/laser.gbasm @@ -76,6 +76,7 @@ Laser_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D POP BC LD A, D + LD D, $10 CALL =Try_Launch_Animation LD A, $enum_animation_wait_mode -- cgit v1.2.3-70-g09d2