本文整理汇总了C#中AIHeroClient.CalculateDamageOnUnit方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.CalculateDamageOnUnit方法的具体用法?C# AIHeroClient.CalculateDamageOnUnit怎么用?C# AIHeroClient.CalculateDamageOnUnit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.CalculateDamageOnUnit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: GetBaseUltSpellDamage
private static double GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source)
{
var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
if (source.ChampionName == "Jinx")
{
{
var damage = new float[] { 250, 350, 450 }[level] +
new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
1 * ObjectManager.Player.FlatPhysicalDamageMod;
return source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
}
}
if (source.ChampionName == "Ezreal")
{
{
var damage = new float[] { 350, 500, 650 }[level] + 0.9f * ObjectManager.Player.FlatMagicDamageMod +
1 * ObjectManager.Player.FlatPhysicalDamageMod;
return source.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7f;
}
}
if (source.ChampionName == "Ashe")
{
{
var damage = new float[] { 250, 425, 600 }[level] + 1 * ObjectManager.Player.FlatMagicDamageMod;
return source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
}
}
if (source.ChampionName == "Draven")
{
{
var damage = new float[] { 175, 275, 375 }[level] + 1.1f * ObjectManager.Player.FlatPhysicalDamageMod;
return source.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7f;
}
}
return 0;
}
示例3: GetBaseUltSpellDamage
public static float GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source,
float lastEstimatedTargetHealth)
{
var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
float dmg = 0;
if (source.ChampionName == "Jinx")
{
{
var damage = new float[] {250, 350, 450}[level] +
new float[] {25, 30, 35}[level]/100*(target.MaxHealth - lastEstimatedTargetHealth) +
ObjectManager.Player.FlatPhysicalDamageMod;
dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
}
}
if (source.ChampionName == "Ezreal")
{
{
var damage = new float[] {350, 500, 650}[level] + 0.9f*ObjectManager.Player.FlatMagicDamageMod +
1*ObjectManager.Player.FlatPhysicalDamageMod;
dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage)*0.7f;
}
}
if (source.ChampionName == "Ashe")
{
{
var damage = new float[] {250, 425, 600}[level] + 1*ObjectManager.Player.FlatMagicDamageMod;
dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
}
}
if (source.ChampionName == "Draven")
{
{
var damage = new float[] {175, 275, 375}[level] + 1.1f*ObjectManager.Player.FlatPhysicalDamageMod;
dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage)*0.7f;
}
}
return dmg*0.925f;
}