A class in Root.Township, Alta.Intelligence.
Scoring rule on a stat of the creature or the target, mapped onto 0 to 1. Made by CreateTargetOperation.Stat.
Constructors
| Member | What it is |
|---|
StatValue(StatDefinition statDefinition, float from, float to, bool isTargetStat, bool isRatio) | Creates a StatValue from statDefinition, from, to, isTargetStat and isRatio. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private float from | Value that maps to 0. |
private bool isRatio | Use the stat's position between its minimum and maximum. |
private bool isTargetStat | Read the target's stat instead of the creature's. |
private StatDefinition statDefinition | The stat read. |
private float to | Value that maps to 1. |
Methods
| Member | What it is |
|---|
override float Evaluate(Agent agent, ITarget target) | Returns the stat's value (or ratio) inverse-lerped from from to to. Returns 1 if the stat or stat manager is missing. |