Nothing to see here, move along
This commit is contained in:
parent
2b50c75b18
commit
e04c60a60f
@ -59,17 +59,16 @@ def pass_cmd(cli, nick, chan, rest):
|
||||
chk_nightdone(cli)
|
||||
|
||||
@event_listener("bite")
|
||||
def on_bite(evt, var, actor, user):
|
||||
if user.nick not in var.ROLES["harlot"] or user.nick not in VISITED:
|
||||
def on_bite(evt, cli, var, alpha, target):
|
||||
if target not in var.ROLES["harlot"]:
|
||||
return
|
||||
hvisit = VISITED[user.nick]
|
||||
visited = users._get(hvisit) # FIXME
|
||||
if hvisit and get_main_role(visited) not in var.WOLFCHAT_ROLES and (visited not in evt.param.bywolves or visited in evt.param.protected):
|
||||
hvisit = VISITED.get(target)
|
||||
if hvisit and get_role(hvisit) not in var.WOLFCHAT_ROLES and (hvisit not in evt.param.bywolves or hvisit in evt.param.protected):
|
||||
evt.data["can_bite"] = False
|
||||
|
||||
@event_listener("transition_day_resolve", priority=1)
|
||||
def on_transition_day_resolve(evt, var, victim):
|
||||
if victim.nick in var.ROLES["harlot"] and VISITED.get(victim.nick) and victim not in evt.data["dead"] and victim in evt.data["onlybywolves"]:
|
||||
def on_transition_day_resolve(evt, cli, var, victim):
|
||||
if victim in var.ROLES["harlot"] and VISITED.get(victim) and victim not in evt.data["dead"] and victim in evt.data["onlybywolves"]:
|
||||
if victim not in evt.data["bitten"]:
|
||||
evt.data["message"].append(messages["target_not_home"])
|
||||
evt.data["novictmsg"] = False
|
||||
@ -77,24 +76,23 @@ def on_transition_day_resolve(evt, var, victim):
|
||||
evt.prevent_default = True
|
||||
|
||||
@event_listener("transition_day_resolve_end", priority=1)
|
||||
def on_transition_day_resolve_end(evt, var, victims):
|
||||
def on_transition_day_resolve_end(evt, cli, var, victims):
|
||||
for victim in victims + evt.data["bitten"]:
|
||||
if victim in evt.data["dead"] and victim.nick in VISITED.values() and (victim in evt.data["bywolves"] or victim in evt.data["bitten"]):
|
||||
if victim in evt.data["dead"] and victim in VISITED.values() and (victim in evt.data["bywolves"] or victim in evt.data["bitten"]):
|
||||
for hlt in VISITED:
|
||||
user = users._get(hlt) # FIXME
|
||||
if VISITED[hlt] == victim and user not in evt.data["bitten"] and user not in evt.data["dead"]:
|
||||
if VISITED[hlt] == victim and hlt not in evt.data["bitten"] and hlt not in evt.data["dead"]:
|
||||
if var.ROLE_REVEAL in ("on", "team"):
|
||||
evt.data["message"].append(messages["visited_victim"].format(hlt, get_reveal_role(hlt)))
|
||||
else:
|
||||
evt.data["message"].append(messages["visited_victim_noreveal"].format(hlt))
|
||||
evt.data["bywolves"].add(user)
|
||||
evt.data["onlybywolves"].add(user)
|
||||
evt.data["dead"].append(user)
|
||||
evt.data["bywolves"].add(hlt)
|
||||
evt.data["onlybywolves"].add(hlt)
|
||||
evt.data["dead"].append(hlt)
|
||||
|
||||
@event_listener("transition_day_resolve_end", priority=3)
|
||||
def on_transition_day_resolve_end3(evt, var, victims):
|
||||
for harlot in get_all_players(("harlot",)):
|
||||
if VISITED.get(harlot.nick) in list_players(var.WOLF_ROLES) and harlot not in evt.data["dead"] and harlot not in evt.data["bitten"]:
|
||||
def on_transition_day_resolve_end3(evt, cli, var, victims):
|
||||
for harlot in var.ROLES["harlot"]:
|
||||
if VISITED.get(harlot) in list_players(var.WOLF_ROLES) and harlot not in evt.data["dead"] and harlot not in evt.data["bitten"]:
|
||||
evt.data["message"].append(messages["harlot_visited_wolf"].format(harlot))
|
||||
evt.data["bywolves"].add(harlot)
|
||||
evt.data["onlybywolves"].add(harlot)
|
||||
|
Loading…
Reference in New Issue
Block a user