本文整理汇总了C#中Obj_AI_Hero.GetBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.GetBuff方法的具体用法?C# Obj_AI_Hero.GetBuff怎么用?C# Obj_AI_Hero.GetBuff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.GetBuff方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override void Execute(Obj_AI_Hero target)
{
if (_brandQWE.Any(spell => spell.Instance.State == SpellState.Ready || spell.Instance.CooldownExpires > Game.Time && spell.Instance.CooldownExpires - Game.Time < spell.Instance.Cooldown / 2f) || _w.Instance.Cooldown - (_w.Instance.CooldownExpires - Game.Time) < 1)
{
if ((!target.HasBuff("brandablaze") || target.GetBuff("brandablaze").EndTime - Game.Time < Delay) && !Provider.IsMarked(target) && !(ObjectManager.Player.GetSpellDamage(target, Instance.Slot) + ObjectManager.Player.GetAutoAttackDamage(target, true) > target.Health))
return;
}
//if ((((!target.HasBuff("brandablaze") || target.GetBuff("brandablaze").EndTime - Game.Time < Delay) && !Provider.IsMarked(target)) &&
// (!(ObjectManager.Player.GetSpellDamage(target, Instance.Slot) + ObjectManager.Player.GetAutoAttackDamage(target, true) > target.Health))) &&
// _brandQWE.Any(spell => spell.Instance.State == SpellState.Ready || spell.Instance.CooldownExpires > Game.Time && spell.Instance.CooldownExpires - Game.Time < spell.Instance.Cooldown / 2f)) return;
//// wenn any skill ready || half cooldown
Cast(target);
}
示例2: EDamage
public static float EDamage(Obj_AI_Hero unit)
{
float damage = 0;
if (unit == null) return 0;
var data = Player.Buffs.FirstOrDefault(b => b.DisplayName == "TristanaECharge");
var i = data != null ? data.Count : 0;
var buff = unit.GetBuff("TristanaECharge").Count;
if (!unit.HasBuff("tristanaechargesound"))
return 0;
if (i != 0)
{
damage += (float) (Tristana.E.GetDamage(unit)*((0.3*(i + 1)))
+ (Player.TotalMagicalDamage*0.5));
damage += BonusDamagePerStack(unit)*(i + 1);
}
return damage;
}
示例3: CanR
private static bool CanR(Obj_AI_Hero target)
{
var buff = target.GetBuff("blindmonkrkick");
return buff != null && buff.EndTime - Game.Time < 0.3 * (buff.EndTime - buff.StartTime);
}
示例4: ShouldBeDead
public override bool ShouldBeDead(Obj_AI_Hero target, float additionalSpellDamage = 0f)
{
var passive = target.GetBuff("brandablaze");
return base.ShouldBeDead(target, passive != null ? GetRemainingPassiveDamage(target, passive) : 0f);
}
示例5: GetRemainingDamage
public static float GetRemainingDamage(Obj_AI_Hero target)
{
var ignitebuff = target.GetBuff("summonerdot");
if (ignitebuff == null) return 0;
return (float)ObjectManager.Player.CalcDamage(target, Damage.DamageType.True, ((int)(ignitebuff.EndTime - Game.Time) + 1) * GetDamage() / 5);
}