當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。