Fix some things

This commit is contained in:
Vgr E. Barry 2018-05-06 00:38:20 -04:00
parent 6a7b043c3b
commit 059a06dd5b
4 changed files with 6 additions and 15 deletions

View File

@ -746,6 +746,7 @@
"join_swap_instead": " Please use '{0}swap' to join instead.", "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.", "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.", "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_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_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.", "dullahan_die_bodyguard": "Sensing danger, \u0002{2}\u0002 shoves \u0002{1}\u0002 aside to save them from \u0002{0}\u0002.",

View File

@ -26,13 +26,11 @@ def hvisit(var, wrapper, message):
return return
target = get_target(var, wrapper, re.split(" +", message)[0], not_self_message="succubus_not_self") target = get_target(var, wrapper, re.split(" +", message)[0], not_self_message="succubus_not_self")
if not target: if not target:
return return
evt = Event("targeted_command", {"target": target, "misdirection": True, "exchange": False}) evt = Event("targeted_command", {"target": target, "misdirection": True, "exchange": True})
evt.dispatch(var, wrapper.source, target) if not evt.dispatch(var, wrapper.source, target):
if evt.prevent_default:
return return
target = evt.data["target"] 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: if var.PHASE == "day" and lpl - lsuccubi == lentranced:
evt.data["winner"] = "succubi" evt.data["winner"] = "succubi"
evt.data["message"] = messages["succubus_win"].format(plural("succubus", lsuccubi), plural("has", lsuccubi), plural("master's", lsuccubi)) 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") @event_listener("exchange_roles")
def on_exchange_roles(evt, var, actor, target, actor_role, target_role): 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): def on_get_special(evt, var):
evt.data["win_stealers"].update(get_players(("succubus",))) 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") @event_listener("new_role")
def on_new_role(evt, var, user, role): def on_new_role(evt, var, user, role):
if role == "succubus" and user in ENTRANCED: if role == "succubus" and user in ENTRANCED:

View File

@ -120,9 +120,6 @@ def on_transition_day_begin(evt, var):
choice = wolves.copy() choice = wolves.copy()
elif target == "villagers": elif target == "villagers":
choice = villagers.copy() choice = villagers.copy()
evt = Event("vg_kill", {"pl": choice})
evt.dispatch(var, ghost, target)
choice = evt.data["pl"]
if choice: if choice:
KILLS[ghost] = random.choice(list(choice)) KILLS[ghost] = random.choice(list(choice))

View File

@ -320,9 +320,6 @@ HIDDEN_ROLES = frozenset({"vengeful ghost", "amnesiac"})
# These roles are win stealers, and are valid kills for vigilante # These roles are win stealers, and are valid kills for vigilante
WIN_STEALER_ROLES = frozenset({"monster", "succubus", "demoniac", "piper", "fool"}) 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 # 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 # 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([ TEMPLATE_RESTRICTIONS = OrderedDict([