Skip to content

Commit

Permalink
oop
Browse files Browse the repository at this point in the history
  • Loading branch information
skizzerz committed Nov 28, 2024
1 parent 32aeeb4 commit 02507e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gamemodes/pactbreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,14 @@ def on_night_kills(self, evt: Event, var: GameState):
killer_role = get_main_role(var, killer)
victim_role = get_main_role(var, victim)
have_evidence = victim in self.collected_evidence[killer]
is_home = victim is not self.in_stocks and self.visiting[victim] is get_home(var, victim)
victim_visiting = self.visiting.get(victim)
is_home = victim_visiting is get_home(var, victim)
if victim_role == "wolf":
is_safe = is_home or self.visiting[victim] is Forest
is_safe = is_home or victim_visiting is Forest
elif victim_role == "vigilante":
is_safe = is_home or self.visiting[victim] is VillageSquare
is_safe = is_home or victim_visiting is VillageSquare
elif victim_role == "vampire":
is_safe = is_home or self.visiting[victim] is Graveyard
is_safe = is_home or victim_visiting is Graveyard
else:
# unused default fallback, but villagers are only safe if at home
is_safe = is_home
Expand Down

0 comments on commit 02507e8

Please sign in to comment.