}// Melisande's Fermented Wine
 public override void Drink(Mobile from)
 {
     if (MondainsLegacy.CheckML(from))
     {
         base.Drink(from);
     }
 }
        public override bool Drink(Mobile from)
        {
            if (MondainsLegacy.CheckML(from))
            {
                return(base.Drink(from));
            }

            return(false);
        }
示例#3
0
 public override void OnDoubleClick(Mobile from)
 {
     if (IsChildOf(from.Backpack))
     {
         if (MondainsLegacy.CheckML(from))
         {
             from.SendGump(new ConfirmGump(this));
         }
     }
     else
     {
         from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
     }
 }
示例#4
0
 public override int LabelNumber => 1041088;// Hair Dye
 public override void OnDoubleClick(Mobile from)
 {
     if (IsChildOf(from.Backpack))
     {
         if (from is PlayerMobile && MondainsLegacy.CheckML(from))
         {
             BaseGump.SendGump(new HairDyeConfirmGump(from as PlayerMobile, Hue, this));
         }
     }
     else
     {
         from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
     }
 }
示例#5
0
        private static bool CanChange(PlayerMobile from, Race targetRace)
        {
            if (from.Deleted)
            {
                return(false);
            }

            if (from.Race == targetRace)
            {
                from.SendLocalizedMessage(1111918); // You are already that race.
            }
            else if (!MondainsLegacy.CheckML(from, false))
            {
                from.SendLocalizedMessage(1073651); // You must have Mondain's Legacy before proceeding...
            }
            else if (!from.Alive)
            {
                from.SendLocalizedMessage(1073646); // Only the living may proceed...
            }
            else if (from.Mounted)
            {
                from.SendLocalizedMessage(1073647); // You may not continue while mounted...
            }
            else if (!from.CanBeginAction <PolymorphSpell>() || DisguiseTimers.IsDisguised(from) ||
                     AnimalForm.UnderTransformation(from) || !from.CanBeginAction <IncognitoSpell>() ||
                     from.IsBodyMod)                // TODO: Does this cover everything?
            {
                from.SendLocalizedMessage(1073648); // You may only proceed while in your original state...
            }
            else if (from.Spell?.IsCasting == true)
            {
                from.SendLocalizedMessage(1073649); // One may not proceed while embracing magic...
            }
            else if (from.Poisoned)
            {
                from.SendLocalizedMessage(1073652); // You must be healthy to proceed...
            }
            else if (IsWearingEquipment(from))
            {
                from.SendLocalizedMessage(1073650); // To proceed you must be unburdened by equipment...
            }
            else
            {
                return(true);
            }

            return(false);
        }
示例#6
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (DropPrimer)
            {
                SkillMasteryPrimer primer = SkillMasteryPrimer.GetRandom();
                List <DamageStore> rights = GetLootingRights();

                if (rights.Count > 0)
                {
                    Mobile m = rights[Utility.Random(rights.Count)].m_Mobile;

                    m.SendLocalizedMessage(1156209); // You have received a mastery primer!

                    if (m.Backpack == null || !m.Backpack.TryDropItem(m, primer, false))
                    {
                        m.BankBox.DropItem(primer);
                    }
                }
                else
                {
                    c.DropItem(primer);
                }
            }

            if (GivesMLMinorArtifact && 0.5 > Utility.RandomDouble())
            {
                MondainsLegacy.DropPeerlessMinor(c);
            }

            if (this.m_Altar != null)
            {
                this.m_Altar.OnPeerlessDeath();
            }
        }
示例#7
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (DropPrimer)
            {
                SkillMasteryPrimer primer = SkillMasteryPrimer.GetRandom();
                List <DamageStore> rights = GetLootingRights();

                if (rights.Count > 0)
                {
                    Mobile m = rights[Utility.Random(rights.Count)].m_Mobile;

                    m.SendLocalizedMessage(1156209); // You have received a mastery primer!

                    if (m.Backpack == null || !m.Backpack.TryDropItem(m, primer, false))
                    {
                        m.BankBox.DropItem(primer);
                    }
                }
                else
                {
                    c.DropItem(primer);
                }
            }

            if (GivesMLMinorArtifact && 0.5 > Utility.RandomDouble())
            {
                MondainsLegacy.DropPeerlessMinor(c);
            }

            if (GiveMLSpecial)
            {
                if (Utility.RandomDouble() < 0.10)
                {
                    c.DropItem(new HumanFeyLeggings());
                }

                if (Utility.RandomDouble() < 0.025)
                {
                    c.DropItem(new CrimsonCincture());
                }

                if (0.05 > Utility.RandomDouble())
                {
                    switch (Utility.Random(32))
                    {
                    case 0: c.DropItem(new AssassinChest()); break;

                    case 1: c.DropItem(new AssassinArms()); break;

                    case 2: c.DropItem(new AssassinLegs()); break;

                    case 3: c.DropItem(new AssassinGloves()); break;

                    case 4: c.DropItem(new DeathChest()); break;

                    case 5: c.DropItem(new DeathArms()); break;

                    case 6: c.DropItem(new DeathLegs()); break;

                    case 7: c.DropItem(new DeathBoneHelm()); break;

                    case 8: c.DropItem(new DeathGloves()); break;

                    case 9: c.DropItem(new MyrmidonArms()); break;

                    case 10: c.DropItem(new MyrmidonLegs()); break;

                    case 11: c.DropItem(new MyrmidonGorget()); break;

                    case 12: c.DropItem(new MyrmidonChest()); break;

                    case 13: c.DropItem(new LeafweaveGloves()); break;

                    case 14: c.DropItem(new LeafweaveLegs()); break;

                    case 15: c.DropItem(new LeafweavePauldrons()); break;

                    case 16: c.DropItem(new PaladinGloves()); break;

                    case 17: c.DropItem(new PaladinGorget()); break;

                    case 18: c.DropItem(new PaladinArms()); break;

                    case 19: c.DropItem(new PaladinLegs()); break;

                    case 20: c.DropItem(new PaladinHelm()); break;

                    case 21: c.DropItem(new PaladinChest()); break;

                    case 22: c.DropItem(new HunterArms()); break;

                    case 23: c.DropItem(new HunterGloves()); break;

                    case 24: c.DropItem(new HunterLegs()); break;

                    case 25: c.DropItem(new HunterChest()); break;

                    case 26: c.DropItem(new GreymistArms()); break;

                    case 27: c.DropItem(new GreymistGloves()); break;

                    case 28: c.DropItem(new GreymistLegs()); break;

                    case 29: c.DropItem(new MalekisHonor()); break;

                    case 30: c.DropItem(new Feathernock()); break;

                    case 31: c.DropItem(new Swiftflight()); break;
                    }
                }
            }

            if (m_Altar != null)
            {
                m_Altar.OnPeerlessDeath();
            }
        }
示例#8
0
 public static bool IsMLDungeon(Map map, Point3D loc)
 {
     return(MondainsLegacy.IsMLRegion(Region.Find(loc, map)));
 }
示例#9
0
 private static bool IsMondain(Mobile m) => MondainsLegacy.IsMLRegion(m.Region);