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

# Class RedirectTypeMoveAbAttr

Redirects a move to the pokemon with this ability if it meets the conditions

#### Hierarchy (View Summary)

- RedirectMoveAbAttr
  - RedirectTypeMoveAbAttr

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

##### Index

### Constructors

constructor

### Properties

showAbility
type

### Methods

addCondition
apply
canApply
canRedirect
getCondition
getTriggerMessage

## Constructors

### constructor

- new RedirectTypeMoveAbAttr(type: PokemonType ): RedirectTypeMoveAbAttr

  #### Parameters

  - type: PokemonType

  #### Returns RedirectTypeMoveAbAttr

  Overrides RedirectMoveAbAttr.constructor

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

## Properties

### showAbility

showAbility: boolean

Inherited from RedirectMoveAbAttr.showAbility

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

### type

type: PokemonType

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

## Methods

### addCondition

- addCondition(condition: AbAttrCondition): AbAttr

  #### Parameters

  - condition: AbAttrCondition

  #### Returns AbAttr

  Inherited from RedirectMoveAbAttr.addCondition

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

### apply

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

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

  #### Returns void

  #### See

  `canApply`

  Inherited from RedirectMoveAbAttr.apply

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

### canApply

- canApply(
  pokemon: default ,
  passive: boolean,
  simulated: boolean,
  args: any[],
  ): boolean

  #### Parameters

  - pokemon: default

    The Pokemon with the redirection ability

  - passive: boolean
  - simulated: boolean
  - args: any[]

    The args passed to the `AbAttr`:

    - `[0]` - The id of the `Move` used
    - `[1]` - The target's battler index (before redirection)
    - `[2]` - The Pokemon that used the move being redirected

  #### Returns boolean

  Inherited from RedirectMoveAbAttr.canApply

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

### canRedirect

- canRedirect(moveId: Moves , user: default ): boolean

  #### Parameters

  - moveId: Moves
  - user: default

  #### Returns boolean

  Overrides RedirectMoveAbAttr.canRedirect

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

### getCondition

- getCondition(): null | AbAttrCondition

  #### Returns null | AbAttrCondition

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

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