Removed hiding cancelled move messages

This commit is contained in:
0zuzu 2024-05-21 05:30:13 +01:00
parent abf46f5b96
commit 15b74ab23a

View File

@ -2332,24 +2332,22 @@ export class MovePhase extends BattlePhase {
this.scene.triggerPokemonFormChange(this.pokemon, SpeciesFormChangePreMoveTrigger);
if (this.move.moveId)
this.showMoveText();
// This should only happen when there are no valid targets left on the field
if ((moveQueue.length && moveQueue[0].move === Moves.NONE) || !targets.length) {
this.showFailedText();
this.cancel();
// Record a failed move so Abilities like Truant don't trigger next turn and soft-lock
this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL });
this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT); // Remove any tags from moves like Fly/Dive/etc.
moveQueue.shift();
}
// Display move text
if (this.move.moveId && (!this.cancelled || this.ignorePp)) {
this.showMoveText();
if (this.cancelled)
this.showFailedText();
}
if (this.cancelled)
return this.end();
}
if (!moveQueue.length || !moveQueue.shift().ignorePP) // using .shift here clears out two turn moves once they've been used
this.move.usePp(ppUsed);
@ -2357,7 +2355,6 @@ export class MovePhase extends BattlePhase {
if (!allMoves[this.move.moveId].getAttrs(CopyMoveAttr).length)
this.scene.currentBattle.lastMove = this.move.moveId;
// Assume conditions affecting targets only apply to moves with a single target
let success = this.move.getMove().applyConditions(this.pokemon, targets[0], this.move.getMove());
let cancelled = new Utils.BooleanHolder(false);