From e4f696abe6c24e22e7c77f7eb42cb29913c46725 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Fri, 4 Nov 2016 21:44:26 +0100 Subject: [PATCH] Fix villagergame appearing above 9p In join phase, var.PLAYERS is empty, so var.ALL_PLAYERS needs to be checked instead. (While I'm at it, changed it to <= 9 rather than < 10, just for consistency with the rest of the code.) Fixes #263. --- src/wolfgame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index ed2ae7f..7582c72 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -5915,7 +5915,7 @@ def cgamemode(cli, arg): if modeargs[0] in var.GAME_MODES.keys(): md = modeargs.pop(0) try: - if md == "default" and len(var.PLAYERS) < 10 and random.random() < var.VILLAGERGAME_CHANCE: + if md == "default" and len(var.ALL_PLAYERS) <= 9 and random.random() < var.VILLAGERGAME_CHANCE: md = "villagergame" gm = var.GAME_MODES[md][0](*modeargs) gm.startup()