mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Adjusted canMove failure condition.
This commit is contained in:
parent
2530c0941e
commit
56fd2cd7b8
@ -120,13 +120,10 @@ export class MovePhase extends BattlePhase {
|
||||
console.log(Moves[this.move.moveId]);
|
||||
|
||||
// Check if move is unusable (e.g. because it's out of PP due to a mid-turn Spite).
|
||||
if (!this.canMove(true)) {
|
||||
if (this.pokemon.isActive(true) && this.move.ppUsed >= this.move.getMovePp()) {
|
||||
this.fail();
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
}
|
||||
|
||||
if ((!this.canMove(true) || this.move.ppUsed >= this.move.getMovePp()) && this.pokemon.isActive(true)) {
|
||||
this.fail();
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
return this.end();
|
||||
}
|
||||
|
||||
@ -378,16 +375,12 @@ export class MovePhase extends BattlePhase {
|
||||
} else {
|
||||
this.pokemon.pushMoveHistory({ move: this.move.moveId, targets: this.targets, result: MoveResult.FAIL, virtual: this.move.virtual });
|
||||
|
||||
let failedText: string | undefined;
|
||||
const failureMessage = move.getFailedText(this.pokemon, targets[0], move, new BooleanHolder(false));
|
||||
|
||||
if (failureMessage) {
|
||||
failedText = failureMessage;
|
||||
this.showMoveText();
|
||||
this.showFailedText(failureMessage);
|
||||
}
|
||||
|
||||
this.showMoveText();
|
||||
this.showFailedText(failedText);
|
||||
|
||||
// Remove the user from its semi-invulnerable state (if applicable)
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.MOVE_EFFECT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user