PokéRogue
    Preparing search index...

    Helper to handle using a Pokemon's moves.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • 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.

      Parameters

      Returns void

    • 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!

      Parameters

      • moveId: MoveId

        The Move | move ID the enemy will be forced to use.

      • Optionaltarget: BattlerIndex

        The target against which the enemy will use the given move; defaults to normal target selection priorities if omitted or not single-target.

      Returns Promise<void>

      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.

    • Force the next move(s) used by Metronome to be a specific move.
      Triggers during the next upcoming MoveEffectPhase that Metronome is used.

      Parameters

      • move: MoveId

        The move to force Metronome to call

      • once: boolean = false

        If true, mocks the return value exactly once; default false

      Returns MockInstance

      The spy that for Metronome that was mocked (Usually unneeded).

      game.move.use(MoveId.METRONOME);
      game.move.forceMetronomeMove(MoveId.FUTURE_SIGHT); // Can be in any order
    • Intercepts MoveEffectPhase and mocks the phase's move's accuracy to 0, guaranteeing a miss.

      Parameters

      • firstTargetOnly: boolean = false

        Whether to only force a miss on the first target hit; default false.

      Returns Promise<void>

      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

      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>

    • Forces the next enemy selecting a move to use the given move in its moveset against the given target (if applicable).

      Parameters

      • moveId: MoveId

        The Move | move ID the enemy will be forced to use.

      • Optionaltarget: BattlerIndex

        The target against which the enemy will use the given move; defaults to normal target selection priorities if omitted or not single-target.

      Returns Promise<void>

      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.

    • 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!

      Parameters

      • moveId: MoveId

        The MoveId to use

      • pkmIndex: PLAYER | PLAYER_2 = BattlerIndex.PLAYER

        The BattlerIndex of the player Pokemon using the move. Relevant for double battles only and defaults to BattlerIndex.PLAYER if not specified

      • OptionaltargetIndex: BattlerIndex

        The BattlerIndex of the Pokemon to target for single-target moves; should be omitted for multi-target moves

      • useTera: boolean = false

        If true, the Pokemon will attempt to Terastallize even without a Tera Orb; default false

      Returns void

      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.