Ability attribute for forcing a Pokémon to switch out after its health drops below half. This attribute checks various conditions related to the damage received, the moves used by the Pokémon and its opponents, and determines whether a forced switch-out should occur.

Used by Wimp Out and Emergency Exit

Hierarchy (view full)

Constructors

Properties

showAbility: boolean

Methods

  • Applies the switch-out logic after the Pokémon takes damage. Checks various conditions based on the moves used by the Pokémon, the opponents' moves, and the Pokémon's health after damage to determine whether the switch-out should occur.

    Parameters

    • pokemon: default

      The Pokémon that took damage.

    • damage: number

      The amount of damage taken by the Pokémon.

    • passive: boolean

      N/A

    • simulated: boolean

      Whether the ability is being simulated.

    • args: any[]

      N/A

    • Optionalsource: default

      The Pokemon that dealt damage

    Returns boolean | Promise<boolean>

    true if the switch-out logic was successfully applied