本文整理汇总了C#中EloBuddy.LSIsValidTarget方法的典型用法代码示例。如果您正苦于以下问题:C# EloBuddy.LSIsValidTarget方法的具体用法?C# EloBuddy.LSIsValidTarget怎么用?C# EloBuddy.LSIsValidTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EloBuddy
的用法示例。
在下文中一共展示了EloBuddy.LSIsValidTarget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsKillableR
public static bool IsKillableR(EloBuddy.AIHeroClient target)
{
if (RKillable && target.LSIsValidTarget() && (totaldame(target) >= target.Health
&& basicdmg(target) <= target.Health) || Player.LSCountEnemiesInRange(900) >= 2 && (!target.HasBuff("kindrednodeathbuff") && !target.HasBuff("Undying Rage") && !target.HasBuff("JudicatorIntervention")))
{
return true;
}
return false;
}
示例2: IsCondemnable
private bool IsCondemnable(EloBuddy.AIHeroClient hero)
{
if (!hero.LSIsValidTarget(550f) || hero.HasBuffOfType(EloBuddy.BuffType.SpellShield) ||
hero.HasBuffOfType(EloBuddy.BuffType.SpellImmunity) || hero.IsDashing()) return false;
//values for pred calc pP = player position; p = enemy position; pD = push distance
var pP = EloBuddy.ObjectManager.Player.ServerPosition;
var p = hero.ServerPosition;
var pD = EPushDistanceSlider;
var mode = EModeStringList;
if (mode == 1 && (IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove)
return true;
var enemiesCount = EloBuddy.ObjectManager.Player.CountEnemyHeroesInRange(1200);
if (enemiesCount > 1 && enemiesCount <= 3)
{
var prediction = E.GetPrediction(hero);
for (var i = 15; i < pD; i += 75)
{
if (i > pD)
{
var lastPosFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-pD)
.ToVector3());
if (lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || lastPosFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
return false;
}
var posFlags = EloBuddy.NavMesh.GetCollisionFlags(
prediction.UnitPosition.ToVector2()
.Extend(
pP.ToVector2(),
-i)
.ToVector3());
if (posFlags.HasFlag(EloBuddy.CollisionFlags.Wall) || posFlags.HasFlag(EloBuddy.CollisionFlags.Building))
{
return true;
}
}
return false;
}
else
{
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD) return false;
if (IsCollisionable(pP.ToVector2().Extend(alpha,
i)
.ToVector3()) && IsCollisionable(pP.ToVector2().Extend(beta, i).ToVector3())) return true;
}
return false;
}
}
if (mode == 2 &&
(IsCollisionable(p.LSExtend(pP, -pD)) || IsCollisionable(p.LSExtend(pP, -pD / 2f)) ||
IsCollisionable(p.LSExtend(pP, -pD / 3f))))
{
if (!hero.CanMove ||
(hero.Spellbook.IsAutoAttacking))
return true;
var hitchance = EHitchanceSlider;
var angle = 0.20 * hitchance;
const float travelDistance = 0.5f;
var alpha = new Vector2((float)(p.X + travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X + travelDistance * Math.Sin(Math.PI / 180 * angle)));
var beta = new Vector2((float)(p.X - travelDistance * Math.Cos(Math.PI / 180 * angle)),
(float)(p.X - travelDistance * Math.Sin(Math.PI / 180 * angle)));
for (var i = 15; i < pD; i += 100)
{
if (i > pD)
{
return IsCollisionable(alpha.Extend(pP.ToVector2(),
-pD)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -pD).ToVector3());
}
if (IsCollisionable(alpha.Extend(pP.ToVector2(),
-i)
.ToVector3()) && IsCollisionable(beta.Extend(pP.ToVector2(), -i).ToVector3())) return true;
}
return false;
//.........这里部分代码省略.........
示例3: Interrupt
private static void Interrupt(EloBuddy.AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
{
if (sender.IsEnemy && W.IsReady() && sender.LSIsValidTarget() && !sender.IsZombie && WInterrupt)
{
if (sender.LSIsValidTarget(125 + Player.BoundingRadius + sender.BoundingRadius)) W.Cast();
}
}