Changes a pokemon's moveset to the given move(s).
Useful when normal moveset overrides can't be used (such as when it's necessary to check or update properties of the moveset).
Note: Will disable the moveset override matching the pokemon's party.
Forces the Confusion status to activate on the next move by temporarily mocking Overrides.CONFUSION_ACTIVATION_OVERRIDE,
advancing to the next MovePhase, and then resetting the override to null
true to force the Pokemon to hit themself, false to forcibly disable it
Modify the moveset of the next enemy selecting a move to contain only the given move, and then
selects it to be used during the next EnemyCommandPhase against the given targets.
Does not require the given move to be in the enemy's moveset beforehand, but overwrites the pokemon's moveset and disables any prior moveset overrides!
The Move | move ID the enemy will be forced to use.
Optionaltarget: BattlerIndexThe target against which the enemy will use the given move;
defaults to normal target selection priorities if omitted or not single-target.
If you need to check for changes in the enemy's moveset as part of the test, it may be
best to use changeMoveset and selectEnemyMove instead.
Intercepts MoveEffectPhase and mocks the phase's move's
accuracy to -1, guaranteeing a hit.
A promise that resolves once the next MoveEffectPhase has been reached (not run).
Force the next move(s) used by Metronome to be a specific move.
Triggers during the next upcoming MoveEffectPhase that Metronome is used.
The move to force Metronome to call
If true, mocks the return value exactly once; default false
The spy that for Metronome that was mocked (Usually unneeded).
Intercepts MoveEffectPhase and mocks the phase's move's accuracy
to 0, guaranteeing a miss.
Whether to only force a miss on the first target hit; default false.
A promise that resolves once the next MoveEffectPhase has been reached (not run).
Forces the Paralysis or Freeze status to activate on the next move by temporarily mocking Overrides.STATUS_ACTIVATION_OVERRIDE,
advancing to the next MovePhase, and then resetting the override to null
true to force the status to activate, false to force the status to not activate (will cause Freeze to heal)
PrivategetSelect a move already in the player's moveset to be used during the next CommandPhase.
The MoveId to use.
The BattlerIndex of the player Pokemon using the move. Relevant for double battles only and defaults to BattlerIndex.PLAYER if not specified.
OptionaltargetIndex: null | BattlerIndexThe BattlerIndex of the Pokemon to target for single-target moves; should be omitted for multi-target moves.
If set to null, will forgo normal target selection entirely (useful for UI tests).
Forces the next enemy selecting a move to use the given move in its moveset against the given target (if applicable).
The Move | move ID the enemy will be forced to use.
Optionaltarget: BattlerIndexThe target against which the enemy will use the given move;
defaults to normal target selection priorities if omitted or not single-target.
If you do not need to check for changes in the enemy's moveset as part of the test, it may be
best to use forceEnemyMove instead.
Select a move already in the player's moveset to be used during the next CommandPhase, which will also terastallize on this turn.
The MoveId to use.
The BattlerIndex of the player Pokemon using the move. Relevant for double battles only and defaults to BattlerIndex.PLAYER if not specified.
OptionaltargetIndex: null | BattlerIndexThe BattlerIndex of the Pokemon to target for single-target moves; should be omitted for multi-target moves.
If set to null, will forgo normal target selection entirely (useful for UI tests)
Modifies a player pokemon's moveset to contain only the selected move, and then
selects it to be used during the next CommandPhase.
Warning: Will disable the player moveset override if it is enabled, as well as any mid-battle moveset changes!
The MoveId to use
The BattlerIndex of the player Pokemon using the move. Relevant for double battles only and defaults to BattlerIndex.PLAYER if not specified
OptionaltargetIndex: BattlerIndexThe BattlerIndex of the Pokemon to target for single-target moves; should be omitted for multi-target moves
If true, the Pokemon will attempt to Terastallize even without a Tera Orb; default false
If you need to check for changes in the player's moveset as part of the test, it may be
better to use changeMoveset and select instead.
Helper to handle using a Pokemon's moves.