mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Recharge checked earlier, Move Tags not checked if move cancelled
Recharge is now checked at the start of doMove to determine if other Tags need to be checked or if the pokemon is recharging. If the move is already cancelled, Move lapse tags are no longer checked (To account for Sleep/Paralyze happening before hand, so confusion would never trigger)
This commit is contained in:
parent
5b2925cf85
commit
4c2dc8651f
@ -2023,12 +2023,13 @@ export class MovePhase extends BattlePhase {
|
||||
});
|
||||
|
||||
const doMove = () => {
|
||||
if (!this.followUp && this.canMove()) {
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.MOVE);
|
||||
if (this.cancelled) {
|
||||
this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL });
|
||||
return this.end();
|
||||
}
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE);
|
||||
if (!this.followUp && this.canMove() && !this.cancelled) {
|
||||
this.pokemon.lapseTags(BattlerTagLapseType.MOVE);
|
||||
}
|
||||
if (this.cancelled) {
|
||||
this.pokemon.pushMoveHistory({ move: Moves.NONE, result: MoveResult.FAIL });
|
||||
return this.end();
|
||||
}
|
||||
|
||||
const moveQueue = this.pokemon.getMoveQueue();
|
||||
@ -4242,4 +4243,4 @@ export class TestMessagePhase extends MessagePhase {
|
||||
constructor(scene: BattleScene, message: string) {
|
||||
super(scene, message, null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user