turned off some debug features and changed the winning-conditions check so that traitors are not counted as wolves (howlbot behavior)

This commit is contained in:
Jimmy Cao 2011-07-19 18:18:00 -05:00
parent c2b4fe2ab3
commit da8571f559
2 changed files with 8 additions and 4 deletions

2
var.py
View File

@ -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

View File

@ -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):