From 9c17fb14c8068d6662b9ca1cb048ed206b6770ee Mon Sep 17 00:00:00 2001 From: ElectroDeoxys <40245959+ElectroDeoxys@users.noreply.github.com> Date: Wed, 3 Mar 2021 22:17:57 +0000 Subject: [PATCH] Document AI redundant bug (#802) Document AI_Redundant Future Sight bug --- docs/bugs_and_glitches.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index e77e2b5bb..682a15b3b 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -51,6 +51,7 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category - [Glacier Badge may not boost Special Defense depending on the value of Special Attack](#glacier-badge-may-not-boost-special-defense-depending-on-the-value-of-special-attack) - ["Smart" AI encourages Mean Look if its own Pokémon is badly poisoned](#smart-ai-encourages-mean-look-if-its-own-pokémon-is-badly-poisoned) - ["Smart" AI discourages Conversion2 after the first turn](#smart-ai-discourages-conversion2-after-the-first-turn) + - [AI does not discourage Future Sight when it's already been used](#ai-does-not-discourage-future-sight-when-its-already-been-used) - [AI makes a false assumption about `CheckTypeMatchup`](#ai-makes-a-false-assumption-about-checktypematchup) - [AI use of Full Heal or Full Restore does not cure Nightmare status](#ai-use-of-full-heal-or-full-restore-does-not-cure-nightmare-status) - [AI use of Full Heal does not cure confusion status](#ai-use-of-full-heal-does-not-cure-confusion-status) @@ -1112,6 +1113,20 @@ As Pryce's dialog ("That BADGE will raise the SPECIAL stats of POKéMON.") impli ``` +### AI does not discourage Future Sight when it's already been used + +**Fix:** Edit `AI_Redundant` in [engine/battle/ai/redundant.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/redundant.asm): + +```diff + .FutureSight: +- ld a, [wEnemyScreens] +- bit 5, a ++ ld a, [wEnemyFutureSightCount] ++ and a + ret +``` + + ### AI makes a false assumption about `CheckTypeMatchup` **Fix:** Edit `BattleCheckTypeMatchup` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm):