From d278df8fef7cbd5215c4f1a49b31f6c532d6d0f6 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Sat, 29 Jun 2024 14:30:10 -0700 Subject: [PATCH] [Bug] Fix multi-hit moves persisting after sleep/freeze (#2712) --- src/field/pokemon.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 0de3da949cf..a1d11a7f914 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2545,6 +2545,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return false; } + /** + * If this Pokemon falls asleep or freezes in the middle of a multi-hit attack, + * cancel the attack's subsequent hits. + */ + if (effect === StatusEffect.SLEEP || effect === StatusEffect.FREEZE) { + this.stopMultiHit(); + } + if (asPhase) { this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText, sourcePokemon)); return true;