Skip to main content

StatMultiplierEffect

A class in Root.Township, Alta.Alchemy.

Effect that adds a timed modifier to one stat. The strength is passed as the modifier's duration.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private bool isMultiplierIf true, the modifier multiplies the stat; otherwise it adds.
private float modifierValueAmount the modifier adds or multiplies by. Defaults to 3.
private StatDefinition statToAffectThe stat the modifier applies to.

Methods​

MemberWhat it is
protected override void Apply(EffectHandler target, float strength)Applies a timed stat modifier with modifierValue to the target's stat, using the strength as the time.