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


C# Obj_AI_Hero.HasBuffOfType方法代码示例

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


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

示例1: CheckNoDamageBuffs

        public static bool CheckNoDamageBuffs(Obj_AI_Hero target)
        {
            foreach (var b in target.Buffs.Where(b => b.IsValidBuff()))
                switch (b.DisplayName)
                {
                    case "Chrono Shift":
                        return true;

                    case "JudicatorIntervention":
                        return true;

                    case "Undying Rage":
                        if (target.ChampionName=="Tryndamere")
                            return true;

                        continue;

                    //Spell Shields
                    case "bansheesveil":
                        return true;

                    case "SivirE":
                        return true;

                    case "NocturneW":
                        return true;

                    case "kindredrnodeathbuff":
                        return true;
                }

            return target.HasBuffOfType(BuffType.Invulnerability)||target.HasBuffOfType(BuffType.SpellImmunity);
            // || target.HasBuffOfType(BuffType.SpellShield));
        }
开发者ID:KallenStadtfeldGeass,项目名称:KallenSharp,代码行数:34,代码来源:Damage.cs

示例2: IsSpellShielded

 /// <summary>
 /// Gets a value indicating whether the target has protection or not.
 /// </summary>
 /// <value>
 /// <c>true</c> if the has no protection.; otherwise, <c>false</c>.
 /// </value> 
 public static bool IsSpellShielded(Obj_AI_Hero unit)
 =>
     unit.HasBuffOfType(BuffType.SpellShield) ||
     unit.HasBuffOfType(BuffType.SpellImmunity) ||
     Utils.TickCount - unit.LastCastedSpellT() < 300 &&
     (
         unit.LastCastedSpellName().Equals("SivirE") ||
         unit.LastCastedSpellName().Equals("BlackShield") ||
         unit.LastCastedSpellName().Equals("NocturneShit")
     );
开发者ID:ShineSharp,项目名称:ExoryREPO,代码行数:16,代码来源:Bools.cs

示例3: HasSpellShield

 public bool HasSpellShield(Obj_AI_Hero target)
 {
     if (target.Buffs.Any(b => b.IsValid 
     && (b.DisplayName == "bansheesveil" 
     || b.DisplayName == "SivirE"
     || b.DisplayName == "NocturneW")))
     {
         return true;
     }
  
     return target.HasBuffOfType(BuffType.SpellShield) || target.HasBuffOfType(BuffType.SpellImmunity);
 }
开发者ID:Nechrito,项目名称:Leaguesharp,代码行数:12,代码来源:HeroInfo.cs

示例4: ShouldUseCleanse

 /// <summary>
 /// Defines whether the player should use cleanse.
 /// </summary>
 public static bool ShouldUseCleanse(Obj_AI_Hero target)
 =>
     !ObjectManager.Player.IsInvulnerable &&
     !IsSpellShielded(ObjectManager.Player) &&
     (
         Bools.IsValidStun() ||
         Bools.IsValidSnare() ||
         target.HasBuff("summonerdot") ||
         target.HasBuff("summonerexhaust") ||
         target.HasBuffOfType(BuffType.Flee) ||
         target.HasBuffOfType(BuffType.Charm) ||
         target.HasBuffOfType(BuffType.Taunt) ||
         target.HasBuffOfType(BuffType.Polymorph)
     );
开发者ID:ShineSharp,项目名称:ExoryREPO,代码行数:17,代码来源:Bools.cs

示例5: CanMove

 public static bool CanMove(Obj_AI_Hero target)
 {
     return !(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());
 }
开发者ID:seniseviy,项目名称:LeagueSharp-7,代码行数:7,代码来源:Program.cs

示例6: CanMove

 /// <summary>
 /// Judge Target MoveMent Status (This Part From SebbyLib)
 /// </summary>
 /// <param name="Target">Target</param>
 /// <returns></returns>
 public static bool CanMove(Obj_AI_Hero Target)
 {
     if (Target.MoveSpeed < 50 || Target.IsStunned || Target.HasBuffOfType(BuffType.Stun) ||
         Target.HasBuffOfType(BuffType.Fear) || Target.HasBuffOfType(BuffType.Snare) ||
         Target.HasBuffOfType(BuffType.Knockup) || Target.HasBuff("Recall") ||
         Target.HasBuffOfType(BuffType.Knockback) || Target.HasBuffOfType(BuffType.Charm) ||
         Target.HasBuffOfType(BuffType.Taunt) || Target.HasBuffOfType(BuffType.Suppression)
         || (Target.IsCastingInterruptableSpell() && !Target.IsMoving))
     {
         return false;
     }
     else
         return true;
 }
开发者ID:CjShu,项目名称:L-CC,代码行数:19,代码来源:Manager.cs

示例7: ShouldCleanse

 /// <summary>
 ///     Gets a value indicating whether BuffType is worth cleansing.
 /// </summary>
 public static bool ShouldCleanse(Obj_AI_Hero target)
     =>
         ObjectManager.Get<Obj_AI_Hero>().Any(t => t.IsEnemy && t.IsValidTarget(1500f))
         && !TargetSelector.IsInvulnerable(ObjectManager.Player, TargetSelector.DamageType.Magical, false)
         && (target.HasBuffOfType(BuffType.Flee) || target.HasBuffOfType(BuffType.Charm)
             || target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Knockup)
             || target.HasBuffOfType(BuffType.Knockback) || target.HasBuffOfType(BuffType.Polymorph)
             || target.HasBuffOfType(BuffType.Suppression) || target.HasBuffOfType(BuffType.Stun));
开发者ID:nabbhacker,项目名称:ExoryREPO,代码行数:11,代码来源:Bools.cs

示例8: OnInterruptableTarget

 private void OnInterruptableTarget(Obj_AI_Hero target, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.CanCast(target) && config.Item("useEint", true).GetValue<bool>())
     {
         if (E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>()))
         {
             return;
         }
     }
     if (R.CanCast(target) && config.Item("useRint", true).GetValue<bool>())
     {
         if (savedQ != null && !SimpleQ && !target.IsMoving && target.Distance(qPos) > QExplosionRange &&
             target.Distance(player) < R.Range - 100 &&
             target.Position.Distance(savedQ.position) < 550 + QExplosionRange / 2 &&
             !target.HasBuffOfType(BuffType.Knockback))
         {
             var cast = Prediction.GetPrediction(target, 1000f).UnitPosition.Extend(savedQ.position, -100);
             R.Cast(cast);
         }
         else if (target.Distance(player) < R.Range - 100)
         {
             if (player.CountEnemiesInRange(2000) <= player.CountAlliesInRange(2000))
             {
                 var cast = target.Position.Extend(player.Position, -100);
                 R.Cast(cast);
             }
             else
             {
                 var cast = target.Position.Extend(player.Position, 100);
                 R.Cast(cast);
             }
         }
     }
 }
开发者ID:koolkaracter,项目名称:LeagueSharp,代码行数:34,代码来源:Gragas.cs

示例9: CastSkillshot

        public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
        {
            if (!s.IsSkillshot)
                return;

            PredictionOutput p = s.GetPrediction(t);

            if (s.Collision)
            {
                for (int i = 0; i < p.CollisionObjects.Count; i++)
                    if (!p.CollisionObjects[i].IsDead && (p.CollisionObjects[i].IsEnemy || p.CollisionObjects[i].IsMinion))
                        return;
            }

            if ((t.HasBuffOfType(BuffType.Slow) && p.Hitchance >= HitChance.High) || p.Hitchance == HitChance.Immobile)
                s.Cast(p.CastPosition);
            else if (t.IsRecalling())
                s.Cast(t.ServerPosition);
            else
            {
                if (s.IsReady())
                {
                    s.SPredictionCast(t, hc);
                }
            }
        }
开发者ID:cak3d,项目名称:LeagueSharp,代码行数:26,代码来源:Nidalee.cs

示例10: Check

 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     try
     {
         if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
         {
             return true;
         }
         foreach (var invulnerable in Items)
         {
             if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
             {
                 if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
                 {
                     if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                     {
                         return true;
                     }
                     if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
                     {
                         return true;
                     }
                 }
             }
         }
         return false;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
开发者ID:juan2202,项目名称:LeagueSharp-Standalones,代码行数:33,代码来源:Invulnerable.cs

示例11: Check

 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
     {
         return true;
     }
     foreach (var invulnerable in Items)
     {
         if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
         {
             if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
             {
                 if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                 {
                     return true;
                 }
                 if (invulnerable.CustomCheck != null)
                 {
                     return CustomCheck(invulnerable, target, damageType);
                 }
             }
         }
     }
     return false;
 }
开发者ID:julianrolandi,项目名称:LeagueSharp-Dev,代码行数:25,代码来源:Invulnerable.cs

示例12: CheckNoDamageBuffs

        // From Asuna
        public static bool CheckNoDamageBuffs(Obj_AI_Hero target)
        {
            foreach (var b in target.Buffs.Where(b => b.IsValidBuff()))
            {
                switch (b.DisplayName)
                {
                    case "Chrono Shift":
                        return true;

                    case "JudicatorIntervention":
                        return true;

                    case "Undying Rage":
                        if (target.ChampionName == "Tryndamere")
                            return true;
                        continue;

                    //Spell Shields
                    case "bansheesveil":
                        return true;

                    case "SivirE":
                        return true;

                    case "NocturneW":
                        return true;
                }
            }
            if (target.ChampionName == "Poppy" && HeroManager.Allies.Any(
                o =>
                {
                    return !o.IsMe
                           && o.Buffs.Any(
                               b =>
                                   b.Caster.NetworkId == target.NetworkId && b.IsValidBuff()
                                   && b.DisplayName == "PoppyDITarget");
                }))
            {
                return true;
            }

            return (target.HasBuffOfType(BuffType.Invulnerability)
                    || target.HasBuffOfType(BuffType.SpellImmunity));
            // || target.HasBuffOfType(BuffType.SpellShield));
        }
开发者ID:654955321,项目名称:HY_Recommend,代码行数:46,代码来源:DamageCalc.cs

示例13: Immobilized

 public bool Immobilized(Obj_AI_Hero target)
 {
     return target.HasBuffOfType(BuffType.Stun)
            || target.HasBuffOfType(BuffType.Snare)
            || target.HasBuffOfType(BuffType.Knockup)
            || target.HasBuffOfType(BuffType.Knockback)
            || target.HasBuffOfType(BuffType.Charm)
            || target.HasBuffOfType(BuffType.Fear)
            || target.HasBuffOfType(BuffType.Taunt)
            || target.HasBuffOfType(BuffType.Suppression);
 }
开发者ID:Nechrito,项目名称:Leaguesharp,代码行数:11,代码来源:HeroInfo.cs

示例14: immobileTarget

 public static bool immobileTarget(Obj_AI_Hero 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)
     {
         return true;
     }
     else
         return false;
 }
开发者ID:47110572,项目名称:LeagueSharp-4,代码行数:12,代码来源:Program.cs

示例15: CanMove

 public static bool CanMove(Obj_AI_Hero 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) || target.MoveSpeed < 50 || Prediction.GetPrediction(target,0.5f).Hitchance > HitChance.Dashing)
     {
         return false;
     }
     else
         return true;
 }
开发者ID:superjo1508,项目名称:LeagueRepo,代码行数:12,代码来源:OktwCommon.cs


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