ref: 8755a88458b912975c537e489e182ca956dcac9b
parent: 6e62eabb42cb8c933e77d84768353c5fec47cf3a
author: i0brendan0 <[email protected]>
date: Sat Jul 21 01:05:40 EDT 2018
turns out none of the code is needed
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -302,17 +302,10 @@
```asm
CheckHiddenOpponent: ; 37daa
- ld a, BATTLE_VARS_SUBSTATUS5_OPP
- call GetBattleVar
- ld a, [hl]
- and 1 << SUBSTATUS_LOCK_ON
- cp 1 << SUBSTATUS_LOCK_ON
- ret z
- ld a, BATTLE_VARS_SUBSTATUS3_OPP
- call GetBattleVar
- and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
```
+
+The code in `CheckHiddenOpponent` is completely redundant as `CheckHit` already does what this code is doing. Another option is to remove `CheckHiddenOpponent` completely, the calls to `CheckHiddenOpponent`, and the jump afterwards.
## Beat Up can desynchronize link battles