allow werecrow to both observe and kill at the same time
This commit is contained in:
parent
3db042967d
commit
cd118dbabe
@ -329,7 +329,6 @@
|
||||
"gunner_suicide_no_reveal": "Oh no! \u0002{0}\u0002's gun was poorly maintained and has exploded!",
|
||||
"hunter_already_killed": "You have already killed someone this game.",
|
||||
"silenced": "You have been silenced, and are unable to use any special powers.",
|
||||
"werecrow_transformed_nokill": "You have already transformed into a crow; therefore, you are physically unable to kill a villager.",
|
||||
"player_dead": "You are already dead.",
|
||||
"no_suicide": "Suicide is bad. Don't do it.",
|
||||
"vengeful_ghost_wolf": "You must target a wolf.",
|
||||
|
@ -24,11 +24,6 @@ def wolf_kill(cli, nick, chan, rest):
|
||||
if var.DISEASED_WOLVES:
|
||||
pm(cli, nick, messages["ill_wolves"])
|
||||
return
|
||||
# eventually crow will listen on targeted_command and block kills that way
|
||||
# (or more likely, that restriction will be lifted and crow can do both)
|
||||
if role == "werecrow" and var.OBSERVED.get(nick):
|
||||
pm(cli, nick, messages["werecrow_transformed_nokill"])
|
||||
return
|
||||
|
||||
pieces = re.split(" +", rest)
|
||||
victims = []
|
||||
@ -208,9 +203,6 @@ def on_retribution_kill(evt, cli, var, victim, orig_target):
|
||||
t = evt.data["target"]
|
||||
if t == "@wolves":
|
||||
wolves = list_players(var.WOLF_ROLES)
|
||||
for crow in var.ROLES["werecrow"]:
|
||||
if crow in var.OBSERVED:
|
||||
wolves.remove(crow)
|
||||
evt.data["target"] = random.choice(wolves)
|
||||
|
||||
@event_listener("exchange_roles", priority=2)
|
||||
@ -299,7 +291,6 @@ def on_chk_nightdone2(evt, cli, var):
|
||||
for ls in KILLS.values():
|
||||
kills.update(ls)
|
||||
# check if wolves are actually agreeing
|
||||
# allow len(kills) == 0 through as that means that crow was dumb and observed instead
|
||||
if not var.ANGRY_WOLVES and len(kills) > 1:
|
||||
evt.data["actedcount"] -= 1
|
||||
elif var.ANGRY_WOLVES and (len(kills) == 1 or len(kills) > 2):
|
||||
|
@ -4079,8 +4079,8 @@ def transition_day(cli, gameid=0):
|
||||
for victim in list(dead):
|
||||
if victim in var.GUNNERS.keys() and var.GUNNERS[victim] > 0 and victim in bywolves:
|
||||
if random.random() < var.GUNNER_KILLS_WOLF_AT_NIGHT_CHANCE:
|
||||
# pick a random wolf to be shot, but don't kill off werecrows that observed
|
||||
killlist = [wolf for wolf in list_players(var.WOLF_ROLES) if wolf not in var.OBSERVED.keys() and wolf not in dead]
|
||||
# pick a random wolf to be shot
|
||||
killlist = [wolf for wolf in list_players(var.WOLF_ROLES) if wolf not in dead]
|
||||
if killlist:
|
||||
deadwolf = random.choice(killlist)
|
||||
if var.ROLE_REVEAL in ("on", "team"):
|
||||
@ -4189,7 +4189,7 @@ def chk_nightdone(cli):
|
||||
actedcount = sum(map(len, (var.HVISITED, var.PASSED, var.OBSERVED,
|
||||
var.HEXED, var.CURSED, var.CHARMERS)))
|
||||
|
||||
nightroles = get_roles("harlot", "succubus", "sorcerer", "hag", "warlock", "piper", "prophet")
|
||||
nightroles = get_roles("harlot", "succubus", "sorcerer", "hag", "warlock", "werecrow", "piper", "prophet")
|
||||
|
||||
for nick, info in var.PRAYED.items():
|
||||
if info[0] > 0:
|
||||
@ -4791,10 +4791,6 @@ def observe(cli, nick, chan, rest):
|
||||
if check_exchange(cli, nick, victim):
|
||||
return
|
||||
var.OBSERVED[nick] = victim
|
||||
# temp hack, will do something better once crow is split off
|
||||
from src.roles import wolf
|
||||
if nick in wolf.KILLS:
|
||||
del wolf.KILLS[nick]
|
||||
if role == "werecrow":
|
||||
pm(cli, nick, messages["werecrow_observe_success"].format(victim))
|
||||
relay_wolfchat_command(cli, nick, messages["wolfchat_observe"].format(nick, victim), ("werecrow",), is_wolf_command=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user