本文整理汇总了C#中Spell.Active.Cast方法的典型用法代码示例。如果您正苦于以下问题:C# Spell.Active.Cast方法的具体用法?C# Spell.Active.Cast怎么用?C# Spell.Active.Cast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spell.Active
的用法示例。
在下文中一共展示了Spell.Active.Cast方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game_OnTick
private static void Game_OnTick(EventArgs args)
{
var recall = Player.Instance.Spellbook.GetSpell(SpellSlot.Recall);
Recall = new Spell.Active(recall.Slot);
if (!Player.Instance.IsRecalling())
{
Recall.Cast();
}
/*
if (Player.Instance.Distance(place1) > 2000)
{
Player.IssueOrder(GameObjectOrder.MoveTo, place1);
}
//Square
if (Player.Instance.Distance(place1) < 10)
{
Player.IssueOrder(GameObjectOrder.MoveTo, place2);
}
if (Player.Instance.Distance(place2) < 10)
{
Player.IssueOrder(GameObjectOrder.MoveTo, place3);
}
if (Player.Instance.Distance(place3) < 10)
{
Player.IssueOrder(GameObjectOrder.MoveTo, place4);
}
if (Player.Instance.Distance(place4) < 10)
{
Player.IssueOrder(GameObjectOrder.MoveTo, place1);
}
*/
}
示例2: 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);
//.........这里部分代码省略.........
示例3: OnTick
private static void OnTick(EventArgs args)
{
if (myHero.IsDead) return;
W = new Spell.Active(SpellSlot.W, (uint)(565 + 60 + W.Level * 30 + 65));
R = new Spell.Skillshot(SpellSlot.R, (uint)(900 + R.Level * 300), SkillShotType.Circular, 1500, int.MaxValue,
225);
if (human && wActive)
{
if (1 / myHero.AttackDelay > Convert.ToSingle(esw) / 100)
{
if (EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(130 + swez)) ||
!EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(130 + swchz)))
{
Orbwalker.DisableMovement = false;
Orbwalker.DisableAttacking = !(Environment.TickCount + Game.Ping / 2 + 25 >= LastAATick + 1.0 / Convert.ToSingle(swatk) * 1000 * 100);
}
else
{
Orbwalker.DisableAttacking = false;
Orbwalker.DisableMovement = true;
}
}
else
{
Orbwalker.DisableAttacking = false;
Orbwalker.DisableMovement = false;
}
}
if (CanMove(100))
{
if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
{
if (useQ)
{
if (QIsReadyPerfectly())
{
if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.Q) >= getSpellMana(SpellSlot.W))
{
var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
if (target != null)
{
Q.Cast(target);
}
}
}
}
if (useW)
{
if (WIsReadyPerfectly())
{
if (EntityManager.Heroes.Enemies.Any(x => x.IsValidTarget(W.Range)))
{
W.Cast();
}
}
}
if (useE)
{
if (EIsReadyPerfectly())
{
if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.E) >= getSpellMana(SpellSlot.W))
{
var target = TargetSelector.GetTarget(E.Range, DamageType.Magical);
if (target != null)
{
E.Cast(target);
}
}
}
}
if (useR)
{
if (RIsReadyPerfectly())
{
if (!manaW || W.Level <= 0 || myHero.Mana - getSpellMana(SpellSlot.R) >= getSpellMana(SpellSlot.W))
{
if (myHero.GetBuffCount("kogmawlivingartillerycost") < rLimit)
{
var target = TargetSelector.GetTarget(R.Range, DamageType.Magical);
if (target != null)
{
if (onlyRHP)
{
if (target.HealthPercent < hpOfTarget)
{
R.Cast(target);
}
}
else
{
R.Cast(target);
}
}
}
//.........这里部分代码省略.........
示例4: Init
public override void Init()
{
try
{
try
{
#region Spells
// Defining Spells
_q = new Spell.Targeted(SpellSlot.Q, 675);
_w = new Spell.Active(SpellSlot.W, 375);
_e = new Spell.Targeted(SpellSlot.E, 700);
_r = new Spell.Active(SpellSlot.R, 550);
#endregion
}
catch (Exception e)
{
Console.WriteLine(e);
Chat.Print("<font color='#23ADDB'>Marksman AIO:</font><font color='#E81A0C'> an error ocurred. (Code SPELL)</font>");
}
try
{
#region Menu
var combo = MainMenu._combo;
string[] s = { "QEWR", "EQWR" };
combo.AddStringList("combo.mode", "Mode: ", s, 1);
MainMenu.ComboKeys(true, true, true, true);
MainMenu.HarassKeys(true, true, true, true);
MainMenu._harass.Add("harass.autow", new CheckBox("Use Auto W"));
MainMenu._harass.Add("harass.donteunderturret", new CheckBox("Dont E Under Turret"));
MainMenu.FleeKeys(false, false, true, false);
MainMenu._flee.Add("flee.ward", new CheckBox("Use Wardjump"));
MainMenu.LaneKeys(true, true, true, false);
MainMenu._lane.Add("lane.donteunderturret", new CheckBox("Dont E Under Turret"));
MainMenu.LastHitKeys(true, true, true, false);
MainMenu._lasthit.Add("lasthit.donteunderturret", new CheckBox("Dont E Under Turret"));
MainMenu.KsKeys(true, true, true, true);
MainMenu._ks.Add("killsteal.ignite", new CheckBox("Use Ignite"));
MainMenu._ks.Add("killsteal.donteunderturret", new CheckBox("Dont E Under Turret"));
MainMenu.DamageIndicator();
MainMenu.DrawKeys(true, true, true, true);
MainMenu._draw.AddSeparator();
MainMenu._draw.AddGroupLabel("Flash Settings");
MainMenu._draw.Add("draw.flash", new CheckBox("Draw flash"));
MainMenu._draw.AddColorItem("color.flash");
MainMenu._draw.AddWidthItem("width.flash");
MainMenu._draw.AddSeparator();
MainMenu._draw.AddGroupLabel("Ignite Settings");
MainMenu._draw.Add("draw.ignite", new CheckBox("Draw ignite"));
MainMenu._draw.AddColorItem("color.ignite");
MainMenu._draw.AddWidthItem("width.ignite");
_humanizerMenu = MainMenu._menu.AddSubMenu("Humanizer Menu");
_humanizerMenu.AddGroupLabel("Q Settings");
_humanizerMenu.Add("min.q", new Slider("Min Q Delay", 0, 0, 50));
_humanizerMenu.Add("max.q", new Slider("Max Q Delay", 0, 0, 50));
_humanizerMenu.AddSeparator(10);
_humanizerMenu.AddGroupLabel("W Settings");
_humanizerMenu.Add("min.w", new Slider("Min W Delay", 0, 0, 50));
_humanizerMenu.Add("max.w", new Slider("Max W Delay", 0, 0, 50));
_humanizerMenu.AddSeparator(10);
_humanizerMenu.AddGroupLabel("E Settings");
_humanizerMenu.Add("min.e", new Slider("Min E Delay", 0, 0, 50));
_humanizerMenu.Add("max.e", new Slider("Max E Delay", 0, 0, 50));
_humanizerMenu.AddSeparator(10);
_humanizerMenu.AddGroupLabel("R Settings");
_humanizerMenu.Add("min.r", new Slider("Min R Delay", 4, 0, 50));
_humanizerMenu.Add("max.r", new Slider("Max R Delay", 4, 0, 50));
_humanizerMenu.AddSeparator(10);
#endregion
}
catch (Exception e)
{
Console.WriteLine(e);
Chat.Print("<font color='#23ADDB'>Marksman AIO:</font><font color='#E81A0C'> an error ocurred. (Code MENU)</font>");
}
#region UtilityInit
DamageIndicator.DamageToUnit = GetActualRawComboDamage;
Value.Init();
Value.MenuList.Add(_humanizerMenu);
Drawing.OnDraw += DrawRanges;
#region MenuValueChange
_humanizerMenu["min.q"].Cast<Slider>().OnValueChange += delegate
{
if (_humanizerMenu["min.q"].Cast<Slider>().CurrentValue > _humanizerMenu["max.q"].Cast<Slider>().CurrentValue)
//.........这里部分代码省略.........