Browse Source

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

master
jcao219 14 years ago
parent
commit
5ebcf40c8b
  1. 2
      var.py
  2. 10
      wolfgame.py

2
var.py

@ -6,7 +6,7 @@ MAX_SHOTS = 2 @@ -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

10
wolfgame.py

@ -515,12 +515,12 @@ def chk_win(cli): @@ -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): @@ -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): @@ -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):

Loading…
Cancel
Save