示例#1
0
        /// <summary>
        ///     On Combo
        /// </summary>
        private void Combo()
        {
            var basename = BaseName + "Combo.";

            var enemies = Functions.Objects.Heroes.GetEnemies(E.Range).OrderBy(hp => hp.Health);

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR").GetValue <bool>())
            {
                if (_manaManager.CheckComboR())
                {
                    foreach (var enemy in enemies.Where(e => e.IsValidTarget(R.Range)))
                    {
                        if (!StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{enemy.ChampionName}").GetValue <bool>())
                        {
                            continue;
                        }

                        if (GetDamage(enemy) < enemy.Health)
                        {
                            continue;
                        }

                        R.Cast(enemy);
                        break;
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseE").GetValue <bool>())
            {
                if (_manaManager.CheckComboE())
                {
                    foreach (var target in enemies)
                    {
                        if (!StaticObjects.ProjectMenu.Item($"{basename}.UseE.On.{target.ChampionName}").GetValue <bool>())
                        {
                            continue;
                        }

                        if (target.HasBuffOfType(BuffType.Invulnerability) || target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield))
                        {
                            continue;
                        }

                        E.Cast(target);
                        break;
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>())
            {
                foreach (var target in enemies.Where(x => x.HasBuff("TristanaECharge")))
                {
                    Q.Cast();
                    Orbwalker.ForceTarget(target);
                    break;
                }
            }
        }
示例#2
0
文件: Ashe.cs 项目: waldow90/PortAIO
        /// <summary>
        ///     On Combo
        /// </summary>
        private void Combo()
        {
            var basename = BaseName + "Combo.";

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>())
            {
                if (_manaManager.CheckComboQ())
                {
                    if (Functions.Objects.Heroes.GetEnemies(StaticObjects.Player.AttackRange - 30).Count > 0)
                    {
                        Q.Cast();
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseW").GetValue <bool>())
            {
                if (_manaManager.CheckComboW())
                {
                    var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseW.Prediction").GetValue <StringList>().SelectedValue);

                    var focusTargetValid = false;
                    //Check if the target in target selector is valid (best target)
                    var focusTarget = TargetSelector.GetTarget(W.Range, W.DamageType);
                    if (focusTarget != null)
                    {
                        if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{focusTarget.ChampionName}").GetValue <bool>())
                        {
                            focusTargetValid = Prediction.DoCast(W, focusTarget, minHitChance);
                        }
                    }
                    if (!focusTargetValid)
                    {
                        var orderedTargets = Prediction.OrderTargets(W);

                        foreach (var target in orderedTargets)
                        {
                            if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{target.ChampionName}").GetValue <bool>())
                            {
                                continue;
                            }

                            if (Prediction.DoCast(W, target, minHitChance))
                            {
                                break;
                            }
                        }
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR").GetValue <bool>())
            {
                if (_manaManager.CheckComboR())
                {
                    var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Prediction").GetValue <StringList>().SelectedValue);

                    var focusTargetValid = false;
                    //Check if the target in target selector is valid (best target)
                    var focusTarget = TargetSelector.GetTarget(R.Range, R.DamageType);
                    if (focusTarget != null)
                    {
                        if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}").GetValue <bool>())
                        {
                            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}.HpMin").GetValue <Slider>().Value > focusTarget.HealthPercent)
                            {
                                if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}.HpMax").GetValue <Slider>().Value < focusTarget.HealthPercent)
                                {
                                    focusTargetValid = Prediction.DoCast(R, focusTarget, minHitChance);
                                }
                            }
                        }
                    }

                    if (!focusTargetValid)
                    {
                        var orderedTargets = Prediction.OrderTargets(R);

                        foreach (var target in orderedTargets)
                        {
                            if (!StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}").GetValue <bool>())
                            {
                                continue;
                            }
                            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}.HpMin").GetValue <Slider>().Value > target.HealthPercent)
                            {
                                continue;
                            }
                            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}.HpMax").GetValue <Slider>().Value < target.HealthPercent)
                            {
                                continue;
                            }

                            if (Prediction.DoCast(R, target, minHitChance))
                            {
                                break;
                            }
                        }
                    }
                }
            }
        }
示例#3
0
        /// <summary>
        ///     On Combo
        /// </summary>
        private void Combo()
        {
            var basename = BaseName + "Combo.";

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ").GetValue <bool>())
            {
                if (_manaManager.CheckComboQ())
                {
                    var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseQ.Prediction").GetValue <StringList>().SelectedValue);

                    var focusTargetValid = false;
                    //Check if the target in target selector is valid (best target)
                    var focusTarget = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                    if (focusTarget != null)
                    {
                        if (StaticObjects.ProjectMenu.Item($"{basename}.UseQ.On.{focusTarget.ChampionName}").GetValue <bool>())
                        {
                            focusTargetValid = Prediction.DoCast(Q, focusTarget, minHitChance, true);
                        }
                    }

                    if (!focusTargetValid)
                    {
                        var orderedTargets = Prediction.OrderTargets(Q);

                        foreach (var target in orderedTargets)
                        {
                            if (!StaticObjects.ProjectMenu.Item($"{basename}.UseQ.On.{target.ChampionName}").GetValue <bool>())
                            {
                                continue;
                            }

                            if (Prediction.DoCast(Q, focusTarget, minHitChance, true))
                            {
                                break;
                            }
                        }
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseW").GetValue <bool>())
            {
                if (_manaManager.CheckComboW())
                {
                    var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseW.Prediction").GetValue <StringList>().SelectedValue);

                    var focusTargetValid = false;
                    //Check if the target in target selector is valid (best target)
                    var focusTarget = TargetSelector.GetTarget(W.Range, W.DamageType);
                    if (focusTarget != null)
                    {
                        if (StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{focusTarget.ChampionName}").GetValue <bool>())
                        {
                            focusTargetValid = Prediction.DoCast(W, focusTarget, minHitChance);
                        }
                    }

                    if (!focusTargetValid)
                    {
                        var orderedTargets = Prediction.OrderTargets(W);

                        foreach (var target in orderedTargets)
                        {
                            if (!StaticObjects.ProjectMenu.Item($"{basename}.UseW.On.{target.ChampionName}").GetValue <bool>())
                            {
                                continue;
                            }

                            if (Prediction.DoCast(W, focusTarget, minHitChance))
                            {
                                break;
                            }
                        }
                    }
                }
            }

            if (StaticObjects.ProjectMenu.Item($"{basename}.UseR").GetValue <bool>())
            {
                if (_manaManager.CheckComboR())
                {
                    var minHitChance = Prediction.GetHitChance(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Prediction").GetValue <StringList>().SelectedValue);

                    var focusTargetValid = false;
                    //Check if the target in target selector is valid (best target)
                    var focusTarget = TargetSelector.GetTarget(StaticObjects.ProjectMenu.Item($"{basename}.UseR.Range").GetValue <Slider>().Value, R.DamageType);
                    if (focusTarget != null)
                    {
                        if (StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{focusTarget.ChampionName}").GetValue <bool>())
                        {
                            if (focusTarget.Distance(StaticObjects.Player) > Q.Range)
                            {
                                if (GetRealRDamage(focusTarget) > focusTarget.Health)
                                {
                                    focusTargetValid = Prediction.DoCast(R, focusTarget, minHitChance);
                                }
                            }
                        }
                    }

                    if (!focusTargetValid)
                    {
                        var orderedTargets = Prediction.OrderTargets(R);

                        foreach (var target in orderedTargets)
                        {
                            if (!StaticObjects.ProjectMenu.Item($"{basename}.UseR.On.{target.ChampionName}").GetValue <bool>())
                            {
                                continue;
                            }
                            if (target.Health > GetRealRDamage(target))
                            {
                                continue;
                            }
                            if (Q.Range > target.Distance(StaticObjects.Player))
                            {
                                continue;
                            }

                            if (Prediction.DoCast(R, target, minHitChance))
                            {
                                break;
                            }
                        }
                    }
                }
            }
        }