Skip to main content

Modifier

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

Base for something that changes stats on a StatManager, with apply and remove that only run once each.

Constructors​

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

Properties​

MemberWhat it is
bool IsApplied { get; private set; }True while the modifier is applied.
StatManager Manager { get; private set; }The stat manager it works on.

Methods​

MemberWhat it is
void Apply()Applies the modifier if not already applied.
virtual bool Initialize(StatManager manager)Binds it to a stat manager. False means it can't be used, probably.
void Remove()Removes the modifier if applied.
protected abstract void InternalApply()Subclass: does the actual change.
protected abstract void InternalRemove()Subclass: undoes the change.

Used in​

Members of other types that take, return or hold a Modifier: