# Class TypeImmunityAbAttr

Determines whether a Pokemon is immune to a move because of an ability.

#### See

- `applyPreDefend`
- `getCondition`

#### Hierarchy (view full)

- PreDefendAbAttr
  - TypeImmunityAbAttr
    - TypeImmunityHealAbAttr
    - NonSuperEffectiveImmunityAbAttr

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

#####
Index

### Constructors

constructor

### Properties

condition
immuneType
showAbility

### Methods

addCondition
apply
applyPreDefend
getCondition
getTriggerMessage

## Constructors

### constructor

- new TypeImmunityAbAttr(immuneType, condition?): TypeImmunityAbAttr

- #### Parameters

  - immuneType: Type
  - `Optional` condition: AbAttrCondition

  #### Returns TypeImmunityAbAttr

  Overrides PreDefendAbAttr.constructor

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

## Properties

### `Private` condition

condition: AbAttrCondition

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

### `Private` immuneType

immuneType: Type

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

### showAbility

showAbility: boolean

Inherited from PreDefendAbAttr.showAbility

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

## Methods

### addCondition

- addCondition(condition): AbAttr

- #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from PreDefendAbAttr.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 PreDefendAbAttr.apply

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

### applyPreDefend

- applyPreDefend(pokemon, passive, attacker, move, cancelled, args): boolean

- #### Parameters

  - pokemon: default

    `Pokemon` the defending Pokemon

  - passive: boolean

    N/A

  - attacker: default

    `Pokemon` the attacking Pokemon

  - move: default

    `Move` the attacking move

  - cancelled: BooleanHolder

    N/A

  - args: any[]

    [0] `Utils.NumberHolder` gets set to 0 if move is immuned by an ability.

  #### Returns boolean

  Overrides PreDefendAbAttr.applyPreDefend

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

### getCondition

- getCondition(): AbAttrCondition

- #### Returns AbAttrCondition

  Overrides PreDefendAbAttr.getCondition

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

### getTriggerMessage

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

- #### Parameters

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

  #### Returns string

  Inherited from PreDefendAbAttr.getTriggerMessage

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