Пример #1
0
        internal static void OnLoad(EventArgs args)
        {
            if (Player.ChampionName != "Jhin")
            {
                return;
            }

            CNLib.MultiLanguage.Load(new Dictionary <string, Dictionary <string, string> >()
            {
                { "English", MultiLanguage.EnglishDictionary }
            });

            LoadSpell();
            LoadMenu();
            LoadEvents();
            LastPosition.Load();
            //初始化ping时间
            foreach (var enemy in HeroManager.Enemies)
            {
                PingList.Add(enemy.NetworkId, 0);
            }

            DamageIndicator.DamageToUnit = GetRDmg;

            if (IsChinese)
            {
                Game.PrintChat("戏命师—烬 ".ToHtml(25) + "此刻,大美将致!".ToHtml(Color.PowderBlue, FontStlye.Cite));
            }
            else
            {
                Game.PrintChat("Jhin As The Virtuoso ".ToHtml(25) + "Art requires a certain cruelty!".ToHtml(Color.Purple, FontStlye.Cite));
            }
        }
Пример #2
0
        internal static void OnLoad()
        {
            if (Player.ChampionName != "Jhin")
            {
                return;
            }

            LoadSpell();
            LoadMenu();
            LoadEvents();
            LastPosition.Load();
            //初始化ping时间
            foreach (var enemy in HeroManager.Enemies)
            {
                PingList.Add(enemy.NetworkId, 0);
            }

            //DamageIndicator.DamageToUnit = GetRDmg;

            if (IsChinese)
            {
                Chat.Print("戏命师—烬 ".ToHtml(25) + "此刻,大美将致!".ToHtml(Color.PowderBlue, FontStlye.Cite));
            }
            else
            {
                Chat.Print("Jhin As The Virtuoso ".ToHtml(25) + "Art requires a certain cruelty!".ToHtml(Color.Purple, FontStlye.Cite));
            }
        }
Пример #3
0
        private static void RLogic()
        {
            if (!IsCastingR && Config.GetBool("自动R"))
            {
                var target = TargetSelector.GetTarget(R.Range - 400, TargetSelector.DamageType.Physical);
                if (target != null && target.IsValid && !target.IsDead &&
                    GetRDmg(target) > target.Health &&
                    OktwCommon.ValidUlt(target) && !OktwCommon.IsSpellHeroCollision(target, R) &&
                    target.CountAlliesInRange(600) == 0 &&
                    LastPosition.GetLastPositionsInRange(Player, 1000, 4000).Count == 0 &&
                    !Player.UnderTurret(true) &&
                    !target.InFountain())
                {
                    if (R.CastSpell(target))
                    {
                        RCharge.Target = target;
                    }
                }
            }

            #region 自动R逻辑

            if (IsCastingR)
            {
                if (Config.Item("R放眼").GetValue <bool>() && ScryingOrb.IsReady())
                {
                    var pistionList = VectorHelper.GetLastPositionInRCone().Where(m => !m.Hero.IsVisible && !m.Hero.IsDead && Game.ClockTime - m.LastSeen < 7 * 1000).OrderByDescending(m => m.LastSeen);

                    if (RCharge.Target == null && pistionList.Count() > 0)
                    {
                        var MissPosition = pistionList.First();
                        var MostNearBush = VectorHelper.GetBushNearPosotion(MissPosition.LastPosition);
                        if (MostNearBush != Vector3.Zero && MostNearBush.Distance(MissPosition.LastPosition) < 500)
                        {
                            ScryingOrb.Cast(MostNearBush);
                        }
                        else
                        {
                            ScryingOrb.Cast(MissPosition.LastPosition);
                        }
                    }
                    else if (RCharge.Target != null && !RCharge.Target.IsVisible && !RCharge.Target.IsDead)
                    {
                        var RTargetLastPosition = pistionList?.Find(m => m.Hero == RCharge.Target && Game.ClockTime - m.LastSeen < 3 * 1000);
                        if (RTargetLastPosition != null)
                        {
                            var MostNearBush = VectorHelper.GetBushNearPosotion(RTargetLastPosition.LastPosition);
                            if (MostNearBush.Distance(RTargetLastPosition.LastPosition) < 500)
                            {
                                ScryingOrb.Cast(MostNearBush);
                            }
                            else
                            {
                                ScryingOrb.Cast(RTargetLastPosition.LastPosition);
                            }
                        }
                    }
                }

                var target = GetTargetInR();
                if (target != null)
                {
                    #region 使用R,并记录R目标和施放时间
                    if (RCharge.Index == 0)
                    {
                        if (R.CastSpell(target))
                        {
                            RCharge.Target = target;
                        }
                    }
                    else
                    {
                        Utility.DelayAction.Add(delay[RCharge.Index - 1], () =>
                        {
                            if (R.CastSpell(target))
                            {
                                RCharge.Target = target;
                            }
                        });
                    }
                    #endregion
                }
            }

            #endregion
        }