HeroCardSelection() 공개 정적인 메소드

public static HeroCardSelection ( AIHeroClient t, Menu menu ) : Cards
t AIHeroClient
menu Menu
리턴 Cards
예제 #1
0
        /// <summary>
        /// Does Harass
        /// </summary>
        public static void Harass()
        {
            var useCard = Essentials.HarassMenu["useCard"].Cast <CheckBox>().CurrentValue;

            if (useCard)
            {
                var wSlider = Essentials.HarassMenu["wSlider"].Cast <Slider>().CurrentValue;
                var t       = TargetSelector.GetTarget(
                    Player.Instance.AttackRange + wSlider,
                    DamageType.Mixed);

                if (t == null)
                {
                    return;
                }

                var chooser = Essentials.HarassMenu["chooser"].Cast <ComboBox>().SelectedText;

                if (chooser == "Smart")
                {
                    var selectedCard = Essentials.HeroCardSelection(t, Essentials.HarassMenu);
                    SelectCard(t, selectedCard);
                }
                else if (chooser == "Yellow")
                {
                    SelectCard(t, Cards.Yellow);
                }
                else if (chooser == "Red")
                {
                    SelectCard(t, Cards.Red);
                }
                else if (chooser == "Blue")
                {
                    SelectCard(t, Cards.Blue);
                }
            }

            var useQ = Essentials.HarassMenu["useQ"].Cast <CheckBox>().CurrentValue;

            if (useQ)
            {
                var qTarget = TargetSelector.GetTarget(Program.Q.Range, DamageType.Magical);
                if (qTarget == null)
                {
                    return;
                }
                var manaManagerQ = Essentials.HarassMenu["manaManagerQ"].Cast <Slider>().CurrentValue;
                if (!Program.Q.IsInRange(qTarget) || !Program.Q.IsReady() ||
                    !(Player.Instance.ManaPercent >= manaManagerQ))
                {
                    return;
                }
                var qPred = Essentials.HarassMenu["qPred"].Cast <Slider>().CurrentValue;
                var pred  = Program.Q.GetPrediction(qTarget);
                if (pred.HitChancePercent >= qPred)
                {
                    Program.Q.Cast(pred.CastPosition);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Does Combo
        /// </summary>
        public static void Combo()
        {
            var useCard = Essentials.ComboMenu["useCard"].Cast <CheckBox>().CurrentValue;

            if (useCard)
            {
                var wSlider = Essentials.ComboMenu["wSlider"].Cast <Slider>().CurrentValue;
                var wTarget = TargetSelector.GetTarget(
                    Player.Instance.AttackRange + wSlider,
                    DamageType.Magical);

                if (wTarget != null)
                {
                    var chooser = Essentials.ComboMenu["chooser"].Cast <ComboBox>().SelectedText;

                    switch (chooser)
                    {
                    case "Smart":
                        var selectedCard = Essentials.HeroCardSelection(wTarget, Essentials.ComboMenu);
                        if (selectedCard != Cards.None)
                        {
                            SelectCard(wTarget, selectedCard);
                        }
                        break;

                    case "Yellow":
                        SelectCard(wTarget, Cards.Yellow);
                        break;

                    case "Red":
                        SelectCard(wTarget, Cards.Red);
                        break;

                    case "Blue":
                        SelectCard(wTarget, Cards.Blue);
                        break;
                    }
                }
            }
            var useQ = Essentials.ComboMenu["useQ"].Cast <CheckBox>().CurrentValue;

            if (useQ)
            {
                var qTarget = TargetSelector.GetTarget(
                    Program.Q.Range,
                    DamageType.Magical);
                if (qTarget == null)
                {
                    return;
                }

                var useQStun     = Essentials.ComboMenu["useQStun"].Cast <CheckBox>().CurrentValue;
                var qPred        = Essentials.ComboMenu["qPred"].Cast <Slider>().CurrentValue;
                var manaManagerQ = Essentials.ComboMenu["manaManagerQ"].Cast <Slider>().CurrentValue;

                if (useQStun)
                {
                    return;
                }
                if (!Program.Q.IsInRange(qTarget) || !Program.Q.IsReady() ||
                    !(Player.Instance.ManaPercent >= manaManagerQ))
                {
                    return;
                }
                var pred = Program.Q.GetPrediction(qTarget);

                if (pred.HitChancePercent >= qPred)
                {
                    Program.Q.Cast(pred.CastPosition);
                }
            }
        }
예제 #3
0
        /// <summary>
        /// Does Combo
        /// </summary>
        public static void Combo()
        {
            var wSlider = Essentials.ComboMenu["wSlider"].Cast <Slider>().CurrentValue;
            var wTarget = TargetSelector.GetTarget(
                Player.Instance.AttackRange + wSlider,
                DamageType.Magical);
            var useCard = Essentials.ComboMenu["useCard"].Cast <CheckBox>().CurrentValue;
            var chooser = Essentials.ComboMenu["chooser"].Cast <Slider>().DisplayName;

            if (useCard && wTarget != null)
            {
                if (chooser == "Smart")
                {
                    var selectedCard = Essentials.HeroCardSelection(wTarget);

                    if (selectedCard != Cards.None)
                    {
                        SelectCard(wTarget, selectedCard);
                    }
                }
                else if (chooser == "Yellow")
                {
                    SelectCard(wTarget, Cards.Yellow);
                }
                else if (chooser == "Red")
                {
                    SelectCard(wTarget, Cards.Red);
                }
                else if (chooser == "Blue")
                {
                    SelectCard(wTarget, Cards.Blue);
                }
            }

            var qTarget = TargetSelector.GetTarget(
                Program.Q.Range,
                DamageType.Magical);
            var useQ = Essentials.ComboMenu["useQ"].Cast <CheckBox>().CurrentValue;

            if (useQ && qTarget != null)
            {
                var useQStun     = Essentials.ComboMenu["useQStun"].Cast <CheckBox>().CurrentValue;
                var qPred        = Essentials.ComboMenu["qPred"].Cast <Slider>().CurrentValue;
                var manaManagerQ = Essentials.ComboMenu["manaManagerQ"].Cast <Slider>().CurrentValue;

                if (useQStun)
                {
                    if (Program.Q.IsInRange(qTarget) && Program.Q.IsReady() &&
                        Player.Instance.ManaPercent >= manaManagerQ &&
                        qTarget.IsStunned)
                    {
                        var pred = Program.Q.GetPrediction(qTarget);

                        if (pred.HitChancePercent >= qPred)
                        {
                            Program.Q.Cast(pred.CastPosition);
                        }
                    }
                }

                if (!useQStun)
                {
                    if (Program.Q.IsInRange(qTarget) && Program.Q.IsReady() &&
                        Player.Instance.ManaPercent >= manaManagerQ)
                    {
                        var pred = Program.Q.GetPrediction(qTarget);

                        if (pred.HitChancePercent >= qPred)
                        {
                            Program.Q.Cast(pred.CastPosition);
                        }
                    }
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Does Harass
        /// </summary>
        public static void Harass()
        {
            var wSlider = Essentials.HarassMenu["wSlider"].Cast <Slider>().CurrentValue;
            var t       = TargetSelector.GetTarget(
                Player.Instance.AttackRange + wSlider,
                DamageType.Mixed);
            var m = EntityManager.MinionsAndMonsters.GetLaneMinions(
                EntityManager.UnitTeam.Enemy,
                Player.Instance.ServerPosition,
                Player.Instance.AttackRange + wSlider).FirstOrDefault();
            var useCard = Essentials.HarassMenu["useCard"].Cast <CheckBox>().CurrentValue;
            var chooser = Essentials.HarassMenu["chooser"].Cast <Slider>().DisplayName;

            if (useCard && m != null)
            {
                if (chooser == "Smart")
                {
                    var selectedCard = Essentials.MinionCardSelection(m);

                    if (selectedCard != Cards.None)
                    {
                        SelectCard(m, selectedCard);
                    }
                }
                else if (chooser == "Yellow")
                {
                    SelectCard(m, Cards.Yellow);
                }
                else if (chooser == "Red")
                {
                    SelectCard(m, Cards.Red);
                }
                else if (chooser == "Blue")
                {
                    SelectCard(m, Cards.Blue);
                }
            }

            if (useCard && t != null)
            {
                if (chooser == "Smart")
                {
                    var selectedCard = Essentials.HeroCardSelection(t);
                    SelectCard(t, selectedCard);
                }
                else if (chooser == "Yellow")
                {
                    SelectCard(t, Cards.Yellow);
                }
                else if (chooser == "Red")
                {
                    SelectCard(t, Cards.Red);
                }
                else if (chooser == "Blue")
                {
                    SelectCard(t, Cards.Blue);
                }
            }

            var qTarget      = TargetSelector.GetTarget(Program.Q.Range, DamageType.Magical);
            var useQ         = Essentials.HarassMenu["useQ"].Cast <CheckBox>().CurrentValue;
            var qPred        = Essentials.HarassMenu["qPred"].Cast <Slider>().CurrentValue;
            var manaManagerQ = Essentials.HarassMenu["manaManagerQ"].Cast <Slider>().CurrentValue;

            if (!useQ)
            {
                return;
            }

            if (qTarget == null)
            {
                return;
            }

            if (!Program.Q.IsInRange(qTarget) || !Program.Q.IsReady() ||
                !(Player.Instance.ManaPercent >= manaManagerQ))
            {
                return;
            }
            var pred = Program.Q.GetPrediction(qTarget);

            if (pred.HitChancePercent >= qPred)
            {
                Program.Q.Cast(pred.CastPosition);
            }
        }