本文整理汇总了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"));
}
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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"));
}
}
示例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);
}