public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Smite.troy", target, 1);
            var damage = 370 + owner.GetStats().Level * 20;

            target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false);
        }
        public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            var      visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerDot", 5.0f, 1, (ObjAIBase)target);
            Particle p          = ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Ignite.troy", target, 1);
            var      damage     = 10 + owner.GetStats().Level * 4;

            target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false);
            ApiFunctionManager.CreateTimer(1.0f,
                                           () =>
            {
                target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL,
                                  false);
            });
            ApiFunctionManager.CreateTimer(2.0f,
                                           () =>
            {
                target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL,
                                  false);
            });
            ApiFunctionManager.CreateTimer(3.0f,
                                           () =>
            {
                target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL,
                                  false);
            });
            ApiFunctionManager.CreateTimer(4.0f, () =>
            {
                target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_TRUE, DamageSource.DAMAGE_SOURCE_SPELL, false);
                ApiFunctionManager.RemoveParticle(p);
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
            });
        }
示例#3
0
文件: Q.cs 项目: egedmz/LolUrfSandbox
        public void ApplyEffects(IObjAiBase owner, IAttackableUnit target, ISpell spell, IProjectile projectile)
        {
            ApiFunctionManager.AddParticleTarget(owner, "pirate_parley_cas.troy", target);
            var isCrit     = new Random().Next(0, 100) < owner.Stats.CriticalChance.Total;
            var baseDamage = new[] { 20, 45, 70, 95, 120 }[spell.Level - 1] +owner.Stats.AttackDamage.Total;
            var damage     = isCrit ? baseDamage * owner.Stats.CriticalDamage.Total / 100 : baseDamage;
            var goldIncome = new[] { 4, 5, 6, 7, 8 }[spell.Level - 1];

            if (target != null && !target.IsDead)
            {
                target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_ATTACK,
                                  false);
                if (target.IsDead)
                {
                    owner.Stats.Gold += goldIncome;
                    var manaCost = new float[] { 50, 55, 60, 65, 70 }[spell.Level - 1];
                    var newMana  = owner.Stats.CurrentMana + manaCost / 2;
                    var maxMana  = owner.Stats.ManaPoints.Total;
                    if (newMana >= maxMana)
                    {
                        owner.Stats.CurrentMana = maxMana;
                    }
                    else
                    {
                        owner.Stats.CurrentMana = newMana;
                    }
                }

                projectile.SetToRemove();
            }
        }
示例#4
0
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            Target  ZoneCenter;
            Vector2 ownerLocation  = new Vector2(owner.X, owner.Y);
            Vector2 targetLocation = new Vector2(spell.X, spell.Y);
            var     spellData      = spell.SpellData;
            float   distance       = Vector2.Distance(ownerLocation, targetLocation);

            if (distance > spellData.CastRange[0])
            {
                var to         = Vector2.Normalize(targetLocation - ownerLocation);
                var range      = to * 800;
                var trueCoords = ownerLocation + range;
                ZoneCenter = new Target(trueCoords.X, trueCoords.Y);
            }
            else
            {
                ZoneCenter = new Target(spell.X, spell.Y);
            }
            Particle p = ApiFunctionManager.AddParticleTarget(owner, "missFortune_makeItRain_incoming.troy", ZoneCenter);

            for (byte i = 0; i < 8; ++i)
            {
                ApiFunctionManager.CreateTimer(0.25f * i, () =>
                {
                    DamageTargetsInZone(owner, spell, target, ZoneCenter);
                });
            }
            ApiFunctionManager.CreateTimer(2.0f, () =>
            {
                ApiFunctionManager.RemoveParticle(p);
            });
        }
 public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
 {
     foreach (var enemyTarget in ApiFunctionManager.GetChampionsInRange(owner, 20000, true)
              .Where(x => x.Team == CustomConvert.GetEnemyTeam(owner.Team)))
     {
         ApiFunctionManager.AddParticleTarget(owner, "KarthusFallenOne", enemyTarget);
     }
 }
示例#6
0
        /// <summary>
        /// Called by projectiles when they land / hit, this is where we apply damage/slows etc.
        /// </summary>
        public void applyEffects(Unit u, Projectile p = null)
        {
            if (!string.IsNullOrEmpty(hitEffectName))
            {
                ApiFunctionManager.AddParticleTarget(Owner, hitEffectName, u);
            }

            _scriptEngine.SetGlobalVariable("u", u);
            _scriptEngine.Execute(@"
                function getTarget()
                    return u
                end");

            _scriptEngine.SetGlobalVariable("p", p);
            _scriptEngine.Execute(@"
                function destroyProjectile()
                    p:setToRemove()
                end");

            _scriptEngine.SetGlobalVariable("TYPE_PHYSICAL", DamageType.DAMAGE_TYPE_PHYSICAL);
            _scriptEngine.SetGlobalVariable("TYPE_MAGICAL", DamageType.DAMAGE_TYPE_MAGICAL);
            _scriptEngine.SetGlobalVariable("TYPE_TRUE", DamageType.DAMAGE_TYPE_TRUE);
            _scriptEngine.SetGlobalVariable("SOURCE_SPELL", DamageSource.DAMAGE_SOURCE_SPELL);
            _scriptEngine.SetGlobalVariable("SOURCE_SUMMONER_SPELL", DamageSource.DAMAGE_SOURCE_SUMMONER_SPELL);
            _scriptEngine.SetGlobalVariable("SOURCE_ATTACK", DamageSource.DAMAGE_SOURCE_ATTACK);
            _scriptEngine.SetGlobalVariable("SOURCE_PASSIVE", DamageSource.DAMAGE_SOURCE_PASSIVE);
            _scriptEngine.SetGlobalVariable("countObjectsHit", p.ObjectsHit.Count);


            _scriptEngine.Execute(@"
                function dealPhysicalDamage(amount)
                    owner:dealDamageTo(u, amount, TYPE_PHYSICAL, SOURCE_SPELL, false)
                end");

            _scriptEngine.Execute(@"
                function dealMagicalDamage(amount)
                    owner:dealDamageTo(u, amount, TYPE_MAGICAL, SOURCE_SPELL, false)
                end");

            _scriptEngine.Execute(@"
                function dealTrueDamage(amount)
                    owner:dealDamageTo(u, amount, TYPE_TRUE, SOURCE_SPELL, false)
                end");

            _scriptEngine.Execute(@"
                function getNumberObjectsHit()
                    return countObjectsHit
                end");

            try
            {
                _scriptEngine.Execute("applyEffects()");
            }
            catch (LuaException e)
            {
                _logger.LogCoreError("LUA ERROR : " + e.Message);
            }
        }
示例#7
0
        /// <summary>
        /// Called by projectiles when they land / hit, this is where we apply damage/slows etc.
        /// </summary>
        public void ApplyEffects(IAttackableUnit u, IProjectile p = null)
        {
            if (SpellData.HaveHitEffect && !string.IsNullOrEmpty(SpellData.HitEffectName))
            {
                ApiFunctionManager.AddParticleTarget(Owner, SpellData.HitEffectName, u);
            }

            _spellGameScript.ApplyEffects(Owner, u, this, p);
        }
示例#8
0
        public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile)
        {
            ApiFunctionManager.AddParticleTarget(owner, "olaf_axeThrow_tar.troy", target, 1);
            var ad     = owner.GetStats().AttackDamage.Total * 1.1f;
            var ap     = owner.GetStats().AttackDamage.Total * 0.0f;
            var damage = 15 + spell.Level * 20 + ad + ap;

            target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_PHYSICAL, DamageSource.DAMAGE_SOURCE_ATTACK, false);
        }
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            Target  ZoneCenter;
            Vector2 ownerLocation  = new Vector2(owner.X, owner.Y);
            Vector2 targetLocation = new Vector2(spell.X, spell.Y);
            var     spellData      = spell.SpellData;
            float   distance       = Vector2.Distance(ownerLocation, targetLocation);

            if (distance > spellData.CastRange[0])
            {
                var to         = Vector2.Normalize(targetLocation - ownerLocation);
                var range      = to * 650;
                var trueCoords = ownerLocation + range;

                ZoneCenter = new Target(trueCoords.X, trueCoords.Y);
            }
            else
            {
                ZoneCenter = new Target(spell.X, spell.Y);
            }

            Particle p = ApiFunctionManager.AddParticleTarget(owner, "Evelynn_R_cas.troy", ZoneCenter);

            spell.spellAnimation("SPELL4", owner);

            List <AttackableUnit> units = ApiFunctionManager.GetUnitsInRange(ZoneCenter, 250, true);
            var ap = owner.GetStats().AbilityPower.Total * 0.01f;
            var percentHealthDamage = ((new float[] { 0.15f, 0.20f, 0.25f })[spell.Level]) + ap;
            var damage        = 0.0f;
            var monsterDamage = 0.0f;

            foreach (AttackableUnit unit in units)
            {
                if (unit.Team != owner.Team)
                {
                    if (unit is Champion || unit is Minion)
                    {
                        damage = unit.GetStats().CurrentHealth *percentHealthDamage;
                        unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false);
                    }
                    else if (unit is Monster)
                    {
                        damage        = unit.GetStats().CurrentHealth *percentHealthDamage;
                        monsterDamage = Math.Max(damage, 1000);
                        unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false);
                    }
                }
            }

            //TODO:Give evelynn her shield per champion hit.

            ApiFunctionManager.CreateTimer(2.0f, () =>
            {
                ApiFunctionManager.RemoveParticle(p);
            });
        }
示例#10
0
        /// <summary>
        /// Called by projectiles when they land / hit, this is where we apply damage/slows etc.
        /// </summary>
        public void applyEffects(AttackableUnit u, Projectile p = null)
        {
            if (SpellData.HaveHitEffect && !string.IsNullOrEmpty(SpellData.HitEffectName))
            {
                ApiFunctionManager.AddParticleTarget(Owner, SpellData.HitEffectName, u);
            }

            spellGameScript.ApplyEffects(Owner, u, this, p);
            ApiEventManager.OnSpellHit.Publish(u, this);
        }
示例#11
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);
        }
示例#12
0
        public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            Particle p          = ApiFunctionManager.AddParticleTarget(owner, "Overdrive_buf.troy", target, 1);
            var      buff       = ((ObjAIBase)target).AddBuffGameScript("Overdrive", "Overdrive", spell);
            var      visualBuff = ApiFunctionManager.AddBuffHUDVisual("Overdrive", 8.0f, 1, owner);

            ApiFunctionManager.CreateTimer(8.0f, () =>
            {
                ApiFunctionManager.RemoveParticle(p);
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                ((ObjAIBase)target).RemoveBuffGameScript(buff);
            });
        }
示例#13
0
        public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile)
        {
            var ap     = owner.GetStats().AbilityPower.Total * 0.8f;
            var damage = 80 + (spell.Level - 1) * 50 + ap;

            target.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false);
            var slowDuration = new[] { 0, 1, 1.25f, 1.5f, 1.75f, 2 }[spell.Level];

            ApiFunctionManager.AddBuff("Slow", slowDuration, 1, (ObjAIBase)target, owner);
            ApiFunctionManager.AddParticleTarget(owner, "caitlyn_entrapment_tar.troy", target);
            ApiFunctionManager.AddParticleTarget(owner, "caitlyn_entrapment_slow.troy", target);
            projectile.setToRemove();
        }
示例#14
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);
        }
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            var      units                = ApiFunctionManager.GetChampionsInRange(owner, 600, true);
            Champion nearbychampion       = null;
            float    lowestManaPercentage = 100;
            float    maxMana;
            float    newMana;

            for (var i = 0; i <= units.Count - 1; i++)
            {
                var value = units[i];
                if (owner.Team == value.Team && i != 0)
                {
                    var currentMana = value.GetStats().CurrentMana;
                    maxMana = value.GetStats().ManaPoints.Total;
                    if (currentMana * 100 / maxMana < lowestManaPercentage && owner != value)
                    {
                        lowestManaPercentage = currentMana * 100 / maxMana;
                        nearbychampion       = value;
                    }
                }
            }

            if (nearbychampion != null)
            {
                var mp2    = nearbychampion.GetStats().CurrentMana;
                var maxMp2 = nearbychampion.GetStats().ManaPoints.Total;
                if (mp2 + maxMp2 * PERCENT_MAX_MANA_HEAL < maxMp2)
                {
                    nearbychampion.GetStats().CurrentMana = mp2 + maxMp2 * PERCENT_MAX_MANA_HEAL;
                }
                else
                {
                    nearbychampion.GetStats().CurrentMana = maxMp2;
                }
                ApiFunctionManager.AddParticleTarget(nearbychampion, "global_ss_clarity_02.troy", nearbychampion);
            }

            var mp    = owner.GetStats().CurrentMana;
            var maxMp = owner.GetStats().ManaPoints.Total;

            if (mp + maxMp * PERCENT_MAX_MANA_HEAL < maxMp)
            {
                owner.GetStats().CurrentMana = mp + maxMp * PERCENT_MAX_MANA_HEAL;
            }
            else
            {
                owner.GetStats().CurrentMana = maxMp;
            }
            ApiFunctionManager.AddParticleTarget(owner, "global_ss_clarity_02.troy", owner);
        }
示例#16
0
        public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            Particle p          = ApiFunctionManager.AddParticleTarget(owner, "Garen_Base_E_Spin.troy", owner, 1);
            var      visualBuff = ApiFunctionManager.AddBuffHUDVisual("GarenE", 3.0f, 1, owner);

            ApiFunctionManager.CreateTimer(3.0f, () =>
            {
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                ApiFunctionManager.RemoveParticle(p);
            });
            for (float i = 0.0f; i < 3.0; i += 0.5f)
            {
                ApiFunctionManager.CreateTimer(i, () => { ApplySpinDamage(owner, spell, target); });
            }
        }
示例#17
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);
                }
            }
        }
示例#18
0
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            ChampionStatModifier statMod = new ChampionStatModifier();

            statMod.MoveSpeed.PercentBonus   -= 30.0f / 100.0f;
            statMod.AttackSpeed.PercentBonus -= 30.0f / 100.0f;
            statMod.Armor.BaseBonus          -= 10;
            statMod.MagicResist.BaseBonus    -= 10;
            target.AddStatModifier(statMod);
            ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Exhaust.troy", target);
            var visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerExhaustDebuff", 2.5f, 1, (ObjAIBase)target);

            ApiFunctionManager.CreateTimer(2.5f, () =>
            {
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                target.RemoveStatModifier(statMod);
            });
        }
示例#19
0
        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);
            });
        }
示例#20
0
        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();
        }
示例#21
0
        public void Recall(ObjAIBase owner, float timer = 8.0f)
        {
            var spawnPos = GetRespawnPosition();

            IsRecalling  = true;
            _visualBuff  = ApiFunctionManager.AddBuffHUDVisual("Recall", timer, 1, this);
            _addParticle = ApiFunctionManager.AddParticleTarget(this, "TeleportHome.troy", this);
            _canRecall   = true;

            ApiFunctionManager.CreateTimer(timer, () =>
            {
                if (_canRecall)
                {
                    ApiFunctionManager.RemoveBuffHUDVisual(_visualBuff);
                    ApiFunctionManager.RemoveParticle(_addParticle);
                    ApiFunctionManager.TeleportTo(owner, spawnPos.X, spawnPos.Y);
                    IsRecalling = false;
                }
            });
        }
示例#22
0
        public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile)
        {
            Champion champion   = (Champion)target;
            float    time       = 1 + 0.25f * spell.Level;
            var      buff       = ((ObjAIBase)target).AddBuffGameScript("LuluWDebuff", "LuluWDebuff", spell);
            var      visualBuff = ApiFunctionManager.AddBuffHUDVisual("LuluWDebuff", time, 1, (ObjAIBase)target);
            string   model      = champion.Model;

            ChangeModel(owner.Skin, target);

            Particle p = ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_polymorph_01.troy", target, 1);

            ApiFunctionManager.CreateTimer(time, () =>
            {
                ApiFunctionManager.RemoveParticle(p);
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                owner.RemoveBuffGameScript(buff);
                ApiFunctionManager.SetChampionModel((Champion)target, model);
            });
            projectile.setToRemove();
        }
        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);
        }
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            if (!owner.IsDead)
            {
                return;
            }

            owner.Respawn();

            ChampionStatModifier statMod = new ChampionStatModifier();

            statMod.MoveSpeed.PercentBonus = 125.0f / 100.0f;
            owner.AddStatModifier(statMod);
            ApiFunctionManager.AddParticleTarget(owner, "Global_SS_Revive.troy", owner);
            var visualBuff = ApiFunctionManager.AddBuffHUDVisual("SummonerReviveSpeedBoost", 12.0f, 1, owner);

            ApiFunctionManager.CreateTimer(12.0f, () =>
            {
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                owner.RemoveStatModifier(statMod);
            });
        }
示例#25
0
        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);
                });
            }
        }
示例#26
0
文件: Q.cs 项目: egedmz/LolUrfSandbox
        public void OnFinishCasting(IObjAiBase owner, ISpell spell, IAttackableUnit target)
        {
            spell.AddProjectileTarget("pirate_parley_mis", target);

            ApiFunctionManager.AddParticleTarget(owner, "pirate_parley_tar.troy", owner);
        }
示例#27
0
 public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
 {
     ApiFunctionManager.AddParticleTarget(owner, "Kassadin_Base_cas.troy", owner, 1, "L_HAND");
 }
示例#28
0
        public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
        {
            var      units = ApiFunctionManager.GetChampionsInRange(owner, 850, true);
            Champion mostWoundedAlliedChampion = null;
            float    lowestHealthPercentage    = 100;
            float    maxHealth;
            float    newHealth;

            for (var i = 0; i <= units.Count - 1; i++)
            {
                var value = units[i];
                if (owner.Team == value.Team && i != 0)
                {
                    var currentHealth = value.GetStats().CurrentHealth;
                    maxHealth = value.GetStats().HealthPoints.Total;
                    if (currentHealth * 100 / maxHealth < lowestHealthPercentage && owner != value)
                    {
                        lowestHealthPercentage    = currentHealth * 100 / maxHealth;
                        mostWoundedAlliedChampion = value;
                    }
                }
            }

            if (mostWoundedAlliedChampion != null)
            {
                newHealth = mostWoundedAlliedChampion.GetStats().CurrentHealth + 75 + owner.GetStats().GetLevel() * 15;
                maxHealth = mostWoundedAlliedChampion.GetStats().HealthPoints.Total;
                if (newHealth >= maxHealth)
                {
                    mostWoundedAlliedChampion.GetStats().CurrentHealth = maxHealth;
                }
                else
                {
                    mostWoundedAlliedChampion.GetStats().CurrentHealth = newHealth;
                }

                ApiFunctionManager.AddBuffHUDVisual("SummonerHeal", 1.0f, 1, mostWoundedAlliedChampion, 1.0f);
                ChampionStatModifier statMod2 = new ChampionStatModifier();
                statMod2.MoveSpeed.PercentBonus = 30 / 100.0f;
                mostWoundedAlliedChampion.AddStatModifier(statMod2);
                ApiFunctionManager.CreateTimer(1.0f, () => { mostWoundedAlliedChampion.RemoveStatModifier(statMod2); });
                ApiFunctionManager.AddParticleTarget(mostWoundedAlliedChampion, "global_ss_heal_02.troy",
                                                     mostWoundedAlliedChampion);
                ApiFunctionManager.AddParticleTarget(mostWoundedAlliedChampion, "global_ss_heal_speedboost.troy",
                                                     mostWoundedAlliedChampion);
            }

            newHealth = owner.GetStats().CurrentHealth + 75 + owner.GetStats().GetLevel() * 15;
            maxHealth = owner.GetStats().HealthPoints.Total;
            if (newHealth >= maxHealth)
            {
                owner.GetStats().CurrentHealth = maxHealth;
            }
            else
            {
                owner.GetStats().CurrentHealth = newHealth;
            }

            ApiFunctionManager.AddBuffHUDVisual("SummonerHeal", 1.0f, 1, owner, 1.0f);
            ChampionStatModifier statMod = new ChampionStatModifier();

            statMod.MoveSpeed.PercentBonus = 30 / 100.0f;
            owner.AddStatModifier(statMod);
            ApiFunctionManager.CreateTimer(1.0f, () => { owner.RemoveStatModifier(statMod); });
            ApiFunctionManager.AddParticleTarget(owner, "global_ss_heal.troy", owner);
            ApiFunctionManager.AddParticleTarget(owner, "global_ss_heal_speedboost.troy", owner);
        }
示例#29
0
 public void OnStartCasting(Champion owner, Spell spell, AttackableUnit target)
 {
     ApiFunctionManager.AddParticleTarget(owner, "ezreal_bow.troy", owner, 1, "L_HAND");
 }
示例#30
0
 public void OnFinishCasting(Champion owner, Spell spell, AttackableUnit target)
 {
     spell.spellAnimation("SPELL2", owner);
     ApiFunctionManager.AddParticleTarget(owner, "Evelynn_W_cas.troy", owner);
     FrenzyBuff = owner.AddBuffGameScript("EveFrenzy", "EveFrenzy", spell, 3.0f, true);
 }