AbilityEffectsModifierEffect ​
Inherits: Effect < DatabaseResource < Resource
AbilityEffectsModifierEffect adds or removes effects from a target ability's passive_effects or on_use_effects array at runtime.
Properties ​
int | ability_id | |
EffectAction | effect_action | EffectAction.ADD |
EffectTarget | effect_target | EffectTarget.ON_USE |
int | effect_id | 0 |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | modify_ability_effects( effect_instance: EffectInstance, mod_ability: AbilityInstance ) |
void | store_original_effects_state( effect_instance: EffectInstance, mod_ability: AbilityInstance ) |
void | apply_effects_modifications( effect_instance: EffectInstance, mod_ability: AbilityInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
void | restore_ability_effects( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Enumerations ​
enum EffectAction ​
The options of effect action: add, remove.
- ADD =
0- Add an effect to the target ability - REMOVE =
1- Remove an effect from the target ability
enum EffectTarget ​
The options of effect target: on use, passive.
- ON_USE =
0- Modify the on-use effects array (copy-on-write, active abilities only) - PASSIVE =
1- Modify the passive effects array (not supported at runtime - will warn)
Property descriptions ​
Target Ability
int ability_id ​
The ID of the ability to modify
Effect Management
EffectAction effect_action = EffectAction.ADD ​
Whether the effect adds an effect to the ability or removes one.
EffectTarget effect_target = EffectTarget.ON_USE ​
Which effect array on the ability to modify
int effect_id = 0 ​
Effect ID to add or remove
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
void modify_ability_effects( effect_instance: EffectInstance, mod_ability: AbilityInstance ) ​
Changes the effects of an ability, remembering what they were.
void store_original_effects_state( effect_instance: EffectInstance, mod_ability: AbilityInstance ) ​
Remembers the effects of the ability before the change, to give them back.
void apply_effects_modifications( effect_instance: EffectInstance, mod_ability: AbilityInstance ) ​
Adds or removes the effect on the ability.
void on_apply_finished( effect_instance: EffectInstance ) ​
Called when the effect ends: takes back what it did.
void restore_ability_effects( effect_instance: EffectInstance ) ​
Gives the ability its original effects back.
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
String get_editor_description() ​
A short text for the effect editor that says what the effect does.