Fixed the wrong CheckHiddenOpponent bugfix (#1046)

This commit is contained in:
Damien Doury 2023-04-06 18:05:59 +02:00 committed by GitHub
parent 06dd208cc7
commit 1674b6ca5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -614,10 +614,15 @@ This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider
```diff ```diff
CheckHiddenOpponent: CheckHiddenOpponent:
-; BUG: Lock-On and Mind Reader don't always bypass Fly and Dig (see docs/bugs_and_glitches.md) -; BUG: Lock-On and Mind Reader don't always bypass Fly and Dig (see docs/bugs_and_glitches.md)
- ld a, BATTLE_VARS_SUBSTATUS3_OPP + ld a, BATTLE_VARS_SUBSTATUS5_OPP
- call GetBattleVar + call GetBattleVar
- and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + cpl
+ xor a + and 1 << SUBSTATUS_LOCK_ON
+ ret z
+
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret ret
``` ```