Events/dullahan_targets

From Werewolf Wiki
Jump to navigation Jump to search

The dullahan_targets event can be used to ensure the dullahan always has specific targets.

Event callback

def on_dullahan_targets(event: Event, cli: IRCClient, var: module, dullahans: list(str), max_targets: int) -> None
  • prevent_default has no effect for this event
  • event: The event object
  • cli: The IRC connection
  • var: Reference to the src.settings module
  • dullahans: List of dullahans
  • max_targets: The maximum number of targets the dullahan will be assigned. You can assign more than max_targets manually via the event data if desired.

Event data

{
    "targets": dict(str: set(str))
}

The targets dict contains a mapping of the dullahan to what targets they must kill to win. By default, the sets will all be empty. Players can be added to them to hardcode that the dullahan must kill that particular player. If the number of entries in any given set is less than max_targets, the remaining targets are chosen randomly after the event returns.