pokemon-rogue-battle
    Preparing search index...

    Class ArenaTrapAbAttr

    Determines whether a Pokemon is blocked from switching/running away because of a trapping ability or move.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    arenaTrapCondition: ArenaTrapCondition
    showAbility: boolean

    Methods

    • Applies ability effects without checking conditions

      Parameters

      • pokemon: default

        The pokemon to apply this ability to

      • passive: boolean

        Whether or not the ability is a passive

      • simulated: boolean

        Whether the call is simulated

      • cancelled: null | BooleanHolder
      • args: any[]

        Extra args passed to the function. Handled by child classes.

      Returns void

    • Checks if enemy Pokemon is trapped by an Arena Trap-esque ability If the enemy is a Ghost type, it is not trapped If the enemy has the ability Run Away, it is not trapped. If the user has Magnet Pull and the enemy is not a Steel type, it is not trapped. If the user has Arena Trap and the enemy is not grounded, it is not trapped.

      Parameters

      Returns void

    • Returns a boolean describing whether the ability can be applied under current conditions

      Parameters

      • pokemon: default

        The pokemon to apply this ability to

      • passive: boolean

        Whether or not the ability is a passive

      • simulated: boolean

        Whether the call is simulated

      • args: any[]

        Extra args passed to the function. Handled by child classes.

      Returns boolean

      true if the ability can be applied, false otherwise

      apply