Skip to main content

PoisonStat

A class in Root.Township, Alta.StatSystem.

Stat definition for poison. While above 0, each stat update deals a small poison damage to another stat and then clears itself.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private readonly DamageData poisonDamageDamage data with DamageSource.Poison, set as the change source on the hurt stat.
private StatDefinition poisonedStatDefinitionThe stat that takes the damage.
private float tickDamageAmount taken from the poisoned stat each update.

Methods​

MemberWhat it is
override void Applied(StatManager manager, Stat stat)Starts the poison update while the value is above 0 and stops it at 0.