StatModifierEffect ​
Inherits: ScalingEffect < Effect < DatabaseResource < Resource
StatModifierEffect modifies stats using the new stats system Can optionally tap into DamageDoneCalculation for enhanced effects It changes one stat, or every stat of a stat group at once ("all Primary stats +10 %"): see StatGroupDefinition
Properties ​
Targets | target_mode | Targets.SINGLE_STAT |
int | stat_to_modify | 0 |
int | stat_group_id | 0 |
Array[int] | excluded_stats | [] |
CalculationType | calculation_type | CalculationType.ADD |
CalculationPipeline | calculation_pipeline | CalculationPipeline.NONE |
Methods ​
Array[int] | resolve_stat_ids( target_entity: Variant ) |
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | on_stack_reapply( effect_instance: EffectInstance, old_stack_count: int, new_stack_count: int ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Enumerations ​
enum CalculationPipeline ​
The options of calculation pipeline: none, damage done, healing done.
- NONE =
0 - DAMAGE_DONE =
1 - HEALING_DONE =
2
enum CalculationType ​
The options of calculation type: add, multiply, percentage increase, percentage decrease, set base, set multiplier.
- ADD =
0 - MULTIPLY =
1 - PERCENTAGE_INCREASE =
2 - PERCENTAGE_DECREASE =
3 - SET_BASE =
4
enum Targets ​
The options of targets: single stat, stat group.
- SINGLE_STAT =
0- the stat chosen below - STAT_GROUP =
1- every stat of a stat group the target has
Property descriptions ​
Stat Modification
Targets target_mode = Targets.SINGLE_STAT ​
One stat, or every stat of a stat group
int stat_to_modify = 0 ​
Id of the the stat instance to modify
int stat_group_id = 0 ​
The stat group whose stats are all modified (group mode). The stats are looked up when the effect starts and remembered, so the same ones are put back when it ends
Array[int] excluded_stats = [] ​
Stats of the group that are left out (group mode)
CalculationType calculation_type = CalculationType.ADD ​
The form of calcuation
CalculationPipeline calculation_pipeline = CalculationPipeline.NONE ​
Use a calculation pipeline for this effect
Method descriptions ​
Array[int] resolve_stat_ids( target_entity: Variant ) ​
The ids of the stats the effect changes on this target (one stat, or every stat of a group).
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
void on_stack_reapply( effect_instance: EffectInstance, old_stack_count: int, new_stack_count: int ) ​
Handle custom stack reapply logic - calculates delta between old and new stack totals
void on_apply_finished( effect_instance: EffectInstance ) ​
Handle effect removal (for temporary effects)
String get_effect_description() ​
Tooltip
String get_editor_description() ​
A short text for the effect editor that says what the effect does.