Esempio n. 1
0
        public override void OnDoubleClick(Mobile m)
        {
            if (IsChildOf(m.Backpack))
            {
                m.SendLocalizedMessage(1010086);                 // What do you want to use this on?
                m.BeginTarget(3, false, Server.Targeting.TargetFlags.None, (from, targeted) =>
                {
                    if (targeted is PurifyingFlames)
                    {
                        var flames = targeted as PurifyingFlames;

                        if (!from.InLOS(flames))
                        {
                            from.SendLocalizedMessage(500237); // Target cannot be seen.
                        }
                        else if (!Purified)
                        {
                            m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1156225, m.NetState); // *You purify the phylactery!*

                            Effects.SendLocationParticles(EffectItem.Create(flames.Location, flames.Map, EffectItem.DefaultDuration), 0x3709, 10, 30, 5052);
                            Effects.PlaySound(flames.Location, flames.Map, 0x225); //TODO: Get sound

                            Purified = true;
                            InvalidateProperties();
                        }
                    }
                    else if (targeted is CursedSuitOfArmor)
                    {
                        var armor = targeted as CursedSuitOfArmor;

                        if (!from.InLOS(armor))
                        {
                            from.SendLocalizedMessage(500237); // Target cannot be seen.
                        }
                        else if (!_Purified)
                        {
                            m.SendLocalizedMessage(1156224);                             // *The cursed armor rejects the phylactery!*
                        }
                        else
                        {
                            m.SendLocalizedMessage(1156222);                             // *You throw the phylactery at the armor causing it to disintegrate!*

                            Map map = armor.Map;
                            Point3D p;

                            if (armor.ItemID == 5402)
                            {
                                p = new Point3D(armor.X - 1, armor.Y, armor.Z);
                            }
                            else
                            {
                                p = new Point3D(armor.X, armor.Y - 1, armor.Z);
                            }

                            armor.Delete();
                            Delete();

                            Effects.SendLocationParticles(EffectItem.Create(p, map, EffectItem.DefaultDuration), 0x3709, 10, 30, 2720, 7, 5052, 0);
                            Effects.PlaySound(p, map, 0x225);                               //TODO: Get sound

                            Timer.DelayCall(TimeSpan.FromSeconds(1), () =>
                            {
                                Item item = new Static(Utility.Random(8762, 16));
                                item.Hue  = 1111;
                                item.Name = "Broken Armor";
                                item.MoveToWorld(p, Map.TerMur);

                                ArmoryEncounter encounter = ShadowguardController.GetEncounter(p, Map.TerMur) as ArmoryEncounter;

                                if (encounter != null)
                                {
                                    encounter.AddDestroyedArmor(item);
                                }

                                int ticks = 1;
                                Timer.DelayCall(TimeSpan.FromMilliseconds(50), TimeSpan.FromMilliseconds(50), 2, () =>
                                {
                                    Server.Misc.Geometry.Circle2D(p, map, ticks, (pnt, mob) =>
                                    {
                                        Effects.PlaySound(pnt, mob, 0x307);
                                        Effects.SendLocationEffect(pnt, mob, Utility.RandomBool() ? 14000 : 14013, 20, 2018, 0);
                                    });

                                    ticks++;
                                });
                            });
                        }
                    }
                });
            }
        }
Esempio n. 2
0
        public EnsorcelledArmor(ArmoryEncounter encounter) : base(AIType.AI_Melee, FightMode.Weakest, 10, 1, 0.2, 0.4)
        {
            Encounter   = encounter;
            Name        = "ensorcelled armor";
            BaseSoundID = 412;

            Body = 0x190;
            SetStr(386, 400);
            SetDex(151, 165);
            SetInt(161, 175);

            SetDamage(15, 21);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 35, 45);
            SetResistance(ResistanceType.Fire, 25, 30);
            SetResistance(ResistanceType.Cold, 25, 30);
            SetResistance(ResistanceType.Poison, 10, 20);
            SetResistance(ResistanceType.Energy, 10, 20);

            SetSkill(SkillName.Anatomy, 125.0);
            SetSkill(SkillName.Fencing, 46.0, 77.5);
            SetSkill(SkillName.Macing, 35.0, 57.5);
            SetSkill(SkillName.Poisoning, 60.0, 82.5);
            SetSkill(SkillName.MagicResist, 83.5, 92.5);
            SetSkill(SkillName.Swords, 125.0);
            SetSkill(SkillName.Tactics, 125.0);
            SetSkill(SkillName.Lumberjacking, 125.0);

            var helm = new CloseHelm();

            helm.Hue = 0x96D;
            AddItem(helm);

            var arms = new PlateArms();

            arms.Hue = 0x96D;
            AddItem(arms);

            var legs = new PlateLegs();

            legs.Hue = 0x96D;
            AddItem(legs);

            var tunic = new PlateChest();

            tunic.Hue = 0x96D;
            AddItem(tunic);

            var gorget = new PlateGorget();

            gorget.Hue = 0x96D;
            AddItem(gorget);

            var golves = new PlateGloves();

            golves.Hue = 0x96D;
            AddItem(golves);

            var halberd = new Halberd();

            halberd.Hue = 0x96D;
            AddItem(halberd);

            AddItem(new HalfApron(728));

            Fame  = 8500;
            Karma = -8500;
        }