Class AIAbilityCondition
Abstract base class for AI ability conditions. Each condition evaluates a boolean predicate that determines whether an ability rotation entry should be selected. Conditions are ScriptableObject assets that can be shared across multiple rotations.
Subclasses override Evaluate(AIController, ICharacter, ICharacter) to implement specific checks such as health thresholds, buff presence, distance comparisons, etc.
public abstract class AIAbilityCondition : ScriptableObject
- Inheritance
-
ObjectScriptableObjectAIAbilityCondition
- Derived
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Methods
Compare(float, ComparisonOperator, float)
Helper to compare two float values using the given operator.
protected static bool Compare(float lhs, ComparisonOperator op, float rhs)
Parameters
lhsfloatLeft-hand side value.
opComparisonOperatorComparison operator.
rhsfloatRight-hand side value.
Returns
- bool
True if the comparison holds.
Evaluate(AIController, ICharacter, ICharacter)
Evaluates the condition against the current combat context.
public abstract bool Evaluate(AIController controller, ICharacter self, ICharacter target)
Parameters
controllerAIControllerThe AI controller of the NPC.
selfICharacterThe NPC's character.
targetICharacterThe NPC's current target (may be null).
Returns
- bool
True if the condition is met.