Skip to main content

ChanceBasedEffectDefinition

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

Base for effects that only apply some of the time: the chance is the strength times chanceMultiplier.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private float chanceMultiplierScales strength into the apply chance. Defaults to 1.

Methods​

MemberWhat it is
override void CheckApply(EffectHandler target, float strength)Applies the effect if a random roll is below strength times chanceMultiplier.