コード例 #1
0
        protected virtual void GenerateTreasure()
        {
            DropItem(new Gold(1500, 3000));

            Item item = null;

            for (int i = 0; i < Loot.GemTypes.Length; i++)
            {
                item = Activator.CreateInstance(Loot.GemTypes[i]) as Item;

                if (item != null)
                {
                    item.Amount = Utility.Random(1, 6);

                    DropItem(item);
                }
            }

            if (0.25 > Utility.RandomDouble())
            {
                item = new SmokeBomb(Utility.Random(3, 6));
                DropItem(item);
            }

            if (0.25 > Utility.RandomDouble())
            {
                switch (Utility.Random(2))
                {
                case 0:
                    item = new ParasiticPotion(Utility.Random(1, 3)); break;

                case 1:
                    item = new InvisibilityPotion(Utility.Random(1, 3)); break;
                }

                DropItem(item);
            }

            if (0.2 > Utility.RandomDouble())
            {
                item        = Loot.RandomEssence();
                item.Amount = Utility.Random(3, 6);
                DropItem(item);
            }

            if (0.1 > Utility.RandomDouble())
            {
                switch (Utility.Random(4))
                {
                case 0: DropItem(new Taint()); break;

                case 1: DropItem(new Corruption()); break;

                case 2: DropItem(new Blight()); break;

                case 3: DropItem(new LuminescentFungi()); break;
                }
            }
        }
コード例 #2
0
        public BagOfAssassinGear() : base()
        {
            DropItem(new ACreedBelt());
            DropItem(new ACreedBoneArms());
            DropItem(new ACreedChainCoif());
            DropItem(new ACreedJinBori());
            DropItem(new ACreedKilt());
            DropItem(new ACreedMempo());
            DropItem(new ACreedShirt());
            DropItem(new ACreedSkirt());
            DropItem(new ACreedStuddedChest());
            DropItem(new ACreedThighBoots());
            DropItem(new ACreedLeafGloves());
            DropItem(new ACreedSword());

            Bag bag = new Bag();

            for (int i = 0; i < 16; i++)
            {
                bag.DropItem(new Dagger());
            }

            SmokeBomb smoke = new SmokeBomb();

            smoke.Amount = 15;
            bag.DropItem(smoke);
            bag.DropItem(new GreaterHealPotion(15));
            DropItem(bag);


            bag = new Bag();

            for (int i = 0; i < 34; i++)
            {
                bag.DropItem(new UpgradeACreedGarbDeed());
            }

            DropItem(bag);
        }
コード例 #3
0
		public BagOfAssassinGear() : base()
		{
			DropItem( new ACreedBelt() );
			DropItem( new ACreedBoneArms() );
			DropItem( new ACreedChainCoif() );
			DropItem( new ACreedJinBori() );
			DropItem( new ACreedKilt() );
			DropItem( new ACreedMempo() );
			DropItem( new ACreedShirt() );
			DropItem( new ACreedSkirt() );
			DropItem( new ACreedStuddedChest() );
			DropItem( new ACreedThighBoots() );
			DropItem( new ACreedLeafGloves() );
			DropItem( new ACreedSword() );

			Bag bag = new Bag();

			for ( int i = 0; i < 16; i++ )
			{
				bag.DropItem( new Dagger() );
			}

			SmokeBomb smoke = new SmokeBomb();
			smoke.Amount = 15;
			bag.DropItem( smoke );
			bag.DropItem( new GreaterHealPotion( 15 ) );
			DropItem( bag );


			bag = new Bag();

			for ( int i = 0; i < 34; i++ )
			{
				bag.DropItem( new UpgradeACreedGarbDeed() );
			}

			DropItem( bag );
		}
コード例 #4
0
ファイル: KhaldunChest.cs プロジェクト: Evad-lab/ServUOX
        public virtual void Fill()
        {
            Reset();

            List <Item> contains = new List <Item>(Items);

            foreach (var i in contains)
            {
                i.Delete();
            }

            ColUtility.Free(contains);

            for (int i = 0; i < Utility.RandomMinMax(6, 12); i++)
            {
                DropItem(Loot.RandomGem());
            }

            DropItem(new Gold(Utility.RandomMinMax(800, 1100)));

            Item item = null;

            if (0.30 > Utility.RandomDouble())
            {
                switch (Utility.Random(7))
                {
                case 0:
                    item = new Bandage(Utility.Random(10, 30)); break;

                case 1:
                    item        = new SmokeBomb();
                    item.Amount = Utility.Random(3, 6);
                    break;

                case 2:
                    item        = new InvisibilityPotion();
                    item.Amount = Utility.Random(1, 3);
                    break;

                case 3:
                    item = new Lockpick(Utility.Random(1, 10)); break;

                case 4:
                    item = new DreadHornMane(Utility.Random(1, 2)); break;

                case 5:
                    item = new Corruption(Utility.Random(1, 2)); break;

                case 6:
                    item = new Taint(Utility.Random(1, 2)); break;
                }

                DropItem(item);
            }

            if (0.25 > Utility.RandomDouble())
            {
                DropItem(new CounterfeitPlatinum());
            }

            if (0.2 > Utility.RandomDouble())
            {
                switch (Utility.Random(3))
                {
                case 0:
                    item = new ZombiePainting(); break;

                case 1:
                    item = new SkeletonPortrait(); break;

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

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

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

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

                case 6:
                    item = new RelicOfStratos(); break;
                }

                DropItem(item);
            }

            if (0.1 > Utility.RandomDouble())
            {
                item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(this), LootPackEntry.IsMondain(this), LootPackEntry.IsStygian(this));

                if (item != null)
                {
                    TreasureMapChest.GetRandomItemStat(out int min, out int max, 1.0);

                    RunicReforging.GenerateRandomItem(item, null, Utility.RandomMinMax(min, max), 0, ReforgedPrefix.None, ReforgedSuffix.Khaldun, Map);

                    DropItem(item);
                }
            }
        }