Skip to content

Commit

Permalink
Fix some pb bugs and weird gameplay
Browse files Browse the repository at this point in the history
- Vampire drawing hunted card in forest is now correctly told that a
  wolf discovered them
- Vampire drawing hunted card in square now properly gives evidence to
  that wolf
- Villagers drawing hunted cards in forest or square treat the card as
  empty-handed instead if the wolf has evidence that they are a
  villager
  • Loading branch information
skizzerz committed Sep 8, 2024
1 parent 892ffa5 commit 88f7a9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gamemodes/pactbreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def on_night_kills(self, evt: Event, var: GameState):
elif card == "hunted" and role == "vampire":
self.collected_evidence[wolf].add(visitor)
wolf.send(messages["pactbreaker_hunter_vampire"].format(visitor))
wolf.send(messages["pactbreaker_hunted_vampire"])
elif card == "hunted":
visitor.send(messages["pactbreaker_hunted_vampire"])
elif card == "hunted" and (role != "villager" or visitor not in self.collected_evidence[wolf]):
evt.data["victims"].add(visitor)
evt.data["killers"][visitor].append(wolf)
self.night_kill_messages[(wolf, visitor)] = location
Expand Down Expand Up @@ -294,10 +294,12 @@ def on_night_kills(self, evt: Event, var: GameState):
visitor.send(messages["pactbreaker_stocks"].format(target, get_main_role(var, target)))
elif role == "vampire" and card == "hunted":
# vampires give wolves evidence when a hunted card is drawn
self.collected_evidence[actor].add(visitor)
actor.send(messages["pactbreaker_hunter_vampire"].format(visitor))
visitor.send(messages["pactbreaker_hunted_vampire"])
elif card == "hunted":
elif card == "hunted" and (role != "villager" or visitor not in self.collected_evidence[actor]):
# vigilantes and villagers get killed by the wolf
# (except a wolf will not kill a villager that they know is just a regular vil)
evt.data["victims"].add(visitor)
evt.data["killers"][visitor].append(actor)
self.night_kill_messages[(actor, visitor)] = location
Expand Down

0 comments on commit 88f7a9b

Please sign in to comment.