Ejemplo n.º 1
0
        public override void Detonate(Mobile m)
        {
            int dam = Utility.RandomMinMax(MinDamage, MaxDamage);

            if (DeploymentType == DeploymentType.Tripwire)
            {
                dam *= 2;
            }

            Effects.SendBoltEffect(m, true, 0);
            AOS.Damage(m, Owner, dam, 0, 0, 100, 0, 0);

            MortalStrike.BeginWound(m, TimeSpan.FromSeconds(3));

            base.Detonate(m);
        }
Ejemplo n.º 2
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                if (Caster is TeiravonMobile && (((TeiravonMobile)Caster).IsCleric() || ((TeiravonMobile)Caster).IsDarkCleric() || ((TeiravonMobile)Caster).IsPaladin()) && ((TeiravonMobile)Caster).Faith != TeiravonMobile.Deity.None)
                {
                    TeiravonMobile Cleric = Caster as TeiravonMobile;

                    SpellHelper.Turn(Caster, m);

                    SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                    if (m is TeiravonMobile && ((TeiravonMobile)m).m_CloakOfDarkness)
                    {
                        return;
                    }

                    double damage;
                    switch (Cleric.Faith)
                    {
                    case TeiravonMobile.Deity.Adalia:
                    {
                        damage = GetNewAosDamage(10, 1, 5, Caster.Player && m.Player);
                        SpellHelper.Damage(this, m, damage, 0, 0, 0, 0, 100);
                        m.Stam -= (int)damage;
                        m.FixedParticles(0x37B9, 10, 30, 5013, 1153, 4, EffectLayer.Waist);
                        m.PlaySound(0x470);
                    }
                    break;

                    case TeiravonMobile.Deity.Cultist:
                    {
                        damage = GetNewAosDamage(5, 1, 5, true);
                        SpellHelper.Damage(this, Caster, damage);
                        damage = GetNewAosDamage(25, 5, 10, true);
                        SpellHelper.Damage(this, m, damage, 20, 20, 20, 20, 20);

                        m.FixedParticles(0x37C3, 10, 30, 5013, 137, 4, EffectLayer.Waist);
                        Caster.FixedParticles(0x37C3, 10, 30, 5013, 137, 4, EffectLayer.Waist);
                        m.PlaySound(0x44E);
                    }
                    break;

                    case TeiravonMobile.Deity.Gruumsh:
                    {
                        int hpMissing = (int)((Caster.HitsMax - Caster.Hits) * .2);
                        damage = GetNewAosDamage(10 + hpMissing, 1, 5, Caster.Player && m.Player);
                        SpellHelper.Damage(this, m, damage, 0, 100, 0, 0, 0);

                        Caster.FixedParticles(0x36FE, 10, 30, 5013, 137, 4, EffectLayer.Waist);
                        m.PlaySound(0x056);
                    }
                    break;

                    case TeiravonMobile.Deity.Jareth:
                    {
                        damage = GetNewAosDamage(1, 2, 2, Caster.Player && m.Player);
                        SpellHelper.Damage(this, m, damage);

                        Caster.MovingEffect(m, 0x1CEE, 10, 30, false, false, 1886, 0);
                        m.PlaySound(0x3AC);
                    }
                    break;

                    case TeiravonMobile.Deity.Kamalini:
                    {
                        damage = GetNewAosDamage(22, 1, 5, Caster.Player && m.Player);
                        if (!m.InRange(Caster, 4))
                        {
                            damage *= 0.25;         // 1/4 damage at > 4 tile range
                        }
                        else if (!m.InRange(Caster, 2))
                        {
                            damage *= 0.50;         // 1/2 damage at 2 tile range
                        }
                        SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);
                        Caster.Heal((int)damage * (1 - m.ColdResistance / 100));
                        Caster.PrivateOverheadMessage(MessageType.Spell, 495, false, damage.ToString(), Caster.NetState);

                        Caster.FixedParticles(0x373A, 10, 30, 5013, 157, 4, EffectLayer.Waist);
                        m.FixedParticles(0x374A, 10, 30, 5013, 157, 4, EffectLayer.Waist);
                        m.PlaySound(0x4B2);
                    }
                    break;

                    case TeiravonMobile.Deity.Kinarugi:
                    {
                        damage = GetNewAosDamage(1, 2, 3, Caster.Player && m.Player);
                        int duration = GetNewAosDamage(8, 1, 3, Caster.Player && m.Player);
                        if (!MortalStrike.IsWounded(m))
                        {
                            MortalStrike.BeginWound(m, TimeSpan.FromSeconds(duration));
                        }

                        Timer m_Timer = new KinTimer(this, Caster, m, duration, (int)damage);
                        m_Timer.Start();

                        m.LocalOverheadMessage(MessageType.Spell, 250, false, duration.ToString());
                        m.FixedParticles(0x3789, 10, 30, 5013, 1888, 2, EffectLayer.Waist);
                        m.PlaySound(0x4B2);
                    }
                    break;

                    case TeiravonMobile.Deity.Lloth:
                    {
                        damage = GetNewAosDamage(10, 1, 5, Caster.Player && m.Player);

                        TavWebbing webbing = XmlAttach.FindAttachmentOnMobile(m, typeof(TavWebbing), "web") as TavWebbing;

                        if (webbing != null)
                        {
                            webbing.Expiration = TimeSpan.FromSeconds(3);
                            webbing.DoWebbing();
                        }
                        else
                        {
                            TavWebbing newweb = new TavWebbing(5);
                            newweb.Name = "web";
                            XmlAttach.AttachTo(m, newweb);
                        }
                        int web = Utility.RandomMinMax(3811, 3814);
                        Caster.MovingParticles(m, web, 12, 5, false, false, 0x377a, 0x377a, -1);
                        SpellHelper.Damage(this, m, damage, 50, 0, 0, 50, 0);
                        Spiderling spiderling = new Spiderling(Caster, m, TimeSpan.FromSeconds(5));
                        spiderling.Combatant = m;
                        Spells.Necromancy.AnimateDeadSpell.Register(Caster, spiderling);
                        spiderling.MoveToWorld(m.Location, m.Map);
                        spiderling.YellowHealthbar = true;
                        Caster.PlaySound(0x21B);
                    }
                    break;

                    case TeiravonMobile.Deity.Narindun:
                    {
                        SlayerEntry atkSlayer = SlayerGroup.GetEntryByName(SlayerName.DaemonDismissal);
                        int         val       = atkSlayer.Slays(m) ? 45 : 15;
                        damage = GetNewAosDamage(val, 1, 5, Caster.Player & m.Player);

                        SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50);
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.PlaySound(0x0FC);
                    }
                    break;

                    case TeiravonMobile.Deity.Occido:
                    {
                        int         val     = 0;
                        ArrayList   targets = new ArrayList();
                        SlayerEntry undead  = SlayerGroup.GetEntryByName(SlayerName.Silver);
                        foreach (Mobile u in m.GetMobilesInRange(5))
                        {
                            if (undead.Slays(u) || (u is TeiravonMobile && ((TeiravonMobile)u).IsUndead()))
                            {
                                val++;
                                targets.Add(u);
                            }
                        }
                        if (val > 0)
                        {
                            for (int i = 0; i < targets.Count; ++i)
                            {
                                Mobile x = (Mobile)targets[i];
                                Effects.SendMovingEffect(x, m, Utility.Random(0x1AE0, 4), 30, 10, false, false, 2004, 3);
                            }
                        }
                        val   *= 3;
                        damage = GetNewAosDamage(5 + val, 1, 5, Caster.Player & m.Player);

                        SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50);
                        m.FixedParticles(0x1F1F, 10, 30, 5013, 2562, 3, EffectLayer.Waist);
                        m.PlaySound(0x44E);
                    }
                    break;

                    case TeiravonMobile.Deity.Saerin:
                    {
                        int rock = Utility.RandomMetalHue();
                        m.FixedParticles(0x2565, 15, 15, 5013, rock, 1, EffectLayer.Waist);
                        damage = GetNewAosDamage(15, 1, 5, Caster.Player & m.Player);
                        SpellHelper.Damage(this, m, damage, 100, 0, 0, 0, 0);
                        int           sound = Utility.RandomMinMax(0x3B8, 0x3BE);
                        ResistanceMod mod   = new ResistanceMod(ResistanceType.Physical, -15);
                        m.AddResistanceMod(mod);
                        m.PlaySound(sound);
                        SaerTimer timer = new SaerTimer(m, mod);
                        timer.Start();
                        if (m.PhysicalResistance <= 0)
                        {
                            m.Animate(21, 5, 1, false, false, 0);
                            m.Freeze(TimeSpan.FromSeconds(.5));
                        }
                    }
                    break;

                    case TeiravonMobile.Deity.Talathas:
                    {
                        BaseWeapon weap = Caster.Weapon as BaseWeapon;
                        weap.OnHit(Caster, m);
                        Caster.NextCombatTime = DateTime.Now;
                        int effect = weap is Fists ? 0x36FE : weap.ItemID;
                        m.FixedParticles(effect, 10, 30, 5013, 2360, 2, EffectLayer.Waist);
                    }
                    break;

                    case TeiravonMobile.Deity.Valar:
                    {
                        string  name    = Utility.Random(100).ToString();
                        StatMod themmod = new StatMod(StatType.Dex, "ValarDrain", (int)(m.Dex * -.33), TimeSpan.FromSeconds(15));
                        StatMod castmod = new StatMod(StatType.Dex, "ValarDrain", (int)(m.Dex * .33), TimeSpan.FromSeconds(15));
                        m.AddStatMod(themmod);
                        Caster.AddStatMod(castmod);
                        damage = GetNewAosDamage(15, 1, 5, Caster.Player & m.Player);
                        SpellHelper.Damage(this, m, damage, 0, 0, 0, 50, 50);

                        m.FixedParticles(0x374A, 10, 30, 5013, 2364, 3, EffectLayer.Waist);
                        m.MovingParticles(Caster, 0x36E4, 10, 10, false, false, 2367, 3, 0x035, 0x36FE, 0x035, 0);
                        m.PlaySound(0x456);
                    }
                    break;
                    }
                }
                else
                {
                    SpellHelper.Turn(Caster, m);

                    SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                    double damage;

                    if (Core.AOS)
                    {
                        damage = GetNewAosDamage(17, 1, 5, Caster.Player && m.Player);
                    }
                    else
                    {
                        damage = Utility.Random(1, 15);

                        if (CheckResisted(m))
                        {
                            damage *= 0.75;

                            m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
                        }

                        damage *= GetDamageScalar(m);
                    }

                    /*
                     *              if ( !m.InRange( Caster, 2 ) )
                     *                  damage *= 0.25; // 1/4 damage at > 2 tile range
                     *              else if ( !m.InRange( Caster, 1 ) )
                     *                  damage *= 0.50; // 1/2 damage at 2 tile range
                     */
                    if (Core.AOS)
                    {
                        m.FixedParticles(0x374A, 10, 30, 5013, 1153, 2, EffectLayer.Waist);
                        m.PlaySound(0x0FC);
                    }
                    else
                    {
                        m.FixedParticles(0x374A, 10, 15, 5013, EffectLayer.Waist);
                        m.PlaySound(0x1F1);
                    }

                    SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);
                }
            }

            FinishSequence();
        }
Ejemplo n.º 3
0
 public override void AlterMeleeDamageTo(Mobile to, ref int damage)
 {
     MortalStrike.BeginWound(to, TimeSpan.FromSeconds(5));
 }