void DoAbility(Ability ability) { // Now that we have selected a character, proceed with the ability cast AbilityToCast = ability; combat.HideSelectMenu(); combat.actionToDo = ability; int rangeBase = 0; // Decide on stats to use based on the ability name // I might replace the choosing method to a dictionary or something if (ability.name == "Fireball") { rangeBase = 4; combat.areaRange = 3; combat.selectTargetLocation(rangeBase); } else if (ability.name == "Sniper Attack") { // Change to individual target rangeBase = 8; combat.ShowSelectMenu(combat.getEnemiesInRange(rangeBase, "Player")); combat.areaRange = 1; } else if (ability.name == "Heal Self") { // Change select method to individual ally, or just f**k it rangeBase = 0; combat.selectTargetLocation(rangeBase); } combat.selectingRange = rangeBase; //combat.selectTargetLocation (rangeBase); }
public void MovePress() { // When you hit that move button print("MOOOVE"); combat.HideBattleMenu(); Ability temp = ScriptableObject.CreateInstance("Ability") as Ability; temp.init("Move", combat.actionFrom); combat.actionToDo = temp; int[] pos = combat.actionFrom.battleLocation; int MP = combat.actionFrom.MP; combat.selectTargetLocation(pos[0], pos[1], MP); }