diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 35be5513d9e..cf99742b17d 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -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.