Exemplo n.º 1
0
        public void OnStartCasting(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 * 1100;
            var trueCoords = current + range;

            spell.AddLaser(trueCoords.X, trueCoords.Y);
            spell.spellAnimation("SPELL1", owner);
            ApiFunctionManager.AddParticle(owner, "Lucian_Q_laser.troy", trueCoords.X, trueCoords.Y);
            ApiFunctionManager.AddParticleTarget(owner, "Lucian_Q_cas.troy", owner);
        }
Exemplo n.º 2
0
        public void OnStartCasting(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 * 3340;
            var trueCoords = current + range;

            spell.AddLaser(trueCoords.X, trueCoords.Y);
            ApiFunctionManager.AddParticle(owner, "LuxMaliceCannon_beam.troy", trueCoords.X, trueCoords.Y);
            ApiFunctionManager.FaceDirection(owner, trueCoords, false);
            spell.spellAnimation("SPELL4", owner);
            ApiFunctionManager.AddParticleTarget(owner, "LuxMaliceCannon_cas.troy", owner);
        }
Exemplo n.º 3
0
        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)
        {
            var     current = new Vector2(owner.X, owner.Y);
            var     to      = new Vector2(spell.X, spell.Y) - current;
            Vector2 trueCoords;

            if (to.Length() > 425)
            {
                to = Vector2.Normalize(to);
                var range = to * 425;
                trueCoords = current + range;
            }
            else
            {
                trueCoords = new Vector2(spell.X, spell.Y);
            }

            ApiFunctionManager.AddParticle(owner, "global_ss_flash.troy", owner.X, owner.Y);
            ApiFunctionManager.TeleportTo(owner, trueCoords.X, trueCoords.Y);

            ApiFunctionManager.AddParticleTarget(owner, "global_ss_flash_02.troy", owner);
        }