Some succubus fixes

This commit is contained in:
Vgr E. Barry 2015-10-29 00:06:00 -04:00
parent e3ad8a24db
commit 3571d664ed
2 changed files with 36 additions and 25 deletions

View File

@ -260,8 +260,8 @@ SEEN_WOLF = WOLF_ROLES | {"monster", "mad scientist", "succubus"}
SEEN_DEFAULT = frozenset({"traitor", "hag", "sorcerer", "time lord", "villager", "cultist", "minion", "turncoat", "amnesiac", SEEN_DEFAULT = frozenset({"traitor", "hag", "sorcerer", "time lord", "villager", "cultist", "minion", "turncoat", "amnesiac",
"vengeful ghost", "lycan", "clone", "fool", "jester", "werekitten", "warlock", "piper", "doomsayer", "demoniac"}) "vengeful ghost", "lycan", "clone", "fool", "jester", "werekitten", "warlock", "piper", "doomsayer", "demoniac"})
# these totems are detrimental for the *receiving* person, but can be detrimental to someone else acting on the receiver! # these totems are beneficial for the *receiving* person, but can be detrimental to someone else acting on the receiver!
DETRIMENTAL_TOTEMS = frozenset({"death", "silence", "impatience", "pacifism", "narcolepsy", "exchange", "lycanthropy", "misdirection"}) 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

View File

@ -2178,7 +2178,7 @@ def chk_decision(cli, force = ""):
cli.msg(botconfig.CHANNEL, "\u0002{0}\u0002 meekly votes not to lynch anyone today.".format(p)) cli.msg(botconfig.CHANNEL, "\u0002{0}\u0002 meekly votes not to lynch anyone today.".format(p))
cli.msg(botconfig.CHANNEL, "The villagers have agreed not to lynch anybody today.") cli.msg(botconfig.CHANNEL, "The villagers have agreed not to lynch anybody today.")
if var.ROLES["succubus"] & var.NO_LYNCH: if var.ROLES["succubus"] & var.NO_LYNCH:
var.ENTRANCED_DYING.update(var.ENTRANCED - var.NO_LYNCH) var.ENTRANCED_DYING.update(var.ENTRANCED - var.NO_LYNCH - var.DEAD)
var.ABSTAINED = True var.ABSTAINED = True
transition_night(cli) transition_night(cli)
return return
@ -2280,14 +2280,15 @@ def chk_decision(cli, force = ""):
if votee in var.ROLES["jester"]: if votee in var.ROLES["jester"]:
var.JESTERS.add(votee) var.JESTERS.add(votee)
voted_along = set() if not var.ROLES["succubus"] & set(var.VOTES[votee]):
for person, all_voters in var.VOTES.items(): voted_along = set()
if var.ROLES["succubus"] & set(all_voters): for person, all_voters in var.VOTES.items():
for v in all_voters: if var.ROLES["succubus"] & set(all_voters):
if v in var.ENTRANCED: for v in all_voters:
voted_along.add(v) if v in var.ENTRANCED:
voted_along.add(v)
var.ENTRANCED_DYING.update(var.ENTRANCED - voted_along) # can be the empty set var.ENTRANCED_DYING.update(var.ENTRANCED - voted_along - var.DEAD) # can be the empty set
if var.ROLE_REVEAL in ("on", "team"): if var.ROLE_REVEAL in ("on", "team"):
rrole = var.get_reveal_role(votee) rrole = var.get_reveal_role(votee)
@ -4524,7 +4525,7 @@ def transition_day(cli, gameid=0):
novictmsg = False novictmsg = False
elif victim in var.ENTRANCED_DYING: elif victim in var.ENTRANCED_DYING:
message.append(("\u0002{0}\u0002 was found dead by the village's center, and seem to " message.append(("\u0002{0}\u0002 was found dead by the village's center, and seem to "
"have died of faithlessness...").format(victim)) "have died of a lack of faithfulness...").format(victim))
novictmsg = False novictmsg = False
elif protected.get(victim) == "totem": elif protected.get(victim) == "totem":
message.append(("\u0002{0}\u0002 was attacked last night, but their totem " + message.append(("\u0002{0}\u0002 was attacked last night, but their totem " +
@ -4631,9 +4632,9 @@ def transition_day(cli, gameid=0):
if victim in dead and victim in var.HVISITED.values() and (victim in bywolves or victim in bitten): # victim was visited by some harlot and victim was attacked by wolves if victim in dead and victim in var.HVISITED.values() and (victim in bywolves or victim in bitten): # victim was visited by some harlot and victim was attacked by wolves
for hlt in var.HVISITED.keys(): for hlt in var.HVISITED.keys():
if var.HVISITED[hlt] == victim and hlt not in bitten and hlt not in dead: if var.HVISITED[hlt] == victim and hlt not in bitten and hlt not in dead:
message.append(("\u0002{0}\u0002, a \u0002harlot\u0002, made the unfortunate mistake of "+ message.append(("\u0002{0}\u0002, a \u0002{1}\u0002, made the unfortunate mistake of "+
"visiting the victim's house last night and is "+ "visiting the victim's house last night and is "+
"now dead.").format(hlt)) "now dead.").format(hlt, var.get_role(hlt)))
bywolves.add(hlt) bywolves.add(hlt)
onlybywolves.add(hlt) onlybywolves.add(hlt)
dead.append(hlt) dead.append(hlt)
@ -5916,27 +5917,31 @@ def hvisit(cli, nick, chan, rest):
"are alive, you \u0002cannot win with your own team\u0002, but you " "are alive, you \u0002cannot win with your own team\u0002, but you "
"will win along them if they are alive.").format(nick)) "will win along them if they are alive.").format(nick))
if var.OTHER_KILLS.get(victim) == nick: if var.OTHER_KILLS.get(victim) in var.ROLES["succubus"]:
pm(cli, victim, "You have retracted your kill on \u0002{0}\u0002.".format(nick)) # placeholder pm(cli, victim, "You have retracted your kill on \u0002{0}\u0002, a succubus.".format(nick)) # placeholder
del var.OTHER_KILLS[victim] del var.OTHER_KILLS[victim]
if var.TARGETED.get(victim) == nick: if var.TARGETED.get(victim) in var.ROLES["succubus"]:
pm(cli, victim, "You have retracted your targetting on \u0002{0}\u0002.".format(nick)) pm(cli, victim, "You have retracted your targetting on \u0002{0}\u0002, a succubus.".format(nick))
del var.TARGETED[victim] del var.TARGETED[victim]
if var.SHAMANS.get(victim) == nick and (var.get_role(victim) == "crazed shaman" or var.TOTEMS[victim] in var.DETRIMENTAL_TOTEMS): if victim in var.ROLES["village drunk"]:
pm(cli, victim, "You have retracted your totem on \u0002{0}\u0002.".format(nick)) target = random.choice(list(set(var.list_players()) - var.ROLES["succubus"]))
pm(cli, victim, "In your drunken stupor, you have selected \u0002{0}\u0002 as your target.".format(target))
var.TARGETED[victim] = target
if var.SHAMANS.get(victim)[1] in var.ROLES["succubus"] and (var.get_role(victim) == "crazed shaman" or var.TOTEMS[victim] not in var.BENEFICIAL_TOTEMS):
pm(cli, victim, "You have retracted your totem on \u0002{0}\u0002, a succubus.".format(nick))
del var.SHAMANS[victim] del var.SHAMANS[victim]
if victim in var.HEXED and var.LASTHEXED[victim] == nick: if victim in var.HEXED and var.LASTHEXED[victim] in var.ROLES["succubus"]:
pm(cli, victim, "You have retracted your hex on \u0002{0}\u0002.".format(nick)) pm(cli, victim, "You have retracted your hex on \u0002{0}\u0002, a succubus.".format(nick))
var.TOBESILENCED.remove(nick) var.TOBESILENCED.remove(nick)
var.HEXED.remove(victim) var.HEXED.remove(victim)
del var.LASTHEXED[victim] del var.LASTHEXED[victim]
if nick in var.KILLS.get(victim, ()): if set(var.KILLS.get(victim, ())) & var.ROLES["succubus"]:
pm(cli, victim, "You have retracted your kill on \u0002{0}\u0002.".format(nick)) pm(cli, victim, "You have retracted your kill on \u0002{0}\u0002, a succubus.".format(nick))
var.KILLS[victim].remove(nick) var.KILLS[victim].remove(nick)
if not var.KILLS[victim]: if not var.KILLS[victim]:
del var.KILLS[victim] del var.KILLS[victim]
if var.BITE_PREFERENCES.get(victim) == nick: if var.BITE_PREFERENCES.get(victim) in var.ROLES["succubus"]:
pm(cli, victim, "You are retracted your bite on \u0002{0}\u0002.".format(nick)) pm(cli, victim, "You are retracted your bite on \u0002{0}\u0002, a succubus.".format(nick))
del var.BITE_PREFERENCES[victim] del var.BITE_PREFERENCES[victim]
debuglog("{0} ({1}) VISIT: {2} ({3})".format(nick, role, victim, var.get_role(victim))) debuglog("{0} ({1}) VISIT: {2} ({3})".format(nick, role, victim, var.get_role(victim)))
@ -9246,6 +9251,12 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
if var.IMMUNIZED: if var.IMMUNIZED:
output.append("\u0002immunized\u0002: {0}".format(", ".join(var.IMMUNIZED))) output.append("\u0002immunized\u0002: {0}".format(", ".join(var.IMMUNIZED)))
if var.ENTRANCED:
output.append("\u0002entranced players\u0002: {0}".format(", ".join(var.ENTRANCED)))
if var.ENTRANCED_DYING:
output.append("\u0002dying entranced players\u0002: {0}".format(", ".join(var.ENTRANCED_DYING)))
# get charmed players # get charmed players
if var.CHARMED | var.TOBECHARMED: if var.CHARMED | var.TOBECHARMED:
output.append("\u0002charmed players\u0002: {0}".format(", ".join(var.CHARMED | var.TOBECHARMED))) output.append("\u0002charmed players\u0002: {0}".format(", ".join(var.CHARMED | var.TOBECHARMED)))