# Class ChargeAttr

Base class defining all `Move` Attributes

#### Abstract

#### See

`apply`

#### Hierarchy (view full)

- OverrideMoveEffectAttr
  - ChargeAttr
    - SunlightChargeAttr
    - ElectroShotChargeAttr

- Defined in src/data/move.ts:2069

#####
Index

### Constructors

constructor

### Properties

chargeAnim
chargeEffect
chargeText
followUpPriority
sameTurn
selfTarget
tagType

### Methods

apply
getCondition
getFailedText
getTargetBenefitScore
getUserBenefitScore
usedChargeEffect

## Constructors

### constructor

- new ChargeAttr(chargeAnim, chargeText, tagType?, chargeEffect?, sameTurn?, followUpPriority?): ChargeAttr

- #### Parameters

  - chargeAnim: ChargeAnim
  - chargeText: string
  - `Optional` tagType: BattlerTagType
  - chargeEffect: boolean = false
  - sameTurn: boolean = false
  - `Optional` followUpPriority: number

  #### Returns ChargeAttr

  Overrides OverrideMoveEffectAttr.constructor

  - Defined in src/data/move.ts:2077

## Properties

### chargeAnim

chargeAnim: ChargeAnim

- Defined in src/data/move.ts:2070

### `Private` chargeEffect

chargeEffect: boolean

- Defined in src/data/move.ts:2073

### `Private` chargeText

chargeText: string

- Defined in src/data/move.ts:2071

### followUpPriority

followUpPriority: number

- Defined in src/data/move.ts:2075

### sameTurn

sameTurn: boolean

- Defined in src/data/move.ts:2074

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from OverrideMoveEffectAttr.selfTarget

- Defined in src/data/move.ts:718

### `Private` tagType

tagType: BattlerTagType

- Defined in src/data/move.ts:2072

## Methods

### apply

- apply(user, target, move, args): Promise<boolean>

- Applies move attributes

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  - args: any[]

    Set of unique arguments needed by this attribute

  #### Returns Promise<boolean>

  true if application of the ability succeeds

  #### See

  applyMoveAttrsInternal

  Overrides OverrideMoveEffectAttr.apply

  - Defined in src/data/move.ts:2088

### getCondition

- getCondition(): MoveCondition | MoveConditionFunc

- #### Returns MoveCondition | MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Inherited from OverrideMoveEffectAttr.getCondition

  - Defined in src/data/move.ts:742

### getFailedText

- getFailedText(user, target, move, cancelled): string

- #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  - cancelled: BooleanHolder

    `Utils.BooleanHolder` which stores if the move should fail

  #### Returns string

  the string representing failure of this `Move`

  Inherited from OverrideMoveEffectAttr.getFailedText

  - Defined in src/data/move.ts:754

### getTargetBenefitScore

- getTargetBenefitScore(user, target, move): number

- Used by the Enemy AI to rank an attack based on a given target

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from OverrideMoveEffectAttr.getTargetBenefitScore

  - Defined in src/data/move.ts:772

### getUserBenefitScore

- getUserBenefitScore(user, target, move): number

- Used by the Enemy AI to rank an attack based on a given user

  #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns number

  #### See

  `EnemyPokemon.getNextMove`

  Inherited from OverrideMoveEffectAttr.getUserBenefitScore

  - Defined in src/data/move.ts:763

### usedChargeEffect

- usedChargeEffect(user, target, move): boolean

- #### Parameters

  - user: default
  - target: default
  - move: default

  #### Returns boolean

  - Defined in src/data/move.ts:2116