本文整理汇总了C#中AIHeroClient.HasBuffOfType方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.HasBuffOfType方法的具体用法?C# AIHeroClient.HasBuffOfType怎么用?C# AIHeroClient.HasBuffOfType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.HasBuffOfType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanStun
public static bool CanStun(AIHeroClient unit, bool ECheck = false)
{
if (unit.HasBuffOfType(BuffType.SpellImmunity) || unit.HasBuffOfType(BuffType.SpellShield) || Player.Instance.IsDashing()) return false;
if (ECheck && !E.IsReady()) return false;
var prediction = Prediction.Position.PredictUnitPosition(unit, 400);
var predictionsList = new List<Vector3>
{
unit.ServerPosition,
unit.Position,
prediction.To3D(),
};
var wallsFound = 0;
foreach (var position in predictionsList)
{
for (var i = 0; i < 300; i += (int) unit.BoundingRadius)
{
var cPos = Player.Instance.Position.Extend(position, Player.Instance.Distance(position) + i).To3D();
if (cPos.IsWall())
{
wallsFound++;
break;
}
}
}
if ((wallsFound / predictionsList.Count) >= Settings.MiscSettings.StunPercent / 100f)
{
return true;
}
return false;
}
示例2: IsCondemable
public static bool IsCondemable(AIHeroClient unit, Vector2 pos = new Vector2())
{
if (unit.HasBuffOfType(BuffType.SpellImmunity) || unit.HasBuffOfType(BuffType.SpellShield) || LastCheck + 50 > Environment.TickCount || Variables._Player.IsDashing()) return false;
var prediction = SpellManager.E2.GetPrediction(unit);
var predictionsList = pos.IsValid() ? new List<Vector3>() { pos.To3D() } : new List<Vector3>
{
unit.ServerPosition,
unit.Position,
prediction.CastPosition,
prediction.UnitPosition
};
var wallsFound = 0;
Points = new List<Vector2>();
foreach (var position in predictionsList)
{
for (var i = 0; i < MenuManager.CondemnPushDistance; i += (int)unit.BoundingRadius)
{
var cPos = ObjectManager.Player.Position.Extend(position, ObjectManager.Player.Distance(position) + i).To3D();
Points.Add(cPos.To2D());
if (NavMesh.GetCollisionFlags(cPos).HasFlag(CollisionFlags.Wall) || NavMesh.GetCollisionFlags(cPos).HasFlag(CollisionFlags.Building))
{
wallsFound++;
break;
}
}
}
if ((wallsFound / predictionsList.Count) >= 33 / 100f)
{
return true;
}
return false;
}
示例3: IsCondemnable
public static bool IsCondemnable(AIHeroClient target)
{
if (Misc.IsChecked(MiscMenu, "dnCondemn" + target.ChampionName.ToLower()))
{
return false;
}
if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;
var predPos = Prediction.Position.PredictUnitPosition(target, 500);
var position = _Player.Position.Extend(target.Position, _Player.Distance(target) - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin")).To3D();
var predictPos = _Player.Position.Extend(predPos, _Player.Distance(predPos) - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin")).To3D();
for (var i = 0; i < 470 - Misc.GetSliderValue(MiscMenu, "condenmErrorMargin"); i += 10)
{
var cPos = _Player.Position.Extend(position, _Player.Distance(position) + i).To3D();
var cPredPos = _Player.Position.Extend(predictPos, _Player.Distance(predictPos) + i).To3D();
if ((cPredPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPredPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building)) && (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building)))
{
return true;
}
}
return false;
}
示例4: IsSpellShielded
/// <summary>
/// Gets a value indicating whether the target has protection or not.
/// </summary>
public static bool IsSpellShielded(AIHeroClient unit)
{
return unit.IsInvulnerable ||
unit.HasBuffOfType(BuffType.SpellShield) ||
unit.HasBuffOfType(BuffType.SpellImmunity) ||
Utils.TickCount - unit.LastCastedSpellT() < 300 &&
(
unit.LastCastedSpellName().Equals("SivirE", StringComparison.InvariantCultureIgnoreCase) ||
unit.LastCastedSpellName().Equals("BlackShield", StringComparison.InvariantCultureIgnoreCase) ||
unit.LastCastedSpellName().Equals("NocturneShit", StringComparison.InvariantCultureIgnoreCase)
);
}
示例5: IsUltable
public static bool IsUltable(AIHeroClient target)
{
if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;
var posicao = Program._Player.Position.Extend(target.Position, Program._Player.Distance(target) - getSliderValue(Program.ComboMenu, "useRComboSlider")).To3D();
for (int i = 0; i < 480 - getSliderValue(Program.ComboMenu, "useRComboSlider"); i += 10)
{
var cPos = _Player.Position.Extend(posicao, _Player.Distance(posicao) + i).To3D();
if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
{
return true;
}
}
return false;
}
示例6: ShouldCleanse
/// <summary>
/// Gets a value indicating whether BuffType is worth cleansing.
/// </summary>
public static bool ShouldCleanse(AIHeroClient target)
{
return !Invulnerable.Check(target) &&
GameObjects.EnemyHeroes.Any(t => t.LSIsValidTarget(1500f)) &&
(
IsValidStun() ||
IsValidSnare() ||
target.HasBuffOfType(BuffType.Flee) ||
target.HasBuffOfType(BuffType.Charm) ||
target.HasBuffOfType(BuffType.Taunt) ||
target.HasBuffOfType(BuffType.Polymorph) ||
GameObjects.Player.HasBuff("ThreshQ") ||
GameObjects.Player.HasBuff("SummonerDot")
);
}
示例7: IsCondenavel
public static bool IsCondenavel(AIHeroClient target)
{
if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || Program._Player.IsDashing()) return false;
var posicao = Program._Player.Position.Extend(target.Position, Program._Player.Distance(target) - 20).To3D();
for (int i = 0; i < 470 - 20; i += 10)
{
var cPos = Program._Player.Position.Extend(posicao, Program._Player.Distance(posicao) + i).To3D();
if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
{
return true;
}
}
return false;
}
示例8: HasSpellShield
public static bool HasSpellShield(AIHeroClient target)
{
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "bansheesveil"))
{
return true;
}
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "SivirE"))
{
return true;
}
if (target.Buffs.Any(b => b.IsValid() && b.DisplayName == "NocturneW"))
{
return true;
}
return target.HasBuffOfType(BuffType.SpellShield) || target.HasBuffOfType(BuffType.SpellImmunity);
}
示例9: Check
public static bool Check(AIHeroClient 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)
{
Console.WriteLine(ex);
}
return false;
}
示例10: RCast
public static void RCast(AIHeroClient target)
{
if (target.HasBuffOfType(BuffType.Invulnerability)) return;
if (!Spells.R.IsReady() || !target.IsValidTarget(Spells.R.Range)) return;
if (DamageLib.RDamage(target) < target.Health) return;
Spells.R.Cast(target);
}
示例11: CC
static bool CC(AIHeroClient unit)
{
return unit.HasBuffOfType(BuffType.Charm) || unit.HasBuffOfType(BuffType.Fear)
|| unit.HasBuffOfType(BuffType.Snare)
|| unit.HasBuffOfType(BuffType.Taunt) || unit.HasBuffOfType(BuffType.Stun)
|| unit.HasBuffOfType(BuffType.Knockup) || unit.HasBuffOfType(BuffType.Suppression);
}
示例12: NormalMode
public void NormalMode(EkkoCore core, AIHeroClient target, bool useQ, bool useE, bool useW)
{
if (useQ && (core.Player.Distance(target) > core.spells.E.Range || core.Player.Distance(target) <= 100 && (core.spells.E.IsReady()) && useE))
{
var predQ = core.spells.Q.GetPrediction(target);
if (predQ.HitChance >= HitChance.High)
{
core.spells.Q.Cast(predQ.CastPosition);
}
}
if (useE && core.Player.Distance(target) > core.spells.E.Range * 2)
{
this.CastE(target, core,useQ);
}
if (useW && core.spells.W.IsInRange(target) && (target.HasBuffOfType(BuffType.Slow) ||target.HasBuffOfType(BuffType.Stun) ))
{
core.spells.W.Cast(target.Position);
}
}
示例13: IsEnemyImmobile
/// <summary>
/// Enemy Immobile
/// </summary>
/// <param name="target"></param>
/// <returns></returns>
public static bool IsEnemyImmobile(AIHeroClient 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())
{
return true;
}
return false;
}
示例14: IsCondemnable
public static bool IsCondemnable(AIHeroClient target)
{
if (isChecked(Vayne.CondemnMenu, "dnCondemn" + target.ChampionName.ToLower()))
{
return false;
}
if (target.HasBuffOfType(BuffType.SpellImmunity) || target.HasBuffOfType(BuffType.SpellShield) || _Player.IsDashing()) return false;
var position = Vayne._Player.Position.Extend(target.Position, Vayne._Player.Distance(target) - getSliderValue(Vayne.CondemnMenu, "condenmErrorMargin")).To3D();
for (int i = 0; i < 470 - getSliderValue(Vayne.CondemnMenu, "condenmErrorMargin"); i += 10)
{
var cPos = _Player.Position.Extend(position, _Player.Distance(position) + i).To3D();
if (cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Wall) || cPos.ToNavMeshCell().CollFlags.HasFlag(CollisionFlags.Building))
{
return true;
}
}
return false;
}
示例15: Immobilize
public static bool Immobilize(AIHeroClient 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.IsRecalling())
{
return true;
}
else
{
return false;
}
}