Esempio n. 1
0
        public static void Fill(LockableContainer cont)
        {
            // Gold, about 100K
            for (int ix = 0; ix < 100; ix++)
            {
                cont.DropItem(new Gold(Utility.RandomMinMax(900, 1100)));
            }

            // plus about 20 chances for magic jewelry and/or clothing
            for (int ix = 0; ix < 20; ix++)
            {
                PackMagicItem(cont, 3, 3, 0.20);
                PackMagicItem(cont, 3, 3, 0.10);
                PackMagicItem(cont, 3, 3, 0.05);
            }

            // drop some scrolls and weapons/armor
            for (int ix = 0; ix < 25; ++ix)
            {
                int  level = 5;
                Item item;
                item = Loot.RandomArmorOrShieldOrWeapon();
                item = Loot.ImbueWeaponOrArmor(item, level, 0.05, false);

                // erl: SDrop chance
                // ..
                if (Server.Engines.SDrop.SDropTest(item, CoreAI.EScrollChance))
                {
                    // Drop a scroll instead
                    EnchantedScroll escroll = Loot.GenEScroll((object)item);

                    // Delete the original item
                    item.Delete();

                    // Re-reference item to escroll and continue
                    item = (Item)escroll;
                }
                // ..

                cont.DropItem(item);
            }

            // drop a few nice maps
            for (int ix = 0; ix < 5; ix++)
            {
                TreasureMap map = new TreasureMap(5, Map.Felucca);
                cont.DropItem(map);
            }

            // drop a few single-color leather dye tubs with 100 charges
            for (int ix = 0; ix < 25; ix++)
            {
                LeatherArmorDyeTub tub = new LeatherArmorDyeTub();
                cont.DropItem(tub);
            }

            // pack some other goodies
            TreasureMapChest.PackRegs(cont, 300);
            TreasureMapChest.PackGems(cont, 300);
        }
Esempio n. 2
0
 public EnchantedScrollTarget(EnchantedScroll escroll) : base(1, false, TargetFlags.None)
 {
     m_EnchantedScroll = escroll;
 }
Esempio n. 3
0
		public EnchantedScrollTarget(EnchantedScroll escroll) : base( 1, false, TargetFlags.None )
		{
			m_EnchantedScroll = escroll;
		}
Esempio n. 4
0
        public static void Fill(LockableContainer cont, int level, bool IsThemed, ChestThemeType type)
        {
            cont.Movable = false;

            // the speial Overland Treasure Hunter NPC 'unlocks' the chest for you!
            if (TreasureTheme.IsOverlandTheme(type) == false)
            {
                cont.TrapType  = Utility.RandomBool() ? TrapType.PoisonTrap : TrapType.ExplosionTrap;
                cont.TrapPower = level * 25;
                cont.Locked    = true;
            }

            switch (level)
            {
            case 1: cont.RequiredSkill = 36; break;

            case 2: cont.RequiredSkill = 76; break;

            case 3: cont.RequiredSkill = 84; break;

            case 4: cont.RequiredSkill = 92; break;

            case 5: cont.RequiredSkill = 100; break;
            }

            cont.LockLevel    = cont.RequiredSkill - 10;
            cont.MaxLockLevel = cont.RequiredSkill + 40;

            // add theme loot
            AddThemeLoot(cont, level, type);

            // now for the gold
            cont.DropItem(new Gold(level * 1000));

            //if not a undead or pirate chest add scrolls
            if (type != ChestThemeType.Pirate || type != ChestThemeType.Undead)
            {
                // adam: Changed to drop scrolls appropriatre for the level.
                for (int i = 0; i < level * 5; ++i)
                {
                    int minCircle = level;
                    int maxCircle = (level + 3);
                    PackScroll(cont, minCircle, maxCircle);
                }
            }

            // magic armor and weapons
            int count = MagicArmsThrottle(level);                       // calc amount of magic armor and weapons to drop

            if (IsThemed == true)
            {
                count /= 2;                                                     // adam: Less loot if a themed chest because they get other goodies.
            }
            for (int i = 0; i < count; ++i)
            {
                Item item;
                item = Loot.RandomArmorOrShieldOrWeapon();
                item = Loot.ImbueWeaponOrArmor(item, level, 0.05, false);

                // erl: SDrop chance
                // ..
                if (Server.Engines.SDrop.SDropTest(item, CoreAI.EScrollChance))
                {
                    // Drop a scroll instead
                    EnchantedScroll escroll = Loot.GenEScroll((object)item);

                    // Delete the original item
                    item.Delete();

                    // Re-reference item to escroll and continue
                    item = (Item)escroll;
                }
                // ..

                cont.DropItem(item);
            }

            PackRegs(cont, level * 20);
            PackGems(cont, level * 10);
        }