static Lissandra() { Q = new Spell.Skillshot(SpellSlot.Q, DamageType.Magical) { AllowedCollisionCount = int.MaxValue, }; W = new Spell.Active(SpellSlot.W, 450) { CastDelay = 250, }; E = new Spell.Skillshot(SpellSlot.E, DamageType.Magical); R = new Spell.Targeted(SpellSlot.R, 550); #region Event DamageIndicator.DamageDelegate = HandleDamageIndicator; Obj_GeneralParticleEmitter.OnCreate += delegate(GameObject sender, EventArgs args) { var missile = sender as Obj_GeneralParticleEmitter; if (sender != null) { if (missile.Name.Equals("Lissandra_Base_E_End.troy")) { EEnd = missile; } } }; Obj_GeneralParticleEmitter.OnDelete += delegate(GameObject sender, EventArgs args) { var missile = sender as Obj_GeneralParticleEmitter; if (sender != null) { if (missile.Name.Equals("Lissandra_Base_E_End.troy")) { EEnd = null; } } }; MissileClient.OnCreate += delegate(GameObject sender, EventArgs args) { var missile = sender as MissileClient; if (sender != null && missile.SpellCaster.IsMe) { if (missile.SData.Name.Equals("LissandraEMissile")) { EMissile = missile; } } }; MissileClient.OnDelete += delegate(GameObject sender, EventArgs args) { var missile = sender as MissileClient; if (sender != null && missile.SpellCaster.IsMe && missile.SData.Name.Equals("LissandraEMissile")) { EMissile = null; } }; AIHeroClient.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsMe) { return; } if (args.Slot.Equals(SpellSlot.E)) { LastETick = Core.GameTickCount; } }; Game.OnUpdate += delegate(EventArgs args) { if (!Gapclose || EMissile == null || EEnd == null || E.ToggleState == 1) { return; } if (EMissile.Distance(EEnd) <= 25) { Player.CastSpell(SpellSlot.E); Gapclose = false; } }; #endregion }
static Lissandra() { Q = new Spell.Skillshot(SpellSlot.Q, DamageType.Magical) { AllowedCollisionCount = int.MaxValue, }; W = new Spell.Active(SpellSlot.W, 450) { CastDelay = 250, }; E = new Spell.Skillshot(SpellSlot.E, DamageType.Magical); R = new Spell.Targeted(SpellSlot.R, 550); #region Event DamageIndicator.DamageDelegate = HandleDamageIndicator; Obj_GeneralParticleEmitter.OnCreate += delegate(GameObject sender, EventArgs args) { var missile = sender as Obj_GeneralParticleEmitter; if (sender != null) { if (missile.Name.Equals("Lissandra_Base_E_End.troy")) { EEnd = missile; } } }; Obj_GeneralParticleEmitter.OnDelete += delegate(GameObject sender, EventArgs args) { var missile = sender as Obj_GeneralParticleEmitter; if (sender != null) { if (missile.Name.Equals("Lissandra_Base_E_End.troy")) { EEnd = null; } } }; MissileClient.OnCreate += delegate(GameObject sender, EventArgs args) { var missile = sender as MissileClient; if (sender != null && missile.SpellCaster.IsMe) { if (missile.SData.Name.Equals("LissandraEMissile")) { EMissile = missile; } } }; MissileClient.OnDelete += delegate(GameObject sender, EventArgs args) { var missile = sender as MissileClient; if (sender != null && missile.SpellCaster.IsMe && missile.SData.Name.Equals("LissandraEMissile")) { EMissile = null; } }; AIHeroClient.OnProcessSpellCast += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsMe) { return; } if (args.Slot.Equals(SpellSlot.E)) { LastETick = Core.GameTickCount; } }; Game.OnUpdate += delegate(EventArgs args) { if (!Gapclose || EMissile == null || EEnd == null || E.ToggleState == 1 || !player.HasBuff("LissandraE")) { return; } if (EMissile.Distance(EEnd) <= 25) { Player.CastSpell(SpellSlot.E); Gapclose = false; } }; Obj_AI_Base.OnBasicAttack += delegate(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!(sender is Obj_AI_Turret) || !(args.Target is AIHeroClient) || !sender.IsAlly || !args.Target.IsEnemy || sender == null || !R.IsReady() || !MenuValue.General.AutoR) { return; } var attacker = sender as Obj_AI_Turret; var target = args.Target as AIHeroClient; if (attacker != null && target != null) { if (target.IsValidTarget(R.Range) && (TargetSelector.GetPriority(target) >= 4 || target.Health < sender.GetAutoAttackDamage(target, true) * 2 + RDamage(target))) { R.Cast(); } } }; #endregion }