From 05d5c39eb5c4574a2d4495f5ca298f712f465ab6 Mon Sep 17 00:00:00 2001 From: "Vgr E.Barry" Date: Sun, 22 Mar 2015 09:33:16 -0400 Subject: [PATCH] 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). --- settings/wolfgame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/wolfgame.py b/settings/wolfgame.py index fcc1948..541f439 100644 --- a/settings/wolfgame.py +++ b/settings/wolfgame.py @@ -699,6 +699,7 @@ class RandomMode(object): """Completely random and hidden roles.""" def __init__(self): self.AMNESIAC_NIGHTS = 1 + self.IGNORE_NO_WOLF = True self.AMNESIAC_BLACKLIST = ["cultist"] self.LOVER_WINS_WITH_FOOL = True 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_GUIDE = reset_roles(self.ROLE_INDEX) self.ROLE_GUIDE.update({ - "wolf" : [1 for i in self.ROLE_INDEX], - "amnesiac" : [i - 1 for i in self.ROLE_INDEX], + "amnesiac" : [i 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], })