TrapEvent
A trap outcome the party perceives.
Full documentation: TrapEvent. Wire type: trap.
Default visibility: player
Message codes: exploration.trap.found, exploration.trap.removed, exploration.trap.safe, exploration.trap.sprung
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 trap outcome the party perceives.\n\n`.sprung` when a trap goes off, `.found` when a search or inspection reveals\none, `.removed` on a successful removal, `.safe` when a *known* trap's trigger\nresolved without springing \u2014 never emitted for unknown traps (the spring die\nrides the referee-visibility\n[`DetectionRolledEvent`][osrlib.crawl.events.DetectionRolledEvent], no-leak).",
"properties": {
"code": {
"title": "Code",
"type": "string"
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player"
},
"event_type": {
"const": "trap",
"default": "trap",
"title": "Event Type",
"type": "string"
},
"trap_ref": {
"title": "Trap Ref",
"type": "string"
},
"character_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Character Id"
}
},
"required": [
"code",
"trap_ref"
],
"title": "TrapEvent",
"type": "object"
}