本文整理汇总了C#中AIHeroClient.IsInRange方法的典型用法代码示例。如果您正苦于以下问题:C# AIHeroClient.IsInRange方法的具体用法?C# AIHeroClient.IsInRange怎么用?C# AIHeroClient.IsInRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AIHeroClient
的用法示例。
在下文中一共展示了AIHeroClient.IsInRange方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Combo1
private static void Combo1(AIHeroClient t)
{
if (SpellManager.E.IsReady() && t.IsInRange(Player.Instance.Position, SpellManager.E.Range) && ConfigList.Combo.ComboE)
{
var d = Dagger.GetClosestDagger();
if (t.Position.IsInRange(d, SpellManager.W.Range)) SpellManager.E.CastE(Damage.GetBestDaggerPoint(d, t));
else
if (Player.Instance.Distance(t) >= SpellManager.W.Range)
SpellManager.E.CastE(t.Position);
}
if (SpellManager.W.IsLearned && !SpellManager.W.IsOnCooldown && ConfigList.Combo.ComboW)
{
if (t.IsInRange(Player.Instance.Position, SpellManager.W.Range))
SpellManager.W.Cast();
}
if (SpellManager.Q.CanCast(t) && ConfigList.Combo.ComboQ)
{
SpellManager.Q.Cast(t);
}
if (SpellManager.R.IsLearned && !SpellManager.R.IsOnCooldown && ConfigList.Combo.ComboR)
{
if (Player.Instance.CountEnemyChampionsInRange(ConfigList.Combo.MaxRCastRange) < ConfigList.Combo.MinToUseR) return;
if (Damage.GetQDamage(t) + Damage.GetPDamage(t) + Damage.GetEDamage(t) + Player.Instance.GetAutoAttackDamage(t, true) >= t.TotalShieldHealth()) return;
if (Orbwalker.IsAutoAttacking && !Orbwalker.DisableAttacking)
{
Orbwalker.DisableAttacking = true;
Orbwalker.ResetAutoAttack();
}
SpellManager.R.Cast();
Damage.FreezePlayer();
}
}
示例2: Cast
internal bool Cast(AIHeroClient target, bool farmcast = false)
{
if (!item.IsReady())
{
return false;
}
if (!farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) &&
Player.LSCountEnemiesInRange(item.Range) >= eneinrangecount)
{
item.Cast();
return true;
}
if (type == ItemCastType.TargettedCast && target.IsInRange(item.Range))
{
item.Cast(target);
return true;
}
}
else if (farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) && ObjectManager.Get<Obj_AI_Minion>().Count(x=> x.LSIsValidTarget(item.Range)) >= minioncount)
{
item.Cast();
return true;
}
}
return false;
}
示例3: Gapcloser_OnGapcloser
private static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
if (!Settings.GapE && !SpellManager.E.IsReady() && sender.IsAlly) return;
if (sender.IsEnemy && sender.IsVisible && sender.IsInRange(Player.Instance, SpellManager.E.Range))
{
SpellManager.E.Cast(Player.Instance.Position.Shorten(sender.Position, SpellManager.E.Range));
}
}
示例4: Gapcloser_OnGapcloser
private static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
if (!sender.IsEnemy) return;
if (sender.IsEnemy && sender.IsInRange(Player.Instance, SpellManager.R.Range) && Player.Instance.Distance(e.End) < SpellManager.R.Range && Misc.AntiGapCloser)
{
SpellManager.R.Cast(sender);
}
}
示例5: GetBestCombo
private static void GetBestCombo(AIHeroClient t)
{
if (t.IsInRange(Player.Instance, SpellManager.Q.Range) && !t.IsInRange(Player.Instance, SpellManager.E.Range)) Combo3(t);
else Combo2(t);
}
示例6: Gapcloser_OnGapcloser
// Thanks MarioGK has allowed me to use some his logic
private static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
{
if (Misc["AntiGap"].Cast<CheckBox>().CurrentValue && W.IsReady() && sender.IsEnemy && sender.IsVisible && sender.IsInRange(Player.Instance, 450))
{
W.Cast(Player.Instance.Position.Shorten(sender.Position, W.Range));
}
}
示例7: checkQDelayedCast
public static void checkQDelayedCast(AIHeroClient enemy)
{
if (enemy.HealthPercent == 0 || !enemy.IsInRange(Player.Instance, SpellManager.Q.MaximumRange))
{
SpellManager.isCharging = true;
return;
}
SpellManager.Q.Cast(SpellManager.Q.GetPrediction(enemy).CastPosition);
}
示例8: RoverkillCheck
public static bool RoverkillCheck(AIHeroClient enemy)
{
//TODO check if enemy.Allies = my allies??
if (enemy.CountAlliesInRange(650) > 1)
{
return false;
}
if (enemy.IsInRange(Player.Instance, Range) && Player.Instance.CountEnemiesInRange(Range) == 1 && Player.Instance.HealthPercent < 20)
{
return true;
}
if (Player.Instance.CountEnemiesInRange(Range) > 0)
{
return false;
}
return true;
}
示例9: CastENew
internal void CastENew(AIHeroClient target)
{
if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash)
{
return;
}
var minionsinrange = ObjectManager.Get<Obj_AI_Minion>().Any(x => x.IsDashable());
if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range))
{
target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range,
DamageType.Physical);
}
if (target != null && TowerCheck(target, true))
{
var dist = Yasuo.LSDistance(target);
var pctOutOfRange = dist / Yasuo.AttackRange * 100;
if (pctOutOfRange > 0.8f)
{
if (target.IsDashable())
{
if (target.ECanKill())
{
return;
}
if (TornadoReady && target.IsInRange(Spells[E].Range) && targInKnockupRadius(target))
{
Spells[E].CastOnUnit(target);
}
//Stay in range
else if (pctOutOfRange > 0.8f)
{
var bestminion = ObjectManager.Get<Obj_AI_Base>()
.Where(x =>
x.IsDashable()
&& GetDashPos(x).IsCloser(target) && TowerCheck(x, true))
.MinOrDefault(x => GetDashPos(x).LSDistance(target));
var shouldETarget = bestminion == null || GetDashPos(target).Distance(target) <
GetDashPos(bestminion).LSDistance(target);
if (shouldETarget && GetDashPos(target).IsCloser(target))
{
Spells[E].CastOnUnit(target);
}
else if (bestminion != null)
{
Spells[E].CastOnUnit(bestminion);
}
}
}
else
{
var minion = ObjectManager.Get<Obj_AI_Minion>()
.Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true))
.MinOrDefault(x => GetDashPos(x).LSDistance(target));
if (minion != null)
{
Spells[E].CastOnUnit(minion);
}
}
}
}
}
示例10: CastQ
internal void CastQ(AIHeroClient target)
{
if (target != null && !target.IsInRange(Qrange))
{
target = TargetSelector.GetTarget(Qrange, DamageType.Physical);
}
if (target != null)
{
if (Spells[Q].IsReady() && target.IsValidEnemy(Qrange))
{
UseQ(target, GetHitChance("Hitchance.Q"), GetBool("Combo.UseQ", YasuoMenu.ComboM), GetBool("Combo.UseQ2", YasuoMenu.ComboM));
return;
}
if (GetBool("Combo.StackQ", YasuoMenu.ComboM) && !target.IsValidEnemy(Qrange) && !TornadoReady && !Yasuo.LSIsDashing() && !InDash)
{
var bestmin =
ObjectManager.Get<Obj_AI_Minion>()
.Where(x => x.IsValidMinion(Qrange) && MinionManager.IsMinion(x, false))
.MinOrDefault(x => x.LSDistance(Yasuo));
if (bestmin != null)
{
var pred = Spells[Q].GetPrediction(bestmin);
if (pred.Hitchance >= HitChance.Medium)
{
Spells[Q].Cast(bestmin);
}
}
}
}
}
示例11: CastEOld
internal void CastEOld(AIHeroClient target, bool force = false)
{
var minionsinrange = ObjectManager.Get<Obj_AI_Minion>().Any(x => x.IsDashable());
if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range))
{
target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range, DamageType.Physical);
}
if (target != null)
{
if (SpellSlot.E.IsReady() && isHealthy && target.LSDistance(Yasuo) >= 0.30 * Yasuo.AttackRange)
{
if (TornadoReady && ((GetBool("Combo.ETower", YasuoMenu.ComboM) && GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM)) || !GetDashPos(target).PointUnderEnemyTurret()))
{
Spells[E].CastOnUnit(target);
return;
}
if (DashCount >= 1 && GetDashPos(target).IsCloser(target) && target.IsDashable() &&
(GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(target).PointUnderEnemyTurret()))
{
Spells[E].CastOnUnit(target);
return;
}
if (DashCount == 0)
{
var bestminion =
ObjectManager.Get<Obj_AI_Base>()
.Where(
x =>
x.IsDashable()
&& GetDashPos(x).IsCloser(target) &&
(GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret()))
.OrderBy(x => Vector2.Distance(GetDashPos(x), target.ServerPosition.LSTo2D()))
.FirstOrDefault();
if (bestminion != null)
{
Spells[E].CastOnUnit(bestminion);
}
else if (target.IsDashable() && GetDashPos(target).IsCloser(target) && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(target).PointUnderEnemyTurret()))
{
Spells[E].CastOnUnit(target);
}
}
else
{
var minion =
ObjectManager.Get<Obj_AI_Base>()
.Where(x => x.IsDashable() && GetDashPos(x).IsCloser(target) && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret()))
.OrderBy(x => GetDashPos(x).LSDistance(target.ServerPosition)).FirstOrDefault();
if (minion != null && GetDashPos(minion).IsCloser(target))
{
Spells[E].CastOnUnit(minion);
}
}
}
}
}