Add Fix for Lock On Status Moves

These changes should fix the status move and secondary effects not working if the opponent is flying or digging but has been locked on.
This commit is contained in:
i0brendan0 2018-02-19 02:54:13 -06:00
parent 4046b41c3a
commit 0e45563497
2 changed files with 11 additions and 1 deletions

View File

@ -292,13 +292,18 @@ This is a bug with `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](
```asm
CheckHiddenOpponent: ; 37daa
; BUG: This routine should account for Lock-On and Mind Reader.
; Uncomment the lines below to fix.
; ld a, BATTLE_VARS_SUBSTATUS5_OPP
; call GetBattleVar
; bit SUBSTATUS_LOCK_ON, a
; ret z
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
```
*To do:* Fix this bug.
**Fix:** Uncomment those 4 lines to fix.
## Beat Up can desynchronize link battles

View File

@ -9708,6 +9708,11 @@ BattleCommand_ThunderAccuracy: ; 37d94
CheckHiddenOpponent: ; 37daa
; BUG: This routine should account for Lock-On and Mind Reader.
; Uncomment the lines below to fix.
; ld a, BATTLE_VARS_SUBSTATUS5_OPP
; call GetBattleVar
; bit SUBSTATUS_LOCK_ON, a
; ret z
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND