RollDice
Referee: roll a dice expression through the seeded session.
Full documentation: RollDice. Wire type: roll_dice.
Legal session modes: battle, encounter, exploring, game_over, town, victory
JSON Schema
{
"description": "Referee: roll a dice expression through the seeded session.\n\nAn authorial roll for freeform adjudication. The referee resolves a *chance*\noutcome the content model can't express (a puzzle, a bluff, \"does the frayed\nrope hold?\") by rolling through the engine rather than inventing a number, so\nthe result is logged, replayable, and grounded in a typed event. Referee\ncommands are legal in every mode, terminal modes included. The roll draws from\nthe dedicated\n`ADJUDICATION_STREAM`, so an ad-hoc\nreferee roll never perturbs the draw sequence of keyed mechanics. A malformed\n`expression` is rejected at construction, exactly as\n`SpawnMonsters`'s `count_dice` is, so it\nnever reaches the session and consumes no draw.\n\nModes:\n `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n None.\n\nEvents:\n `DiceRolledEvent` with the\n expression, the total, and the individual die results.",
"properties": {
"command_type": {
"const": "roll_dice",
"default": "roll_dice",
"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."
},
"expression": {
"title": "Expression",
"type": "string",
"description": "The roll, in the notation `parse` accepts, like `\"1d20\"`,\n`\"3d6+2\"`, or `\"2d6+1x10\"`. A malformed expression raises when the command is constructed\nrather than coming back as a rejection, so a bad expression never reaches the session and\nnever moves the stream."
}
},
"required": [
"expression"
],
"title": "RollDice",
"type": "object"
}