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

# Function applyOnGainAbAttrs

- applyOnGainAbAttrs(
  pokemon: default ,
  passive?: boolean,
  simulated?: boolean,
  ...args: any[],
  ): void

  Applies abilities when they become active mid-turn (ability switch)

  Ignores passives as they don't change and shouldn't be reapplied when main abilities change

  #### Parameters

  - pokemon: default
  - passive: boolean = false
  - simulated: boolean = false
  - ...args: any[]

  #### Returns void

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