Readonly
classicReadonly
dailyReadonly
moveReadonly
overrideReadonly
settingsSelect a pokemon from the party menu. Only really handles the basic cases of the party UI, where you just need to navigate to a party slot and press Action twice - navigating any menus that come up after you select a party member is not supported.
the index of the pokemon in your party to switch to
Which phase to expect the selection to occur in. Typically non-command switch actions happen in SwitchPhase.
Emulate a player's target selection after an attack is chosen,
usually called after doAttack
in a double battle.
the index of the attack target
Checks if the current mode matches the target mode.
The target mode.
True if the current mode matches the target mode, otherwise false.
Adds an action to be executed on the next prompt.
The target phase.
The mode to wait for.
The callback to execute.
Optional
expireFn: (() => void)Optional function to determine if the prompt has expired.
Sets the game mode.
The mode to set.
Intercepts TurnStartPhase
and mocks the getOrder's return value TurnStartPhase.getOrder
Used to modify the turn order.
The turn order to set
Transitions to the start of a battle.
Optional
species: Species[]Optional array of species to start the battle with.
A promise that resolves when the battle is started.
Transition to the next upcoming CommandPhase
Emulate selecting a modifier (item) and transition to the next upcoming CommandPhase
Waits until the specified mode is set.
The mode to wait for.
A promise that resolves when the mode is set.
Class to manage the game state and transitions between phases.