guardian angel can choose not to guard anyone at night
This commit is contained in:
parent
c1a256c162
commit
cba018b5c0
@ -1342,7 +1342,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
|
||||||
@ -1444,7 +1443,7 @@ 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:
|
||||||
@ -1903,12 +1902,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