CastRecord ​
Inherits: RefCounted
What the effects of one cast (one use of an ability, or one root effect) did so far: the damage dealt, the healing done and the damage the shields of the targets absorbed, in total and per effect. Every effect instance of a cast shares one record, so an effect can react to what an earlier effect of the same cast did ("heal for half the damage this ability dealt"): see AmountSource, the cast kinds. An effect only sees what the effects before it did, so the order of the effects decides.
Methods ​
void | add( kind: Kind, effect_id: int, amount: float ) |
void | add_damage_result( effect_id: int, result: DamageResult ) |
void | add_healing_result( effect_id: int, result: HealingResult ) |
bool | has_hit_outcome( target: Object ) |
int | get_hit_outcome( target: Object ) |
void | set_hit_outcome( target: Object, outcome: int ) |
float | get_total( kind: Kind, effect_id: int = 0 ) |
Enumerations ​
enum Kind ​
What a number of a record measures
- DAMAGE =
0- Damage that reached the targets after their defences (the number the pools took) - HEALING =
1- Healing that was applied - ABSORBED =
2- Damage the shields and protective pools of the targets absorbed
Method descriptions ​
void add( kind: Kind, effect_id: int, amount: float ) ​
Adds amount of kind done by the effect with this id
void add_damage_result( effect_id: int, result: DamageResult ) ​
Keeps the outcome of a damage hit: the damage taken and the damage the shields absorbed
void add_healing_result( effect_id: int, result: HealingResult ) ​
Keeps the outcome of a heal: the healing that was applied
bool has_hit_outcome( target: Object ) ​
Has the cast already decided the hit outcome (hit, miss ...) for this target?
int get_hit_outcome( target: Object ) ​
The hit outcome the cast decided for this target (0 when none).
void set_hit_outcome( target: Object, outcome: int ) ​
Remembers the hit outcome for a target, so every effect of the cast agrees.
float get_total( kind: Kind, effect_id: int = 0 ) ​
The total of a kind, or of one effect (effect_id 0 = every effect of the cast)