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

# Class CommanderAbAttr

Attribute implementing the effects of Commander. When the source of an ability with this attribute detects a Dondozo as their active ally, the source "jumps into the Dondozo's mouth," sharply boosting the Dondozo's stats, cancelling the source's moves, and causing attacks that target the source to always miss.

#### Hierarchy (View Summary)

- AbAttr
  - CommanderAbAttr

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

##### Index

### Constructors

constructor

### Properties

showAbility

### Methods

addCondition
apply
canApply
getCondition
getTriggerMessage

## Constructors

### constructor

- new CommanderAbAttr(): CommanderAbAttr

  #### Returns CommanderAbAttr

  Overrides AbAttr.constructor

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

## Properties

### showAbility

showAbility: boolean

Inherited from AbAttr.showAbility

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

## Methods

### addCondition

- addCondition(condition: AbAttrCondition): AbAttr

  #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from AbAttr.addCondition

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

### apply

- apply(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  cancelled: null,
  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
  - args: any[]

    Extra args passed to the function. Handled by child classes.

  #### Returns void

  #### See

  `canApply`

  Overrides AbAttr.apply

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

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

  Overrides AbAttr.canApply

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

### getCondition

- getCondition(): null | AbAttrCondition

  #### Returns null | AbAttrCondition

  Inherited from AbAttr.getCondition

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

### getTriggerMessage

- getTriggerMessage(
  _pokemon: default ,
  _abilityName: string,
  ..._args: any[],
  ): null | string

  #### Parameters

  - _pokemon: default
  - _abilityName: string
  - ..._args: any[]

  #### Returns null | string

  Inherited from AbAttr.getTriggerMessage

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