From 2a9e4e5ebbe078f019ceaadef4293a87ad02e41b Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Thu, 2 Oct 2025 20:37:00 -0500 Subject: [PATCH] [AI] Prevent ai from using moves guaranteed to fail due to the weather (#6613) Prevent ai from using moves guaranteed to fail due to the weather --- src/field/pokemon.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 3f0bda0d5c9..48cd023a5da 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -6543,8 +6543,9 @@ export class EnemyPokemon extends Pokemon { move.category !== MoveCategory.STATUS && moveTargets.some(p => { const doesNotFail = - move.applyConditions(this, p, -1) - || [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id); + !globalScene.arena.isMoveWeatherCancelled(this, move) + && (move.applyConditions(this, p, -1) + || [MoveId.SUCKER_PUNCH, MoveId.UPPER_HAND, MoveId.THUNDERCLAP].includes(move.id)); return ( doesNotFail && p.getAttackDamage({