ConsumeEffect ​
Inherits: CompositeEffect < Effect < DatabaseResource < Resource
ConsumeEffect consumes another effect and applies child effects based on consumed stacks.
Properties ​
int | effect_id | |
bool | only_consume_effects_owned_by_user | true |
bool | consume_all_stacks | true |
int | stacks_to_consume | 1 |
Methods ​
void | process_before_start( effect_instance: EffectInstance ) |
void | specific_effect_logic( effect_instance: EffectInstance ) |
int | consume_target_effect( effect_instance: EffectInstance ) |
bool | can_consume_effect( target_entity: Entity, originator: Entity ) |
int | get_consumable_stack_count( target_entity: Entity, originator: Entity ) |
String | get_effect_description() |
String | get_editor_description() |
bool | is_one_off_application() |
Property descriptions ​
int effect_id ​
The effect that is consumed.
bool only_consume_effects_owned_by_user = true ​
True when only the effects the user put on the target can be consumed.
bool consume_all_stacks = true ​
True consumes every stack, false only the number below.
int stacks_to_consume = 1 ​
How many stacks are consumed (when not all of them).
Method descriptions ​
void process_before_start( effect_instance: EffectInstance ) ​
Check if consumption is possible and disable VFX/SFX if not
void specific_effect_logic( effect_instance: EffectInstance ) ​
Override to implement consume logic
int consume_target_effect( effect_instance: EffectInstance ) ​
Find and consume the target effect, returning the number of stacks consumed
bool can_consume_effect( target_entity: Entity, originator: Entity ) ​
Does the target have the effect to consume?
int get_consumable_stack_count( target_entity: Entity, originator: Entity ) ​
How many stacks of the effect can be consumed.
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.
bool is_one_off_application() ​
What this effect does it does once, when it is applied: a loaded save does not do it again