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


C# AIHeroClient.GetAutoAttackDamage方法代码示例

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


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

示例1: GetAdOverTime

 public static float GetAdOverTime(AIHeroClient source, AIHeroClient target, int times)
 {
     double basicDmg = 0;
     var attacks = (int) Math.Floor(source.AttackSpeedMod*times);
     for (var i = 0; i < attacks; i++)
     {
         if (source.Crit > 0)
         {
             basicDmg += source.GetAutoAttackDamage(target, true) - source.GetAutoAttackDamage(target) +
                         source.GetAutoAttackDamage(target)*(1 + source.Crit/attacks);
         }
         else
         {
             basicDmg += source.GetAutoAttackDamage(target, true);
         }
     }
     return (float) basicDmg;
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:18,代码来源:Environment.cs

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