当前位置: 首页>>代码示例>>C#>>正文


C# Dungeon.AddChest方法代码示例

本文整理汇总了C#中Dungeon.AddChest方法的典型用法代码示例。如果您正苦于以下问题:C# Dungeon.AddChest方法的具体用法?C# Dungeon.AddChest怎么用?C# Dungeon.AddChest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dungeon的用法示例。


在下文中一共展示了Dungeon.AddChest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		if (dungeon.CountPlayers() == 1)
		{
			var member = creators[0];
			var treasureChest = new TreasureChest();

			// Cores' Healer Suit
			int prefix = 0, suffix = 0;
			switch (rnd.Next(3))
			{
				case 0: suffix = 30806; break; // Embroider
				case 1: suffix = 30805; break; // Falcon
				case 2: suffix = 30701; break; // Golem
			}
			treasureChest.Add(Item.CreateEnchanted(15030, prefix, suffix));

			treasureChest.Add(Item.Create(id: 2000, amountMin: 1140, amountMax: 5040)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
		else
		{
			for (int i = 0; i < creators.Count; ++i)
			{
				var member = creators[i];
				var treasureChest = new TreasureChest();

				if (i == 0)
				{
					// Wave-patterned Long Boots
					int prefix = 20204, suffix = 0;
					switch (rnd.Next(3))
					{
						case 0: suffix = 30902; break; // The dawn
						case 1: suffix = 30602; break; // Healer
						case 2: suffix = 30505; break; // Direwolf
					}
					treasureChest.Add(Item.CreateEnchanted(17032, prefix, suffix));
				}

				treasureChest.Add(Item.Create(id: 2000, amountMin: 608, amountMax: 2688)); // Gold
				treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

				dungeon.AddChest(treasureChest);

				member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
			}
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:56,代码来源:dunbarton_rabbie_low_dungeon.cs

示例2: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Enchanted item
				Item item = null;
				switch (rnd.Next(2))
				{
					case 0: item = Item.CreateEnchanted(40004, prefix: 20105); break; // Artless Lute
					case 1: item = Item.CreateEnchanted(15022, prefix: 20612); break; // Splendit Popo's Skirt
				}
				treasureChest.Add(item);
			}

			treasureChest.AddGold(rnd.Next(2080, 4160)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:xKamuna,项目名称:aura,代码行数:29,代码来源:tircho_alby_middle_1_dungeon.cs

示例3: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				switch (rnd.Next(2))
				{
					case 0: treasureChest.Add(Item.CreateEnchanted(16015, 20403, 0)); break; // Victorious Bracelet
					case 1: treasureChest.Add(Item.CreateEnchanted(40027, 0, 30311)); break; // Twilight Weeding Hoe
				}
			}

			treasureChest.AddGold(rnd.Next(5200, 7120)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:26,代码来源:gairech_fiodh_middle_2_dungeon.cs

示例4: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			member.TalkToNpc("_dungeonlostresident", "Lost Resident");

			var treasureChest = new TreasureChest();

			// Enchant
			var enchant = 0;
			switch (rnd.Next(3))
			{
				case 0: enchant = 1506; break; // Swan Summoner's (Prefix)
				case 1: enchant = 1706; break; // Good (Prefix)
				case 2: enchant = 305; break;  // Fine (Prefix)
			}
			treasureChest.Add(Item.CreateEnchant(enchant));

			treasureChest.AddGold(rnd.Next(153, 768)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:30,代码来源:tircho_alby_dungeon_tutorial_ranald.cs

示例5: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				switch (rnd.Next(3))
				{
					case 0: treasureChest.Add(Item.CreateEnchanted(40023, 20611, 0)); break; // Strict Gathering Knife
					case 1: treasureChest.Add(Item.CreateEnchanted(18006, 0, 30807)); break; // Prophet Wizard Hat
					case 2: treasureChest.Add(Item.CreateEnchanted(18012, 0, 30521)); break; // Fancy Tork Merchant Cap
				}
			}

			treasureChest.AddGold(rnd.Next(6630, 8670)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:xKamuna,项目名称:aura,代码行数:27,代码来源:gairech_fiodh_middle_4_dungeon.cs

示例6: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Enchant
				var item = new Item(62005);
				switch (rnd.Next(6))
				{
					case 0: item.OptionInfo.Suffix = 11105; break; // Health
					case 1: item.OptionInfo.Suffix = 11106; break; // Blood
					case 2: item.OptionInfo.Suffix = 11205; break; // Water
					case 3: item.OptionInfo.Suffix = 11206; break; // Fountain
					case 4: item.OptionInfo.Suffix = 11304; break; // Patience
					case 5: item.OptionInfo.Suffix = 11305; break; // Sustainer
				}
				treasureChest.Add(item);
			}

			treasureChest.AddGold(rnd.Next(640, 960)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:33,代码来源:tircho_ciar_beginner_1_dungeon.cs

示例7: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			// Fluted Short Sword
			int prefix = 0, suffix = 0;
			switch (rnd.Next(4))
			{
				case 0: suffix = 30702; break; // Raven
				case 1: suffix = 30602; break; // Healer
				case 2: suffix = 30504; break; // Gold Goblin
				case 3: suffix = 30501; break; // Giant
			}
			treasureChest.Add(Item.CreateEnchanted(40015, prefix, suffix));

			treasureChest.AddGold(rnd.Next(2384, 2992)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:29,代码来源:bangor_barri_low_dungeon.cs

示例8: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Enchanted item
				Item item = null;
				switch (rnd.Next(2))
				{
					case 0: item = Item.CreateEnchanted(40043, prefix: 20105); break; // Maltreat Rolling Pin
					case 1: item = Item.CreateEnchanted(40001, prefix: 20612); break; // Careful Wooden Stick
				}
				treasureChest.Add(item);
			}

			treasureChest.AddGold(rnd.Next(3360, 6272)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:29,代码来源:tircho_alby_middle_2_dungeon.cs

示例9: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		foreach (var member in dungeon.Party)
			member.TalkToNpc("_dungeonlostresident", "Lost Resident");

		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			// Enchant
			var enchant = new Item(62005);
			switch (rnd.Next(3))
			{
				case 0: enchant.OptionInfo.Prefix = 1506; break; // Swan Summoner's
				case 1: enchant.OptionInfo.Prefix = 1706; break; // Good
				case 2: enchant.OptionInfo.Prefix = 305; break;  // Fine
			}
			treasureChest.Add(enchant);

			treasureChest.AddGold(rnd.Next(153, 768)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:30,代码来源:tircho_alby_dungeon_tutorial_ranald.cs

示例10: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Dagger
				var prefix = 0;
				switch (rnd.Next(3))
				{
					case 0: prefix = 20501; break; // Simple
					case 1: prefix = 20502; break; // Scrupulous
					case 2: prefix = 20201; break; // Hard
				}
				treasureChest.Add(Item.CreateEnchanted(40006, prefix, 0));
			}

			treasureChest.AddGold(rnd.Next(1072, 3680)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:31,代码来源:tircho_alby_low_dungeon.cs

示例11: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Mace
				int prefix = 0, suffix = 0;
				switch (rnd.Next(2))
				{
					case 0: prefix = 20701; break; // Stiff
					case 1: prefix = 21003; break; // Fatal
				}
				switch (rnd.Next(2))
				{
					case 0: suffix = 30506; break; // Belligerent
					case 1: suffix = 10807; break; // Considerate
				}
				treasureChest.Add(Item.CreateEnchanted(40079, prefix, suffix));
			}

			treasureChest.AddGold(rnd.Next(2112, 5200)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:35,代码来源:tircho_ciar_middle_2_dungeon.cs

示例12: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Enchanted item
				Item item = null;
				switch (rnd.Next(2))
				{
					case 0: item = Item.CreateEnchanted(40026, prefix: 20404); break; // Sacrificial Sickle
					case 1: item = Item.CreateEnchanted(18024, suffix: 30411); break; // Magnolia Hairband
					case 2: item = Item.CreateEnchanted(40003, suffix: 30514); break; // Hope Short Bow
				}
				treasureChest.Add(item);
			}

			treasureChest.AddGold(rnd.Next(4488, 8160)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:31,代码来源:tircho_alby_middle_4_dungeon.cs

示例13: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();

		for (int i = 0; i < dungeon.Party.Count; ++i)
		{
			var member = dungeon.Party[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Dagger
				var item = new Item(40006);
				switch (rnd.Next(3))
				{
					case 0: item.OptionInfo.Prefix = 20501; break; // Simple
					case 1: item.OptionInfo.Prefix = 20502; break; // Scrupulous
					case 2: item.OptionInfo.Prefix = 20201; break; // Hard
				}
				treasureChest.Add(item);
			}

			treasureChest.AddGold(rnd.Next(1072, 3680)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:ripxfrostbite,项目名称:aura,代码行数:30,代码来源:tircho_alby_low_dungeon.cs

示例14: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();

		for (int i = 0; i < creators.Count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			if (i == 0)
			{
				// Cooking Knife
				int prefix = 0, suffix = 0;
				switch (rnd.Next(2))
				{
					case 0: prefix = 20206; break; // Nervous
					case 1: prefix = 20711; break; // Famous
				}
				treasureChest.Add(Item.CreateEnchanted(40042, prefix, suffix));
			}

			treasureChest.AddGold(rnd.Next(2880, 4380)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:30,代码来源:gairech_fiodh_middle_1_dungeon.cs

示例15: OnCleared

	public override void OnCleared(Dungeon dungeon)
	{
		var rnd = RandomProvider.Get();
		var creators = dungeon.GetCreators();
		var count = Math.Min(7, creators.Count);

		for (int i = 0; i < count; ++i)
		{
			var member = creators[i];
			var treasureChest = new TreasureChest();

			treasureChest.AddGold(rnd.Next(320, 1280)); // Gold
			treasureChest.Add(GetRandomTreasureItem(rnd)); // Random item

			dungeon.AddChest(treasureChest);

			member.GiveItemWithEffect(Item.CreateKey(70028, "chest"));
		}

		var orb = new Prop(25032, 0, 0, 0, 0);
		orb.SetState("off");
		orb.Behavior = OnOrbHit;
		dungeon.AddChest(orb);
	}
开发者ID:aura-project,项目名称:aura,代码行数:24,代码来源:g1_37_red_tirnanog_dungeon.cs


注:本文中的Dungeon.AddChest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。