From 4ab64b72cac657bc66f362c21f1098b9d8f02e63 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 9 Aug 2011 14:18:01 -0500 Subject: [PATCH] make traitors count for as wolves when checking for winning conditions --- wolfgame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfgame.py b/wolfgame.py index 216f8c1..64839ca 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -697,7 +697,7 @@ def chk_win(cli): if var.PHASE == "join": return False elif (len(var.ROLES["wolf"])+ - #len(var.ROLES["traitor"])+ Apparently not. + len(var.ROLES["traitor"])+ len(var.ROLES["werecrow"])) == lpl / 2: cli.msg(chan, ("Game over! There are the same number of wolves as "+ "villagers. The wolves eat everyone, and win.")) @@ -706,7 +706,7 @@ def chk_win(cli): village_win = False var.LOGGER.logBare("WOLVES", "WIN") elif (len(var.ROLES["wolf"])+ - #len(var.ROLES["traitor"])+ + len(var.ROLES["traitor"])+ len(var.ROLES["werecrow"])) > lpl / 2: cli.msg(chan, ("Game over! There are more wolves than "+ "villagers. The wolves eat everyone, and win.")) @@ -733,7 +733,7 @@ def chk_win(cli): var.LOGGER.logMessage(('The villagers, during their celebrations, are '+ 'frightened as they hear a loud howl. The wolves are '+ 'not gone!')) - return False + return chk_win(cli) else: return False stop_game(cli, "villagers" if village_win else "wolves")