From 059a06dd5b7766c806ec49c9078bb1d9fed4002f Mon Sep 17 00:00:00 2001 From: "Vgr E. Barry" Date: Sun, 6 May 2018 00:38:20 -0400 Subject: [PATCH] Fix some things --- messages/en.json | 1 + src/roles/succubus.py | 14 +++++--------- src/roles/vengefulghost.py | 3 --- src/settings.py | 3 --- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/messages/en.json b/messages/en.json index 18adca6..118322b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -746,6 +746,7 @@ "join_swap_instead": " Please use '{0}swap' to join instead.", "demoniac_win": "Game over! All the wolves are dead! As the villagers start preparing the BBQ, a sudden flash illuminates the sky. Demonic spirits emerge around the sacrificed wolves and possess all villagers, causing the demoniac{0} to win.", "succubus_win": "Game over! The {0} {1} completely enthralled the village, making them officers in an ever-growing army set on spreading their {2} control and influence throughout the entire world.", + "entranced_win": "Game over! All of the succubi are dead, but their servants remain. They regroup and summon a new succubus to serve.", "dullahan_die_totem": "Before dying, \u0002{0}\u0002 snaps a whip made of a human spine at \u0002{1}\u0002; however, {1}'s totem emits a brilliant flash of light, causing the attempt to miss.", "dullahan_die_angel": "Before dying, \u0002{0}\u0002 snaps a whip made of a human spine at \u0002{1}\u0002; however, a guardian angel was on duty and able to foil the attempt.", "dullahan_die_bodyguard": "Sensing danger, \u0002{2}\u0002 shoves \u0002{1}\u0002 aside to save them from \u0002{0}\u0002.", diff --git a/src/roles/succubus.py b/src/roles/succubus.py index b2947e9..30a4c9f 100644 --- a/src/roles/succubus.py +++ b/src/roles/succubus.py @@ -26,13 +26,11 @@ def hvisit(var, wrapper, message): return target = get_target(var, wrapper, re.split(" +", message)[0], not_self_message="succubus_not_self") - if not target: return - evt = Event("targeted_command", {"target": target, "misdirection": True, "exchange": False}) - evt.dispatch(var, wrapper.source, target) - if evt.prevent_default: + evt = Event("targeted_command", {"target": target, "misdirection": True, "exchange": True}) + if not evt.dispatch(var, wrapper.source, target): return target = evt.data["target"] @@ -93,6 +91,9 @@ def on_chk_win(evt, var, rolemap, mainroles, lpl, lwolves, lrealwolves): if var.PHASE == "day" and lpl - lsuccubi == lentranced: evt.data["winner"] = "succubi" evt.data["message"] = messages["succubus_win"].format(plural("succubus", lsuccubi), plural("has", lsuccubi), plural("master's", lsuccubi)) + elif not lsuccubi and lentranced and var.PHASE == "day" and lpl == lentranced: + evt.data["winner"] = "succubi" + evt.data["message"] = messages["entranced_win"] @event_listener("exchange_roles") def on_exchange_roles(evt, var, actor, target, actor_role, target_role): @@ -194,11 +195,6 @@ def on_begin_day(evt, var): def on_get_special(evt, var): evt.data["win_stealers"].update(get_players(("succubus",))) -@event_listener("vg_kill") -def on_vg_kill(evt, var, ghost, target): - if ghost in ENTRANCED: - evt.data["pl"] -= get_all_players(("succubus",)) - @event_listener("new_role") def on_new_role(evt, var, user, role): if role == "succubus" and user in ENTRANCED: diff --git a/src/roles/vengefulghost.py b/src/roles/vengefulghost.py index 9d621bd..77a9854 100644 --- a/src/roles/vengefulghost.py +++ b/src/roles/vengefulghost.py @@ -120,9 +120,6 @@ def on_transition_day_begin(evt, var): choice = wolves.copy() elif target == "villagers": choice = villagers.copy() - evt = Event("vg_kill", {"pl": choice}) - evt.dispatch(var, ghost, target) - choice = evt.data["pl"] if choice: KILLS[ghost] = random.choice(list(choice)) diff --git a/src/settings.py b/src/settings.py index 1eeae7f..0420a0f 100644 --- a/src/settings.py +++ b/src/settings.py @@ -320,9 +320,6 @@ HIDDEN_ROLES = frozenset({"vengeful ghost", "amnesiac"}) # These roles are win stealers, and are valid kills for vigilante WIN_STEALER_ROLES = frozenset({"monster", "succubus", "demoniac", "piper", "fool"}) -# these totems are beneficial for the *receiving* person, but can be detrimental to someone else acting on the receiver! -BENEFICIAL_TOTEMS = frozenset({"protection", "revealing", "desperation", "influence", "luck", "pestilence", "retribution"}) - # The roles in here are considered templates and will be applied on TOP of other roles. The restrictions are a list of roles that they CANNOT be applied to # NB: if you want a template to apply to everyone, list it here but make the restrictions an empty set. Templates not listed here are considered full roles instead TEMPLATE_RESTRICTIONS = OrderedDict([