Helper to handle a Pokemon's move

Hierarchy (view full)

Constructors

Properties

game: default

Methods

  • Changes a pokemon's moveset to the given move(s). Used when the normal moveset override can't be used (such as when it's necessary to check or update properties of the moveset).

    Parameters

    Returns void

  • Intercepts MoveEffectPhase and mocks the hitCheck's return value to false. Used to force a move to miss.

    Parameters

    • firstTargetOnly: boolean = false

      Whether the move should force miss on the first target only, in the case of multi-target moves.

    Returns Promise<void>

  • 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

    Parameters

    • activated: boolean

      true to force the status to activate, false to force the status to not activate (will cause Freeze to heal)

    Returns Promise<void>

  • Simulates learning a move for a player pokemon.

    Parameters

    • move: number

      The Moves being learnt

    • partyIndex: number = 0

      The party position of the PlayerPokemon learning the move (defaults to 0)

    • moveSlotIndex: number = 0

      The INDEX (0-4) of the move slot to replace if existent move slots are full; defaults to 0 (first slot) and 4 aborts the procedure

    Returns Promise<void>

    a promise that resolves once the move has been successfully learnt

  • Select the move to be used by the given Pokemon(-index). Triggers during the next CommandPhase

    Parameters

    • move: Moves

      the move to use

    • pkmIndex: 0 | 1 = 0

      the pokemon index. Relevant for double-battles only (defaults to 0)

    • OptionaltargetIndex: null | BattlerIndex

      The BattlerIndex of the Pokemon to target for single-target moves, or null if a manual call to selectTarget() is required

    Returns void