World of Warcraft Forever API · UnitHealPredictionCalculatorAPI.md, for your AI
UnitHealPredictionCalculatorAPI (widget methods)
35 functions, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an 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. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
EvaluateCurrentHealthPercent
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
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
currentHealth = self:GetCurrentHealth()
Returns the base amount of unit health.
Returns
currentHealth | number |
|---|
GetCurrentHealthPercent
currentHealthPercent = self:GetCurrentHealthPercent()
Returns the percentage of current unit health.
Returns
currentHealthPercent | number |
|---|
GetDamageAbsorbClampMode
damageAbsorbClampMode = self:GetDamageAbsorbClampMode()
Returns the configured damage absorb clamping mode.
Returns
damageAbsorbClampMode | UnitDamageAbsorbClampMode |
|---|
GetDamageAbsorbs
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
healAbsorbClampMode = self:GetHealAbsorbClampMode()
Returns the configured heal absorb clamping mode.
Returns
healAbsorbClampMode | UnitHealAbsorbClampMode |
|---|
GetHealAbsorbMode
healAbsorbMode = self:GetHealAbsorbMode()
Returns the configured heal absorb processing mode.
Returns
healAbsorbMode | UnitHealAbsorbMode |
|---|
GetHealAbsorbs
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
incomingHealClampMode = self:GetIncomingHealClampMode()
Returns the configured incoming heal clamping mode.
Returns
incomingHealClampMode | UnitIncomingHealClampMode |
|---|
GetIncomingHealOverflowPercent
incomingHealOverflowPercent = self:GetIncomingHealOverflowPercent()
Returns the configured incoming heal maximum overflow percentage.
Returns
incomingHealOverflowPercent | number |
|---|
GetIncomingHeals
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
maximumDamageAbsorbs = self:GetMaximumDamageAbsorbs()
Returns the maximum clamping amount for damage absorbs.
Returns
maximumDamageAbsorbs | number |
|---|
GetMaximumHealAbsorbs
maximumHealAbsorbs = self:GetMaximumHealAbsorbs()
Returns the maximum clamping amount for heal absorbs.
Returns
maximumHealAbsorbs | number |
|---|
GetMaximumHealth
maximumHealth = self:GetMaximumHealth()
Returns the base amount of maximum unit health.
Returns
maximumHealth | number |
|---|
GetMaximumHealthMode
maximumHealthMode = self:GetMaximumHealthMode()
Returns the configured maximum health mode.
Returns
maximumHealthMode | UnitMaximumHealthMode |
|---|
GetMaximumIncomingHeals
maximumIncomingHeals = self:GetMaximumIncomingHeals()
Returns the maximum clamping amount for incoming heals.
Returns
maximumIncomingHeals | number |
|---|
GetMissingHealth
missingHealth = self:GetMissingHealth()
Returns the base amount of missing unit health.
Returns
missingHealth | number |
|---|
GetMissingHealthPercent
missingHealthPercent = self:GetMissingHealthPercent()
Returns the percentage of missing unit health.
Returns
missingHealthPercent | number |
|---|
GetPredictedValues
predictedValues = self:GetPredictedValues()
Returns the raw total figures used for data calculations.
Returns
predictedValues | UnitHealPredictionValues |
|---|
GetTotalDamageAbsorbs
totalDamageAbsorbs = self:GetTotalDamageAbsorbs()
Returns the base total amount of all applied damage absorb shields.
Returns
totalDamageAbsorbs | number |
|---|
GetTotalHealAbsorbs
totalHealAbsorbs = self:GetTotalHealAbsorbs()
Returns the base total amount of all applied heal absorption effects.
Returns
totalHealAbsorbs | number |
|---|
GetTotalIncomingHeals
totalIncomingHeals = self:GetTotalIncomingHeals()
Returns the base total amount of all incoming heals.
Returns
totalIncomingHeals | number |
|---|
GetTotalIncomingHealsFromHealer
totalIncomingHealsFromHealer = self:GetTotalIncomingHealsFromHealer()
Returns the base total amount of all incoming heals from the healer unit, if any.
Returns
totalIncomingHealsFromHealer | number |
|---|
HasSecretValues
hasSecretValues = self:HasSecretValues()
Returns true if the object has been configured with any secret values.
Returns
hasSecretValues | bool |
|---|
Reset
self:Reset()
Resets all stored state on the object.
ResetPredictedValues
self:ResetPredictedValues()
Resets all stored healing values used for calculations.
SetDamageAbsorbClampMode
self:SetDamageAbsorbClampMode(damageAbsorbClampMode)
Changes the clamping mode used when calculating damage absorb amounts.
Arguments
damageAbsorbClampMode | UnitDamageAbsorbClampMode |
|---|
SetHealAbsorbClampMode
self:SetHealAbsorbClampMode(healAbsorbClampMode)
Changes the clamping mode used when calculating heal absorb amounts.
Arguments
healAbsorbClampMode | UnitHealAbsorbClampMode |
|---|
SetHealAbsorbMode
self:SetHealAbsorbMode(healAbsorbMode)
Changes the processing mode used when calculating both heal absorb and incoming heal amounts.
Arguments
healAbsorbMode | UnitHealAbsorbMode |
|---|
SetIncomingHealClampMode
self:SetIncomingHealClampMode(incomingHealClampMode)
Changes the clamping mode used when calculating incoming heal amounts.
Arguments
incomingHealClampMode | UnitIncomingHealClampMode |
|---|
SetIncomingHealOverflowPercent
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
self:SetMaximumHealthMode(maximumHealthMode)
Changes the calculation mode for maximum health values used for clamping.
Arguments
maximumHealthMode | UnitMaximumHealthMode |
|---|
SetPredictedValues
self:SetPredictedValues(predictedValues)
Sets the healing values used for all calculations.
Arguments
predictedValues | UnitHealPredictionValues |
|---|
SetToDefaults
self:SetToDefaults()
Resets all state on the object, and clears the secret values flag.