Indicates that the move was reflected by Magic Coat or Magic Bounce. Reflected moves cannot be reflected again and will not trigger Dancer.
Protected_moveProtected_pokemonProtected_targetsProtectedcancelledProtectedfailedProtectedfollowProtectedignoreProtectedreflectedProtectedchargeQueues a MoveChargePhase for this phase's invoked move.
Queues a MoveEndPhase if the move wasn't a followUp and () returns true,
then ends the phase.
Applies PP increasing abilities (currently only Pressure) if they exist on the target pokemon. Note that targets must include only active pokemon.
TODO: This hardcodes the PP increase at 1 per opponent, rather than deferring to the ability.
ProtectedhandleHandles the case where the move was cancelled or failed:
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:
ProtectedlapseProtectedresolveCounter-attacking moves pass in [BattlerIndex.ATTACKER] into the constructor's targets param.
This function modifies this.targets 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.
ProtectedresolveCheck for cancellation edge cases - no targets remaining, or Moves.NONE is in the queue
ProtectedresolveProtectedresolveModifies this.targets in place, based upon:
targets constructor param ([BattlerIndex.ATTACKER]).Displays the move's usage text to the player, unless it's a charge turn (ie: Solar Beam), the pokemon is on a recharge turn (ie: Hyper Beam), or a 2-turn move was interrupted (ie: Fly).
Protecteduse
Indicates that the move being used 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.