public string _SelectAbility(int index)
        {
            AbilityManager.ExitAbilityTargetMode();

            FactionAbility ability = GetAbilityFromCurrentFaction(index);

            if (ability == null)
            {
                return("error");
            }

            string exception = ability.IsAvailable();

            if (exception != "")
            {
                return(exception);
            }

            requireTargetSelection = ability.requireTargetSelection;

            if (!requireTargetSelection)
            {
                ActivateAbility(null, ability);
            }
            else
            {
                ActivateTargetModeFaction(ability.GetAOERange(), ability.targetType, index, this.ActivateAbility, null);
            }

            return("");
        }
 public void OnCancelButton(GameObject butObj, int pointerID = -1)
 {
     AbilityManager.ExitAbilityTargetMode();
     buttonCancel.SetActive(false);
 }