From 88ec4c9aa37028b5b5cdfebc3d01df3752453cfc Mon Sep 17 00:00:00 2001 From: AJ Fontaine Date: Wed, 26 Mar 2025 18:40:57 -0400 Subject: [PATCH] Fix PP Usage --- src/phases/move-phase.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 17e3514820b..cc19aef1155 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -105,14 +105,11 @@ export class MovePhase extends BattlePhase { ) { super(); - const ignorePPChallenge = new BooleanHolder(ignorePp); - applyChallenges(globalScene.gameMode, ChallengeType.NO_PP_USE, ignorePPChallenge); - this.pokemon = pokemon; this.targets = targets; this.move = move; this.followUp = followUp; - this.ignorePp = ignorePPChallenge.value; + this.ignorePp = ignorePp; this.reflected = reflected; this.forcedLast = forcedLast; } @@ -353,7 +350,13 @@ export class MovePhase extends BattlePhase { // "commit" to using the move, deducting PP. if (!this.ignorePp) { - const ppUsed = 1 + this.getPpIncreaseFromPressure(targets); + let ppUsed = 1 + this.getPpIncreaseFromPressure(targets); + + const ignorePPChallenge = new BooleanHolder(false); + applyChallenges(globalScene.gameMode, ChallengeType.NO_PP_USE, ignorePPChallenge); + if (ignorePPChallenge.value) { + ppUsed = 0; + } this.move.usePp(ppUsed); globalScene.eventTarget.dispatchEvent(new MoveUsedEvent(this.pokemon?.id, this.move.getMove(), this.move.ppUsed));