Allow for null user in end of move effect phase
This commit is contained in:
1 parent
5441ecbd73
commit
b29ee1be5e
1 file changed
+2
@@ -1739,6 +1739,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
end() {
|
end() {
|
||||||
const user = this.getUserPokemon();
|
const user = this.getUserPokemon();
|
||||||
|
if (user) {
|
||||||
if (--user.turnData.hitsLeft >= 1 && this.getTarget()?.isActive())
|
if (--user.turnData.hitsLeft >= 1 && this.getTarget()?.isActive())
|
||||||
this.scene.unshiftPhase(this.getNewHitPhase());
|
this.scene.unshiftPhase(this.getNewHitPhase());
|
||||||
else {
|
else {
|
||||||
@@ -1746,6 +1747,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
this.scene.queueMessage(`Hit ${user.turnData.hitCount} time(s)!`);
|
this.scene.queueMessage(`Hit ${user.turnData.hitCount} time(s)!`);
|
||||||
this.scene.applyModifiers(HitHealModifier, this.player, user);
|
this.scene.applyModifiers(HitHealModifier, this.player, user);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.end();
|
super.end();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user