public static BaseJewel NewbJewelry()
        {
            BaseJewel jewel = null;

            switch( Utility.Random( 4 ) )
            {
                case 0: jewel = new GoldRing(); break;
                case 1: jewel = new GoldBracelet(); break;
                case 2: jewel = new SilverRing(); break;
                case 3: jewel = new SilverBracelet(); break;
            }

            if( Utility.RandomBool() )
            {
                int luck = 60 + Utility.Random( 26 ) + Utility.Random( 26 );
                if( luck > 100 )
                    luck = 100;

                jewel.Attributes.Luck = luck;
            }
            else
            {
                jewel.Attributes.CastSpeed = 1;
                jewel.Attributes.CastRecovery = Utility.RandomMinMax( 1, 3 );
            }

            return jewel;
        }
Exemple #2
0
        public AlytharrBrigandCampTreasureChest() : base(0xE43)
        {
            Name    = "a treasure chest -5-";
            Movable = true;
            Weight  = 1000.0;

            TrapPower = 0;
            Locked    = true;

            RequiredSkill = 5;
            LockLevel     = 5;
            MaxLockLevel  = 10;

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

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

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

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Bolt(Utility.Random(1, 5)));
            }

            Item ReagentLoot = Loot.RandomReagent();

            ReagentLoot.Amount = Utility.Random(1, 5);
            DropItem(ReagentLoot);

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Bandage(Utility.Random(1, 5)));
            }

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

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Bottle(Utility.Random(1, 5)));
            }

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Lockpick(Utility.Random(1, 5)));
            }

            Item PotionLoot = Loot.RandomPotion();

            DropItem(PotionLoot);

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

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

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

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

/////////////////////////////////////// Equipment

            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Cutlass());
            }
            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Longsword());
            }
            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Axe());
            }
            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Club());
            }
            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Dagger());
            }
            if (Utility.RandomDouble() < 0.10)
            {
                DropItem(new Spear());
            }

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

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

            if (Utility.RandomDouble() < 0.10)
            {
                BaseWeapon weapon = Loot.RandomWeapon(true);
                switch (Utility.Random(21))
                {
                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;

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

                BaseRunicTool.ApplyAttributesTo(weapon, 2, 5, 10);
                weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(1);
                weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(1);
                weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(1);
                weapon.Quality         = WeaponQuality.Regular;

                DropItem(weapon);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                BaseArmor armor = Loot.RandomArmor(true);
                switch (Utility.Random(10))
                {
                case 0: armor = new FemaleLeatherChest(); break;

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

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

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

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

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

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

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

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

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

                BaseRunicTool.ApplyAttributesTo(armor, 3, 5, 10);
                armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(2);
                armor.Durability      = (ArmorDurabilityLevel)Utility.Random(2);
                armor.Quality         = ArmorQuality.Regular;

                DropItem(armor);
            }

            if (Utility.RandomDouble() < 0.10)
            {
                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, 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.10)
            {
                BaseShield shield = new Buckler();
                if (Core.AOS)
                {
                    BaseRunicTool.ApplyAttributesTo(shield, 3, 5, 10);
                }

                DropItem(shield);
            }

            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 LadyGuardian()
			: base(AIType.AI_BaseHybrid, FightMode.All | FightMode.Weakest, 10, 1, 0.15, 0.25) //0.2, 0.4
		{
			BardImmune = true;
			FightStyle = FightStyle.Magic | FightStyle.Smart | FightStyle.Bless | FightStyle.Curse;
			UsesHumanWeapons = false;
			UsesBandages = true;
			UsesPotions = true;
			CanRun = true;
			CanReveal = true; // magic and smart

			Name = "Lady Guardian";
			Body = 0x191;
			Hue = 0x83F4;
			Female = true;
			IOBAlignment = IOBAlignment.Council;
			ControlSlots = 6;

			BloodDrenchedBandana bandana = new BloodDrenchedBandana();
			bandana.LootType = LootType.Newbied;
			AddItem( bandana );

			AddItem( new Kilt( 0x14C ) );
			AddItem( new LongHair( 0x14F ) );

			Shirt shirt = new Shirt( 0x1 ); //black shirt
			if ( Utility.RandomDouble() <= 0.93 )
				shirt.LootType = LootType.Newbied;
			AddItem( shirt );

			Sandals sandals = new Sandals( 0x66C );
			if ( Utility.RandomDouble() <= 0.93 )
				sandals.LootType = LootType.Newbied;
			AddItem( sandals );

			SilverRing ring = new SilverRing();
			ring.Name = "For my lovely Jade";
			if ( Utility.RandomDouble() < 0.95 )
				ring.LootType = LootType.Newbied;
			AddItem( ring );

			SetStr( 375, 400 );
			SetDex( 100, 125 );
			SetInt( 150, 175 );

			SetHits( 250, 303 );
			SetDamage( 11, 13 );

			SetSkill( SkillName.EvalInt, 100.0, 110.0 );
			SetSkill( SkillName.Magery, 100.0, 110.0 );
			SetSkill( SkillName.MagicResist, 100.0, 110.0 );
			SetSkill( SkillName.Meditation, 100.0, 110.0 );
			SetSkill( SkillName.Tactics, 85.0, 100.0 );
			SetSkill( SkillName.Wrestling, 100.0, 110.0 );
			SetSkill( SkillName.Poisoning, 100.1, 101.0 );

			Fame = 5000;
			Karma = -5000;

			VirtualArmor = 16;
			
			m_NextSpeechTime = DateTime.Now;

			PackItem(new Bandage(Utility.RandomMinMax(VirtualArmor, VirtualArmor * 2)));
			PackStrongPotions(6, 12);
			PackItem(new Pouch());
		}
		public LordGuardian()
			: base(AIType.AI_Hybrid, FightMode.All | FightMode.Weakest, 10, 1, 0.15, 0.25) 
		{
			BardImmune = true;
			FightStyle = FightStyle.Melee | FightStyle.Magic | FightStyle.Smart | FightStyle.Bless | FightStyle.Curse;
			UsesHumanWeapons = false;
			UsesBandages = true;
			UsesPotions = true;
			CanRun = true;
			CanReveal = true; // magic and smart

			SpeechHue = Utility.RandomDyedHue();
			Name = "Lord Guardian";
            Female = false;
			Body = 0x190; 
			Hue = 0x83F4; 
			IOBAlignment = IOBAlignment.Council;
			ControlSlots = 6;

			PackItem(new Bandage(Utility.RandomMinMax(1, 15)));

			BloodDrenchedBandana bandana = new BloodDrenchedBandana();
			bandana.LootType = LootType.Newbied;
			AddItem( bandana );
			
			Kilt kilt = new Kilt( 0x1 ); //black kilt
			if ( Utility.RandomDouble() <= 0.93 )
				kilt.LootType = LootType.Newbied;
			AddItem( kilt );
			
			Sandals sandals = new Sandals( 0x66C );
			if ( Utility.RandomDouble() <= 0.93 )
				sandals.LootType = LootType.Newbied;
			AddItem( sandals );

			SilverRing ring = new SilverRing();
			ring.Name = "To my darling Adam";
			if ( Utility.RandomDouble() < 0.95 )
				ring.LootType = LootType.Newbied;
			AddItem( ring );

			ChainChest tunic = new ChainChest();
			tunic.Resource = CraftResource.Gold;
			AddItem( tunic );
			
			ChainLegs legs = new ChainLegs();
			legs.Resource = CraftResource.Gold;
			AddItem( legs );
			
			RingmailArms arms = new RingmailArms();
			arms.Resource = CraftResource.Gold;
			AddItem( arms );
			
			GuardianKatana sword = new GuardianKatana();
			sword.Quality = WeaponQuality.Exceptional;
			sword.LootType = LootType.Newbied;
			if ( Utility.RandomBool() )	
				sword.Poison = Poison.Deadly; 
			else 
				sword.Poison = Poison.Greater;
			sword.PoisonCharges = 30;
			AddItem( sword );

			PonyTail hair = new PonyTail();
			hair.Hue = 0x1BC;
			hair.Layer = Layer.Hair; 
			hair.Movable = false; 
			AddItem( hair ); 

			SetStr( 375, 400 );
			SetDex( 100, 125 );
			SetInt( 150, 175 );

			SetDamage( 8, 10 );

			SetSkill(SkillName.EvalInt, 100.0, 110.0);
			SetSkill(SkillName.Magery, 100.0, 110.0);
			SetSkill( SkillName.Swords, 100.0, 125.0 );
			SetSkill( SkillName.Tactics, 100.0, 125.0 );
			SetSkill( SkillName.Anatomy, 100.0, 125.0 );
			SetSkill( SkillName.Poisoning, 60.0, 82.5 );
			SetSkill( SkillName.MagicResist, 83.5, 92.5 );

			Fame = 5000;
			Karma = -5000;

			VirtualArmor = 40;
			
			m_NextSpeechTime = DateTime.Now;

			PackItem(new Bandage(Utility.RandomMinMax(VirtualArmor, VirtualArmor * 2)));
			PackStrongPotions(6, 12);
			PackItem(new Pouch());
		}