fully implement !simple
This commit is contained in:
parent
ec8c9fb5d1
commit
750d5c55dc
@ -2006,20 +2006,25 @@ def transition_night(cli):
|
|||||||
ps = var.list_players()
|
ps = var.list_players()
|
||||||
wolves = var.ROLES["wolf"]+var.ROLES["traitor"]+var.ROLES["werecrow"]
|
wolves = var.ROLES["wolf"]+var.ROLES["traitor"]+var.ROLES["werecrow"]
|
||||||
for wolf in wolves:
|
for wolf in wolves:
|
||||||
if wolf in var.ROLES["wolf"]:
|
if wolf in var.PLAYERS and var.PLAYERS[wolf]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
cli.msg(wolf, ('You are a \u0002wolf\u0002. It is your job to kill all the '+
|
if wolf in var.ROLES["wolf"]:
|
||||||
'villagers. Use "kill <nick>" to kill a villager.'))
|
cli.msg(wolf, ('You are a \u0002wolf\u0002. It is your job to kill all the '+
|
||||||
elif wolf in var.ROLES["traitor"]:
|
'villagers. Use "kill <nick>" to kill a villager.'))
|
||||||
cli.msg(wolf, ('You are a \u0002traitor\u0002. You are exactly like a '+
|
elif wolf in var.ROLES["traitor"]:
|
||||||
'villager and not even a seer can see your true identity. '+
|
cli.msg(wolf, ('You are a \u0002traitor\u0002. You are exactly like a '+
|
||||||
'Only detectives can. '))
|
'villager and not even a seer can see your true identity. '+
|
||||||
|
'Only detectives can. '))
|
||||||
|
else:
|
||||||
|
cli.msg(wolf, ('You are a \u0002werecrow\u0002. You are able to fly at night. '+
|
||||||
|
'Use "kill <nick>" to kill a a villager. Alternatively, you can '+
|
||||||
|
'use "observe <nick>" to check if someone is in bed or not. '+
|
||||||
|
'Observing will prevent you from participating in a killing.'))
|
||||||
|
if len(wolves) > 1:
|
||||||
|
cli.msg(wolf, 'Also, if you PM me, your message will be relayed to other wolves.')
|
||||||
else:
|
else:
|
||||||
cli.msg(wolf, ('You are a \u0002werecrow\u0002. You are able to fly at night. '+
|
cli.msg(wolf, "You are a \02{0}\02.".format(var.get_role(wolf))) # !simple
|
||||||
'Use "kill <nick>" to kill a a villager. Alternatively, you can '+
|
|
||||||
'use "observe <nick>" to check if someone is in bed or not. '+
|
|
||||||
'Observing will prevent you from participating in a killing.'))
|
|
||||||
if len(wolves) > 1:
|
|
||||||
cli.msg(wolf, 'Also, if you PM me, your message will be relayed to other wolves.')
|
|
||||||
pl = ps[:]
|
pl = ps[:]
|
||||||
pl.sort(key=lambda x: x.lower())
|
pl.sort(key=lambda x: x.lower())
|
||||||
pl.remove(wolf) # remove self from list
|
pl.remove(wolf) # remove self from list
|
||||||
@ -2033,45 +2038,58 @@ def transition_night(cli):
|
|||||||
cli.msg(wolf, "\u0002Players:\u0002 "+", ".join(pl))
|
cli.msg(wolf, "\u0002Players:\u0002 "+", ".join(pl))
|
||||||
|
|
||||||
for seer in var.ROLES["seer"]:
|
for seer in var.ROLES["seer"]:
|
||||||
pl = ps[:]
|
if seer in var.PLAYERS and var.PLAYERS[seer]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
pl.sort(key=lambda x: x.lower())
|
pl = ps[:]
|
||||||
pl.remove(seer) # remove self from list
|
pl.sort(key=lambda x: x.lower())
|
||||||
cli.msg(seer, ('You are a \u0002seer\u0002. '+
|
pl.remove(seer) # remove self from list
|
||||||
'It is your job to detect the wolves, you '+
|
cli.msg(seer, ('You are a \u0002seer\u0002. '+
|
||||||
'may have a vision once per night. '+
|
'It is your job to detect the wolves, you '+
|
||||||
'Use "see <nick>" to see the role of a player.'))
|
'may have a vision once per night. '+
|
||||||
|
'Use "see <nick>" to see the role of a player.'))
|
||||||
|
else:
|
||||||
|
cli.msg(seer, "You are a \02seer\02.") # !simple
|
||||||
cli.msg(seer, "Players: "+", ".join(pl))
|
cli.msg(seer, "Players: "+", ".join(pl))
|
||||||
|
|
||||||
for harlot in var.ROLES["harlot"]:
|
for harlot in var.ROLES["harlot"]:
|
||||||
pl = ps[:]
|
if harlot in var.PLAYERS and var.PLAYERS[harlot]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
pl.sort(key=lambda x: x.lower())
|
pl = ps[:]
|
||||||
pl.remove(harlot)
|
pl.sort(key=lambda x: x.lower())
|
||||||
cli.msg(harlot, ('You are a \u0002harlot\u0002. '+
|
pl.remove(harlot)
|
||||||
'You may spend the night with one person per round. '+
|
cli.msg(harlot, ('You are a \u0002harlot\u0002. '+
|
||||||
'If you visit a victim of a wolf, or visit a wolf, '+
|
'You may spend the night with one person per round. '+
|
||||||
'you will die. Use !visit to visit a player.'))
|
'If you visit a victim of a wolf, or visit a wolf, '+
|
||||||
|
'you will die. Use !visit to visit a player.'))
|
||||||
|
else:
|
||||||
|
cli.msg(harlot, "You are a \02harlot\02.") # !simple
|
||||||
cli.msg(harlot, "Players: "+", ".join(pl))
|
cli.msg(harlot, "Players: "+", ".join(pl))
|
||||||
|
|
||||||
for g_angel in var.ROLES["guardian angel"]:
|
for g_angel in var.ROLES["guardian angel"]:
|
||||||
pl = ps[:]
|
if g_angel in var.PLAYERS and var.PLAYERS[g_angel]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
pl.sort(key=lambda x: x.lower())
|
pl = ps[:]
|
||||||
pl.remove(g_angel)
|
pl.sort(key=lambda x: x.lower())
|
||||||
cli.msg(g_angel, ('You are a \u0002guardian angel\u0002. '+
|
pl.remove(g_angel)
|
||||||
'It is your job to protect the villagers. If you guard a'+
|
cli.msg(g_angel, ('You are a \u0002guardian angel\u0002. '+
|
||||||
' wolf, there is a 50/50 chance of you dying, if you guard '+
|
'It is your job to protect the villagers. If you guard a'+
|
||||||
'a victim, they will live. Use !guard to guard a player.'));
|
' wolf, there is a 50/50 chance of you dying, if you guard '+
|
||||||
|
'a victim, they will live. Use !guard to guard a player.'))
|
||||||
|
else:
|
||||||
|
cli.msg(g_angel, "You are a \02guardian angel\02.") # !simple
|
||||||
cli.msg(g_angel, "Players: " + ", ".join(pl))
|
cli.msg(g_angel, "Players: " + ", ".join(pl))
|
||||||
|
|
||||||
for dttv in var.ROLES["detective"]:
|
for dttv in var.ROLES["detective"]:
|
||||||
pl = ps[:]
|
if dttv in var.PLAYERS and var.PLAYERS[dttv]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
pl.sort(key=lambda x: x.lower())
|
pl = ps[:]
|
||||||
pl.remove(dttv)
|
pl.sort(key=lambda x: x.lower())
|
||||||
cli.msg(dttv, ("You are a \u0002detective\u0002.\n"+
|
pl.remove(dttv)
|
||||||
"It is your job to determine all the wolves and traitors. "+
|
cli.msg(dttv, ("You are a \u0002detective\u0002.\n"+
|
||||||
"Your job is during the day, and you can see the true "+
|
"It is your job to determine all the wolves and traitors. "+
|
||||||
"identity of all users, even traitors.\n"+
|
"Your job is during the day, and you can see the true "+
|
||||||
"But, each time you use your ability, you risk a 2/5 "+
|
"identity of all users, even traitors.\n"+
|
||||||
"chance of having your identity revealed to the wolves. So be "+
|
"But, each time you use your ability, you risk a 2/5 "+
|
||||||
"careful. Use \"!id\" to identify any player during the day."))
|
"chance of having your identity revealed to the wolves. So be "+
|
||||||
|
"careful. Use \"!id\" to identify any player during the day."))
|
||||||
|
else:
|
||||||
|
cli.msg(dttv, "You are a \02detective\02.") # !simple
|
||||||
cli.msg(dttv, "Players: " + ", ".join(pl))
|
cli.msg(dttv, "Players: " + ", ".join(pl))
|
||||||
for d in var.ROLES["village drunk"]:
|
for d in var.ROLES["village drunk"]:
|
||||||
if var.FIRST_NIGHT:
|
if var.FIRST_NIGHT:
|
||||||
@ -2082,9 +2100,12 @@ def transition_night(cli):
|
|||||||
continue
|
continue
|
||||||
elif not var.GUNNERS[g]:
|
elif not var.GUNNERS[g]:
|
||||||
continue
|
continue
|
||||||
gun_msg = ("You hold a gun that shoots special silver bullets. You may only use it "+
|
if g in var.PLAYERS and var.PLAYERS[g]["cloak"] not in var.SIMPLE_ROLE_NOTIFY:
|
||||||
"during the day. If you shoot a wolf, (s)he will die instantly, but if you "+
|
gun_msg = ("You hold a gun that shoots special silver bullets. You may only use it "+
|
||||||
"shoot a villager, that villager will likely survive. You get {0}.")
|
"during the day. If you shoot a wolf, (s)he will die instantly, but if you "+
|
||||||
|
"shoot a villager, that villager will likely survive. You get {0}.")
|
||||||
|
else:
|
||||||
|
gun_msg = ("You have a \02gun\02 with {0}.")
|
||||||
if var.GUNNERS[g] == 1:
|
if var.GUNNERS[g] == 1:
|
||||||
gun_msg = gun_msg.format("1 bullet")
|
gun_msg = gun_msg.format("1 bullet")
|
||||||
elif var.GUNNERS[g] > 1:
|
elif var.GUNNERS[g] > 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user