[beta] Fix MovePhase not ending properly. (#4848)

Co-authored-by: frutescens <info@laptop>
This commit is contained in:
Mumble 2024-11-11 12:13:15 -08:00 committed by GitHub
parent 6feb63484c
commit e5e3926176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,10 +120,12 @@ export class MovePhase extends BattlePhase {
console.log(Moves[this.move.moveId]); 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). // Check if move is unusable (e.g. because it's out of PP due to a mid-turn Spite).
if (!this.canMove(true) && (this.pokemon.isActive(true) || this.move.ppUsed >= this.move.getMovePp())) { if (!this.canMove(true)) {
if (this.pokemon.isActive(true)) {
this.fail(); this.fail();
this.showMoveText(); this.showMoveText();
this.showFailedText(); this.showFailedText();
}
return this.end(); return this.end();
} }