From f4c8f0080a3dd74af6412cec91b08c78c5a6f971 Mon Sep 17 00:00:00 2001 From: innerthunder <168692175+innerthunder@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:21:23 -0700 Subject: [PATCH] [Bug] Add user Pokemon check to multi-hit early stopping (#2726) --- src/field/pokemon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index a1d11a7f914..3ee19920ae9 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2262,11 +2262,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { /** * If this Pokemon is using a multi-hit move, cancels all subsequent strikes - * @param {Pokemon} target If specified, this only cancels subsequent strikes against this Pokemon + * @param {Pokemon} target If specified, this only cancels subsequent strikes against the given target */ stopMultiHit(target?: Pokemon): void { const effectPhase = this.scene.getCurrentPhase(); - if (effectPhase instanceof MoveEffectPhase) { + if (effectPhase instanceof MoveEffectPhase && effectPhase.getUserPokemon() === this) { effectPhase.stopMultiHit(target); } }