Events/dullahan_targets
< Events
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 objectcli
: The IRC connectionvar
: Reference to the src.settings moduledullahans
: List of dullahansmax_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.