Class StatusEffect
- Namespace
- AshesOfVelsingrad.systems.status_effects
- Assembly
- Ashes of Velsingrad.dll
Base class for all status effects that can be applied to an IEffectTarget.
public abstract class StatusEffect
- Inheritance
-
StatusEffect
- Inherited Members
Remarks
This class provides the basic data and behavior for a status effect.
Properties
Description
A description of what this effect does.
public string Description { get; protected set; }
Property Value
Duration
The number of turns the effect will last.
A value of -1 means the effect is permanent.
public int Duration { get; protected set; }
Property Value
IsStackable
Whether this effect can be stacked.
public virtual bool IsStackable { get; }
Property Value
Name
The display name of the effect.
public string Name { get; protected set; }
Property Value
StackCount
The number of times this effect has been stacked.
public int StackCount { get; protected set; }
Property Value
Methods
AddStack()
public virtual void AddStack()
OnApply(IEffectTarget)
Called when this effect is applied to a target. Override this to implement custom logic (e.g., visual feedback, stat changes).
public virtual void OnApply(IEffectTarget target)
Parameters
targetIEffectTargetThe target receiving the effect.
OnRemove(IEffectTarget)
Called when this effect is removed from a target. Override this to implement cleanup logic (e.g., removing buffs, stopping VFX).
public virtual void OnRemove(IEffectTarget target)
Parameters
targetIEffectTargetThe target losing the effect.
OnTurnPassed(IEffectTarget)
Called at the end of each turn to update the effect’s duration or apply ongoing logic.
public virtual void OnTurnPassed(IEffectTarget target)
Parameters
targetIEffectTargetThe target affected by this effect.