本文整理匯總了C#中AIHeroClient.GetAutoAttackDamage方法的典型用法代碼示例。如果您正苦於以下問題:C# AIHeroClient.GetAutoAttackDamage方法的具體用法?C# AIHeroClient.GetAutoAttackDamage怎麽用?C# AIHeroClient.GetAutoAttackDamage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.GetAutoAttackDamage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetAdOverTime
public static float GetAdOverTime(AIHeroClient source, AIHeroClient target, int times)
{
double basicDmg = 0;
var attacks = (int) Math.Floor(source.AttackSpeedMod*times);
for (var i = 0; i < attacks; i++)
{
if (source.Crit > 0)
{
basicDmg += source.GetAutoAttackDamage(target, true) - source.GetAutoAttackDamage(target) +
source.GetAutoAttackDamage(target)*(1 + source.Crit/attacks);
}
else
{
basicDmg += source.GetAutoAttackDamage(target, true);
}
}
return (float) basicDmg;
}
示例2: GetChampDmgToMe
public static float GetChampDmgToMe(AIHeroClient enemy)
{
double result = 0;
double basicDmg = 0;
var attacks = (int) Math.Floor(enemy.AttackSpeedMod*5);
for (var i = 0; i < attacks; i++)
{
if (enemy.Crit > 0)
{
basicDmg += enemy.GetAutoAttackDamage(player)*(1 + enemy.Crit/attacks);
}
else
{
basicDmg += enemy.GetAutoAttackDamage(player);
}
}
result += basicDmg;
var spells = enemy.Spellbook.Spells;
foreach (var spell in spells)
{
var t = spell.CooldownExpires - Game.Time;
if (t < 0.5)
{
switch (enemy.ChampionName)
{
case "Ahri":
if (spell.Slot == SpellSlot.Q)
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
result += enemy.LSGetSpellDamage(player, spell.Slot, 1);
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Akali":
if (spell.Slot == SpellSlot.R)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*spell.Ammo;
}
else if (spell.Slot == SpellSlot.Q)
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
result += enemy.LSGetSpellDamage(player, spell.Slot, 1);
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Amumu":
if (spell.Slot == SpellSlot.W)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*5;
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Cassiopeia":
if (spell.Slot == SpellSlot.Q || spell.Slot == SpellSlot.E || spell.Slot == SpellSlot.W)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*2;
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Fiddlesticks":
if (spell.Slot == SpellSlot.W || spell.Slot == SpellSlot.E)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*5;
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Garen":
if (spell.Slot == SpellSlot.E)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*3;
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
break;
case "Irelia":
if (spell.Slot == SpellSlot.W)
{
result += enemy.LSGetSpellDamage(player, spell.Slot)*attacks;
}
else
{
result += enemy.LSGetSpellDamage(player, spell.Slot);
}
//.........這裏部分代碼省略.........