本文整理汇总了C#中Obj_AI_Hero.HasBuffOfType方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.HasBuffOfType方法的具体用法?C# Obj_AI_Hero.HasBuffOfType怎么用?C# Obj_AI_Hero.HasBuffOfType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.HasBuffOfType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckNoDamageBuffs
public static bool CheckNoDamageBuffs(Obj_AI_Hero target)
{
foreach (var b in target.Buffs.Where(b => b.IsValidBuff()))
switch (b.DisplayName)
{
case "Chrono Shift":
return true;
case "JudicatorIntervention":
return true;
case "Undying Rage":
if (target.ChampionName=="Tryndamere")
return true;
continue;
//Spell Shields
case "bansheesveil":
return true;
case "SivirE":
return true;
case "NocturneW":
return true;
case "kindredrnodeathbuff":
return true;
}
return target.HasBuffOfType(BuffType.Invulnerability)||target.HasBuffOfType(BuffType.SpellImmunity);
// || target.HasBuffOfType(BuffType.SpellShield));
}
示例2: IsSpellShielded
/// <summary>
/// Gets a value indicating whether the target has protection or not.
/// </summary>
/// <value>
/// <c>true</c> if the has no protection.; otherwise, <c>false</c>.
/// </value>
public static bool IsSpellShielded(Obj_AI_Hero unit)
=>
unit.HasBuffOfType(BuffType.SpellShield) ||
unit.HasBuffOfType(BuffType.SpellImmunity) ||
Utils.TickCount - unit.LastCastedSpellT() < 300 &&
(
unit.LastCastedSpellName().Equals("SivirE") ||
unit.LastCastedSpellName().Equals("BlackShield") ||
unit.LastCastedSpellName().Equals("NocturneShit")
);
示例3: HasSpellShield
public bool HasSpellShield(Obj_AI_Hero target)
{
if (target.Buffs.Any(b => b.IsValid
&& (b.DisplayName == "bansheesveil"
|| b.DisplayName == "SivirE"
|| b.DisplayName == "NocturneW")))
{
return true;
}
return target.HasBuffOfType(BuffType.SpellShield) || target.HasBuffOfType(BuffType.SpellImmunity);
}
示例4: ShouldUseCleanse
/// <summary>
/// Defines whether the player should use cleanse.
/// </summary>
public static bool ShouldUseCleanse(Obj_AI_Hero target)
=>
!ObjectManager.Player.IsInvulnerable &&
!IsSpellShielded(ObjectManager.Player) &&
(
Bools.IsValidStun() ||
Bools.IsValidSnare() ||
target.HasBuff("summonerdot") ||
target.HasBuff("summonerexhaust") ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Polymorph)
);
示例5: CanMove
public static bool CanMove(Obj_AI_Hero target)
{
return !(target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) || target.HasBuffOfType(BuffType.Knockback) ||
target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Suppression) ||
target.IsStunned || target.IsChannelingImportantSpell());
}
示例6: CanMove
/// <summary>
/// Judge Target MoveMent Status (This Part From SebbyLib)
/// </summary>
/// <param name="Target">Target</param>
/// <returns></returns>
public static bool CanMove(Obj_AI_Hero Target)
{
if (Target.MoveSpeed < 50 || Target.IsStunned || Target.HasBuffOfType(BuffType.Stun) ||
Target.HasBuffOfType(BuffType.Fear) || Target.HasBuffOfType(BuffType.Snare) ||
Target.HasBuffOfType(BuffType.Knockup) || Target.HasBuff("Recall") ||
Target.HasBuffOfType(BuffType.Knockback) || Target.HasBuffOfType(BuffType.Charm) ||
Target.HasBuffOfType(BuffType.Taunt) || Target.HasBuffOfType(BuffType.Suppression)
|| (Target.IsCastingInterruptableSpell() && !Target.IsMoving))
{
return false;
}
else
return true;
}
示例7: ShouldCleanse
/// <summary>
/// Gets a value indicating whether BuffType is worth cleansing.
/// </summary>
public static bool ShouldCleanse(Obj_AI_Hero target)
=>
ObjectManager.Get<Obj_AI_Hero>().Any(t => t.IsEnemy && t.IsValidTarget(1500f))
&& !TargetSelector.IsInvulnerable(ObjectManager.Player, TargetSelector.DamageType.Magical, false)
&& (target.HasBuffOfType(BuffType.Flee) || target.HasBuffOfType(BuffType.Charm)
|| target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Knockup)
|| target.HasBuffOfType(BuffType.Knockback) || target.HasBuffOfType(BuffType.Polymorph)
|| target.HasBuffOfType(BuffType.Suppression) || target.HasBuffOfType(BuffType.Stun));
示例8: OnInterruptableTarget
private void OnInterruptableTarget(Obj_AI_Hero target, Interrupter2.InterruptableTargetEventArgs args)
{
if (E.CanCast(target) && config.Item("useEint", true).GetValue<bool>())
{
if (E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue<bool>()))
{
return;
}
}
if (R.CanCast(target) && config.Item("useRint", true).GetValue<bool>())
{
if (savedQ != null && !SimpleQ && !target.IsMoving && target.Distance(qPos) > QExplosionRange &&
target.Distance(player) < R.Range - 100 &&
target.Position.Distance(savedQ.position) < 550 + QExplosionRange / 2 &&
!target.HasBuffOfType(BuffType.Knockback))
{
var cast = Prediction.GetPrediction(target, 1000f).UnitPosition.Extend(savedQ.position, -100);
R.Cast(cast);
}
else if (target.Distance(player) < R.Range - 100)
{
if (player.CountEnemiesInRange(2000) <= player.CountAlliesInRange(2000))
{
var cast = target.Position.Extend(player.Position, -100);
R.Cast(cast);
}
else
{
var cast = target.Position.Extend(player.Position, 100);
R.Cast(cast);
}
}
}
}
示例9: CastSkillshot
public void CastSkillshot(Obj_AI_Hero t, Spell s, HitChance hc = HitChance.High)
{
if (!s.IsSkillshot)
return;
PredictionOutput p = s.GetPrediction(t);
if (s.Collision)
{
for (int i = 0; i < p.CollisionObjects.Count; i++)
if (!p.CollisionObjects[i].IsDead && (p.CollisionObjects[i].IsEnemy || p.CollisionObjects[i].IsMinion))
return;
}
if ((t.HasBuffOfType(BuffType.Slow) && p.Hitchance >= HitChance.High) || p.Hitchance == HitChance.Immobile)
s.Cast(p.CastPosition);
else if (t.IsRecalling())
s.Cast(t.ServerPosition);
else
{
if (s.IsReady())
{
s.SPredictionCast(t, hc);
}
}
}
示例10: Check
public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
{
try
{
if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
{
return true;
}
foreach (var invulnerable in Items)
{
if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
{
if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
{
if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
{
return true;
}
if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
{
return true;
}
}
}
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
示例11: Check
public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
{
if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
{
return true;
}
foreach (var invulnerable in Items)
{
if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
{
if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
{
if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
{
return true;
}
if (invulnerable.CustomCheck != null)
{
return CustomCheck(invulnerable, target, damageType);
}
}
}
}
return false;
}
示例12: CheckNoDamageBuffs
// From Asuna
public static bool CheckNoDamageBuffs(Obj_AI_Hero target)
{
foreach (var b in target.Buffs.Where(b => b.IsValidBuff()))
{
switch (b.DisplayName)
{
case "Chrono Shift":
return true;
case "JudicatorIntervention":
return true;
case "Undying Rage":
if (target.ChampionName == "Tryndamere")
return true;
continue;
//Spell Shields
case "bansheesveil":
return true;
case "SivirE":
return true;
case "NocturneW":
return true;
}
}
if (target.ChampionName == "Poppy" && HeroManager.Allies.Any(
o =>
{
return !o.IsMe
&& o.Buffs.Any(
b =>
b.Caster.NetworkId == target.NetworkId && b.IsValidBuff()
&& b.DisplayName == "PoppyDITarget");
}))
{
return true;
}
return (target.HasBuffOfType(BuffType.Invulnerability)
|| target.HasBuffOfType(BuffType.SpellImmunity));
// || target.HasBuffOfType(BuffType.SpellShield));
}
示例13: Immobilized
public bool Immobilized(Obj_AI_Hero target)
{
return target.HasBuffOfType(BuffType.Stun)
|| target.HasBuffOfType(BuffType.Snare)
|| target.HasBuffOfType(BuffType.Knockup)
|| target.HasBuffOfType(BuffType.Knockback)
|| target.HasBuffOfType(BuffType.Charm)
|| target.HasBuffOfType(BuffType.Fear)
|| target.HasBuffOfType(BuffType.Taunt)
|| target.HasBuffOfType(BuffType.Suppression);
}
示例14: immobileTarget
public static bool immobileTarget(Obj_AI_Hero target)
{
if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) || target.HasBuffOfType(BuffType.Knockback) ||
target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Suppression) ||
target.IsStunned)
{
return true;
}
else
return false;
}
示例15: CanMove
public static bool CanMove(Obj_AI_Hero target)
{
if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) || target.HasBuffOfType(BuffType.Knockback) ||
target.HasBuffOfType(BuffType.Taunt) || target.HasBuffOfType(BuffType.Suppression) ||
target.IsStunned || (target.IsChannelingImportantSpell() && !target.IsMoving) || target.MoveSpeed < 50 || Prediction.GetPrediction(target,0.5f).Hitchance > HitChance.Dashing)
{
return false;
}
else
return true;
}