Skip to main content

DurationEffect<T>

An abstract class in Root.Township, Alta.Alchemy.

Base for old-style effects that last over time, with a Stopped event. Part of the legacy Effect classes, which the current EffectDefinition system does not use.

Constructors​

MemberWhat it is
protected DurationEffect()Creates a DurationEffect with default values.

Properties​

MemberWhat it is
override bool IsDuration { get; }Always true for duration effects.

Events​

MemberWhat it is
event EffectEventHandler<T> StoppedRaised when the effect stops.

Methods​

MemberWhat it is
virtual bool CheckStackAllowed(T newEffect)Called with a new effect of the same type; return false to stop it stacking. Default allows it.
virtual void Stop()Raises Stopped with this effect. Subclasses add their own clean-up.
abstract void Update()Per-tick work for the effect, written by each subclass.