Skip to content

AdvanceTime

Referee: move the game clock forward.

Full documentation: AdvanceTime. Wire type: advance_time.

Legal session modes: battle, encounter, exploring, game_over, town, victory

JSON Schema

{
  "$defs": {
    "TimeUnit": {
      "description": "The unit an amount of game time is counted in.\n\nPass one to `advance` to say what your number\nmeans, and read one off a `BoundaryCrossing` to\nsee which kind of boundary you crossed. The rounds each unit is worth are\n`ROUNDS_PER_TURN` and\n`ROUNDS_PER_DAY`.",
      "enum": [
        "round",
        "turn",
        "day"
      ],
      "title": "TimeUnit",
      "type": "string"
    }
  },
  "description": "Referee: move the game clock forward.\n\nUse it for time that passes outside the commands, like a week of travel or a\nreferee's \"an hour later\". This command is legal in every mode, `game_over` and\n`victory` included, so the clock keeps running after the party dies. The time limits on spells\nthat bring the dead back are measured on this clock. Everything that happens with time\nhappens as usual, like effects expiring and provisions eaten each day. The engine makes no\nwandering-monster checks for it, because the referee decides on encounters, and the time\ndoesn't count toward the party's rest.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n    None.\n\nEvents:\n    The events of the time passing: effects that expire, a\n    `LightEvent` for each light that burns out, and\n    `ProvisionsEvent`s. Then a\n    `TimeAdvancedEvent` with the clock's new\n    total.",
  "properties": {
    "command_type": {
      "const": "advance_time",
      "default": "advance_time",
      "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."
    },
    "n": {
      "minimum": 0,
      "title": "N",
      "type": "integer",
      "description": "How many of `unit` to advance. `0` is legal, advances nothing, and still emits the\n`TimeAdvancedEvent`."
    },
    "unit": {
      "$ref": "#/$defs/TimeUnit",
      "description": "Which unit `n` counts: rounds, turns, or days. A B/X turn is 10 minutes, or 60 rounds,\nand a day is 144 turns. Effects expire across the whole time whichever unit you pick, and\nthe party eats provisions at each day boundary the time crosses."
    }
  },
  "required": [
    "n",
    "unit"
  ],
  "title": "AdvanceTime",
  "type": "object"
}