ref: 51bbfee89192cd93c49e3c400ca8745cc3e77e30
parent: 82ffb584c8fefc04e1bad4895cdc2d9222100b4c
author: i0brendan0 <19826742+i0brendan0@users.noreply.github.com>
date: Wed Feb 28 23:06:46 EST 2018
Reflect Rangi's suggestion
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -293,11 +293,6 @@
```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
- ; and 1 << SUBSTATUS_LOCK_ON
- ; ret z
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
@@ -304,8 +299,19 @@
ret
```
-**Fix:** Uncomment those 4 lines to fix.
+Fix:
+```asm
+CheckHiddenOpponent: ; 37daa
+ ld a, BATTLE_VARS_SUBSTATUS5_OPP
+ call GetBattleVar
+ and 1 << SUBSTATUS_LOCK_ON
+ ret z
+ ld a, BATTLE_VARS_SUBSTATUS3_OPP
+ call GetBattleVar
+ and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
+ ret
+```
## Beat Up can desynchronize link battles