Change branch condition for checking if night is over, fixes #17
chk_nightdone used to check whether the number of people seen equals the number of seers (and the same for harlot, etc.). This means night times out if the seer (etc.) leaves after seeing but before night is otherwise ended. This commit changes equals to >=, and swaps around the wolf part of that condition so that it matches the other parts.
This commit is contained in:
parent
1487256f09
commit
ed62cbbfc9
@ -1457,10 +1457,10 @@ def transition_day(cli, gameid=0):
|
|||||||
|
|
||||||
|
|
||||||
def chk_nightdone(cli):
|
def chk_nightdone(cli):
|
||||||
if (len(var.SEEN) == len(var.ROLES["seer"]) and # Seers have seen.
|
if (len(var.SEEN) >= len(var.ROLES["seer"]) and # Seers have seen.
|
||||||
len(var.HVISITED.keys()) == len(var.ROLES["harlot"]) and # harlots have visited.
|
len(var.HVISITED.keys()) >= len(var.ROLES["harlot"]) and # harlots have visited.
|
||||||
len(var.GUARDED.keys()) == len(var.ROLES["guardian angel"]) and # guardians have guarded
|
len(var.GUARDED.keys()) >= len(var.ROLES["guardian angel"]) and # guardians have guarded
|
||||||
len(var.ROLES["werecrow"]+var.ROLES["wolf"]) == len(var.KILLS)+len(var.OBSERVED) and
|
len(var.KILLS)+len(var.OBSERVED) >= len(var.ROLES["werecrow"]+var.ROLES["wolf"]) and
|
||||||
var.PHASE == "night"):
|
var.PHASE == "night"):
|
||||||
|
|
||||||
# check if wolves are actually agreeing
|
# check if wolves are actually agreeing
|
||||||
|
Loading…
Reference in New Issue
Block a user