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. The trip takes the number of turns in the town's `travel_turns`\nfor that dungeon, or no time when that dungeon has no entry there. On arrival the\nparty stands on the entrance cell facing north, and the session switches to\n`exploring`. Leaving town also records what the party's treasure is worth. Under the\non-return XP timing, the treasure XP awarded back in town is the gain over that value.\n\nModes:\n    `town`\n\nRejections:\n    - `session.command.wrong_mode` - the party is not in town.\n    - `session.command.unknown_location` - `dungeon_id` matches no dungeon, or\n      the dungeon has no level with an entrance.\n\nEvents:\n    First, the events of the travel time passing:\n    `EffectExpiredEvent` with a\n    `LightEvent` for a light burning out, and\n    `ProvisionsEvent` on a day boundary.\n    The engine makes no wandering-monster checks during travel, and travel doesn't count toward the party's rest,\n    so no `WanderingCheckEvent` or\n    `FatigueEvent` appears during travel.\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 the opening of an encounter with monsters keyed to that area in the adventure\n    (`SurpriseRolledEvent`s,\n    `EncounterStartedEvent`,\n    `ReactionRolledEvent`,\n    `StanceChangedEvent`, and\n    `BattleStartedEvent` when the monsters\n    attack).",
  "properties": {
    "command_type": {
      "const": "enter_dungeon",
      "default": "enter_dungeon",
      "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."
    },
    "dungeon_id": {
      "title": "Dungeon Id",
      "type": "string",
      "description": "Which dungeon to set out for, by\n`DungeonSpec.id` from the adventure's `dungeons`.\nThe party arrives at the entrance cell, on the first of that dungeon's levels that has\nan entrance. The session refuses an id the adventure doesn't have, or a dungeon with no\nentrance, with `session.command.unknown_location`."
    }
  },
  "required": [
    "dungeon_id"
  ],
  "title": "EnterDungeon",
  "type": "object"
}