Use a non-discriminatory variable name #WolfSphereLivesMatter
This commit is contained in:
parent
9333588126
commit
3eccf32765
@ -10,10 +10,13 @@ from src.messages import messages
|
||||
from src.events import Event
|
||||
|
||||
KILLS = {} # type: Dict[str, List[str]]
|
||||
# tetrahedron wolves consist of a pack of wolves without any wolf cube
|
||||
TETRAHEDRON_WOLVES = set(var.WOLF_ROLES - {"wolf cub"}) # type: Set[str]
|
||||
# wolves able to use the !kill command, roles should add to this in their own files via
|
||||
# from src.roles import wolf
|
||||
# wolf.CAN_KILL.add("wolf sphere") # or whatever the new wolf role is
|
||||
# simply modifying var.WOLF_ROLES will *not* update this!
|
||||
CAN_KILL = set(var.WOLF_ROLES - {"wolf cub"}) # type: Set[str]
|
||||
|
||||
@cmd("kill", chan=False, pm=True, playing=True, silenced=True, phases=("night",), roles=TETRAHEDRON_WOLVES)
|
||||
@cmd("kill", chan=False, pm=True, playing=True, silenced=True, phases=("night",), roles=CAN_KILL)
|
||||
def wolf_kill(cli, nick, chan, rest):
|
||||
"""Kills one or more players as a wolf."""
|
||||
role = get_role(nick)
|
||||
@ -212,7 +215,7 @@ def on_chk_nightdone(evt, cli, var):
|
||||
if not var.DISEASED_WOLVES:
|
||||
evt.data["actedcount"] += len(KILLS)
|
||||
# eventually wolf cub will remove itself from nightroles in wolfcub.py
|
||||
evt.data["nightroles"].extend(list_players(TETRAHEDRON_WOLVES))
|
||||
evt.data["nightroles"].extend(list_players(CAN_KILL))
|
||||
|
||||
@event_listener("chk_nightdone", priority=20)
|
||||
def on_chk_nightdone2(evt, cli, var):
|
||||
@ -309,7 +312,7 @@ def on_transition_night_end(evt, cli, var):
|
||||
pl[i] = player + " (cursed)"
|
||||
|
||||
pm(cli, wolf, "Players: " + ", ".join(pl))
|
||||
if role in TETRAHEDRON_WOLVES and var.DISEASED_WOLVES:
|
||||
if role in CAN_KILL and var.DISEASED_WOLVES:
|
||||
pm(cli, wolf, messages["ill_wolves"])
|
||||
# TODO: split the following out into their own files (mystic, cub and alpha)
|
||||
if role == "wolf mystic":
|
||||
@ -317,7 +320,7 @@ def on_transition_night_end(evt, cli, var):
|
||||
# # of special villagers = # of players - # of villagers - # of wolves - # of neutrals
|
||||
numvills = len(ps) - len(list_players(var.WOLFTEAM_ROLES)) - len(list_players(("villager", "vengeful ghost", "time lord", "amnesiac", "lycan"))) - len(list_players(var.TRUE_NEUTRAL_ROLES))
|
||||
pm(cli, wolf, messages["wolf_mystic_info"].format("are" if numvills != 1 else "is", numvills, "s" if numvills != 1 else ""))
|
||||
if not var.DISEASED_WOLVES and var.ANGRY_WOLVES and role in TETRAHEDRON_WOLVES:
|
||||
if not var.DISEASED_WOLVES and var.ANGRY_WOLVES and role in CAN_KILL:
|
||||
pm(cli, wolf, messages["angry_wolves"])
|
||||
if var.ALPHA_ENABLED and role == "alpha wolf" and wolf not in var.ALPHA_WOLVES:
|
||||
pm(cli, wolf, messages["wolf_bite"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user