Fix crash with multi-hit moves when target faints

This commit is contained in:
Flashfyre 2023-05-29 11:39:47 -04:00
parent ab5f66f11c
commit 683c1f660e
1 changed files with 1 additions and 1 deletions

View File

@ -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)