本文整理匯總了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;
}
示例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;
}
示例3: GetDamage
static float GetDamage(AIHeroClient hero, AIHeroClient target, SpellSlot slot)
{
return (float)hero.GetSpellDamage(target, slot);
}