本文整理汇总了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);
}