public MageGemTarget(Item mgem, TeiravonMobile from) : base(-1, false, TargetFlags.None)
 {
     m_Player = from;
     m_MGem   = (MageStaffGem)mgem;
     if (from.IsAquamancer())
     {
         MageClass = 1;
     }
     else if (from.IsAeromancer())
     {
         MageClass = 2;
     }
     else if (from.IsPyromancer())
     {
         MageClass = 3;
     }
     else if (from.IsNecromancer())
     {
         MageClass = 4;
     }
     else if (from.IsGeomancer())
     {
         MageClass = 5;
     }
 }
Example #2
0
        public MageSpell2Target(TeiravonMobile from) : base(-1, false, TargetFlags.Harmful)
        {
            if (from.IsGeomancer())
            {
                MageClass = 1;
            }
            else if (from.IsPyromancer())
            {
                MageClass = 2;
            }
            else if (from.IsAeromancer())
            {
                MageClass = 3;
            }
            else if (from.IsAquamancer())
            {
                MageClass = 4;
            }
            //else if (from.IsNecromancer())
            //	MageClass = 5;

            switch (MageClass)
            {
            case 1:
                phys = 100; fire = cold = pois = nrgy = 0;
                break;

            case 2:
                fire = 100; phys = cold = pois = nrgy = 0;
                break;

            case 3:
                nrgy = 100; phys = cold = pois = fire = 0;
                break;

            case 4:
                cold = 100; phys = fire = pois = nrgy = 0;
                break;
                //case 5:
                //	pois = 100; phys = fire = cold = nrgy = 0;
                //  effecthue = 2883;
                //	break;
            }
        }
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
            {
                SpellHelper.Turn(Caster, p);

                if (p is Item)
                {
                    p = ((Item)p).GetWorldLocation();
                }

                ArrayList targets = new ArrayList();
                double    damage;
                Map       map            = Caster.Map;
                bool      playerVsPlayer = false;
                if (Caster is TeiravonMobile)
                {
                    TeiravonMobile tav = Caster as TeiravonMobile;

                    if (tav.IsAeromancer())
                    {
                        Elemental = Element.Air;
                        damage    = GetNewAosDamage(2, 2, 10, playerVsPlayer);
                        DoMeteorFall(Caster, p, Elemental, damage);
                        FinishSequence();
                        return;
                    }
                    else if (tav.IsAquamancer())
                    {
                        Elemental = Element.Water;
                        damage    = GetNewAosDamage(1, 1, 6, playerVsPlayer);
                        DoMeteorFall(Caster, p, Elemental, damage);
                        FinishSequence();
                        return;
                    }
                    else if (tav.IsGeomancer())
                    {
                        Elemental = Element.Earth;
                        damage    = GetNewAosDamage(2, 1, 4, playerVsPlayer);
                        DoMeteorFall(Caster, p, Elemental, damage);
                        FinishSequence();
                        return;
                    }
                    else if (tav.IsPyromancer())
                    {
                        Elemental = Element.Fire;

                        damage = GetNewAosDamage(12, 1, 5, playerVsPlayer);
                        DoMeteorFall(Caster, p, Elemental, damage);
                        FinishSequence();
                        return;
                    }
                }

                if (map != null)
                {
                    IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), 2);

                    foreach (Mobile m in eable)
                    {
                        if (Caster != m && SpellHelper.ValidIndirectTarget(Caster, m) && Caster.CanBeHarmful(m, false))
                        {
                            targets.Add(m);

                            if (m.Player)
                            {
                                playerVsPlayer = true;
                            }
                        }
                    }

                    eable.Free();
                }



                if (Core.AOS)
                {
                    damage = GetNewAosDamage(48, 1, 5, Caster.Player && playerVsPlayer);
                }
                else
                {
                    damage = Utility.Random(27, 22);
                }

                if (targets.Count > 0)
                {
                    Effects.PlaySound(p, Caster.Map, 0x160);

                    if (Core.AOS && targets.Count > 1)
                    {
                        damage = (damage * 2) / targets.Count;
                    }
                    else if (!Core.AOS)
                    {
                        damage /= targets.Count;
                    }

                    for (int i = 0; i < targets.Count; ++i)
                    {
                        Mobile m = (Mobile)targets[i];

                        double toDeal = damage;

                        if (!Core.AOS && CheckResisted(m))
                        {
                            toDeal *= 0.5;

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

                        Caster.DoHarmful(m);
                        SpellHelper.Damage(this, m, toDeal, 0, 100, 0, 0, 0);

                        Caster.MovingParticles(m, 0x36D4, 7, 0, false, true, 9501, 1, 0, 0x100);
                    }
                }
            }

            FinishSequence();
        }
Example #4
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                Mobile source = Caster;


                SpellHelper.Turn(source, m);

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

                double damage;

                if (Caster is TeiravonMobile)
                {
                    TeiravonMobile tav = Caster as TeiravonMobile;

                    if (tav.IsAeromancer())
                    {
                        damage = GetNewAosDamage(19, 1, 5, Caster.Player && m.Player);
                        source.MovingParticles(m, 0x3728, 12, 0, false, false, 9502, 4019, 0x160);
                        source.PlaySound(0x5C7);

                        SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50);
                        new Gust(tav, m).MoveToWorld(m.Location, m.Map);
                        FinishSequence();
                        return;
                    }
                    if (tav.IsGeomancer())
                    {
                        damage = GetNewAosDamage(21, 1, 5, Caster.Player && m.Player);
                        int randRock = Utility.RandomList(0x1364, 0x1365, 0x1366, 0x1366);
                        source.MovingParticles(m, randRock, 12, 0, false, false, 0x1E00, 0x1E00, 0x13B);
                        source.PlaySound(0x5BF);

                        SpellHelper.GeoDamage(this, m, damage);
                        m.Freeze(TimeSpan.FromSeconds(1));
                        FinishSequence();
                        return;
                    }

                    if (tav.IsAquamancer())
                    {
                        XmlData x = (XmlData)XmlAttach.FindAttachmentOnMobile(Caster, typeof(XmlData), "Cryomancer");
                        if (x != null && CheckSequence())
                        {
                            damage = GetNewAosDamage(20, 1, 5, Caster.Player && m.Player);
                            source.MovingParticles(m, 0x3678, 12, 5, false, false, 0x377a, 0x377a, 0x390);
                            source.PlaySound(0x390);

                            SpellHelper.Damage(this, m, damage, 0, 0, 100, 0, 0);
                            FinishSequence();
                            m.Send(SpeedMode.Walk);


                            TavChill chill = XmlAttach.FindAttachmentOnMobile(m, typeof(TavChill), "chill") as TavChill;

                            if (chill != null)
                            {
                                chill.Expiration = TimeSpan.FromSeconds(3);
                                chill.DoChill();
                            }
                            else
                            {
                                TavChill newchill = new TavChill(5);
                                newchill.Name = "chill";
                                XmlAttach.AttachTo(m, newchill);
                            }
                            return;
                        }
                        else
                        {
                            damage = GetNewAosDamage(25, 1, 5, Caster.Player && m.Player);
                            source.MovingParticles(m, 0x34FF, 12, 5, false, false, 0x377a, 0x377a, 0x027);
                            source.PlaySound(0x026);

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

                    if (tav.IsPyromancer())
                    {
                        damage = GetNewAosDamage(5, 1, 5, Caster.Player && m.Player);
                        source.MovingParticles(m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
                        source.PlaySound(Core.AOS ? 0x15E : 0x44B);

                        SpellHelper.Damage(this, m, damage, 0, 100, 0, 0, 0);
                        int   burntimes = 2 + Utility.Random(5);
                        Timer m_Timer   = new IgniteTimer(tav, m, 1, burntimes, DateTime.Now + TimeSpan.FromSeconds(0.5));
                        m_Timer.Start();
                        FinishSequence();
                        return;
                    }
                }

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

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

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

                    damage *= GetDamageScalar(m);
                }

                source.MovingParticles(m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
                source.PlaySound(Core.AOS ? 0x15E : 0x44B);

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

            FinishSequence();
        }
Example #5
0
        public BOEGump(TeiravonMobile from) : base(0, 0)
        {
            mage = from;

            mage.CloseGump(typeof(MSGemGump));

            int page = 0;

            this.Closable   = true;
            this.Disposable = true;
            this.Dragable   = true;
            this.Resizable  = false;
            AddPage(0);
            AddImage(72, 91, 2200);

            AddPage(++page);

            AddHtml(145, 135, 600, 20, "<basefont size=\"8\" color=\"#ffffff\">Book</basefont>", false, false);
            AddHtml(155, 180, 600, 20, "<basefont size=\"8\" color=\"#ffffff\">Of</basefont>", false, false);
            AddHtml(135, 225, 600, 20, "<basefont size=\"8\" color=\"#ffffff\">Elements</basefont>", false, false);

            AddHtml(260, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Greetings to you</basefont>", false, false);
            AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">new member of the</basefont>", false, false);
            AddHtml(260, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">learned. </basefont>", false, false);
            AddHtml(260, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">With the lore</basefont>", false, false);
            AddHtml(260, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">found in this tome, </basefont>", false, false);
            AddHtml(260, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">your abilities in</basefont>", false, false);
            AddHtml(260, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">binding the forces</basefont>", false, false);
            AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">of the elements will</basefont>", false, false);
            AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">be increased tenfold.</basefont>", false, false);

            AddButton(366, 95, 2206, 2206, 0, GumpButtonType.Page, page + 1);

            AddPage(++page);

            if (mage.IsGeomancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Stone Punch</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Burning Hands</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Shocking Grasp</basefont>", false, false);
            }
            else
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Icy Blow</basefont>", false, false);
            }
            AddHtml(105, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Usage: ]mgspa</basefont>", false, false);
            AddHtml(105, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Description: </basefont>", false, false);
            AddHtml(105, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);
            AddHtml(105, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">You must be</basefont>", false, false);
            AddHtml(105, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">able to touch your</basefont>", false, false);
            AddHtml(105, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">your target. The</basefont>", false, false);
            AddHtml(105, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">lightest touch will </basefont>", false, false);
            AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">suffice.  Release</basefont>", false, false);

            AddHtml(260, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">your arcane power,</basefont>", false, false);
            AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">and select your.</basefont>", false, false);
            AddHtml(260, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">target. The</basefont>", false, false);
            AddHtml(260, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">elemental force</basefont>", false, false);
            AddHtml(260, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">you unleash will</basefont>", false, false);
            AddHtml(260, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">strike your opponent</basefont>", false, false);
            AddHtml(260, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">for a moderate</basefont>", false, false);
            AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">amount of damage.</basefont>", false, false);
            AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);

            AddButton(366, 95, 2206, 2206, 0, GumpButtonType.Page, page + 1);
            AddButton(94, 99, 2205, 2205, 0, GumpButtonType.Page, page - 1);

            AddPage(++page);

            if (mage.IsGeomancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Sling Stones</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Firebolts</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Magic Arrows</basefont>", false, false);
            }
            else
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Hail Stones</basefont>", false, false);
            }
            AddHtml(105, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Usage: ]mgspb</basefont>", false, false);
            AddHtml(105, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Description: </basefont>", false, false);
            AddHtml(105, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);
            AddHtml(105, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">You call upon the</basefont>", false, false);
            AddHtml(105, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">elemental power</basefont>", false, false);
            AddHtml(105, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">to form tangible</basefont>", false, false);
            AddHtml(105, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">missles to strike</basefont>", false, false);
            AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">your opponent from</basefont>", false, false);

            AddHtml(260, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">a distance. Call</basefont>", false, false);
            AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">the power and target</basefont>", false, false);
            AddHtml(260, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">your enemy. As you </basefont>", false, false);
            AddHtml(260, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">grow in power, the</basefont>", false, false);
            AddHtml(260, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">more missles you</basefont>", false, false);
            AddHtml(260, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">will call into</basefont>", false, false);
            AddHtml(260, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">being.</basefont>", false, false);
            AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);
            AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);

            AddButton(366, 95, 2206, 2206, 0, GumpButtonType.Page, page + 1);
            AddButton(94, 99, 2205, 2205, 0, GumpButtonType.Page, page - 1);

            AddPage(++page);

            if (mage.IsGeomancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Earth</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Fire</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Air</basefont>", false, false);
            }
            else
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Water</basefont>", false, false);
            }
            AddHtml(105, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Transformation</basefont>", false, false);
            AddHtml(105, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Usage: ]mgspc</basefont>", false, false);
            AddHtml(105, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Description: </basefont>", false, false);
            AddHtml(105, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);
            AddHtml(105, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">You control and</basefont>", false, false);
            AddHtml(105, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">surrender yourself</basefont>", false, false);
            AddHtml(105, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">to the power of</basefont>", false, false);
            if (mage.IsGeomancer())
            {
                AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Earth. </basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Fire. </basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Air. </basefont>", false, false);
            }
            else
            {
                AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Water. </basefont>", false, false);
            }

            AddHtml(260, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">As you progress</basefont>", false, false);
            AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">in your art, you</basefont>", false, false);
            AddHtml(260, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">may spend a </basefont>", false, false);
            AddHtml(260, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">longer time in</basefont>", false, false);
            AddHtml(260, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">this form.  You</basefont>", false, false);
            AddHtml(260, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">will feel a</basefont>", false, false);
            AddHtml(260, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">weakening shortly</basefont>", false, false);
            AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">before you lose </basefont>", false, false);
            AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">control.</basefont>", false, false);

            AddButton(366, 95, 2206, 2206, 0, GumpButtonType.Page, page + 1);
            AddButton(94, 99, 2205, 2205, 0, GumpButtonType.Page, page - 1);

            AddPage(++page);

            if (mage.IsGeomancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Earth Spikes</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">FireStorm</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Lightning Storm</basefont>", false, false);
            }
            else
            {
                AddHtml(105, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Hail Storm</basefont>", false, false);
            }
            AddHtml(105, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Usage: ]mgspd</basefont>", false, false);
            AddHtml(105, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Description: </basefont>", false, false);
            AddHtml(105, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\"></basefont>", false, false);
            AddHtml(105, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Your harness</basefont>", false, false);
            AddHtml(105, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">elemental power</basefont>", false, false);
            AddHtml(105, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">to form an area</basefont>", false, false);
            AddHtml(105, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">surronding you</basefont>", false, false);
            AddHtml(105, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">with the deadly</basefont>", false, false);
            AddHtml(260, 135, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">force of your</basefont>", false, false);
            if (mage.IsGeomancer())
            {
                AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Earth powers.</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Fire powers.</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Air powers.</basefont>", false, false);
            }
            else
            {
                AddHtml(260, 150, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Water powers.</basefont>", false, false);
            }
            AddHtml(260, 165, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">Additionaly,</basefont>", false, false);
            AddHtml(260, 180, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">creatures caught</basefont>", false, false);
            AddHtml(260, 195, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">in the elemental</basefont>", false, false);
            AddHtml(260, 210, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">effect will be</basefont>", false, false);
            AddHtml(260, 225, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">victim of </basefont>", false, false);
            if (mage.IsGeomancer())
            {
                AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">a vicious </basefont>", false, false);
                AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">bleed attack.</basefont>", false, false);
            }
            else if (mage.IsPyromancer())
            {
                AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">a severe </basefont>", false, false);
                AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">stamina drain.</basefont>", false, false);
            }
            else if (mage.IsAeromancer())
            {
                AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">a massive</basefont>", false, false);
                AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">mana loss.</basefont>", false, false);
            }
            else
            {
                AddHtml(260, 240, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">a freezing</basefont>", false, false);
                AddHtml(260, 255, 600, 20, "<basefont size=\"6\" color=\"#ffffff\">paralyzation.</basefont>", false, false);
            }

            AddButton(94, 99, 2205, 2205, 0, GumpButtonType.Page, page - 1);
        }
Example #6
0
        public static void MageAOEEffect(TeiravonMobile from)
        {
            TeiravonMobile player = from;
            int            EffectID;
            int            PhysDam;
            int            FireDam;
            int            ColdDam;
            int            PoisDam;
            int            EnerDam;
            int            Dmg;
            int            MageClass;
            ArrayList      TargList = new ArrayList();

            player.Mana -= 125;

            if (from.IsGeomancer())
            {
                MageClass = 1;
                EffectID  = 0x37FA;
                PhysDam   = 100;
                FireDam   = ColdDam = PoisDam = EnerDam = 0;
            }
            else if (from.IsPyromancer())
            {
                MageClass = 2;
                EffectID  = 0x3709;
                FireDam   = 100;
                PhysDam   = ColdDam = PoisDam = EnerDam = 0;
            }
            else if (from.IsAeromancer())
            {
                MageClass = 3;
                EffectID  = 0x375A;
                EnerDam   = 100;
                FireDam   = ColdDam = PoisDam = PhysDam = 0;
            }
            else             // Aquamancer
            {
                MageClass = 4;
                EffectID  = 0x372B;
                ColdDam   = 100;
                FireDam   = PhysDam = PoisDam = EnerDam = 0;
            }

            for (int xx = -5; xx <= 5; ++xx)
            {
                for (int yy = -5; yy <= 5; ++yy)
                {
                    if (!((xx == 0) && (yy == 0)))
                    {
                        Effects.SendLocationEffect(new Point3D(player.X + xx, player.Y + yy, player.Z), player.Map, EffectID, 13);
                    }
                }
            }

            Dmg = 10 * player.PlayerLevel;

            foreach (Mobile m in player.GetMobilesInRange(5))
            {
                if (m != player)
                {
                    TargList.Add(m);
                }
            }

            if (TargList.Count != 0)
            {
                for (int i = 0; i < TargList.Count; ++i)
                {
                    Mobile m = (Mobile)TargList[i];
                    AOS.Damage(m, player, Dmg, PhysDam, FireDam, ColdDam, PoisDam, EnerDam);

                    switch (MageClass)
                    {
                    case 1:
                        BleedAttack.BeginBleed(m, player);
                        m.SendMessage("The piercing spikes cause you to begin bleeding");
                        break;

                    case 2:
                        m.Stam = (int)(m.Stam / 10);
                        m.SendMessage("The scorching heats drains you of your stamina");
                        break;

                    case 3:
                        m.Mana = (int)(m.Mana / 10);
                        m.SendMessage("The electrifying experience robs your of your ability to concentrate mana");
                        break;

                    case 4:
                        m.Paralyze(m.Player ? TimeSpan.FromSeconds(6.0) : TimeSpan.FromSeconds(6.0));
                        m.SendMessage("The intence cold paralyzes you");
                        break;
                    }
                }
            }
        }
Example #7
0
        public static void EleTransform(TeiravonMobile from)
        {
            int EleBody;
            int StrBon;
            int DexBon;
            int PhysAdj;
            int FireAdj;
            int ColdAdj;
            int PoisAdj;
            int EnerAdj;

            if (from.IsGeomancer())
            {
                EleBody = 14;
                StrBon  = 30;
                DexBon  = 10;
                PhysAdj = 30 + (from.PlayerLevel * 2);
                FireAdj = from.PlayerLevel;
                ColdAdj = from.PlayerLevel;
                PoisAdj = from.PlayerLevel;
                EnerAdj = -10 - ((int)(from.PlayerLevel * 1.5));
            }
            else if (from.IsPyromancer())
            {
                EleBody = 15;
                StrBon  = 15;
                DexBon  = 25;
                FireAdj = 30 + (from.PlayerLevel * 2);
                PhysAdj = from.PlayerLevel;
                EnerAdj = from.PlayerLevel;
                PoisAdj = from.PlayerLevel;
                ColdAdj = -10 - ((int)(from.PlayerLevel * 1.5));
            }
            else if (from.IsAeromancer())
            {
                EleBody = 13;
                StrBon  = 10;
                DexBon  = 30;
                EnerAdj = 30 + (from.PlayerLevel * 2);
                FireAdj = from.PlayerLevel;
                ColdAdj = from.PlayerLevel;
                PoisAdj = from.PlayerLevel;
                PhysAdj = -10 - ((int)(from.PlayerLevel * 1.5));
            }
            else              //Aquamancer
            {
                EleBody = 16;
                StrBon  = 25;
                DexBon  = 15;
                ColdAdj = 30 + (from.PlayerLevel * 2);
                EnerAdj = from.PlayerLevel;
                PhysAdj = from.PlayerLevel;
                PoisAdj = from.PlayerLevel;
                FireAdj = -10 - ((int)(from.PlayerLevel * 1.5));
            }

            from.SendMessage("You call upon the elemental forces and Transform yourself!");

            TimeSpan StatDuration = TimeSpan.FromMinutes(1 + ((int)(from.PlayerLevel / 2)));
            DateTime Duration     = DateTime.Now + TimeSpan.FromMinutes(2 + ((int)(from.PlayerLevel / 2)));

            from.Mana -= 10 * ((int)(from.PlayerLevel / 2));

            Timer m_Timer = new EleTransformTimer(from, EleBody, StrBon, DexBon, PhysAdj, FireAdj, ColdAdj, PoisAdj, EnerAdj, StatDuration, Duration);

            m_Timer.Start();
        }
        public MSGemGump(Mobile from, Item msgem, MageStaff mstaff) : base(0, 0)
        {
            m_Player = (TeiravonMobile)from;
            gem      = (MageStaffGem)msgem;
            staff    = (MageStaff)mstaff;

            m_Player.CloseGump(typeof(MSGemGump));

            int x  = 140;
            int y  = 170;
            int x2 = 116;
            int y2 = 173;
            int i  = 1;

            this.Closable   = false;
            this.Disposable = false;
            this.Dragable   = true;
            this.Resizable  = false;

            AddPage(0);
            AddBackground(70, 80, 350, 325, 3600);
            AddBackground(95, 125, 300, 255, 9350);

            AddHtml(200, 100, 600, 20, "<basefont size=\"8\" color=\"#ffffff\">Mage Staff Gem</basefont>", false, false);
            AddLabel(155, 135, 150, "Choose your Mage Staff Power:");

            AddLabel(x, y + (20 * i), 150, "Mana Reneration");
            AddButton(x2, y2 + (20 * i), 2224, 2224, 1, GumpButtonType.Reply, 0);
            i++;
            AddLabel(x, y + (20 * i), 150, "Increased Spell Damage");
            AddButton(x2, y2 + (20 * i), 2224, 2224, 2, GumpButtonType.Reply, 0);
            i++;
            if (staff.WeaponAttributes.MageWeapon < 30)
            {
                AddLabel(x, y + (20 * i), 150, "Mage Weapon");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 3, GumpButtonType.Reply, 0);
                i++;
            }
            AddLabel(x, y + (20 * i), 150, "Faster Casting");
            AddButton(x2, y2 + (20 * i), 2224, 2224, 4, GumpButtonType.Reply, 0);
            i++;
            AddLabel(x, y + (20 * i), 150, "Faster Cast Recovery");
            AddButton(x2, y2 + (20 * i), 2224, 2224, 5, GumpButtonType.Reply, 0);
            i++;
            if (m_Player.IsAquamancer())
            {
                AddLabel(x, y + (20 * i), 150, "Hit Harm");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 6, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Hit Cold Area");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 7, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Cold Resist");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 8, GumpButtonType.Reply, 0);
                i++;
            }
            else if (m_Player.IsAeromancer())
            {
                AddLabel(x, y + (20 * i), 150, "Hit Lightning");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 9, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Hit Energy Area");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 10, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Energy Resist");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 11, GumpButtonType.Reply, 0);
                i++;
            }
            else if (m_Player.IsPyromancer())
            {
                AddLabel(x, y + (20 * i), 150, "Hit Fireball");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 12, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Hit Fire Area");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 13, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Fire Resist");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 14, GumpButtonType.Reply, 0);
                i++;
            }
            else if (m_Player.IsNecromancer())
            {
                AddLabel(x, y + (20 * i), 150, "Hit Dispel");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 15, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Hit Poison Area");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 16, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Poison Resist");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 17, GumpButtonType.Reply, 0);
                i++;
            }
            else if (m_Player.IsGeomancer())
            {
                AddLabel(x, y + (20 * i), 150, "Hit Magic Arrow");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 18, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Hit Physical Area");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 19, GumpButtonType.Reply, 0);
                i++;
                AddLabel(x, y + (20 * i), 150, "Physical Resist");
                AddButton(x2, y2 + (20 * i), 2224, 2224, 20, GumpButtonType.Reply, 0);
                i++;
            }
        }
Example #9
0
        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237);                   // Target can not be seen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

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

                double damage;


                if (Caster is TeiravonMobile)
                {
                    TeiravonMobile tav = Caster as TeiravonMobile;

                    if (tav.IsAeromancer())
                    {
                        damage = GetNewAosDamage(48, 1, 5, Caster.Player && m.Player);
                        //m.FixedParticles(0x37CC, 10, 202, 5052, EffectLayer.LeftFoot);
                        m.FixedParticles(0x37C, 6, 15, 5052, 2693, 1, EffectLayer.LeftFoot);
                        m.PlaySound(0x5CE);

                        SpellHelper.Damage(this, m, damage, 0, 0, 50, 0, 50);
                        new Gust(tav, m).MoveToWorld(m.Location, m.Map);
                        FinishSequence();
                        return;
                    }
                    if (tav.IsGeomancer())
                    {
                        damage = GetNewAosDamage(48, 1, 5, Caster.Player && m.Player);
                        Caster.MovingParticles(m, 0x11B6, 5, 0, true, false, 0x1E00, 0x1E00, 0x13B);
                        m.PlaySound(0x21E);

                        SpellHelper.GeoDamage(this, m, damage);
                        m.Freeze(TimeSpan.FromSeconds(2.5));
                        FinishSequence();
                        return;
                    }

                    if (tav.IsAquamancer())
                    {
                        damage = GetNewAosDamage(45, 1, 25, Caster.Player && m.Player);
                        m.FixedParticles(0x3789, 30, 20, 5052, EffectLayer.CenterFeet);
                        m.PlaySound(0x026);

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

                    if (tav.IsPyromancer())
                    {
                        damage = GetNewAosDamage(45, 1, 5, Caster.Player && m.Player);
                        m.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
                        m.PlaySound(0x208);
                        SpellHelper.Damage(this, m, damage, 0, 100, 0, 0, 0);
                        int   burntimes = 2 + Utility.Random(3);
                        Timer m_Timer   = new IgniteTimer(tav, m, 1, burntimes, DateTime.Now + TimeSpan.FromSeconds(1.5));
                        m_Timer.Start();
                        FinishSequence();
                        return;
                    }
                }



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

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

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

                    damage *= GetDamageScalar(m);
                }

                m.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
                m.PlaySound(0x208);

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

            FinishSequence();
        }