本文整理汇总了C#中Obj_AI_Hero.CountAlliesInRange方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.CountAlliesInRange方法的具体用法?C# Obj_AI_Hero.CountAlliesInRange怎么用?C# Obj_AI_Hero.CountAlliesInRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.CountAlliesInRange方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanR
internal static bool CanR(Obj_AI_Hero unit)
{
if (Me.HealthPercent <= 35 && unit.Distance(Me.ServerPosition) <= Me.AttackRange + 65)
{
return true;
}
if (unit.IsZombie || TargetSelector.IsInvulnerable(unit, TargetSelector.DamageType.Physical))
{
return false;
}
if (unit.CountAlliesInRange(400) >= 2 &&
Me.GetAutoAttackDamage(unit, true) * 6 >= unit.Health)
{
return false;
}
if (Orbwalking.InAutoAttackRange(unit) &&
Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
{
return false;
}
if (Buckshot.IsReady() && unit.Distance(Me.ServerPosition) <= Buckshot.Range &&
Buckshot.GetDamage(unit) >= unit.Health)
{
return false;
}
if (Quickdraw.IsReady() && unit.Distance(Me.ServerPosition) <= Quickdraw.Range + 25 &&
Me.GetAutoAttackDamage(unit, true) * 3 >= unit.Health)
{
return false;
}
return true;
}
示例2: GetRealDmg
public static float GetRealDmg(Spell QWER, Obj_AI_Hero target)
{
if (Orbwalking.InAutoAttackRange(target) || target.CountAlliesInRange(300) > 0)
return QWER.GetDamage(target) + (float)ObjectManager.Player.GetAutoAttackDamage(target) * 2;
else
return QWER.GetDamage(target);
}
示例3: Interrupter2_OnInterruptableTarget
private static void Interrupter2_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
{
if (E.CanCast(sender))
{
if (Player.CountAlliesInRange(E.Range + 50) < sender.CountAlliesInRange(E.Range + 50))
{
E.Cast(sender);
}
else
{
E.CastToReverse(sender);
}
}
if (Q.CanCast(sender) && SpellQ.GetState()== QState.ThreshQ)
{
Q.Cast(sender);
}
}
示例4: GravesOnUpdate
internal static void GravesOnUpdate(EventArgs args)
{
Target = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);
if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
GravesCombo();
if (MainMenu.Item("autosmoke").GetValue<bool>() && Smokescreen.IsReady())
{
foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Smokescreen.Range)))
{
if (!Me.IsWindingUp && Utils.GameTimeTickCount - LE > 1100)
Smokescreen.CastIfHitchanceEquals(hero, HitChance.Immobile);
}
}
if (MainMenu.Item("fleekey").GetValue<KeyBind>().Active)
{
if (Utils.GameTimeTickCount - LM >= 100)
{
Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
LM = Utils.GameTimeTickCount;
}
if (Smokescreen.IsReady() && Target.IsValidTarget(Smokescreen.Range))
Smokescreen.CastIfHitchanceEquals(Target, HitChance.Medium);
else if (Quickdraw.IsReady())
{
if (Utils.GameTimeTickCount - LE > 500)
Quickdraw.Cast(Game.CursorPos);
}
}
if (MainMenu.Item("allin").GetValue<KeyBind>().Active)
{
if (!Me.Spellbook.IsCastingSpell)
Orbwalking.Orbwalk(Target, Game.CursorPos);
if (Target.IsValidTarget(Chargeshot.Range))
{
var rpred = Prediction.GetPrediction(Target, 0.25f).UnitPosition;
if (rpred.Distance(Me.ServerPosition) <= Quickdraw.Range + 200)
{
if (Chargeshot.IsReady() && Quickdraw.IsReady() && Buckshot.IsReady())
{
Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
}
}
}
}
if (Target.IsValidTarget() && Chargeshot.IsReady())
{
if (MainMenu.Item("shootr").GetValue<KeyBind>().Active)
Chargeshot.CastIfHitchanceEquals(Target, HitChance.VeryHigh);
if (MainMenu.Item("usercombo").GetValue<bool>())
{
if (Proj1(Target.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
MainMenu.Item("rmulti").GetValue<Slider>().Value)
{
if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
{
if (Target.CountAlliesInRange(750) >= 2)
Chargeshot.CastIfHitchanceEquals(Target, HitChance.High);
}
}
}
}
if (Chargeshot.IsReady())
{
foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(Chargeshot.Range)))
{
if (CanR(hero) && GetRDamage(hero) >= hero.Health && MainMenu.Item("secure").GetValue<bool>())
{
Chargeshot.CastIfHitchanceEquals(hero, HitChance.High);
}
}
}
}
示例5: GravesOnUpdate
static void GravesOnUpdate(EventArgs args)
{
var user = mainMenu.Item("usercombo").GetValue<bool>();
rtarget = TargetSelector.GetTarget(Chargeshot.Range, TargetSelector.DamageType.Physical);
if (rtarget.IsValidTarget() && Chargeshot.IsReady())
{
if (Kappa(rtarget.ServerPosition, Chargeshot.Width, Chargeshot.Range) >=
mainMenu.Item("rmulti").GetValue<Slider>().Value)
{
if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
{
if (rtarget.CountAlliesInRange(700) >= 2)
Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.Medium);
}
}
}
if (mainMenu.Item("combokey").GetValue<KeyBind>().Active)
GravesCombo();
if (mainMenu.Item("fleekey").GetValue<KeyBind>().Active)
{
if (!Me.IsImmovable)
Me.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
if (Smokescreen.IsReady() && rtarget.IsValidTarget(Smokescreen.Range))
Smokescreen.CastIfHitchanceEquals(rtarget, HitChance.Medium);
else if (Quickdraw.IsReady())
{
if (Utils.GameTimeTickCount - LastE > 500)
Quickdraw.Cast(Game.CursorPos);
}
}
if (GetRDamage(rtarget) >= rtarget.Health && user)
{
if (rtarget.Distance(Me.ServerPosition) <= Me.AttackRange &&
Me.GetAutoAttackDamage(rtarget, true) * 3 >= rtarget.Health)
return;
Chargeshot.CastIfHitchanceEquals(rtarget, HitChance.High);
}
}