Пример #1
0
        public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target)
        {
            spell.SpellAnimation("SPELL4", owner);
            AddParticle(owner, "katarinaDeathLotus_indicator_cas.troy", owner.X, owner.Y);
            CreateTimer(0.51f, () =>
            {
                spell.SpellAnimation("SPELL4", owner);
            });
            var units = GetUnitsInRange(owner, 550, true);

            foreach (var unit in units)
            {
                if ((unit.Team != owner.Team) && unit is ObjAiBase && !(unit is BaseTurret))
                {
                    //MAGIC DAMAGE: 35 / 55 / 75 (+17.5% AP) (+ 30% BONUS AD)
                    var ap = owner.Stats.AbilityPower.Total * .175f;
                    var ad = owner.Stats.AttackDamage.FlatBonus * .3f;

                    var damage = new[] { 35, 55, 75 }[spell.Level - 1] +ap + ad;

                    for (var i = 0.0f; i < 2.0; i += 0.25f)
                    {
                        CreateTimer(i, () => { unit.TakeDamage(owner, damage, DamageType.DAMAGE_TYPE_MAGICAL, DamageSource.DAMAGE_SOURCE_SPELL, false); });
                    }

                    // Possibly for non-human champions or a different skin:
                    // AddParticleTarget(owner, "katarina_w_tar_sand.troy", unit);

                    //LogInfo("HasBuff: " + hasbuff);

                    if ((unit is Champion) && (hasbuff == false))
                    {
                        hasbuff = true;
                    }
                }
            }
            if (hasbuff == true)
            {
                ((ObjAiBase)target).AddBuffGameScript("KatarinaRSound", "KatarinaRSound", spell, 2.5f, true);
                var p = AddParticleTarget(owner, "katarina_deathLotus_tar.troy", owner, 1);

                CreateTimer(2.5f, () =>
                {
                    RemoveParticle(p);
                    hasbuff = false;
                });
            }
        }
Пример #2
0
        public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target)
        {
            if (target == null)
            {
                return;
            }

            spell.SpellAnimation("SPELL3", owner);
            AddParticleTarget(owner, "katarina_shadowStep_cas.troy", owner);
            TeleportTo(owner, target.X + 80, target.Y + 80);
        }
Пример #3
0
        public void OnStartCasting(IChampion owner, ISpell spell, IAttackableUnit target)
        {
            spell.SpellAnimation("SPELL3", owner);
            var p          = AddParticleTarget(owner, "Garen_Base_E_Spin.troy", owner, 1);
            var visualBuff = AddBuffHudVisual("GarenE", 3.0f, 1,
                                              BuffType.COMBAT_ENCHANCER, owner, 3.0f);

            CreateTimer(3.0f, () =>
            {
                RemoveParticle(p);
            });
            for (var i = 0.0f; i < 3.0; i += 0.5f)
            {
                CreateTimer(i, () => { ApplySpinDamage(owner, spell, target); });
            }
        }