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


C# Obj_AI_Base.HasRendBuff方法代码示例

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


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

示例1: GetActualDamage

        public static float GetActualDamage(Obj_AI_Base target)
        {
            if (!SpellManager.Spell[SpellSlot.E].IsReady() || !target.HasRendBuff()) return 0f;

            var damage = GetRendDamage(target);

            if (target.Name.Contains("Baron"))
            {
                // Buff Name: barontarget or barondebuff
                // Baron's Gaze: Baron Nashor takes 50% reduced damage from champions he's damaged in the last 15 seconds.
                damage = EloBuddy.Player.Instance.HasBuff("barontarget")
                    ? damage * 0.5f
                    : damage;
            }

            else if (target.Name.Contains("Dragon"))
            {
                // DragonSlayer: Reduces damage dealt by 7% per a stack
                damage = EloBuddy.Player.Instance.HasBuff("s5test_dragonslayerbuff")
                    ? damage * (1 - (.07f * EloBuddy.Player.Instance.GetBuffCount("s5test_dragonslayerbuff")))
                    : damage;
            }

            if (EloBuddy.Player.Instance.HasBuff("summonerexhaust"))
            {
                damage = damage * 0.6f;
            }

            if (target.HasBuff("FerociousHowl"))
            {
                damage = damage * 0.7f;
            }

            return damage;
        }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:35,代码来源:Damages.cs

示例2: IsRendKillable

        public static bool IsRendKillable(Obj_AI_Base target, float? damage = null)
        {
            // Validate unit
            if (target == null || !target.IsValidTarget() || !target.HasRendBuff())
            {
                return false;
            }

            // Take into account all kinds of shields
            var totalHealth = target.TotalShieldHealth();

            var hero = target as AIHeroClient;
            if (hero != null)
            {
                // Validate that target has no undying buff or spellshield
                if (hero.HasUndyingBuff() || hero.HasSpellShield())
                {
                    return false;
                }

                // Take into account Blitzcranks passive
                if (hero.ChampionName == "Blitzcrank" && !target.HasBuff("BlitzcrankManaBarrierCD") && !target.HasBuff("ManaBarrier"))
                {
                    totalHealth += target.Mana / 2;
                }
            }

            return (damage ?? GetRendDamage(target)) > totalHealth;
        }
开发者ID:,项目名称:,代码行数:29,代码来源:

示例3: GetActualDamage

        public static float GetActualDamage(Obj_AI_Base target)
        {
            if (!Kalista.E.IsReady() || !target.HasRendBuff())
                return 0f;

            var damage = EDamage(target);

            return damage;
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:9,代码来源:Kalista.cs

示例4: GetRawRendDamage

 public static float GetRawRendDamage(Obj_AI_Base target)
 {
     var stacks = (target.HasRendBuff() ?  target.GetRendBuff().Count : 0) - 1;
     if (stacks > -1)
     {
         var index = Spells.E.Level - 1;
         return (RawRendDamage[index] + Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index]) * (1+stacks * RawRendDamagePerSpearMultiplier[index]));
     }
     return 0;
 }
开发者ID:ReSrReCTion,项目名称:elobuddy,代码行数:10,代码来源:Damages.cs

示例5: GetRawRendDamage

        public static float GetRawRendDamage(Obj_AI_Base target, int customStacks = -1)
        {
            var stacks = (customStacks > -1 ? customStacks : target.HasRendBuff() ? target.GetRendBuff().Count : 0) - 1;
            if (stacks > -1)
            {
                var index = SpellManager.E.Level - 1;
                return RawRendDamage[index] + stacks * RawRendDamagePerSpear[index] +
                       Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index] + stacks * RawRendDamagePerSpearMultiplier[index]);
            }

            return 0;
        }
开发者ID:mezer123,项目名称:EloBuddy,代码行数:12,代码来源:Damages.cs

示例6: GetRawRendDamage

        /// <summary>
        ///     TODO The get raw rend damage.
        /// </summary>
        /// <param name="target">
        ///     TODO The target.
        /// </param>
        /// <param name="customStacks">
        ///     TODO The custom stacks.
        /// </param>
        /// <returns>
        ///     The <see cref="float" />.
        /// </returns>
        public static float GetRawRendDamage(Obj_AI_Base target)
        {
            var stacks = (target.HasRendBuff() ? target.GetRendBuff().Count : 0) - 1;
            if (stacks > -1)
            {
                var index = SpellManager.Spell[SpellSlot.E].Level - 1;
                return RawRendDamage[index] + stacks * RawRendDamagePerSpear[index] +
                       EloBuddy.Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index] + stacks * RawRendDamagePerSpearMultiplier[index]);
            }

            return 0;
        }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:24,代码来源:Damages.cs

示例7: GetRendDamage

        /// <summary>
        ///     Gets the Rend Damage for each target
        /// </summary>
        /// <param name="target">
        ///     The Target
        /// </param>
        /// <returns>
        ///     The <see cref="float" />.
        /// </returns>
        public static float GetRendDamage(Obj_AI_Base target)
        {
            // If that target doesn't have a rend stack then calculating this is pointless
            if (!target.HasRendBuff())
            {
                return 0f;
            }

            // The base damage of E
            var baseDamage = Damages.GetRendDamage(target); // TODO replace with common damage :S

            // With exhaust players damage is reduced by 40%
            if (ObjectManager.Player.HasBuff("summonerexhaust"))
            {
                return baseDamage * 0.4f;
            }

            // Alistars ultimate reduces damage dealt by 70%
            if (target.HasBuff("FerociousHowl"))
            {
                return baseDamage * 0.7f;
            }

            // Damage to dragon is reduced by 7% * (stacks)
            if (target.Name.Contains("Dragon") && ObjectManager.Player.HasBuff("s5test_dragonslayerbuff"))
            {
                return baseDamage * (1 - (0.7f * ObjectManager.Player.GetBuffCount("s5test_dragonslayerbuff")));
            }

            // Damage to baron is reduced by 50% if the player has the 'barontarget'
            if (target.Name.Contains("Baron") && ObjectManager.Player.HasBuff("barontarget"))
            {
                return (float)(baseDamage * 0.5);
            }

            return baseDamage;
        }
开发者ID:iJavai,项目名称:Leaguesharp-SDK,代码行数:46,代码来源:Helper.cs


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