Skip to content

TargetsSelectedEvent

The targeting model's resolution: which candidates an effect selected.

Full documentation: TargetsSelectedEvent. Wire type: targets_selected.

Default visibility: referee

Message codes: combat.targeting.selected

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who may see an event.\n\nThe wire values are `\"player\"` and `\"referee\"` \u2014 lowercase, serialized into every\nevent; changing them is a `schema_version` bump.",
      "enum": [
        "player",
        "referee"
      ],
      "title": "Visibility",
      "type": "string"
    }
  },
  "description": "The targeting model's resolution: which candidates an effect selected.\n\nEmitted by [`select_targets`][osrlib.core.combat.select_targets].",
  "properties": {
    "code": {
      "default": "combat.targeting.selected",
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "referee"
    },
    "event_type": {
      "const": "targets_selected",
      "default": "targets_selected",
      "title": "Event Type",
      "type": "string"
    },
    "mode": {
      "title": "Mode",
      "type": "string"
    },
    "target_ids": {
      "items": {
        "type": "string"
      },
      "title": "Target Ids",
      "type": "array"
    }
  },
  "required": [
    "mode",
    "target_ids"
  ],
  "title": "TargetsSelectedEvent",
  "type": "object"
}