本文整理汇总了C#中Obj_AI_Base.HasBuffOfType方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Base.HasBuffOfType方法的具体用法?C# Obj_AI_Base.HasBuffOfType怎么用?C# Obj_AI_Base.HasBuffOfType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Base
的用法示例。
在下文中一共展示了Obj_AI_Base.HasBuffOfType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsImmobile
/// <summary>
/// Gets a value indicating whether a determined champion can move or not.
/// </summary>
public static bool IsImmobile(Obj_AI_Base target)
{
if (target is Obj_AI_Minion ||
target is Obj_AI_Turret)
{
return target.HasBuff("teleport_target");
}
else if (target is AIHeroClient)
{
return
target.HasBuff("rebirth") ||
target.HasBuff("zhonyasringshield") ||
target.MoveSpeed < 150 ||
(target as AIHeroClient).LSIsRecalling() ||
(target as AIHeroClient).IsCastingInterruptableSpell() ||
IsValidStun(target as AIHeroClient) ||
IsValidSnare(target as AIHeroClient) ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Suppression);
}
return false;
}
示例2: HasDebuff
protected static bool HasDebuff(Obj_AI_Base target)
{
return target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Fear) ||
target.HasBuffOfType(BuffType.Poison) || target.HasBuffOfType(BuffType.Polymorph) ||
target.HasBuffOfType(BuffType.Silence) || target.HasBuffOfType(BuffType.Sleep) ||
target.HasBuffOfType(BuffType.Slow) || target.HasBuffOfType(BuffType.Snare) ||
target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Taunt);
}
示例3: IsStunned
public static bool IsStunned(Obj_AI_Base target)
{
if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) ||
target.HasBuffOfType(BuffType.Suppression) || target.HasBuffOfType(BuffType.Taunt))
return true;
return false;
}
示例4: CanKill
public static bool CanKill(Obj_AI_Base e)
{
if (e.HasBuffOfType(BuffType.PhysicalImmunity) || e.HasBuffOfType(BuffType.SpellImmunity) || e.IsZombie
|| e.IsInvulnerable || e.HasBuffOfType(BuffType.Invulnerability) || e.HasBuffOfType(BuffType.SpellShield)
|| e.HasBuff("deathdefiedbuff") || e.HasBuff("Undying Rage") || e.HasBuff("Chrono Shift"))
{
return false;
}
else
{
return true;
}
}
示例5: Cast
/// <summary>
/// Casts R Logic.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="activeMode">The active mode.</param>
public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
{
if (!ShouldCast() || !target.Valid(R.Range)) return;
if (Player.Instance.IsInAutoAttackRange(target) && Player.Instance.GetAutoAttackDamage(target, true) > target.Health && Orbwalker.CanAutoAttack)
{
return;
}
if (Q.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.Q) > target.Health && Q.IsInRange(target))
{
return;
}
if (E.IsReady() && Player.Instance.GetSpellDamage(target, SpellSlot.E) > target.Health && E.IsInRange(target))
{
return;
}
switch (activeMode)
{
case Orbwalker.ActiveModes.Combo:
if (target.HasBuff("LuxIlluminatingFraulein"))
{
if (Killable(target, (10 + 8 * Player.Instance.Level)))
{
if (target.HasBuffOfType(BuffType.Snare))
R.Cast(target.Position);
else if (target.HasBuffOfType(BuffType.Slow))
HitChanceCast(R, target);
else
R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
}
}
else
{
if (Killable(target))
{
if (target.IsRooted)
R.Cast(target.Position);
else if (target.HasBuffOfType(BuffType.Slow))
HitChanceCast(R, target);
else
R.Cast(Prediction.Position.PredictUnitPosition(target, 500).To3D());
}
}
break;
}
}
示例6: ValidUlt
public static bool ValidUlt(Obj_AI_Base target)
{
if (target.HasBuffOfType(BuffType.PhysicalImmunity)
|| target.HasBuffOfType(BuffType.SpellImmunity)
|| target.IsZombie
|| target.IsInvulnerable
|| target.HasBuffOfType(BuffType.Invulnerability)
|| target.HasBuffOfType(BuffType.SpellShield)
|| target.HasBuff("deathdefiedbuff")
|| target.HasBuff("Undying Rage")
|| target.HasBuff("Chrono Shift")
)
return false;
else
return true;
}
示例7: CheckFor
private static bool CheckFor(Spell spell, Obj_AI_Base target, float spellrange, string menuitem)
{
if (spell.IsReady() && target.IsValidTarget(spellrange) && !target.HasBuffOfType(BuffType.Invulnerability) && !target.HasBuff("UndyingRage") && !target.IsDead && Config.Item(menuitem).GetValue<bool>() == true)
{
return true;
}
else return false;
}
示例8: Immobile
private static bool Immobile(Obj_AI_Base unit)
{
return unit.HasBuffOfType(BuffType.Charm) || unit.HasBuffOfType(BuffType.Stun) ||
unit.HasBuffOfType(BuffType.Knockup) || unit.HasBuffOfType(BuffType.Snare) ||
unit.HasBuffOfType(BuffType.Taunt) || unit.HasBuffOfType(BuffType.Suppression) ||
unit.HasBuffOfType(BuffType.Polymorph);
}
示例9: CanMove
public static bool CanMove(Obj_AI_Base 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))
{
return false;
}
return true;
}
示例10: IsImmobile
/// <summary>
/// Gets a value indicating whether a determined champion can move or not.
/// </summary>
public static bool IsImmobile(Obj_AI_Base target)
{
return
target.MoveSpeed < 150 ||
target.HasBuff("rebirth") ||
target.HasBuff("chronorevive") ||
target.HasBuff("lissandrarself") ||
target.HasBuff("teleport_target") ||
target.HasBuff("woogletswitchcap") ||
target.HasBuff("zhonyasringshield") ||
target.HasBuff("aatroxpassivedeath") ||
IsValidStun(target as AIHeroClient) ||
IsValidSnare(target as AIHeroClient) ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Knockup) ||
target.HasBuffOfType(BuffType.Suppression) ||
(target as AIHeroClient).IsCastingInterruptableSpell();
}
示例11: GetDamage
public float GetDamage(Obj_AI_Base x)
{
if (x == null
|| x.IsInvulnerable
|| x.HasBuffOfType(BuffType.SpellShield)
|| x.HasBuffOfType(BuffType.SpellImmunity))
{
return 0;
}
float dmg = 0;
if (!ObjectManager.Player.IsWindingUp)
{
dmg += (float)ObjectManager.Player.GetAutoAttackDamage(x);
}
if (Spells.Q.IsReady())
{
dmg += Spells.Q.GetDamage(x);
}
if (Spells.W2.IsReady())
{
dmg += Spells.W2.GetDamage(x);
}
if (Spells.E.IsReady())
{
dmg += Spells.E.GetDamage(x);
}
if (Spells.R2.IsReady())
{
dmg += Spells.R2.GetDamage(x);
}
return dmg;
}
示例12: IsEnemyUnkillable
private static bool IsEnemyUnkillable(Obj_AI_Base target)
{
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "UndyingRage"))
{
return true;
}
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "ChronoShift"))
{
return true;
}
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "JudicatorIntervention"))
{
return true;
}
return target.Buffs.Any(b => b.IsValid() && b.DisplayName == "kindredrnodeathbuff") || target.HasBuffOfType(BuffType.Invulnerability);
}
示例13: Smiteontarget
private static void Smiteontarget(Obj_AI_Base hero)
{
var smitered = Player.Spells.FirstOrDefault(spell => spell.Name.ToLower().Contains("s5_summonersmiteduel"));
var smiteblue =
Player.Spells.FirstOrDefault(spell => spell.Name.ToLower().Contains("s5_summonersmiteplayerganker"));
if (smiteblue !=null|| smitered !=null)
{
var smiteDmg = _player.GetSummonerSpellDamage(hero, DamageLibrary.SummonerSpells.Smite);
var usesmite = _combo["smitecombo"].Cast<CheckBox>().CurrentValue;
if (SmiteBlue.Any(i => Item.HasItem(i)) && usesmite &&
ObjectManager.Player.Spellbook.CanUseSpell(_smiteSlot) == SpellState.Ready &&
hero.IsValidTarget(_smite.Range))
{
if (!hero.HasBuffOfType(BuffType.Stun) || !hero.HasBuffOfType(BuffType.Slow))
{
ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
}
else if (smiteDmg >= hero.Health)
{
ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
}
}
if (SmiteRed.Any(i => Item.HasItem(i)) && usesmite &&
ObjectManager.Player.Spellbook.CanUseSpell(_smiteSlot) == SpellState.Ready &&
hero.IsValidTarget(_smite.Range))
{
ObjectManager.Player.Spellbook.CastSpell(_smiteSlot, hero);
}
}
}
示例14: IsPoisoned
public bool IsPoisoned(Obj_AI_Base target)
{
if (target == null)
{
return false;
}
if (!CachedPoisoned.ContainsKey(target.NetworkId))
{
CachedPoisoned[target.NetworkId] = false;
if (target.HasBuffOfType(BuffType.Poison))
{
var bestEndTime =
target.Buffs.Where(b => b.IsActive && b.Type == BuffType.Poison && b.EndTime > 0)
.OrderByDescending(b => b.EndTime)
.FirstOrDefault();
if (bestEndTime != null && bestEndTime.EndTime - Game.Time >= E.GetArrivalTime(target) / 1000f)
{
CachedPoisoned[target.NetworkId] = true;
}
}
}
return CachedPoisoned[target.NetworkId];
}
示例15: ValidUlt
public static bool ValidUlt(Obj_AI_Base target)
{
if (target.HasBuffOfType(BuffType.PhysicalImmunity)
|| target.HasBuffOfType(BuffType.SpellImmunity)
|| target.IsZombie
|| target.IsInvulnerable
|| target.HasBuffOfType(BuffType.Invulnerability)
|| target.HasBuffOfType(BuffType.SpellShield)
)
return false;
else
return true;
}