public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = new Vector2(spell.X, spell.Y) - current; Vector2 trueCoords; if (to.Length() > 475) { to = Vector2.Normalize(to); var range = to * 475; trueCoords = current + range; } else { trueCoords = new Vector2(spell.X, spell.Y); } ApiFunctionManager.AddParticle(owner, "Ezreal_arcaneshift_cas.troy", owner.X, owner.Y); ApiFunctionManager.TeleportTo(owner, trueCoords.X, trueCoords.Y); ApiFunctionManager.AddParticleTarget(owner, "Ezreal_arcaneshift_flash.troy", owner); AttackableUnit target2 = null; var units = ApiFunctionManager.GetUnitsInRange(owner, 700, true); foreach (var value in units) { float distance = 700; if (owner.Team != value.Team) { if (Vector2.Distance(new Vector2(trueCoords.X, trueCoords.Y), new Vector2(value.X, value.Y)) <= distance) { target2 = value; distance = Vector2.Distance(new Vector2(trueCoords.X, trueCoords.Y), new Vector2(value.X, value.Y)); } } } if (target2 != null) { if (!ApiFunctionManager.UnitIsTurret(target2)) { spell.AddProjectileTarget("EzrealArcaneShiftMissile", target2); } } }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { Champion champion = (Champion)target; if (champion.Team != owner.Team) { spell.AddProjectileTarget("LuluWTwo", target); } else { Particle p = ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_buf_02.troy", target, 1); ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_buf_01.troy", target, 1); float time = 2.5f + 0.5f * spell.Level; var buff = ((ObjAIBase)target).AddBuffGameScript("LuluWBuff", "LuluWBuff", spell); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("LuluWBuff", time, 1, (ObjAIBase)target); ApiFunctionManager.CreateTimer(time, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); } }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("pirate_parley_mis", target); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("CaitlynAceintheHoleMissile", target); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("DetonatingShot", target, false); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("MissFortuneRicochetShot", target); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("Disintegrate", target, false); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { spell.AddProjectileTarget("NullLance", target, true); }