# Class ArenaTrapAbAttr

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

#### See

`applyCheckTrapped`

#### Hierarchy (view full)

- CheckTrappedAbAttr
  - ArenaTrapAbAttr

- Defined in src/data/ability.ts:2948

#####
Index

### Constructors

constructor

### Properties

arenaTrapCondition
showAbility

### Methods

addCondition
apply
applyCheckTrapped
getCondition
getTriggerMessage

## Constructors

### constructor

- new ArenaTrapAbAttr(condition): ArenaTrapAbAttr

- #### Parameters

  - condition: ArenaTrapCondition

  #### Returns ArenaTrapAbAttr

  Inherited from CheckTrappedAbAttr.constructor

  - Defined in src/data/ability.ts:2932

## Properties

### `Protected` arenaTrapCondition

arenaTrapCondition: ArenaTrapCondition

Inherited from CheckTrappedAbAttr.arenaTrapCondition

- Defined in src/data/ability.ts:2931

### showAbility

showAbility: boolean

Inherited from CheckTrappedAbAttr.showAbility

- Defined in src/data/ability.ts:126

## Methods

### addCondition

- addCondition(condition): AbAttr

- #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from CheckTrappedAbAttr.addCondition

  - Defined in src/data/ability.ts:145

### apply

- apply(pokemon, passive, cancelled, args): boolean | Promise<boolean>

- #### Parameters

  - pokemon: default
  - passive: boolean
  - cancelled: BooleanHolder
  - args: any[]

  #### Returns boolean | Promise<boolean>

  Inherited from CheckTrappedAbAttr.apply

  - Defined in src/data/ability.ts:133

### applyCheckTrapped

- applyCheckTrapped(pokemon, passive, trapped, otherPokemon, args): boolean

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

  - pokemon: default

    The Pokemon with this AbAttr

  - passive: boolean

    N/A

  - trapped: BooleanHolder

    Utils.BooleanHolder indicating whether the other Pokemon is trapped or not

  - otherPokemon: default

    The Pokemon that is affected by an Arena Trap ability

  - args: any[]

    N/A

  #### Returns boolean

  if enemy Pokemon is trapped or not

  Overrides CheckTrappedAbAttr.applyCheckTrapped

  - Defined in src/data/ability.ts:2961

### getCondition

- getCondition(): AbAttrCondition

- #### Returns AbAttrCondition

  Inherited from CheckTrappedAbAttr.getCondition

  - Defined in src/data/ability.ts:141

### getTriggerMessage

- getTriggerMessage(pokemon, abilityName, ...args): string

- #### Parameters

  - pokemon: default
  - abilityName: string
  - `Rest` ...args: any[]

  #### Returns string

  Overrides CheckTrappedAbAttr.getTriggerMessage

  - Defined in src/data/ability.ts:2974