当前位置: 首页>>代码示例>>C#>>正文


C# Obj_AI_Base.IsFacing方法代码示例

本文整理汇总了C#中Obj_AI_Base.IsFacing方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.IsFacing方法的具体用法?C# Obj_AI_Base.IsFacing怎么用?C# Obj_AI_Base.IsFacing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Obj_AI_Base的用法示例。


在下文中一共展示了Obj_AI_Base.IsFacing方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Obj_AI_Hero_OnProcessSpellCast

        private void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!(sender is Obj_AI_Base))
            {
                return;
            }

            if (config.Item("usew", true).GetValue<bool>() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                W.IsReady())
            {
                SpellData spell = args.SData;
                string spellName = spell.Name;
                Obj_AI_Hero target = args.Target as Obj_AI_Hero;
                if (target != null && target.IsMe)
                {
                    if (CombatHelper.isTargetedCC(spellName))
                    {
                        W.Cast(config.Item("packets").GetValue<bool>());
                    }
                }
                if (sender.Distance(player) < 600 && spellName == "GalioIdolOfDurand")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 450 && spellName == "LissandraW")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 250 && spellName == "MaokaiTrunkLine")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 600 && spellName == "SoulShackles")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 260 && spellName == "RivenMartyr")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 550 && spellName == "CurseoftheSadMummy")
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
                if (sender.Distance(player) < 600 && spellName == "CassiopeiaPetrifyingGaze" && player.IsFacing(sender) &&
                    sender.IsFacing(player))
                {
                    W.Cast(config.Item("packets").GetValue<bool>());
                }
            }
        }
开发者ID:q199230217,项目名称:LeagueSharp,代码行数:51,代码来源:Nocturne.cs

示例2: OnProcessSpellCast

        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsEnemy || Player.Instance.IsRecalling()) return;

            if (args.Slot == SpellSlot.E && args.SData.Name.IndexOf("Condemn", StringComparison.CurrentCultureIgnoreCase) >= 0 && args.Target.Type == GameObjectType.AIHeroClient && args.Target.IsAlly && sender.BaseSkinName.Contains("Vayne"))
            {
                CastShield(args.Target as Obj_AI_Base);
            }

            if (args.Slot == SpellSlot.Q && args.SData.Name.IndexOf("Blind", StringComparison.CurrentCultureIgnoreCase) >= 0 && args.Target.Type == GameObjectType.AIHeroClient && args.Target.IsAlly && sender.BaseSkinName.Contains("Teemo"))
            {
                CastShield(args.Target as Obj_AI_Base);
            }

            priorAllyOrder = new List<AIHeroClient>();

            hpAllyOrder = new List<AIHeroClient>();

            highestPriority = 0;

            lowestHP = int.MaxValue;

            if (AutoShield.PriorMode == 1)
            {
                foreach (var slider in AutoShield.Sliders)
                {
                    if (slider.CurrentValue >= highestPriority)
                    {
                        highestPriority = slider.CurrentValue;

                        foreach (var ally in AutoShield.Heros.Where(ally => slider.VisibleName.Contains(ally.ChampionName)))
                        {
                            priorAllyOrder.Insert(0, ally);
                        }
                    }
                    else
                    {
                        foreach (var ally in AutoShield.Heros.Where(ally => slider.VisibleName.Contains(ally.ChampionName)))
                        {
                            priorAllyOrder.Add(ally);
                        }
                    }
                }

                foreach (var ally in priorAllyOrder.Where(ally => Player.Instance.IsInRange(ally, 750)))
                {
                    foreach (var shieldThisSpell in AutoShield.ShieldAllyList.Where(x => x.DisplayName.Contains(ally.ChampionName) && x.CurrentValue).SelectMany(shieldThisAlly => AutoShield.ShieldSpellList.Where(s => s.DisplayName.Contains(args.SData.Name) && s.CurrentValue)))
                    {
                        if (args.Target == ally)
                            CastShield(ally);
                        else
                        {
                            if (Prediction.Position.PredictUnitPosition(ally, 250)
                                .IsInRange(args.End,
                                    MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 1]))
                            {
                                CastShield(ally);
                            }
                            else if (sender.IsFacing(ally) && Prediction.Position.PredictUnitPosition(ally, 250).IsInRange(sender, MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 0]))
                            {
                                CastShield(ally);
                            }
                        }
                    }
                }
            }
            else
            {
                foreach (var ally in EntityManager.Heroes.Allies)
                {
                    if (ally.Health <= lowestHP)
                    {
                        lowestHP = ally.Health;
                        hpAllyOrder.Insert(0, ally);
                    }
                    else
                        hpAllyOrder.Add(ally);
                }

                foreach (var ally in hpAllyOrder.Where(ally => Player.Instance.IsInRange(ally, 750)))
                {
                    foreach (var shieldThisSpell in AutoShield.ShieldAllyList.Where(a => a.DisplayName.Contains(ally.ChampionName) && a.CurrentValue).SelectMany(shieldThisAlly => AutoShield.ShieldSpellList.Where(s => s.DisplayName.Contains(args.SData.Name) && s.CurrentValue)))
                    {
                        if (args.Target == ally)
                            CastShield(ally);
                        else
                        {
                            if (Prediction.Position.PredictUnitPosition(ally, 250).IsInRange(args.End, MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 1]))
                            {
                                CastShield(ally);
                            }
                            else if (sender.IsFacing(ally) && Prediction.Position.PredictUnitPosition(ally, 250).IsInRange(sender, MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 0]))
                            {
                                CastShield(ally);
                            }
                        }
                    }
                }
            }
        }
开发者ID:CainWolf,项目名称:PortAIO,代码行数:100,代码来源:Shield.cs

示例3: EventGapcloser

        /// <summary>
        ///     On Process Spell Cast subscribed event function
        /// </summary>
        /// <param name="sender"><see cref="Obj_AI_Base" /> sender</param>
        /// <param name="args">Process Spell Cast Data</param>
        private static void EventGapcloser(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (SpellsList.All(spell => spell.Value.SpellName != args.SData.Name.ToLower()))
            {
                return;
            }

            var hero = sender as Obj_AI_Hero;
            var player = GameObjects.Player;
            if (hero != null)
            {
                ActiveSpellsList.Add(
                    new GapCloserEventArgs
                        {
                            Start = args.Start, End = args.End, Sender = hero, TickCount = Variables.TickCount,
                            SkillType =
                                (args.Target != null && args.Target.IsValid)
                                    ? GapcloserType.Targeted
                                    : GapcloserType.Skillshot,
                            Slot = args.Slot,
                            IsDirectedToPlayer =
                                (args.Target != null && args.Target.IsValid && args.Target.IsMe)
                                || player.Distance(args.End) < player.Distance(args.Start) || sender.IsFacing(player),
                            SpellName = args.SData.Name
                        });
            }
        }
开发者ID:ShineSharp,项目名称:LeagueSharp.SDK,代码行数:32,代码来源:Gapcloser.cs

示例4: OnProcessSpellCast

        private static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Player.Instance.IsRecalling()) return;

            foreach (
                var enemy in
                    EntityManager.Heroes.Enemies.Where(
                        enemy => sender.IsAlly && Player.Instance.IsInRange(sender, E.Range) &&
                                 args.SData.Name == "EzrealMysticShotMissile" && sender.CountEnemiesInRange(1200) > 0 &&
                                 Prediction.Position.PredictUnitPosition(enemy, 250).IsInRange(args.End, 60)))
                CastShield(sender);

            if (!sender.IsEnemy) return;

            priorAllyOrder = new List<AIHeroClient>();

            hpAllyOrder = new List<AIHeroClient>();

            highestPriority = 0;

            lowestHP = int.MaxValue;

            if (Config.Settings.AutoShield.PriorMode == 1)
            {
                foreach (var slider in Config.Settings.AutoShield.Sliders)
                {
                    if (slider.CurrentValue >= highestPriority)
                    {
                        highestPriority = slider.CurrentValue;

                        foreach (
                            var ally in
                                Config.Settings.AutoShield.Heros.Where(
                                    ally => slider.VisibleName.Contains(ally.ChampionName)))
                            priorAllyOrder.Insert(0, ally);
                    }
                    else
                    {
                        foreach (
                            var ally in
                                Config.Settings.AutoShield.Heros.Where(
                                    ally => slider.VisibleName.Contains(ally.ChampionName)))
                            priorAllyOrder.Add(ally);
                    }
                }

                foreach (var ally in priorAllyOrder.Where(ally => Player.Instance.IsInRange(ally, E.Range)))
                {
                    foreach (
                        var shieldThisSpell in
                            from shieldThisAlly in
                                Config.Settings.AutoShield.ShieldAllyList.Where(
                                    x => x.DisplayName.Contains(ally.ChampionName) && x.CurrentValue)
                            from shieldThisSpell in Config.Settings.AutoShield.ShieldSpellList
                            where shieldThisSpell.DisplayName.Contains(args.SData.Name) && shieldThisSpell.CurrentValue
                            select shieldThisSpell)
                    {
                        if (args.Target == ally)
                            CastShield(ally);
                        else
                        {
                            if (Prediction.Position.PredictUnitPosition(ally, 250)
                                .IsInRange(args.End,
                                    MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 1]))
                            {
                                CastShield(ally);
                            }
                            else if (sender.IsFacing(ally) &&
                                     Prediction.Position.PredictUnitPosition(ally, 250)
                                         .IsInRange(sender,
                                             MissileDatabase.rangeRadiusDatabase[shieldThisSpell.DisplayName.Last(), 0]))
                            {
                                CastShield(ally);
                            }
                        }
                    }
                }
            }
            else
            {
                foreach (var ally in EntityManager.Heroes.Allies)
                {
                    if (ally.Health <= lowestHP)
                    {
                        lowestHP = ally.Health;
                        hpAllyOrder.Insert(0, ally);
                    }
                    else
                        hpAllyOrder.Add(ally);
                }

                foreach (var ally in hpAllyOrder.Where(ally => Player.Instance.IsInRange(ally, E.Range)))
                {
                    foreach (
                        var shieldThisSpell in
                            Config.Settings.AutoShield.ShieldAllyList.Where(
                                x => x.DisplayName.Contains(ally.ChampionName) && x.CurrentValue)
                                .SelectMany(
                                    shieldThisAlly =>
                                        Config.Settings.AutoShield.ShieldSpellList.Where(
//.........这里部分代码省略.........
开发者ID:FireBuddy,项目名称:elobuddy,代码行数:101,代码来源:Events.cs

示例5: Obj_AI_Base_OnProcessSpellCast

        public static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs args)
        {
            if (Config.Item("Cassiopeia.AutoSeraphsEmbrace").GetValue<bool>() && SeraphsEmbrace.IsReady() && Player.HealthPercent <= Config.Item("Cassiopeia.AutoSeraphsEmbraceMiniHP").GetValue<Slider>().Value && (unit.IsValid<Obj_AI_Hero>() || unit.IsValid<Obj_AI_Turret>()) && unit.IsEnemy && args.Target.IsMe)
            {
                SeraphsEmbrace.Cast();
            }

            if ((unit.IsValid<Obj_AI_Hero>() || unit.IsValid<Obj_AI_Turret>()) && unit.IsEnemy && args.Target.IsMe && Config.Item("Cassiopeia.useZhonyasHourglass").GetValue<bool>() && ZhonyasHourglass.IsReady() && Player.HealthPercent <= Config.Item("Cassiopeia.MinimumHPtoZhonyasHourglass").GetValue<Slider>().Value)
            {
                if (Player.CountEnemiesInRange(1300) > 1)
                {
                    if (Player.CountAlliesInRange(1300) >= 1 + 1)
                    {
                        ZhonyasHourglass.Cast();
                        return;
                    }
                    if (Player.CountAlliesInRange(1300) == 0 + 1)
                    {
                        if (unit.GetSpellDamage(Player, args.SData.Name) >= Player.Health || (unit.GetAutoAttackDamage(Player) >= Player.Health && args.SData.IsAutoAttack()))
                        {
                            ZhonyasHourglass.Cast();
                            return;
                        }
                    }
                }
                if (Player.CountEnemiesInRange(1300) == 1)
                {
                    if (unit.GetSpellDamage(Player, args.SData.Name) >= Player.Health || (unit.GetAutoAttackDamage(Player) >= Player.Health && args.SData.IsAutoAttack()))
                    {
                        ZhonyasHourglass.Cast();
                        return;
                    }
                }

            }

            if ((unit.IsValid<Obj_AI_Hero>() || unit.IsValid<Obj_AI_Turret>()) && unit.IsEnemy && args.Target.IsMe && Config.Item("Cassiopeia.useWoogletsWitchcap").GetValue<bool>() && WoogletsWitchcap.IsReady() && Player.HealthPercent <= Config.Item("Cassiopeia.MinimumHPtoWoogletsWitchcap").GetValue<Slider>().Value)
            {
                if (Player.CountEnemiesInRange(1300) > 1)
                {
                    if (Player.CountAlliesInRange(1300) >= 1 + 1)
                    {
                        WoogletsWitchcap.Cast();
                        return;
                    }
                    if (Player.CountAlliesInRange(1300) == 0 + 1)
                    {
                        if (unit.GetSpellDamage(Player, args.SData.Name) >= Player.Health || (unit.GetAutoAttackDamage(Player) >= Player.Health && args.SData.IsAutoAttack()))
                        {
                            WoogletsWitchcap.Cast();
                            return;
                        }
                    }
                }
                if (Player.CountEnemiesInRange(1300) == 1)
                {
                    if (unit.GetSpellDamage(Player, args.SData.Name) >= Player.Health || (unit.GetAutoAttackDamage(Player) >= Player.Health && args.SData.IsAutoAttack()))
                    {
                        WoogletsWitchcap.Cast();
                        return;
                    }
                }

            }

            double InterruptOn = SpellToInterrupt(args.SData.Name);
            if (Config.Item(unit.BaseSkinName + "INT").GetValue<bool>() && Config.Item("Cassiopeia.InterruptSpells").GetValue<bool>() && unit.Team != ObjectManager.Player.Team && InterruptOn >= 0f && unit.IsValidTarget(R.Range))
            {
                if (R.IsReady() && Player.Mana > RMANA && Player.Distance(unit) < R.Range - 50 && unit.IsFacing(Player))
                {
                    R.CastIfHitchanceEquals(unit, HitChance.High, true);
                }
            }

            if (Config.Item("Cassiopeia.HarassActive").GetValue<KeyBind>().Active || Config.Item("Cassiopeia.HarassActiveT").GetValue<KeyBind>().Active)
            {
                if (Config.Item("Cassiopeia.AutoQWhenEnemyCastHarass").GetValue<bool>() && Player.ManaPercent >= Config.Item("Cassiopeia.QEnemyAttackMiniManaHarass").GetValue<Slider>().Value && (unit.IsValid<Obj_AI_Hero>() && !unit.IsValid<Obj_AI_Turret>()) && unit.IsEnemy && args.Target.IsMe && Q.IsReady() && Player.Distance(unit) <= Q.Range)
                {
                    Q.CastIfHitchanceEquals(unit, HitChance.High, true);
                }

                if (Config.Item("Cassiopeia.AutoWWhenEnemyCastHarass").GetValue<bool>() && Player.ManaPercent >= Config.Item("Cassiopeia.WEnemyAttackMiniManaHarass").GetValue<Slider>().Value && (unit.IsValid<Obj_AI_Hero>() && !unit.IsValid<Obj_AI_Turret>()) && unit.IsEnemy && args.Target.IsMe && W.IsReady() && Player.Distance(unit) <= W.Range)
                {
                    W.CastIfHitchanceEquals(unit, HitChance.High, true);
                }
            }

            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            var useQ = Config.Item("Cassiopeia.UseQCombo").GetValue<bool>();
            var useW = Config.Item("Cassiopeia.UseWCombo").GetValue<bool>();

            if (unit.NetworkId == target.NetworkId)
            {
                if (useQ && Q.IsReady() && Player.Mana >= QMANA)
                {
                    if (unit.BaseSkinName.Equals("Katarina", StringComparison.CurrentCultureIgnoreCase) || unit.BaseSkinName.Equals("Talon", StringComparison.CurrentCultureIgnoreCase) || unit.BaseSkinName.Equals("Zed", StringComparison.CurrentCultureIgnoreCase))
                    {

                        if (args.Target.IsMe && (args.SData.Name.Contains("KatarinaE") || args.SData.Name.Contains("TalonCutthroat") || args.SData.Name.Contains("zedult")))
                        {
//.........这里部分代码省略.........
开发者ID:0s0speedy,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs

示例6: MainCombo

    public static void MainCombo(Obj_AI_Base target)
    {
        if (InMisayaCombo)
            Console.WriteLine(Player.Distance(target));

        if (Environment.TickCount > MisayaTick + 1000)
        {
            InMisayaCombo = false;
            CheckFlag = false;
        }

        if (_r.IsReady() && Player.Distance(target) <= _r.Range)
        {

            if (_q.IsReady() && Player.Mana > Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost + Player.Spellbook.GetSpell(SpellSlot.R).ManaCost)
            {
                if (Player.Distance(target) > 500)
                {
                    Console.WriteLine("First R Cast");
                    _r.Cast(target, Config.Item("Packet Casting").GetValue<bool>());

                    for (var i = 0; i < 150; i++)
                    {
                        if(_q.IsReady())
                            _q.Cast(target, Config.Item("Packet Casting").GetValue<bool>());
                        if (!_q.IsReady())
                            Console.WriteLine("Not Ready");
                    }

                    InMisayaCombo = true;
                    MisayaTick = Environment.TickCount;
                }
                else
                {
                    _q.Cast(target.Position, Config.Item("Packet Casting").GetValue<bool>());
                    MisayaTick = Environment.TickCount;
                    CheckFlag = true;
                }
            }
            else if (_r.IsReady() && Player.Spellbook.GetSpell(SpellSlot.Q).CooldownExpires - Game.Time >= 0.6 && Config.Item("Combo-Double-R").GetValue<bool>())
            {
                Console.WriteLine("Second R Cast");
                _r.Cast(target, Config.Item("Packet Casting").GetValue<bool>());
            }

            if (CheckFlag && _r.IsReady() && target.HasBuff("dianamoonlight", true))
            {
                _r.Cast(target, Config.Item("Packet Casting").GetValue<bool>());
                CheckFlag = false;
            }
        }
        if (_q.IsReady())
        {
            if (InMisayaCombo && Player.Distance(target) <= 500)
            {
                Console.WriteLine("hit");
                _q.Cast(target, Config.Item("Packet Casting").GetValue<bool>());
                InMisayaCombo = false;
            }
            else if ((_q.GetDamage(target) - 10 >= target.Health && Player.Distance(target) <= _q.Range - 10 && Player.Distance(target) >= 125) || //If you can kill target with Q OR
                           (!_r.IsReady() && //If R isn't ready AND
                      ((Player.Distance(target) > 450 && Player.Spellbook.GetSpell(SpellSlot.R).CooldownExpires - Game.Time > Player.Spellbook.GetSpell(SpellSlot.Q).Cooldown - 0.7) || //If R will not be ready by the time your Q will be available OR
                      ((Player.Spellbook.GetSpell(SpellSlot.R).CooldownExpires - Game.Time) * 1.5 > Player.Spellbook.GetSpell(SpellSlot.Q).Cooldown) || Player.Spellbook.GetSpell(SpellSlot.R).State != SpellState.Ready)))
            { //If R won't be ready for a while
                _q.Cast(target, Config.Item("Packet Casting").GetValue<bool>());
            }
        }
        if (Config.Item("Combo-Use-E").GetValue<bool>() && _e.IsReady() && Player.Distance(target) < _e.Range - 15 && Player.Distance(target) > 165 && target.IsFacing(Player))
            _e.Cast();
        if (Config.Item("Combo-Use-W").GetValue<bool>() && _w.IsReady() && Player.Distance(target) < _w.Range)
            _w.Cast();
    }
开发者ID:zjian1013,项目名称:LeagueSharpFlapperDoodlez,代码行数:72,代码来源:Program.cs

示例7: ComboMode

        private void ComboMode(Obj_AI_Base target)
        {
            var UseQ = (Q.IsReady() && Settings.UseQ);
            var UseW = (W.IsReady() && Settings.UseW);
            var UseE = (E.IsReady() && Settings.UseE);
            var UseR = (R.IsReady() && Settings.UseR);

            var UseZhonya = (Settings.UseZhonya && ItemManager.Zhonya.IsOwned() && ItemManager.Zhonya.IsReady());

            switch (Settings.ComboSettings)
            {
                case "Gap Closer":
                    if (UseR && !target.IsZombie)
                    {
                        if (!target.IsFacing(Player.Instance))
                        {
                            if (Player.Instance.Distance(target.Position) < (R.Range - target.MoveSpeed) - (165))
                                SpellManager.CastR(target, Settings.RMode);
                        }
                        else
                        {
                            if (Player.Instance.Distance(target.Position) <= (R.Range - 200))
                                SpellManager.CastR(target, Settings.RMode);
                        }
                    }
                    if (Settings.UseHexTech || Settings.UseCutlassBOTRK)
                        ItemManager.UseCastables(target);

                    if (UseQ) Q.Cast(target);

                    if (UseW && Player.Instance.Distance(target.Position) <= 540) W.Cast();

                    if (Settings.UseTiamatHydra)
                        ItemManager.useHydra(target);
                    break;

                case "On Dash":
                    if (!target.IsZombie && UseR && Player.Instance.Distance(target.Position) <= 550)
                    {
                        if (Settings.UseHexTech || Settings.UseCutlassBOTRK)
                            ItemManager.UseCastables(target);
                        if (Settings.UseQ && Q.IsReady() && Player.Instance.Distance(target.Position) <= Q.Range)
                        {
                            if (Settings.UseR && R.IsReady())
                                SpellManager.CastR(target, Settings.RMode);

                            Q.Cast(target);
                        }
                        if (Settings.UseW && W.IsReady() && Player.Instance.Distance(target.Position) <= 540)
                            W.Cast();

                        if (Settings.UseTiamatHydra)
                            ItemManager.useHydra(target);
                    }
                    break;

                case "After Dash":
                    if (!target.IsZombie && UseR)
                    {
                        if (UseW && Player.Instance.Distance(target.Position) <= 540)
                            W.Cast();

                        if (Settings.UseHexTech || Settings.UseCutlassBOTRK)
                            ItemManager.UseCastables(target);

                        if (UseQ && Player.Instance.Distance(target.Position) <= Q.Range)
                        {
                            Q.Cast(target);
                            Core.DelayAction(() =>
                                {
                                    if (UseR)
                                        SpellManager.CastR(target, Settings.RMode);
                                }, (540 - Game.Ping));
                        }

                        if (Settings.UseTiamatHydra)
                            ItemManager.useHydra(target);
                    }
                    break;

                case "Real On Dash":
                    if (!target.IsZombie && UseR && Player.Instance.Distance(target.Position) <= 550)
                    {
                        if (Settings.UseHexTech || Settings.UseCutlassBOTRK)
                            ItemManager.UseCastables(target);

                        if (UseQ) Q.Cast(target);

                        if (UseR)
                        {
                            if (Player.Instance.Distance(target.Position) <= 380)
                            {
                                Core.DelayAction(() =>
                                    {
                                        SpellManager.CastR(target, Settings.RMode);
                                    }, (500 - Game.Ping));
                            }
                            else
                                SpellManager.CastR(target, Settings.RMode);
                        }
//.........这里部分代码省略.........
开发者ID:JokerArtLoL,项目名称:EloBuddyAddons,代码行数:101,代码来源:Combo.cs

示例8: CalcComboDamage

        private float CalcComboDamage(Obj_AI_Base target, bool q, bool w, bool e, bool r)
        {
            try
            {
                var manaCost = (w && W.IsReady() ? W.Instance.ManaCost : (q ? Q.Instance.ManaCost : 0)) * 2;
                var damage = (w && W.IsReady() ? W.GetDamage(target) : (q ? Q.GetDamage(target) : 0)) * 2;

                if (e)
                {
                    var eMana = E.Instance.ManaCost;
                    var eDamage = E.GetDamage(target);
                    var count = target.IsNearTurret() && !target.IsFacing(Player) ||
                                target.IsNearTurret() && Player.HealthPercent <= 35 || !R.IsReady()
                        ? 5
                        : 10;
                    for (var i = 0; i < count; i++)
                    {
                        if (manaCost + eMana > Player.Mana)
                        {
                            break;
                        }
                        manaCost += eMana;
                        damage += eDamage;
                    }
                }
                if (r)
                {
                    if (manaCost + R.Instance.ManaCost - 10 > Player.Mana)
                    {
                        return damage;
                    }
                    return damage + (R.IsReady() ? R.GetDamage(target) : 0);
                }
                return damage;
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return 0;
        }
开发者ID:lukasi273,项目名称:SFX-5.12-update,代码行数:41,代码来源:Cassiopeia.cs

示例9: IsBothFacing

 /// <summary>
 ///     Calculates if the source and the target are facing each-other.
 /// </summary>
 /// <param name="source">Extended source</param>
 /// <param name="target">The Target</param>
 /// <returns>Returns if the source and target are facing each-other (boolean)</returns>
 public static bool IsBothFacing(this Obj_AI_Base source, Obj_AI_Base target)
 {
     return source.IsFacing(target) && target.IsFacing(source);
 }
开发者ID:Gilbertobal,项目名称:LeagueSharp.SDK,代码行数:10,代码来源:Unit.cs

示例10: orbwalkerGoodPos

 public Vector3 orbwalkerGoodPos(Obj_AI_Base target)
 {
     var aRc = new Util.Circle(Player.Instance.ServerPosition.To2D(), 350).ToClipperPath();
     var cursorPos = Game.CursorPos;
     var targetPosition = target.ServerPosition;
     var pList = new List<Vector3>();
     var additionalDistance = (0.106 + Game.Ping / 2000f) * target.MoveSpeed;
     foreach (var v3 in aRc.Select(p => new Vector2(p.X, p.Y).To3D()))
     {
         if (target.IsFacing(Player.Instance))
         {
             if (v3.Distance(targetPosition) < 350) pList.Add(v3);
         }
         else
         {
             if (v3.Distance(targetPosition) < 350 - additionalDistance) pList.Add(v3);
         }
     }
     return pList.Count > 1 ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero;
 }
开发者ID:himrengod,项目名称:Elobuddy-1,代码行数:20,代码来源:Darius.cs

示例11: InterrupterOnOnInterruptableSpell

        private static void InterrupterOnOnInterruptableSpell(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs interruptableSpellEventArgs)
        {
            if (!R.Instance.IsReady ||
                interruptableSpellEventArgs.DangerLevel < (DangerLevel)OtherCassioMenu["cassioplus.other.interrupterlevel"].Cast<Slider>().CurrentValue ||
                !OtherCassioMenu["cassioplus.other.interrupter"].Cast<CheckBox>().CurrentValue || !sender.IsFacing(Player.Instance))
            {
                return;
            }

            R.Cast(sender);
        }
开发者ID:hanifzarina,项目名称:EloBuddy,代码行数:11,代码来源:Cassiopeia.cs

示例12: Obj_AI_Base_OnProcessSpellCast2

        private static void Obj_AI_Base_OnProcessSpellCast2(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender == null || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
               return;
            }
            CurrentTarget = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            if (!sender.IsFacing(Player.Instance) && sender == CurrentTarget && !sender.IsDashing() && sender.Type == GameObjectType.AIHeroClient && sender.IsValidTarget(Q.Range) && Q.IsReady() && sender.IsEnemy)
            {

                {
                    Q.Cast(sender);
                }

            }
        }
开发者ID:FireBuddy,项目名称:karthus,代码行数:16,代码来源:Program.cs


注:本文中的Obj_AI_Base.IsFacing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。