本文整理汇总了C#中Obj_AI_Base.HasRendBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.HasRendBuff方法的具体用法?C# Obj_AI_Base.HasRendBuff怎么用?C# Obj_AI_Base.HasRendBuff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.HasRendBuff方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetActualDamage
public static float GetActualDamage(Obj_AI_Base target)
{
if (!SpellManager.Spell[SpellSlot.E].IsReady() || !target.HasRendBuff()) return 0f;
var damage = GetRendDamage(target);
if (target.Name.Contains("Baron"))
{
// Buff Name: barontarget or barondebuff
// Baron's Gaze: Baron Nashor takes 50% reduced damage from champions he's damaged in the last 15 seconds.
damage = EloBuddy.Player.Instance.HasBuff("barontarget")
? damage * 0.5f
: damage;
}
else if (target.Name.Contains("Dragon"))
{
// DragonSlayer: Reduces damage dealt by 7% per a stack
damage = EloBuddy.Player.Instance.HasBuff("s5test_dragonslayerbuff")
? damage * (1 - (.07f * EloBuddy.Player.Instance.GetBuffCount("s5test_dragonslayerbuff")))
: damage;
}
if (EloBuddy.Player.Instance.HasBuff("summonerexhaust"))
{
damage = damage * 0.6f;
}
if (target.HasBuff("FerociousHowl"))
{
damage = damage * 0.7f;
}
return damage;
}
示例2: IsRendKillable
public static bool IsRendKillable(Obj_AI_Base target, float? damage = null)
{
// Validate unit
if (target == null || !target.IsValidTarget() || !target.HasRendBuff())
{
return false;
}
// Take into account all kinds of shields
var totalHealth = target.TotalShieldHealth();
var hero = target as AIHeroClient;
if (hero != null)
{
// Validate that target has no undying buff or spellshield
if (hero.HasUndyingBuff() || hero.HasSpellShield())
{
return false;
}
// Take into account Blitzcranks passive
if (hero.ChampionName == "Blitzcrank" && !target.HasBuff("BlitzcrankManaBarrierCD") && !target.HasBuff("ManaBarrier"))
{
totalHealth += target.Mana / 2;
}
}
return (damage ?? GetRendDamage(target)) > totalHealth;
}
示例3: GetActualDamage
public static float GetActualDamage(Obj_AI_Base target)
{
if (!Kalista.E.IsReady() || !target.HasRendBuff())
return 0f;
var damage = EDamage(target);
return damage;
}
示例4: GetRawRendDamage
public static float GetRawRendDamage(Obj_AI_Base target)
{
var stacks = (target.HasRendBuff() ? target.GetRendBuff().Count : 0) - 1;
if (stacks > -1)
{
var index = Spells.E.Level - 1;
return (RawRendDamage[index] + Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index]) * (1+stacks * RawRendDamagePerSpearMultiplier[index]));
}
return 0;
}
示例5: GetRawRendDamage
public static float GetRawRendDamage(Obj_AI_Base target, int customStacks = -1)
{
var stacks = (customStacks > -1 ? customStacks : target.HasRendBuff() ? target.GetRendBuff().Count : 0) - 1;
if (stacks > -1)
{
var index = SpellManager.E.Level - 1;
return RawRendDamage[index] + stacks * RawRendDamagePerSpear[index] +
Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index] + stacks * RawRendDamagePerSpearMultiplier[index]);
}
return 0;
}
示例6: GetRawRendDamage
/// <summary>
/// TODO The get raw rend damage.
/// </summary>
/// <param name="target">
/// TODO The target.
/// </param>
/// <param name="customStacks">
/// TODO The custom stacks.
/// </param>
/// <returns>
/// The <see cref="float" />.
/// </returns>
public static float GetRawRendDamage(Obj_AI_Base target)
{
var stacks = (target.HasRendBuff() ? target.GetRendBuff().Count : 0) - 1;
if (stacks > -1)
{
var index = SpellManager.Spell[SpellSlot.E].Level - 1;
return RawRendDamage[index] + stacks * RawRendDamagePerSpear[index] +
EloBuddy.Player.Instance.TotalAttackDamage * (RawRendDamageMultiplier[index] + stacks * RawRendDamagePerSpearMultiplier[index]);
}
return 0;
}
示例7: GetRendDamage
/// <summary>
/// Gets the Rend Damage for each target
/// </summary>
/// <param name="target">
/// The Target
/// </param>
/// <returns>
/// The <see cref="float" />.
/// </returns>
public static float GetRendDamage(Obj_AI_Base target)
{
// If that target doesn't have a rend stack then calculating this is pointless
if (!target.HasRendBuff())
{
return 0f;
}
// The base damage of E
var baseDamage = Damages.GetRendDamage(target); // TODO replace with common damage :S
// With exhaust players damage is reduced by 40%
if (ObjectManager.Player.HasBuff("summonerexhaust"))
{
return baseDamage * 0.4f;
}
// Alistars ultimate reduces damage dealt by 70%
if (target.HasBuff("FerociousHowl"))
{
return baseDamage * 0.7f;
}
// Damage to dragon is reduced by 7% * (stacks)
if (target.Name.Contains("Dragon") && ObjectManager.Player.HasBuff("s5test_dragonslayerbuff"))
{
return baseDamage * (1 - (0.7f * ObjectManager.Player.GetBuffCount("s5test_dragonslayerbuff")));
}
// Damage to baron is reduced by 50% if the player has the 'barontarget'
if (target.Name.Contains("Baron") && ObjectManager.Player.HasBuff("barontarget"))
{
return (float)(baseDamage * 0.5);
}
return baseDamage;
}