From 1674b6ca5a8b7ae9a2d4e34a8c846f2ee88cb85d Mon Sep 17 00:00:00 2001 From: Damien Doury Date: Thu, 6 Apr 2023 18:05:59 +0200 Subject: [PATCH] Fixed the wrong CheckHiddenOpponent bugfix (#1046) --- docs/bugs_and_glitches.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index fcdac9111..6ccc1ffe9 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -614,10 +614,15 @@ This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider ```diff CheckHiddenOpponent: -; 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 -- call GetBattleVar -- and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND -+ xor a ++ ld a, BATTLE_VARS_SUBSTATUS5_OPP ++ call GetBattleVar ++ cpl ++ and 1 << SUBSTATUS_LOCK_ON ++ ret z ++ + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND ret ```