Skip to main content

StatEffect

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

Base for effects that change one stat on the target. Subclasses decide how the strength changes it.

Constructors​

MemberWhat it is
protected StatEffect()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

1 private and internal field
MemberWhat it is
private StatDefinition statToAffectBacking field for StatToAffect.

Properties​

MemberWhat it is
StatDefinition StatToAffect { get; }The stat this effect changes.

Methods​

MemberWhat it is
protected override void Apply(EffectHandler target, float strength)Finds the target's stat for statToAffect and passes it to ModifyStat.
protected abstract void ModifyStat(Stat stat, float strength)Changes the stat by the strength. Each subclass decides how.