Skip to content

DeathEvent

A creature reduced to 0 hit points or less is killed.

Full documentation: DeathEvent. Wire type: death.

Default visibility: player

Message codes: combat.death.died, combat.death.permanent

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": "A creature reduced to 0 hit points or less is killed.\n\nEmitted by [`kill`][osrlib.core.effects.kill]. `code` is `combat.death.died` for an\nordinary death, or `combat.death.permanent` when a regenerating creature's\nnon-regenerable damage ledger reaches max hit points, ending any chance of\nrevival (the troll).",
  "properties": {
    "code": {
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "death",
      "default": "death",
      "title": "Event Type",
      "type": "string"
    },
    "target_id": {
      "title": "Target Id",
      "type": "string"
    }
  },
  "required": [
    "code",
    "target_id"
  ],
  "title": "DeathEvent",
  "type": "object"
}