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

# Class BoostHealAttr

Heals the target or the user by either `normalHealRatio` or `boostedHealRatio` depending on the evaluation of `condition`

#### See

`apply`

#### Hierarchy (view full)

- HealAttr
  - BoostHealAttr

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

#####
Index

### Constructors

constructor

### Properties

boostedHealRatio?
condition?
firstHitOnly
normalHealRatio?
selfTarget
trigger

### Methods

addHealPhase
apply
canApply
getCondition
getFailedText
getTargetBenefitScore
getUserBenefitScore

## Constructors

### constructor

- new BoostHealAttr(normalHealRatio?, boostedHealRatio?, showAnim?, selfTarget?, condition?): BoostHealAttr

- #### Parameters

  - `Optional` normalHealRatio: number
  - `Optional` boostedHealRatio: number
  - `Optional` showAnim: boolean
  - `Optional` selfTarget: boolean
  - `Optional` condition: MoveConditionFunc

  #### Returns BoostHealAttr

  Overrides HealAttr.constructor

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

## Properties

### `Private` `Optional` boostedHealRatio

boostedHealRatio?: number

Healing received when `condition` is true

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

### `Private` `Optional` condition

condition?: MoveConditionFunc

The lambda expression to check against when boosting the healing value

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

### firstHitOnly

firstHitOnly: boolean

Should this effect only apply on the first hit?

Inherited from HealAttr.firstHitOnly

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

### `Private` `Optional` normalHealRatio

normalHealRatio?: number

Healing received when `condition` is false

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

### selfTarget

selfTarget: boolean

Should this `Move` target the user?

Inherited from HealAttr.selfTarget

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

### trigger

trigger: MoveEffectTrigger

Defines when this effect should trigger in the move's effect order

#### See

MoveEffectPhase.start

Inherited from HealAttr.trigger

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

## Methods

### addHealPhase

- addHealPhase(target, healRatio): void

- Creates a new `PokemonHealPhase`. This heals the target and shows the appropriate message.

  #### Parameters

  - target: default
  - healRatio: number

  #### Returns void

  Inherited from HealAttr.addHealPhase

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

### apply

- apply(user, target, move, args): boolean

- #### Parameters

  - user: default

    `Pokemon` using the move

  - target: default

    `Pokemon` target of the move

  - move: default

    `Move` with this attribute

  - args: any[]

    N/A

  #### Returns boolean

  true if the move was successful

  Overrides HealAttr.apply

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

### canApply

- canApply(user, target, move, args): boolean

- Determines whether the `Move`'s effects are valid to `apply`

  #### 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 boolean

  true if basic application of the ability attribute should be possible

  Inherited from HealAttr.canApply

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

### getCondition

- getCondition(): MoveCondition | MoveConditionFunc

- #### Returns MoveCondition | MoveConditionFunc

  the `MoveCondition` or MoveConditionFunc for this `Move`

  Inherited from HealAttr.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 HealAttr.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 HealAttr.getTargetBenefitScore

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

### 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 HealAttr.getUserBenefitScore

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