public static void CastBasicAttack(Menu menu, List <Obj_AI_Base> list, bool IsKillSteal = false) { if (menu.GetCheckBoxValue("AA") && !hasPerformedAction) { Obj_AI_Base target = list .OrderBy(a => a.Health) .Where(a => a.IsValidTarget() && _player.IsInAutoAttackRange(a) && (!IsKillSteal || _player.CanKillWithBasicAttack(a)) ).FirstOrDefault(); if (target != null) { hasPerformedAction = Player.IssueOrder(GameObjectOrder.AttackUnit, target); } } }