From d675f3183c9855a504240a19c4d4611f863548b8 Mon Sep 17 00:00:00 2001 From: skizzerz Date: Fri, 25 Aug 2017 17:01:53 -0500 Subject: [PATCH] Fix hunter prematurely ending night. Idea: let's NOT mess with how the game logic is laid out unless you can mathematically prove that your new cool shorthand way of doing things is exactly equivalent to the old way. --- src/roles/hunter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/roles/hunter.py b/src/roles/hunter.py index 6497bde..c871f5e 100644 --- a/src/roles/hunter.py +++ b/src/roles/hunter.py @@ -127,7 +127,8 @@ def on_exchange(evt, cli, var, actor, nick, actor_role, nick_role): @event_listener("chk_nightdone") def on_chk_nightdone(evt, cli, var): evt.data["actedcount"] += len(KILLS) + len(PASSED) - evt.data["nightroles"].extend([p for p in var.ROLES["hunter"] if users._get(p) not in (HUNTERS | KILLS.keys())]) # FIXME + hunter_users = (users._get(p) for p in var.ROLES["hunter"]) # FIXME + evt.data["nightroles"].extend([p for p in hunter_users if p not in HUNTERS or p in KILLS]) @event_listener("transition_night_end", priority=2) def on_transition_night_end(evt, cli, var):