本文整理汇总了C#中Obj_AI_Hero.HasQBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero.HasQBuff方法的具体用法?C# Obj_AI_Hero.HasQBuff怎么用?C# Obj_AI_Hero.HasQBuff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Obj_AI_Hero
的用法示例。
在下文中一共展示了Obj_AI_Hero.HasQBuff方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsecCombo
public static void InsecCombo(Obj_AI_Hero target)
{
if (target == null)
{
return;
}
if (ObjectManager.Player.Distance(GetInsecPos(target)) < 200)
{
insecComboStep = InsecComboStepSelect.Pressr;
}
else if ((insecComboStep == InsecComboStepSelect.None)
&& (GetInsecPos(target).Distance(ObjectManager.Player.Position) < 600))
{
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else if ((insecComboStep == InsecComboStepSelect.None)
&& (target.Distance(ObjectManager.Player) < LeeSin.spells[LeeSin.Spells.Q].Range))
{
insecComboStep = InsecComboStepSelect.Qgapclose;
}
switch (insecComboStep)
{
case InsecComboStepSelect.Qgapclose:
if (Misc.IsQOne)
{
var pred1 = LeeSin.spells[LeeSin.Spells.Q].GetPrediction(target);
if (pred1.Hitchance >= HitChance.High)
{
LeeSin.CastQ(target, Misc.GetMenuItem("ElLeeSin.Smite.Q"));
}
if (!Misc.GetMenuItem("checkOthers2"))
{
return;
}
var insectObjects =
HeroManager.Enemies.Where(
x =>
x.IsValidTarget(LeeSin.spells[LeeSin.Spells.Q].Range) && !x.Compare(target)
&& (LeeSin.spells[LeeSin.Spells.Q].GetHealthPrediction(x)
> LeeSin.spells[LeeSin.Spells.Q].GetDamage(x))
&& (x.Distance(target) < target.DistanceToPlayer()) && (x.Distance(target) < 750))
.Concat(
MinionManager.GetMinions(
ObjectManager.Player.ServerPosition,
LeeSin.spells[LeeSin.Spells.Q].Range,
MinionTypes.All,
MinionTeam.NotAlly))
.Where(
m =>
m.IsValidTarget(LeeSin.spells[LeeSin.Spells.Q].Range)
&& LeeSin.spells[LeeSin.Spells.Q].GetHealthPrediction(m)
> LeeSin.spells[LeeSin.Spells.Q].GetDamage(m) && m.Distance(target) < 400f)
.OrderBy(i => i.Distance(target))
.FirstOrDefault();
if (insectObjects == null)
{
return;
}
LeeSin.spells[LeeSin.Spells.Q].Cast(insectObjects);
}
if (!target.HasQBuff() && Misc.IsQOne)
{
LeeSin.CastQ(target, Misc.GetMenuItem("ElLeeSin.Smite.Q"));
}
else if (target.HasQBuff())
{
LeeSin.spells[LeeSin.Spells.Q].Cast();
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else
{
if (LeeSin.spells[LeeSin.Spells.Q].Instance.Name.Equals(
"blindmonkqtwo",
StringComparison.InvariantCultureIgnoreCase)
&& (Misc.ReturnQBuff()?.Distance(target) <= 600))
{
LeeSin.spells[LeeSin.Spells.Q].Cast();
}
}
break;
case InsecComboStepSelect.Wgapclose:
if (ObjectManager.Player.Distance(target) < WardRange)
{
Wardmanager.WardJump(GetInsecPos(target), false, true, true);
if ((Wardmanager.FindBestWardItem() == null) && LeeSin.spells[LeeSin.Spells.R].IsReady()
&& Misc.GetMenuItem("ElLeeSin.Flash.Insec")
&& (ObjectManager.Player.Spellbook.CanUseSpell(LeeSin.flashSlot) == SpellState.Ready))
{
if (((GetInsecPos(target).Distance(ObjectManager.Player.Position) < FlashRange)
&& (Wardmanager.LastWard + 1000 < Environment.TickCount)) || !LeeSin.spells[LeeSin.Spells.W].IsReady())
//.........这里部分代码省略.........
示例2: InsecCombo
private static void InsecCombo(Obj_AI_Hero target)
{
if (target != null && target.IsVisible)
{
if (Player.Distance(GetInsecPos(target)) < 200)
{
insecComboStep = InsecComboStepSelect.Pressr;
}
else if (insecComboStep == InsecComboStepSelect.None
&& GetInsecPos(target).Distance(Player.Position) < 600)
{
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else if (insecComboStep == InsecComboStepSelect.None
&& target.Distance(Player) < spells[Spells.Q].Range)
{
insecComboStep = InsecComboStepSelect.Qgapclose;
}
switch (insecComboStep)
{
case InsecComboStepSelect.Qgapclose:
if (!(target.HasQBuff()) && QState)
{
if (ParamBool("checkOthers"))
{
foreach (var insecMinion in
ObjectManager.Get<Obj_AI_Minion>()
.Where(
x =>
x.Health > spells[Spells.Q].GetDamage(x) && x.IsValidTarget()
&& x.Distance(GetInsecPos(target)) < 0x1c2)
.ToList())
{
spells[Spells.Q].Cast(insecMinion);
}
/*foreach (var insecEnemy in ObjectManager.Get<Obj_AI_Hero>()
.Where(
x =>
x.Health > spells[Spells.Q].GetDamage(x) && x.IsValidTarget()
&& x.Distance(GetInsecPos(target)) < 0x1c2)
.ToList())
{
spells[Spells.Q].Cast(insecEnemy);
}*/
}
CastQ(target, ParamBool("qSmite"));
}
else if (target.HasQBuff())
{
spells[Spells.Q].Cast();
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else
{
if (spells[Spells.Q].Instance.Name == "blindmonkqtwo"
&& ReturnQBuff().Distance(target) <= 600)
{
spells[Spells.Q].Cast();
}
}
break;
case InsecComboStepSelect.Wgapclose:
if (Player.Distance(target) < 600)
{
if (FindBestWardItem() == null && GetInsecPos(target).Distance(Player.Position) < 400)
{
if (spells[Spells.R].IsReady()
&& Player.Spellbook.CanUseSpell(flashSlot) == SpellState.Ready
&& ParamBool("flashInsec") && LastWard + 1000 < Environment.TickCount)
{
Player.Spellbook.CastSpell(flashSlot, GetInsecPos(target));
return;
}
}
WardJump(GetInsecPos(target), false, false, true);
}
if (Player.Distance(GetInsecPos(target)) < 200)
{
spells[Spells.R].Cast(target);
}
break;
case InsecComboStepSelect.Pressr:
spells[Spells.R].CastOnUnit(target);
break;
}
}
}
示例3: InsecCombo
private static void InsecCombo(Obj_AI_Hero target)
{
if (target != null && target.IsVisible)
{
if (Player.Distance(GetInsecPos(target)) < 250)
{
insecComboStep = InsecComboStepSelect.Pressr;
}
else if (insecComboStep == InsecComboStepSelect.None
&& GetInsecPos(target).Distance(Player.Position) < 600)
{
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else if (insecComboStep == InsecComboStepSelect.None
&& target.Distance(Player) < spells[Spells.Q].Range)
{
insecComboStep = InsecComboStepSelect.Qgapclose;
}
switch (insecComboStep)
{
case InsecComboStepSelect.Qgapclose:
var prediction = spells[Spells.Q].GetPrediction(target);
if (prediction.CollisionObjects.Count > 1 && ParamBool("checkOthers1") && !(target.HasQBuff())
&& QState && spells[Spells.Q].IsReady())
{
var insMinion = GetInsecMinion(target);
if (insMinion != null && spells[Spells.Q].IsReady()
&& spells[Spells.Q].GetDamage(insMinion) < insMinion.Health + 10)
{
spells[Spells.Q].Cast(insMinion);
}
}
if (!(target.HasQBuff()) && QState)
{
CastQ(target, ParamBool("qSmite"));
}
else if (target.HasQBuff())
{
spells[Spells.Q].Cast();
insecComboStep = InsecComboStepSelect.Wgapclose;
}
else
{
if (spells[Spells.Q].Instance.Name == "blindmonkqtwo"
&& ReturnQBuff().Distance(target) <= 600)
{
spells[Spells.Q].Cast();
}
}
break;
case InsecComboStepSelect.Wgapclose:
if (Player.Distance(target) < 600)
{
if (FindBestWardItem() == null && GetInsecPos(target).Distance(Player.Position) < 500)
{
if (spells[Spells.R].IsReady()
&& Player.Spellbook.CanUseSpell(flashSlot) == SpellState.Ready
&& ParamBool("flashInsec")) //&& LastWard + 1000 < Environment.TickCount
{
Player.Spellbook.CastSpell(flashSlot, GetInsecPos(target));
return;
}
}
WardJump(GetInsecPos(target), false, false, true);
}
if (Player.Distance(GetInsecPos(target)) < 200)
{
spells[Spells.R].Cast(target);
}
break;
case InsecComboStepSelect.Pressr:
spells[Spells.R].CastOnUnit(target);
break;
}
}
}