Skip to content

Commit

Permalink
whee
Browse files Browse the repository at this point in the history
  • Loading branch information
skizzerz committed Oct 2, 2024
1 parent f848231 commit b33a851
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gamemodes/pactbreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ def on_night_kills(self, evt: Event, var: GameState):
owner_role = get_main_role(var, owner)
vampires = [x for x in visitors if get_main_role(var, x) == "vampire"]
num_vampires = len(vampires)
# this needs to be calculated *before* we add to num_vampires due to a vamp staying home
num_other = num_visitors - num_vampires
if is_home and owner_role == "vampire":
vampires.append(owner)
num_vampires += 1
Expand Down Expand Up @@ -472,7 +474,7 @@ def on_night_kills(self, evt: Event, var: GameState):
else:
visitor.send(messages["pactbreaker_house_empty_1"].format(owner))

if (not is_home or owner_role == "vampire") and num_vampires > 0 and num_vampires >= num_visitors / 2:
if (not is_home or owner_role == "vampire") and num_vampires > 0 and num_vampires >= num_other:
# vampires outnumber non-vampires; drain the non-vampires
i = 0
for visitor in visitors:
Expand Down

0 comments on commit b33a851

Please sign in to comment.