Skip to content

PickLock

Pick a locked door's lock: thief-only, needs thieves' tools, one turn.

Full documentation: PickLock. Wire type: pick_lock.

Legal session modes: exploring

JSON Schema

{
  "$defs": {
    "Direction": {
      "description": "The four grid directions the party faces and moves in.\n\nThis is the direction vocabulary the whole crawl uses: which way\n`MoveParty` steps, which side of a cell\n`OpenDoor` works on, which way a transition faces the party on\narrival. There is no up or down here. Between levels is a\n`TransitionSpec`.\n\nThe wire values are lowercase and they serialize into commands, events, and saves, so changing\none is a `schema_version` bump.",
      "enum": [
        "north",
        "east",
        "south",
        "west"
      ],
      "title": "Direction",
      "type": "string"
    }
  },
  "description": "Pick a locked door's lock: thief-only, needs thieves' tools, one turn.\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). A failed attempt locks\nthat character out of that lock until the next level gain.\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.lock.not_a_thief` - the member has no thief skills.\n    - `exploration.lock.no_tools` - the member carries no thieves' tools.\n    - `exploration.door.no_door` - no known door on that side of the cell.\n    - `exploration.lock.not_locked` - the door has no lock left to pick.\n    - `exploration.action.requires_light` - picking needs real light, and\n      infravision does not suffice.\n    - `exploration.lock.locked_out` - this character already failed here at\n      their current level.\n\nEvents:\n    `DetectionRolledEvent` with the\n    skill roll and, on success, a `DoorEvent`\n    with code `exploration.door.unlocked`. The attempt costs one turn, whose\n    bookkeeping (light burn-down, the rest cadence, wandering checks) reports\n    through its own events.",
  "properties": {
    "command_type": {
      "const": "pick_lock",
      "default": "pick_lock",
      "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."
    },
    "direction": {
      "$ref": "#/$defs/Direction",
      "description": "Which side of the party's cell the locked door is on, from the `door` edges in\n`ExploredLevelView.edges`. A door that isn't\nlocked is refused with `exploration.lock.not_locked`."
    },
    "character_id": {
      "title": "Character Id",
      "type": "string",
      "description": "The thief who picks, by `MemberView.id`. The member\nneeds thief skills and thieves' tools in their pack. A failed attempt locks that character\nout of that lock until they gain a level, so it's worth sending the best picker first."
    }
  },
  "required": [
    "direction",
    "character_id"
  ],
  "title": "PickLock",
  "type": "object"
}