Browse Source

make traitors count for as wolves when checking for winning conditions

master
jcao219 13 years ago
parent
commit
4ab64b72ca
  1. 6
      wolfgame.py

6
wolfgame.py

@ -697,7 +697,7 @@ def chk_win(cli):
if var.PHASE == "join": if var.PHASE == "join":
return False return False
elif (len(var.ROLES["wolf"])+ elif (len(var.ROLES["wolf"])+
#len(var.ROLES["traitor"])+ Apparently not. len(var.ROLES["traitor"])+
len(var.ROLES["werecrow"])) == lpl / 2: len(var.ROLES["werecrow"])) == lpl / 2:
cli.msg(chan, ("Game over! There are the same number of wolves as "+ cli.msg(chan, ("Game over! There are the same number of wolves as "+
"villagers. The wolves eat everyone, and win.")) "villagers. The wolves eat everyone, and win."))
@ -706,7 +706,7 @@ def chk_win(cli):
village_win = False village_win = False
var.LOGGER.logBare("WOLVES", "WIN") var.LOGGER.logBare("WOLVES", "WIN")
elif (len(var.ROLES["wolf"])+ elif (len(var.ROLES["wolf"])+
#len(var.ROLES["traitor"])+ len(var.ROLES["traitor"])+
len(var.ROLES["werecrow"])) > lpl / 2: len(var.ROLES["werecrow"])) > lpl / 2:
cli.msg(chan, ("Game over! There are more wolves than "+ cli.msg(chan, ("Game over! There are more wolves than "+
"villagers. The wolves eat everyone, and win.")) "villagers. The wolves eat everyone, and win."))
@ -733,7 +733,7 @@ def chk_win(cli):
var.LOGGER.logMessage(('The villagers, during their celebrations, are '+ var.LOGGER.logMessage(('The villagers, during their celebrations, are '+
'frightened as they hear a loud howl. The wolves are '+ 'frightened as they hear a loud howl. The wolves are '+
'not gone!')) 'not gone!'))
return False return chk_win(cli)
else: else:
return False return False
stop_game(cli, "villagers" if village_win else "wolves") stop_game(cli, "villagers" if village_win else "wolves")

Loading…
Cancel
Save