本文整理汇总了C#中Obj_AI_Hero.IsKillableFromPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.IsKillableFromPoint方法的具体用法?C# Obj_AI_Hero.IsKillableFromPoint怎么用?C# Obj_AI_Hero.IsKillableFromPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.IsKillableFromPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastR
static void CastR(Obj_AI_Hero currenttarget)
{
var Check =
HeroManager.Enemies
.Where(
h => h.IsValidTarget(Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount") && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList();
if (Player.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount"))
{
Check.Add(Player);
}
if (Check != null)
{
if (Check.Contains(Player) && !LissUtils.isHealthy())
{
Spells["R"].CastOnUnit(Player);
return;
}
var target = Check.FirstOrDefault();
if (target != null)
{
Spells["R"].Cast(target);
return;
}
}
if (LissUtils.Active("Blacklist." + currenttarget.ChampionName))
{
return;
}
if (currenttarget.IsKillableFromPoint(Player.ServerPosition))
{
Spells["R"].Cast(currenttarget);
return;
}
if (LissUtils.PointUnderAllyTurret(currenttarget.ServerPosition))
{
Spells["R"].Cast(currenttarget);
return;
}
var dmgto = Player.GetSpellDamage(currenttarget, SpellSlot.R);
if (dmgto > currenttarget.Health && currenttarget.Health >= 0.40 * dmgto)
{
Spells["R"].Cast(currenttarget);
return;
}
var enemycount = LissUtils.GetSlider("Combo.Rcount");
if (!LissUtils.isHealthy() && Player.CountEnemiesInRange(Spells["R"].Range - 100) >= enemycount)
{
Spells["R"].CastOnUnit(Player);
return;
}
var possibilities = HeroManager.Enemies.Where(h => (h.IsValidTarget() && Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["R"].Range || (h.IsKillableFromPoint(Player.ServerPosition) && h.IsValidTarget() && !h.IsInvulnerable)) && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList();
var arranged = possibilities.OrderByDescending(h => h.CountEnemiesInRange(Spells["R"].Range));
if (LissUtils.Active("Misc.PrioritizeUnderTurret"))
{
var EnemyUnderTurret = arranged.Where(h => LissUtils.PointUnderAllyTurret(h.ServerPosition) && !h.IsInvulnerable);
if (EnemyUnderTurret != null)
{
var Enemytofocus = EnemyUnderTurret.MaxOrDefault(h => h.CountEnemiesInRange(Spells["R"].Range));
if (Enemytofocus != null)
{
Spells["R"].Cast(Enemytofocus);
return;
}
}
}
var UltTarget = arranged.FirstOrDefault();
if (UltTarget != null)
{
if (!LissUtils.isHealthy() &&
Player.CountEnemiesInRange(Spells["R"].Range) >
UltTarget.CountEnemiesInRange(Spells["R"].Range) + 1)
{
Spells["R"].CastOnUnit(Player);
return;
}
Spells["R"].Cast(UltTarget);
}
}