summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authori0brendan0 <i0brendan0@github.com>2018-02-19 02:54:13 -0600
committeri0brendan0 <i0brendan0@github.com>2018-02-19 02:54:13 -0600
commit0e455634975b12504e643d2620889935a03df83b (patch)
treeffe49daec81f0f3fb46de41ec626c6b176c5c9b5 /engine
parent4046b41c3aaaf0d930f0268e52112aa7ea01e0a4 (diff)
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.
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/effect_commands.asm5
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 48efba8fa..2cf4ac97d 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -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