ListenedEvent
Someone listened at a door, and either heard something or heard nothing.
Full documentation: ListenedEvent. Wire type: listened.
Default visibility: player
Message codes: exploration.listen.heard, exploration.listen.silent
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n ```python\n from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n log = [\n DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n ]\n shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n assert shown == [\"combat.damage.dealt\"] # the goblin's remaining hit points stay hidden\n ```",
"enum": [
"player",
"referee"
],
"title": "Visibility",
"type": "string"
}
},
"description": "Someone listened at a door, and either heard something or heard nothing.\n\nEmitted by `ListenAtDoor`, after the\nreferee-visibility `DetectionRolledEvent`\nthat reports the die.\n\nSilence is ambiguous, and it's meant to stay that way. Undead make no\nnoise, and the roll happens whether or not anything is on the other side, so\n`exploration.listen.silent` tells the party nothing about what is there. Render\nit as an empty result, not as an all-clear.",
"properties": {
"code": {
"title": "Code",
"type": "string",
"description": "What happened, as two or more lowercase segments separated by dots and namespaced by subsystem, like\n`combat.attack.hit`. This is what you branch on and what\n`format_message` looks up. Anything else raises a validation error."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: what a character heard is theirs to know, while the die behind it is\nnot."
},
"event_type": {
"const": "listened",
"default": "listened",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `listened`."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who listened."
},
"direction": {
"title": "Direction",
"type": "string",
"description": "The side of the party's cell that was listened at, as a lowercase\n`Direction` value."
}
},
"required": [
"code",
"character_id",
"direction"
],
"title": "ListenedEvent",
"type": "object"
}