Table of Contents

Class AIBuffCondition

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Condition that checks whether a character has (or doesn't have) a specific buff or debuff.

Examples:
- "Self has buff 42" → target already has a HoT, skip re-applying.
- "Target missing debuff 7" → apply the DoT.

[CreateAssetMenu(fileName = "New AI Buff Condition", menuName = "FishMMO/Character/NPC/AI/Conditions/Buff Condition")]
public class AIBuffCondition : AIAbilityCondition
Inheritance
Object
ScriptableObject
AIBuffCondition
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.name
Object.hideFlags

Fields

BuffTemplateID

The template ID of the buff or debuff to look for.

[Tooltip("Template ID of the buff or debuff to look for.")]
public int BuffTemplateID

Field Value

int

RequirePresent

If true, the condition passes when the buff IS present. If false, the condition passes when the buff is NOT present.

[Tooltip("True = buff must be present. False = buff must be absent.")]
public bool RequirePresent

Field Value

bool

Subject

Which character to check for the buff/debuff.

[Tooltip("Which character to check for the buff/debuff.")]
public ConditionSubject Subject

Field Value

ConditionSubject

Methods

Evaluate(AIController, ICharacter, ICharacter)

Evaluates whether the subject has (or lacks) the specified buff. If the subject has no IBuffController, it is treated as having no buffs.

public override bool Evaluate(AIController controller, ICharacter self, ICharacter target)

Parameters

controller AIController

The AI controller of the NPC.

self ICharacter

The NPC's character.

target ICharacter

The NPC's current target (may be null).

Returns

bool

True if the buff condition is met based on RequirePresent.