예제 #1
0
        void OnCombo()
        {
            var enemies = EntityManager.Heroes.Enemies.OrderByDescending
                              (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range);
            var target = TargetSelector.GetTarget(1400, DamageType.Physical);

            if (!target.IsValidTarget(Q.Range) || target == null)
            {
                return;
            }
            if (Q.IsReady() && target.IsValidTarget(Q.Range))
            {
                foreach (var eenemies in enemies)
                {
                    var useQ = GravesTheTrollMeNu.ComboMenu["combo.q"
                                                            + eenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useQ)
                    {
                        var predQ = Q.GetPrediction(target);
                        if (predQ.HitChance >= HitChance.Medium)
                        {
                            Q.Cast(predQ.CastPosition);
                        }
                        else if (predQ.HitChance >= HitChance.Immobile)
                        {
                            Q.Cast(predQ.CastPosition);
                        }
                    }
                    if (GravesTheTrollMeNu.ComboW() && W.IsReady() && target.IsValidTarget(W.Range))
                    {
                        var predW = W.GetPrediction(target);
                        if (predW.HitChance >= HitChance.Medium)
                        {
                            W.Cast(predW.CastPosition);
                        }
                    }
                    if (R.IsReady() && GravesTheTrollMeNu.ComboR() &&
                        Player.CountEnemiesInRange(R.Range) >= GravesTheTrollMeNu.ComboREnemies())
                    {
                        R.Cast(target);
                    }
                    if ((ObjectManager.Player.CountEnemiesInRange(ObjectManager.Player.AttackRange) >=
                         GravesTheTrollMeNu.YoumusEnemies() ||
                         Player.HealthPercent >= GravesTheTrollMeNu.ItemsYoumuShp()) &&
                        Activator.Youmus.IsReady() && GravesTheTrollMeNu.Youmus() && Activator.Youmus.IsOwned())
                    {
                        Activator.Youmus.Cast();
                        return;
                    }
                    if (Player.HealthPercent <= GravesTheTrollMeNu.BilgewaterHp() &&
                        GravesTheTrollMeNu.Bilgewater() &&
                        Activator.Bilgewater.IsReady() && Activator.Bilgewater.IsOwned())
                    {
                        Activator.Bilgewater.Cast(target);
                        return;
                    }

                    if (Player.HealthPercent <= GravesTheTrollMeNu.BotrkHp() && GravesTheTrollMeNu.Botrk() &&
                        Activator.Botrk.IsReady() &&
                        Activator.Botrk.IsOwned())
                    {
                        Activator.Botrk.Cast(target);
                    }
                }
            }
        }