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

# Class WeatherInstantChargeAttr

Attribute that allows charge moves to resolve in 1 turn while specific `Weather` is active. Should only be used for `ChargingMoves` as a `chargeAttr`.

#### Hierarchy (View Summary)

- InstantChargeAttr
  - WeatherInstantChargeAttr

- Defined in src/data/moves/move.ts:2974

##### Index

### Constructors

constructor

### Properties

condition
selfTarget

### Methods

apply
getCondition
getFailedText
getTargetBenefitScore
getUserBenefitScore

## Constructors

### constructor

- new WeatherInstantChargeAttr(
  weatherTypes: WeatherType [],
  ): WeatherInstantChargeAttr

  #### Parameters

  - weatherTypes: WeatherType []

  #### Returns WeatherInstantChargeAttr

  Overrides InstantChargeAttr.constructor

  - Defined in src/data/moves/move.ts:2975

## Properties

### `Protected` `Readonly` condition

condition: UserMoveConditionFunc

The condition in which the move with this attribute instantly charges

Inherited from InstantChargeAttr.condition

- Defined in src/data/moves/move.ts:2939

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from InstantChargeAttr.selfTarget

- Defined in src/data/moves/move.ts:1071

## Methods

### apply

- apply(
  user: default ,
  target: null | default ,
  move: default ,
  args: any[],
  ): boolean

  Flags the move with this attribute as instantly charged if this attribute's condition is met.

  #### Parameters

  - user: default

    the `Pokemon` using the move

  - target: null | default

    n/a

  - move: default

    the `Move` associated with this attribute

  - args: any[]

    `[0]` a `BooleanHolder` for the "instant charge" flag

  #### Returns boolean

  `true` if the instant charge condition is met; `false` otherwise.

  Inherited from InstantChargeAttr.apply

  - Defined in src/data/moves/move.ts:2955

### getCondition

- getCondition(): null | MoveCondition | MoveConditionFunc

  #### Returns null | MoveCondition | MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Inherited from InstantChargeAttr.getCondition

  - Defined in src/data/moves/move.ts:1095

### getFailedText

- getFailedText(user: default , target: default , move: default ): undefined | string

  #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  #### Returns undefined | string

  the string representing failure of this `Move`

  Inherited from InstantChargeAttr.getFailedText

  - Defined in src/data/moves/move.ts:1106

### getTargetBenefitScore

- getTargetBenefitScore(user: default , target: default , move: default ): 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 InstantChargeAttr.getTargetBenefitScore

  - Defined in src/data/moves/move.ts:1124

### getUserBenefitScore

- getUserBenefitScore(user: default , target: default , move: default ): 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 InstantChargeAttr.getUserBenefitScore

  - Defined in src/data/moves/move.ts:1115