diff options
author | Astatin <[email protected]> | 2025-02-18 19:03:42 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2025-02-18 19:03:42 +0900 |
commit | 18d7d064daf704193f8dff6b2ef3ae68b7fc3aac (patch) | |
tree | 9af417ec9a09294edec8ca0e5ffbd146a0081b4b /enemiesattacks | |
parent | f4197f6117b7cc16873fca749c0dcb838577a7e5 (diff) |
Did a bunch of things I honestly don't remember everything but now basic attack is broken
Diffstat (limited to 'enemiesattacks')
-rw-r--r-- | enemiesattacks/basic.gbasm | 33 | ||||
-rw-r--r-- | enemiesattacks/freeze.gbasm | 11 | ||||
-rw-r--r-- | enemiesattacks/laser.gbasm | 1 |
3 files changed, 32 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 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 |