• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AIHeroClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetTarget

 public static void SetTarget(AIHeroClient hero)
 {
     if (!isEBActive)
     {
         LSTargetSelector.SetTarget(hero);
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:TSManager.cs


示例2: GetComboDamage

        public float GetComboDamage(AIHeroClient t)
        {
            var fComboDamage = 0f;

            if (Spells.Q.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.Q"))
            {
                fComboDamage += QDamage*(100/(100 + t.Armor));
            }

            if (Spells.W.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.W"))
            {
                fComboDamage += WDamage*(100/(100 + t.SpellBlock));
            }

            if (Spells.E.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.E"))
            {
                fComboDamage += WDamage*(100/(100 + t.Armor));
            }

            if (Spells.R.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.R"))
            {
                fComboDamage += ObjectManager.Player.GetSpellDamage(t, SpellSlot.R)*(100/(100 + t.SpellBlock));
            }

            if (PlayerSpells.IgniteSlot != SpellSlot.Unknown && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.I")
                && Utils.Player.Self.Spellbook.CanUseSpell(PlayerSpells.IgniteSlot) == SpellState.Ready)
            {
                fComboDamage += (float) Utils.Player.Self.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);
            }

            return fComboDamage;
        }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:32,代码来源:DamageCalc.cs


示例3: LaneClear

 public override void LaneClear(ComboProvider combo, AIHeroClient target)
 {
     var locationM =
         GetCircularFarmLocation(MinionManager.GetMinions(900 + 120, MinionTypes.All, MinionTeam.NotAlly));
     if (locationM.MinionsHit >= Program.getLaneMenuSL("MinWtargets"))
         Cast(locationM.Position);
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:BrandW.cs


示例4: GetTotalDmg

 public static float GetTotalDmg(AIHeroClient target)
 {
     var damage = Player.Instance.GetAutoAttackDamage(target);
     if (Q.IsReady())
         damage += _Player.GetSpellDamage(target, SpellSlot.Q);
     return damage;
 }
开发者ID:TristeMyth,项目名称:Triste,代码行数:7,代码来源:Spells.cs


示例5: Combo1

        private static void Combo1(AIHeroClient t)
        {
            if (SpellManager.E.IsReady() && t.IsInRange(Player.Instance.Position, SpellManager.E.Range) && ConfigList.Combo.ComboE)
            {
                var d = Dagger.GetClosestDagger();
                if (t.Position.IsInRange(d, SpellManager.W.Range)) SpellManager.E.CastE(Damage.GetBestDaggerPoint(d, t));
                else
                    if (Player.Instance.Distance(t) >= SpellManager.W.Range)
                    SpellManager.E.CastE(t.Position);
            }

            if (SpellManager.W.IsLearned && !SpellManager.W.IsOnCooldown && ConfigList.Combo.ComboW)
            {
                if (t.IsInRange(Player.Instance.Position, SpellManager.W.Range))
                    SpellManager.W.Cast();
            }

            if (SpellManager.Q.CanCast(t) && ConfigList.Combo.ComboQ)
            {
                SpellManager.Q.Cast(t);
            }

            if (SpellManager.R.IsLearned && !SpellManager.R.IsOnCooldown && ConfigList.Combo.ComboR)
            {
                if (Player.Instance.CountEnemyChampionsInRange(ConfigList.Combo.MaxRCastRange) < ConfigList.Combo.MinToUseR) return;
                if (Damage.GetQDamage(t) + Damage.GetPDamage(t) + Damage.GetEDamage(t) + Player.Instance.GetAutoAttackDamage(t, true) >= t.TotalShieldHealth()) return;
                if (Orbwalker.IsAutoAttacking && !Orbwalker.DisableAttacking)
                {
                    Orbwalker.DisableAttacking = true;
                    Orbwalker.ResetAutoAttack();
                }
                SpellManager.R.Cast();
                Damage.FreezePlayer();
            }
        }
开发者ID:,项目名称:,代码行数:35,代码来源:


示例6: Execute

 public override void Execute(AIHeroClient target)
 {
     if (!Provider.ShouldBeDead(target))
     {
         Cast(target, aoe: Program.getMiscMenuCB("aoeW"));
     }
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:BrandW.cs


示例7: ECast

        private static void ECast(AIHeroClient enemy)
        {
            var range = Orbwalking.GetRealAutoAttackRange(enemy);
            var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.LSTo2D(),
                Prediction.GetPrediction(enemy, 0.25f).UnitPosition.LSTo2D(), LucianSpells.E.Range, range);

            if (path.Count() > 0)
            {
                var epos = path.MinOrDefault(x => x.LSDistance(Game.CursorPos));
                if (epos.To3D().UnderTurret(true) || epos.To3D().LSIsWall())
                {
                    return;
                }

                if (epos.To3D().CountEnemiesInRange(LucianSpells.E.Range - 100) > 0)
                {
                    return;
                }
                LucianSpells.E.Cast(epos);
            }
            if (path.Count() == 0)
            {
                var epos = ObjectManager.Player.ServerPosition.LSExtend(enemy.ServerPosition, -LucianSpells.E.Range);
                if (epos.UnderTurret(true) || epos.LSIsWall())
                {
                    return;
                }

                // no intersection or target to close
                LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.LSExtend(enemy.ServerPosition,
                    -LucianSpells.E.Range));
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:33,代码来源:Program.cs


示例8: FioraPassive

        public FioraPassive(Obj_GeneralParticleEmitter emitter, AIHeroClient enemy)
            : base(emitter.Index, (uint)emitter.NetworkId, emitter as GameObject)
        {
            Target = enemy;

            if (emitter.Name.Contains("Base_R"))
            {
                Passive = PassiveType.UltPassive;
                Color = Color.White;
            }
            else if (emitter.Name.Contains("Warning"))
            {
                Passive = PassiveType.Prepassive;
                Color = Color.Blue;
            }
            else if (emitter.Name.Contains("Timeout"))
            {
                Passive = PassiveType.PassiveTimeout;
                Color = Color.Red;
            }
            else
            {
                Passive = PassiveType.Passive;
                Color = Color.Green;
            }
            PassiveDistance = Passive == PassiveType.UltPassive ? 400 : 200;
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:27,代码来源:PassiveManager.cs


示例9: OnGapcloser

 private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
 {
     if (sender.IsEnemy && sender.IsValidTarget(SpellManager.E.Range) && SpellManager.E.IsInRange(sender) && SpellManager.E.IsReady() && Config.Modes.Misc.UseEGC)
     {
         SpellManager.E.Cast(sender);
     }
 }
开发者ID:Enochen,项目名称:EloBuddy,代码行数:7,代码来源:ModeManager.cs


示例10: GetOptimizedCircleLocation

        /// <summary>
        /// Uses MEC to get the perfect position on Circle Skillshots
        /// </summary>
        /// <param name="spell">Give it a spell and it will do the rest of the logic for you</param>
        /// <param name="targetHero">If you give it a target it will look around that target for other targets but will always focus that target</param>
        /// <returns></returns>
        internal static OptimizedLocation? GetOptimizedCircleLocation(Spell.Skillshot spell,
            AIHeroClient targetHero = null)
        {
            if (targetHero != null)
            {
                if (!targetHero.IsValidTarget(spell.Range + spell.Radius))
                    return null;

                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(targetHero) < spell.Radius)
                        .Select(
                            champ =>
                                Prediction.Position.PredictUnitPosition(champ,
                                    ((int)Player.Instance.Distance(champ) / spell.Speed) + spell.CastDelay))
                        .ToList();
                return GetOptimizedCircleLocation(champs, spell.Width, spell.Range);
            }
            if (EntityManager.Heroes.Enemies.Any(e => e.Distance(Player.Instance) < spell.Radius + spell.Range))
            {
                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(Player.Instance) < spell.Radius + spell.Range)
                        .Select(
                            champ =>
                                Prediction.Position.PredictUnitPosition(champ,
                                    ((int)Player.Instance.Distance(champ) / spell.Speed) + spell.CastDelay)).ToList();

                return GetOptimizedCircleLocation(champs, spell.Width, spell.Range);
            }
            return null;
        }
开发者ID:newchild,项目名称:OKTRAIO,代码行数:36,代码来源:Geometry.cs


示例11: GetTotalDamage

        public static float GetTotalDamage(AIHeroClient target)
        {
            // Auto attack
            var damage = Player.Instance.GetAutoAttackDamage(target);

            // Q
            if (SpellManager.Q.IsReady())
            {
                damage += SpellManager.Q.GetRealDamage(target);
            }

            // W
            if (SpellManager.W.IsReady())
            {
                damage += SpellManager.W.GetRealDamage(target);
            }

            // E
            if (SpellManager.E.IsReady())
            {
                damage += SpellManager.E.GetRealDamage(target);
            }

            // R
            if (SpellManager.R.IsReady() || SpellManager.IsCastingUlt)
            {
                damage += SpellManager.R.GetRealDamage(target) * (SpellManager.IsCastingUlt ? SpellManager.ChargesRemaining : SpellManager.MaxCharges);
            }

            return damage;
        }
开发者ID:Hellsing,项目名称:EloBuddy-Addons,代码行数:31,代码来源:Damages.cs


示例12: CastOffensiveItems

 public static void CastOffensiveItems(AIHeroClient target)
 {
     foreach (var item in OffensiveItems.Where(i => i.IsReady() && target.IsValidTarget(i.Range)))
     {
         item.Cast(target);
     }
 }
开发者ID:chienhao10,项目名称:EloBuddy-1,代码行数:7,代码来源:ItemManager.cs


示例13: GetPrediction

 /// <summary>
 ///     Gets Prediction result
 /// </summary>
 /// <param name="target">Target for spell</param>
 /// <param name="radius">Spell radius</param>
 /// <param name="ringRadius">Ring radius</param>
 /// <param name="delay">Spell delay</param>
 /// <param name="missileSpeed">Spell missile speed</param>
 /// <param name="range">Spell range</param>
 /// <param name="collisionable">Spell collisionable</param>
 /// <returns>Prediction result as <see cref="Prediction.Result" /></returns>
 public static Prediction.Result GetPrediction(AIHeroClient target, float radius, float ringRadius, float delay,
     float missileSpeed, float range, bool collisionable)
 {
     return GetPrediction(target, radius, ringRadius, delay, missileSpeed, range, collisionable,
         target.GetWaypoints(), target.AvgMovChangeTime(), target.LastMovChangeTime(), target.AvgPathLenght(),
         ObjectManager.Player.ServerPosition.LSTo2D(), ObjectManager.Player.ServerPosition.LSTo2D());
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:18,代码来源:RingPrediction.cs


示例14: SummonerItems

 public SummonerItems(AIHeroClient myHero)
 {
     player = myHero;
     sumBook = player.Spellbook;
     ignite = player.GetSpellSlot("summonerdot");
     smite = player.GetSpellSlot("SummonerSmite");
 }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:7,代码来源:SummonerItems.cs


示例15: OnGapcloser

        private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            if (!sender.IsEnemy) return;

            if (Return.UseRGapclose && Spells.R.IsReady() && sender.IsValidTarget(Spells.R.Range))
                Spells.R.Cast(sender);
        }
开发者ID:,项目名称:,代码行数:7,代码来源:


示例16: dangerousSpell

 private static bool dangerousSpell(SpellData spellData, AIHeroClient sender)
 {
     var slot = sender.GetSpellSlotFromName(spellData.Name);
     var enemies = EntityManager.Heroes.Enemies;
     int j2 = 0;
     for (int j = 0; j < enemies.Count(); j++)
     {
         if (sender.NetworkId == enemies[j].NetworkId)
         {
             j2 = j;
             break;
         }
     }
     int i = 0;
     switch (slot)
     {
         case SpellSlot.Q:
             i = 0;
             break;
         case SpellSlot.W:
             i = 1;
             break;
         case SpellSlot.E:
             i = 2;
             break;
         case SpellSlot.R:
             i = 3;
             break;
     }
     if (Settings._skills[j2 * 4 + i].CurrentValue)
         return true;
     return false;
 }
开发者ID:kzashy,项目名称:eBuddy,代码行数:33,代码来源:SaveMe.cs


示例17: GetTotalDamage

        public static float GetTotalDamage(AIHeroClient target)
        {
            // Auto attack
            var damage = Program.Player.GetAutoAttackDamage(target);

            // Q
            if (Program.Q.IsReady())
            {
                damage += Program.Q.GetRealDamage(target);
            }

            // W
            if (Program.W.IsReady())
            {
                damage += Program.W.GetRealDamage(target);
            }

            // E
            if (Program.E.IsReady())
            {
                damage += Program.E.GetRealDamage(target);
            }

            // R
            if (Program.R.IsReady())
            {
                damage += Program.R.GetRealDamage(target);
            }

            return damage;
        }
开发者ID:FireBuddy,项目名称:EloBuddy-2,代码行数:31,代码来源:SpellDamage.cs


示例18: Gapcloser_OnGapcloser

 private static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
 {
     if (sender.IsEnemy && sender.IsValidTarget(E.Range) && sender != null && e != null)
     {
         E.Cast(sender);
     }
 }
开发者ID:Enochen,项目名称:AIBot,代码行数:7,代码来源:Caitlyn.cs


示例19: HasSpellShield

        public static bool HasSpellShield(AIHeroClient unit)
        {
            if (ObjectManager.Player.HasBuffOfType(BuffType.SpellShield))
            {
                return true;
            }

            if (ObjectManager.Player.HasBuffOfType(BuffType.SpellImmunity))
            {
                return true;
            }

            //TODO:
            ////Sivir E
            //if (unit.LastCastedSpellName() == "SivirE" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}

            ////Morganas E
            //if (unit.LastCastedSpellName() == "BlackShield" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}

            ////Nocturnes E
            //if (unit.LastCastedSpellName() == "NocturneShit" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}
            return false;
        }
开发者ID:giaanthunder,项目名称:EloBuddy,代码行数:32,代码来源:Situation.cs


示例20: GetDamage

 public override float GetDamage(AIHeroClient enemy)
 {
     var baseDamage = base.GetDamage(enemy);
     return enemy.HasBuff("brandablaze") || _brandE.CanBeCast() && enemy.LSDistance(ObjectManager.Player) < 650
         ? baseDamage*1.25f
         : baseDamage;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:7,代码来源:BrandW.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AIState类代码示例发布时间:2022-05-24
下一篇:
C# AI类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap