Shuffle player lists sent to specials in PM
As requested by elky.
This commit is contained in:
parent
1cdf586b2a
commit
b16b1e75af
@ -2245,7 +2245,7 @@ def transition_night(cli):
|
|||||||
|
|
||||||
|
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
random.shuffle(pl)
|
||||||
pl.remove(wolf) # remove self from list
|
pl.remove(wolf) # remove self from list
|
||||||
for i, player in enumerate(pl):
|
for i, player in enumerate(pl):
|
||||||
if player in var.ROLES["wolf"]:
|
if player in var.ROLES["wolf"]:
|
||||||
@ -2254,11 +2254,12 @@ def transition_night(cli):
|
|||||||
pl[i] = player + " (traitor)"
|
pl[i] = player + " (traitor)"
|
||||||
elif player in var.ROLES["werecrow"]:
|
elif player in var.ROLES["werecrow"]:
|
||||||
pl[i] = player + " (werecrow)"
|
pl[i] = player + " (werecrow)"
|
||||||
|
|
||||||
pm(cli, wolf, "Players: "+", ".join(pl))
|
pm(cli, wolf, "Players: "+", ".join(pl))
|
||||||
|
|
||||||
for seer in var.ROLES["seer"]:
|
for seer in var.ROLES["seer"]:
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
random.shuffle(pl)
|
||||||
pl.remove(seer) # remove self from list
|
pl.remove(seer) # remove self from list
|
||||||
|
|
||||||
if seer in var.PLAYERS and var.PLAYERS[seer]["cloak"] not in var.SIMPLE_NOTIFY:
|
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"]:
|
for harlot in var.ROLES["harlot"]:
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
random.shuffle(pl)
|
||||||
pl.remove(harlot)
|
pl.remove(harlot)
|
||||||
if harlot in var.PLAYERS and var.PLAYERS[harlot]["cloak"] not in var.SIMPLE_NOTIFY:
|
if harlot in var.PLAYERS and var.PLAYERS[harlot]["cloak"] not in var.SIMPLE_NOTIFY:
|
||||||
cli.msg(harlot, ('You are a \u0002harlot\u0002. '+
|
cli.msg(harlot, ('You are a \u0002harlot\u0002. '+
|
||||||
@ -2285,7 +2286,7 @@ def transition_night(cli):
|
|||||||
|
|
||||||
for g_angel in var.ROLES["guardian angel"]:
|
for g_angel in var.ROLES["guardian angel"]:
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
random.shuffle(pl)
|
||||||
pl.remove(g_angel)
|
pl.remove(g_angel)
|
||||||
if g_angel in var.PLAYERS and var.PLAYERS[g_angel]["cloak"] not in var.SIMPLE_NOTIFY:
|
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. '+
|
cli.msg(g_angel, ('You are a \u0002guardian angel\u0002. '+
|
||||||
@ -2298,7 +2299,7 @@ def transition_night(cli):
|
|||||||
|
|
||||||
for dttv in var.ROLES["detective"]:
|
for dttv in var.ROLES["detective"]:
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
random.shuffle(pl)
|
||||||
pl.remove(dttv)
|
pl.remove(dttv)
|
||||||
if dttv in var.PLAYERS and var.PLAYERS[dttv]["cloak"] not in var.SIMPLE_NOTIFY:
|
if dttv in var.PLAYERS and var.PLAYERS[dttv]["cloak"] not in var.SIMPLE_NOTIFY:
|
||||||
cli.msg(dttv, ("You are a \u0002detective\u0002.\n"+
|
cli.msg(dttv, ("You are a \u0002detective\u0002.\n"+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user