Skip to content

ItemUsedEvent

A magic item used: a potion drunk (or mixed), a scroll read, a device activated.

Full documentation: ItemUsedEvent. Wire type: item_used.

Default visibility: player

Message codes: items.device.activated, items.potion.drunk, items.potion.mixed, items.scroll.cursed, items.scroll.read

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 magic item used: a potion drunk (or mixed), a scroll read, a device activated.\n\n`items.device.inert` is a rejection code, not an event \u2014 activating an\nexhausted device costs nothing, the same as a blocked move. Charges\nnever appear here: they are referee-only forever (RAW, undiscoverable).",
  "properties": {
    "code": {
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "item_used",
      "default": "item_used",
      "title": "Event Type",
      "type": "string"
    },
    "character_id": {
      "title": "Character Id",
      "type": "string"
    },
    "instance_id": {
      "title": "Instance Id",
      "type": "string"
    },
    "manual": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Manual",
      "type": "array"
    }
  },
  "required": [
    "code",
    "character_id",
    "instance_id"
  ],
  "title": "ItemUsedEvent",
  "type": "object"
}