From 5492be88b5e16392ed7941d0266cb927137a4fac Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Tue, 26 Nov 2024 22:19:36 -0700 Subject: [PATCH] fix night !kill in pactbreaker --- src/gamemodes/pactbreaker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gamemodes/pactbreaker.py b/src/gamemodes/pactbreaker.py index c603b5b6..811119b5 100644 --- a/src/gamemodes/pactbreaker.py +++ b/src/gamemodes/pactbreaker.py @@ -494,12 +494,12 @@ def on_night_death_message(self, evt: Event, var: GameState, victim: User, kille elif killer_role == "wolf": victim.send(messages["pactbreaker_hunted"]) killer.send(messages["pactbreaker_hunter"].format(victim)) - elif killer_role == "vigilante" and location is get_home(var, victim): - victim.send(messages["pactbreaker_shot"]) - killer.send(messages["pactbreaker_shooter"].format(victim, victim_role)) - elif killer_role == "vigilante" and location is VillageSquare: + elif killer_role == "vigilante" and victim not in self.active_players and location is VillageSquare: victim.send(messages["pactbreaker_shot_stocks"]) killer.send(messages["pactbreaker_shooter_stocks"].format(victim, victim_role)) + elif killer_role == "vigilante": + victim.send(messages["pactbreaker_shot"]) + killer.send(messages["pactbreaker_shooter"].format(victim, victim_role)) else: # shouldn't happen; indicates a bug in the mode raise RuntimeError(f"Unknown night death situation ({killer_role}/{victim_role}/{location.name})")