fix potential recursion error during maelstrom

when calling chk_win_conditions, maelstrom uses a rolemap where all players are usually '0', this is casted to a set which makes it think there is only one player
This commit is contained in:
jacob1 2017-02-23 23:43:32 -05:00
parent c64526b248
commit 268129bd9d

View File

@ -1324,9 +1324,11 @@ class MaelstromMode(GameMode):
addroles["blessed villager"] = 1
rolemap = defaultdict(list)
pcount = 0
for r,c in addroles.items():
if c > 0:
rolemap[r] = list(range(c))
rolemap[r] = list(range(pcount, pcount+c))
pcount += c
if self.chk_win_conditions(cli, rolemap, end_game=False):
return self._role_attribution(cli, var, villagers, do_templates)