Modify the random game mode to allow any arbitrary role
Thanks to the previous commit, this removes the need to hardcode a wolf in, and can be anything (say, a werecrow or alpha wolf).
This commit is contained in:
parent
8016628f39
commit
05d5c39eb5
@ -699,6 +699,7 @@ class RandomMode(object):
|
|||||||
"""Completely random and hidden roles."""
|
"""Completely random and hidden roles."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.AMNESIAC_NIGHTS = 1
|
self.AMNESIAC_NIGHTS = 1
|
||||||
|
self.IGNORE_NO_WOLF = True
|
||||||
self.AMNESIAC_BLACKLIST = ["cultist"]
|
self.AMNESIAC_BLACKLIST = ["cultist"]
|
||||||
self.LOVER_WINS_WITH_FOOL = True
|
self.LOVER_WINS_WITH_FOOL = True
|
||||||
self.MAD_SCIENTIST_SKIPS_DEAD_PLAYERS = 0 # always make it happen
|
self.MAD_SCIENTIST_SKIPS_DEAD_PLAYERS = 0 # always make it happen
|
||||||
@ -708,8 +709,7 @@ class RandomMode(object):
|
|||||||
self.ROLE_INDEX = range(8, 25)
|
self.ROLE_INDEX = range(8, 25)
|
||||||
self.ROLE_GUIDE = reset_roles(self.ROLE_INDEX)
|
self.ROLE_GUIDE = reset_roles(self.ROLE_INDEX)
|
||||||
self.ROLE_GUIDE.update({
|
self.ROLE_GUIDE.update({
|
||||||
"wolf" : [1 for i in self.ROLE_INDEX],
|
"amnesiac" : [i for i in self.ROLE_INDEX],
|
||||||
"amnesiac" : [i - 1 for i in self.ROLE_INDEX],
|
|
||||||
"gunner" : [random.randrange(int(i ** 1.2 / 4)) for i in self.ROLE_INDEX],
|
"gunner" : [random.randrange(int(i ** 1.2 / 4)) for i in self.ROLE_INDEX],
|
||||||
"assassin" : [random.randrange(int(i ** 1.2 / 8)) for i in self.ROLE_INDEX],
|
"assassin" : [random.randrange(int(i ** 1.2 / 8)) for i in self.ROLE_INDEX],
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user