public bool TargetValid(Entity target) { //todo might need to have a boolean for if ability uses line of sight if (IsRanged() && !HasLineOfSight(target)) { return(false); } if (TargetType == TargetType.Hostile) { return(AbilityOwner.IsPlayer() != target.IsPlayer()); } if (TargetType == TargetType.Friendly) { return(AbilityOwner.IsPlayer() == target.IsPlayer()); } return(true); }