From 4c2dc8651f769c23c7454d090c2d0d3f9e16a663 Mon Sep 17 00:00:00 2001 From: Stophles <71789013+Stophles@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:14:02 -0500 Subject: [PATCH] Recharge checked earlier, Move Tags not checked if move cancelled Recharge is now checked at the start of doMove to determine if other Tags need to be checked or if the pokemon is recharging. If the move is already cancelled, Move lapse tags are no longer checked (To account for Sleep/Paralyze happening before hand, so confusion would never trigger) --- src/phases.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 08721c1e2ca..672f44b45ae 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2023,12 +2023,13 @@ export class MovePhase extends BattlePhase { }); const doMove = () => { - if (!this.followUp && this.canMove()) { - this.pokemon.lapseTags(BattlerTagLapseType.MOVE); - if (this.cancelled) { - this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL }); - return this.end(); - } + this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE); + if (!this.followUp && this.canMove() && !this.cancelled) { + this.pokemon.lapseTags(BattlerTagLapseType.MOVE); + } + if (this.cancelled) { + this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL }); + return this.end(); } const moveQueue = this.pokemon.getMoveQueue(); @@ -4242,4 +4243,4 @@ export class TestMessagePhase extends MessagePhase { constructor(scene: BattleScene, message: string) { super(scene, message, null, true); } -} \ No newline at end of file +}