Skip to content

Commit

Permalink
Fix error / game start failure when dullahan is in play
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jun 28, 2024
1 parent 52b0375 commit 2f950d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/roles/dullahan.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def on_new_role(evt: Event, var: GameState, player: User, old_role: Optional[str

dull_targets = Event("dullahan_targets", {"targets": set(), "exclude": set()})
dull_targets.dispatch(var, player, max_targets)
TARGETS[player].update(evt.data["targets"] - evt.data["exclude"])
TARGETS[player].update(dull_targets.data["targets"] - dull_targets.data["exclude"])

pl = list(set(pl) - evt.data["exclude"] - {player})
pl = list(set(pl) - dull_targets.data["exclude"] - {player})
while pl and len(TARGETS[player]) < max_targets:
target = random.choice(pl)
pl.remove(target)
Expand Down

0 comments on commit 2f950d5

Please sign in to comment.