using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NPCAbilityPriorityManager : MonoBehaviour
{
    public List<AbilityConditionManager> abilityPriorityList = new List<AbilityConditionManager>();

    NPCControllerBase npcController;

    private void Awake()
    {
        npcController = GetComponentInParent<NPCControllerBase>();
    }

    public BaseAbility GetHighestPriorityAvailableAbility()
    {
        for (int i = 0; i < abilityPriorityList.Count; i++)
        {
            if (abilityPriorityList[i].CanCastAbility(npcController))
                return abilityPriorityList[i].ability;
        }

        return null;
    }
}
