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


C# AIHeroClient类代码示例

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


AIHeroClient类属于命名空间,在下文中一共展示了AIHeroClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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,代码来源:


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