From b16b1e75afac7b90cb5d15bb779f6c4b991e7d60 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Wed, 7 May 2014 12:40:08 +0200 Subject: [PATCH] Shuffle player lists sent to specials in PM As requested by elky. --- modules/wolfgame.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 90f2054..380a817 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -2245,7 +2245,7 @@ def transition_night(cli): pl = ps[:] - pl.sort(key=lambda x: x.lower()) + random.shuffle(pl) pl.remove(wolf) # remove self from list for i, player in enumerate(pl): if player in var.ROLES["wolf"]: @@ -2254,11 +2254,12 @@ def transition_night(cli): pl[i] = player + " (traitor)" elif player in var.ROLES["werecrow"]: pl[i] = player + " (werecrow)" + pm(cli, wolf, "Players: "+", ".join(pl)) for seer in var.ROLES["seer"]: pl = ps[:] - pl.sort(key=lambda x: x.lower()) + random.shuffle(pl) pl.remove(seer) # remove self from list if seer in var.PLAYERS and var.PLAYERS[seer]["cloak"] not in var.SIMPLE_NOTIFY: @@ -2272,7 +2273,7 @@ def transition_night(cli): for harlot in var.ROLES["harlot"]: pl = ps[:] - pl.sort(key=lambda x: x.lower()) + random.shuffle(pl) pl.remove(harlot) if harlot in var.PLAYERS and var.PLAYERS[harlot]["cloak"] not in var.SIMPLE_NOTIFY: cli.msg(harlot, ('You are a \u0002harlot\u0002. '+ @@ -2285,7 +2286,7 @@ def transition_night(cli): for g_angel in var.ROLES["guardian angel"]: pl = ps[:] - pl.sort(key=lambda x: x.lower()) + random.shuffle(pl) pl.remove(g_angel) if g_angel in var.PLAYERS and var.PLAYERS[g_angel]["cloak"] not in var.SIMPLE_NOTIFY: cli.msg(g_angel, ('You are a \u0002guardian angel\u0002. '+ @@ -2298,7 +2299,7 @@ def transition_night(cli): for dttv in var.ROLES["detective"]: pl = ps[:] - pl.sort(key=lambda x: x.lower()) + random.shuffle(pl) pl.remove(dttv) if dttv in var.PLAYERS and var.PLAYERS[dttv]["cloak"] not in var.SIMPLE_NOTIFY: cli.msg(dttv, ("You are a \u0002detective\u0002.\n"+