Skip to content

Search

Search the party's cell for one kind of hidden feature (one turn).

Full documentation: Search. Wire type: search.

Legal session modes: exploring

JSON Schema

{
  "description": "Search the party's cell for one kind of hidden feature (one turn).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). The searcher needs light, or\ninfravision. Each member gets one attempt for each kind on each cell, for the rest of\nthe game. A trap the party has found never springs.\n\nA `room_traps` search also covers the cell's known doors. A room trap that triggers on\n`open`, in the area beyond a known door, can be found from this side of the door.\n\nAn undiscovered secret door hides any trap behind it from the cells on both sides. So\nwhen a member discovers a secret door, every member gets their `room_traps` attempt back\non both cells the door joins, and can search again for the trap behind it. The referee's\n`SetDoorState` with `discovered=True` gives the\nattempts back the same way. Attempts of other kinds, and attempts on every other cell,\nstay used.\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` matches 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 member already searched this\n      cell for this kind.\n\nEvents:\n    `DetectionRolledEvent` with the\n    roll, a `TrapEvent` for each room trap\n    found, with the searcher's id in its `character_id`, then\n    `SearchCompletedEvent` listing\n    what turned up. For a trap found through a door, the events record that door\n    twice: in the trap event's `direction`, and as a third part of the token in\n    `found`, `\"room_trap:<area id>:<direction>\"`. For a trap found inside the\n    party's area, they record no door. One turn passes, with the turn's usual events.",
  "properties": {
    "command_type": {
      "const": "search",
      "default": "search",
      "title": "Command Type",
      "type": "string",
      "description": "The name that identifies the command class in serialized data. Each command class fixes\nit to a distinct snake_case string, like `\"move_party\"` or `\"open_door\"`, and constructing\nthe class sets it, so you never pass it yourself.\n`parse_command` and the\n`AnyCommand` union use it to rebuild the right class\nfrom a serialized mapping. A class's value never changes between releases."
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source",
      "description": "Who or what issued the command on whose behalf: an authored trigger or quest id, or the\nname of one of your game's systems. The engine never reads it, so a command with a\n`source` does exactly what the same command without one does. The session logs and\nreplays it with the command, so the log alone shows why something happened. Leave it\n`None` when there's nothing to record. An empty string fails validation when the command\nis constructed."
    },
    "character_id": {
      "title": "Character Id",
      "type": "string",
      "description": "The member who searches, by `MemberView.id`. The\nchance depends on the member's class, so match the searcher to `kind`. An elf finds secret\ndoors on 2 in 6. A dwarf finds room traps and construction tricks on 2 in 6. Every other\nclass has 1 in 6 for secret doors and room traps, and no chance at construction tricks."
    },
    "kind": {
      "enum": [
        "secret_doors",
        "room_traps",
        "construction"
      ],
      "title": "Kind",
      "type": "string",
      "description": "Which kind of hidden feature to look for. `secret_doors` checks the four sides of the\nparty's cell. `room_traps` checks the cell's 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 for authored construction tricks, like a sliding wall or a\nfalse floor. Each member gets one attempt for each kind on each cell, so a party covers a\ncell by sending different members, or by sending one member once for each kind."
    }
  },
  "required": [
    "character_id",
    "kind"
  ],
  "title": "Search",
  "type": "object"
}