Search
Search the party's cell for one hidden-feature kind (one turn).
Full documentation: Search. Wire type: search.
Legal session modes: exploring
JSON Schema
{
"description": "Search the party's cell for one hidden-feature kind (one turn).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`), with light (infravision\nsuffices). Each character gets one attempt per cell per kind, ever. A\n`room_traps` search covers the cell's door edges too: an `open`-trigger trap\nin an area beyond a known door is findable from this side of it, and a found\ntrap never springs. A secret door is one edge shared by two cells, and while it\nis undiscovered the trap behind it is out of reach from both of them. So\ndiscovering the door clears the `room_traps` attempts on both cells the edge\njoins, not only on the cell the party searched from, and every member on either\nside may search their own cell again for the trap the door stood in front of.\nThe referee's `SetDoorState` with\n`discovered=True` gives the attempts back the same way. Attempts of other kinds,\nand attempts on every other cell, stand.\n\nModes:\n `exploring`\n\nRejections:\n - `session.command.wrong_mode` - the session is not exploring a dungeon.\n - `session.command.unknown_member` - `character_id` names no party member.\n - `session.command.member_incapacitated` - the member cannot act.\n - `exploration.action.requires_light` - the party is in the dark and the\n searcher lacks infravision.\n - `exploration.search.already_tried` - this character already searched this\n cell for this kind.\n\nEvents:\n `DetectionRolledEvent` with the\n roll, a `TrapEvent` when a room trap is\n found, then\n `SearchCompletedEvent` naming\n what turned up. A trap found through a door names that door twice: in the\n trap event's `direction`, and as a third segment on the search token,\n `\"room_trap:<area id>:<direction>\"`. A trap found inside its own area names\n no door. One turn passes with its usual follow-on events.",
"properties": {
"command_type": {
"const": "search",
"default": "search",
"title": "Command Type",
"type": "string",
"description": "The wire discriminator. Each subclass fixes it to its own snake_case literal, like\n`\"move_party\"` or `\"open_door\"`, so you never set it yourself: constructing the subclass\ndoes. It's what `parse_command` and the\n`AnyCommand` union read to rebuild the right class\nfrom a serialized mapping, and it stays the same across releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "An annotation naming the authored object (a trigger or quest id) or the game\nsystem on whose behalf the command was issued. Execution never reads it: a stamped\ncommand does exactly what the same command unstamped does. It is logged and replayed\nwith the command, so the log alone answers \"why did this happen\". Absent is `None`,\nand the empty string is not a value."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who searches, by `MemberView.id`. The\nchance depends on class and race, so match the searcher to `kind`. Elves find secret doors\non 2 in 6, dwarves find room traps and construction tricks on 2 in 6, and everyone else\nhas 1 in 6 for doors and traps and no chance at tricks."
},
"kind": {
"enum": [
"secret_doors",
"room_traps",
"construction"
],
"title": "Kind",
"type": "string",
"description": "Which kind of hidden thing to look for. `secret_doors` checks the four edges of the\nparty's cell. `room_traps` checks the cell's own area and the areas behind its known doors,\nso a trap that springs when a door opens can be found from the corridor first.\n`construction` checks the cell's authored tricks, like a sliding wall or a false floor.\nEach character gets one attempt per cell per kind, so a party covers a room by sending\ndifferent members, or the same member for each kind in turn."
}
},
"required": [
"character_id",
"kind"
],
"title": "Search",
"type": "object"
}