本文整理汇总了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);
}
//.........这里部分代码省略.........