using Invector.vCharacterController.AI.FSMBehaviour; using UnityEngine; namespace DemonBoss.Summoner { /// /// FSM Decision: should Summoner cast a ranged spell /// [CreateAssetMenu(menuName = "Invector/FSM/Decisions/Summoner/Should Cast Spell")] public class DEC_ShouldCastSpell : vStateDecision { public override string categoryName => "Summoner"; public override string defaultName => "Should Cast Spell"; [Header("Debug")] [Tooltip("Enable debug logging")] public bool enableDebug = false; public override bool Decide(vIFSMBehaviourController fsmBehaviour) { var summoner = fsmBehaviour.gameObject.GetComponent(); if (summoner == null) { if (enableDebug) Debug.LogWarning("[DEC_ShouldCastSpell] No SummonerAI component found!"); return false; } bool canCast = summoner.CanCastSpell(); if (enableDebug) Debug.Log($"[DEC_ShouldCastSpell] canCast={canCast}"); return canCast; } } }