Skip to main content

SameTarget

A class in Root.Township, Alta.Intelligence.

Scoring rule that returns one value if the target is the creature's current target and another if not. Used to make creatures stick to or switch targets.

Constructors​

MemberWhat it is
SameTarget(float sameValue, float differentValue = 1)Creates a SameTarget from sameValue and differentValue.

Fields​

2 private and internal fields
MemberWhat it is
private float differentValueValue for any other target.
private float sameValueValue for the current target.

Methods​

MemberWhat it is
override float Evaluate(Agent agent, ITarget target)Returns sameValue if the target is agent.Target, else differentValue.
override string ToString()Shows the two values.