From 954d8f65cd3ac5d7bf51fbe8d89583a8b2b06d54 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Sun, 22 Dec 2024 23:01:19 -0700 Subject: [PATCH] PB tweaks - Wolves draw an additional card at forest, increasing their chance of gaining clue tokens to approximately 50% - Fix issue where vampire could get the "your kill failed" message if they bite someone the same night that someone else kills the same target --- src/gamemodes/pactbreaker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gamemodes/pactbreaker.py b/src/gamemodes/pactbreaker.py index b68460dc..b4b3317e 100644 --- a/src/gamemodes/pactbreaker.py +++ b/src/gamemodes/pactbreaker.py @@ -272,6 +272,7 @@ def on_night_kills(self, evt: Event, var: GameState): all_vamps = set(get_players(var, ("vampire",))) all_cursed = get_all_players(var, ("cursed villager",)) wl = list(all_wolves | all_cursed) + extra = (("vampire", Graveyard), ("wolf", Forest)) for player in self.active_players & all_wolves - self.protected: # wolves need to be drained 3 times to die @@ -333,7 +334,8 @@ def on_night_kills(self, evt: Event, var: GameState): for visitor in vl: visitor_role = get_main_role(var, visitor) # vamps draw 2 cards at graveyard instead of 1 - extra_draws = 1 if visitor_role == "vampire" and location is Graveyard else 0 + # wolves draw 3 cards at forest instead of 2 + extra_draws = 1 if (visitor_role, location) in extra else 0 cards = deck[i:i + num_draws + extra_draws] i += num_draws + extra_draws empty = True @@ -474,6 +476,9 @@ def on_player_protected(self, self.turned.add(target) self.drained.discard(target) + # don't tell the attacker that their kill failed in case someone else also attacks the target the same night + self.night_kill_messages.discard((attacker, target)) + def on_night_death_message(self, evt: Event, var: GameState, victim: User, killer: User | str): if not isinstance(killer, User): # vigilante self-kill