Fix possible issue in chk_win

need to propagate rolemap/mainroles into subcalls so that checking win conds in role attribution (e.g. for random/mael) won't spuriously break
This commit is contained in:
Ryan Schmidt 2017-12-05 18:37:54 -07:00 committed by GitHub
parent 5cc45eda6d
commit 11569c75b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ def on_chk_win(evt, cli, var, rolemap, mainroles, lpl, lwolves, lrealwolves):
if lp == 0: # no alive pipers, short-circuit this check
return
uncharmed = set(get_players()) - CHARMED - pipers
uncharmed = set(get_players(mainroles=mainroles)) - CHARMED - pipers
if var.PHASE == "day" and len(uncharmed) == 0:
evt.data["winner"] = "pipers"