From 20b708170c1dde61e98bcd9bae8b53c886a261df Mon Sep 17 00:00:00 2001 From: Adrian T <68144167+torranx@users.noreply.github.com> Date: Mon, 24 Jun 2024 06:08:55 +0800 Subject: [PATCH] [Bug] Prevent attempting to use a move with no pp when pokemon is not on the field (#2532) * prevent using move with no pp when pokemon is fainted * change condition to isActive(true) --- src/phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phases.ts b/src/phases.ts index 1cbf53b760c..a1aba34bcff 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2582,7 +2582,7 @@ export class MovePhase extends BattlePhase { if (this.move.moveId && this.pokemon.summonData?.disabledMove === this.move.moveId) { this.scene.queueMessage(`${this.move.getName()} is disabled!`); } - if (this.move.ppUsed >= this.move.getMovePp()) { // if the move PP was reduced from Spite or otherwise, the move fails + if (this.pokemon.isActive(true) && this.move.ppUsed >= this.move.getMovePp()) { // if the move PP was reduced from Spite or otherwise, the move fails this.fail(); this.showMoveText(); this.showFailedText();