Skip to content

SpawnMonsters

Referee: spawn monsters and open an encounter at a distance.

Full documentation: SpawnMonsters. Wire type: spawn_monsters.

Legal session modes: battle, encounter, exploring, town

JSON Schema

{
  "description": "Referee: spawn monsters and open an encounter at a distance.\n\nThe party must be standing in a dungeon with no encounter already open \u2014\nencounters live on the dungeon grid. Spawning is the one referee power a\nterminal session withholds: an encounter is play, and a session that has\nended opens no new play state, so this is illegal in `game_over` and\n`victory` alike. Exactly one of `count_dice` or `count_fixed` is required.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`\n\nRejections:\n    - `session.command.unknown_monster` \u2014 `template_id` names no monster.\n    - `session.command.encounter_in_progress` \u2014 an encounter or battle is\n      already open.\n    - `session.command.not_in_dungeon` \u2014 the party is not on a dungeon cell.\n\nEvents:\n    [`MonstersSpawnedEvent`][osrlib.crawl.events.MonstersSpawnedEvent], then\n    the encounter opening \u2014\n    [`SurpriseRolledEvent`][osrlib.crawl.events.SurpriseRolledEvent]s,\n    [`EncounterStartedEvent`][osrlib.crawl.events.EncounterStartedEvent], the\n    reaction roll and\n    [`StanceChangedEvent`][osrlib.crawl.events.StanceChangedEvent]; an attacks\n    stance opens battle at once.",
  "properties": {
    "command_type": {
      "const": "spawn_monsters",
      "default": "spawn_monsters",
      "title": "Command Type",
      "type": "string"
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source"
    },
    "template_id": {
      "title": "Template Id",
      "type": "string"
    },
    "count_dice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Count Dice"
    },
    "count_fixed": {
      "anyOf": [
        {
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Count Fixed"
    },
    "distance_feet": {
      "minimum": 0,
      "title": "Distance Feet",
      "type": "integer"
    }
  },
  "required": [
    "template_id",
    "distance_feet"
  ],
  "title": "SpawnMonsters",
  "type": "object"
}