From 01924504fee61f24af3848d76a1c31c7ca116648 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 14 Nov 2016 23:33:59 -0500 Subject: [PATCH] Fix day never ending when the only votes are on the bot at day timeout --- src/wolfgame.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index 7d8f26f..5b84bb0 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -1994,6 +1994,8 @@ def chk_decision(cli, force=""): with var.GRAVEYARD_LOCK: if var.PHASE != "day": return + # Even if the lynch fails, we want to go to night phase if we are forcing a lynch (day timeout) + do_night_transision = True if force else False chan = botconfig.CHANNEL pl = set(list_players()) - (var.WOUNDED | var.CONSECRATING) evt = Event("get_voters", {"voters": pl}) @@ -2106,8 +2108,10 @@ def chk_decision(cli, force=""): cli.msg(botconfig.CHANNEL, lmsg) if not del_player(cli, votee, True, killer_role="villager", deadlist=deadlist, original=votee): break - event.data["transition_night"](cli) + do_night_transision = True break + if do_night_transision: + event.data["transition_night"](cli) @cmd("votes", pm=True, phases=("join", "day", "night")) def show_votes(cli, nick, chan, rest):