Adds a new MoveAttr to this move (appends to the attr array).
If the MoveAttr also comes with a condition, it is added to its MoveCondition
array.
Similar to attr
, except this takes an already instantiated MoveAttr
object
as opposed to a constructor and its arguments.
this
Applies each MoveCondition
function of this move to the params, determines if the move can be used prior to calling each attribute's apply()
boolean: false if any of the apply()'s return false, else true
Adds a new MoveAttr to this move (appends to the attr array).
If the MoveAttr also comes with a condition, it is added to its MoveCondition
array.
this
Sets the MoveFlags.BALLBOMB_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.BITING_MOVE
flag for the calling Move
The Move
that called this function
Calculate the Expected Power per turn of this move, taking into account multi hit moves, accuracy, and the number of turns it takes to execute.
Does not (yet) consider the current field effects or the user's abilities.
Returns true
if this move can be given additional strikes
by enhancing effects.
Currently used for Parental Bond
and Multi-Lens
.
Sets the MoveFlags.CHECK_ALL_HITS
flag for the calling Move
The Move
that called this function
Adds a condition to this move (in addition to any provided by its prior MoveAttr
s).
The move will fail upon use if at least 1 of its conditions is not met.
The MoveCondition
or MoveConditionFunc to add to the conditions array.
this
Sets the MoveFlags.DANCE_MOVE
flag for the calling Move
The Move
that called this function
Checks if the move flag applies to the pokemon(s) using/receiving the move
This method will take the user
's ability into account when reporting flags, e.g.
calling this method for MAKES_CONTACT
will return false
if the user has a AbilityId.LONG_REACH
that is not being suppressed.
Note: This method only checks if the move should have effectively have the flag applied to its use.
It does not check whether the flag will trigger related effects.
For example using this method to check MoveFlags.WIND_MOVE
will not consider Wind Rider
.
To simply check whether the move has a flag, use hasFlag
.
boolean
Mark a move as having one or more edge cases. The move may lack certain niche interactions with other moves/abilities, but still functions as intended in most cases.
When using this, make sure to document the edge case (or else this becomes pointless).
this
Get all move attributes that match attrType
.
An array containing all attributes matching attrType
, or an empty array if none match.
Sees if a move has a custom failure text (by looking at each MoveAttr
of this move)
string of the custom failure text, or null
if it uses the default text ("But it failed!")
Check if a move has an attribute that matches attrType
.
The name of a MoveAttr
to search for
Whether this move has at least 1 attribute that matches attrType
Sets the MoveFlags.HIDE_TARGET
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.HIDE_USER
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.IGNORE_ABILITIES
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.IGNORE_PROTECT
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.IGNORE_SUBSTITUTE
flag for the calling Move
The Move
that called this function
Check if the move is of the given subclass without requiring instanceof
.
! Does not work for ChargingAttackMove
and ChargingSelfStatusMove
subclasses. For those,
use isChargingMove
instead.
The string name of the move to check against
Whether this move is of the provided type.
Getter function that returns if the move targets the user or its ally
boolean
Getter function that returns if the move hits multiple targets
boolean
Checks if the target is immune to this Move's type. Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster.
The Pokemon
using this move
The Pokemon
targeted by this move
The PokemonType
of the target
Whether the move is blocked by the target's type.
Self-targeted moves will return false
regardless of circumstances.
Sets the MoveFlags.MAKES_CONTACT
flag for the calling Move
Whether the move should make contact; default true
this
Mark this move as partially implemented. Partial moves are expected to have some core functionality implemented, but may lack certain notable features or interactions with other moves or abilities.
this
Sets the MoveFlags.POWDER_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.PULSE_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.PUNCHING_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.RECKLESS_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.REDIRECT_COUNTER
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.REFLECTABLE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.SLICING_MOVE
flag for the calling Move
The Move
that called this function
Sets the MoveFlags.SOUND_BASED
flag for the calling Move
The Move
that called this function
Sets the move target of this move
The MoveTarget
to set
this
Sets the MoveFlags.TRIAGE_MOVE
flag for the calling Move
The Move
that called this function
Mark this move as unimplemented. Unimplemented moves are ones which have none of their basic functionality enabled, and cannot be used.
this
Sets the MoveFlags.WIND_MOVE
flag for the calling Move
The Move
that called this function
The chance of a move's secondary effects activating