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

# Class Ability

#### Implements

- Localizable

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

##### Index

### Constructors

constructor

### Properties

attrs
conditions
description
generation
id
isBypassFaint
isCopiable
isIgnorable
isReplaceable
isSuppressable
name

### Accessors

isSwappable

### Methods

attr
bypassFaint
condition
conditionalAttr
edgeCase
getAttrs
hasAttr
ignorable
localize
partial
uncopiable
unimplemented
unreplaceable
unsuppressable

## Constructors

### constructor

- new Ability(id: Abilities , generation: number): Ability

  #### Parameters

  - id: Abilities
  - generation: number

  #### Returns Ability

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

## Properties

### attrs

attrs: AbAttr []

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

### conditions

conditions: AbAttrCondition[]

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

### description

description: string

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

### generation

generation: number

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

### id

id: Abilities

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

### isBypassFaint

isBypassFaint: boolean

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

### isCopiable

isCopiable: boolean = true

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

### isIgnorable

isIgnorable: boolean

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

### isReplaceable

isReplaceable: boolean = true

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

### isSuppressable

isSuppressable: boolean = true

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

### name

name: string

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

## Accessors

### isSwappable

- get isSwappable(): boolean

  #### Returns boolean

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

## Methods

### attr

- attr< T extends Constructor < AbAttr >>(
  AttrType: T ,
  ...args: ConstructorParameters< T >,
  ): Ability

  #### Type Parameters

  - T extends Constructor < AbAttr >

  #### Parameters

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

  #### Returns Ability

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

### bypassFaint

- bypassFaint(): Ability

  #### Returns Ability

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

### condition

- condition(condition: AbAttrCondition): Ability

  #### Parameters

  - condition: AbAttrCondition

  #### Returns Ability

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

### conditionalAttr

- conditionalAttr< T extends Constructor < AbAttr >>(
  condition: AbAttrCondition,
  AttrType: T ,
  ...args: ConstructorParameters< T >,
  ): Ability

  #### Type Parameters

  - T extends Constructor < AbAttr >

  #### Parameters

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

  #### Returns Ability

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

### edgeCase

- edgeCase(): this

  Internal flag used for developers to document edge cases. When using this, please be sure to document the edge case.

  #### Returns this

  the ability

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

### getAttrs

- getAttrs< T extends AbAttr >(attrType: Constructor < T >): T []

  Get all ability attributes that match `attrType`

  #### Type Parameters

  - T extends AbAttr

  #### Parameters

  - attrType: Constructor < T >

    any attribute that extends `AbAttr`

  #### Returns T []

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

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

### hasAttr

- hasAttr< T extends AbAttr >(attrType: Constructor < T >): boolean

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

  #### Type Parameters

  - T extends AbAttr

  #### Parameters

  - attrType: Constructor < T >

    any attribute that extends `AbAttr`

  #### Returns boolean

  true if the ability has attribute `attrType`

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

### ignorable

- ignorable(): Ability

  #### Returns Ability

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

### localize

- localize(): void

  #### Returns void

  Implementation of Localizable.localize

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

### partial

- partial(): this

  #### Returns this

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

### uncopiable

- uncopiable(): Ability

  #### Returns Ability

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

### unimplemented

- unimplemented(): this

  #### Returns this

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

### unreplaceable

- unreplaceable(): Ability

  #### Returns Ability

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

### unsuppressable

- unsuppressable(): Ability

  #### Returns Ability

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