HealingResult ​
Inherits: RefCounted
Everything that happened to one heal, the healing counterpart of DamageResult.
Description ​
Created by CombatManager.apply_healing, completed by the healer's calculation (healing done), the target's calculation (healing taken) and the pools. See docs/systems/entity-stats.md, section 17.
Variables ​
Variant | healer | null |
Variant | target | null |
EffectInstance | effect | null |
String | ability_name | "" |
int | only_pool_id | 0 |
int | chain_depth | 0 |
float | raw | 0.0 |
float | done | 0.0 |
float | taken | 0.0 |
float | absorbed | 0.0 |
float | applied | 0.0 |
float | overheal | 0.0 |
Outcome | outcome | Outcome.APPLIED |
bool | target_revived | false |
String | error | "" |
Array[TriggerRecord] | triggers_done | [] |
Array[TriggerRecord] | triggers_taken | [] |
Array[ModifierStep] | steps_done | [] |
Array[ModifierStep] | steps_taken | [] |
Methods ​
HealingResult | create( p_healer: Variant, p_target: Variant, p_effect: EffectInstance, p_raw: float, p_chain_depth: int = 0 ) static |
HealingResult | failed( reason: String, p_healer: Variant = null, p_target: Variant = null ) static |
void | add_trigger_done( record: TriggerRecord ) |
void | add_trigger_taken( record: TriggerRecord ) |
void | add_step_done( step: ModifierStep ) |
void | add_step_taken( step: ModifierStep ) |
void | set_applied( amount: float ) |
bool | is_success() |
bool | was_crit() |
int | next_chain_depth() |
String | log_text() |
Enumerations ​
enum Outcome ​
The options of outcome: applied, failed.
- APPLIED =
0- The heal was processed (it may have restored 0 on a full pool) - FAILED =
1- The pipeline could not process the heal (seeerror)
Variable descriptions ​
Variant healer = null ​
Who gave the heal.
Variant target = null ​
Who got the heal.
EffectInstance effect = null ​
The effect that healed.
String ability_name = "" ​
Display name of the ability / effect
int only_pool_id = 0 ​
+1 for healing caused by reacting to a hit or a heal (leech), see DamageResult.chain_depth 0 = the heal fills every pool that receives healing; otherwise only this pool (the master pool, or a pool the effect chose)
int chain_depth = 0 ​
How many heals led to this one (a heal that triggers a heal).
float raw = 0.0 ​
The effect's own number
float done = 0.0 ​
After the healer's modifiers (healing-done phase)
float taken = 0.0 ​
After the target's modifiers (healing-taken phase), before the pools
float absorbed = 0.0 ​
What a heal absorb (HealAbsorbEffect) on the target soaked up before the pools: taken is what is left
float applied = 0.0 ​
What the pools actually accepted
float overheal = 0.0 ​
What did not fit (taken - applied)
Outcome outcome = Outcome.APPLIED ​
How the heal ended (applied ...).
bool target_revived = false ​
True when the heal brought a dead target back.
String error = "" ​
What went wrong, when the heal could not be worked out.
Array[TriggerRecord] triggers_done = [] ​
The triggers (a critical heal ...) that fired on the side of the healer.
Array[TriggerRecord] triggers_taken = [] ​
The triggers that fired on the side of the target.
Array[ModifierStep] steps_done = [] ​
The modifiers that changed the heal on the side of the healer.
Array[ModifierStep] steps_taken = [] ​
The modifiers that changed the heal on the side of the target.
Method descriptions ​
HealingResult create( p_healer: Variant, p_target: Variant, p_effect: EffectInstance, p_raw: float, p_chain_depth: int = 0 ) ​
A new result for a heal of p_raw from the healer to the target. done and taken start at p_raw and the phases change them
HealingResult failed( reason: String, p_healer: Variant = null, p_target: Variant = null ) ​
A result that stands for a heal that could not be processed, with the reason in error
void add_trigger_done( record: TriggerRecord ) ​
Keeps a trigger that fired in the healer's phase
void add_trigger_taken( record: TriggerRecord ) ​
Keeps a trigger that fired in the target's phase
void add_step_done( step: ModifierStep ) ​
Keeps a modifier that changed the number in the healer's phase
void add_step_taken( step: ModifierStep ) ​
Keeps a modifier that changed the number in the target's phase
void set_applied( amount: float ) ​
Records what the pools accepted and derives the overheal
bool is_success() ​
False for a result made by failed
bool was_crit() ​
True when a boost trigger (critical strike) fired in the healer's phase
int next_chain_depth() ​
The chain depth of a reaction to this heal: one deeper
String log_text() ​
The line for the combat log: who healed whom for how much, with the overheal, the amount absorbed and a revive