# Class Ability

#### Implements

- Localizable

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

#####
Index

### Constructors

constructor

### Properties

attrs
conditions
description
generation
id
isBypassFaint
isIgnorable
name
nameAppend

### Methods

attr
bypassFaint
condition
conditionalAttr
getAttrs
hasAttr
ignorable
localize
partial
unimplemented

## Constructors

### constructor

- new Ability(id, generation): Ability

- #### Parameters

  - id: Abilities
  - generation: number

  #### Returns Ability

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

## Properties

### attrs

attrs: AbAttr []

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

### conditions

conditions: AbAttrCondition[]

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

### description

description: string

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

### generation

generation: number

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

### id

id: Abilities

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

### isBypassFaint

isBypassFaint: boolean

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

### isIgnorable

isIgnorable: boolean

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

### name

name: string

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

### `Private` nameAppend

nameAppend: string

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

## Methods

### attr

- attr< T >(AttrType, ...args): Ability

- #### Type Parameters

  - T extends (new (...args) => AbAttr )

  #### Parameters

  - AttrType: T
  - `Rest` ...args: ConstructorParameters< T >

  #### Returns Ability

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

### bypassFaint

- bypassFaint(): Ability

- #### Returns Ability

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

### condition

- condition(condition): Ability

- #### Parameters

  - condition: AbAttrCondition

  #### Returns Ability

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

### conditionalAttr

- conditionalAttr< T >(condition, AttrType, ...args): Ability

- #### Type Parameters

  - T extends (new (...args) => AbAttr )

  #### Parameters

  - condition: AbAttrCondition
  - AttrType: T
  - `Rest` ...args: ConstructorParameters< T >

  #### Returns Ability

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

### getAttrs

- getAttrs< T >(attrType): T []

- Get all ability attributes that match `attrType`

  #### Type Parameters

  - T extends AbAttr

  #### Parameters

  - attrType: (new (...args) => T )

    any attribute that extends `AbAttr`

    - - new (...args): T

      - #### Parameters

        - `Rest` ...args: any[]

        #### Returns T

  #### Returns T []

  Array of attributes that match `attrType`, Empty Array if none match.

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

### hasAttr

- hasAttr< T >(attrType): boolean

- Check if an ability has an attribute that matches `attrType`

  #### Type Parameters

  - T extends AbAttr

  #### Parameters

  - attrType: (new (...args) => T )

    any attribute that extends `AbAttr`

    - - new (...args): T

      - #### Parameters

        - `Rest` ...args: any[]

        #### Returns T

  #### Returns boolean

  true if the ability has attribute `attrType`

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

### ignorable

- ignorable(): Ability

- #### Returns Ability

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

### localize

- localize(): void

- #### Returns void

  Implementation of Localizable.localize

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

### partial

- partial(): this

- #### Returns this

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

### unimplemented

- unimplemented(): this

- #### Returns this

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