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

# Class ConditionalUserFieldBattlerTagImmunityAbAttr

Provides immunity to BattlerTags `BattlerTag` to the user's field.

#### Hierarchy (View Summary)

- UserFieldBattlerTagImmunityAbAttr
  - ConditionalUserFieldBattlerTagImmunityAbAttr

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

##### Index

### Constructors

constructor

### Properties

battlerTag
immuneTagTypes
showAbility

### Methods

addCondition
apply
applyPreApplyBattlerTag
canApply
canApplyPreApplyBattlerTag
getCondition
getTriggerMessage

## Constructors

### constructor

- new ConditionalUserFieldBattlerTagImmunityAbAttr(
  condition: (target: default ) => boolean,
  immuneTagTypes: BattlerTagType | BattlerTagType [],
  ): ConditionalUserFieldBattlerTagImmunityAbAttr

  #### Parameters

  - condition: (target: default ) => boolean
  - immuneTagTypes: BattlerTagType | BattlerTagType []

  #### Returns ConditionalUserFieldBattlerTagImmunityAbAttr

  Overrides UserFieldBattlerTagImmunityAbAttr.constructor

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

## Properties

### `Protected` battlerTag

battlerTag: BattlerTag

Inherited from UserFieldBattlerTagImmunityAbAttr.battlerTag

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

### `Protected` immuneTagTypes

immuneTagTypes: BattlerTagType []

Inherited from UserFieldBattlerTagImmunityAbAttr.immuneTagTypes

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

### showAbility

showAbility: boolean

Inherited from UserFieldBattlerTagImmunityAbAttr.showAbility

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

## Methods

### addCondition

- addCondition(condition: AbAttrCondition): AbAttr

  #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

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

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

### applyPreApplyBattlerTag

- applyPreApplyBattlerTag(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  tag: BattlerTag ,
  cancelled: BooleanHolder ,
  args: any[],
  ): void

  #### Parameters

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

  #### Returns void

  Inherited from UserFieldBattlerTagImmunityAbAttr.applyPreApplyBattlerTag

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

### 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 UserFieldBattlerTagImmunityAbAttr.canApply

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

### canApplyPreApplyBattlerTag

- canApplyPreApplyBattlerTag(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  tag: BattlerTag ,
  cancelled: BooleanHolder ,
  args: [ default , ...any[]],
  ): boolean

  Determine whether the ConditionalUserFieldBattlerTagImmunityAbAttr can be applied by passing the target pokemon to the condition.

  #### Parameters

  - pokemon: default

    The pokemon owning the ability

  - passive: boolean

    unused

  - simulated: boolean

    whether the ability is being simulated (unused)

  - tag: BattlerTag

    The `BattlerTag` being applied

  - cancelled: BooleanHolder

    Holds whether the tag was previously cancelled (unused)

  - args: [ default , ...any[]]

    Args[0] is the target that the tag is attempting to be applied to

  #### Returns boolean

  Whether the ability can be used to cancel the battler tag

  Overrides UserFieldBattlerTagImmunityAbAttr.canApplyPreApplyBattlerTag

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

### getCondition

- getCondition(): null | AbAttrCondition

  #### Returns null | AbAttrCondition

  Inherited from UserFieldBattlerTagImmunityAbAttr.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 UserFieldBattlerTagImmunityAbAttr.getTriggerMessage

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