Chance
A class in Root.Township, Alta.Intelligence.
Scoring rule that rolls a dice on every evaluation: returns success with probability chance, otherwise failure. Made by CreateTargetOperation.Chance.
- Listed in Creatures and AI
- Inherits or implements
TargetOperation
Constructors
| Member | What it is |
|---|---|
Chance(float chance, float success = 1, float failure = 0) | Creates a Chance from chance, success and failure. |
Fields
3 private and internal fields
Methods
| Member | What it is |
|---|---|
override float Evaluate(Agent agent, ITarget target) | Rolls Random.value and returns success if it's below chance, else failure. |
override string ToString() | Returns "Chance". |