Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
skizzerz committed Nov 27, 2024
1 parent 220a2a8 commit 8abec6d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gamemodes/pactbreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def on_del_player(self, evt: Event, var: GameState, player, all_roles, death_tri
del self.collected_evidence[player]
for _, others in self.collected_evidence.items():
others.discard(player)
if player in self.stale_evidence.items():
del self.stale_evidence[player]
for _, others in self.stale_evidence.items():
others.discard(player)
for _, others in self.visit_count.items():
del others[:player:]
if self.last_voted is player:
Expand Down Expand Up @@ -428,12 +432,13 @@ def on_night_kills(self, evt: Event, var: GameState):
visitor.send(messages[f"pactbreaker_{loc}_evidence"].format(evidence_target, real_role))

if empty:
visitor.send(messages[f"pactbreaker_{loc}_empty"])
visitor.send(messages[f"pactbreaker_{loc}_empty"].format(owner))

# handle share cards
if len(shares) == 1:
for visitor in shares:
loc = self.location_key(self.visiting[visitor])
# safe to omit param here as loc will never be a house
visitor.send(messages[f"pactbreaker_{loc}_empty"])
else:
random.shuffle(shares)
Expand All @@ -444,6 +449,7 @@ def on_night_kills(self, evt: Event, var: GameState):
self.clue_tokens[visitor] += 1
visitor.send(messages[f"pactbreaker_{loc}_share"])
else:
# safe to omit param here as loc will never be a house
visitor.send(messages[f"pactbreaker_{loc}_empty"])

def on_player_protected(self,
Expand Down

0 comments on commit 8abec6d

Please sign in to comment.