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:
parent
c64526b248
commit
268129bd9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user