From 71fd4acb8af601f15031fb842a42b7019db4942e Mon Sep 17 00:00:00 2001 From: skizzerz Date: Sun, 2 Nov 2014 21:36:39 -0600 Subject: [PATCH] Fix how !stats interacts with amensiac --- modules/wolfgame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index e36c830..b7db7d7 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -700,6 +700,8 @@ def stats(cli, nick, chan, rest): amnrole = "villager" elif amnrole == "vengeful ghost": amnrole = var.DEFAULT_ROLE + elif amnrole == "traitor" and var.HIDDEN_TRAITOR: + amnrole = var.DEFAULT_ROLE if amnrole != "amnesiac": amn_roles["amnesiac"] += 1 if amnrole in amn_roles: @@ -712,8 +714,6 @@ def stats(cli, nick, chan, rest): if role in ("village elder", "time lord", "vengeful ghost") or role in var.TEMPLATE_RESTRICTIONS.keys(): continue count = len(var.ROLES[role]) - # TODO: should we do anything special with amnesiac counts? Right now you can pretty easily - # figure out what role an amnesiac is by doing !stats and seeing which numbers are low if role == "traitor" and var.HIDDEN_TRAITOR: continue elif role == var.DEFAULT_ROLE: @@ -729,7 +729,7 @@ def stats(cli, nick, chan, rest): count += amn_roles[role] if count > 1 or count == 0: - if count == 0 and role not in var.ORIGINAL_ROLES: + if count == 0 and len(var.ORIGINAL_ROLES[role]) == 0: continue message.append("\u0002{0}\u0002 {1}".format(count if count else "\u0002no\u0002", var.plural(role))) else: