Beispiel #1
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = _ultimate.IsActive(UltimateModeType.Combo) && R.IsReady();

            if (useR)
            {
                var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, target))
                    {
                        RLogicSingle(UltimateModeType.Combo);
                    }
                }
            }
            if (useE)
            {
                var target = TargetSelector.GetTarget((E.Range + Player.AttackRange) * 0.9f, E.DamageType);
                if (target != null)
                {
                    var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0
                        ? Utils.GetDashPosition(
                        E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value)
                        : Player.Position.Extend(
                        Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos)));
                    if (!pos.Equals(Vector3.Zero) && !pos.IsUnderTurret(false))
                    {
                        E.Cast(pos);
                    }
                }
            }
            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }
            if (useW)
            {
                var target = TargetSelector.GetTarget(W);
                var best   = CPrediction.Circle(W, target, W.GetHitChance("combo"));
                if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero))
                {
                    W.Cast(best.CastPosition);
                }
            }
        }
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady();

            if (useR)
            {
                var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, target))
                    {
                        RLogicSingle(UltimateModeType.Combo);
                    }
                }
            }
            if (useE && !Player.IsWindingUp && !IsReloading())
            {
                var target = TargetSelector.GetTarget(
                    E.Range + Player.AttackRange + Player.BoundingRadius, E.DamageType);
                if (target != null)
                {
                    var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0
                        ? Utils.GetDashPosition(
                        E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value)
                        : Player.Position.Extend(
                        Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos)));

                    if (!pos.Equals(Vector3.Zero))
                    {
                        if (GetAmmoCount() == 1 && !pos.IsUnderTurret(false) ||
                            (!GameObjects.EnemyHeroes.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e)) &&
                             GameObjects.EnemyHeroes.Any(
                                 e =>
                                 e.IsValidTarget() &&
                                 pos.Distance(e.Position) < Orbwalking.GetRealAutoAttackRange(e)) &&
                             target.Health < Player.GetAutoAttackDamage(target) * 2))
                        {
                            E.Cast(pos);
                        }
                    }
                }
            }
            if (useQ)
            {
                QLogic(Q.GetHitChance("combo"));
            }
            if (useW)
            {
                var target = TargetSelector.GetTarget(W);
                if (target != null)
                {
                    var best = CPrediction.Circle(W, target, W.GetHitChance("combo"));
                    if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero))
                    {
                        W.Cast(best.CastPosition);
                    }
                }
            }
        }