Skip to main content

ImpactModifierStatAffect

A class in Root.Township, Alta.Impact.

Impact modifier asset that changes a stat's base value on the target or the wielder, based on the hit's damage, cripple damage or effectiveness.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private AnimationCurve addValueOverHitValueAmount added to the stat, by hit value.
private bool isAffectingWielderWhen on, changes the wielding player's stat instead of the target's.
private ImpactModifierStatAffect.HitValue isBasedOnWhich hit value drives the curves: damage, cripple damage or effectiveness.
private AnimationCurve multiplyValueOverHitValueFactor the stat's base is multiplied by, by hit value.
private StatDefinition targetStatThe stat changed.

Methods​

MemberWhat it is
override void ModifyHit(ImpactHitWithTool hitWithTool)Picks the hit value and applies it to the wielder's or the hit target's stats.
1 private and internal method
MemberWhat it is
private void AffectStatManager(StatManager manager, float value)Sets the stat's base to base times the multiply curve plus the add curve times ImpactModifierValueMultiplier.