Inheritance: BaseBashing
Ejemplo n.º 1
0
        private void AddItems(Container pack)
        {
            pack.DropItem(new BagOfReagents());
            pack.DropItem(new Spellbook(ulong.MaxValue));

            BaseWeapon weaps = new Halberd();

            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps         = new Katana();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps         = new ShortSpear();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps         = new WarMace();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            pack.DropItem(new GreaterPoisonPotion());
            pack.DropItem(new GreaterPoisonPotion());

            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());

            pack.DropItem(new GreaterCurePotion());
            pack.DropItem(new GreaterCurePotion());
            pack.DropItem(new GreaterCurePotion());

            pack.DropItem(new TotalRefreshPotion());
            pack.DropItem(new TotalRefreshPotion());

            pack.DropItem(new GreaterExplosionPotion());
            pack.DropItem(new GreaterExplosionPotion());
            pack.DropItem(new GreaterExplosionPotion());

            pack.DropItem(new Bandage(20));

            for (int i = 0; i < 3; i++)
            {
                TrapableContainer cont = new Pouch();
                cont.TrapType  = TrapType.MagicTrap;
                cont.TrapPower = 1;
                cont.TrapLevel = 0;
                pack.DropItem(cont);
            }
        }
        public TerathanIslandTreasureChest() : base(0x2DF1)
        {
            Name    = "a treasure chest -30-";
            Movable = true;
            Hue     = 285;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 30;
            LockLevel     = 30;
            MaxLockLevel  = 35;

            // Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(45, 450)));
            }

/////////////////////////////////////// Books

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new TamersHandbookVol1());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new TamersHandbookVol2());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new TamersHandbookVol3());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new TamersHandbookVol4());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new TamersHandbookVol5());
            }

/////////////////////////////////////// Meats

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bacon());
            }
            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Sausage());
            }

/////////////////////////////////////// Eating Utensils

            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new KnifeLeft());
            }
            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new KnifeRight());
            }
            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new PewterMug());
            }
            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new Plate());
            }
            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new SpoonLeft());
            }
            if (Utility.RandomDouble() < 0.08)
            {
                DropItem(new SpoonRight());
            }

/////////////////////////////////////// Jewelry

            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Agate());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Beryl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new ChromeDiopside());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new FireOpal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new MoonstoneCustom());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Onyx());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Opal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Pearl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new TurquoiseCustom());
            }

            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Bloodstone());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Citrine());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Demantoid());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Jasper());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lolite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lupis());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Peridot());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Tsavorite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Zircon());
            }


/////////////////////////////////////// Supplies

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Arrow(Utility.Random(17, 22)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bolt(Utility.Random(17, 22)));
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.Random(17, 22);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bandage(Utility.Random(17, 22)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bedroll());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bottle(Utility.Random(17, 22)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Lockpick(Utility.Random(17, 22)));
            }

            Item PotionLoot = Loot.RandomPotion();

            DropItem(PotionLoot);

            if (Utility.RandomDouble() < 0.20)
            {
                DropItem(new LesserPoisonPotion());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new PoisonPotion());
            }

/////////////////////////////////////// Tools

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new FishingPole());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Shovel());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Skillet());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(38))
                {
                case 0: weapon = new Hatchet(); break;

                case 1: weapon = new Bow(); break;

                case 2: weapon = new Crossbow(); break;

                case 3: weapon = new Club(); break;

                case 4: weapon = new Mace(); break;

                case 5: weapon = new Maul(); break;

                case 6: weapon = new Pitchfork(); break;

                case 7: weapon = new ShortSpear(); break;

                case 8: weapon = new GnarledStaff(); break;

                case 9: weapon = new ShepherdsCrook(); break;

                case 10: weapon = new Cutlass(); break;

                case 11: weapon = new Katana(); break;

                case 12: weapon = new Kryss(); break;

                case 13: weapon = new Scimitar(); break;

                case 14: weapon = new AssassinSpike(); break;

                case 15: weapon = new DiamondMace(); break;

                case 16: weapon = new Leafblade(); break;

                case 17: weapon = new MagicalShortbow(); break;

                case 18: weapon = new RadiantScimitar(); break;

                case 19: weapon = new WildStaff(); break;

                case 20: weapon = new Axe(); break;

                case 21: weapon = new ExecutionersAxe(); break;

                case 22: weapon = new Pickaxe(); break;

                case 23: weapon = new TwoHandedAxe(); break;

                case 24: weapon = new WarAxe(); break;

                case 25: weapon = new HeavyCrossbow(); break;

                case 26: weapon = new HammerPick(); break;

                case 27: weapon = new WarMace(); break;

                case 28: weapon = new Spear(); break;

                case 29: weapon = new WarFork(); break;

                case 30: weapon = new BlackStaff(); break;

                case 31: weapon = new QuarterStaff(); break;

                case 32: weapon = new Longsword(); break;

                case 33: weapon = new ElvenCompositeLongbow(); break;

                case 34: weapon = new ElvenMachete(); break;

                case 35: weapon = new ElvenSpellblade(); break;

                case 36: weapon = new RuneBlade(); break;

                default: weapon = new Dagger(); break;
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 2, 22, 25);
                weapon.Hue = 285;

                weapon.WeaponAttributes.HitLeechStam = 5;
                weapon.Attributes.BonusHits          = 10;

                DropItem(weapon);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(13))
                {
                case 0: armor = new FemaleStuddedChest(); break;

                case 1: armor = new StuddedArms(); break;

                case 2: armor = new StuddedBustierArms(); break;

                case 3: armor = new StuddedGloves(); break;

                case 4: armor = new StuddedGorget(); break;

                case 5: armor = new ChainCoif(); break;

                case 6: armor = new ChainChest(); break;

                case 7: armor = new ChainLegs(); break;

                case 8: armor = new RingmailArms(); break;

                case 9: armor = new RingmailChest(); break;

                case 10: armor = new RingmailGloves(); break;

                case 11: armor = new RingmailLegs(); break;

                default: armor = new StuddedChest(); break;
                }

                BaseRunicTool.ApplyAttributesTo(armor, 3, 22, 25);
                armor.Hue = 285;

                armor.Attributes.WeaponDamage = 3;

                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseHat hat = Loot.RandomHat(true);
                switch (Utility.Random(5))
                {
                case 0: hat = new BearMask(); break;

                case 1: hat = new DeerMask(); break;

                case 2: hat = new FeatheredHat(); break;

                case 3: hat = new WizardsHat(); break;

                default: hat = new TribalMask(); break;
                }

                BaseRunicTool.ApplyAttributesTo(hat, 3, 22, 25);
                hat.Hue = 285;

                hat.Attributes.BonusHits   = 10;
                hat.Attributes.SpellDamage = 5;
                hat.Resistances.Energy     = 10;

                DropItem(hat);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 3, 22, 25);
                clothing.Hue = 285;

                clothing.Attributes.BonusHits    = 5;
                clothing.Attributes.DefendChance = 3;
                clothing.Resistances.Physical    = 5;

                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseShield shield = new WoodenKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield, 3, 22, 25);
                }
                shield.Hue = 285;

                shield.Attributes.BonusHits = 10;

                DropItem(shield);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel bracelet = new GoldBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 3, 22, 25);
                }
                bracelet.Hue = 285;

                bracelet.Attributes.WeaponDamage = 5;
                bracelet.Attributes.DefendChance = 2;
                bracelet.Resistances.Fire        = 5;

                DropItem(bracelet);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 3, 22, 25);
                }
                earrings.Hue = 285;

                earrings.Attributes.WeaponDamage = 5;
                earrings.Attributes.DefendChance = 3;
                earrings.Resistances.Cold        = 5;

                DropItem(earrings);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel necklace = new GoldNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 3, 22, 25);
                }
                necklace.Hue = 285;

                necklace.Attributes.WeaponDamage = 5;
                necklace.Attributes.DefendChance = 5;
                necklace.Resistances.Energy      = 5;

                DropItem(necklace);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 3, 22, 25);
                }
                ring.Hue = 285;

                ring.Attributes.WeaponDamage = 5;
                ring.Attributes.DefendChance = 2;
                ring.Resistances.Poison      = 5;

                DropItem(ring);
            }
        }
Ejemplo n.º 3
0
		[Constructable]			// Make it Spawnable in game
		public DerangedBlacksmith() : base( AIType.AI_Melee, FightMode.Closest, 8, 1, 0.2, 0.4 ) // Set AI
		{
			if ( Female = Utility.RandomBool() )   // Make it 50/50 male/female
			{
				Body = 0x191;					// Give it a female body
				Name = NameList.RandomName( "female" );		// Choose a female name
			}
			else							// Or
			{
				Body = 0x190;					// Give it a male body
				Name = NameList.RandomName( "male" );		// Choose a Male name
			}
			Hue = Utility.RandomSkinHue();

			SetStr( 145, 165 );
			SetDex( 116, 125 );       // Set Stats
			SetInt( 60, 65 );

			SetDamage( 25, 32 );	// Set Damage

			SetDamageType( ResistanceType.Physical, 100 ); 

			SetSkill( SkillName.MagicResist, 85.1, 100.0 );
			SetSkill( SkillName.Tactics, 80.1, 90.0 );
			SetSkill( SkillName.Wrestling, 40.1, 60.0 );
			SetSkill( SkillName.Fencing, 80.1, 90.0 );		// Set Skills
			SetSkill( SkillName.Macing, 80.1, 90.0 );
			SetSkill( SkillName.Swords, 80.1, 90.0 );
			SetSkill( SkillName.Anatomy, 80.1, 90.0 );

			SetResistance( ResistanceType.Physical, 40, 45 ); 	//Set Resistances
			SetResistance( ResistanceType.Fire, 40, 45 );
			SetResistance( ResistanceType.Cold, 40, 45 );
			SetResistance( ResistanceType.Poison, 40, 45 );
			SetResistance( ResistanceType.Energy, 40, 45 );


			Fame = 2500;						// Set Fame/Karma
			Karma = -2500;

			Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) );
			hair.Hue = Utility.RandomNondyedHue();
			hair.Layer = Layer.Hair;
			hair.Movable = false;
			AddItem( hair );

			if ( 0.05 > Utility.RandomDouble() )
				PackItem( new SturdyPickaxe() );		// Roll for a pickaxe
			else if ( 0.05 > Utility.RandomDouble() )		// If it fails	
				PackItem( new SturdyShovel() );			// Roll for a Shovel	

			if ( 0.02 > Utility.RandomDouble() )
				PackItem( new RunicHammer( CraftResource.Bronze, 10 ) );  // Roll for runic hammer
			//if ( 0.05 > Utility.RandomDouble() )
			//	PackItem( new PowderOfTemperament() );

			switch ( Utility.Random( 5 ))  		// Equip 1 of 5 weapons
			{ 
				case 0: Mace weapon = new Mace();
					weapon.Movable = false;
					weapon.Crafter = this;
					weapon.Quality = WeaponQuality.Exceptional;
					AddItem( weapon ); break;

				case 1: Maul weapona = new Maul();
					weapona.Movable = false;
					weapona.Crafter = this;
					weapona.Quality = WeaponQuality.Exceptional;
					AddItem( weapona ); break;

				case 2: WarHammer weaponb = new WarHammer();
					weaponb.Movable = false;
					weaponb.Crafter = this;
					weaponb.Quality = WeaponQuality.Exceptional;
					AddItem( weaponb ); break;

				case 3: HammerPick weaponc = new HammerPick();
					weaponc.Movable = false;
					weaponc.Crafter = this;
					weaponc.Quality = WeaponQuality.Exceptional;
					AddItem( weaponc ); break;

				case 4: WarMace weapond = new WarMace();
					weapond.Movable = false;
					weapond.Crafter = this;
					weapond.Quality = WeaponQuality.Exceptional;
					AddItem( weapond ); break;
			}

			PlateChest chest = new PlateChest();		// Create a plate Chest
			chest.Quality = ArmorQuality.Exceptional;
			chest.Crafter = this;				
			chest.Hue = 2406;
			chest.Movable = false;				// Make it dissapear on death
			AddItem( chest );				// Add it as equip
			
			PlateArms arms = new PlateArms();
			arms.Quality = ArmorQuality.Exceptional;
			arms.Crafter = this;				
			arms.Hue = 2406;
			arms.Movable = false;
			AddItem( arms );
			
			PlateGloves gloves = new PlateGloves();
			gloves.Quality = ArmorQuality.Exceptional;
			gloves.Crafter = this;				
			gloves.Hue = 2406;
			gloves.Movable = false;
			AddItem( gloves );
			
			PlateGorget gorget = new PlateGorget();
			gorget.Quality = ArmorQuality.Exceptional;
			gorget.Crafter = this;				
			gorget.Hue = 2406;
			gorget.Movable = false;
			AddItem( gorget );
			
			PlateLegs legs = new PlateLegs();
			legs.Quality = ArmorQuality.Exceptional;
			legs.Crafter = this;				
			legs.Hue = 2406;
			legs.Movable = false;
			AddItem( legs );

		}
        public IguanaCoveBossChest() : base(0xE43)
        {
            Name    = "a treasure chest -50-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 50;
            LockLevel     = 50;
            MaxLockLevel  = 80;

/////////////////////////////////// Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(250, 400)));
            }

/////////////////////////////////////// Jewelry

            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Agate());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Beryl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new ChromeDiopside());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new FireOpal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new MoonstoneCustom());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Onyx());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Opal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Pearl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new TurquoiseCustom());
            }

            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Bloodstone());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Citrine());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Demantoid());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Jasper());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lolite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lupis());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Peridot());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Tsavorite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Zircon());
            }

            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Amber());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Amethyst());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Andalusite());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Chrysoberyl());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Garnet());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Jade());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Mandarin());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Morganite());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Paraiba());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new TigerEye());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Tourmaline());
            }

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Alexandrite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Ametrine());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Kunzite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Ruby());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Sapphire());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Tanzanite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Topaz());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Zultanite());
            }

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Diamond());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Emerald());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new PinkQuartz());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new StarSapphire());
            }

/////////////////////////////////////// Supplies

            switch (Utility.Random(18))
            {
            case 0: DropItem(new Board(80)); break;

            case 1: DropItem(new BoltOfCloth(80)); break;

            case 2: DropItem(new Bottle(80)); break;

            case 3: DropItem(new CopperWire(80)); break;

            case 4: DropItem(new Cotton(80)); break;

            case 5: DropItem(new DarkYarn(80)); break;

            case 6: DropItem(new Feather(80)); break;

            case 7: DropItem(new Flax(80)); break;

            case 8: DropItem(new Gears(80)); break;

            case 9: DropItem(new GoldWire(80)); break;

            case 10: DropItem(new IronIngot(80)); break;

            case 11: DropItem(new IronWire(80)); break;

            case 12: DropItem(new Leather(80)); break;

            case 13: DropItem(new LightYarn(80)); break;

            case 14: DropItem(new Shaft(80)); break;

            case 15: DropItem(new SilverWire(80)); break;

            case 16: DropItem(new SpoolOfThread(80)); break;

            case 17: DropItem(new Springs(80)); break;

            case 18: DropItem(new Wool(80)); break;
            }

            switch (Utility.Random(5))
            {
            case 0: DropItem(new ArcaneStone(25)); break;

            case 1: DropItem(new BeetleEgg(25)); break;

            case 2: DropItem(new DragonScale(25)); break;

            case 3: DropItem(new FishScale(25)); break;

            case 4: DropItem(new SerpentScale(25)); break;
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.RandomMinMax(50, 100);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.05)
            {
                DropItem(new SackFlour());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

/////////////////////////////////////// LV 20-30
            if (Utility.RandomDouble() < 0.10)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(31))
                {
                case 0: weapon = new DoubleAxe(); break;                      // Lv20

                case 1: weapon = new TwoHandedAxe(); break;                   // Lv25

                case 2: weapon = new WarAxe(); break;                         // Lv30

                case 3: weapon = new CompositeBow(); break;                   // Lv20

                case 4: weapon = new EbonyCrossbow(); break;                  // Lv20

                case 5: weapon = new FireBow(); break;                        // Lv25

                case 6: weapon = new GrassBow(); break;                       // Lv25

                case 7: weapon = new IceBow(); break;                         // Lv25

                case 8: weapon = new LightningBow(); break;                   // Lv25

                case 9: weapon = new EbonyWarBow(); break;                    // Lv30

                case 10: weapon = new PistolCrossbow(); break;                // Lv30

                case 11: weapon = new EbonyDualDaggers(); break;              // Lv20

                case 12: weapon = new Tekagi(); break;                        // Lv25

                case 13: weapon = new ElvenSpellblade(); break;               // Lv30

                case 14: weapon = new WarMace(); break;                       // Lv20

                case 15: weapon = new Tessen(); break;                        // Lv25

                case 16: weapon = new HammerPick(); break;                    // Lv30

                case 17: weapon = new Spear(); break;                         // Lv20

                case 18: weapon = new BoneSpear(); break;                     // Lv25

                case 19: weapon = new BubbleStaff(); break;                   // Lv25

                case 20: weapon = new CrystalStaff(); break;                  // Lv25

                case 21: weapon = new EnergyStaff(); break;                   // Lv25

                case 22: weapon = new FireStaff(); break;                     // Lv25

                case 23: weapon = new VineStaff(); break;                     // Lv25

                case 24: weapon = new BlackStaff(); break;                    // Lv30

                case 25: weapon = new VikingSword(); break;                   // Lv20

                case 26: weapon = new Wakizashi(); break;                     // Lv20

                case 27: weapon = new Daisho(); break;                        // Lv30

                case 28: weapon = new EbonyScimitar(); break;                 // Lv30

                case 29: weapon = new RuneBlade(); break;                     // Lv30

                default: weapon = new Longsword(); break;                     // Lv20
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 2, 5, 50);
                DropItem(weapon);
            }

/////////////////////////////////////// LV 18-27
            if (Utility.RandomDouble() < 0.10)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(18))
                {
                case 0: armor = new HideFemaleChest(); break;                   // Lv18

                case 1: armor = new HideGloves(); break;                        // Lv18

                case 2: armor = new HideGorget(); break;                        // Lv18

                case 3: armor = new HidePants(); break;                         // Lv18

                case 4: armor = new HidePauldrons(); break;                     // Lv18

                case 5: armor = new StuddedDo(); break;                         // Lv21

                case 6: armor = new StuddedHaidate(); break;                    // Lv21

                case 7: armor = new StuddedHiroSode(); break;                   // Lv21

                case 8: armor = new StuddedMempo(); break;                      // Lv21

                case 9: armor = new StuddedSuneate(); break;                    // Lv21

                case 10: armor = new VikingStuddedArms(); break;                // Lv24

                case 11: armor = new VikingStuddedCap(); break;                 // Lv24

                case 12: armor = new VikingStuddedChest(); break;               // Lv24

                case 13: armor = new VikingStuddedLegs(); break;                // Lv24

                case 14: armor = new ChainChest(); break;                       // Lv27

                case 15: armor = new ChainCoif(); break;                        // Lv27

                case 16: armor = new ChainLegs(); break;                        // Lv27

                default: armor = new HideChest(); break;                        // Lv18
                }

                BaseRunicTool.ApplyAttributesTo(armor, 3, 5, 50);
                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseHat hat = Loot.RandomHat(true);
                BaseRunicTool.ApplyAttributesTo(hat, 3, 12, 15);
                DropItem(hat);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 3, 12, 15);
                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield1 = new MetalShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield1, 3, 5, 50);
                }
                DropItem(shield1);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield2 = new WoodenKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield2, 3, 5, 50);
                }
                DropItem(shield2);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield3 = new MetalKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield3, 3, 5, 50);
                }
                DropItem(shield3);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel bracelet = new SilverBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 3, 12, 15);
                }
                DropItem(bracelet);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 3, 12, 15);
                }
                DropItem(earrings);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel necklace = new SilverNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 3, 12, 15);
                }
                DropItem(necklace);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 3, 12, 15);
                }
                DropItem(ring);
            }
        }
        public IguanaCoveTreasureChest1() : base(0xE43)
        {
            Name    = "a treasure chest -40-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 40;
            LockLevel     = 40;
            MaxLockLevel  = 80;

/////////////////////////////////// Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(20, 300)));
            }

/////////////////////////////////////// Supplies

            switch (Utility.Random(19))
            {
            case 0: DropItem(new Board(70)); break;

            case 1: DropItem(new BoltOfCloth(70)); break;

            case 2: DropItem(new Bottle(70)); break;

            case 3: DropItem(new CopperWire(70)); break;

            case 4: DropItem(new Cotton(70)); break;

            case 5: DropItem(new DarkYarn(70)); break;

            case 6: DropItem(new Feather(70)); break;

            case 7: DropItem(new Flax(70)); break;

            case 8: DropItem(new Gears(70)); break;

            case 9: DropItem(new GoldWire(70)); break;

            case 10: DropItem(new IronIngot(70)); break;

            case 11: DropItem(new IronWire(70)); break;

            case 12: DropItem(new Leather(70)); break;

            case 13: DropItem(new LightYarn(70)); break;

            case 14: DropItem(new Shaft(70)); break;

            case 15: DropItem(new SilverWire(70)); break;

            case 16: DropItem(new SpoolOfThread(70)); break;

            case 17: DropItem(new Springs(70)); break;

            case 18: DropItem(new Wool(70)); break;
            }

            switch (Utility.Random(5))
            {
            case 0: DropItem(new ArcaneStone(15)); break;

            case 1: DropItem(new BeetleEgg(15)); break;

            case 2: DropItem(new DragonScale(15)); break;

            case 3: DropItem(new FishScale(15)); break;

            case 4: DropItem(new SerpentScale(15)); break;
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.RandomMinMax(5, 10);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.05)
            {
                DropItem(new SackFlour());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

/////////////////////////////////////// LV 20-30
            if (Utility.RandomDouble() < 0.10)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(31))
                {
                case 0: weapon = new DoubleAxe(); break;                      // Lv20

                case 1: weapon = new TwoHandedAxe(); break;                   // Lv25

                case 2: weapon = new WarAxe(); break;                         // Lv30

                case 3: weapon = new CompositeBow(); break;                   // Lv20

                case 4: weapon = new EbonyCrossbow(); break;                  // Lv20

                case 5: weapon = new FireBow(); break;                        // Lv25

                case 6: weapon = new GrassBow(); break;                       // Lv25

                case 7: weapon = new IceBow(); break;                         // Lv25

                case 8: weapon = new LightningBow(); break;                   // Lv25

                case 9: weapon = new EbonyWarBow(); break;                    // Lv30

                case 10: weapon = new PistolCrossbow(); break;                // Lv30

                case 11: weapon = new EbonyDualDaggers(); break;              // Lv20

                case 12: weapon = new Tekagi(); break;                        // Lv25

                case 13: weapon = new ElvenSpellblade(); break;               // Lv30

                case 14: weapon = new WarMace(); break;                       // Lv20

                case 15: weapon = new Tessen(); break;                        // Lv25

                case 16: weapon = new HammerPick(); break;                    // Lv30

                case 17: weapon = new Spear(); break;                         // Lv20

                case 18: weapon = new BoneSpear(); break;                     // Lv25

                case 19: weapon = new BubbleStaff(); break;                   // Lv25

                case 20: weapon = new CrystalStaff(); break;                  // Lv25

                case 21: weapon = new EnergyStaff(); break;                   // Lv25

                case 22: weapon = new FireStaff(); break;                     // Lv25

                case 23: weapon = new VineStaff(); break;                     // Lv25

                case 24: weapon = new BlackStaff(); break;                    // Lv30

                case 25: weapon = new VikingSword(); break;                   // Lv20

                case 26: weapon = new Wakizashi(); break;                     // Lv20

                case 27: weapon = new Daisho(); break;                        // Lv30

                case 28: weapon = new EbonyScimitar(); break;                 // Lv30

                case 29: weapon = new RuneBlade(); break;                     // Lv30

                default: weapon = new Longsword(); break;                     // Lv20
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 2, 5, 50);
                DropItem(weapon);
            }

/////////////////////////////////////// LV 18-27
            if (Utility.RandomDouble() < 0.10)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(18))
                {
                case 0: armor = new HideFemaleChest(); break;                   // Lv18

                case 1: armor = new HideGloves(); break;                        // Lv18

                case 2: armor = new HideGorget(); break;                        // Lv18

                case 3: armor = new HidePants(); break;                         // Lv18

                case 4: armor = new HidePauldrons(); break;                     // Lv18

                case 5: armor = new StuddedDo(); break;                         // Lv21

                case 6: armor = new StuddedHaidate(); break;                    // Lv21

                case 7: armor = new StuddedHiroSode(); break;                   // Lv21

                case 8: armor = new StuddedMempo(); break;                      // Lv21

                case 9: armor = new StuddedSuneate(); break;                    // Lv21

                case 10: armor = new VikingStuddedArms(); break;                // Lv24

                case 11: armor = new VikingStuddedCap(); break;                 // Lv24

                case 12: armor = new VikingStuddedChest(); break;               // Lv24

                case 13: armor = new VikingStuddedLegs(); break;                // Lv24

                case 14: armor = new ChainChest(); break;                       // Lv27

                case 15: armor = new ChainCoif(); break;                        // Lv27

                case 16: armor = new ChainLegs(); break;                        // Lv27

                default: armor = new HideChest(); break;                        // Lv18
                }

                BaseRunicTool.ApplyAttributesTo(armor, 3, 5, 50);
                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseHat hat = Loot.RandomHat(true);
                BaseRunicTool.ApplyAttributesTo(hat, 3, 12, 15);
                DropItem(hat);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 3, 12, 15);
                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield1 = new Buckler();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield1, 3, 5, 50);
                }
                DropItem(shield1);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield2 = new WoodenShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield2, 3, 5, 50);
                }
                DropItem(shield2);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield3 = new AmmoniteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield3, 3, 5, 50);
                }
                DropItem(shield3);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield4 = new BronzeShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield4, 3, 5, 50);
                }
                DropItem(shield4);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield5 = new MetalShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield5, 3, 5, 50);
                }
                DropItem(shield5);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield6 = new WoodenKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield6, 3, 5, 50);
                }
                DropItem(shield6);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseJewel bracelet = new SilverBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 3, 12, 15);
                }
                DropItem(bracelet);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 3, 12, 15);
                }
                DropItem(earrings);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseJewel necklace = new SilverNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 3, 12, 15);
                }
                DropItem(necklace);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 3, 12, 15);
                }
                DropItem(ring);
            }
        }
Ejemplo n.º 6
0
		public bool DropWeapon( int minLevel, int maxLevel )
		{
			if ( 1.0 <= Utility.RandomDouble() )
				return false;

			if ( maxLevel > 2 )
				maxLevel = 2;

			Cap( ref minLevel, 0, 2 );
			Cap( ref maxLevel, 0, 2 );

			BaseWeapon weapon = new Broadsword();

			double random = Utility.RandomDouble();
			if ( random >= .75 )
			{ weapon = new WarFork(); }
			else if	( random >= .50 )
			{ weapon = new WarMace(); }
			else if ( random >= .25 )
			{
				weapon = new Bow();
				Arrow arrows = new Arrow();
				arrows.Amount = 25;
				DropItem( arrows );
			}

			if ( weapon == null )
				return false;

			weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled( minLevel, maxLevel );
			weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled( 0, maxLevel );
			weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled( 0, maxLevel );

			DropItem( weapon );

			return true;
		}
Ejemplo n.º 7
0
        public MongbatHideoutTreasureChest2() : base(0xE43)
        {
            Name    = "a treasure chest -50-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 50;
            LockLevel     = 50;
            MaxLockLevel  = 80;

/////////////////////////////////// Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(20, 300)));
            }

/////////////////////////////////////// Supplies

            switch (Utility.Random(18))
            {
            case 0: DropItem(new Board(70)); break;

            case 1: DropItem(new BoltOfCloth(70)); break;

            case 2: DropItem(new Bottle(70)); break;

            case 3: DropItem(new CopperWire(70)); break;

            case 4: DropItem(new Cotton(70)); break;

            case 5: DropItem(new DarkYarn(70)); break;

            case 6: DropItem(new Feather(70)); break;

            case 7: DropItem(new Flax(70)); break;

            case 8: DropItem(new Gears(70)); break;

            case 9: DropItem(new GoldWire(70)); break;

            case 10: DropItem(new IronIngot(70)); break;

            case 11: DropItem(new IronWire(70)); break;

            case 12: DropItem(new Leather(70)); break;

            case 13: DropItem(new LightYarn(70)); break;

            case 14: DropItem(new Shaft(70)); break;

            case 15: DropItem(new SilverWire(70)); break;

            case 16: DropItem(new SpoolOfThread(70)); break;

            case 17: DropItem(new Springs(70)); break;

            case 18: DropItem(new Wool(70)); break;
            }

            switch (Utility.Random(5))
            {
            case 0: DropItem(new BeetleEgg(25)); break;

            case 1: DropItem(new FishScale(25)); break;

            case 2: DropItem(new Nirnroot(25)); break;

            case 3: DropItem(new SerpentScale(25)); break;

            case 4: DropItem(new ThunderStone(25)); break;
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.RandomMinMax(10, 15);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.05)
            {
                DropItem(new SackFlour());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

/////////////////////////////////////// LV 10-20
/////////////////////////////////////// LV 10-25 for staves
            if (Utility.RandomDouble() < 0.10)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(28))
                {
                case 0: weapon = new BattleAxe(); break;                   // Lv10

                case 1: weapon = new DoubleAxe(); break;                   // Lv20

                case 2: weapon = new MagicalShortbow(); break;             // Lv10

                case 3: weapon = new RepeatingCrossbow(); break;           // Lv10

                case 4: weapon = new ButcherKnife(); break;                // Lv10

                case 5: weapon = new CompositeBow(); break;                // Lv20

                case 6: weapon = new EbonyCrossbow(); break;               // Lv20

                case 7: weapon = new EbonyDagger(); break;                 // Lv10

                case 8: weapon = new Sai(); break;                         // Lv15

                case 9: weapon = new EbonyDualDaggers(); break;            // Lv20

                case 10: weapon = new Maul(); break;                       // Lv10

                case 11: weapon = new Scepter(); break;                    // Lv15

                case 12: weapon = new WarMace(); break;                    // Lv20

                case 13: weapon = new Pilum(); break;                      // Lv10

                case 14: weapon = new Pike(); break;                       // Lv15

                case 15: weapon = new Spear(); break;                      // Lv20

                case 16: weapon = new QuarterStaff(); break;               // Lv10

                case 17: weapon = new ReptilianStaff(); break;             // Lv15

                case 18: weapon = new BubbleStaff(); break;                // Lv25

                case 19: weapon = new CrystalStaff(); break;               // Lv25

                case 20: weapon = new EnergyStaff(); break;                // Lv25

                case 21: weapon = new FireStaff(); break;                  // Lv25

                case 22: weapon = new VineStaff(); break;                  // Lv25

                case 23: weapon = new EbonyRapier(); break;                // Lv10

                case 24: weapon = new Scimitar(); break;                   // Lv10

                case 25: weapon = new Longsword(); break;                  // Lv20

                case 26: weapon = new VikingSword(); break;                // Lv20

                default: weapon = new Wakizashi(); break;                  // Lv20
                }

                switch (Utility.Random(14))
                {
                case 0: weapon.Attributes.AttackChance = Utility.RandomMinMax(1, 5); break;

                case 1: weapon.Attributes.DefendChance = Utility.RandomMinMax(1, 5); break;

                case 2: weapon.Attributes.Luck = Utility.RandomMinMax(1, 10); break;

                case 3: weapon.Attributes.WeaponSpeed = Utility.RandomMinMax(1, 25); break;

                case 4: weapon.WeaponAttributes.HitDispel = Utility.RandomMinMax(2, 10); break;

                case 5: weapon.WeaponAttributes.HitFireball = Utility.RandomMinMax(2, 10); break;

                case 6: weapon.WeaponAttributes.HitHarm = Utility.RandomMinMax(2, 10); break;

                case 7: weapon.WeaponAttributes.HitLeechHits = Utility.RandomMinMax(2, 10); break;

                case 8: weapon.WeaponAttributes.HitLeechMana = Utility.RandomMinMax(2, 10); break;

                case 9: weapon.WeaponAttributes.HitLeechStam = Utility.RandomMinMax(2, 10); break;

                case 10: weapon.WeaponAttributes.HitLightning = Utility.RandomMinMax(2, 10); break;

                case 11: weapon.WeaponAttributes.HitLowerAttack = Utility.RandomMinMax(2, 10); break;

                case 12: weapon.WeaponAttributes.HitLowerDefend = Utility.RandomMinMax(2, 10); break;

                default: weapon.Attributes.WeaponDamage = Utility.RandomMinMax(1, 10); break;
                }

                switch (Utility.Random(14))
                {
                case 0: weapon.Attributes.AttackChance = Utility.RandomMinMax(1, 5); break;

                case 1: weapon.Attributes.DefendChance = Utility.RandomMinMax(1, 5); break;

                case 2: weapon.Attributes.Luck = Utility.RandomMinMax(1, 10); break;

                case 3: weapon.Attributes.WeaponSpeed = Utility.RandomMinMax(1, 25); break;

                case 4: weapon.WeaponAttributes.HitDispel = Utility.RandomMinMax(2, 10); break;

                case 5: weapon.WeaponAttributes.HitFireball = Utility.RandomMinMax(2, 10); break;

                case 6: weapon.WeaponAttributes.HitHarm = Utility.RandomMinMax(2, 10); break;

                case 7: weapon.WeaponAttributes.HitLeechHits = Utility.RandomMinMax(2, 10); break;

                case 8: weapon.WeaponAttributes.HitLeechMana = Utility.RandomMinMax(2, 10); break;

                case 9: weapon.WeaponAttributes.HitLeechStam = Utility.RandomMinMax(2, 10); break;

                case 10: weapon.WeaponAttributes.HitLightning = Utility.RandomMinMax(2, 10); break;

                case 11: weapon.WeaponAttributes.HitLowerAttack = Utility.RandomMinMax(2, 10); break;

                case 12: weapon.WeaponAttributes.HitLowerDefend = Utility.RandomMinMax(2, 10); break;

                default: weapon.Attributes.WeaponDamage = Utility.RandomMinMax(1, 10); break;
                }

                DropItem(weapon);
            }

/////////////////////////////////////// LV 12-18
            if (Utility.RandomDouble() < 0.10)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(19))
                {
                case 0: armor = new ChitinArms(); break;                         // Lv12

                case 1: armor = new ChitinChest(); break;                        // Lv12

                case 2: armor = new ChitinGloves(); break;                       // Lv12

                case 3: armor = new ChitinGorget(); break;                       // Lv12

                case 4: armor = new ChitinHelmet(); break;                       // Lv12

                case 5: armor = new ChitinLegs(); break;                         // Lv12

                case 6: armor = new FemaleStuddedChest(); break;                 // Lv15

                case 7: armor = new StuddedArms(); break;                        // Lv15

                case 8: armor = new StuddedBustierArms(); break;                 // Lv15

                case 9: armor = new StuddedChest(); break;                       // Lv15

                case 10: armor = new StuddedGloves(); break;                     // Lv15

                case 11: armor = new StuddedGorget(); break;                     // Lv15

                case 12: armor = new StuddedLegs(); break;                       // Lv15

                case 13: armor = new HideFemaleChest(); break;                   // Lv18

                case 14: armor = new HideGloves(); break;                        // Lv18

                case 15: armor = new HideGorget(); break;                        // Lv18

                case 16: armor = new HidePants(); break;                         // Lv18

                case 17: armor = new HidePauldrons(); break;                     // Lv18

                default: armor = new HideChest(); break;                         // Lv18
                }

                BaseRunicTool.ApplyAttributesTo(armor, 3, 5, 50);
                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseHat hat = Loot.RandomHat(true);
                BaseRunicTool.ApplyAttributesTo(hat, 3, 5, 10);
                DropItem(hat);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 3, 5, 10);
                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield1 = new MetalShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield1, 3, 5, 50);
                }
                DropItem(shield1);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield2 = new WoodenKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield2, 3, 5, 50);
                }
                DropItem(shield2);
            }
            if (Utility.RandomDouble() < 0.05)
            {
                BaseShield shield3 = new MetalKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield3, 3, 5, 50);
                }
                DropItem(shield3);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel bracelet = new SilverBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 3, 5, 10);
                }
                DropItem(bracelet);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 3, 5, 10);
                }
                DropItem(earrings);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel necklace = new SilverNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 3, 5, 10);
                }
                DropItem(necklace);
            }
            if (Utility.RandomDouble() < 0.10)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 3, 5, 10);
                }
                DropItem(ring);
            }
        }
		public override void OnResponse( NetState state, RelayInfo info ) //Function for GumpButtonType.Reply Buttons
		{
			Mobile from = state.Mobile;
			PlayerMobile pm = from as PlayerMobile;
			PlayerModule module = pm.PlayerModule;

			m_cost = 50;//MOD COST OF WEAPON HERE!!
			Item wep = from.FindItemOnLayer( Layer.FirstValid );
			Item weps = from.FindItemOnLayer( Layer.TwoHanded );
			Container pack = from.Backpack;
			
			if ( wep !=null )
				pack.TryDropItem( from, wep, false );
			
			if ( weps !=null )
				pack.TryDropItem( from, weps, false );

			switch ( info.ButtonID )
			{
				case 0: //Cancel
					{
						from.SendMessage( "You decide against spending your skill points." );
						//from.SendGump( new LevelGump( from ) );
						break;
					}
				case 1: //Katana
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Katana kat = new Katana();
							( ( Item )kat ).Name = "Katana [Level Item]";
							kat.Identified = true;//Prevents others from being used in the upgrading!
							kat.LootType = LootType.Blessed;
							from.EquipItem( kat );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 2: //Broad Sword
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Broadsword bs = new Broadsword();
							bs.Identified = true;
							bs.Name = "Broadsword";
							bs.LootType = LootType.Blessed;
							from.EquipItem( bs );
							from.SendMessage( 102, "You chose a Broadsword" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 3: //Scimitar
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Scimitar sc = new Scimitar();
							sc.Identified = true;
							sc.Name = "Scimitar";
							sc.LootType = LootType.Blessed;
							from.EquipItem( sc );
							from.SendMessage( 102, "You chose a Scimitar" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 4: //Viking sword
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							VikingSword vs = new VikingSword();
							vs.Identified = true;
							vs.Name = "Vikingsword";
							vs.LootType = LootType.Blessed;
							from.EquipItem( vs );
							from.SendMessage( 102, "You chose a Viking Sword" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 5: //Halberd
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Halberd hb = new Halberd();
							hb.Identified = true;
							hb.Name = "Halberd";
							hb.LootType = LootType.Blessed;
							from.EquipItem( hb );
							from.SendMessage( 102, "You chose a Halberd" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 6: //Bardiche
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Bardiche bd = new Bardiche();
							bd.Identified = true;
							bd.Name = "Bardiche";
							bd.LootType = LootType.Blessed;
							from.EquipItem( bd );
							from.SendMessage( 102, "You chose a Bardiche" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 7: //Double Axe
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							DoubleAxe da = new DoubleAxe();
							da.Identified = true;
							da.Name = "Double Axe";
							da.LootType = LootType.Blessed;
							from.EquipItem( da );
							from.SendMessage( 102, "You chose a Double Axe" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 8: //Large Battle Axe
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							LargeBattleAxe lba = new LargeBattleAxe();
							lba.Identified = true;
							lba.Name = "Large Battle Axe";
							lba.LootType = LootType.Blessed;
							from.EquipItem( lba );
							from.SendMessage( 102, "You chose a Large Battle Axe" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 9: //Axe
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Axe a = new Axe();
							a.Identified = true;
							a.Name = "Axe";
							a.LootType = LootType.Blessed;
							from.EquipItem( a );
							from.SendMessage( 102, "You chose an Axe" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 10: //Kryss
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Kryss k = new Kryss();
							k.Identified = true;
							k.Name = "Kryss";
							k.LootType = LootType.Blessed;
							from.EquipItem( k );
							from.SendMessage( 102, "You chose a Kryss" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 11: //War Fork
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							WarFork wf = new WarFork();
							wf.Identified = true;
							wf.Name = "War Fork";
							wf.LootType = LootType.Blessed;
							from.EquipItem( wf );
							from.SendMessage( 102, "You chose a War Fork" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 12: //Dagger
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Dagger d = new Dagger();
							d.Identified = true;
							d.Name = "Dagger";
							d.LootType = LootType.Blessed;
							from.EquipItem( d );
							from.SendMessage( 102, "You chose a Dagger" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 13: //Pike
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Pike p = new Pike();
							p.Identified = true;
							p.Name = "Pike";
							p.LootType = LootType.Blessed;
							from.EquipItem( p );
							from.SendMessage( 102, "You chose a Pike" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 14: //Short Spear
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							ShortSpear ss = new ShortSpear();
							ss.Identified = true;
							ss.Name = "Short Spear";
							ss.LootType = LootType.Blessed;
							from.EquipItem( ss );
							from.SendMessage( 102, "You chose a Short Spear" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 15: //Long Spear
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Spear ls = new Spear();
							ls.Identified = true;
							ls.Name = "Long Spear";
							ls.LootType = LootType.Blessed;
							from.EquipItem( ls );
							from.SendMessage( 102, "You chose a Long Spear" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 16: //Pitchfork
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Pitchfork p = new Pitchfork();
							p.Identified = true;
							p.Name = "Pitchfork";
							p.LootType = LootType.Blessed;
							from.EquipItem( p );
							from.SendMessage( 102, "You chose a Pitchfork" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 17: //lance
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Lance l = new Lance();
							l.Identified = true;
							l.Name = "Lance";
							l.LootType = LootType.Blessed;
							from.EquipItem( l );
							from.SendMessage( 102, "You chose a Lance" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 18: //Sai's
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Sai s = new Sai();
							s.Identified = true;
							s.Name = "Sai";
							s.LootType = LootType.Blessed;
							from.EquipItem( s );
							from.SendMessage( 102, "You chose Sai's" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 19: //War Mace
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							WarMace wm = new WarMace();
							wm.Identified = true;
							wm.Name = "War Mace";
							wm.LootType = LootType.Blessed;
							from.EquipItem( wm );
							from.SendMessage( 102, "You chose a War Mace" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 20: //War Hammer
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							WarHammer wh = new WarHammer();
							wh.Identified = true;
							wh.Name = "War Hammer";
							wh.LootType = LootType.Blessed;
							from.EquipItem( wh );
							from.SendMessage( 102, "You chose a War Hammer" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 21: //Maul
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Maul w = new Maul();
							w.Identified = true;
							w.Name = "Maul";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Maul" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 22: //Club
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Club w = new Club();
							w.Identified = true;
							w.Name = "Club";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Club" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 23: //Q Staff
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							QuarterStaff w = new QuarterStaff();
							w.Identified = true;
							w.Name = "Quarter Staff";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Quarter Staff" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 24: //G Staff
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							GnarledStaff w = new GnarledStaff();
							w.Identified = true;
							w.Name = "Gnarled Staff";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Gnarled Staff" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 25: //B Staff
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							BlackStaff w = new BlackStaff();
							w.Identified = true;
							w.Name = "BlackStaff";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Black Staff" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 26: //Hammer Pick
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							HammerPick w = new HammerPick();
							w.Identified = true;
							w.Name = "Hammer Pick";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Hammer Pick" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 27: //War Axe
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							WarAxe w = new WarAxe();
							w.Identified = true;
							w.Name = "War Axe";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a War Axe" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 28: //Bow
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Bow w = new Bow();
							w.Identified = true;
							w.Name = "Bow";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Bow" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 29: //Composite Bow
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							CompositeBow w = new CompositeBow();
							w.Identified = true;
							w.Name = "Composite Bow";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Composite Bow" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 30: //Crossbow
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Crossbow w = new Crossbow();
							w.Identified = true;
							w.Name = "Crossbow";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Crossbow" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 31: //Heavy Crossbow
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							HeavyCrossbow w = new HeavyCrossbow();
							w.Identified = true;
							w.Name = "Heavy Crossbow";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Heavy Crossbow" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 32: //Repeating Crossbow
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							RepeatingCrossbow w = new RepeatingCrossbow();
							w.Identified = true;
							w.Name = "Repeating Crossbow";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Repeating Crossbow" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
				case 33: //Yumi
					{
						if ( module.SkillPts < m_cost )
							from.SendMessage( 37, "Not enough skill points!" );
						else
						{
							module.SkillPts -= m_cost;
							Yumi w = new Yumi();
							w.Identified = true;
							w.Name = "Yumi";
							w.LootType = LootType.Blessed;
							from.EquipItem( w );
							from.SendMessage( 102, "You chose a Yumi" );
						}
						
						from.SendGump( new WepUpgradeGump( from ) );
						break;
					}
			}
		}
Ejemplo n.º 9
0
        public FortressCalcifinaTreasureChest1() : base(0xE43)
        {
            Name    = "a treasure chest -25-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 25;
            LockLevel     = 25;
            MaxLockLevel  = 30;

            // Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(40, 400)));
            }

/////////////////////////////////////// Supplies

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Arrow(Utility.Random(15, 20)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bolt(Utility.Random(15, 20)));
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.Random(15, 20);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bandage(Utility.Random(15, 20)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bedroll());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bottle(Utility.Random(15, 20)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Lockpick(Utility.Random(15, 20)));
            }

            Item PotionLoot = Loot.RandomPotion();

            DropItem(PotionLoot);

/////////////////////////////////////// Tools

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new FishingPole());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Shovel());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Skillet());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(38))
                {
                case 0: weapon = new Hatchet(); break;

                case 1: weapon = new Bow(); break;

                case 2: weapon = new Crossbow(); break;

                case 3: weapon = new Club(); break;

                case 4: weapon = new Mace(); break;

                case 5: weapon = new Maul(); break;

                case 6: weapon = new Pitchfork(); break;

                case 7: weapon = new ShortSpear(); break;

                case 8: weapon = new GnarledStaff(); break;

                case 9: weapon = new ShepherdsCrook(); break;

                case 10: weapon = new Cutlass(); break;

                case 11: weapon = new Katana(); break;

                case 12: weapon = new Kryss(); break;

                case 13: weapon = new Scimitar(); break;

                case 14: weapon = new AssassinSpike(); break;

                case 15: weapon = new DiamondMace(); break;

                case 16: weapon = new Leafblade(); break;

                case 17: weapon = new MagicalShortbow(); break;

                case 18: weapon = new RadiantScimitar(); break;

                case 19: weapon = new WildStaff(); break;

                case 20: weapon = new Axe(); break;

                case 21: weapon = new ExecutionersAxe(); break;

                case 22: weapon = new Pickaxe(); break;

                case 23: weapon = new TwoHandedAxe(); break;

                case 24: weapon = new WarAxe(); break;

                case 25: weapon = new HeavyCrossbow(); break;

                case 26: weapon = new HammerPick(); break;

                case 27: weapon = new WarMace(); break;

                case 28: weapon = new Spear(); break;

                case 29: weapon = new WarFork(); break;

                case 30: weapon = new BlackStaff(); break;

                case 31: weapon = new QuarterStaff(); break;

                case 32: weapon = new Longsword(); break;

                case 33: weapon = new ElvenCompositeLongbow(); break;

                case 34: weapon = new ElvenMachete(); break;

                case 35: weapon = new ElvenSpellblade(); break;

                case 36: weapon = new RuneBlade(); break;

                default: weapon = new Dagger(); break;
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 4, 18, 22);

                DropItem(weapon);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(13))
                {
                case 0: armor = new FemaleStuddedChest(); break;

                case 1: armor = new StuddedArms(); break;

                case 2: armor = new StuddedBustierArms(); break;

                case 3: armor = new StuddedGloves(); break;

                case 4: armor = new StuddedGorget(); break;

                case 5: armor = new ChainCoif(); break;

                case 6: armor = new ChainChest(); break;

                case 7: armor = new ChainLegs(); break;

                case 8: armor = new RingmailArms(); break;

                case 9: armor = new RingmailChest(); break;

                case 10: armor = new RingmailGloves(); break;

                case 11: armor = new RingmailLegs(); break;

                default: armor = new StuddedChest(); break;
                }

                BaseRunicTool.ApplyAttributesTo(armor, 4, 18, 22);

                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseHat hat = Loot.RandomHat(true);
                switch (Utility.Random(5))
                {
                case 0: hat = new BearMask(); break;

                case 1: hat = new DeerMask(); break;

                case 2: hat = new FeatheredHat(); break;

                case 3: hat = new WizardsHat(); break;

                default: hat = new TribalMask(); break;
                }

                BaseRunicTool.ApplyAttributesTo(hat, 4, 18, 22);

                DropItem(hat);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 4, 18, 22);

                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseShield shield = new MetalKiteShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield, 4, 18, 22);
                }

                DropItem(shield);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel bracelet = new GoldBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 4, 18, 22);
                }

                DropItem(bracelet);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 4, 18, 22);
                }

                DropItem(earrings);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel necklace = new GoldNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 4, 18, 22);
                }

                DropItem(necklace);
            }

            if (Utility.RandomDouble() < 0.15)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 4, 18, 22);
                }

                DropItem(ring);
            }
        }
Ejemplo n.º 10
0
 public void MakeWarMace(Mobile from)
 {
     WarMace weapon = new WarMace();
     weapon.NewCrafting = true;
     weapon.QualityDamage = m_Hilt.Damage + m_Blade.Damage;
     weapon.QualitySpeed = m_Hilt.Speed + m_Blade.Speed;
     weapon.QualityAccuracy = m_Hilt.Attack + m_Blade.Attack;
     weapon.QualityDefense = m_Hilt.Defense + m_Blade.Defense;
     weapon.Resource = m_Blade.Resource;
     int quality = (int)(m_Blade.Durability * 0.55 + m_Hilt.Durability * 0.45);
     weapon.MaxHitPoints = quality; weapon.HitPoints = quality;
     weapon.Crafter = from;
     weapon.CraftersOriginalName = from.Name;
     quality = (int)(m_Blade.Quality * 0.6 + m_Hilt.Quality * 0.4);
     if (quality == 500)
         weapon.Quality = WeaponQuality.Legendary;
     if (quality < 500)
         weapon.Quality = WeaponQuality.Masterwork;
     if (quality < 450)
         weapon.Quality = WeaponQuality.Illustrious;
     if (quality < 400)
         weapon.Quality = WeaponQuality.Extraordinary;
     if (quality < 350)
         weapon.Quality = WeaponQuality.Remarkable;
     if (quality < 300)
         weapon.Quality = WeaponQuality.Exceptional;
     if (quality < 250)
         weapon.Quality = WeaponQuality.Superior;
     if (quality < 200)
         weapon.Quality = WeaponQuality.Regular;
     if (quality < 150)
         weapon.Quality = WeaponQuality.Inferior;
     if (quality < 100)
         weapon.Quality = WeaponQuality.Low;
     if (quality < 50)
         weapon.Quality = WeaponQuality.Poor;
     weapon.BetaNerf = true;
     weapon.InvalidateProperties();
     from.AddToBackpack(weapon);
     weapon.AddItem(m_Blade);
     weapon.AddItem(m_Hilt);
 }
Ejemplo n.º 11
0
        public RatmenFortressBossChest() : base(0x2DF2)
        {
            Name    = "a boss treasure chest -25-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 25;
            LockLevel     = 25;
            MaxLockLevel  = 30;

            // Gold
            if (Utility.RandomDouble() < 0.50)
            {
                DropItem(new Gold(Utility.Random(250, 400)));
            }

/////////////////////////////////////// Jewelry

            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Agate());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Beryl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new ChromeDiopside());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new FireOpal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new MoonstoneCustom());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Onyx());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Opal());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new Pearl());
            }
            if (Utility.RandomDouble() < 0.04)
            {
                DropItem(new TurquoiseCustom());
            }

            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Bloodstone());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Citrine());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Demantoid());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Jasper());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lolite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Lupis());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Peridot());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Tsavorite());
            }
            if (Utility.RandomDouble() < 0.03)
            {
                DropItem(new Zircon());
            }

            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Amber());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Amethyst());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Andalusite());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Chrysoberyl());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Garnet());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Jade());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Mandarin());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Morganite());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Paraiba());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new TigerEye());
            }
            if (Utility.RandomDouble() < 0.02)
            {
                DropItem(new Tourmaline());
            }

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Alexandrite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Ametrine());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Kunzite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Ruby());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Sapphire());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Tanzanite());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Topaz());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Zultanite());
            }

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Diamond());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new Emerald());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new PinkQuartz());
            }
            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new StarSapphire());
            }

/////////////////////////////////////// Supplies

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Arrow(Utility.Random(35, 50)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bolt(Utility.Random(35, 50)));
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.Random(35, 40);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bandage(Utility.Random(25, 40)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bedroll());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Bottle(Utility.Random(15, 25)));
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Lockpick(Utility.Random(15, 25)));
            }

            Item PotionLoot1 = Loot.RandomPotion();

            DropItem(PotionLoot1);

            Item PotionLoot2 = Loot.RandomPotion();

            DropItem(PotionLoot2);

            Item PotionLoot3 = Loot.RandomPotion();

            DropItem(PotionLoot3);

/////////////////////////////////////// Tools

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new FishingPole());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Shovel());
            }

            if (Utility.RandomDouble() < 0.15)
            {
                DropItem(new Skillet());
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.01)
            {
                DropItem(new DyeTub());
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(38))
                {
                case 0: weapon = new Hatchet(); break;

                case 1: weapon = new Bow(); break;

                case 2: weapon = new Crossbow(); break;

                case 3: weapon = new Club(); break;

                case 4: weapon = new Mace(); break;

                case 5: weapon = new Maul(); break;

                case 6: weapon = new Pitchfork(); break;

                case 7: weapon = new ShortSpear(); break;

                case 8: weapon = new GnarledStaff(); break;

                case 9: weapon = new ShepherdsCrook(); break;

                case 10: weapon = new Cutlass(); break;

                case 11: weapon = new Katana(); break;

                case 12: weapon = new Kryss(); break;

                case 13: weapon = new Scimitar(); break;

                case 14: weapon = new AssassinSpike(); break;

                case 15: weapon = new DiamondMace(); break;

                case 16: weapon = new Leafblade(); break;

                case 17: weapon = new MagicalShortbow(); break;

                case 18: weapon = new RadiantScimitar(); break;

                case 19: weapon = new WildStaff(); break;

                case 20: weapon = new Axe(); break;

                case 21: weapon = new ExecutionersAxe(); break;

                case 22: weapon = new Pickaxe(); break;

                case 23: weapon = new TwoHandedAxe(); break;

                case 24: weapon = new WarAxe(); break;

                case 25: weapon = new HeavyCrossbow(); break;

                case 26: weapon = new HammerPick(); break;

                case 27: weapon = new WarMace(); break;

                case 28: weapon = new Spear(); break;

                case 29: weapon = new WarFork(); break;

                case 30: weapon = new BlackStaff(); break;

                case 31: weapon = new QuarterStaff(); break;

                case 32: weapon = new Longsword(); break;

                case 33: weapon = new ElvenCompositeLongbow(); break;

                case 34: weapon = new ElvenMachete(); break;

                case 35: weapon = new ElvenSpellblade(); break;

                case 36: weapon = new RuneBlade(); break;

                default: weapon = new Dagger(); break;
                }

                BaseRunicTool.ApplyAttributesTo(weapon, 5, 15, 20);

                DropItem(weapon);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(13))
                {
                case 0: armor = new FemaleStuddedChest(); break;

                case 1: armor = new StuddedArms(); break;

                case 2: armor = new StuddedBustierArms(); break;

                case 3: armor = new StuddedGloves(); break;

                case 4: armor = new StuddedGorget(); break;

                case 5: armor = new ChainCoif(); break;

                case 6: armor = new ChainChest(); break;

                case 7: armor = new ChainLegs(); break;

                case 8: armor = new RingmailArms(); break;

                case 9: armor = new RingmailChest(); break;

                case 10: armor = new RingmailGloves(); break;

                case 11: armor = new RingmailLegs(); break;

                default: armor = new StuddedChest(); break;
                }

                BaseRunicTool.ApplyAttributesTo(armor, 5, 15, 20);

                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseHat hat = Loot.RandomHat(true);
                switch (Utility.Random(5))
                {
                case 0: hat = new BearMask(); break;

                case 1: hat = new DeerMask(); break;

                case 2: hat = new FeatheredHat(); break;

                case 3: hat = new WizardsHat(); break;

                default: hat = new TribalMask(); break;
                }

                BaseRunicTool.ApplyAttributesTo(hat, 5, 15, 20);

                DropItem(hat);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseClothing clothing = Loot.RandomClothing(true);
                BaseRunicTool.ApplyAttributesTo(clothing, 5, 15, 20);

                DropItem(clothing);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseShield shield = new HeaterShield();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield, 5, 15, 20);
                }

                DropItem(shield);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseJewel bracelet = new SilverBracelet();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(bracelet, 5, 15, 20);
                }

                DropItem(bracelet);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseJewel earrings = new SilverEarrings();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(earrings, 5, 15, 20);
                }

                DropItem(earrings);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseJewel necklace = new SilverNecklace();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(necklace, 5, 15, 20);
                }

                DropItem(necklace);
            }

            if (Utility.RandomDouble() < 0.20)
            {
                BaseJewel ring = new SilverRing();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(ring, 5, 15, 20);
                }

                DropItem(ring);
            }
        }
Ejemplo n.º 12
0
        public static string MakeThisTask()
        {
            string task = null;

            switch (Utility.RandomMinMax(1, 10))
            {
            case 1: task = "Repair"; break;

            case 2: task = "Fix"; break;

            case 3: task = "Buff"; break;

            case 4: task = "Modify"; break;

            case 5: task = "Polish"; break;

            case 6: task = "Engrave"; break;

            case 7: task = "Adjust"; break;

            case 8: task = "Improve"; break;

            case 9: task = "Smooth the dents from"; break;

            case 10: task = "Remove the dents from"; break;
            }

            Item item = null;

            switch (Utility.RandomMinMax(1, 79))
            {
            case 1: item = new AssassinSpike(); break;

            case 2: item = new Axe(); break;

            case 3: item = new Bardiche(); break;

            case 4: item = new Bascinet(); break;

            case 5: item = new BattleAxe(); break;

            case 6: item = new BoneHarvester(); break;

            case 7: item = new Broadsword(); break;

            case 8: item = new BronzeShield(); break;

            case 9: item = new Buckler(); break;

            case 10: item = new ButcherKnife(); break;

            case 11: item = new ChainChest(); break;

            case 12: item = new ChainCoif(); break;

            case 13: item = new ChainLegs(); break;

            case 14: item = new ChampionShield(); break;

            case 15: item = new Cleaver(); break;

            case 16: item = new CloseHelm(); break;

            case 17: item = new CloseHelm(); break;

            case 18: item = new CrescentBlade(); break;

            case 19: item = new CrestedShield(); break;

            case 20: item = new Cutlass(); break;

            case 21: item = new Dagger(); break;

            case 22: item = new DarkShield(); break;

            case 23: item = new DiamondMace(); break;

            case 24: item = new DoubleAxe(); break;

            case 25: item = new DoubleBladedStaff(); break;

            case 26: item = new DreadHelm(); break;

            case 27: item = new ElvenMachete(); break;

            case 28: item = new ElvenShield(); break;

            case 29: item = new ElvenSpellblade(); break;

            case 30: item = new ExecutionersAxe(); break;

            case 31: item = new FemalePlateChest(); break;

            case 32: item = new GuardsmanShield(); break;

            case 33: item = new Halberd(); break;

            case 34: item = new HammerPick(); break;

            case 35: item = new HeaterShield(); break;

            case 36: item = new Helmet(); break;

            case 37: item = new Helmet(); break;

            case 38: item = new JeweledShield(); break;

            case 39: item = new Katana(); break;

            case 40: item = new Kryss(); break;

            case 41: item = new Lance(); break;

            case 42: item = new LargeBattleAxe(); break;

            case 43: item = new Leafblade(); break;

            case 44: item = new Longsword(); break;

            case 45: item = new Mace(); break;

            case 46: item = new Maul(); break;

            case 47: item = new MetalKiteShield(); break;

            case 48: item = new MetalShield(); break;

            case 49: item = new NorseHelm(); break;

            case 50: item = new NorseHelm(); break;

            case 51: item = new OrnateAxe(); break;

            case 52: item = new Pickaxe(); break;

            case 53: item = new Pike(); break;

            case 54: item = new Pitchfork(); break;

            case 55: item = new PlateArms(); break;

            case 56: item = new PlateChest(); break;

            case 57: item = new PlateGloves(); break;

            case 58: item = new PlateGorget(); break;

            case 59: item = new PlateHelm(); break;

            case 60: item = new PlateHelm(); break;

            case 61: item = new PlateLegs(); break;

            case 62: item = new RadiantScimitar(); break;

            case 63: item = new RingmailArms(); break;

            case 64: item = new RingmailChest(); break;

            case 65: item = new RingmailGloves(); break;

            case 66: item = new RingmailLegs(); break;

            case 67: item = new RuneBlade(); break;

            case 68: item = new Scimitar(); break;

            case 69: item = new Scythe(); break;

            case 70: item = new ShortSpear(); break;

            case 71: item = new SkinningKnife(); break;

            case 72: item = new Spear(); break;

            case 73: item = new ThinLongsword(); break;

            case 74: item = new TwoHandedAxe(); break;

            case 75: item = new VikingSword(); break;

            case 76: item = new WarAxe(); break;

            case 77: item = new WarCleaver(); break;

            case 78: item = new WarHammer(); break;

            case 79: item = new WarMace(); break;
            }

            if (Utility.RandomMinMax(1, 5) == 1)
            {
                bool evil   = false;
                bool orient = false;

                switch (Utility.RandomMinMax(1, 8))
                {
                case 1: evil = true; break;

                case 2: orient = true; break;
                }

                string sAdjective = "unusual";
                string eAdjective = "might";

                sAdjective = Server.LootPackEntry.MagicItemAdj("start", orient, evil, item.ItemID);
                eAdjective = Server.LootPackEntry.MagicItemAdj("end", orient, evil, item.ItemID);

                string name  = "item";
                string xName = ContainerFunctions.GetOwner("property");

                if (item.Name != null && item.Name != "")
                {
                    name = item.Name.ToLower();
                }
                if (name == "item")
                {
                    name = MorphingItem.AddSpacesToSentence((item.GetType()).Name).ToLower();
                }

                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: name = sAdjective + " " + name + " of " + xName;        break;

                case 1: name = name + " of " + xName;                                           break;

                case 2: name = sAdjective + " " + name;                                         break;

                case 3: name = sAdjective + " " + name + " of " + xName;        break;

                case 4: name = name + " of " + xName;                                           break;

                case 5: name = sAdjective + " " + name;                                         break;
                }

                task = task + " their " + name;
            }
            else
            {
                string[] sMetals = new string[] { "iron ", "dull copper ", "shadow iron ", "copper ", "bronze ", "gold ", "agapite ", "verite ", "valorite ", "nepturite ", "obsidian ", "steel ", "brass ", "mithril ", "xormite ", "dwarven " };
                string   sMetal  = sMetals[Utility.RandomMinMax(0, (sMetals.Length - 1))];

                string name = "item";
                if (item.Name != null && item.Name != "")
                {
                    name = item.Name.ToLower();
                }
                if (name == "item")
                {
                    name = MorphingItem.AddSpacesToSentence((item.GetType()).Name).ToLower();
                }

                task = task + " their " + sMetal + name;
            }

            item.Delete();

            return(task);
        }
Ejemplo n.º 13
0
        private void AddItems(Container pack)
        {
            pack.DropItem(new BagOfReagents());
            pack.DropItem(new Spellbook(ulong.MaxValue));

            BaseWeapon weaps = new Halberd();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps = new Katana();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps = new ShortSpear();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            weaps = new WarMace();
            weaps.Quality = WeaponQuality.Exceptional;
            pack.DropItem(weaps);

            pack.DropItem(new GreaterPoisonPotion());
            pack.DropItem(new GreaterPoisonPotion());

            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());
            pack.DropItem(new GreaterHealPotion());

            pack.DropItem(new GreaterCurePotion());
            pack.DropItem(new GreaterCurePotion());
            pack.DropItem(new GreaterCurePotion());

            pack.DropItem(new TotalRefreshPotion());
            pack.DropItem(new TotalRefreshPotion());

            pack.DropItem(new GreaterExplosionPotion());
            pack.DropItem(new GreaterExplosionPotion());
            pack.DropItem(new GreaterExplosionPotion());

            pack.DropItem(new Bandage(20));

            for(int i = 0; i < 3; i++)
            {
                TrapableContainer cont = new Pouch();
                cont.TrapType = TrapType.MagicTrap;
                cont.TrapPower = 1;
                cont.TrapLevel = 0;
                pack.DropItem(cont);
            }
        }
Ejemplo n.º 14
0
		[Constructable]			// Make it Spawnable in game
		public BlacksmithLord() : base( AIType.AI_Melee, FightMode.Closest, 8, 1, 0.2, 0.4 ) // Set AI
		{
			if ( Female = Utility.RandomBool() )   // Make it 50/50 male/female
			{
				Body = 0x191;					// Give it a female body
				Name = NameList.RandomName( "evil mage" );		// Choose a female name
			}
			else							// Or
			{
				Body = 0x190;					// Give it a male body
				Name = NameList.RandomName( "evil mage" );		// Choose a Male name
			}
			Hue = Utility.RandomSkinHue();

			SetStr( 450, 560 );
			SetDex( 90, 135 );       // Set Stats
			SetInt( 60, 65 );
			SetHits( 450, 550 );

			SetDamage( 28, 32 );	// Set Damage

			SetDamageType( ResistanceType.Physical, 100 ); 

			SetSkill( SkillName.MagicResist, 100.1, 120.0 );
			SetSkill( SkillName.Tactics, 95.1, 110.0 );
			SetSkill( SkillName.Wrestling, 95.1, 110.0 );
			SetSkill( SkillName.Fencing, 95.1, 110.0 );		// Set Skills
			SetSkill( SkillName.Macing, 95.1, 110.0 );
			SetSkill( SkillName.Swords, 95.1, 110.0 );

			SetResistance( ResistanceType.Physical, 55, 65 ); 	//Set Resistances
			SetResistance( ResistanceType.Fire, 55, 60 );
			SetResistance( ResistanceType.Cold, 55, 60 );
			SetResistance( ResistanceType.Poison, 55, 60 );
			SetResistance( ResistanceType.Energy, 55, 60 );


			Fame = 15000;						// Set Fame/Karma
			Karma = -15000;

			Item hair = new Item( Utility.RandomList( 0x203B, 0x2049, 0x2048, 0x204A ) );
			hair.Hue = Utility.RandomNondyedHue();
			hair.Layer = Layer.Hair;
			hair.Movable = false;
			AddItem( hair );

			if ( 0.05 > Utility.RandomDouble() )
				PackItem( new RunicHammer( CraftResource.Gold, 10 ) );		// Roll for a Runic
			else if ( 0.03 > Utility.RandomDouble() )		// If it fails	
				PackItem( new AncientSmithyHammer( 30, 50 ) );			// Roll for a ancient
			if ( 0.03 > Utility.RandomDouble() )
				PackItem( new PowerScroll( SkillName.Tailoring, 110) );
			if ( 0.03 > Utility.RandomDouble() )
				PackItem( new PowerScroll( SkillName.Blacksmith, 110) );

			switch ( Utility.Random( 5 ))  		// Equip 1 of 5 weapons
			{ 
				case 0: Mace weapon = new Mace();
					weapon.Movable = false;
					weapon.Crafter = this;
					weapon.Quality = WeaponQuality.Exceptional;
					AddItem( weapon ); break;

				case 1: Maul weapona = new Maul();
					weapona.Movable = false;
					weapona.Crafter = this;
					weapona.Quality = WeaponQuality.Exceptional;
					AddItem( weapona ); break;

				case 2: WarHammer weaponb = new WarHammer();
					weaponb.Movable = false;
					weaponb.Crafter = this;
					weaponb.Quality = WeaponQuality.Exceptional;
					AddItem( weaponb ); break;

				case 3: HammerPick weaponc = new HammerPick();
					weaponc.Movable = false;
					weaponc.Crafter = this;
					weaponc.Quality = WeaponQuality.Exceptional;
					AddItem( weaponc ); break;

				case 4: WarMace weapond = new WarMace();
					weapond.Movable = false;
					weapond.Crafter = this;
					weapond.Quality = WeaponQuality.Exceptional;
					AddItem( weapond ); break;
			}

			PlateChest chest = new PlateChest();		// Create a plate Chest
			chest.Quality = ArmorQuality.Exceptional;
			chest.Crafter = this;				
			chest.Hue = 1146;
			chest.Movable = false;				// Make it dissapear on death
			AddItem( chest );				// Add it as equip
			
			PlateArms arms = new PlateArms();
			arms.Quality = ArmorQuality.Exceptional;
			arms.Crafter = this;				
			arms.Hue = 1146;
			arms.Movable = false;
			AddItem( arms );
			
			PlateGloves gloves = new PlateGloves();
			gloves.Quality = ArmorQuality.Exceptional;
			gloves.Crafter = this;				
			gloves.Hue = 1146;
			gloves.Movable = false;
			AddItem( gloves );
			
			PlateGorget gorget = new PlateGorget();
			gorget.Quality = ArmorQuality.Exceptional;
			gorget.Crafter = this;				
			gorget.Hue = 1146;
			gorget.Movable = false;
			AddItem( gorget );
			
			PlateLegs legs = new PlateLegs();
			legs.Quality = ArmorQuality.Exceptional;
			legs.Crafter = this;				
			legs.Hue = 1146;
			legs.Movable = false;
			AddItem( legs );

		}
Ejemplo n.º 15
0
        public TownChestWeaponsmith() : base(0xE43)
        {
            Name    = "a metal chest -20-";
            Movable = true;
            Weight  = 1000.0;

            Hue = 83;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 20;
            LockLevel     = 20;
            MaxLockLevel  = 25;

            // Gold
            if (Utility.RandomDouble() < 0.25)
            {
                DropItem(new Gold(Utility.Random(1, 50)));
            }

            // Supplies

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Axe());
            }

            if (Utility.RandomDouble() < 0.05)
            {
                DropItem(new DoubleAxe());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new LargeBattleAxe());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Mace());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Maul());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new WarMace());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new ShortSpear());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Spear());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Longsword());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Scimitar());
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Arrow(Utility.Random(25, 30)));
            }

/////////////////////////////////////// Rare Items

            if (Utility.RandomDouble() < 0.15)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(38))
                {
                case 0: weapon = new Hatchet(); break;

                case 1: weapon = new Bow(); break;

                case 2: weapon = new Crossbow(); break;

                case 3: weapon = new Club(); break;

                case 4: weapon = new Mace(); break;

                case 5: weapon = new Maul(); break;

                case 6: weapon = new Pitchfork(); break;

                case 7: weapon = new ShortSpear(); break;

                case 8: weapon = new GnarledStaff(); break;

                case 9: weapon = new ShepherdsCrook(); break;

                case 10: weapon = new Cutlass(); break;

                case 11: weapon = new Katana(); break;

                case 12: weapon = new Kryss(); break;

                case 13: weapon = new Scimitar(); break;

                case 14: weapon = new AssassinSpike(); break;

                case 15: weapon = new DiamondMace(); break;

                case 16: weapon = new Leafblade(); break;

                case 17: weapon = new MagicalShortbow(); break;

                case 18: weapon = new RadiantScimitar(); break;

                case 19: weapon = new WildStaff(); break;

                case 20: weapon = new Axe(); break;

                case 21: weapon = new ExecutionersAxe(); break;

                case 22: weapon = new Pickaxe(); break;

                case 23: weapon = new TwoHandedAxe(); break;

                case 24: weapon = new WarAxe(); break;

                case 25: weapon = new HeavyCrossbow(); break;

                case 26: weapon = new HammerPick(); break;

                case 27: weapon = new WarMace(); break;

                case 28: weapon = new Spear(); break;

                case 29: weapon = new WarFork(); break;

                case 30: weapon = new BlackStaff(); break;

                case 31: weapon = new QuarterStaff(); break;

                case 32: weapon = new Longsword(); break;

                case 33: weapon = new ElvenCompositeLongbow(); break;

                case 34: weapon = new ElvenMachete(); break;

                case 35: weapon = new ElvenSpellblade(); break;

                case 36: weapon = new RuneBlade(); break;

                default: weapon = new Dagger(); break;
                }
                BaseRunicTool.ApplyAttributesTo(weapon, 5, 15, 20);

                DropItem(weapon);
            }
        }