mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 10:16:14 +00:00
[Bug] Prevent attempting to use a move with no pp when pokemon is not on the field (#2532)
* prevent using move with no pp when pokemon is fainted * change condition to isActive(true)
This commit is contained in:
parent
d743f7ba7a
commit
20b708170c
@ -2582,7 +2582,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
if (this.move.moveId && this.pokemon.summonData?.disabledMove === this.move.moveId) {
|
if (this.move.moveId && this.pokemon.summonData?.disabledMove === this.move.moveId) {
|
||||||
this.scene.queueMessage(`${this.move.getName()} is disabled!`);
|
this.scene.queueMessage(`${this.move.getName()} is disabled!`);
|
||||||
}
|
}
|
||||||
if (this.move.ppUsed >= this.move.getMovePp()) { // if the move PP was reduced from Spite or otherwise, the move fails
|
if (this.pokemon.isActive(true) && this.move.ppUsed >= this.move.getMovePp()) { // if the move PP was reduced from Spite or otherwise, the move fails
|
||||||
this.fail();
|
this.fail();
|
||||||
this.showMoveText();
|
this.showMoveText();
|
||||||
this.showFailedText();
|
this.showFailedText();
|
||||||
|
Loading…
Reference in New Issue
Block a user