# StatusEffectImmunityAbAttr | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class StatusEffectImmunityAbAttr

Provides immunity to status effects to the user.

#### Hierarchy (View Summary)

- PreSetStatusEffectImmunityAbAttr
  - StatusEffectImmunityAbAttr

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

##### Index

### Constructors

constructor

### Properties

immuneEffects
showAbility

### Methods

addCondition
apply
applyPreSetStatus
canApply
canApplyPreSetStatus
getCondition
getTriggerMessage

## Constructors

### constructor

- new StatusEffectImmunityAbAttr(
  ...immuneEffects: StatusEffect [],
  ): StatusEffectImmunityAbAttr

  #### Parameters

  - ...immuneEffects: StatusEffect []

    The status effects to which the Pokémon is immune.

  #### Returns StatusEffectImmunityAbAttr

  Inherited from PreSetStatusEffectImmunityAbAttr.constructor

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

## Properties

### `Protected` immuneEffects

immuneEffects: StatusEffect []

Inherited from PreSetStatusEffectImmunityAbAttr.immuneEffects

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

### showAbility

showAbility: boolean

Inherited from PreSetStatusEffectImmunityAbAttr.showAbility

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

## Methods

### addCondition

- addCondition(condition: AbAttrCondition): AbAttr

  #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from PreSetStatusEffectImmunityAbAttr.addCondition

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

### apply

- apply(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  cancelled: null | BooleanHolder ,
  args: any[],
  ): void

  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

  #### See

  `canApply`

  Inherited from PreSetStatusEffectImmunityAbAttr.apply

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

### applyPreSetStatus

- applyPreSetStatus(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  effect: StatusEffect ,
  cancelled: BooleanHolder ,
  args: any[],
  ): void

  Applies immunity to supplied status effects.

  #### Parameters

  - pokemon: default

    The Pokémon to which the status is being applied.

  - passive: boolean

    n/a

  - simulated: boolean
  - effect: StatusEffect

    The status effect being applied.

  - cancelled: BooleanHolder

    A holder for a boolean value indicating if the status application was cancelled.

  - args: any[]

    n/a

  #### Returns void

  Inherited from PreSetStatusEffectImmunityAbAttr.applyPreSetStatus

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

### canApply

- canApply(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  args: any[],
  ): boolean

  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

  #### See

  `apply`

  Inherited from PreSetStatusEffectImmunityAbAttr.canApply

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

### canApplyPreSetStatus

- canApplyPreSetStatus(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  effect: StatusEffect ,
  cancelled: BooleanHolder ,
  args: any[],
  ): boolean

  Return whether the ability attribute can be applied

  #### Parameters

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

  #### Returns boolean

  Inherited from PreSetStatusEffectImmunityAbAttr.canApplyPreSetStatus

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

### getCondition

- getCondition(): null | AbAttrCondition

  #### Returns null | AbAttrCondition

  Inherited from PreSetStatusEffectImmunityAbAttr.getCondition

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

### getTriggerMessage

- getTriggerMessage(pokemon: default , abilityName: string, ...args: any[]): string

  #### Parameters

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

  #### Returns string

  Inherited from PreSetStatusEffectImmunityAbAttr.getTriggerMessage

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