public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 445; var trueCoords = current + range; ApiFunctionManager.DashToLocation(owner, trueCoords.X, trueCoords.Y, 1500, false, "SPELL3"); }
public void DashToLocation(IObjAiBase unit, float x, float y, float dashSpeed, bool keepFacingLastDirection, string animation = null, float leapHeight = 0.0f, float followTargetMaxDistance = 0.0f, float backDistance = 0.0f, float travelTime = 0.0f) { ApiFunctionManager.DashToLocation(unit, x, y, dashSpeed, keepFacingLastDirection, animation, leapHeight, followTargetMaxDistance, backDistance, travelTime); (unit as IChampion).lastDasher = this; }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { // Calculate net coords var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 750; var trueCoords = current + range; // Calculate dash coords/vector var dash = Vector2.Negate(to) * 500; var dashCoords = current + dash; ApiFunctionManager.DashToLocation(owner, dashCoords.X, dashCoords.Y, 1000, true, "Spell3b"); spell.AddProjectile("CaitlynEntrapmentMissile", trueCoords.X, trueCoords.Y); }
public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target) { var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 425; var trueCoords = current + range; ApiFunctionManager.DashToLocation(owner, trueCoords.X, trueCoords.Y, 1200, false, "Spell3"); Particle p = ApiFunctionManager.AddParticleTarget(owner, "Graves_Move_OnBuffActivate.troy", owner); var visualBuff = ApiFunctionManager.AddBuffHUDVisual("GravesSteroid", 5.0f, 90, owner); var buff = owner.AddBuffGameScript("Quickdraw", "Quickdraw", spell, -1, true); ApiFunctionManager.CreateTimer(4.0f, () => { ApiFunctionManager.RemoveParticle(p); ApiFunctionManager.RemoveBuffHUDVisual(visualBuff); owner.RemoveBuffGameScript(buff); }); }
public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile) { var ap = owner.GetStats().AbilityPower.Total; var damage = 25 + spell.Level * 55 + ap; spell.Target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); if (!spell.Target.IsDead) { ApiFunctionManager.AddParticleTarget(owner, "Blitzcrank_Grapplin_tar.troy", spell.Target, 1, "L_HAND"); var current = new Vector2(owner.X, owner.Y); var to = Vector2.Normalize(new Vector2(spell.X, spell.Y) - current); var range = to * 50; var trueCoords = current + range; ApiFunctionManager.DashToLocation((ObjAIBase)spell.Target, trueCoords.X, trueCoords.Y, spell.SpellData.MissileSpeed, true); } projectile.setToRemove(); }