SearchCompletedEvent
A search of the party's cell finished, naming whatever it turned up.
Full documentation: SearchCompletedEvent. Wire type: search_completed.
Default visibility: player
Message codes: exploration.search.found, exploration.search.nothing
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": "A search of the party's cell finished, naming whatever it turned up.\n\nEmitted by `Search` and by\n`InspectTreasure` once the roll has been\nmade, after the referee-visibility\n`DetectionRolledEvent`.\n\nAn empty result means the searcher found nothing, which isn't the same as there\nbeing nothing: each character gets one attempt per cell per kind, and another\ncharacter may still find it.",
"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 the search turned up is the party's to act on."
},
"event_type": {
"const": "search_completed",
"default": "search_completed",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `search_completed`."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who searched."
},
"kind": {
"title": "Kind",
"type": "string",
"description": "What was searched for: `\"secret_doors\"`, `\"room_traps\"`, `\"construction\"`, or\n`\"treasure_traps\"` for a treasure feature inspected by a thief."
},
"found": {
"default": [],
"items": {
"type": "string"
},
"title": "Found",
"type": "array",
"description": "What turned up, as references like `\"secret_door:north\"`, `\"room_trap:<area id>\"`, or\n`\"construction:<feature id>\"`, and empty when nothing did. A room trap found through a door\nfrom the searched cell names the door's direction in a third segment,\n`\"room_trap:<area id>:<direction>\"`, and one found inside its own area has none. A found\nsecret door becomes passable, and a found trap no longer springs on the party."
}
},
"required": [
"code",
"character_id",
"kind"
],
"title": "SearchCompletedEvent",
"type": "object"
}