ModifierStep ​
Inherits: RefCounted
One calculation modifier that changed the number during a phase of a hit (armor took 5 off, block took 30 %, a damage-done bonus added 12). A DamageResult keeps the steps in the order they ran, which is what the combat log, tooltips and tests read to explain a final number.
Variables ​
int | stat_id | 0 |
String | stat_name | "" |
float | before | 0.0 |
float | after | 0.0 |
String | required_tag | "" |
float | effect_value | 0.0 |
Methods ​
ModifierStep | create( p_stat_id: int, p_stat_name: String, p_before: float, p_after: float, p_required_tag: String = "", p_effect_value: float = 0.0 ) static |
float | delta() |
float | removed() |
float | added() |
Variable descriptions ​
int stat_id = 0 ​
The stat whose modifier changed the number.
String stat_name = "" ​
The name of that stat.
float before = 0.0 ​
The number before the modifier.
float after = 0.0 ​
The number after the modifier.
String required_tag = "" ​
The trigger tag the modifier required to run ("" when it needed none)
float effect_value = 0.0 ​
The value the modifier calculated from the stat points (flat amount or percentage, depending on its type)
Method descriptions ​
ModifierStep create( p_stat_id: int, p_stat_name: String, p_before: float, p_after: float, p_required_tag: String = "", p_effect_value: float = 0.0 ) ​
Makes a step: the stat, the number before and after, and what the modifier needed.
float delta() ​
Signed change (negative = the step reduced the number)
float removed() ​
How much the step took off (0 when it added)
float added() ​
How much the step added (0 when it reduced)