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


C# AIHeroClient.GetBuffCount方法代码示例

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


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

示例1: FindTumblePosition

        public static Vector3 FindTumblePosition(AIHeroClient target)
        {
            if (Program.Only2W && target.GetBuffCount("vaynesilvereddebuff") == 1)
                // == 1 cuz calling this after attack which is aa missile still flying
                return Vector3.Zero;

            if (Program.Wall)
            {
                var outRadius = ObjectManager.Player.BoundingRadius/(float) Math.Cos(2*Math.PI/8);

                for (var i = 1; i <= 8; i++)
                {
                    var angle = i*2*Math.PI/8;
                    var x = ObjectManager.Player.Position.X + outRadius*(float) Math.Cos(angle);
                    var y = ObjectManager.Player.Position.Y + outRadius*(float) Math.Sin(angle);
                    var colFlags = NavMesh.GetCollisionFlags(x, y);
                    if (colFlags.HasFlag(CollisionFlags.Wall) || colFlags.HasFlag(CollisionFlags.Building))
                        return new Vector3(x, y, 0);
                }
            }

            if (Program.sacMode == 0)
            {
                var vec = target.ServerPosition;

                if (target.Path.Length > 0)
                {
                    if (ObjectManager.Player.LSDistance(vec) < ObjectManager.Player.LSDistance(target.Path.Last()))
                        return IsSafe(target, Game.CursorPos);
                    return IsSafe(target,
                        Game.CursorPos.LSTo2D()
                            .LSRotated(
                                Geometry.DegreeToRadian(
                                    (vec - ObjectManager.Player.ServerPosition).LSTo2D()
                                        .LSAngleBetween((Game.CursorPos - ObjectManager.Player.ServerPosition).LSTo2D())%
                                    90))
                            .To3D());
                }
                if (target.IsMelee)
                    return IsSafe(target, Game.CursorPos);

                return IsSafe(target,
                    ObjectManager.Player.ServerPosition +
                    (target.ServerPosition - ObjectManager.Player.ServerPosition).LSNormalized()
                        .LSTo2D()
                        .LSRotated(
                            Geometry.DegreeToRadian(90 -
                                                    (vec - ObjectManager.Player.ServerPosition).LSTo2D()
                                                        .LSAngleBetween(
                                                            (Game.CursorPos - ObjectManager.Player.ServerPosition).LSTo2D())))
                        .To3D()*300f);
            }
            if (Program.sacMode == 1)
            {
                return Game.CursorPos;
            }

            return Game.CursorPos;
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:59,代码来源:Tumble.cs

示例2: PossibleDamage

        public static double PossibleDamage(AIHeroClient target)
        {
            var damage = 0d;
            var targetMaxHealth = target.MaxHealth;

            var silverBoltDmg = (new[] { 0, targetMaxHealth / 4, targetMaxHealth / 5, targetMaxHealth / 6, targetMaxHealth / 7, targetMaxHealth / 8 }[Player.Instance.Spellbook.GetSpell(SpellSlot.W).Level]);

            if (target.GetBuffCount("vaynesilvereddebuff") == 2) damage += silverBoltDmg;

            return damage;
        }
开发者ID:swanton2,项目名称:Elobuddy,代码行数:11,代码来源:Vayne.cs

示例3: DmgCalc

 public static float DmgCalc(AIHeroClient target)
 {
     var damage = 0f;
     if (Program.E.IsReady() && target.IsValidTarget(2000))
         if (!target.HasBuff("TristanaECharge"))
         {
             damage += ECalc(target);
         }
     if (target.HasBuff("TristanaECharge") && target.IsValidTarget(2000))
     {
        damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
     }
     if (Program.R.IsReady() && target.IsValidTarget(Program.R.Range))
         damage += RCalc(target);
     return damage;
 }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例4: ECharge

 //E
 public static float ECharge(AIHeroClient target)
 {
     var damage = 0f;
     if (Program.E.IsReady() && target.IsValidTarget(Program.E.Range))
         if (!target.HasBuff("TristanaECharge"))
         {
             damage += ECalc(target);
         }
         else
         {
             damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
         }
     //if (Program.E.IsReady() && target.IsValidTarget(Program.E.Range) && target.HasBuff("TristanaECharge"))
         //damage += ECalc(target) + ECalc(target) * (target.GetBuffCount("TristanaECharge") * 30f);
     damage += _Player.GetAutoAttackDamage(target, true) * 2;
     return damage;
 }
开发者ID:,项目名称:,代码行数:18,代码来源:

示例5: handleWEnemyHero

        private void handleWEnemyHero(AIHeroClient target)
        {
            if (target.GetBuffCount("TahmKenchPDebuffCounter") == 3 && !CombatHelper.CheckCriticalBuffs(target) &&
                !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Snare) && !Q.CanCast(target) &&
                !justQ && !Program.IncDamages.GetEnemyData(target.NetworkId).IncSkillShot)
            {
                PortAIO.OrbwalkerManager.SetMovement(false);
                if (Game.CursorPos.LSDistance(target.Position) < 300)
                {
                    Player.IssueOrder(GameObjectOrder.MoveTo, target.Position.LSExtend(player.Position, 100));
                }

                lastWtarget = Team.Enemy;
                W.CastOnUnit(target);
            }
        }
开发者ID:,项目名称:,代码行数:16,代码来源:

示例6: handeQ

 private void handeQ(AIHeroClient target, HitChance hitChance)
 {
     if (player.LSDistance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !Orbwalker.CanAutoAttack &&
         target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
     {
         Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
     }
     else if (player.LSDistance(target) > Orbwalking.GetRealAutoAttackRange(target))
     {
         Q.CastIfHitchanceEquals(target, hitChance, getCheckBoxItem(config, "packets"));
     }
 }
开发者ID:,项目名称:,代码行数:12,代码来源:

示例7: Contains

        public static bool Contains(AIHeroClient unit, GameObjectProcessSpellCastEventArgs args)
        {
            var name = unit.ChampionName;
            var slot = args.Slot.Equals(48) ? SpellSlot.R : args.Slot;

            if (args.SData.Name.Equals("KalistaRAllyDash") && Program.blocking["Oathsworn"].Cast<CheckBox>().CurrentValue)
            {
                return true;
            }
            var spells = new List<BlockedSpell>();
            BlockedSpells.TryGetValue(name, out spells);

            if (spells == null || spells.Count == 0)
            {
                return false;
            }

            foreach (var spell in
                spells)
            {
                var item = Program.blocking[name + spell.MenuName];
                if (item == null || !item.Cast<CheckBox>().CurrentValue)
                {
                    continue;
                }

                if (!spell.PassesModelCondition(unit))
                {
                    continue;
                }

                if (!spell.PassesSpellCondition(args.SData.Name))
                {
                    continue;
                }

                if (!spell.PassesBuffCondition(unit))
                {
                    continue;
                }

                if (!spell.PassesSlotCondition(args.Slot))
                {
                    continue;
                }

                if (spell.IsAutoAttack)
                {
                    if (spell.SpellName.Equals("-1"))
                    {
                        Console.WriteLine(args.SData.Name);
                    }

                    var condition = true;

                    if (unit.ChampionName.Equals("Gnar"))
                    {
                        var buff = ObjectManager.Player.Buffs.FirstOrDefault(b => b.Name.Equals("gnarwproc"));
                        condition = buff != null && buff.Count == 2;
                    }
                    else if (unit.ChampionName.Equals("Rengar"))
                    {
                        condition = unit.Mana.Equals(5);
                    }

                    if (condition)
                    {
                        return true;
                    }

                    continue;
                }

                if (name.Equals("Riven") && args.SData.Name == "RivenTriCleave")
                {
                    return unit.GetBuffCount("RivenTriCleave").Equals(2);
                }

                return true;
            }

            return false;
        }
开发者ID:Toyota7,项目名称:EloBuddy,代码行数:83,代码来源:Spellblock.cs

示例8: GetStacks

        private static int GetStacks(AIHeroClient target)
        {
            if (IsBlazed(target)) return target.GetBuffCount("BrandAblaze");

            return 0;
        }
开发者ID:Toyota7,项目名称:EloBuddy,代码行数:6,代码来源:Program.cs

示例9: PassiveFlatMod

        /// <summary>
        ///     Calculates mastery passives
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        /// <returns></returns>
        private static float PassiveFlatMod(AIHeroClient source, Obj_AI_Base target)
        {
            var value = 0f;

            //Offensive masteries:

            //Fervor of Battle: STACKTIVATE Your basic attacks and spells give you stacks of Fervor for 5 seconds, stacking 10 times. Each stack of Fervor adds 1-8 bonus physical damage to your basic attacks against champions, based on your level.
            if (target.Type == GameObjectType.AIHeroClient)
            {
                var Fervor =
                    ObjectManager.Player.Masteries.FirstOrDefault(
                        p => p.Page == MasteryPage.Ferocity && p.Id == (int) Ferocity.FervorofBattle);
                if (Fervor != null && Fervor.Points >= 1)
                    value += (0.9f + source.Level*0.42f)*source.GetBuffCount("MasteryOnHitDamageStacker");
            }

            // Defensive masteries:

            //Tough Skin DIRT OFF YOUR SHOULDERS You take 2 less damage from champion and monster basic attacks
            if (target.Type == GameObjectType.AIHeroClient)
            {
                var Toughskin =
                    ObjectManager.Player.Masteries.FirstOrDefault(
                        p => p.Page == MasteryPage.Resolve && p.Id == (int) Resolve.ToughSkin);
                if (Toughskin != null && Toughskin.Points >= 1)
                    value -= 2;
            }

            return value;
        }
开发者ID:CONANLXF,项目名称:AIO,代码行数:36,代码来源:AutoAttack.cs

示例10: GetRDamage

 public static float GetRDamage(AIHeroClient target)
 {
     return (float) (Variables.R.GetDamage(target)*(1 + 0.20*target.GetBuffCount("dariushemo")));
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:4,代码来源:Damage.cs


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