From d69ad4ddb9a7f0774ffa4d01f085a36aed3e2c08 Mon Sep 17 00:00:00 2001 From: AnonymousRandomPerson Date: Mon, 6 Apr 2026 02:06:42 -0400 Subject: [PATCH] Restore CheckTypeMatchup bug description --- docs/bugs_and_glitches.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index bd2b5fba5..ba368c5c9 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -1390,6 +1390,8 @@ AI_Cautious: ### AI makes a false assumption about `CheckTypeMatchup` +There is an incorrect assumption about this function made in the AI related code: when the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the offensive type in a will make this function do the right thing. Since a is overwritten, this assumption is incorrect. A simple fix would be to load the move type for the current move into a in BattleCheckTypeMatchup, before falling through, which is consistent with how the rest of the code assumes this code works like. + **Fix:** Edit `BattleCheckTypeMatchup` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): ```diff