OpenDoor
Open an unstuck, unlocked door on one side of the party's cell (zero time).
Full documentation: OpenDoor. Wire type: open_door.
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": "Open an unstuck, unlocked door on one side of the party's cell (zero time).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). An undiscovered secret\ndoor is refused exactly like blank wall, so commands never leak hidden geometry.\nOpening a door of an area whose room trap triggers on `open` is the trap's\nspringing action: 2-in-6 to spring on the first living member in marching\norder, unless the trap has already been found.\n\nModes:\n `exploring`\n\nRejections:\n - `session.command.wrong_mode` - the session is not exploring a dungeon.\n - `exploration.door.no_door` - no known door on that side of the cell\n (undiscovered secret doors included).\n - `exploration.door.already_open` - the door already stands open.\n - `exploration.door.locked` - the lock has not been picked or otherwise\n undone.\n - `exploration.door.stuck` - a stuck door needs\n `ForceDoor`.\n - `exploration.door.gate_refused` - the door has an authored\n condition (`GateSpec`) the party does not\n satisfy. The refusal includes the author's own text. Checked last, after\n every other refusal, so it fires only when the gate alone bars the way.\n\nEvents:\n `ItemConsumedEvent` first when the\n gate's condition consumes what it asks for, then\n `DoorEvent` with code\n `exploration.door.opened` (with the gate's success text when its author\n wrote one). A door trap's spring check then posts a\n `DetectionRolledEvent` and a\n `TrapEvent`, and a trap that springs\n resolves at once: a\n `SavingThrowRolledEvent` when\n it allows a save,\n `DamageDealtEvent` and\n `HitPointsReportedEvent` for\n damage, `EffectAttachedEvent` and\n `ConditionGainedEvent` for a\n condition it inflicts, and\n `DeathEvent` when it kills outright.",
"properties": {
"command_type": {
"const": "open_door",
"default": "open_door",
"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 door is on. Read the cell's sides from\n`ExploredLevelView.edges`: an edge of kind\n`door` is one you can name here. An undiscovered secret door shows as a wall until a\n`secret_doors` `Search` finds it."
}
},
"required": [
"direction"
],
"title": "OpenDoor",
"type": "object"
}