Update MovePhase constructor
This commit is contained in:
parent
bdbeaac104
commit
f81c713380
|
@ -54,9 +54,9 @@ export class MovePhase extends BattlePhase {
|
|||
protected _targets: BattlerIndex[];
|
||||
protected followUp: boolean;
|
||||
protected ignorePp: boolean;
|
||||
protected forcedLast: boolean;
|
||||
protected failed: boolean = false;
|
||||
protected cancelled: boolean = false;
|
||||
protected forcedLast: boolean = false;
|
||||
|
||||
public get pokemon(): Pokemon {
|
||||
return this._pokemon;
|
||||
|
@ -86,7 +86,7 @@ export class MovePhase extends BattlePhase {
|
|||
* @param followUp Indicates that the move being uses is a "follow-up" - for example, a move being used by Metronome or Dancer.
|
||||
* Follow-ups bypass a few failure conditions, including flinches, sleep/paralysis/freeze and volatile status checks, etc.
|
||||
*/
|
||||
constructor(scene: BattleScene, pokemon: Pokemon, targets: BattlerIndex[], move: PokemonMove, followUp: boolean = false, ignorePp: boolean = false) {
|
||||
constructor(scene: BattleScene, pokemon: Pokemon, targets: BattlerIndex[], move: PokemonMove, followUp: boolean = false, ignorePp: boolean = false, forcedLast: boolean = false) {
|
||||
super(scene);
|
||||
|
||||
this.pokemon = pokemon;
|
||||
|
@ -94,6 +94,7 @@ export class MovePhase extends BattlePhase {
|
|||
this.move = move;
|
||||
this.followUp = followUp;
|
||||
this.ignorePp = ignorePp;
|
||||
this.forcedLast = forcedLast;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,15 +117,9 @@ export class MovePhase extends BattlePhase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Flags that the current move has been forced to the end of the turn
|
||||
* Shows whether the current move has been forced to the end of the turn
|
||||
* Needed for speed order, see {@linkcode Moves.QUASH}
|
||||
* */
|
||||
public forceLast(): MovePhase {
|
||||
this.forcedLast = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public isForcedLast(): boolean {
|
||||
return this.forcedLast;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue