From 5ebcf40c8bb345a175327e5a7616789921b39c17 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 19 Jul 2011 18:18:00 -0500 Subject: [PATCH] turned off some debug features and changed the winning-conditions check so that traitors are not counted as wolves (howlbot behavior) --- var.py | 2 +- wolfgame.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/var.py b/var.py index ac795b7..8b73fef 100644 --- a/var.py +++ b/var.py @@ -6,7 +6,7 @@ MAX_SHOTS = 2 MAX_PLAYERS = 30 DRUNK_SHOTS_MULTIPLIER = 3 NIGHT_TIME_LIMIT = 90 -DAY_TIME_LIMIT = 333 +DAY_TIME_LIMIT = 0 START_WITH_DAY = False KILL_IDLE_TIME = 0 #300 WARN_IDLE_TIME = 0 #180 diff --git a/wolfgame.py b/wolfgame.py index 67ed41c..15921ea 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -515,12 +515,12 @@ def chk_win(cli): if var.PHASE == "join": return False elif (len(var.ROLES["wolf"])+ - len(var.ROLES["traitor"])+ + #len(var.ROLES["traitor"])+ Apparently not. 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.")) 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.")) @@ -1556,7 +1556,7 @@ def transition_night(cli): "If you did not receive one, simply sit back, "+ "relax, and wait patiently for morning.")) - cli.msg(chan, "DEBUG: "+str(var.ROLES)) + # cli.msg(chan, "DEBUG: "+str(var.ROLES)) if not var.ROLES["wolf"]: # Probably something interesting going on. chk_nightdone(cli) chk_traitor(cli) @@ -1817,6 +1817,10 @@ def reset_game(cli, nick, chan, rest): def pm_rules(cli, nick, rest): cli.msg(nick, var.RULES) +@cmd("rules") +def show_rules(cli, nick, chan, rest): + cli.msg(chan, var.RULES) + @pmcmd("help", raw_nick = True) def help(cli, rnick, rest):