public static Obj_AI_Base GetLaneMinion(Spell daSpell) { IEnumerable <Obj_AI_Minion> minions = daSpell.GetLaneMinions(); if (minions.IsEmpty()) { return(null); } Obj_AI_Minion temp = minions.FirstOrDefault(); if (temp.Equals(LastMinion)) { if (!(minions.Count() > 1)) { return(null); } temp = minions.ElementAt(1); } if (!temp.IsValidTarget()) { return(null); } if (MyHero.CanAttack && MyHero.GetAutoAttackDamage(temp) >= MyMinionHealthPrediction(temp, daSpell)) { return(null); } if (!(daSpell.GetDamage(temp) >= MyMinionHealthPrediction(temp, daSpell))) { return(null); } LastMinion = temp; return(temp); }