From cc25784ad47b085a1ffaa8edbd5e249c979df197 Mon Sep 17 00:00:00 2001 From: skizzerz Date: Sat, 19 Jul 2014 18:06:39 -0500 Subject: [PATCH] Allow 0 wolf kills at night. Closes #33 --- modules/wolfgame.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index c3cb37d..191bb9c 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -2202,9 +2202,11 @@ def chk_nightdone(cli): else: kills.add(ls) # check if wolves are actually agreeing - if not var.ANGRY_WOLVES and len(kills) != 1: + # allow len(kills) == 0 through as that means that crow was dumb and observed instead + # of killing or something, or weird cases where there are no wolves at night + if not var.ANGRY_WOLVES and len(kills) > 1: return - elif var.ANGRY_WOLVES and len(kills) != 2: + elif var.ANGRY_WOLVES and (len(kills) == 1 or len(kills) > 2): return for x, t in var.TIMERS.items():