本文整理汇总了C#中Spell.Skillshot.IsReady方法的典型用法代码示例。如果您正苦于以下问题:C# Spell.Skillshot.IsReady方法的具体用法?C# Spell.Skillshot.IsReady怎么用?C# Spell.Skillshot.IsReady使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spell.Skillshot
的用法示例。
在下文中一共展示了Spell.Skillshot.IsReady方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game_OnUpdate
private static void Game_OnUpdate(EventArgs args)
{
if (MobsToSmite["killsmite"].Cast<CheckBox>().CurrentValue)
{
var KillEnemy =
EntityManager.Heroes.Enemies.FirstOrDefault(hero => hero.IsValidTarget(500f)
&& SmiteChampDamage() >= hero.Health);
if (KillEnemy != null)
Player.CastSpell(Smite.Slot, KillEnemy);
}
if (SmiteGHMenu["active"].Cast<CheckBox>().CurrentValue || SmiteGHMenu["activekey"].Cast<KeyBind>().CurrentValue)
{
double SpellDamage = 0;
Monster = GetNearest(ObjectManager.Player.ServerPosition);
if (Monster != null && MobsToSmite[Monster.BaseSkinName].Cast<CheckBox>().CurrentValue)
{
if (SupportedChampions.Contains(ObjectManager.Player.ChampionName))
{
if (SmiteGHMenu["disable"].Cast<CheckBox>().CurrentValue)
{
switch (ObjectManager.Player.ChampionName)
{
#region Diana
case "Diana":
{
Spell.Skillshot Q = new Spell.Skillshot(SpellSlot.Q, (uint)895, SkillShotType.Circular);
Spell.Targeted R = new Spell.Targeted(SpellSlot.R, (uint)825);
//Smite and Spell ==> OKAY
if (Smite.IsReady() && Q.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Q.Range
&& Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range)
{
SpellDamage = GetDamages.DianaQ(Q.Level) + GetDamages.DianaR(R.Level);
TotalDamage = SpellDamage + GetSmiteDamage();
if (Monster.Health <= TotalDamage)
{
Q.Cast(Monster.ServerPosition);
//Smite.Cast(Monster);
}
}
else if (Smite.IsReady() && R.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < R.Range
&& Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range && GetDamages.HasBuffs(Monster, "dianamoonlight"))
{
SpellDamage = GetDamages.DianaR(R.Level);
TotalDamage = SpellDamage + GetSmiteDamage();
if (Monster.Health <= TotalDamage)
{
R.Cast(Monster);
//Smite.Cast(Monster);
}
}
//If Spell is busy, Go Smite only! ^_^
else if (Smite.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range)
{
if (Monster.Health <= GetSmiteDamage())
{
Smite.Cast(Monster);
}
TotalDamage = 0;
}
break;
}
#endregion
#region Evelynn
case "Evelynn":
{
Spell.Targeted E = new Spell.Targeted(SpellSlot.E, (uint)(225f + 2 * 65f));
//Smite and Spell ==> OKAY
if (Smite.IsReady() && E.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < E.Range
&& Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range)
{
SpellDamage = GetDamages.Evelynn(E.Level);
TotalDamage = SpellDamage + GetSmiteDamage();
if (Monster.Health <= TotalDamage)
{
E.Cast(Monster);
//Smite.Cast(Monster);
}
}
//If Spell is busy, Go Smite only! ^_^
else if (Smite.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range)
{
if (Monster.Health <= GetSmiteDamage())
{
Smite.Cast(Monster);
}
TotalDamage = 0;
}
break;
}
#endregion
#region Irelia
case "Irelia":
{
Spell.Targeted Q = new Spell.Targeted(SpellSlot.Q, (uint)650f + 20);
//Smite and Spell ==> OKAY
if (Smite.IsReady() && Q.IsReady() && Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Q.Range
&& Vector3.Distance(ObjectManager.Player.ServerPosition, Monster.ServerPosition) < Smite.Range)
{
SpellDamage = GetDamages.Irelia(Q.Level);
//.........这里部分代码省略.........
示例2: Main
public static void Main(string[] args)
{
Loading.OnLoadingComplete += delegate
{
if (Player.Instance.ChampionName != "Blitzcrank")
{
return;
}
#region Menu Stuff
var menu = MainMenu.AddMenu("Blitzcrank", "blitziii");
menu.AddGroupLabel("Hitchance");
var hitchances = new List<HitChance>();
for (var i = (int) HitChance.Medium; i <= (int) HitChance.Immobile; i++)
{
hitchances.Add((HitChance) i);
}
var slider = new Slider(hitchances[0].ToString(), 0, 0, hitchances.Count - 1);
slider.OnValueChange += delegate(ValueBase<int> sender, ValueBase<int>.ValueChangeArgs changeArgs) { slider.DisplayName = hitchances[changeArgs.NewValue].ToString(); };
menu.Add("hitchance", slider);
if (HeroManager.Enemies.Count > 0)
{
menu.AddSeparator();
menu.AddGroupLabel("Enabled targets");
var addedChamps = new List<string>();
foreach (var enemy in HeroManager.Enemies.Where(enemy => !addedChamps.Contains(enemy.ChampionName)))
{
addedChamps.Add(enemy.ChampionName);
menu.Add(enemy.ChampionName, new CheckBox(string.Format("{0} ({1})", enemy.ChampionName, enemy.Name)));
}
}
menu.AddSeparator();
menu.AddGroupLabel("Drawings");
var qRange = menu.Add("rangeQ", new CheckBox("Q range"));
var predictions = menu.Add("predictions", new CheckBox("Visualize prediction"));
#endregion
var Q = new Spell.Skillshot(SpellSlot.Q, 925, SkillShotType.Linear, 250, 1800, 70);
var predictedPositions = new Dictionary<int, Tuple<int, PredictionResult>>();
Game.OnTick += delegate
{
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && Q.IsReady())
{
foreach (var enemy in HeroManager.Enemies.Where(enemy => menu[enemy.ChampionName].Cast<CheckBox>().CurrentValue &&
enemy.IsValidTarget(Q.Range + 150)))
{
var prediction = Q.GetPrediction(enemy);
if (prediction.HitChance >= hitchances[0])
{
predictedPositions[enemy.NetworkId] = new Tuple<int, PredictionResult>(Environment.TickCount, prediction);
// Cast if hitchance is high enough
if (prediction.HitChance >= hitchances[slider.CurrentValue])
{
Q.Cast(prediction.CastPosition);
}
}
}
}
};
Drawing.OnDraw += delegate
{
if (qRange.CurrentValue && Q.IsLearned)
{
Circle.Draw(Q.IsReady() ? Color.Blue : Color.Red, Q.Range, Player.Instance.Position);
}
if (!predictions.CurrentValue)
{
return;
}
foreach (var prediction in predictedPositions.ToArray())
{
if (Environment.TickCount - prediction.Value.Item1 > 1500)
{
predictedPositions.Remove(prediction.Key);
continue;
}
Circle.Draw(Color.Red, 75, prediction.Value.Item2.CastPosition);
Line.DrawLine(System.Drawing.Color.GreenYellow, Player.Instance.Position, prediction.Value.Item2.CastPosition);
Line.DrawLine(System.Drawing.Color.CornflowerBlue, HeroManager.Enemies.Find(o => o.NetworkId == prediction.Key).Position, prediction.Value.Item2.CastPosition);
Drawing.DrawText(prediction.Value.Item2.CastPosition.WorldToScreen() + new Vector2(0, -20), System.Drawing.Color.LimeGreen,
string.Format("Hitchance: {0}%", Math.Ceiling(prediction.Value.Item2.HitChancePercent)), 10);
}
};
};
}
示例3: OnLoaded
//.........这里部分代码省略.........
MiscMenu.Add("useexhaust", new CheckBox("Use Exhaust"));
foreach (var source in ObjectManager.Get<AIHeroClient>().Where(a => a.IsEnemy))
{
MiscMenu.Add(source.ChampionName + "exhaust",
new CheckBox("Exhaust " + source.ChampionName, false));
}
DrawMenu = MorgMenu.AddSubMenu("Drawings", "drawings");
DrawMenu.AddGroupLabel("Drawings");
DrawMenu.AddSeparator();
DrawMenu.Add("drawq", new CheckBox("Draw Q"));
DrawMenu.Add("draww", new CheckBox("Draw W"));
DrawMenu.Add("drawe", new CheckBox("Draw E"));
DrawMenu.Add("drawr", new CheckBox("Draw R"));
DrawMenu.Add("drawaa", new CheckBox("Draw AA"));
DrawMenu.Add("predictions", new CheckBox("Visualize Q Prediction"));
LaneClear = MorgMenu.AddSubMenu("Lane Clear", "laneclear");
LaneClear.AddGroupLabel("Lane Clear Settings");
LaneClear.Add("LCW", new CheckBox("Use W"));
LastHit = MorgMenu.AddSubMenu("Last Hit", "lasthit");
LastHit.AddGroupLabel("Last Hit Settings");
LastHit.Add("LHQ", new CheckBox("Use Q", false));
Interrupter.OnInterruptableSpell += Interrupter_OnInterruptableSpell;
Game.OnUpdate += OnUpdate;
Orbwalker.OnPreAttack += Orbwalker_OnPreAttack;
Obj_AI_Base.OnProcessSpellCast += Auto_EOnProcessSpell;
Gapcloser.OnGapcloser += Gapcloser_OnGapcloser;
Drawing.OnDraw += delegate
{
if (!Me.IsDead)
{
if (DrawMenu["drawr"].Cast<CheckBox>().CurrentValue && R.IsLearned)
{
Circle.Draw(Color.Red, R.Range, Player.Instance.Position);
}
if (DrawMenu["draww"].Cast<CheckBox>().CurrentValue && W.IsLearned)
{
Circle.Draw(Color.Purple, W.Range, Player.Instance.Position);
}
if (DrawMenu["drawe"].Cast<CheckBox>().CurrentValue && E.IsLearned)
{
Circle.Draw(Color.Green, E.Range, Player.Instance.Position);
}
if (DrawMenu["drawaa"].Cast<CheckBox>().CurrentValue)
{
Circle.Draw(Color.Blue, Q.Range, Player.Instance.Position);
}
var predictedPositions = new Dictionary<int, Tuple<int, PredictionResult>>();
var predictions = DrawMenu["predictions"].Cast<CheckBox>().CurrentValue;
var qRange = DrawMenu["drawq"].Cast<CheckBox>().CurrentValue;
foreach (
var enemy in
EntityManager.Heroes.Enemies.Where(
enemy => QMenu["bind" + enemy.ChampionName].Cast<CheckBox>().CurrentValue &&
enemy.IsValidTarget(Q.Range + 150) &&
!enemy.HasBuffOfType(BuffType.SpellShield)))
{
var predictionsq = Q.GetPrediction(enemy);
predictedPositions[enemy.NetworkId] = new Tuple<int, PredictionResult>(Environment.TickCount,
predictionsq);
if (qRange && Q.IsLearned)
{
Circle.Draw(Q.IsReady() ? Color.Blue : Color.Red, Q.Range,
Player.Instance.Position);
}
if (!predictions)
{
return;
}
foreach (var prediction in predictedPositions.ToArray())
{
if (Environment.TickCount - prediction.Value.Item1 > 2000)
{
predictedPositions.Remove(prediction.Key);
continue;
}
Circle.Draw(Color.Red, 75, prediction.Value.Item2.CastPosition);
Line.DrawLine(System.Drawing.Color.GreenYellow, Player.Instance.Position,
prediction.Value.Item2.CastPosition);
Line.DrawLine(System.Drawing.Color.CornflowerBlue,
EntityManager.Heroes.Enemies.Find(o => o.NetworkId == prediction.Key).Position,
prediction.Value.Item2.CastPosition);
Drawing.DrawText(prediction.Value.Item2.CastPosition.WorldToScreen() + new Vector2(0, -20),
System.Drawing.Color.LimeGreen,
string.Format("Hitchance: {0}%", Math.Ceiling(prediction.Value.Item2.HitChancePercent)),
10);
}
}
;
}
;
};
}
示例4: FlashQCombo
internal static void FlashQCombo()
{
Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
var target = TargetSelector2.GetTarget(Program.Q.Range + 425, DamageType.Magical);
var qPred = Program.Q.GetPrediction(target);
var closestMinion = qPred.CollisionObjects.Count(h => h.IsEnemy && !h.IsDead && h is Obj_AI_Minion) < 1;
var FlashSlot = Player.Spells.FirstOrDefault(o => o.SData.Name == "summonerflash"); // Thanks finn
SpellSlot flSlot = extent.GetSpellSlotFromName(_Player, "summonerflash");
flash = new Spell.Skillshot(flSlot, 32767, SkillShotType.Linear);
if (target == null) return;
var x = target.Position.Extend(target, 425f);
if (qPred.HitChance != HitChance.Collision)
{
if (qPred.HitChance >= HitChance.High && closestMinion && flash.IsReady())
{
flash.Cast((Vector3)x);
Program.Q.Cast((Vector3)x);
}
}
}
示例5: InMissileDanger
public static bool InMissileDanger(this AIHeroClient target)
{
if (DamageEngine["missilecheck"].Cast<CheckBox>().CurrentValue)
{
if (DamageEngine["missilerun"].Cast<CheckBox>().CurrentValue)
{
foreach (var caster in Missile.Where(a => Player.Instance.IsInRange(a, 775)))
{
Spell.Skillshot _flash = new Spell.Skillshot(Player.Instance.GetSpellSlotFromName("summonerflash"), 425, SkillShotType.Linear);
if ((!Player.Instance.IsInRange(caster, 375) && Missile.Count > 0 && _flash.IsReady()) || (!_flash.IsReady() && Missile.Count > 0 && !Player.Instance.IsInRange(caster, 775 - Player.Instance.MoveSpeed))) return true;
}
}
else
if (Missile.Count > 0)
{
return true;
}
}
return false;
}
示例6: LaneClear
/// <summary>
/// Does LaneClear
/// </summary>
private static void LaneClear()
{
Q = new Spell.Skillshot(SpellSlot.Q, 1175, SkillShotType.Linear, 250, 70, 1300)
{
AllowedCollisionCount = 1
};
//E = new Spell.Skillshot(SpellSlot.E, 1200, SkillShotType.Circular, 250, 280, 950);
//R = new Spell.Skillshot(SpellSlot.R, 3300, SkillShotType.Circular, 1000, 190, int.MaxValue);
var useQ = LaneClearMenu["useQ"].Cast<CheckBox>().CurrentValue;
var useE = LaneClearMenu["useE"].Cast<CheckBox>().CurrentValue;
var useR = LaneClearMenu["useR"].Cast<CheckBox>().CurrentValue;
var useQs = LaneClearMenu["useQs"].Cast<Slider>().CurrentValue;
var useEs = LaneClearMenu["useEs"].Cast<Slider>().CurrentValue;
var useRs = LaneClearMenu["useRs"].Cast<Slider>().CurrentValue;
if (useQ && Q.IsReady() && ManaManager(SpellSlot.Q))
{
var target = EntityManager.MinionsAndMonsters.EnemyMinions.Where(t => t.IsValidTarget() && Q.IsInRange(t));
var pred = EntityManager.MinionsAndMonsters.GetLineFarmLocation(target, Q.Width, (int)Q.Range);
if (pred.HitNumber >= useQs)
{
Q.Cast(pred.CastPosition);
}
}
if (useE && E.IsReady() && ManaManager(SpellSlot.E) && LuxEObject == null)
{
var target = EntityManager.MinionsAndMonsters.GetLaneMinions(
EntityManager.UnitTeam.Enemy,
Player.Instance.ServerPosition,
E.Radius);
var pred = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(target, E.Width, (int)E.Range);
if (pred.HitNumber >= useEs)
{
E.Cast(pred.CastPosition);
}
}
if (useE && E.IsReady() && LuxEObject != null)
{
var target =
EntityManager.MinionsAndMonsters.EnemyMinions.Where(
t => t.IsValidTarget() && t.Distance(LuxEObject.Position) <= LuxEObject.BoundingRadius);
if (target.Any() && LuxEObject != null)
{
E2.Cast();
}
}
if (!useR || !R.IsReady() || !ManaManager(SpellSlot.R))
{
return;
}
var rTarget = EntityManager.MinionsAndMonsters.GetLaneMinions(
EntityManager.UnitTeam.Enemy,
Player.Instance.ServerPosition,
R.Radius);
if (rTarget == null)
{
return;
}
var rPrediction = EntityManager.MinionsAndMonsters.GetLineFarmLocation(rTarget, R.Width, (int)R.Range);
if (rPrediction.HitNumber >= useRs)
{
R.Cast(rPrediction.CastPosition);
}
}