mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 10:16:14 +00:00
Fix crash with multi-hit moves when target faints
This commit is contained in:
parent
ab5f66f11c
commit
683c1f660e
@ -1319,7 +1319,7 @@ class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
end() {
|
end() {
|
||||||
const user = this.getUserPokemon();
|
const user = this.getUserPokemon();
|
||||||
if (--user.turnData.hitsLeft >= 1 && !this.getTarget().isFainted())
|
if (--user.turnData.hitsLeft >= 1 && this.getTarget())
|
||||||
this.scene.unshiftPhase(this.getNewHitPhase());
|
this.scene.unshiftPhase(this.getNewHitPhase());
|
||||||
else {
|
else {
|
||||||
if (user.turnData.hitCount > 1)
|
if (user.turnData.hitCount > 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user