private void SetWaveNumber() { Core.DelayAction(SetWaveNumber, 500); Obj_AI_Minion closest = ObjectManager.Get <Obj_AI_Minion>() .Where( min => min.IsAlly && min.Name.Length > 13 && min.GetLane() == _lane && min.HealthPercent() > 80) .OrderBy(min => min.Distance(EnemyTurret)) .FirstOrDefault(); if (closest != null) { _currentWaveNum = closest.GetWave(); } }