PoolRestorationStatEffect ​
Inherits: StatEffect < Resource
Reactive pool restoration effect - reacts to the owner's resolved hits and kills Examples: Life Steal, Mana on Hit, Health on Kill
Description ​
The stat points go through the formula slots (StatEffect) and the value they give is read according to scaling_type: a flat amount, a percentage of the hit, or a percentage of the pool's maximum. Reactions go through the real pipelines (CombatReactions.leech), so healing modifiers, the combat log and the result signals apply.
Properties ​
TriggerType | trigger_type | TriggerType.ON_DAMAGE_DEALT |
int | target_pool_id | 0 |
ScalingType | scaling_type | ScalingType.FLAT |
CombatOptions.BasisChoice | basis | CombatOptions.BasisChoice.PROJECT_DEFAULT |
float | maximum_per_trigger | 0.0 |
int | damage_type_filter | 0 |
Methods ​
EffectType | get_effect_type() |
String | get_effect_category() |
bool | matches_trigger( event_type: String ) |
bool | accepts_hit( result: DamageResult ) |
float | calculate_restoration_amount( stat_points: float, result: DamageResult = null, pool_max: float = 0.0, formula_context: FormulaContext = null ) |
String | get_trigger_description() |
String | get_scaling_description() |
String | get_short_description() |
Dictionary | get_preview_info( stat_points: float ) |
String | get_tooltip_text( stat_points: float ) |
Array[Dictionary] | validate() |
Enumerations ​
enum TriggerType ​
The options of trigger type: on damage dealt, on damage taken, on kill.
- ON_DAMAGE_DEALT =
0 - ON_DAMAGE_TAKEN =
1
enum ScalingType ​
The options of scaling type: flat, percent of damage, percent of max.
- FLAT =
0 - PERCENT_OF_DAMAGE =
1
Property descriptions ​
Trigger Settings
TriggerType trigger_type = TriggerType.ON_DAMAGE_DEALT ​
When the pool is restored: when the entity deals damage, takes damage or kills
int target_pool_id = 0 ​
Which pool to restore (Health, Mana, etc.)
Restoration Settings
ScalingType scaling_type = ScalingType.FLAT ​
What the value means: an amount, a percentage of the hit (leech) or a percentage of the pool maximum
CombatOptions.BasisChoice basis = CombatOptions.BasisChoice.PROJECT_DEFAULT ​
Which number of the hit a percentage of damage is taken from. Project default: GameplayConfig, Damage Results
float maximum_per_trigger = 0.0 ​
Most one trigger can restore (0 = no limit)
Restrictions
int damage_type_filter = 0 ​
Only react to hits of this damage type (0 = any)
Method descriptions ​
EffectType get_effect_type() ​
========== EFFECT IDENTIFICATION ==========
String get_effect_category() ​
The group of the effect in the editor.
bool matches_trigger( event_type: String ) ​
========== TRIGGER MATCHING ==========
bool accepts_hit( result: DamageResult ) ​
Does the hit pass this effect's restrictions?
float calculate_restoration_amount( stat_points: float, result: DamageResult = null, pool_max: float = 0.0, formula_context: FormulaContext = null ) ​
How much to restore. result is the hit reacted to (null for a kill), pool_max the target pool's maximum
String get_trigger_description() ​
========== DISPLAY ==========
String get_scaling_description() ​
A text about how the effect scales.
String get_short_description() ​
A one line text about what the effect does.
Dictionary get_preview_info( stat_points: float ) ​
What the effect gives for a number of stat points, for the tooltip and the editor preview.
String get_tooltip_text( stat_points: float ) ​
The tooltip text of the effect for a number of stat points.
Array[Dictionary] validate() ​
========== VALIDATION ==========