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


C# Obj_AI_Base.HasBuffOfType方法代码示例

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


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

示例1: IsImmobile

 /// <summary>
 ///     Gets a value indicating whether a determined champion can move or not.
 /// </summary>
 public static bool IsImmobile(Obj_AI_Base target)
 {
     if (target is Obj_AI_Minion ||
         target is Obj_AI_Turret)
     {
         return target.HasBuff("teleport_target");
     }
     else if (target is AIHeroClient)
     {
         return 
             target.HasBuff("rebirth") ||
             target.HasBuff("zhonyasringshield") ||
             target.MoveSpeed < 150 ||
             (target as AIHeroClient).LSIsRecalling() ||
             (target as AIHeroClient).IsCastingInterruptableSpell() ||
             IsValidStun(target as AIHeroClient) ||
             IsValidSnare(target as AIHeroClient) ||
             target.HasBuffOfType(BuffType.Flee) ||
             target.HasBuffOfType(BuffType.Taunt) ||
             target.HasBuffOfType(BuffType.Charm) ||
             target.HasBuffOfType(BuffType.Knockup) ||
             target.HasBuffOfType(BuffType.Suppression);
     }
     
     return false;
 }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:29,代码来源:Bools.cs

示例2: HasDebuff

 protected static bool HasDebuff(Obj_AI_Base target)
 {
     return target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) ||
            target.HasBuffOfType(BuffType.Poison) || target.HasBuffOfType(BuffType.Polymorph) ||
            target.HasBuffOfType(BuffType.Silence) || target.HasBuffOfType(BuffType.Sleep) ||
            target.HasBuffOfType(BuffType.Slow) || target.HasBuffOfType(BuffType.Snare) ||
            target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Taunt);
 }
开发者ID:FireBuddy,项目名称:elobuddy,代码行数:8,代码来源:ModeBase.cs

示例3: IsStunned

        public static bool IsStunned(Obj_AI_Base target)
        {
            if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) ||
                target.HasBuffOfType(BuffType.Suppression) || target.HasBuffOfType(BuffType.Taunt))
                return true;

            return false;
        }
开发者ID:leenam0910,项目名称:LSharp,代码行数:8,代码来源:Util.cs

示例4: CanKill

 public static bool CanKill(Obj_AI_Base e)
 {
     if (e.HasBuffOfType(BuffType.PhysicalImmunity) || e.HasBuffOfType(BuffType.SpellImmunity) || e.IsZombie
          || e.IsInvulnerable || e.HasBuffOfType(BuffType.Invulnerability) || e.HasBuffOfType(BuffType.SpellShield)
          || e.HasBuff("deathdefiedbuff") || e.HasBuff("Undying Rage") || e.HasBuff("Chrono Shift"))
     {
         return false;
     }
     else
     {
         return true;
     }
 }
开发者ID:CjShu,项目名称:L-CC,代码行数:13,代码来源:Heroe.cs

示例5: Cast

        /// <summary>
        /// Casts R Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast() || !target.Valid(R.Range)) return;

            if (Player.Instance.IsInAutoAttackRange(target) && Player.Instance.GetAutoAttackDamage(target, true) > target.Health && Orbwalker.CanAutoAttack)
            {
                return;
            }

            if (Q.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.Q) > target.Health && Q.IsInRange(target))
            {
                return;
            }

            if (E.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.E) > target.Health && E.IsInRange(target))
            {
                return;
            }

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    if (target.HasBuff("LuxIlluminatingFraulein"))
                    {
                        if (Killable(target, (10 + 8 * Player.Instance.Level)))
                        {
                            if (target.HasBuffOfType(BuffType.Snare))
                                R.Cast(target.Position);
                            else if (target.HasBuffOfType(BuffType.Slow))
                                HitChanceCast(R, target);
                            else
                                R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
                        }
                    }
                    else
                    {
                        if (Killable(target))
                        {
                            if (target.IsRooted)
                                R.Cast(target.Position);
                            else if (target.HasBuffOfType(BuffType.Slow))
                                HitChanceCast(R, target);
                            else
                                R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
                        }
                    }
                    break;
            }
        }
开发者ID:mrarticuno,项目名称:EBHQ,代码行数:54,代码来源:RLogic.cs

示例6: ValidUlt

 public static bool ValidUlt(Obj_AI_Base target)
 {
     if (target.HasBuffOfType(BuffType.PhysicalImmunity)
         || target.HasBuffOfType(BuffType.SpellImmunity)
         || target.IsZombie
         || target.IsInvulnerable
         || target.HasBuffOfType(BuffType.Invulnerability)
         || target.HasBuffOfType(BuffType.SpellShield)
         || target.HasBuff("deathdefiedbuff")
         || target.HasBuff("Undying Rage")
         || target.HasBuff("Chrono Shift")
         )
         return false;
     else
         return true;
 }
开发者ID:adukhuyet,项目名称:AsCarryteam,代码行数:16,代码来源:Program.cs

示例7: CheckFor

 private static bool CheckFor(Spell spell, Obj_AI_Base target, float spellrange, string menuitem)
 {
     if (spell.IsReady() && target.IsValidTarget(spellrange) && !target.HasBuffOfType(BuffType.Invulnerability) && !target.HasBuff("UndyingRage") && !target.IsDead && Config.Item(menuitem).GetValue<bool>() == true)
     {
         return true;
     }
     else return false;
 }
开发者ID:LSharpAura,项目名称:LeagueSharp,代码行数:8,代码来源:Annie.cs

示例8: Immobile

 private static bool Immobile(Obj_AI_Base unit)
 {
     return unit.HasBuffOfType(BuffType.Charm) || unit.HasBuffOfType(BuffType.Stun) ||
            unit.HasBuffOfType(BuffType.Knockup) || unit.HasBuffOfType(BuffType.Snare) ||
            unit.HasBuffOfType(BuffType.Taunt) || unit.HasBuffOfType(BuffType.Suppression) ||
            unit.HasBuffOfType(BuffType.Polymorph);
 }
开发者ID:Bloodimir,项目名称:EloBuddy,代码行数:7,代码来源:Program.cs

示例9: CanMove

 public static bool CanMove(Obj_AI_Base target)
 {
     if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) ||
         target.HasBuffOfType(BuffType.Knockup) ||
         target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) ||
         target.HasBuffOfType(BuffType.Knockback) ||
         target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Suppression) ||
         target.IsStunned || (target.IsChannelingImportantSpell() && !target.IsMoving))
     {
         return false;
     }
     return true;
 }
开发者ID:roaxtreil,项目名称:EBRepo,代码行数:13,代码来源:Utils.cs

示例10: IsImmobile

 /// <summary>
 ///     Gets a value indicating whether a determined champion can move or not.
 /// </summary>
 public static bool IsImmobile(Obj_AI_Base target)
 {
     return
         target.MoveSpeed < 150 ||
         target.HasBuff("rebirth") ||
         target.HasBuff("chronorevive") ||
         target.HasBuff("lissandrarself") ||
         target.HasBuff("teleport_target") ||
         target.HasBuff("woogletswitchcap") ||
         target.HasBuff("zhonyasringshield") ||
         target.HasBuff("aatroxpassivedeath") ||
         IsValidStun(target as AIHeroClient) ||
         IsValidSnare(target as AIHeroClient) ||
         target.HasBuffOfType(BuffType.Flee) ||
         target.HasBuffOfType(BuffType.Taunt) ||
         target.HasBuffOfType(BuffType.Charm) ||
         target.HasBuffOfType(BuffType.Knockup) ||
         target.HasBuffOfType(BuffType.Suppression) ||
         (target as AIHeroClient).IsCastingInterruptableSpell();
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:23,代码来源:Bools.cs

示例11: GetDamage

        public float GetDamage(Obj_AI_Base x)
        {
            if (x == null
                || x.IsInvulnerable
                || x.HasBuffOfType(BuffType.SpellShield)
                || x.HasBuffOfType(BuffType.SpellImmunity))
            {
                return 0;
            }

            float dmg = 0;

            if (!ObjectManager.Player.IsWindingUp)
            {
                dmg += (float)ObjectManager.Player.GetAutoAttackDamage(x);
            }

            if (Spells.Q.IsReady())
            {
                dmg += Spells.Q.GetDamage(x);
            }

            if (Spells.W2.IsReady())
            {
                dmg += Spells.W2.GetDamage(x);
            }

            if (Spells.E.IsReady())
            {
                dmg += Spells.E.GetDamage(x);
            }

            if (Spells.R2.IsReady())
            {
                dmg += Spells.R2.GetDamage(x);
            }

            return dmg;
        }
开发者ID:Nechrito,项目名称:Leaguesharp,代码行数:39,代码来源:Dmg.cs

示例12: IsEnemyUnkillable

        private static bool IsEnemyUnkillable(Obj_AI_Base target)
        {
            if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "UndyingRage"))
            {
                return true;
            }

            if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "ChronoShift"))
            {
                return true;
            }

            if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "JudicatorIntervention"))
            {
                return true;
            }

            return target.Buffs.Any(b => b.IsValid() && b.DisplayName == "kindredrnodeathbuff") || target.HasBuffOfType(BuffType.Invulnerability);
        }
开发者ID:FireBuddy,项目名称:EloBuddy-Addons,代码行数:19,代码来源:Program.cs

示例13: Smiteontarget

        private static void Smiteontarget(Obj_AI_Base hero)
        {
            var smitered = Player.Spells.FirstOrDefault(spell => spell.Name.ToLower().Contains("s5_summonersmiteduel"));
            var smiteblue =
                Player.Spells.FirstOrDefault(spell => spell.Name.ToLower().Contains("s5_summonersmiteplayerganker"));

            if (smiteblue !=null|| smitered !=null)
            {

                    var smiteDmg = _player.GetSummonerSpellDamage(hero, DamageLibrary.SummonerSpells.Smite);
                    var usesmite = _combo["smitecombo"].Cast<CheckBox>().CurrentValue;
                    if (SmiteBlue.Any(i => Item.HasItem(i)) && usesmite &&
                        ObjectManager.Player.Spellbook.CanUseSpell(_smiteSlot) == SpellState.Ready &&
                        hero.IsValidTarget(_smite.Range))
                    {
                        if (!hero.HasBuffOfType(BuffType.Stun) || !hero.HasBuffOfType(BuffType.Slow))
                        {
                            ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
                        }
                        else if (smiteDmg >= hero.Health)
                        {
                            ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
                        }
                    }
                    if (SmiteRed.Any(i => Item.HasItem(i)) && usesmite &&
                        ObjectManager.Player.Spellbook.CanUseSpell(_smiteSlot) == SpellState.Ready &&
                        hero.IsValidTarget(_smite.Range))
                    {
                        ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
                    }
                }
        }
开发者ID:tieuthien,项目名称:Elobuddy,代码行数:32,代码来源:Program.cs

示例14: IsPoisoned

 public bool IsPoisoned(Obj_AI_Base target)
 {
     if (target == null)
     {
         return false;
     }
     if (!CachedPoisoned.ContainsKey(target.NetworkId))
     {
         CachedPoisoned[target.NetworkId] = false;
         if (target.HasBuffOfType(BuffType.Poison))
         {
             var bestEndTime =
                 target.Buffs.Where(b => b.IsActive && b.Type == BuffType.Poison && b.EndTime > 0)
                     .OrderByDescending(b => b.EndTime)
                     .FirstOrDefault();
             if (bestEndTime != null && bestEndTime.EndTime - Game.Time >= E.GetArrivalTime(target) / 1000f)
             {
                 CachedPoisoned[target.NetworkId] = true;
             }
         }
     }
     return CachedPoisoned[target.NetworkId];
 }
开发者ID:lolscripts,项目名称:Otros,代码行数:23,代码来源:Cassiopeia.cs

示例15: ValidUlt

 public static bool ValidUlt(Obj_AI_Base target)
 {
     if (target.HasBuffOfType(BuffType.PhysicalImmunity)
         || target.HasBuffOfType(BuffType.SpellImmunity)
         || target.IsZombie
         || target.IsInvulnerable
         || target.HasBuffOfType(BuffType.Invulnerability)
         || target.HasBuffOfType(BuffType.SpellShield)
         )
         return false;
     else
         return true;
 }
开发者ID:qq2128969,项目名称:LeagueRepo,代码行数:13,代码来源:OktwCommon.cs


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