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


C# AIHeroClient.CalculateDamageOnUnit方法代码示例

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


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

示例1: CalculateDamage

 public float CalculateDamage(AIHeroClient target, AIHeroClient source = null)
 {
     if (source == null) source = Player.Instance;
     if (_spellSlot != SpellSlot.Unknown &&
         (!_onlyIfActive || _onlyIfActive && source.Spellbook.GetSpell(_spellSlot).State == SpellState.Ready))
     {
         return source.GetSpellDamage(target, _spellSlot, _stage);
     }
     if (_flatDamage != -1)
     {
         return source.CalculateDamageOnUnit(target, _damageType, _flatDamage);
     }
     return 0;
 }
开发者ID:HeheheM,项目名称:EloBuddy-2,代码行数:14,代码来源:Indicator.cs

示例2: GetBaseUltSpellDamage

        private static double GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source)
        {
            var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
            if (source.ChampionName == "Jinx")
            {
                {
                    var damage = new float[] { 250, 350, 450 }[level] +
                                 new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
                                 1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] { 350, 500, 650 }[level] + 0.9f * ObjectManager.Player.FlatMagicDamageMod +
                                 1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7f;
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] { 250, 425, 600 }[level] + 1 * ObjectManager.Player.FlatMagicDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] { 175, 275, 375 }[level] + 1.1f * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7f;
                }
            }

            return 0;
        }
开发者ID:xTeKillax,项目名称:EloBuddy,代码行数:37,代码来源:OfficialAddon.cs

示例3: GetBaseUltSpellDamage

        public static float GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source,
            float lastEstimatedTargetHealth)
        {
            var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
            float dmg = 0;

            if (source.ChampionName == "Jinx")
            { 
                {
                    var damage = new float[] {250, 350, 450}[level] +
                                 new float[] {25, 30, 35}[level]/100*(target.MaxHealth - lastEstimatedTargetHealth) +
                                 ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] {350, 500, 650}[level] + 0.9f*ObjectManager.Player.FlatMagicDamageMod +
                                 1*ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage)*0.7f;
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] {250, 425, 600}[level] + 1*ObjectManager.Player.FlatMagicDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] {175, 275, 375}[level] + 1.1f*ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage)*0.7f;
                }
            }

            return dmg*0.925f;
        }
开发者ID:DanThePman,项目名称:HumanziedBaseUlt,代码行数:40,代码来源:Damage.cs


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