Separate tag lapsing out of the status resolution function
This commit is contained in:
parent
841f032e45
commit
9f2a785fdd
|
@ -96,6 +96,8 @@ export class MovePhase extends BattlePhase {
|
||||||
|
|
||||||
this.resolvePreMoveStatusEffects();
|
this.resolvePreMoveStatusEffects();
|
||||||
|
|
||||||
|
this.lapsePreMoveAndMoveTags();
|
||||||
|
|
||||||
this.resolveFinalPreMoveCancellationChecks();
|
this.resolveFinalPreMoveCancellationChecks();
|
||||||
|
|
||||||
if (this.cancelled || this.failed) {
|
if (this.cancelled || this.failed) {
|
||||||
|
@ -160,8 +162,13 @@ export class MovePhase extends BattlePhase {
|
||||||
this.pokemon.updateInfo();
|
this.pokemon.updateInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Lapse tags that triggered before a move is used, regardless of whether or not it failed.
|
/**
|
||||||
|
* Lapse `PRE_MOVE` tags that trigger before a move is used, regardless of whether or not it failed.
|
||||||
|
* Also lapse `MOVE` tags if the move should be successful.
|
||||||
|
*/
|
||||||
|
lapsePreMoveAndMoveTags() {
|
||||||
this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE);
|
this.pokemon.lapseTags(BattlerTagLapseType.PRE_MOVE);
|
||||||
|
|
||||||
// TODO: does this intentionally happen before the no targets/Moves.NONE on queue cancellation case is checked?
|
// TODO: does this intentionally happen before the no targets/Moves.NONE on queue cancellation case is checked?
|
||||||
|
|
Loading…
Reference in New Issue