*hic*
Make doctor immunize work against doomsayer sickness and pestilence totem
This commit is contained in:
parent
e161325d01
commit
64e6a90921
@ -377,6 +377,7 @@
|
||||
"immunized_already_bitten": "You have a brief flashback to {0} last night. The event quickly subsides, but a lingering thought remains in your mind...",
|
||||
"villager_immunized": "You don't feel any different...",
|
||||
"immunization_success": "You feel a sharp prick in the back of your arm and temporarily black out. When you come to, you notice an empty syringe lying on the ground. {0}",
|
||||
"not_sick": "You feel much better and are now able to leave your home.",
|
||||
"alpha_already_bit": "You have already bitten someone this game.",
|
||||
"alpha_no_bite": "You may only bite someone after another wolf has died yesterday.",
|
||||
"bite_error": "Please choose who to bite by specifying their nick.",
|
||||
|
@ -42,7 +42,8 @@ def see(cli, nick, chan, rest):
|
||||
|
||||
mode, mapping = random.choice(_mappings)
|
||||
pm(cli, nick, messages["doomsayer_{0}".format(mode)].format(victim))
|
||||
mapping[nick] = victim
|
||||
if mode != "sick" or nick not in var.IMMUNIZED:
|
||||
mapping[nick] = victim
|
||||
|
||||
debuglog("{0} ({1}) SEE: {2} ({3}) - {4}".format(nick, role, victim, victimrole, mode.upper()))
|
||||
relay_wolfchat_command(cli, nick, messages["doomsayer_wolfchat"].format(nick, victim), ("doomsayer",), is_wolf_command=True)
|
||||
@ -92,6 +93,14 @@ def on_del_player(evt, cli, var, nick, nickrole, nicktpls, death_triggers):
|
||||
if nick == k or nick == v:
|
||||
del dictvar[k]
|
||||
|
||||
@event_listener("doctor_immunize")
|
||||
def on_doctor_immunize(evt, cli, var, doctor, target):
|
||||
if target in SICK.values():
|
||||
for n, v in list(SICK.items()):
|
||||
if v == target:
|
||||
del SICK[n]
|
||||
evt.data["message"] = "not_sick"
|
||||
|
||||
@event_listener("chk_nightdone")
|
||||
def on_chk_nightdone(evt, cli, var):
|
||||
evt.data["actedcount"] += len(SEEN)
|
||||
|
@ -560,7 +560,8 @@ def on_begin_day(evt, cli, var):
|
||||
var.EXCHANGED.update(EXCHANGE)
|
||||
var.SILENCED.update(SILENCE)
|
||||
var.LYCANTHROPES.update(LYCANTHROPY)
|
||||
var.DISEASED.update(PESTILENCE)
|
||||
# pestilence doesn't take effect on immunized players
|
||||
var.DISEASED.update(PESTILENCE - var.IMMUNIZED)
|
||||
var.LUCKY.update(LUCK)
|
||||
var.MISDIRECTED.update(MISDIRECTION)
|
||||
|
||||
|
@ -5010,21 +5010,25 @@ def immunize(cli, nick, chan, rest):
|
||||
vrole = get_role(victim)
|
||||
if check_exchange(cli, nick, victim):
|
||||
return
|
||||
pm(cli, nick, messages["doctor_success"].format(victim))
|
||||
lycan = False
|
||||
if vrole == "lycan":
|
||||
lycan = True
|
||||
lycan_message = (messages["lycan_cured"])
|
||||
var.ROLES["lycan"].remove(victim)
|
||||
var.ROLES["villager"].add(victim)
|
||||
var.FINAL_ROLES[victim] = "villager"
|
||||
var.CURED_LYCANS.add(victim)
|
||||
evt = Event("doctor_immunize", {"success": True, "message": "villager_immunized"})
|
||||
if evt.dispatch(cli, var, nick, victim):
|
||||
pm(cli, nick, messages["doctor_success"].format(victim))
|
||||
lycan = False
|
||||
if victim in var.DISEASED:
|
||||
var.DISEASED.remove(victim)
|
||||
if vrole == "lycan":
|
||||
lycan = True
|
||||
lycan_message = (messages["lycan_cured"])
|
||||
var.ROLES["lycan"].remove(victim)
|
||||
var.ROLES["villager"].add(victim)
|
||||
var.FINAL_ROLES[victim] = "villager"
|
||||
var.CURED_LYCANS.add(victim)
|
||||
else:
|
||||
lycan_message = messages[evt.data["message"]]
|
||||
pm(cli, victim, (messages["immunization_success"]).format(lycan_message))
|
||||
if evt.data["success"]:
|
||||
var.IMMUNIZED.add(victim)
|
||||
else:
|
||||
lycan_message = messages["villager_immunized"]
|
||||
var.IMMUNIZED.add(victim)
|
||||
pm(cli, victim, (messages["immunization_success"]).format(lycan_message))
|
||||
var.DOCTORS[nick] -= 1
|
||||
var.DOCTORS[nick] -= 1
|
||||
debuglog("{0} ({1}) IMMUNIZE: {2} ({3})".format(nick, get_role(nick), victim, "lycan" if lycan else get_role(victim)))
|
||||
|
||||
@cmd("bite", chan=False, pm=True, playing=True, silenced=True, phases=("night",), roles=("alpha wolf",))
|
||||
|
Loading…
Reference in New Issue
Block a user