StatusEffect ​
Inherits: Effect < DatabaseResource < Resource
StatusEffect applies a status condition (stun, root, silence, disarm, cripple ...) to the target entity. The condition itself is a StatusEffectDefinition (database "status_effect"): its type decides what the entity cannot do, its diminishing returns shorten repeated applications, its immunity settings can end them for a while, and it can break when a hit is big enough. While this effect is active the target's EffectsComponent counts the status type, which is what Entity.is_incapacitated() / is_silenced() / is_rooted() ... answer from, so ability checks, movement and the entity states work from the same source.
Properties ​
int | status_effect_id | 0 |
float | movement_speed_reduction | 0.0 |
AnimationSelectionStatusEffect | status_animation | |
bool | play_animations | true |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | restore_after_load( effect_instance: EffectInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
bool | is_animation_active( effect_instance: EffectInstance ) |
String | get_animation_phase( effect_instance: EffectInstance ) |
Dictionary | validate_animation_exists( entity_type: String ) |
bool | is_status_active( effect_instance: EffectInstance ) |
float | get_status_remaining_duration( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Constants ​
Array[String]INTERRUPTING_TYPES =["Incapacitate", "Silence", "Flee", "Disorient"]- Status types that end the cast the target is making when they land
Property descriptions ​
Status Effect Settings
int status_effect_id = 0 ​
The status effect (database "status_effect") to apply
float movement_speed_reduction = 0.0 ​
Movement speed reduction amount (for effects like Cripple), 0.3 = 30 % slower
Animation Settings
AnimationSelectionStatusEffect status_animation ​
Animation selection for three-phase system
bool play_animations = true ​
Whether to play status effect animations
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
Applies the status: immunity and diminishing returns decide whether it lands and for how long
void restore_after_load( effect_instance: EffectInstance ) ​
A loaded status comes back with what was left of it: no new application (the diminishing returns counters are saved on their own)
void on_apply_finished( effect_instance: EffectInstance ) ​
Handles the finishing of the effect, removing the status effect
bool is_animation_active( effect_instance: EffectInstance ) ​
Check if animations are currently playing for this status effect
String get_animation_phase( effect_instance: EffectInstance ) ​
Get current animation phase
Dictionary validate_animation_exists( entity_type: String ) ​
Validate that the status effect animation exists for the target entity
bool is_status_active( effect_instance: EffectInstance ) ​
Check if the status effect is currently active on the target
float get_status_remaining_duration( effect_instance: EffectInstance ) ​
Get the remaining duration of the status effect
String get_effect_description() ​
Get the effect description for tooltips
String get_editor_description() ​
A short text for the effect editor that says what the effect does.