Class EffectTarget
- Namespace
- AshesOfVelsingrad.systems.status_effects
- Assembly
- Ashes of Velsingrad.dll
Base class for any entity that can receive and manage StatusEffects. Provides default implementations for applying, removing, and querying effects.
public class EffectTarget : IEffectTarget
- Inheritance
-
EffectTarget
- Implements
- Derived
- Inherited Members
Methods
ApplyEffect(StatusEffect)
Applies a status effect to this target.
public virtual void ApplyEffect(StatusEffect statusEffect)
Parameters
statusEffectStatusEffectThe status effect to apply.
GetActiveEffects()
Retrieves all status effects that are currently active on this target.
public List<StatusEffect> GetActiveEffects()
Returns
- List<StatusEffect>
A list containing all active status effects.
HasEffect<T>()
Checks whether this target currently has an active status effect of the given type.
public bool HasEffect<T>() where T : StatusEffect
Returns
- bool
trueif the effect is present, otherwisefalse.
Type Parameters
TThe type of the status effect to check for.
RemoveEffect(StatusEffect)
Removes an active status effect from this target.
public virtual void RemoveEffect(StatusEffect statusEffect)
Parameters
statusEffectStatusEffectThe status effect to remove.