Fix RUN command causing freeze

This commit is contained in:
Zach Day 2024-06-10 14:51:03 -04:00
parent 7847d1c445
commit 2b3a365529

View File

@ -2515,7 +2515,13 @@ export class MovePhase extends BattlePhase {
console.log(Moves[this.move.moveId]);
if (!this.pokemon.isActive(true)) {
// Battle has ended, for example when RUN has been selected
return this.end();
}
if (!this.canMove()) {
// The selected move has been made unusable
this.fail();
this.showMoveText();
this.showFailedText();