Skip to content

WedgeDoor

Wedge a door with an iron spike so it can't swing shut or be closed (takes no game time).

Full documentation: WedgeDoor. Wire type: wedge_door.

Legal session modes: exploring

JSON Schema

{
  "$defs": {
    "Direction": {
      "description": "The four grid directions the party faces and moves in.\n\nYou use these for the way `MoveParty` steps, the side of a\ncell `OpenDoor` works on, and the way a transition turns the\nparty on arrival. There is no up or down. A\n`TransitionSpec` moves the party between levels.\n\nThe values are lowercase strings, like `\"north\"`, and they appear in commands, events, and saves.",
      "enum": [
        "north",
        "east",
        "south",
        "west"
      ],
      "title": "Direction",
      "type": "string"
    }
  },
  "description": "Wedge a door with an iron spike so it can't swing shut or be closed (takes no game time).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). The spike comes from the first\nliving member in marching order who carries iron spikes, and one spike is used up.\nNo play command removes the spike. Only the referee's\n`SetDoorState` with `wedged=False` does.\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    - `exploration.door.wedged` - the door is already wedged.\n    - `exploration.door.no_spike` - no living member carries iron spikes.\n\nEvents:\n    `ItemConsumedEvent` for the spike,\n    then `DoorEvent` with code\n    `exploration.door.wedged`.",
  "properties": {
    "command_type": {
      "const": "wedge_door",
      "default": "wedge_door",
      "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."
    },
    "direction": {
      "$ref": "#/$defs/Direction",
      "description": "Which side of the party's cell the door is on, from the `door` edges in\n`ExploredLevelView.edges`. Wedging holds the\ndoor as it stands, open or shut. To keep a way back, wedge an open door before the party\nwalks through it."
    }
  },
  "required": [
    "direction"
  ],
  "title": "WedgeDoor",
  "type": "object"
}