turns out none of the code is needed

This commit is contained in:
i0brendan0 2018-07-21 05:05:40 -05:00 committed by GitHub
parent 6e62eabb42
commit 8755a88458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,18 +302,11 @@ Fix:
```asm ```asm
CheckHiddenOpponent: ; 37daa 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 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 ## Beat Up can desynchronize link battles
*Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.* *Fixing this bug will break compatibility with standard Pokémon Crystal for link battles.*