AbstractPrivate_Private_PrivateconditionsConditions that must be met for the move to succeed when it is used.
These are the default conditions checked during the move effect phase (aka sequence 4). When adding a new condition, if unsure of where it occurs in the failure checks, it should go here.
Different from restrictions, which are checked when the move is selected
PrivateconditionsMove failure conditions that occur during the second sequence (after move message but before the move is recorded as the last move used)
PrivateconditionsMove failure conditions that occur during the third sequence (after accuracy and before move effects).
List of move-based conditions that occur in this sequence:
PrivateflagsThe move's MoveFlags
PrivatenamePrivaterestrictionsConditions that must be false for a move to be able to be selected.
Different from conditions, which is checked when the move is invoked
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
Sets the MoveFlags.GRAVITY flag for the calling Move and adds gravityUseRestriction to the
move's restrictions.
this
No condition is added, as gravity's condition is already checked
during the first sequence of a move's failure check, and this would be redundant.
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.
The MoveAttr to add
The arguments needed to instantiate the given class
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.
Check whether this Move can be given additional strikes from enhancing effects.
Currently used for Parental Bond
and Multi Lens.
Whether this Move can be given additional strikes.
Sets the MoveFlags.CHECK_ALL_HITS flag for the calling Move
The Move that called this function
Determine whether the move is restricted from being selected due to its own requirements.
The Pokemon using the move
false if the move is restricted, and the second element is a string
with the reason for the restriction, otherwise, true and the empty string.Adds a condition to this move (in addition to any provided by its prior MoveAttrs).
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.
The sequence number where the failure check occurs
this for method chaining
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
AbstractisCheck 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.REFLECTABLE flag for the calling Move
The Move that called this function
Adds a restriction condition to this move. The move will not be selectable if at least 1 of its restrictions is met.
A function that evaluates to true if the move is restricted from being selected
this for method chaining
Adds a restriction condition to this move. The move will not be selectable if at least 1 of its restrictions is met.
The function or MoveRestriction that evaluates to true if the move is restricted from
being selected
The i18n key for the restriction text
OptionalalsoCondition: booleanIf true, also adds an equivalent MoveCondition that checks the same condition when the
move is used (while taking care to invert the return value); default false
OptionalconditionSeq: numberThe sequence number where the failure check occurs; default 4
this for method chaining
PrivatesetSets 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