Exemplo n.º 1
0
        void Combo()
        {
            Obj_AI_Base target = STS.GetTarget(1500);

            if (target.IsValidTarget(1500))
            {
                //Chat.Print("Good");
                CastQ(target, Config.GetListIndex("Combo.UseQ"));
                CastW(target, Config.GetListIndex("Combo.UseW"));
                CastE(target, CastMode.Combo);
                if (Config.GetBool("Combo.UseR1"))
                {
                    if (DLib.CalcComboDamage(target, new List <string>()
                    {
                        "Q", "E", "R", "R"
                    }) * ((100 + Config.GetSlice("Misc.overkill")) / 100) > target.Health)
                    {
                        R.Cast(target);
                    }
                }
                if (Config.GetSlice("Combo.UseR2") > 0)
                {
                    PredictionOutput Best = new PredictionOutput();
                    foreach (Obj_AI_Base enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(Config.GetSlice("Misc.RRange"))))
                    {
                        if (R.IsReady())
                        {
                            PredictionOutput output = R.GetPrediction(target);
                            if (Best.AoeTargetsHitCount == 0)
                            {
                                Best = output;
                            }
                            else if (Best.AoeTargetsHitCount < output.AoeTargetsHitCount)
                            {
                                Best = output;
                            }
                        }
                    }
                    if (Best.AoeTargetsHitCount >= Config.GetSlice("Combo.UseR2") && Best.Hitchance.IsHigerThen(HitChance.Medium))
                    {
                        R.Cast(Best.CastPosition);
                    }
                }
            }
        }