コード例 #1
0
        //struct MinionHealthPerSecond
        //{
        //    public float LastHp;
        //    public float DamagePerSecond;
        //}

        //private MinionHealthPerSecond[] calcMinionHealth(Obj_AI_Base[] minionsBase)
        //{
        //    MinionHealthPerSecond[] minionsStruct = new MinionHealthPerSecond[minionsBase.Length];
        //    const int checkDelay = 2;
        //    for (int i = 0; checkDelay > i; i++)
        //    {
        //        var startTime = Utils.TickCount;
        //        var endTime = startTime + 1;
        //        if (Utils.TickCount < endTime)

        //        for (int index = 0; index < minionsBase.Length; index++)
        //        {
        //            if (minionsBase[index].IsDead)
        //                    continue;

        //             var cMinionHP = minionsBase[index].Health;

        //             if (Math.Abs(minionsStruct[index].LastHp) > 1)
        //                minionsStruct[index].DamagePerSecond = (minionsStruct[index].LastHp - minionsBase[index].Health/checkDelay);

        //            minionsStruct[index].LastHp = minionsBase[index].Health;
        //        }
        //    }

        //    return minionsStruct;
        //}

        public static void LaneClear()
        {
            if (GlobalManager.GetPassiveBuff == 4 &&
                !GlobalManager.GetHero.HasBuff("RyzeR") &&
                GlobalManager.Config.Item("passiveproc").GetValue <bool>())
            {
                return;
            }

            var qlchSpell = GlobalManager.Config.Item("useQlc").GetValue <bool>();
            var elchSpell = GlobalManager.Config.Item("useElc").GetValue <bool>();
            var wlchSpell = GlobalManager.Config.Item("useWlc").GetValue <bool>();

            var q2LSpell = GlobalManager.Config.Item("useQ2L").GetValue <bool>();
            var e2LSpell = GlobalManager.Config.Item("useE2L").GetValue <bool>();
            var w2LSpell = GlobalManager.Config.Item("useW2L").GetValue <bool>();

            var rSpell  = GlobalManager.Config.Item("useRl").GetValue <bool>();
            var rSlider = GlobalManager.Config.Item("rMin").GetValue <Slider>().Value;
            var minMana = GlobalManager.Config.Item("useEPL").GetValue <Slider>().Value;

            var minionCount = MinionManager.GetMinions(GlobalManager.GetHero.Position, Champion.Q.Range, MinionTypes.All,
                                                       MinionTeam.NotAlly);

            if (GlobalManager.GetHero.ManaPercent <= minMana)
            {
                return;
            }

            foreach (var minion in minionCount)
            {
                if (!GlobalManager.CheckMinion(minion))
                {
                    continue;
                }

                var minionHp = minion.Health;// Reduce Calls and add in randomization buffer.
                //if (GlobalManager.Config.Item("doHuman").GetValue<bool>())
                //    minionHp = minion.Health * (1 + (Seeder.Next(GlobalManager.Config.Item("minCreepHPOffset").GetValue<Slider>().Value, GlobalManager.Config.Item("maxCreepHPOffset").GetValue<Slider>().Value) / 100.0f));//Randomioze Minion Hp from min to max hp less than damage
                if (minion.IsDead)
                {
                    return;
                }

                SpellSequence(minion, "useQ2L", "useE2L", "useW2L", "useRl");

                if (qlchSpell &&
                    Champion.Q.IsReady() &&
                    minion.IsValidTarget(Champion.Q.Range) &&
                    minionHp <= Champion.Q.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.Q.Cast(minion);
                }

                else if (wlchSpell &&
                         Champion.W.IsReady() &&
                         minion.IsValidTarget(Champion.W.Range) &&
                         minionHp <= Champion.W.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.W.CastOnUnit(minion);
                }

                else if (elchSpell &&
                         Champion.E.IsReady() &&
                         minion.IsValidTarget(Champion.E.Range) &&
                         minionHp <= Champion.E.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.E.CastOnUnit(minion);
                }

                if (rSpell &&
                    Champion.R.IsReady() &&
                    minion.IsValidTarget(Champion.Q.Range) &&
                    minionCount.Count > rSlider && GlobalManager.CheckMinion(minion))
                {
                    Champion.R.Cast();
                }
            }
        }
コード例 #2
0
        public static void ImprovedCombo()
        {
            Champion.SetIgniteSlot(GlobalManager.GetHero.GetSpellSlot("summonerdot"));
            var target = TargetSelector.GetTarget(Champion.W.Range, TargetSelector.DamageType.Magical);

            if (!target.IsValidTarget(Champion.Q.Range) || !GlobalManager.CheckTarget(target))
            {
                return;
            }

            if (target.IsValidTarget(Champion.W.Range) &&
                (target.Health < Champion.IgniteDamage(target) + Champion.W.GetDamage(target)))
            {
                GlobalManager.GetHero.Spellbook.CastSpell(Champion.GetIgniteSlot(), target);
            }

            var bSpells  = new bool[5];
            var qSpell   = GlobalManager.Config.Item("useQ").GetValue <bool>();
            var eSpell   = GlobalManager.Config.Item("useE").GetValue <bool>();
            var wSpell   = GlobalManager.Config.Item("useW").GetValue <bool>();
            var rSpell   = GlobalManager.Config.Item("useR").GetValue <bool>();
            var rwwSpell = GlobalManager.Config.Item("useRww").GetValue <bool>();

            if (target.IsValidTarget(Champion.Q.Range))
            {
                if (GlobalManager.GetPassiveBuff <= 1 && !GlobalManager.GetHero.HasBuff("ryzepassivecharged"))
                {
                    CastQ(target);
                    CastE(target);
                    CastW(target);
                    CastR(target);
                }

                if (GlobalManager.GetPassiveBuff == 2)
                {
                    CastQn(target);
                    CastW(target);
                    CastE(target);
                    CastR(target);
                }


                if (GlobalManager.GetPassiveBuff == 3)
                {
                    CastQn(target);
                    CastE(target);
                    CastW(target);
                    CastR(target);
                }

                if (GlobalManager.GetPassiveBuff == 4)
                {
                    CastW(target);
                    CastQn(target);
                    CastE(target);
                    CastR(target);
                }

                if (GlobalManager.GetHero.HasBuff("ryzepassivecharged"))
                {
                    CastW(target);
                    CastQn(target);
                    CastE(target);
                    CastR(target);
                }
            }
            else
            {
                if (wSpell &&
                    Champion.W.IsReady() &&
                    target.IsValidTarget(Champion.W.Range))
                {
                    Champion.W.CastOnUnit(target);
                }

                if (qSpell &&
                    Champion.Qn.IsReady() &&
                    target.IsValidTarget(Champion.Qn.Range))
                {
                    Champion.Qn.Cast(target);
                }

                if (eSpell &&
                    Champion.E.IsReady() &&
                    target.IsValidTarget(Champion.E.Range))
                {
                    Champion.E.CastOnUnit(target);
                }
            }
            if (Champion.R.IsReady() && (GlobalManager.GetPassiveBuff == 4 || GlobalManager.GetHero.HasBuff("ryzepassivecharged")) && rSpell)
            {
                if (!Champion.Q.IsReady() && !Champion.W.IsReady() && !Champion.E.IsReady())
                {
                    Champion.R.Cast();
                }
            }
        }
コード例 #3
0
        private static void StartComboSequence(Obj_AI_Base target, IReadOnlyList <bool> bSpells, IEnumerable <char> seq, float hpOffset = 1)
        {
            foreach (var com in seq)
            {
                var isMinion = target.IsMinion;
                switch (com)
                {
                case 'Q':
                    if (!bSpells[0])
                    {
                        continue;
                    }

                    if (target.IsValidTarget(Champion.Q.Range) && Champion.Q.IsReady() && !target.IsInvulnerable)
                    {
                        if (isMinion &&
                            !(target.Health * hpOffset < Champion.Q.GetDamage(target) &&
                              GlobalManager.CheckMinion(target)))
                        {
                            continue;
                        }
                        if (GlobalManager.GetPassiveBuff > 2 ||
                            GlobalManager.GetHero.HasBuff("RyzePassiveStack") && Champion.Q.IsReady())
                        {
                            Champion.Qn.Cast(target);
                        }
                        else
                        {
                            Champion.Q.Cast(target);
                        }
                    }

                    continue;

                case 'W':
                    if (!bSpells[1])
                    {
                        continue;
                    }

                    if (target.IsValidTarget(Champion.W.Range) && bSpells[1] && Champion.W.IsReady() && !target.IsInvulnerable)
                    {
                        if (isMinion && !(target.Health * hpOffset < Champion.W.GetDamage(target) && GlobalManager.CheckMinion(target)))
                        {
                            continue;
                        }
                    }
                    Champion.W.Cast(target);

                    continue;

                case 'E':
                    if (!bSpells[2])
                    {
                        continue;
                    }

                    if (target.IsValidTarget(Champion.E.Range) && bSpells[2] && Champion.E.IsReady() && !target.IsInvulnerable)
                    {
                        if (isMinion && !(target.Health * hpOffset < Champion.E.GetDamage(target) && GlobalManager.CheckMinion(target)))
                        {
                            continue;
                        }
                    }
                    Champion.E.Cast(target);


                    continue;

                case 'R':
                    if (!bSpells[3])
                    {
                        continue;
                    }
                    if (!target.IsValidTarget(Champion.W.Range) || !(target.Health > (Champion.Q.GetDamage(target) + Champion.E.GetDamage(target))) || target.IsInvulnerable)
                    {
                        continue;
                    }
                    if (!Champion.R.IsReady())
                    {
                        continue;
                    }
                    if (bSpells[4] && target.HasBuff("RyzeW") || !bSpells[4])
                    {
                        Champion.R.Cast();
                    }
                    continue;
                }
            }

            if (!Champion.R.IsReady() || GlobalManager.GetPassiveBuff != 4 || !bSpells[4])
            {
                return;
            }
            if (Champion.Q.IsReady() || Champion.W.IsReady() || Champion.E.IsReady())
            {
                return;
            }

            Champion.R.Cast();
        }
コード例 #4
0
ファイル: LaneOptions.cs プロジェクト: wx8829110/WUYANZZZ
        //struct MinionHealthPerSecond
        //{
        //    public float LastHp;
        //    public float DamagePerSecond;
        //}

        //private MinionHealthPerSecond[] calcMinionHealth(Obj_AI_Base[] minionsBase)
        //{
        //    MinionHealthPerSecond[] minionsStruct = new MinionHealthPerSecond[minionsBase.Length];
        //    const int checkDelay = 2;
        //    for (int i = 0; checkDelay > i; i++)
        //    {
        //        var startTime = Utils.TickCount;
        //        var endTime = startTime + 1;
        //        if (Utils.TickCount < endTime)

        //        for (int index = 0; index < minionsBase.Length; index++)
        //        {
        //            if (minionsBase[index].IsDead)
        //                    continue;

        //             var cMinionHP = minionsBase[index].Health;

        //             if (Math.Abs(minionsStruct[index].LastHp) > 1)
        //                minionsStruct[index].DamagePerSecond = (minionsStruct[index].LastHp - minionsBase[index].Health/checkDelay);

        //            minionsStruct[index].LastHp = minionsBase[index].Health;
        //        }
        //    }

        //    return minionsStruct;
        //}

        public static void LaneClear()
        {
            if (!GlobalManager.Config.Item("disablelane").IsActive())
            {
                return;
            }

            var qlchSpell = GlobalManager.Config.Item("useQlc").GetValue <bool>();
            var elchSpell = GlobalManager.Config.Item("useElc").GetValue <bool>();
            var wlchSpell = GlobalManager.Config.Item("useWlc").GetValue <bool>();

            var qlcSpell = GlobalManager.Config.Item("useQ2L").GetValue <bool>();
            var elcSpell = GlobalManager.Config.Item("useE2L").GetValue <bool>();
            var wlcSpell = GlobalManager.Config.Item("useW2L").GetValue <bool>();

            var minMana = GlobalManager.Config.Item("useEPL").GetValue <Slider>().Value;

            var minionCount = MinionManager.GetMinions(GlobalManager.GetHero.Position, Champion.Q.Range, MinionTypes.All,
                                                       MinionTeam.NotAlly);

            if (GlobalManager.GetHero.ManaPercent <= minMana)
            {
                return;
            }

            foreach (var minion in minionCount)
            {
                if (qlcSpell && Champion.Q.IsReady())
                {
                    Champion.Q.Cast(minion);
                }

                if (elcSpell && Champion.E.IsReady() && minion.IsValidTarget(Champion.E.Range))
                {
                    Champion.E.Cast(minion);
                }

                if (wlcSpell && Champion.W.IsReady() && minion.IsValidTarget(Champion.W.Range))
                {
                    Champion.W.Cast(minion);
                }
                var minionHp = minion.Health; // Reduce Calls and add in randomization buffer.
                if (minion.IsDead)
                {
                    return;
                }

                if (qlchSpell &&
                    Champion.Q.IsReady() &&
                    minion.IsValidTarget(Champion.Q.Range) &&
                    minionHp <= Champion.Q.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.Q.Cast(minion);
                }

                else if (wlchSpell &&
                         Champion.W.IsReady() &&
                         minion.IsValidTarget(Champion.W.Range) &&
                         minionHp <= Champion.W.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.W.CastOnUnit(minion);
                }

                else if (elchSpell &&
                         Champion.E.IsReady() &&
                         minion.IsValidTarget(Champion.E.Range) &&
                         minionHp <= Champion.E.GetDamage(minion) && GlobalManager.CheckMinion(minion))
                {
                    Champion.E.Cast(minion);
                }
            }
        }