Merge pull request #39 from jacob1/master
This commit is contained in:
commit
14aca5ee64
@ -1364,7 +1364,6 @@ def begin_day(cli):
|
|||||||
|
|
||||||
# Reset nighttime variables
|
# Reset nighttime variables
|
||||||
var.KILLS = {} # nicknames of kill victim
|
var.KILLS = {} # nicknames of kill victim
|
||||||
var.GUARDED = ""
|
|
||||||
var.KILLER = "" # nickname of who chose the victim
|
var.KILLER = "" # nickname of who chose the victim
|
||||||
var.SEEN = [] # list of seers that have had visions
|
var.SEEN = [] # list of seers that have had visions
|
||||||
var.OBSERVED = {} # those whom werecrows have observed
|
var.OBSERVED = {} # those whom werecrows have observed
|
||||||
@ -1466,15 +1465,19 @@ def transition_day(cli, gameid=0):
|
|||||||
var.LOGGER.logBare(victim, "WOLVESVICTIM", *[y for x,y in var.KILLS.items() if x == victim])
|
var.LOGGER.logBare(victim, "WOLVESVICTIM", *[y for x,y in var.KILLS.items() if x == victim])
|
||||||
for crow, target in iter(var.OBSERVED.items()):
|
for crow, target in iter(var.OBSERVED.items()):
|
||||||
if ((target in list(var.HVISITED.keys()) and var.HVISITED[target]) or # if var.HVISITED[target] is None, harlot visited self
|
if ((target in list(var.HVISITED.keys()) and var.HVISITED[target]) or # if var.HVISITED[target] is None, harlot visited self
|
||||||
target in var.SEEN+list(var.GUARDED.keys())):
|
target in var.SEEN or (target in list(var.GUARDED.keys()) and var.GUARDED[target])):
|
||||||
pm(cli, crow, ("As the sun rises, you conclude that \u0002{0}\u0002 was not in "+
|
pm(cli, crow, ("As the sun rises, you conclude that \u0002{0}\u0002 was not in "+
|
||||||
"bed all night, and you fly back to your house.").format(target))
|
"bed all night, and you fly back to your house.").format(target))
|
||||||
else:
|
else:
|
||||||
pm(cli, crow, ("As the sun rises, you conclude that \u0002{0}\u0002 was sleeping "+
|
pm(cli, crow, ("As the sun rises, you conclude that \u0002{0}\u0002 was sleeping "+
|
||||||
"all night long, and you fly back to your house.").format(target))
|
"all night long, and you fly back to your house.").format(target))
|
||||||
if victim in var.GUARDED.values():
|
if victim in var.GUARDED.values():
|
||||||
message.append(("\u0002{0}\u0002 was attacked by the wolves last night, but luckily, the "+
|
for gangel in var.ROLES["guardian angel"]:
|
||||||
"guardian angel was on duty.").format(victim))
|
if var.GUARDED.get(gangel) == victim:
|
||||||
|
dead.append(gangel)
|
||||||
|
message.append(("\u0002{0}\u0002 sacrificed their life to the wolves to "+
|
||||||
|
"guard that of another").format(gangel))
|
||||||
|
break
|
||||||
victim = ""
|
victim = ""
|
||||||
elif not victim:
|
elif not victim:
|
||||||
message.append(random.choice(var.NO_VICTIMS_MESSAGES) +
|
message.append(random.choice(var.NO_VICTIMS_MESSAGES) +
|
||||||
@ -1921,12 +1924,13 @@ def guard(cli, nick, rest):
|
|||||||
return
|
return
|
||||||
victim = pl[pll.index(target)]
|
victim = pl[pll.index(target)]
|
||||||
if victim == nick:
|
if victim == nick:
|
||||||
pm(cli, nick, "You may not guard yourself.")
|
var.GUARDED[nick] = None
|
||||||
return
|
pm(cli, nick, "You have chosen not to guard anyone tonight.")
|
||||||
var.GUARDED[nick] = victim
|
else:
|
||||||
pm(cli, nick, "You are protecting \u0002{0}\u0002 tonight. Farewell!".format(var.GUARDED[nick]))
|
var.GUARDED[nick] = victim
|
||||||
pm(cli, var.GUARDED[nick], "You can sleep well tonight, for a guardian angel is protecting you.")
|
pm(cli, nick, "You are protecting \u0002{0}\u0002 tonight. Farewell!".format(var.GUARDED[nick]))
|
||||||
var.LOGGER.logBare(var.GUARDED[nick], "GUARDED", nick)
|
pm(cli, var.GUARDED[nick], "You can sleep well tonight, for a guardian angel is protecting you.")
|
||||||
|
var.LOGGER.logBare(var.GUARDED[nick], "GUARDED", nick)
|
||||||
chk_nightdone(cli)
|
chk_nightdone(cli)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user