public override void OnCast()
        {
            if (Caster.CanBeginAction(typeof(RogueSlyFoxSpell)) && CheckSequence())
            {
                Caster.BeginAction(typeof(RogueIntimidationScroll));
                new InternalTimer(Caster, TimeSpan.FromMinutes(1)).Start();

                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "RogueIntimidationSpellDexMod", -20, TimeSpan.Zero),
                    new StatMod(StatType.Str, "RogueIntimidationSpellStrMod", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Hiding, true, -20),
                    new DefaultSkillMod(SkillName.Stealth, true, -20),
                    new DefaultSkillMod(SkillName.Swords, true, 20),
                    new DefaultSkillMod(SkillName.Macing, true, 20),
                    new DefaultSkillMod(SkillName.Fencing, true, -20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);
                Caster.AddSkillMod((SkillMod)mods[6]);
            }
            else
            {
                Caster.SendMessage("You cannot intimidate someone in that state!");
            }
        }
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[Cleric] Str Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[Cleric] Dex Offset", 20, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[Cleric] Int Offset", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Macing, true, 20),
                    new DefaultSkillMod(SkillName.Healing, true, 20),
                    new DefaultSkillMod(SkillName.Anatomy, true, 20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = 10.0 * ClericDivineFocusSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }

                Caster.BodyMod = 123;
                Caster.BeginAction(typeof(ClericAngelicFaithSpell));
                Caster.PlaySound(0x165);
                Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
            }

            FinishSequence();
        }
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                int modify = (int)((Caster.Skills[SkillName.Healing].Value / 25) + (Caster.Skills[SkillName.SpiritSpeak].Value / 25));

                modify = Server.Misc.MyServerSettings.PlayerLevelMod(modify, Caster);

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[] Str Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[] Dex Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[] Int Offset", modify, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Parry, true, modify),
                    new DefaultSkillMod(SkillName.Tactics, true, modify),
                    new DefaultSkillMod(SkillName.Anatomy, true, modify)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = (Caster.Skills[SkillName.Healing].Value + (Caster.Skills[SkillName.SpiritSpeak].Value / 2));
                new InternalTimer(Caster, TimeSpan.FromSeconds((int)span)).Start();

                Caster.BeginAction(typeof(SanctifySpell));
                Caster.PlaySound(0x5C9);
                Point3D wings = new Point3D(Caster.X + 1, Caster.Y + 1, Caster.Z + 18);
                Effects.SendLocationEffect(wings, Caster.Map, 0x3FE5, 30, 10, 0, 0);
            }

            FinishSequence();
        }
Beispiel #4
0
        public override void OnCast()
        {
            TransformationSpellHelper.OnCast(Caster, this);

            if (CheckSequence())
            {
                RemoveEffect(Caster);

                int modify = (int)((Caster.Skills[SkillName.Healing].Value / 5) + (Caster.Skills[SkillName.SpiritSpeak].Value / 10));

                object[] mods = new object[]
                {
                    new StatMod(StatType.Str, "[] Str Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Dex, "[] Dex Offset", modify, TimeSpan.Zero),
                    new StatMod(StatType.Int, "[] Int Offset", modify, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Parry, true, modify),
                    new DefaultSkillMod(SkillName.Tactics, true, modify),
                    new DefaultSkillMod(SkillName.Anatomy, true, modify)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddStatMod((StatMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);
                Caster.AddSkillMod((SkillMod)mods[4]);
                Caster.AddSkillMod((SkillMod)mods[5]);

                double span = (Caster.Skills[SkillName.Healing].Value + (Caster.Skills[SkillName.SpiritSpeak].Value / 2));
                new InternalTimer(Caster, TimeSpan.FromSeconds((int)span)).Start();

                Caster.BeginAction(typeof(SanctifySpell));
                Caster.PlaySound(0x5C9);
                Caster.FixedParticles(0x3FE5, 1, 13, 0, 92, 3, EffectLayer.Head);
            }

            FinishSequence();
        }
Beispiel #5
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(RangerHuntersAimSpell)))
            {
                Caster.SendLocalizedMessage(1005559);
            }

            else if (CheckSequence())
            {
                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "[Ranger] Dex Offset", 5, TimeSpan.Zero),
                    new StatMod(StatType.Str, "[Ranger] Str Offset", 5, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Archery, true, 20),
                    new DefaultSkillMod(SkillName.Tactics, true, 20),
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddStatMod((StatMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);
                Caster.AddSkillMod((SkillMod)mods[3]);

                double span = 1.0 * RangerHuntersAimSpell.GetScalar(Caster);
                new InternalTimer(Caster, TimeSpan.FromMinutes((int)span)).Start();

                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }


                Caster.BeginAction(typeof(RangerHuntersAimSpell));
            }
        }
Beispiel #6
0
        public override void OnCast()
        {
            if (Caster.CanBeginAction(typeof(RogueSlyFoxSpell)) && CheckSequence())
            {
                Caster.BeginAction(typeof(RogueSlyFoxSpell));
                new InternalTimer(Caster, TimeSpan.FromMinutes(1)).Start();

                object[] mods = new object[]
                {
                    new StatMod(StatType.Dex, "SlyFoxSpellStatMod", 20, TimeSpan.Zero),
                    new DefaultSkillMod(SkillName.Hiding, true, 20),
                    new DefaultSkillMod(SkillName.Stealth, true, 20)
                };

                m_Table[Caster] = mods;

                Caster.AddStatMod((StatMod)mods[0]);
                Caster.AddSkillMod((SkillMod)mods[1]);
                Caster.AddSkillMod((SkillMod)mods[2]);


                IMount mount = Caster.Mount;

                if (mount != null)
                {
                    mount.Rider = null;
                }

                Caster.BodyMod = 225;
                Caster.PlaySound(0xE5);
                Caster.FixedParticles(0x3728, 1, 13, 0x480, 92, 3, EffectLayer.Head);
            }
            else
            {
                Caster.SendMessage("You cannot become a sly fox in that state!");
            }
        }
Beispiel #7
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();
        }
Beispiel #8
0
        public void ToogleMetamorphose()
        {
            if (!Caster.CanBeginAction(typeof(MetamorphoseSpell)))
            {
                if (Caster is PlayerMobile)
                {
                    PlayerMobile pm = (PlayerMobile)Caster;
                    pm.Transformation.OnTransformationChange(0, null, -1, true);
                }
                else
                {
                    Caster.BodyMod = 0;
                    Caster.NameMod = null;
                    Caster.HueMod  = -1;
                }

                Caster.EndAction(typeof(MetamorphoseSpell));

                if (Caster is PlayerMobile)
                {
                    ((PlayerMobile)Caster).CheckRaceSkin();
                }

                BaseArmor.ValidateMobile(Caster);

                Effects.SendTargetParticles(Caster, 0x373A, 10, 15, 5036, EffectLayer.Head);
                Caster.PlaySound(0x3BD);

                string  name = String.Format("[Transformation] {0} Offset", StatType.Str);
                StatMod mod  = Caster.GetStatMod(name);

                if (mod != null)
                {
                    Caster.RemoveStatMod(name);
                }

                name = String.Format("[Transformation] {0} Offset", StatType.Dex);
                mod  = Caster.GetStatMod(name);

                if (mod != null)
                {
                    Caster.RemoveStatMod(name);
                }

                name = String.Format("[Transformation] {0} Offset", StatType.Int);
                mod  = Caster.GetStatMod(name);

                if (mod != null)
                {
                    Caster.RemoveStatMod(name);
                }
            }
            else if (m_NewBody == 0)
            {
                ArrayList entries = null;

                if (Caster is PlayerMobile)
                {
                    entries = ((PlayerMobile)Caster).Transformation.MetamorphoseList;
                }

                if (entries != null)
                {
                    Caster.SendGump(new MetamorphoseGump(Caster, Scroll, entries, 5));
                }
            }
            else if (!CheckTransformation(Caster, Caster))
            {
                DoFizzle();
            }
            else if (CheckSequence())
            {
                if (Caster.BeginAction(typeof(MetamorphoseSpell)))
                {
                    if (m_NewBody != 0)
                    {
                        if (!((Body)m_NewBody).IsHuman)
                        {
                            Mobiles.IMount mt = Caster.Mount;

                            if (mt != null)
                            {
                                mt.Rider = null;
                            }
                        }

                        Caster.AddStatMod(new StatMod(StatType.Str, String.Format("[Transformation] {0} Offset", StatType.Str), m_StrMod, TimeSpan.Zero));
                        Caster.AddStatMod(new StatMod(StatType.Dex, String.Format("[Transformation] {0} Offset", StatType.Dex), m_DexMod, TimeSpan.Zero));
                        Caster.AddStatMod(new StatMod(StatType.Int, String.Format("[Transformation] {0} Offset", StatType.Int), m_IntMod, TimeSpan.Zero));

                        if (Caster is PlayerMobile)
                        {
                            PlayerMobile pm = (PlayerMobile)Caster;
                            pm.Transformation.OnTransformationChange(m_NewBody, m_NameMod, m_HueMod, true);
                        }
                        else
                        {
                            Caster.BodyMod = m_NewBody;
                            Caster.NameMod = m_NameMod;
                            Caster.HueMod  = m_HueMod;
                        }

                        Effects.SendTargetParticles(Caster, 0x373A, 10, 15, 5036, EffectLayer.Head);
                        Caster.PlaySound(0x3BD);
                    }
                }
            }

            FinishSequence();
        }