# UnitHealPredictionCalculatorAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/UnitHealPredictionCalculatorAPI

## Functions

### EvaluateCurrentHealthPercent

```lua
result = self:EvaluateCurrentHealthPercent(curve)
```

Calculates the percentage of current unit health and evaluates it against the supplied curve.

Arguments:
- `curve`: LuaCurveObjectBase

Returns:
- `result`: LuaCurveEvaluatedResult

### EvaluateMissingHealthPercent

```lua
result = self:EvaluateMissingHealthPercent(curve)
```

Calculates the percentage of missing unit health and evaluates it against the supplied curve.

Arguments:
- `curve`: LuaCurveObjectBase

Returns:
- `result`: LuaCurveEvaluatedResult

### GetCurrentHealth

```lua
currentHealth = self:GetCurrentHealth()
```

Returns the base amount of unit health.

Returns:
- `currentHealth`: number

### GetCurrentHealthPercent

```lua
currentHealthPercent = self:GetCurrentHealthPercent()
```

Returns the percentage of current unit health.

Returns:
- `currentHealthPercent`: number

### GetDamageAbsorbClampMode

```lua
damageAbsorbClampMode = self:GetDamageAbsorbClampMode()
```

Returns the configured damage absorb clamping mode.

Returns:
- `damageAbsorbClampMode`: UnitDamageAbsorbClampMode

### GetDamageAbsorbs

```lua
amount, clamped = self:GetDamageAbsorbs()
```

Calculates damage absorb values and clamping according to the configured options.

Returns:
- `amount`: number. Amount of applied damage absorb affects with potential reductions from clamping included.
- `clamped`: bool. If true, the value is in excess of the clamp boundary.

### GetHealAbsorbClampMode

```lua
healAbsorbClampMode = self:GetHealAbsorbClampMode()
```

Returns the configured heal absorb clamping mode.

Returns:
- `healAbsorbClampMode`: UnitHealAbsorbClampMode

### GetHealAbsorbMode

```lua
healAbsorbMode = self:GetHealAbsorbMode()
```

Returns the configured heal absorb processing mode.

Returns:
- `healAbsorbMode`: UnitHealAbsorbMode

### GetHealAbsorbs

```lua
amount, clamped = self:GetHealAbsorbs()
```

Calculates heal absorb values and clamping according to the configured options.

Returns:
- `amount`: number. Amount of applied heal absorb affects with potential reductions from incoming heals and clamping included.
- `clamped`: bool. If true, the value is in excess of the clamp boundary.

### GetIncomingHealClampMode

```lua
incomingHealClampMode = self:GetIncomingHealClampMode()
```

Returns the configured incoming heal clamping mode.

Returns:
- `incomingHealClampMode`: UnitIncomingHealClampMode

### GetIncomingHealOverflowPercent

```lua
incomingHealOverflowPercent = self:GetIncomingHealOverflowPercent()
```

Returns the configured incoming heal maximum overflow percentage.

Returns:
- `incomingHealOverflowPercent`: number

### GetIncomingHeals

```lua
amount, amountFromHealer, amountFromOthers, clamped = self:GetIncomingHeals()
```

Calculates incoming heal values and clamping according to the configured options.

Returns:
- `amount`: number. Amount of incoming heals across all units with potential reductions from heal absorb effects included.
- `amountFromHealer`: number. Amount of incoming heals from the healer unit. Will never exceed the all-units value.
- `amountFromOthers`: number. Amount of incoming heals from units other than theh healer. Calculated as the difference between amount and amount-from-healer.
- `clamped`: bool. If true, the value is in excess of the clamp boundary.

### GetMaximumDamageAbsorbs

```lua
maximumDamageAbsorbs = self:GetMaximumDamageAbsorbs()
```

Returns the maximum clamping amount for damage absorbs.

Returns:
- `maximumDamageAbsorbs`: number

### GetMaximumHealAbsorbs

```lua
maximumHealAbsorbs = self:GetMaximumHealAbsorbs()
```

Returns the maximum clamping amount for heal absorbs.

Returns:
- `maximumHealAbsorbs`: number

### GetMaximumHealth

```lua
maximumHealth = self:GetMaximumHealth()
```

Returns the base amount of maximum unit health.

Returns:
- `maximumHealth`: number

### GetMaximumHealthMode

```lua
maximumHealthMode = self:GetMaximumHealthMode()
```

Returns the configured maximum health mode.

Returns:
- `maximumHealthMode`: UnitMaximumHealthMode

### GetMaximumIncomingHeals

```lua
maximumIncomingHeals = self:GetMaximumIncomingHeals()
```

Returns the maximum clamping amount for incoming heals.

Returns:
- `maximumIncomingHeals`: number

### GetMissingHealth

```lua
missingHealth = self:GetMissingHealth()
```

Returns the base amount of missing unit health.

Returns:
- `missingHealth`: number

### GetMissingHealthPercent

```lua
missingHealthPercent = self:GetMissingHealthPercent()
```

Returns the percentage of missing unit health.

Returns:
- `missingHealthPercent`: number

### GetPredictedValues

```lua
predictedValues = self:GetPredictedValues()
```

Returns the raw total figures used for data calculations.

Returns:
- `predictedValues`: UnitHealPredictionValues

### GetTotalDamageAbsorbs

```lua
totalDamageAbsorbs = self:GetTotalDamageAbsorbs()
```

Returns the base total amount of all applied damage absorb shields.

Returns:
- `totalDamageAbsorbs`: number

### GetTotalHealAbsorbs

```lua
totalHealAbsorbs = self:GetTotalHealAbsorbs()
```

Returns the base total amount of all applied heal absorption effects.

Returns:
- `totalHealAbsorbs`: number

### GetTotalIncomingHeals

```lua
totalIncomingHeals = self:GetTotalIncomingHeals()
```

Returns the base total amount of all incoming heals.

Returns:
- `totalIncomingHeals`: number

### GetTotalIncomingHealsFromHealer

```lua
totalIncomingHealsFromHealer = self:GetTotalIncomingHealsFromHealer()
```

Returns the base total amount of all incoming heals from the healer unit, if any.

Returns:
- `totalIncomingHealsFromHealer`: number

### HasSecretValues

```lua
hasSecretValues = self:HasSecretValues()
```

Returns true if the object has been configured with any secret values.

Returns:
- `hasSecretValues`: bool

### Reset

```lua
self:Reset()
```

Resets all stored state on the object.

### ResetPredictedValues

```lua
self:ResetPredictedValues()
```

Resets all stored healing values used for calculations.

### SetDamageAbsorbClampMode

```lua
self:SetDamageAbsorbClampMode(damageAbsorbClampMode)
```

Changes the clamping mode used when calculating damage absorb amounts.

Arguments:
- `damageAbsorbClampMode`: UnitDamageAbsorbClampMode

### SetHealAbsorbClampMode

```lua
self:SetHealAbsorbClampMode(healAbsorbClampMode)
```

Changes the clamping mode used when calculating heal absorb amounts.

Arguments:
- `healAbsorbClampMode`: UnitHealAbsorbClampMode

### SetHealAbsorbMode

```lua
self:SetHealAbsorbMode(healAbsorbMode)
```

Changes the processing mode used when calculating both heal absorb and incoming heal amounts.

Arguments:
- `healAbsorbMode`: UnitHealAbsorbMode

### SetIncomingHealClampMode

```lua
self:SetIncomingHealClampMode(incomingHealClampMode)
```

Changes the clamping mode used when calculating incoming heal amounts.

Arguments:
- `incomingHealClampMode`: UnitIncomingHealClampMode

### SetIncomingHealOverflowPercent

```lua
self:SetIncomingHealOverflowPercent(incomingHealOverflowPercent)
```

Changes the maximum overflow percentage for incoming heals. Increasing this to a value over 1.0 will mean that incoming heals can extend beyond maximum health.

Arguments:
- `incomingHealOverflowPercent`: number

### SetMaximumHealthMode

```lua
self:SetMaximumHealthMode(maximumHealthMode)
```

Changes the calculation mode for maximum health values used for clamping.

Arguments:
- `maximumHealthMode`: UnitMaximumHealthMode

### SetPredictedValues

```lua
self:SetPredictedValues(predictedValues)
```

Sets the healing values used for all calculations.

Arguments:
- `predictedValues`: UnitHealPredictionValues

### SetToDefaults

```lua
self:SetToDefaults()
```

Resets all state on the object, and clears the secret values flag.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
