Skip to content

ListenAtDoor

Listen at a door for noise from the area beyond it (takes no game time).

Full documentation: ListenAtDoor. Wire type: listen_at_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": "Listen at a door for noise from the area beyond it (takes no game time).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). The listener needs light, or\ninfravision. Each member gets one attempt at each door for the rest of the game. A\nlistener who hears the monsters beyond the door keeps them from surprising the party\nwhen it meets them there. Undead make no noise, so an area that contains only undead\nalways sounds silent.\n\nModes:\n    `exploring`\n\nRejections:\n    - `session.command.wrong_mode` - the session is not exploring a dungeon.\n    - `session.command.unknown_member` - `character_id` matches no party member.\n    - `session.command.member_incapacitated` - the member cannot act.\n    - `exploration.door.no_door` - no known door on that side of the cell.\n    - `exploration.action.requires_light` - the party is in the dark and the\n      listener lacks infravision.\n    - `exploration.listen.already_tried` - this character has already listened\n      at this door.\n\nEvents:\n    `DetectionRolledEvent` with the\n    roll, then `ListenedEvent` with code\n    `exploration.listen.heard` or `exploration.listen.silent`.",
  "properties": {
    "command_type": {
      "const": "listen_at_door",
      "default": "listen_at_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`. Listening reaches\nonly the area directly beyond that door."
    },
    "character_id": {
      "title": "Character Id",
      "type": "string",
      "description": "The member who listens, by `MemberView.id`. Each\nmember gets one attempt at each door for the rest of the game, so send the best listener\nfirst. A thief hears on the hear-noise chance for their level. A dwarf, an elf, or a\nhalfling hears on 2 in 6, and every other class on 1 in 6."
    }
  },
  "required": [
    "direction",
    "character_id"
  ],
  "title": "ListenAtDoor",
  "type": "object"
}