當前位置: 首頁>>代碼示例>>C#>>正文


C# AIHeroClient.GetSpellDamage方法代碼示例

本文整理匯總了C#中AIHeroClient.GetSpellDamage方法的典型用法代碼示例。如果您正苦於以下問題:C# AIHeroClient.GetSpellDamage方法的具體用法?C# AIHeroClient.GetSpellDamage怎麽用?C# AIHeroClient.GetSpellDamage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.GetSpellDamage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MyDamage

        /// <summary>
        /// Calculates our hero's damage.
        /// </summary>
        /// <param name="myHero">Reference to AIHeroClient -- ourselves</param>
        /// <param name="target">Reference to AIHeroClient -- the target</param>
        /// <param name="useQ">Consider Q damage</param>
        /// <param name="useW">Consider W damage</param>
        /// <param name="useE">Consider E damage</param>
        /// <param name="useMark">Consider mark damage (if any)</param>
        /// <returns>float of the damage</returns>
        public static float MyDamage(AIHeroClient myHero, AIHeroClient target, bool useQ, bool useW, bool useE, bool useMark = true)
        {
            float calculation = 0;

            if(useQ)    calculation += myHero.GetSpellDamage(target, SpellSlot.Q);
            if(useW)    calculation += myHero.GetSpellDamage(target, SpellSlot.W);
            if(useE)    calculation += myHero.GetSpellDamage(target, SpellSlot.E);
            if(useMark) calculation += target.HasBuff("katarinaqmark") ? myHero.GetSpellDamage(target, SpellSlot.Q) : 0;

            // Consider ignite damage
            /*var ignite = new Spell.Targeted(Katakomba.IgniteSlot, 600);
            calculation += ignite.IsReady() ? myHero.GetSpellDamage(target, Katakomba.IgniteSlot) : 0;*/

            return calculation;
        }
開發者ID:infyhr,項目名稱:EloBuddy,代碼行數:25,代碼來源:Helpers.cs

示例2: 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

示例3: GetDamage

 static float GetDamage(AIHeroClient hero, AIHeroClient target, SpellSlot slot)
 {
     return (float)hero.GetSpellDamage(target, slot);
 }
開發者ID:Xelamats,項目名稱:PortAIO,代碼行數:4,代碼來源:DamagePrediction.cs


注:本文中的AIHeroClient.GetSpellDamage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。