PokéRogue
    Preparing search index...
    Index

    Constructors

    Properties

    switchType: SwitchType

    Methods

    • Returns a message if the switch-out attempt fails due to ability effects.

      Parameters

      • target: Pokemon

        The target Pokémon.

      Returns string | null

      The failure message, or null if no failure.

    • Determines if a Pokémon can switch out based on its status, the opponent's status, and battle conditions.

      Parameters

      • pokemon: Pokemon

        The Pokémon attempting to switch out

      • opponent: Pokemon

        The opponent Pokémon

      Returns boolean

      true if the switch-out condition is met

    • Handles the logic for switching out a Pokémon based on battle conditions, HP, and the switch type.

      Parameters

      • pokemon: Pokemon

        The Pokémon attempting to switch out.

      Returns boolean

      true if the switch is successful