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


C# AIHeroClient.LSGetSpellDamage方法代码示例

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


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

示例1: GetHeroAvgDamage

        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(AIHeroClient player, List<AIHeroClient> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.LSGetAutoAttackDamage(s) * 2));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.Q) : 0f)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.W) : 0f)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.E) : 0f)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.LSGetSpellDamage(s, SpellSlot.R) : 0f)));

            var itemsDamage = 0f;

            foreach (var item in player.InventoryItems)
            {
                foreach (var hero in Enemies)
                {
                    var itemID = item.Id;
                    switch (itemID)
                    {
                        case ItemId.Bilgewater_Cutlass:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
                            break;
                        case ItemId.Blade_of_the_Ruined_King:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Botrk);
                            break;
                        case ItemId.Hextech_Gunblade:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Hexgun);
                            break;
                        case ItemId.Frost_Queens_Claim:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.FrostQueenClaim);
                            break;
                        case ItemId.Tiamat_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Tiamat)
                                : 0f;
                            break;
                        case ItemId.Ravenous_Hydra_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Hydra)
                                : 0f;
                            break;
                        case ItemId.Liandrys_Torment:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.LiandrysTorment);
                            break;
                    }
                }

            }

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage + itemsDamage;

            return (float) totalDamage / totalEnemies;
        }
开发者ID:CONANLXF,项目名称:AIO,代码行数:65,代码来源:TFHelperCalculator.cs

示例2: GetAlliesComboDmg

        public static double GetAlliesComboDmg(AIHeroClient target, AIHeroClient ally)
        {
            var SpellSlots = new List<SpellSlot>();
            double dmg = 0;
            #region SpellSots
            SpellSlots.Add(SpellSlot.Q);
            SpellSlots.Add(SpellSlot.W);
            SpellSlots.Add(SpellSlot.E);
            SpellSlots.Add(SpellSlot.R);
            #endregion

            foreach (var slot in SpellSlots)
            {
                var spell = ally.Spellbook.GetSpell(slot);

                dmg += ally.LSGetSpellDamage(target, slot);
                dmg += ally.LSGetAutoAttackDamage(target);
            }

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

示例3: GetChampDmgToMe

        public static float GetChampDmgToMe(AIHeroClient enemy)
        {
            double result = 0;
            double basicDmg = 0;
            var attacks = (int) Math.Floor(enemy.AttackSpeedMod*5);
            for (var i = 0; i < attacks; i++)
            {
                if (enemy.Crit > 0)
                {
                    basicDmg += enemy.GetAutoAttackDamage(player)*(1 + enemy.Crit/attacks);
                }
                else
                {
                    basicDmg += enemy.GetAutoAttackDamage(player);
                }
            }
            result += basicDmg;
            var spells = enemy.Spellbook.Spells;
            foreach (var spell in spells)
            {
                var t = spell.CooldownExpires - Game.Time;
                if (t < 0.5)
                {
                    switch (enemy.ChampionName)
                    {
                        case "Ahri":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                                result += enemy.LSGetSpellDamage(player, spell.Slot, 1);
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Akali":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*spell.Ammo;
                            }
                            else if (spell.Slot == SpellSlot.Q)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                                result += enemy.LSGetSpellDamage(player, spell.Slot, 1);
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Amumu":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*5;
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Cassiopeia":
                            if (spell.Slot == SpellSlot.Q || spell.Slot == SpellSlot.E || spell.Slot == SpellSlot.W)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*2;
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Fiddlesticks":
                            if (spell.Slot == SpellSlot.W || spell.Slot == SpellSlot.E)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*5;
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Garen":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*3;
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
                            break;
                        case "Irelia":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot)*attacks;
                            }
                            else
                            {
                                result += enemy.LSGetSpellDamage(player, spell.Slot);
                            }
//.........这里部分代码省略.........
开发者ID:Xelamats,项目名称:PortAIO,代码行数:101,代码来源:CombatHelper.cs


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