Skip to content

EnterDungeon

Travel from town to a dungeon's entrance and start exploring.

Full documentation: EnterDungeon. Wire type: enter_dungeon.

Legal session modes: town

JSON Schema

{
  "description": "Travel from town to a dungeon's entrance and start exploring.\n\nThe party must be in town. Travel takes the adventure's authored cost in\nturns, and arrival places the party at the entrance and switches the session to\n`exploring`. Departure also snapshots the party's treasure valuation, because\nthe end-of-adventure XP award is the delta against it.\n\nModes:\n    `town`\n\nRejections:\n    - `session.command.wrong_mode` - the party is not in town.\n    - `session.command.unknown_location` - `dungeon_id` names no dungeon, or\n      the dungeon has no entrance level.\n\nEvents:\n    The travel time's own bookkeeping first:\n    `EffectExpiredEvent` with a\n    `LightEvent` for a light burning out, and\n    `ProvisionsEvent` on a day boundary.\n    Travel runs no wandering cadence and no rest cadence, so no\n    `WanderingCheckEvent` or\n    `FatigueEvent` lands on the road.\n\n    Then `LocationEnteredEvent` for\n    the dungeon, `via` `\"entrance\"`, and the entrance cell's entry checks: a\n    `HoardGeneratedEvent` for area\n    treasure, a\n    `DetectionRolledEvent` and a\n    `TrapEvent` for a room trap with its\n    resolution, and a keyed encounter's opening\n    (`SurpriseRolledEvent`s,\n    `EncounterStartedEvent`,\n    `ReactionRolledEvent`,\n    `StanceChangedEvent`, and\n    `BattleStartedEvent` on an attacks\n    stance).",
  "properties": {
    "command_type": {
      "const": "enter_dungeon",
      "default": "enter_dungeon",
      "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."
    },
    "dungeon_id": {
      "title": "Dungeon Id",
      "type": "string",
      "description": "Which dungeon to set out for, by\n`DungeonSpec.id` from the adventure's own `dungeons`.\nThe party arrives on that dungeon's entrance level, at the entrance cell. An id the\nadventure doesn't have, or a dungeon with no entrance level, comes back as\n`session.command.unknown_location`."
    }
  },
  "required": [
    "dungeon_id"
  ],
  "title": "EnterDungeon",
  "type": "object"
}