Make `pokemon`, `move` and `targets` fields `protected set`/`public get`
This commit is contained in:
parent
5bd259335b
commit
7d340f2190
|
@ -24,14 +24,38 @@ import * as Utils from "#app/utils";
|
|||
import i18next from "i18next";
|
||||
|
||||
export class MovePhase extends BattlePhase {
|
||||
public pokemon: Pokemon;
|
||||
public move: PokemonMove;
|
||||
public targets: BattlerIndex[];
|
||||
protected _pokemon: Pokemon;
|
||||
protected _move: PokemonMove;
|
||||
protected _targets: BattlerIndex[];
|
||||
protected followUp: boolean;
|
||||
protected ignorePp: boolean;
|
||||
protected failed: boolean = false;
|
||||
protected cancelled: boolean = false;
|
||||
|
||||
public get pokemon(): Pokemon {
|
||||
return this._pokemon;
|
||||
}
|
||||
|
||||
protected set pokemon(pokemon: Pokemon) {
|
||||
this._pokemon = pokemon;
|
||||
}
|
||||
|
||||
public get move(): PokemonMove {
|
||||
return this._move;
|
||||
}
|
||||
|
||||
protected set move(move: PokemonMove) {
|
||||
this._move = move;
|
||||
}
|
||||
|
||||
public get targets(): BattlerIndex[] {
|
||||
return this._targets;
|
||||
}
|
||||
|
||||
protected set targets(targets: BattlerIndex[]) {
|
||||
this._targets = targets;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
|
Loading…
Reference in New Issue