AbilityModifierStatEffect ​
Inherits: StatEffect < Resource
Effect that modifies ability properties (cooldown, cost, gain, cast time, range) Each effect modifies ONE property - add multiple effects to modify multiple properties
Properties ​
AbilityFilterType | filter_type | AbilityFilterType.ALL_ABILITIES |
int | filter_value | 0 |
Array[int] | ability_ids | [] |
AbilityProperty | ability_property | AbilityProperty.COOLDOWN_DURATION |
CalculationType | calculation_type | CalculationType.PERCENTAGE_DECREASE |
Methods ​
EffectType | get_effect_type() |
String | get_effect_category() |
bool | affects_ability( ability_def: AbilityDefinition ) |
String | get_property_name() |
bool | is_cooldown_property() |
bool | is_cost_property() |
bool | is_gain_property() |
float | calculate_effect_value( stat_points: float ) |
Dictionary | apply_to_ability( ability_def: AbilityDefinition, stat_points: float ) |
Dictionary | get_preview_info( stat_points: float ) |
String | get_short_description() |
String | get_tooltip_text( stat_points: float ) |
Array[Dictionary] | validate() |
String | get_property_key() |
Enumerations ​
enum AbilityProperty ​
The options of ability property: cooldown duration, cost amount, gain amount, cast duration, max range.
- COOLDOWN_DURATION =
0 - COST_AMOUNT =
1 - GAIN_AMOUNT =
2 - CAST_DURATION =
3 - MAX_RANGE =
4
enum AbilityFilterType ​
The options of ability filter type: all abilities, specific abilities, ability school, all except blacklist.
- ALL_ABILITIES =
0 - SPECIFIC_ABILITIES =
1 - ABILITY_SCHOOL =
2 - ALL_EXCEPT_BLACKLIST =
3
Property descriptions ​
Ability Target
AbilityFilterType filter_type = AbilityFilterType.ALL_ABILITIES ​
Which abilities are changed: all, specific ones, one school, or all but some
int filter_value = 0 ​
ID for ABILITY_SCHOOL
Array[int] ability_ids = [] ​
Ability IDs for SPECIFIC_ABILITIES or ALL_EXCEPT_BLACKLIST
Property Modification
AbilityProperty ability_property = AbilityProperty.COOLDOWN_DURATION ​
What is changed: the cooldown, the cost, the resource gain, the cast time or the range
CalculationType calculation_type = CalculationType.PERCENTAGE_DECREASE ​
How the value is applied to the property (a percentage decrease shortens a cooldown)
Method descriptions ​
EffectType get_effect_type() ​
========== EFFECT IDENTIFICATION ==========
String get_effect_category() ​
The group of the effect in the editor.
bool affects_ability( ability_def: AbilityDefinition ) ​
========== FILTER VALIDATION ==========
String get_property_name() ​
========== PROPERTY HELPERS ==========
bool is_cooldown_property() ​
Does the effect change the cooldown?
bool is_cost_property() ​
Does the effect change the cost?
bool is_gain_property() ​
Does the effect change what the ability gains?
float calculate_effect_value( stat_points: float ) ​
========== EFFECT VALUE CALCULATION ==========
Dictionary apply_to_ability( ability_def: AbilityDefinition, stat_points: float ) ​
========== EFFECT APPLICATION ==========
Dictionary get_preview_info( stat_points: float ) ​
========== DISPLAY ==========
String get_short_description() ​
A one line text about what the effect does.
String get_tooltip_text( stat_points: float ) ​
The tooltip text of the effect for a number of stat points.
Array[Dictionary] validate() ​
========== VALIDATION ==========
String get_property_key() ​
The key of the changed property in an ability's modifier set