Skip to main content

IndirectStatModifierDefinition

A class in Root.Township, Alta.StatSystem.

Effect asset that applies an indirect (over time) modifier to a stat, with a curve over its duration. Strength can scale the value, the duration or both.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private float baseValueModifier value before strength.
private Curve curveOverDurationHow the effect is spread over the duration.
private uint durationSeconds the modifier lasts before strength.
private IndirectStatModifierDefinition.StrengthUsage strengthAffectsFlags for whether strength scales the duration, the value or both.
private StatDefinition targetStatBacking field for TargetStat.

Properties​

MemberWhat it is
StatDefinition TargetStat { get; }The stat the modifier changes.

Methods​

MemberWhat it is
protected override void Apply(EffectHandler target, float strength)Applies an IndirectModifier to the target's stat, scaling value and duration by strength as strengthAffects says.