本文整理汇总了C#中Dice.D66方法的典型用法代码示例。如果您正苦于以下问题:C# Dice.D66方法的具体用法?C# Dice.D66怎么用?C# Dice.D66使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dice
的用法示例。
在下文中一共展示了Dice.D66方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddPassengerType
public static void AddPassengerType(Passenger passenger, Dice random)
{
int roll1 = random.D66();
int roll2 = random.D(6);
int roll3 = random.D(6);
switch (roll1)
{
case 11: passenger.PassengerType = "Refugee - political"; return;
case 12: passenger.PassengerType = "Refugee - economic"; return;
case 13: passenger.PassengerType = "Starting a new life offworld"; return;
case 14: passenger.PassengerType = "Mercenary"; return;
case 15: passenger.PassengerType = "Spy"; return;
case 16: passenger.PassengerType = "Corporate Mechanic"; return;
case 21: passenger.PassengerType = "Out to see the universe"; return;
case 22: passenger.PassengerType = roll2 <= 3 ? "Tourist (Irritating)" : "Tourist (Charming)"; return;
case 23: passenger.PassengerType = "Wide-eyed Yokel"; return;
case 24: passenger.PassengerType = "Adventurer"; return;
case 25: passenger.PassengerType = "Explorer"; return;
case 26: passenger.PassengerType = "Claustrophobic"; return;
case 31: passenger.PassengerType = "Expectant Mother"; return;
case 32: passenger.PassengerType = "Wants to stowaway or join the crew"; return;
case 33: passenger.PassengerType = "Possess something illegal or dangerous"; return;
case 34:
if (roll2 <= 3)
passenger.PassengerType = "Causes Trouble (Drunk)";
else if (roll2 <= 5)
passenger.PassengerType = "Causes Trouble (Violent)";
else
passenger.PassengerType = "Causes Trouble (Insane)";
return;
case 35: passenger.PassengerType = "Unusually Pretty or Handsome"; return;
case 36: passenger.PassengerType = string.Format("Engineer (Engineer {0}, Mechanic {1})", (roll2 - 1), (roll3 - 1)); return;
case 41: passenger.PassengerType = "Ex-scout"; return;
case 42: passenger.PassengerType = "Wanderer"; return;
case 43: passenger.PassengerType = "Thief or other criminal"; return;
case 44: passenger.PassengerType = "Scientist"; return;
case 45: passenger.PassengerType = "Journalist or researcher"; return;
case 46: passenger.PassengerType = string.Format("Entertainer (Steward {0}, Perform {1})", (roll2 - 1), (roll3 - 1)); return;
case 51: passenger.PassengerType = string.Format("Gambler (Gambler {0})", (roll2 - 1)); return;
case 52: passenger.PassengerType = "Rich nobel - complains a lot"; return;
case 53: passenger.PassengerType = "Rich nobel - eccentric"; return;
case 54: passenger.PassengerType = "Rich nobel - raconteur"; return;
case 55: passenger.PassengerType = "Diplomat on a mission"; return;
case 56: passenger.PassengerType = "Agent on a mission"; return;
case 61:
passenger.IsPatron = true;
passenger.PassengerType = "Patron";
return;
case 62: passenger.PassengerType = "Alien"; return;
case 63: passenger.PassengerType = "Bounty hunter"; return;
case 64: passenger.PassengerType = "On the run"; return;
case 65: passenger.PassengerType = "Wants to board the ship for some reason"; return;
case 66: passenger.PassengerType = "Hijacker or pirate"; return;
}
}
示例2: PassengerQuirk
public string PassengerQuirk(Dice random, ref bool isPatron)
{
int roll1 = random.D66();
switch (roll1)
{
case 11: return "Loyal";
case 12: return "Distracted by other worries";
case 13: return "In debt to criminals";
case 14: return "Makes very bad jokes";
case 15: return "Will betray characters";
case 16: return "Aggressive";
case 21: return "Has secret allies";
case 22: return "Secret anagathic user";
case 23: return "Looking for something";
case 24: return "Helpful";
case 25: return "Forgetful";
case 26:
isPatron = true;
return "Wants to hire the characters";
case 31: return "Has useful contacts";
case 32: return "Artistic";
case 33: return "Easily confused";
case 34: return "Unusually ugly";
case 35: return "Worried about current situation";
case 36: return "Shows pictures of children";
case 41: return "Rumor-monger";
case 42: return "Unusually provincial";
case 43: return "Drunkard or drug addict";
case 44: return "Government informant";
case 45: return "Mistakes a PC for someone else";
case 46: return "Possess unusually advanced technology";
case 51: return "Unusually handsome or beautiful";
case 52: return "Spying on the characters";
case 53: return "Possesses a TAS membership";
case 54: return "Is secretly hostile to characters";
case 55: return "Wants to borrow money";
case 56: return "Is convinced the PCs are dangerous";
case 61: return "Involved in political intrigue";
case 62: return "Has a dangerous secret";
case 63: return "Wants to get off-planet as soon as possible";
case 64: return "Attracted to a player character";
case 65: return "From offworld";
case 66: return "Possesses telepathy or other usual ability";
}
return null;
}