Advertisement
Fissioninferno

Werewolf randomizer

Oct 22nd, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.38 KB | None | 0 0
  1. import random
  2.  
  3. print ("""                                  ,ood8888booo,\n\
  4.                              ,od8           8bo,\n\
  5.                           ,od                   bo,\n\
  6.                         ,d8                       8b, \n\
  7.                        ,o                           o,    ,a8b    \n\
  8.                       ,8                             8,,od8  8    \n\
  9.                       8'                             d8'     8b   \n\
  10.                       8                           d8'ba     aP'   \n\
  11.                       Y,                       o8'         aP'    \n\
  12.                        Y8,                      YaaaP'    ba      \n\
  13.                         Y8o                   Y8'         88      \n\
  14.                          `Y8               ,8"           `P      \n\
  15.                            Y8o        ,d8P'              ba      \n\
  16.                       ooood8888888P\"""'                  P'     \n\
  17.                    ,od                                  8       \n\
  18.                 ,dP     o88o                           o'       \n\
  19.                ,dP          8                          8        \n\
  20.               ,d'   oo       8                       ,8         \n\
  21.               $    d$"8      8           Y    Y  o   8          \n\
  22.              d    d  d8    od  ""boooooooob   d"" 8   8         \n\
  23.              $    8  d   ood' ,   8        b  8   '8  b         \n\
  24.              $   $  8  8     d  d8        `b  d    '8  b        \n\
  25.               $  $ 8   b    Y  d8          8 ,P     '8  b       \n\
  26.               `$$  Yb  b     8b 8b         8 8,      '8  o,     \n\
  27.                    `Y  b      8o  $$o      d  b        b   $o   \n\
  28.                     8   '$     8$,,$"      $   $o      '$o$$    \n\
  29.                     $o$$P"                 $$o$  """)
  30.  
  31. roleList = list(["Wolf", #1
  32.                  "Seer", #2
  33.                  "Guardian", #3
  34.                  "Angel", #4
  35.                  "Traitor", #5
  36.                  "Villager", #6
  37.                  "Villager", #7
  38.                  "Villager", #8
  39.                  "Villager", #9
  40.                  "Villager", #10
  41.                  "Ghost", #11
  42.                  "Wolf", #12
  43.                  "Cupid", #13
  44.                  "Fool", #14
  45.                  "Villager", #15
  46.                  "Villager", #16
  47.                  "Wolf", #17
  48.                  "Villager", #18
  49.                  "Villager", #19
  50.                  "Villager", #20
  51.                  "Villager", #21
  52.                  "Devil", #22
  53.                  "Wolf", #23
  54.                  "Guardian" #24
  55.                  ])
  56.    
  57. print ("Welcome to the Python Werewolf game generator.\n")
  58. numPlayers = int (input ("How many people are playing? "))
  59.    
  60. print ("\n", numPlayers, " people are playing.\n\
  61. Enter their names, one per line:")
  62.  
  63. listpos = 0
  64. playerList = list([])
  65.  
  66. while listpos < numPlayers:
  67.     listpos = listpos + 1
  68.     playerList.append(input())
  69.  
  70. print()
  71.  
  72. random.shuffle (playerList)
  73. listpos = 0
  74.  
  75. playerfile = open("playerlist.txt", "w")
  76.  
  77. for i in roleList:
  78.     curstr = " %s is a %s \n" % (playerList[listpos], i)
  79.     print (curstr,end="")
  80.     playerfile.write(curstr)
  81.     listpos = listpos + 1
  82.     if listpos >= numPlayers:
  83.         break
  84.  
  85. playerfile.close()
  86.  
  87. print ("\nThese have also been printed to playerlist.txt \n\
  88. Thanks for using the tool, hit enter to exit. :3")
  89.  
  90. input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement