PokéRogue
    Preparing search index...

    Helper to handle classic-mode specific operations.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    • Queue inputs to switch at the start of the next battle, and then start it.

      Parameters

      • pokemonIndex: 1 | 2 | 3 | 4 | 5

        The 0-indexed position of the party pokemon to switch to.

      Returns Promise<void>

      A Promise that resolves once the battle has been started and the switch prompt resolved.

      Error Fails test if pokemonIndex is out of valid bounds

      This will temporarily set the current BattleStyle to SWITCH for the duration of the CheckSwitchPhase.

      Make this work for double battles

      await game.classicMode.runToSummon(SpeciesId.MIGHTYENA, SpeciesId.POOCHYENA)
      await game.startBattleWithSwitch(1);