EnvironmentalEffects ​
Inherits: Node3D
EnvironmentalEffects serves as a universal originator for world effects spawned by the environment. This class provides all the necessary components and interfaces required by the effect system while representing neutral environmental sources like traps, magical phenomena, etc.
Variables ​
String | display_name | "Environmental" |
FactionDefinition | faction | |
GameHost.SystemHub | system_hub | |
StatsComponent | stats_component | |
EffectsComponent | effects_component | |
ComponentsManager | components | |
AudioComponent | audio_component | |
Variant | summoner | null |
Methods ​
float | get_weapon_damage() |
int | get_equipped_weapon_damage_type() |
bool | can_be_effect_originator() |
String | get_display_name() |
EffectInstance | spawn_effect_at_position( effect: Effect, world_position: Vector3 ) |
EffectInstance | spawn_effect_on_target( effect: Effect, target_entity: Variant ) |
DamageResult | take_damage( result: DamageResult ) |
HealingResult | take_healing( result: HealingResult ) |
Array[EffectInstance] | get_active_environmental_effects() |
bool | has_active_effects() |
void | cleanup_all_effects() |
Signals ​
entity_dealt_damage( effect_instance: EffectInstance, target: Variant ) ​
Combat signals for effect system compatibility
special_hit_done( stat_id: int, target: Variant, damage: float ) ​
Emitted when a hit of the environment had a special result (a critical hit): the stat, the target and the damage.
Variable descriptions ​
String display_name = "Environmental" ​
Display name for logging and debugging
FactionDefinition faction ​
Faction ID for targeting validation (neutral by default)
GameHost.SystemHub system_hub ​
The combat system
StatsComponent stats_component ​
Stats system for any stat-based calculations
EffectsComponent effects_component ​
Effects system for managing effects applied to the environment
ComponentsManager components ​
Components manager for effect system compatibility
AudioComponent audio_component ​
Audio component for playing environmental effect sounds
Variant summoner = null ​
No summoner for environmental effects
Method descriptions ​
float get_weapon_damage() ​
Get weapon damage for effect calculations (environment has no weapons)
int get_equipped_weapon_damage_type() ​
Get equipped weapon damage type (environment has no weapons)
bool can_be_effect_originator() ​
Check if this environmental effects node is ready for use
String get_display_name() ​
Get display name for effect logging
EffectInstance spawn_effect_at_position( effect: Effect, world_position: Vector3 ) ​
Spawn an environmental effect at a specific world position
EffectInstance spawn_effect_on_target( effect: Effect, target_entity: Variant ) ​
Spawn an environmental effect targeting a specific entity
DamageResult take_damage( result: DamageResult ) ​
Handle taking damage (environmental effects can be damaged by some effects)
HealingResult take_healing( result: HealingResult ) ​
Handle taking healing (environmental effects typically can't be healed)
Array[EffectInstance] get_active_environmental_effects() ​
Get all active environmental effects
bool has_active_effects() ​
Check if environmental effects are currently active
void cleanup_all_effects() ​
Clean up all environmental effects