Skip to content

TurnParty

Turn the party in place to a new facing (zero time).

Full documentation: TurnParty. Wire type: turn_party.

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": "Turn the party in place to a new facing (zero time).\n\nThe party must already be inside a dungeon. See\n`EnterDungeon`.\n\nModes:\n    `exploring`\n\nRejections:\n    - `session.command.wrong_mode` - the session is not exploring a dungeon.\n\nEvents:\n    `PartyMovedEvent` with the unchanged\n    position and the new facing.",
  "properties": {
    "command_type": {
      "const": "turn_party",
      "default": "turn_party",
      "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."
    },
    "facing": {
      "$ref": "#/$defs/Direction",
      "description": "The direction the party ends up facing. Its position doesn't change and no game time\npasses. The resulting facing rides\n`PartyMovedEvent`, which is what a first-person\nfront end redraws from."
    }
  },
  "required": [
    "facing"
  ],
  "title": "TurnParty",
  "type": "object"
}