From 683c1f660eb429766bd91282865b8cc2c788dd41 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 29 May 2023 11:39:47 -0400 Subject: [PATCH] Fix crash with multi-hit moves when target faints --- src/battle-phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index 6d1760a49..ac3e20e1e 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1319,7 +1319,7 @@ class MoveEffectPhase extends PokemonPhase { end() { const user = this.getUserPokemon(); - if (--user.turnData.hitsLeft >= 1 && !this.getTarget().isFainted()) + if (--user.turnData.hitsLeft >= 1 && this.getTarget()) this.scene.unshiftPhase(this.getNewHitPhase()); else { if (user.turnData.hitCount > 1)