Skip to content

Commit 954d8f6

Browse files
committed
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
1 parent 5625d0d commit 954d8f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/gamemodes/pactbreaker.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def on_night_kills(self, evt: Event, var: GameState):
272272
all_vamps = set(get_players(var, ("vampire",)))
273273
all_cursed = get_all_players(var, ("cursed villager",))
274274
wl = list(all_wolves | all_cursed)
275+
extra = (("vampire", Graveyard), ("wolf", Forest))
275276

276277
for player in self.active_players & all_wolves - self.protected:
277278
# wolves need to be drained 3 times to die
@@ -333,7 +334,8 @@ def on_night_kills(self, evt: Event, var: GameState):
333334
for visitor in vl:
334335
visitor_role = get_main_role(var, visitor)
335336
# vamps draw 2 cards at graveyard instead of 1
336-
extra_draws = 1 if visitor_role == "vampire" and location is Graveyard else 0
337+
# wolves draw 3 cards at forest instead of 2
338+
extra_draws = 1 if (visitor_role, location) in extra else 0
337339
cards = deck[i:i + num_draws + extra_draws]
338340
i += num_draws + extra_draws
339341
empty = True
@@ -474,6 +476,9 @@ def on_player_protected(self,
474476
self.turned.add(target)
475477
self.drained.discard(target)
476478

479+
# don't tell the attacker that their kill failed in case someone else also attacks the target the same night
480+
self.night_kill_messages.discard((attacker, target))
481+
477482
def on_night_death_message(self, evt: Event, var: GameState, victim: User, killer: User | str):
478483
if not isinstance(killer, User):
479484
# vigilante self-kill

0 commit comments

Comments
 (0)