*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...",
|
"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...",
|
"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}",
|
"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_already_bit": "You have already bitten someone this game.",
|
||||||
"alpha_no_bite": "You may only bite someone after another wolf has died yesterday.",
|
"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.",
|
"bite_error": "Please choose who to bite by specifying their nick.",
|
||||||
|
@ -42,6 +42,7 @@ def see(cli, nick, chan, rest):
|
|||||||
|
|
||||||
mode, mapping = random.choice(_mappings)
|
mode, mapping = random.choice(_mappings)
|
||||||
pm(cli, nick, messages["doomsayer_{0}".format(mode)].format(victim))
|
pm(cli, nick, messages["doomsayer_{0}".format(mode)].format(victim))
|
||||||
|
if mode != "sick" or nick not in var.IMMUNIZED:
|
||||||
mapping[nick] = victim
|
mapping[nick] = victim
|
||||||
|
|
||||||
debuglog("{0} ({1}) SEE: {2} ({3}) - {4}".format(nick, role, victim, victimrole, mode.upper()))
|
debuglog("{0} ({1}) SEE: {2} ({3}) - {4}".format(nick, role, victim, victimrole, mode.upper()))
|
||||||
@ -92,6 +93,14 @@ def on_del_player(evt, cli, var, nick, nickrole, nicktpls, death_triggers):
|
|||||||
if nick == k or nick == v:
|
if nick == k or nick == v:
|
||||||
del dictvar[k]
|
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")
|
@event_listener("chk_nightdone")
|
||||||
def on_chk_nightdone(evt, cli, var):
|
def on_chk_nightdone(evt, cli, var):
|
||||||
evt.data["actedcount"] += len(SEEN)
|
evt.data["actedcount"] += len(SEEN)
|
||||||
|
@ -560,7 +560,8 @@ def on_begin_day(evt, cli, var):
|
|||||||
var.EXCHANGED.update(EXCHANGE)
|
var.EXCHANGED.update(EXCHANGE)
|
||||||
var.SILENCED.update(SILENCE)
|
var.SILENCED.update(SILENCE)
|
||||||
var.LYCANTHROPES.update(LYCANTHROPY)
|
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.LUCKY.update(LUCK)
|
||||||
var.MISDIRECTED.update(MISDIRECTION)
|
var.MISDIRECTED.update(MISDIRECTION)
|
||||||
|
|
||||||
|
@ -5010,8 +5010,12 @@ def immunize(cli, nick, chan, rest):
|
|||||||
vrole = get_role(victim)
|
vrole = get_role(victim)
|
||||||
if check_exchange(cli, nick, victim):
|
if check_exchange(cli, nick, victim):
|
||||||
return
|
return
|
||||||
|
evt = Event("doctor_immunize", {"success": True, "message": "villager_immunized"})
|
||||||
|
if evt.dispatch(cli, var, nick, victim):
|
||||||
pm(cli, nick, messages["doctor_success"].format(victim))
|
pm(cli, nick, messages["doctor_success"].format(victim))
|
||||||
lycan = False
|
lycan = False
|
||||||
|
if victim in var.DISEASED:
|
||||||
|
var.DISEASED.remove(victim)
|
||||||
if vrole == "lycan":
|
if vrole == "lycan":
|
||||||
lycan = True
|
lycan = True
|
||||||
lycan_message = (messages["lycan_cured"])
|
lycan_message = (messages["lycan_cured"])
|
||||||
@ -5019,11 +5023,11 @@ def immunize(cli, nick, chan, rest):
|
|||||||
var.ROLES["villager"].add(victim)
|
var.ROLES["villager"].add(victim)
|
||||||
var.FINAL_ROLES[victim] = "villager"
|
var.FINAL_ROLES[victim] = "villager"
|
||||||
var.CURED_LYCANS.add(victim)
|
var.CURED_LYCANS.add(victim)
|
||||||
var.IMMUNIZED.add(victim)
|
|
||||||
else:
|
else:
|
||||||
lycan_message = messages["villager_immunized"]
|
lycan_message = messages[evt.data["message"]]
|
||||||
var.IMMUNIZED.add(victim)
|
|
||||||
pm(cli, victim, (messages["immunization_success"]).format(lycan_message))
|
pm(cli, victim, (messages["immunization_success"]).format(lycan_message))
|
||||||
|
if evt.data["success"]:
|
||||||
|
var.IMMUNIZED.add(victim)
|
||||||
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)))
|
debuglog("{0} ({1}) IMMUNIZE: {2} ({3})".format(nick, get_role(nick), victim, "lycan" if lycan else get_role(victim)))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user