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


C# Obj_AI_Hero.CountAlliesInRange方法代码示例

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


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

示例1: CanR

        internal static bool CanR(Obj_AI_Hero unit)
        {
            if (Me.HealthPercent <= 35 && unit.Distance(Me.ServerPosition) <= Me.AttackRange + 65)
            {
                return true;
            }

            if (unit.IsZombie || TargetSelector.IsInvulnerable(unit, TargetSelector.DamageType.Physical))
            {
                return false;
            }

            if (unit.CountAlliesInRange(400) >= 2 &&
                Me.GetAutoAttackDamage(unit, true) * 6 >= unit.Health)
            {
                return false;
            }

            if (Orbwalking.InAutoAttackRange(unit) &&
                Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
            {
                return false;
            }

            if (Buckshot.IsReady() && unit.Distance(Me.ServerPosition) <= Buckshot.Range &&
                Buckshot.GetDamage(unit) >= unit.Health)
            {
                return false;
            }

            if (Quickdraw.IsReady() && unit.Distance(Me.ServerPosition) <= Quickdraw.Range + 25 &&
                Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
            {
                return false;
            }

            return true;
        }
开发者ID:Jilhano,项目名称:KurisuSolutions,代码行数:38,代码来源:Program.cs

示例2: GetRealDmg

 public static float GetRealDmg(Spell QWER, Obj_AI_Hero target)
 {
     if (Orbwalking.InAutoAttackRange(target) || target.CountAlliesInRange(300) > 0)
         return QWER.GetDamage(target) + (float)ObjectManager.Player.GetAutoAttackDamage(target) * 2;
     else
         return QWER.GetDamage(target);
 }
开发者ID:ngothaison,项目名称:HuyNKSDK,代码行数:7,代码来源:Program.cs

示例3: Interrupter2_OnInterruptableTarget

 private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.CanCast(sender))
     {
         if (Player.CountAlliesInRange(E.Range + 50) < sender.CountAlliesInRange(E.Range + 50))
         {
             E.Cast(sender);
         }
         else
         {
             E.CastToReverse(sender);
         }
     }
     if (Q.CanCast(sender) && SpellQ.GetState()== QState.ThreshQ)
     {
         Q.Cast(sender);
     }
 }
开发者ID:VivianGit,项目名称:LeagueSharp,代码行数:18,代码来源:Thresh.cs

示例4: GravesOnUpdate

        internal static void GravesOnUpdate(EventArgs args)
        {
            Target = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                GravesCombo();

            if (MainMenu.Item("autosmoke").GetValue<bool>() && Smokescreen.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Smokescreen.Range)))
                {
                    if (!Me.IsWindingUp && Utils.GameTimeTickCount - LE > 1100)
                        Smokescreen.CastIfHitchanceEquals(hero, HitChance.Immobile);
                }
            }

            if (MainMenu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                if (Utils.GameTimeTickCount - LM >= 100)
                {
                    Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    LM = Utils.GameTimeTickCount;
                }

                if (Smokescreen.IsReady() && Target.IsValidTarget(Smokescreen.Range))
                    Smokescreen.CastIfHitchanceEquals(Target, HitChance.Medium);

                else if (Quickdraw.IsReady())
                {
                    if (Utils.GameTimeTickCount - LE > 500)
                        Quickdraw.Cast(Game.CursorPos);
                }
            }

            if (MainMenu.Item("allin").GetValue<KeyBind>().Active)
            {
                if (!Me.Spellbook.IsCastingSpell)
                     Orbwalking.Orbwalk(Target, Game.CursorPos);

                if (Target.IsValidTarget(Chargeshot.Range))
                {
                    var rpred = Prediction.GetPrediction(Target, 0.25f).UnitPosition;
                    if (rpred.Distance(Me.ServerPosition) <= Quickdraw.Range + 200)
                    {
                        if (Chargeshot.IsReady() && Quickdraw.IsReady() && Buckshot.IsReady())
                        {
                            Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
                        }
                    }
                }
            }

            if (Target.IsValidTarget() && Chargeshot.IsReady())
            {
                if (MainMenu.Item("shootr").GetValue<KeyBind>().Active)
                    Chargeshot.CastIfHitchanceEquals(Target, HitChance.VeryHigh);

                if (MainMenu.Item("usercombo").GetValue<bool>())
                {
                    if (Proj1(Target.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
                        MainMenu.Item("rmulti").GetValue<Slider>().Value)
                    {
                        if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
                        {
                            if (Target.CountAlliesInRange(750) >= 2)
                                Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
                        }
                    }
                }
            }

            if (Chargeshot.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Chargeshot.Range)))
                {
                    if (CanR(hero) && GetRDamage(hero) >= hero.Health && MainMenu.Item("secure").GetValue<bool>())
                    {
                        Chargeshot.CastIfHitchanceEquals(hero, HitChance.High);
                    }
                }
            }
        }
开发者ID:Jilhano,项目名称:KurisuSolutions,代码行数:82,代码来源:Program.cs

示例5: GravesOnUpdate

        static void GravesOnUpdate(EventArgs args)
        {
            var user = mainMenu.Item("usercombo").GetValue<bool>();
            rtarget = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);

            if (rtarget.IsValidTarget() && Chargeshot.IsReady())
            {
                if (Kappa(rtarget.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
                    mainMenu.Item("rmulti").GetValue<Slider>().Value)
                {
                    if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
                    {
                        if (rtarget.CountAlliesInRange(700) >= 2)
                            Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.Medium);
                    }
                }
            }

            if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
                GravesCombo();

            if (mainMenu.Item("fleekey").GetValue<KeyBind>().Active)
            {
                if (!Me.IsImmovable)
                    Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

                if (Smokescreen.IsReady() && rtarget.IsValidTarget(Smokescreen.Range))
                    Smokescreen.CastIfHitchanceEquals(rtarget, HitChance.Medium);

                else if (Quickdraw.IsReady())
                {
                    if (Utils.GameTimeTickCount - LastE > 500)
                        Quickdraw.Cast(Game.CursorPos);
                }
            }

            if (GetRDamage(rtarget) >= rtarget.Health && user)
            {
                if (rtarget.Distance(Me.ServerPosition) <= Me.AttackRange &&
                    Me.GetAutoAttackDamage(rtarget, true) * 3 >= rtarget.Health)
                    return;

                Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.High);
            }
        }
开发者ID:bongy97,项目名称:KurisuSolutions,代码行数:45,代码来源:Program.cs


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