diff options
author | Astatin <[email protected]> | 2025-05-02 11:47:47 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-05-02 11:47:47 +0200 |
commit | e322573ecc55a821506e5313e3b9994e1b58745e (patch) | |
tree | f3a7fc1b5db202fa8bcd586f50b488091c94373d /enemiesattacks/laser.gbasm | |
parent | 54fc17521381b2376b43f4e1542ae293319d0582 (diff) |
Fix laser not taking a turn to turn when jumped over
Diffstat (limited to 'enemiesattacks/laser.gbasm')
-rw-r--r-- | enemiesattacks/laser.gbasm | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/enemiesattacks/laser.gbasm b/enemiesattacks/laser.gbasm index 9e2f67d..648c5f7 100644 --- a/enemiesattacks/laser.gbasm +++ b/enemiesattacks/laser.gbasm @@ -1,4 +1,4 @@ -Laser_sight_check: ; BC = XY of the enemy. D is unchanged. Direction to face in E (or 0 if not) +Laser_sight_check: ; BC = XY of the enemy. D = direction (must be unchanged). Direction to face in E (or 0 if not) LD E, $00 ; straight line + distance <= 4 @@ -49,22 +49,6 @@ Laser_sight_check: ; BC = XY of the enemy. D is unchanged. Direction to face in RET Laser_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D - LD A, E - DEC A - DEC D - XOR D - INC D - CP $00 - JR Z, =.attack - BIT 1, A - JR NZ, =.attack - - LD A, E - OR $00 - LD D, A - RET - - .attack: PUSH DE PUSH BC |