The Pokemon
using the move
The PokemonMove
to use
The MoveUseMode
corresponding to this move's means of execution (usually MoveUseMode.NORMAL
).
Not marked optional to ensure callers correctly pass on useModes
.
Whether to force this phase to occur last in order (for MoveId.QUASH
); default false
Protected
_Protected
_Protected
_Protected
cancelledWhether the current move should fail and retain PP.
Protected
failedWhether the current move should fail but still use PP.
Protected
forcedWhether the current move is forced last (used for Quash).
Readonly
phaseThe string name of the phase, used to identify the phase type for is
Readonly
useSignifies the current move should cancel and retain PP
Checks if the pokemon is active, if the move is usable, and that the move is targeting something.
true
to not check if the move is disabled
true
if all the checks pass
Protected
chargeQueue a MoveChargePhase for this phase's invoked move. Does NOT consume PP (occurs on the 2nd strike of the move)
Queue a MoveEndPhase and then end this phase.
Signifies the current move should fail but still use PP
Protected
failFail the move currently being used. Handles failure messages, pushing to move history, etc.
Whether to show move text when failing the move.
Whether the move failed due to weather (default false
)
Whether the move failed due to terrain (default false
)
Protected
handleHandles the case where the move was cancelled or failed:
Pressure
)Truant
don't trigger on the
next turn and soft-lock.MOVE_EFFECT
tags:
Semi-invulnerable battler tags (Fly/Dive/etc.) are intended to lapse on move effects, but also need to lapse on move failure/cancellation.
TODO: ...this seems weird.
AFTER_MOVE
tags:
Substitute
Check if the phase is of the given type without requiring instanceof
.
The string name of the phase to check.
Whether this phase is of the provided type.
Shows whether the current move has been forced to the end of the turn
Needed for speed order, see MoveId.QUASH
Protected
lapseProtected
resolveUpdate the targets of any counter-attacking moves with [
BattlerIndex.ATTACKER
]
set
to reflect the actual battler index of the user's last attacker.
If there is no last attacker or they are no longer on the field, a message is displayed and the move is marked for failure.
Make this a feature of the move rather than basing logic on BattlerIndex.ATTACKER
Protected
resolveCheck for cancellation edge cases - no targets remaining, or MoveId.NONE
is in the queue
Protected
resolveProtected
resolveModifies this.targets
in place, based upon:
targets
constructor param ([
BattlerIndex.ATTACKER
]
).Display the text for a move failing to execute.
The failure text to display; defaults to "battle:attackFailed"
locale key
("But it failed!" in english)
Displays the move's usage text to the player as applicable for the move being used.
Protected
use
Create a new MovePhase for using moves.