{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.shardsofstone.com/schemas/v1/map-format.json",
  "$comment": "GENERATED by tools/generate_modding_reference.ts. Do not edit by hand.",
  "title": "SerializedMap",
  "description": "A Shards of Stone map in play format (.play.json / published scenario maps).",
  "type": "object",
  "required": [
    "v",
    "meta",
    "terrain",
    "goldMines",
    "oilPatches",
    "spawns"
  ],
  "properties": {
    "v": {
      "description": "Map format version. Stamped by serializeMap as MAP_FORMAT_VERSION unless the map uses something that needs a newer one — a trigger node with a `since`, or a feature in MAP_FEATURE_FORMAT_SINCE such as `props` or `scripts`; see requiredMapFormatVersionForMap. Absent on the three legacy maps that predate the field, which read as v1.",
      "$ref": "#/definitions/MapFormatVersion"
    },
    "meta": {
      "type": "object",
      "required": [
        "name",
        "mapType",
        "size"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "desc": {
          "type": "string"
        },
        "mapType": {
          "$ref": "#/definitions/MapType"
        },
        "size": {
          "type": "integer",
          "minimum": 8,
          "maximum": 1024
        },
        "biome": {
          "type": "string"
        },
        "rockStyle": {
          "description": "Optional vista hint: rock-formation style the map was generated with. Old saves lack it — consumers fall back to 'random'.",
          "$ref": "#/definitions/RockFormationStyle"
        },
        "rockDensity": {
          "description": "Optional vista hint matching the generator's formation density.",
          "$ref": "#/definitions/RockFormationDensity"
        },
        "vistaSeed": {
          "description": "Generator seed for flat-map vista continuity. Elevated maps normally use `heightSeed`, but a deliberately flat map has no height layer.",
          "type": "number"
        },
        "heightSeed": {
          "description": "Seed for the deterministic render-only height recipe. Written only for elevated maps; old/flat maps keep their byte-identical metadata.",
          "type": "number"
        },
        "loadingScreen": {
          "description": "Custom loading screen artwork path (e.g. '/assets/artwork/splash_mountain_hold.png').",
          "type": "string"
        },
        "splashArt": {
          "description": "Alias for loadingScreen.",
          "type": "string"
        },
        "sounds": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "models": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "capabilities": {
          "$ref": "#/definitions/CustomMapCapabilities"
        },
        "settingsOverrides": {
          "$ref": "#/definitions/CustomGameSettingsOverrides"
        },
        "env": {
          "description": "Per-map environment overrides — weather, time of day, sky, light tint, fog (`mapEnvironment.ts`).",
          "$ref": "#/definitions/MapEnvironment"
        },
        "tilesets": {
          "description": "Per-slot ground-texture sourcing: \"use jungle's dirt in this map's dirt slot\" (`editorTilesets.ts`).",
          "$ref": "#/definitions/TilesetSourceMap"
        }
      },
      "additionalProperties": false
    },
    "terrain": {
      "type": "string"
    },
    "baseTerrain": {
      "type": "string"
    },
    "height": {
      "description": "Per-tile integer cliff level 0..7, same RLE format as `terrain`.",
      "type": "string"
    },
    "ramps": {
      "description": "Optional ramp mask, same RLE shape as `height`, omitted when the map has none — which is every flat map, and therefore all 230 classic maps, every campaign mission and every existing save.",
      "type": "string"
    },
    "flat": {
      "description": "Optional level-ground mask, same RLE shape as `height` (1 = level), omitted when the map has none. The height field's gentle roll across each tier is flattened over every joined patch of these tiles, to the lowest of its corners: an arena, a court or a stage a map wants dead level (Grumbar Party lays its floors, rivers and pits flat across its arenas). Render-only, like the roll it removes: never read by the sim.",
      "type": "string"
    },
    "resOverrides": {
      "description": "Only non-default amounts: `[x, y, amount][]` per resource. Sparse, and omitted entirely when a map authors none — see `resourceAmounts.ts`, which owns both the encoding and the defaults it is measured against.",
      "$ref": "#/definitions/ResourceOverrides"
    },
    "goldMines": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "goldMineVariants": {
      "description": "Parallel array to goldMines: variant id per mine (by index). Missing → default picker.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oilPatches": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "spawns": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "buildings": {
      "description": "Pre-placed buildings.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "t",
          "x",
          "y",
          "p"
        ],
        "properties": {
          "t": {
            "type": "string"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "p": {
            "type": "number"
          },
          "c": {
            "type": "boolean"
          },
          "aid": {
            "description": "Stable authored id — triggers reference THIS, never ECS ids.",
            "type": "string"
          },
          "tag": {
            "description": "Group tag; many entities may share one — that IS a unit group.",
            "type": "string"
          },
          "nm": {
            "description": "Custom display name.",
            "type": "string"
          },
          "hp": {
            "description": "Starting health as a FRACTION 0..1 of the final max.",
            "type": "number"
          },
          "mhp": {
            "description": "Absolute max-health override, applied before everything else.",
            "type": "number"
          },
          "mp": {
            "description": "Starting mana as a fraction 0..1 of the final max.",
            "type": "number"
          },
          "rk": {
            "description": "Veterancy rank (2..UNIT_RANK_CAP); rank bonuses are baked in.",
            "type": "number"
          },
          "fc": {
            "description": "Facing, degrees clockwise from \"down\" (0 = down, 90 = left).",
            "type": "number"
          },
          "rl": {
            "description": "Rally point [x, y] for a producing building.",
            "type": "array",
            "items": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 2,
            "maxItems": 2,
            "additionalItems": false
          },
          "bp": {
            "description": "Build progress 0..1. Anything < 1 spawns the building incomplete.",
            "type": "number"
          },
          "inv": {
            "description": "Backpack contents, by slot. `null` = empty slot.",
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "required": [
                "i"
              ],
              "properties": {
                "i": {
                  "type": "string"
                },
                "n": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            }
          },
          "eq": {
            "description": "Equipped gear: equip-slot key → item id.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "hero": {
            "description": "Hero state (ignored on an entity with no `hero` component).",
            "$ref": "#/definitions/AuthoredHeroProps"
          },
          "gar": {
            "description": "Garrison contents, as unit type ids.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stock": {
            "description": "Shop stock override, as item ids.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "spawner": {
            "description": "Data-driven spawner (D4).",
            "$ref": "#/definitions/SpawnerSpec"
          },
          "kv": {
            "description": "Trigger-readable scalars.",
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          }
        },
        "additionalProperties": false
      }
    },
    "units": {
      "description": "Pre-placed units. Same inline-props rule as `buildings`. `hero_*` type ids route through the hero spawn path.",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "t",
          "x",
          "y",
          "p"
        ],
        "properties": {
          "t": {
            "type": "string"
          },
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "p": {
            "type": "number"
          },
          "aid": {
            "description": "Stable authored id — triggers reference THIS, never ECS ids.",
            "type": "string"
          },
          "tag": {
            "description": "Group tag; many entities may share one — that IS a unit group.",
            "type": "string"
          },
          "nm": {
            "description": "Custom display name.",
            "type": "string"
          },
          "hp": {
            "description": "Starting health as a FRACTION 0..1 of the final max.",
            "type": "number"
          },
          "mhp": {
            "description": "Absolute max-health override, applied before everything else.",
            "type": "number"
          },
          "mp": {
            "description": "Starting mana as a fraction 0..1 of the final max.",
            "type": "number"
          },
          "rk": {
            "description": "Veterancy rank (2..UNIT_RANK_CAP); rank bonuses are baked in.",
            "type": "number"
          },
          "fc": {
            "description": "Facing, degrees clockwise from \"down\" (0 = down, 90 = left).",
            "type": "number"
          },
          "rl": {
            "description": "Rally point [x, y] for a producing building.",
            "type": "array",
            "items": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 2,
            "maxItems": 2,
            "additionalItems": false
          },
          "bp": {
            "description": "Build progress 0..1. Anything < 1 spawns the building incomplete.",
            "type": "number"
          },
          "inv": {
            "description": "Backpack contents, by slot. `null` = empty slot.",
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "required": [
                "i"
              ],
              "properties": {
                "i": {
                  "type": "string"
                },
                "n": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            }
          },
          "eq": {
            "description": "Equipped gear: equip-slot key → item id.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "hero": {
            "description": "Hero state (ignored on an entity with no `hero` component).",
            "$ref": "#/definitions/AuthoredHeroProps"
          },
          "gar": {
            "description": "Garrison contents, as unit type ids.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stock": {
            "description": "Shop stock override, as item ids.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "spawner": {
            "description": "Data-driven spawner (D4).",
            "$ref": "#/definitions/SpawnerSpec"
          },
          "kv": {
            "description": "Trigger-readable scalars.",
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          }
        },
        "additionalProperties": false
      }
    },
    "pools": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "x",
          "y",
          "type"
        ],
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "type": {
            "type": "string",
            "enum": [
              "health",
              "mana"
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "players": {
      "description": "Explicit seat roster (D3). Absent = derive the roster from the map bytes exactly as before, which is what keeps all 230 classic maps, both stress fixtures and every existing custom map booting unchanged.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/MapPlayerSlot"
      }
    },
    "rules": {
      "description": "Per-map rules (D3). Absent = shipped behaviour in every respect.",
      "$ref": "#/definitions/MapRules"
    },
    "groundItems": {
      "description": "Items lying on the ground at map start (D8).",
      "type": "array",
      "items": {
        "$ref": "#/definitions/AuthoredGroundItem"
      }
    },
    "props": {
      "description": "The map's props: placements of `data/props` defs (rocks, plants, fences, ruins, camps, city buildings). Not to be confused with the AUTHORED ENTITY PROPS inlined on `buildings`/`units`; these are scenery. No occupancy or collision yet; their faction corruption is real creep by default (see `propCorruptionMode`).",
      "type": "array",
      "items": {
        "$ref": "#/definitions/PropPlacement"
      }
    },
    "propCorruptionMode": {
      "description": "The default for the props' faction corruption (undead, ratmen, goblin and dark elf buildings, barricades and growths): 'gameplay', real sim creep owned by no seat (the default when absent), or 'visual', the look only. A placement's own `corruptionMode` wins. Written only when set.",
      "$ref": "#/definitions/PropCorruptionMode"
    },
    "triggers": {
      "description": "The authored trigger script (E1/E2). Absent = the map runs no triggers, which is every map that exists today; `TriggerSystem` then costs nothing and never even materialises its state singleton.",
      "$ref": "trigger-script.json"
    },
    "scripts": {
      "description": "The map's custom scripts (MapScript).",
      "type": "array",
      "items": {
        "$ref": "#/definitions/MapScript"
      }
    },
    "simulation": {
      "$ref": "#/definitions/MapSimulationProfile"
    },
    "customRuntime": {
      "$ref": "#/definitions/CustomMapRuntime"
    },
    "customGame": {
      "$ref": "#/definitions/CustomGameDefinition"
    },
    "scenes": {
      "description": "Authored in-game cutscenes, named by the `playCutscene` trigger action. Absent on every map that authors none (omit-when-empty, so those maps stay byte-identical). Passed through STRUCTURALLY here — `Game` validates each scene with `parseInGameScene` at install time and drops (with a warning) any that fail, so one bad scene degrades a map rather than refusing to boot it. The sim reads only each scene's `durationSec`; everything else is presentation.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/InGameScene"
      }
    },
    "defOverrides": {
      "description": "Per-match data-editor overrides (E5). Installed by `Game.init` immediately after this map is deserialized and BEFORE any spawn — unit HP/damage is baked into components at spawn time — and cleared in `Game.destroy()`, because the def tables are module singletons shared by every `Game` in the tab and a leak would corrupt the next match and the campaign.",
      "$ref": "def-overrides.json"
    },
    "mercCamps": {
      "description": "[x, y] per mercenary camp. Merc camps MUST be authored here, never in `buildings`: the `Mercenary` stock component is attached only by `Game.spawnMercBuilding`, which this field routes through. A merc camp written into `buildings` goes through the plain `spawnBuilding` path instead and spawns as an inert, invulnerable prop with no hireable stock — it looks right and does nothing.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/MercCampEntry"
      }
    },
    "critters": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "x",
          "y",
          "type"
        ],
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "type": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "bridges": {
      "description": "Strategic crossing centres used by the AI on generated river maps.",
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "bridgeStates": {
      "description": "Actual neutral bridge structures generated over water.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/BridgeState"
      }
    },
    "sounds": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "models": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "$schema": {
      "type": "string",
      "description": "Optional JSON Schema URL; ignored by the loader."
    }
  },
  "additionalProperties": false,
  "definitions": {
    "AcesLevelBiome": {
      "description": "Legacy aliases remain valid for the original four hangar entries.",
      "type": "string",
      "enum": [
        "skylands",
        "cave",
        "forest",
        "winter",
        "swamp",
        "wasteland",
        "jungle",
        "plains",
        "glade",
        "gloom",
        "desert",
        "deep_cave",
        "alpine",
        "volcanic"
      ]
    },
    "AcesLevelConfig": {
      "type": "object",
      "required": [
        "id",
        "name",
        "biome",
        "bossUnitTypeId",
        "bossName"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "biome": {
          "$ref": "#/definitions/AcesLevelBiome"
        },
        "terrainBiome": {
          "description": "Canonical RTS biome used by terrain, lighting and loading artwork.",
          "$ref": "#/definitions/Biome"
        },
        "skylands": {
          "description": "Selects the real Sky Lands topology/render pipeline.",
          "type": "boolean"
        },
        "seed": {
          "type": "number"
        },
        "bossUnitTypeId": {
          "type": "string"
        },
        "bossName": {
          "type": "string"
        },
        "musicTrack": {
          "type": "string"
        },
        "adventureMission": {
          "$ref": "#/definitions/AdventureMission"
        },
        "art": {
          "description": "The mission's painting in the hangar (an asset path; a `-loop.webm`/`.mp4` beside it plays); left out, its biome's built-in sector painting.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "AcesWaveDef": {
      "type": "object",
      "required": [
        "triggerY",
        "unitTypeId",
        "count",
        "spawnPattern",
        "spawned"
      ],
      "properties": {
        "triggerY": {
          "type": "number"
        },
        "unitTypeId": {
          "type": "string"
        },
        "count": {
          "type": "number"
        },
        "spawnPattern": {
          "type": "string",
          "enum": [
            "line",
            "v_formation",
            "pincer"
          ]
        },
        "spawned": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "AdventureAct": {
      "type": "object",
      "required": [
        "id",
        "name",
        "actIndex",
        "actNumber",
        "faction",
        "terrainBiome",
        "firstMission",
        "lastMission",
        "finaleName",
        "map",
        "mapSmall",
        "medal"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "actIndex": {
          "type": "number"
        },
        "actNumber": {
          "type": "number"
        },
        "faction": {
          "$ref": "#/definitions/PlayableRace"
        },
        "terrainBiome": {
          "$ref": "#/definitions/Biome"
        },
        "firstMission": {
          "type": "number"
        },
        "lastMission": {
          "type": "number"
        },
        "finaleName": {
          "type": "string"
        },
        "map": {
          "type": "string"
        },
        "mapSmall": {
          "type": "string"
        },
        "medal": {
          "type": "string"
        },
        "crest": {
          "type": "string"
        },
        "territory": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "AdventureBaseCraftStats": {
      "type": "object",
      "required": [
        "firepower",
        "shieldCapacity",
        "hullArmor",
        "bombDamage"
      ],
      "properties": {
        "firepower": {
          "type": "number"
        },
        "shieldCapacity": {
          "type": "number"
        },
        "hullArmor": {
          "type": "number"
        },
        "bombDamage": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "AdventureLoadout": {
      "type": "object",
      "required": [
        "aircraftId",
        "firepower",
        "shieldCapacity",
        "shieldRechargeDelay",
        "hullArmor",
        "bombDamage",
        "modulePerks"
      ],
      "properties": {
        "aircraftId": {
          "type": "string"
        },
        "firepower": {
          "type": "number"
        },
        "shieldCapacity": {
          "type": "number"
        },
        "shieldRechargeDelay": {
          "type": "number"
        },
        "hullArmor": {
          "type": "number"
        },
        "bombDamage": {
          "type": "number"
        },
        "modulePerks": {
          "$ref": "#/definitions/AdventureModulePerks"
        }
      },
      "additionalProperties": false
    },
    "AdventureMilestoneReward": {
      "type": "object",
      "required": [
        "type",
        "id",
        "name",
        "description",
        "salvageAmount"
      ],
      "properties": {
        "type": {
          "$ref": "#/definitions/AdventureRewardType"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "salvageAmount": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "AdventureMission": {
      "type": "object",
      "required": [
        "missionNumber",
        "id",
        "actIndex",
        "name",
        "description",
        "objectiveText",
        "primaryObjective",
        "x",
        "y",
        "isBoss",
        "guaranteedReward",
        "faction"
      ],
      "properties": {
        "missionNumber": {
          "type": "number"
        },
        "id": {
          "type": "string"
        },
        "actIndex": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "objectiveText": {
          "type": "string"
        },
        "primaryObjective": {
          "$ref": "#/definitions/AdventureObjective"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "isBoss": {
          "type": "boolean"
        },
        "guaranteedReward": {
          "$ref": "#/definitions/AdventureMilestoneReward"
        },
        "faction": {
          "$ref": "#/definitions/PlayableRace"
        }
      },
      "additionalProperties": false
    },
    "AdventureModulePerks": {
      "type": "object",
      "required": [
        "spreadShot",
        "piercing",
        "shrapnel",
        "capacitorOverload",
        "emergencyPatch",
        "persistentShield",
        "reinforcedHull"
      ],
      "properties": {
        "spreadShot": {
          "type": "boolean"
        },
        "piercing": {
          "type": "boolean"
        },
        "shrapnel": {
          "type": "boolean"
        },
        "capacitorOverload": {
          "type": "boolean"
        },
        "emergencyPatch": {
          "type": "boolean"
        },
        "persistentShield": {
          "type": "boolean"
        },
        "reinforcedHull": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "AdventureObjective": {
      "type": "object",
      "required": [
        "category",
        "targetCount",
        "targetTypeId",
        "description"
      ],
      "properties": {
        "category": {
          "$ref": "#/definitions/AdventureObjectiveCategory"
        },
        "targetCount": {
          "type": "number"
        },
        "targetTypeId": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "AdventureObjectiveCategory": {
      "type": "string",
      "enum": [
        "boss",
        "towers",
        "supply",
        "production",
        "research",
        "miniboss",
        "convoy",
        "patrol"
      ]
    },
    "AdventureRewardType": {
      "type": "string",
      "enum": [
        "crest",
        "salvage",
        "module",
        "aircraft",
        "slot",
        "medal"
      ]
    },
    "AuthoredGroundItem": {
      "description": "A ground item placed directly on the map (D8).",
      "type": "object",
      "required": [
        "x",
        "y",
        "i"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "i": {
          "description": "Item id.",
          "type": "string"
        },
        "inst": {
          "description": "Optional rolled instance (affixes/procs/element), as `ItemInstance`.",
          "$ref": "#/definitions/ItemInstance"
        }
      },
      "additionalProperties": false
    },
    "AuthoredHeroProps": {
      "description": "Authored hero state. `persist` picks the progress bucket — see Hero.persistKey and assignHeroPersistKeys.",
      "type": "object",
      "properties": {
        "lvl": {
          "description": "Starting level (1..cap). Per-level stat growth is applied.",
          "type": "number"
        },
        "xp": {
          "description": "XP banked toward the next level.",
          "type": "number"
        },
        "ab": {
          "description": "Learned ability ids, applied in authored order.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "st": {
          "description": "Stat points already spent per stat.",
          "type": "object",
          "properties": {
            "might": {
              "type": "number"
            },
            "swiftness": {
              "type": "number"
            },
            "focus": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "sp": {
          "description": "UNSPENT stat points.",
          "type": "number"
        },
        "persist": {
          "description": "Progress bucket. Omitted ⇒ derived deterministically from the map bytes (first instance of a heroId persists, later ones don't). Explicit `null` ⇒ progress dies with the entity.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Biome": {
      "description": "Map biomes. One per playable race's \"homeland\" look: forest → wood_elf winter → dwarf swamp → goblin cave → ratmen wasteland → undead jungle → lizardmen plains → human (sun-baked wheat country) glade → high_elf (vibrant autumn wood, white trunks, crystal water) gloom → dark_elf (twisted purple wood, violet water) deep_cave → the cave biome with LAVA instead of water and a red light tint Every biome-keyed table (terrainPalettes, waterPalettes, labSky) falls back to 'forest' for unknown keys, so adding one here can never hard-fail a render.",
      "type": "string",
      "enum": [
        "cave",
        "forest",
        "winter",
        "swamp",
        "wasteland",
        "jungle",
        "plains",
        "glade",
        "gloom",
        "desert",
        "deep_cave"
      ]
    },
    "BridgePoint": {
      "type": "object",
      "required": [
        "x",
        "y"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "BridgeProfile": {
      "type": "string",
      "enum": [
        "low",
        "high"
      ]
    },
    "BridgeState": {
      "type": "object",
      "required": [
        "startZ",
        "endZ",
        "invulnerable",
        "start",
        "end",
        "width",
        "tier",
        "profile"
      ],
      "properties": {
        "startZ": {
          "type": "number"
        },
        "endZ": {
          "type": "number"
        },
        "invulnerable": {
          "type": "boolean"
        },
        "start": {
          "$ref": "#/definitions/BridgePoint"
        },
        "end": {
          "$ref": "#/definitions/BridgePoint"
        },
        "width": {
          "type": "number"
        },
        "tier": {
          "$ref": "#/definitions/BridgeTier"
        },
        "profile": {
          "$ref": "#/definitions/BridgeProfile"
        }
      },
      "additionalProperties": false
    },
    "BridgeTier": {
      "type": "string",
      "enum": [
        "wood",
        "stone"
      ]
    },
    "BrinkArenaDef": {
      "description": "The arena a map carries: the platform's centre and size, what lies beyond it, and what stands on it.",
      "type": "object",
      "required": [
        "id",
        "name",
        "edge",
        "cx",
        "cy",
        "maxRadius"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "edge": {
          "$ref": "#/definitions/BrinkEdge"
        },
        "cx": {
          "description": "The platform's centre, tiles.",
          "type": "number"
        },
        "cy": {
          "type": "number"
        },
        "maxRadius": {
          "description": "The largest the platform can start (tiles). A round starts at `BRINK_BASE_RADIUS + sqrt(casters)`, never more than this; the map lays the hazard under all of it.",
          "type": "number"
        },
        "obstacles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrinkObstacleDef"
          }
        },
        "ice": {
          "description": "Patches of ice on the platform: less grip.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y",
              "r"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "r": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "webs": {
          "description": "Webs on the platform: walking through them is slow.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y",
              "r"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "r": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "gusts": {
          "description": "Sky arenas: a gust crosses the platform every so often, pushing every caster one way.",
          "type": "boolean"
        },
        "vents": {
          "description": "Lava arenas: vents that erupt after a warning, throwing whoever stands on them.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "pits": {
          "description": "Holes in the platform: a `lava` pool burns whoever stands in it (at the lava's rate) until they walk out; a `void` hole drops them through, out of the round, as the edge of a sky arena does. A pit in the middle makes a ring to fight round. They stay as the rim shrinks.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrinkPitDef"
          }
        },
        "below": {
          "description": "Scenery under a sky arena (cosmetic: a fall is still out of the round): a floating rock `depth` tiles below the platform, `radius` tiles across, a ring when `inner` is set, its top a `lava` lake or bare `stone`.",
          "type": "object",
          "required": [
            "kind",
            "radius",
            "depth"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "stone",
                "lava"
              ]
            },
            "radius": {
              "type": "number"
            },
            "inner": {
              "type": "number"
            },
            "depth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "biome": {
          "description": "The biome the arena is drawn in (cosmetic). Over the open sky it is the island's own look whatever the map's biome: its rock (a snowcap, magma veins, sandstone bands...), the satellite rocks round it with that biome's scenery, and its air (snow, embers, sand, wisps, petals).",
          "type": "string"
        },
        "floor": {
          "description": "The platform's look: 'stone' slabs, 'basalt', 'ice', 'gold' steps (cosmetic).",
          "type": "string",
          "enum": [
            "wood",
            "stone",
            "ice",
            "basalt",
            "gold"
          ]
        },
        "liquid": {
          "description": "The colour of the liquid past a lava or bog edge (cosmetic): the game's own animated lava or water, recoloured. 'molten' is a brighter melt and 'witchfire' violet fire (lava edges); 'bog' murky olive water with its swamp standing in it: snags, stumps, reeds, lanterns, lily pads and fireflies (water and bog edges). Absent: the game's lava, or the biome's water.",
          "$ref": "#/definitions/BrinkLiquid"
        }
      },
      "additionalProperties": false
    },
    "BrinkBotSkill": {
      "description": "How well the bots play. `dummy` stands still (the practice room's targets).",
      "type": "string",
      "enum": [
        "easy",
        "hard",
        "normal"
      ]
    },
    "BrinkEdge": {
      "description": "What lies past the platform's edge: the open sky (fall and you are out), or something that hurts until you climb out: lava (9 a second), a frozen lake's cold water (6, and slow) or a bog (4, and slower).",
      "type": "string",
      "enum": [
        "water",
        "lava",
        "bog",
        "void"
      ]
    },
    "BrinkLiquid": {
      "description": "The looks BrinkArenaDef.liquid takes.",
      "type": "string",
      "enum": [
        "bog",
        "molten",
        "witchfire"
      ]
    },
    "BrinkMenu": {
      "description": "A Brink map's setup screen (see BrinkRules.menu).",
      "type": "object",
      "properties": {
        "arenas": {
          "description": "The arenas the screen offers, at most 16, each a map carrying `rules.brink` (absent: this map alone). Brink of Stone's own menu lists its ten bundled arenas, `/maps/brink-<id>.play.json`.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FrontDoorMapEntry"
          }
        },
        "title": {
          "description": "The menu's title (absent: the map's name). 1..80 characters.",
          "type": "string"
        },
        "tagline": {
          "description": "One line under the logo. 1..160 characters.",
          "type": "string"
        },
        "logo": {
          "description": "The logo: a shipped `/assets/` image or a `ugc:` upload, under loading art's rule (absent: the game's own).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "BrinkMode": {
      "description": "Every seat for itself, or the lobby's teams (allies are immune to your spells).",
      "type": "string",
      "enum": [
        "ffa",
        "teams"
      ]
    },
    "BrinkObstacleDef": {
      "description": "Something standing on the platform.",
      "type": "object",
      "required": [
        "x",
        "y",
        "r",
        "kind"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Radius, tiles.",
          "type": "number"
        },
        "kind": {
          "description": "`pillar` blocks bodies and missiles for good; `breakable` takes hits and shatters into shards you can shove into people; `barrel` blasts everyone near it when it breaks.",
          "type": "string",
          "enum": [
            "pillar",
            "breakable",
            "barrel"
          ]
        },
        "hp": {
          "description": "Hits a breakable or a barrel takes (in damage), default by kind.",
          "type": "number"
        },
        "propId": {
          "description": "The prop drawn for it (cosmetic; the sim never reads it).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "BrinkPitDef": {
      "description": "A hole in an arena's platform (see BrinkArenaDef.pits).",
      "type": "object",
      "required": [
        "x",
        "y",
        "r",
        "kind"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Radius, tiles (0.5..8).",
          "type": "number"
        },
        "kind": {
          "type": "string",
          "enum": [
            "lava",
            "void"
          ]
        }
      },
      "additionalProperties": false
    },
    "BrinkRotation": {
      "description": "How a match moves between its arenas (see BrinkRules.rotation).",
      "type": "string",
      "enum": [
        "random",
        "order",
        "fixed"
      ]
    },
    "BrinkRules": {
      "description": "The rules a map carries in `rules.brink`.",
      "type": "object",
      "required": [
        "arena"
      ],
      "properties": {
        "arena": {
          "$ref": "#/definitions/BrinkArenaDef"
        },
        "rounds": {
          "description": "Rounds in the match, odd, 1..15 (absent: by the number of casters).",
          "type": "number"
        },
        "mode": {
          "$ref": "#/definitions/BrinkMode"
        },
        "casters": {
          "description": "Caster per seat (`\"3\": \"vaelindra\"`). A seat without one picks, or gets a default.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "roster": {
          "description": "The casters this map offers (default: every caster).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pickSeconds": {
          "description": "Seconds the pick phase stays open (0: none). Default: 20 with two people or more.",
          "type": "number"
        },
        "botSkill": {
          "$ref": "#/definitions/BrinkBotSkill"
        },
        "seed": {
          "description": "Mixed into the arena's own random stream.",
          "type": "number"
        },
        "practice": {
          "description": "The practice room: training dummies that stand and get back up, no shrink, free spells, no rounds.",
          "type": "boolean"
        },
        "firstShopSeconds": {
          "description": "Seconds of shop before round 1, and before every round after it.",
          "type": "number"
        },
        "shopSeconds": {
          "type": "number"
        },
        "startGold": {
          "type": "number"
        },
        "roundGold": {
          "type": "number"
        },
        "arenas": {
          "description": "More arenas on the same map (a sky archipelago's islands, at most 8): each round is fought on one of `arena` and these, chosen by `rotation`, and the camera crosses to the next one while the shop is open. Each keeps its own edge, floor, obstacles and hazards; lay each one's hazard under it.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrinkArenaDef"
          }
        },
        "rotation": {
          "description": "How rounds move between the arenas: `order` (default: `arena`, then each of `arenas`, round and round), `random` (never the same one twice in a row), or `fixed` (always `arena`; `arenas` stand as scenery).",
          "$ref": "#/definitions/BrinkRotation"
        },
        "tuning": {
          "description": "The match's numbers, over the game's own (absent: Brink of Stone's).",
          "$ref": "#/definitions/BrinkTuning"
        },
        "spells": {
          "description": "Spells reshaped for this map, by id: any of their numbers, their name and shop line, and how they are drawn (`look`, `material`, `borrow`). Absent: Brink of Stone's own.",
          "type": "object",
          "properties": {
            "lightning": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "fireball": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "scourge": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "homing": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "boomerang": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "bouncer": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "grip": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "drain": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "blink": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "thrust": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "swap": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "meteor": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "boulder": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "windwalk": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "shield": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "timeshift": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "mirror": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "link": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "undertow": {
              "$ref": "#/definitions/BrinkSpellPatch"
            },
            "root": {
              "$ref": "#/definitions/BrinkSpellPatch"
            }
          },
          "additionalProperties": false
        },
        "shop": {
          "description": "The spells the shop sells (default: all of them). Fireball and Scourge are every caster's whatever this says.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrinkSpellId"
          }
        },
        "menu": {
          "description": "The setup screen this map opens in (its Play in Custom Games, or `/play?brink=setup&map=<ref>`): the title, tagline and logo, and the arenas it lists. Absent: the screen offers this map alone, under its own name. `false`: no setup screen; the map launches as it is, its seats and casters as written. Menus only; the sim never reads it.",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/BrinkMenu"
            }
          ]
        },
        "setup": {
          "description": "The match is set up inside its own map (default false; Custom Games turns it on): it opens in its pick, where every person picks a caster and the match's host (its first person by seat) picks free for all or two teams, how many casters, the bots' skill and the rounds (`brink_setup`), then starts it (`brink_start`), or asks for another arena or the practice room (`brink_arena`, which the shell loads). Fewer casters send bots home. It waits for the host, or `pickSeconds` when set. Alone and online it is the same screen.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "BrinkSpellId": {
      "description": "Every spell. `fireball` and `scourge` are every caster's; the rest are bought.",
      "type": "string",
      "enum": [
        "lightning",
        "fireball",
        "scourge",
        "homing",
        "boomerang",
        "bouncer",
        "grip",
        "drain",
        "blink",
        "thrust",
        "swap",
        "meteor",
        "boulder",
        "windwalk",
        "shield",
        "timeshift",
        "mirror",
        "link",
        "undertow",
        "root"
      ]
    },
    "BrinkSpellPatch": {
      "description": "A spell reshaped by a map (see BrinkRules.spells). Absent fields keep the game's.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "blurb": {
          "description": "One line for the shop.",
          "type": "string"
        },
        "maxLevel": {
          "type": "number"
        },
        "cost": {
          "description": "Gold to buy it, and each level after.",
          "type": "number"
        },
        "upgrade": {
          "type": "number"
        },
        "cooldown": {
          "description": "Seconds at level 1, and taken off each level after (never under half).",
          "type": "number"
        },
        "cooldownPerLevel": {
          "type": "number"
        },
        "castTime": {
          "description": "Seconds of wind-up before it goes.",
          "type": "number"
        },
        "damage": {
          "type": "number"
        },
        "damagePerLevel": {
          "type": "number"
        },
        "knockback": {
          "description": "Knockback factor: 1 is a fireball's shove for the same damage.",
          "type": "number"
        },
        "speed": {
          "description": "Missile speed (tiles a second) and reach (tiles).",
          "type": "number"
        },
        "range": {
          "type": "number"
        },
        "radius": {
          "description": "A missile's radius, or an area's.",
          "type": "number"
        },
        "duration": {
          "description": "Seconds a lasting effect lasts.",
          "type": "number"
        },
        "look": {
          "description": "Its drawn shape and what it is made of, in the game's spell vocabulary (`bolt`, `nova`... and `fire`, `frost`...).",
          "type": "string"
        },
        "material": {
          "type": "string"
        },
        "borrow": {
          "description": "The game spell whose palette, icon and bursts it borrows.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "BrinkTuning": {
      "description": "The numbers a map may set for its match. Seconds and tiles throughout; each one absent is the game's own (in brackets).",
      "type": "object",
      "properties": {
        "health": {
          "description": "A caster's health (100).",
          "type": "number"
        },
        "walkSpeed": {
          "description": "Walking speed, tiles a second (2.6).",
          "type": "number"
        },
        "regen": {
          "description": "Health back each second on the platform (0.45).",
          "type": "number"
        },
        "knockback": {
          "description": "Knockback per point of damage, before strain (0.9).",
          "type": "number"
        },
        "strainScale": {
          "description": "Strain divides by this: a shove throws `1 + strain / strainScale` times as far (100).",
          "type": "number"
        },
        "knockbackFade": {
          "description": "How fast a shove fades, per second (2.2), and on ice (0.9).",
          "type": "number"
        },
        "knockbackFadeIce": {
          "type": "number"
        },
        "baseRadius": {
          "description": "A round's platform starts at this plus the square root of the casters, tiles (6).",
          "type": "number"
        },
        "ringWidth": {
          "description": "Tiles each shrink takes off the rim (1).",
          "type": "number"
        },
        "shrinkSeconds": {
          "description": "One ring goes every `shrinkSeconds x sqrt(casters standing)` (15), warned this long before (3).",
          "type": "number"
        },
        "shrinkWarnSeconds": {
          "type": "number"
        },
        "lavaDps": {
          "description": "Health a second in lava (9), cold water (6) and a bog (4).",
          "type": "number"
        },
        "waterDps": {
          "type": "number"
        },
        "bogDps": {
          "type": "number"
        },
        "waterWade": {
          "description": "How fast a caster wades in water (0.6), a bog (0.4) and a web (0.5), as a share of walking.",
          "type": "number"
        },
        "bogWade": {
          "type": "number"
        },
        "webWade": {
          "type": "number"
        },
        "fallSeconds": {
          "description": "Seconds a fall into the void lasts before the caster is out (0.9).",
          "type": "number"
        },
        "gustEverySeconds": {
          "description": "Sky arenas' gusts: every this many seconds (18), lasting this long (2.2), at this speed (1.1).",
          "type": "number"
        },
        "gustSeconds": {
          "type": "number"
        },
        "gustSpeed": {
          "type": "number"
        },
        "ventEverySeconds": {
          "description": "Lava vents: every this many seconds (11), warned this long before (1.6), this wide (1.4), this hard (9).",
          "type": "number"
        },
        "ventWarnSeconds": {
          "type": "number"
        },
        "ventRadius": {
          "type": "number"
        },
        "ventDamage": {
          "type": "number"
        },
        "breakableHp": {
          "description": "Hits a breakable takes (26), and a barrel (10); a barrel's blast: radius (2.6) and damage (11).",
          "type": "number"
        },
        "barrelHp": {
          "type": "number"
        },
        "barrelRadius": {
          "type": "number"
        },
        "barrelDamage": {
          "type": "number"
        },
        "countdownSeconds": {
          "description": "Seconds of countdown before a round (3).",
          "type": "number"
        },
        "winPoints": {
          "description": "Points for the last one standing (1), and for a kill (1).",
          "type": "number"
        },
        "killPoints": {
          "type": "number"
        },
        "suddenDeathScale": {
          "description": "A sudden-death round's platform, as a share of a round's (0.55).",
          "type": "number"
        },
        "missilesClash": {
          "description": "Two enemy missiles that touch both burst (true).",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "BumperDef": {
      "description": "Permanent physics-space bumper; x/y are board coordinates, radius is 3D physics units.",
      "type": "object",
      "required": [
        "id",
        "x",
        "y",
        "radius"
      ],
      "properties": {
        "id": {
          "type": "number"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "radius": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "Cam2DKeyframe": {
      "description": "One 2D camera keyframe (for renderMode '2d' scenes).",
      "type": "object",
      "required": [
        "t",
        "x",
        "y",
        "zoom"
      ],
      "properties": {
        "followActor": {
          "description": "In-game original actor tag; x/y are the fallback center.",
          "type": "string"
        },
        "t": {
          "description": "Seconds from frame 0.",
          "type": "number"
        },
        "x": {
          "description": "Center tile X.",
          "type": "number"
        },
        "y": {
          "description": "Center tile Y.",
          "type": "number"
        },
        "zoom": {
          "description": "2D zoom factor (1 = 100%). Applied directly (not snapped to the discrete gameplay zoom levels).",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "CamEase": {
      "type": "string",
      "enum": [
        "smooth",
        "linear",
        "inOut",
        "catmullRom",
        "cut"
      ]
    },
    "CamKeyframe": {
      "description": "One 3D camera keyframe. Either an explicit target (targetX/targetY in tiles) or `followGroup` (target = live centroid of a spawn group).",
      "type": "object",
      "required": [
        "t",
        "yaw",
        "pitch",
        "distance"
      ],
      "properties": {
        "t": {
          "description": "Seconds from frame 0.",
          "type": "number"
        },
        "targetX": {
          "description": "Target tile X (fractional ok). Required unless followGroup is set.",
          "type": "number"
        },
        "targetY": {
          "description": "Target tile Y (fractional ok). Required unless followGroup is set.",
          "type": "number"
        },
        "followGroup": {
          "description": "Follow a spawn group: the orbit target tracks the group centroid.",
          "type": "string"
        },
        "followActor": {
          "description": "In-game original actor tag. Explicit coordinates remain the missing/dead fallback.",
          "type": "string"
        },
        "targetHeight": {
          "description": "Look-at elevation in world pixels, default 0. Useful for aircraft and tall buildings.",
          "type": "number"
        },
        "yaw": {
          "description": "Camera yaw in degrees (0 = camera south of target looking north).",
          "type": "number"
        },
        "pitch": {
          "description": "Pitch from vertical in degrees (0 = top-down, 90 = horizon).",
          "type": "number"
        },
        "distance": {
          "description": "Orbit distance in world pixels.",
          "type": "number"
        },
        "ease": {
          "description": "Easing INTO this keyframe (i.e. for the segment that ends here). Default 'smooth' (smoothstep).",
          "$ref": "#/definitions/CamEase"
        }
      },
      "additionalProperties": false
    },
    "CityFaction": {
      "type": "string",
      "enum": [
        "dwarf",
        "goblin",
        "ratmen",
        "lizardmen",
        "wood_elf",
        "high_elf",
        "dark_elf",
        "human",
        "undead"
      ]
    },
    "CityFounding": {
      "description": "How a city match begins: 'choose' (each seat founds where it likes) or 'placed' (the map places the hall).",
      "type": "string",
      "enum": [
        "choose",
        "placed"
      ]
    },
    "CityFoundingSpawn": {
      "description": "One seat's founding spawn: where its hall's centre goes if it is founded for it (the map's `spawns`).",
      "type": "object",
      "required": [
        "playerId",
        "x",
        "y"
      ],
      "properties": {
        "playerId": {
          "type": "number"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "CityNeed": {
      "description": "A need a zoned lot can have: a service's coverage at its front, or food (a market's coverage at its front AND its seat's farms making enough: see `foodPerResident`).",
      "type": "string",
      "enum": [
        "fire",
        "water",
        "health",
        "safety",
        "faith",
        "learning",
        "entertainment",
        "market",
        "park",
        "academy",
        "food"
      ]
    },
    "CityNeedLevels": {
      "description": "What a lot needs at levels 1, 2 and 3: services by name, or 'food' (a market's reach and enough farms).",
      "type": "array",
      "items": [
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CityNeed"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CityNeed"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CityNeed"
          }
        }
      ],
      "minItems": 3,
      "maxItems": 3,
      "additionalItems": false
    },
    "CityRules": {
      "description": "The map setting that switches city rules on (carried like `victoryRules`: map file → lobby settings → init payload → system registry). Absent: no city system is registered and the match is byte-identical to one without it.",
      "type": "object",
      "required": [
        "setting"
      ],
      "properties": {
        "setting": {
          "$ref": "#/definitions/CitySetting"
        },
        "startingGold": {
          "description": "Gold each city starts with (added to the player's gold at match start). Default 2000.",
          "type": "number"
        },
        "startingTaxPercent": {
          "description": "Tax rate a city starts at, percent 0..20. Default 9.",
          "type": "number"
        },
        "combat": {
          "description": "Whether armies exist. Absent: the setting's default (off for Golden Age and the Grand Concord, on for Frontier and Rival Crowns, where the host chooses in the picker). Off: no seat trains an army, the HUD shows the city's population and treasury instead of food supply, and the preload skips army models. On: nothing changes. See `citySettings.ts`.",
          "type": "boolean"
        },
        "pickerSeat": {
          "description": "The seat that picks the setting at match start (the host; in single player the player). Present: the city waits for that seat's `city_set_setting` (or the pick timeout) before it starts. Set by `Game` from the roster, never by a map (`resolveMatchCityRules` drops it). See `citySettings.ts`.",
          "type": "number"
        },
        "founding": {
          "description": "Wave 3 (appended). 'choose': no seat starts with a hall or units; each founds its city with `city_found` once the setting is picked. Absent or 'placed': the map places the hall, as every map before founding.",
          "$ref": "#/definitions/CityFounding"
        },
        "spawns": {
          "description": "Wave 3 (appended). Each seat's map spawn, set by `Game` (and the headless harness) from the roster and the map's `spawns`, never by a map (`resolveMatchCityRules` drops it, as it does `pickerSeat`). A seat that has not founded when founding times out is founded there, or at the nearest valid spot to it.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CityFoundingSpawn"
          }
        },
        "raids": {
          "description": "Frontier (wave 4): whether raids come and lairs stand. Absent: on in the Frontier (and never in any other setting). A map sets false for a quiet frontier.",
          "type": "boolean"
        },
        "disasters": {
          "description": "Frontier (wave 4): whether the storm, the flood and the earthquake come. Absent: on in the Frontier, never elsewhere.",
          "type": "boolean"
        },
        "menu": {
          "description": "The setup screen this map opens in (its Play in Custom Games, or `/play?city=setup&map=<ref>`): Cities of Stone's own (the founders, the setting, the city's name, gold and combat) over this land, titled, tagged and badged by the menu. Absent: under the map's own name. `false`: no setup screen; the map launches as it is. Menus only; the sim never reads it.",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/FrontDoorMenu"
            }
          ]
        },
        "unlocks": {
          "description": "Lore (wave 5): unlock ids every seat holds from the start, free of Lore and whatever its hall (a scenario map's head start; test fixtures). Absent: none.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "startingLore": {
          "description": "Lore (wave 5): Lore each seat starts with (whole, at least 0). Absent: none.",
          "type": "number"
        },
        "seasons": {
          "description": "Wave 7: false turns the lean season (and granaries) off; absent or true, the setting's own.",
          "type": "boolean"
        },
        "settingChosen": {
          "description": "Wave 12: the setting was chosen before the match (the setup screen): no seat picks it again at its start.",
          "type": "boolean"
        },
        "guide": {
          "description": "Wave 12: the HUD shows the guide's steps (true: the tutorial). Wave 16a: false keeps it off without asking; absent, a solo player is asked at the city's start.",
          "type": "boolean"
        },
        "cityName": {
          "description": "Wave 15: the name a city of one's own starts with (the setup screen's); absent: its founders' naming.",
          "type": "string"
        },
        "roadCrew": {
          "description": "Wave 16a: true keeps wave 1's road crew (planned tiles laid by worker units over time); absent, a city road stands at once.",
          "type": "boolean"
        },
        "tuning": {
          "description": "The map's own city numbers: services, needs, taxes, demand, tiers, seasons, the founding hall, tool unlocks and peoples. Absent: the shipped ones.",
          "$ref": "#/definitions/CityTuningOverrides"
        },
        "layout": {
          "description": "What `city_zone` does with a zone: 'plots' lays plots along every frontage in its rectangle (Fill area); 'zones' (absent, as every city before plots) paints the tiles and lots grow from them. A match's rules default to 'plots' (citySettings `resolveMatchCityRules`); a map may keep 'zones'. `city_plot` lays plots either way.",
          "type": "string",
          "enum": [
            "zones",
            "plots"
          ]
        }
      },
      "additionalProperties": false
    },
    "CityServiceOverride": {
      "description": "One service's numbers. Absent fields keep the shipped value.",
      "type": "object",
      "properties": {
        "cost": {
          "description": "Gold to place one (0..100000).",
          "type": "number"
        },
        "upkeep": {
          "description": "Gold a game minute while it stands, at full funding (0..10000).",
          "type": "number"
        },
        "radius": {
          "description": "How far its coverage reaches, in tiles (1..64): road tiles walked from its kerb; a park's beauty, tiles from its edge.",
          "type": "number"
        },
        "buildSteps": {
          "description": "City steps (seconds) to build before it covers anything (1..600).",
          "type": "number"
        },
        "jobs": {
          "description": "Jobs it provides once built (0..500).",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "CitySetting": {
      "description": "The four settings the host picks at match start.",
      "type": "string",
      "enum": [
        "golden_age",
        "frontier",
        "rival_crowns",
        "grand_concord"
      ]
    },
    "CityTuningOverrides": {
      "description": "A map's own city numbers: `rules.city.tuning`. Every field is optional; an absent field keeps the shipped value. Numbers must be whole and in range.",
      "type": "object",
      "properties": {
        "services": {
          "description": "Per service: cost, upkeep, reach, build time and jobs.",
          "type": "object",
          "properties": {
            "fire": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "water": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "health": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "safety": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "faith": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "learning": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "entertainment": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "market": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "park": {
              "$ref": "#/definitions/CityServiceOverride"
            },
            "academy": {
              "$ref": "#/definitions/CityServiceOverride"
            }
          },
          "additionalProperties": false
        },
        "needs": {
          "description": "Needs per zone and level: `[level 1, level 2, level 3]`, each a list of services (or 'food'). A lot missing a need of its level declines; one missing a need of the next level stays where it is.",
          "type": "object",
          "properties": {
            "residential": {
              "$ref": "#/definitions/CityNeedLevels"
            },
            "commercial": {
              "$ref": "#/definitions/CityNeedLevels"
            },
            "industrial": {
              "$ref": "#/definitions/CityNeedLevels"
            },
            "farm": {
              "$ref": "#/definitions/CityNeedLevels"
            }
          },
          "additionalProperties": false
        },
        "taxes": {
          "description": "Taxes, paid once a game minute.",
          "type": "object",
          "properties": {
            "perResident": {
              "description": "Gold per resident a minute at a 100% rate (0..100).",
              "type": "number"
            },
            "perCommercialJob": {
              "description": "Gold per shop job a minute at a 100% rate (0..100).",
              "type": "number"
            },
            "perIndustrialJob": {
              "description": "Gold per works job a minute at a 100% rate (0..100).",
              "type": "number"
            },
            "maxPercent": {
              "description": "The highest tax rate a city may set, percent (1..100).",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "demand": {
          "description": "Demand: how strongly the city wants homes, shops and works.",
          "type": "object",
          "properties": {
            "workforcePercent": {
              "description": "Share of residents who work, percent (1..100).",
              "type": "number"
            },
            "baseJobs": {
              "description": "Jobs the outside world offers before the city has any (0..100000).",
              "type": "number"
            },
            "commercialJobsPer100Pop": {
              "description": "Shop jobs wanted per 100 residents (0..1000).",
              "type": "number"
            },
            "baseCommercialJobs": {
              "description": "Shop jobs wanted before there are residents (0..100000).",
              "type": "number"
            },
            "industrialJobsPer100Workers": {
              "description": "Works jobs wanted per 100 workers (0..1000).",
              "type": "number"
            },
            "baseIndustrialJobs": {
              "description": "Works jobs wanted before there are workers (0..100000).",
              "type": "number"
            },
            "neutralTaxPercent": {
              "description": "The tax rate at which taxes neither help nor hurt demand, percent (0..100).",
              "type": "number"
            },
            "perTaxPercent": {
              "description": "Demand lost per tax percent over the neutral rate (0..20).",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "tiers": {
          "description": "The population each settlement tier starts at. Must rise from village to Concord.",
          "type": "object",
          "properties": {
            "village": {
              "type": "number"
            },
            "town": {
              "type": "number"
            },
            "city": {
              "type": "number"
            },
            "capital": {
              "type": "number"
            },
            "concord": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "seasons": {
          "description": "The year and its lean season (switch them off with `rules.city.seasons: false`).",
          "type": "object",
          "properties": {
            "yearSteps": {
              "description": "City steps (seconds) in a year (120..36000).",
              "type": "number"
            },
            "leanSteps": {
              "description": "Steps of the lean season at the year's end (1..half a year).",
              "type": "number"
            },
            "leanFoodPercent": {
              "description": "What farms yield in the lean season, percent (0..100), in every setting.",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "startingHallTier": {
          "description": "The hall a city founds with on a 'choose' map: 1 a town hall, 2 a keep, 3 a castle.",
          "type": "number"
        },
        "unlocks": {
          "description": "Which hall tier opens a tool: tool id (`zone_farm`, `service_fire`, `density_medium`...) to 0 (always open), 1, 2 or 3. Only the tools the halls open for free; an item Lore prices (avenues, for one) is handed out with `rules.city.unlocks` instead.",
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "peoples": {
          "description": "The peoples who may come to live in a city (its founders always may). Absent: all of them.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/CityFaction"
          }
        }
      },
      "additionalProperties": false
    },
    "CtfRules": {
      "type": "object",
      "required": [
        "enabled",
        "capturesToWin",
        "respawnSeconds",
        "carrierSlowdown",
        "eyeOfTheStormBonus"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "capturesToWin": {
          "type": "number"
        },
        "respawnSeconds": {
          "type": "number"
        },
        "carrierSlowdown": {
          "type": "number"
        },
        "eyeOfTheStormBonus": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "CustomGameDefinition": {
      "description": "Complete creator-owned game shell. Runtime content supplies aircraft/boards/physics.",
      "type": "object",
      "required": [
        "title",
        "id",
        "version"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "presentation": {
          "$ref": "#/definitions/CustomGamePresentation"
        },
        "pegboard": {
          "type": "object",
          "required": [
            "ranks"
          ],
          "properties": {
            "ranks": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "title",
                  "threshold",
                  "nextXp",
                  "color"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "threshold": {
                    "type": "number"
                  },
                  "nextXp": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "color": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "shooter": {
          "type": "object",
          "required": [
            "levels",
            "order",
            "starterHomeLevels"
          ],
          "properties": {
            "initialFighterId": {
              "type": "string"
            },
            "achievements": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "title",
                  "description",
                  "metric",
                  "target",
                  "artPath"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "metric": {
                    "type": "string"
                  },
                  "target": {
                    "type": "number"
                  },
                  "artPath": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "levels": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/AcesLevelConfig"
              }
            },
            "order": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "starterHomeLevels": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "adventure": {
              "type": "object",
              "required": [
                "acts",
                "missions",
                "levels",
                "rankCosts",
                "rankGates",
                "moduleSlots",
                "initialAircraft",
                "aircraftUnlocks",
                "moduleUnlocks",
                "moduleEffects",
                "baseCraftStats",
                "moduleMetadata",
                "trackMetadata"
              ],
              "properties": {
                "acts": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/AdventureAct"
                  }
                },
                "missions": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/AdventureMission"
                  }
                },
                "levels": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/definitions/AcesLevelConfig"
                  }
                },
                "rankCosts": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                "rankGates": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "moduleSlots": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "initialAircraft": {
                  "type": "string"
                },
                "aircraftUnlocks": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "moduleUnlocks": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "moduleEffects": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string",
                    "enum": [
                      "spreadShot",
                      "piercing",
                      "shrapnel",
                      "capacitorOverload",
                      "emergencyPatch",
                      "persistentShield",
                      "reinforcedHull"
                    ]
                  }
                },
                "baseCraftStats": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/definitions/AdventureBaseCraftStats"
                  }
                },
                "moduleMetadata": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "required": [
                      "name",
                      "desc",
                      "icon",
                      "unlockMission"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "desc": {
                        "type": "string"
                      },
                      "icon": {
                        "type": "string"
                      },
                      "unlockMission": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "trackMetadata": {
                  "type": "object",
                  "required": [
                    "shield",
                    "cannon",
                    "capacitor",
                    "hull",
                    "ordnance"
                  ],
                  "properties": {
                    "shield": {
                      "type": "object",
                      "required": [
                        "name",
                        "desc",
                        "icon"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "desc": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "cannon": {
                      "type": "object",
                      "required": [
                        "name",
                        "desc",
                        "icon"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "desc": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "capacitor": {
                      "type": "object",
                      "required": [
                        "name",
                        "desc",
                        "icon"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "desc": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "hull": {
                      "type": "object",
                      "required": [
                        "name",
                        "desc",
                        "icon"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "desc": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "ordnance": {
                      "type": "object",
                      "required": [
                        "name",
                        "desc",
                        "icon"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "desc": {
                          "type": "string"
                        },
                        "icon": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "id": {
          "type": "string"
        },
        "version": {
          "type": "number"
        },
        "cloud": {
          "type": "boolean"
        },
        "endpoints": {
          "description": "Optional creator-owned HTTPS endpoints. No game/account cookies are sent.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "url",
              "method"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "method": {
                "type": "string",
                "enum": [
                  "GET",
                  "POST",
                  "PUT"
                ]
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "CustomGameFogEdgeStyle": {
      "type": "string",
      "enum": [
        "smooth",
        "rough",
        "sharp"
      ]
    },
    "CustomGameNightDarkening": {
      "type": "string",
      "enum": [
        "medium",
        "none",
        "weak",
        "strong"
      ]
    },
    "CustomGamePresentation": {
      "description": "What a game's menus show around its content. Every field is optional: a game leaves out what it does not restyle and keeps the built-in art (presentationDefaults.ts). Each board's and level's own picture lives with it in the content (`art`, and a board's `backdrop`). Paths are asset paths.",
      "type": "object",
      "properties": {
        "logo": {
          "type": "string"
        },
        "loadingArt": {
          "type": "string"
        },
        "backdrop": {
          "description": "The lobby's painted backdrop (Drop of Stone's foundry hall).",
          "type": "string"
        },
        "dais": {
          "description": "Where the chosen hero stands in `backdrop`: the platform's centre and the hero's height, as fractions of the picture, and the painting's pitch in degrees.",
          "$ref": "#/definitions/LobbyDais"
        },
        "factionBackdrops": {
          "description": "The hangar behind each people's aircraft, by people (Aces of Stone); a `-loop.mp4`/`.webm` beside it plays.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "CustomGameSettingsOverrides": {
      "type": "object",
      "properties": {
        "cloudsEnabled": {
          "type": "boolean"
        },
        "cloudRenderingQuality": {
          "type": "string",
          "enum": [
            "classic",
            "volumetric-low",
            "volumetric-high"
          ]
        },
        "cloudShadowsEnabled": {
          "type": "boolean"
        },
        "weatherEffectsEnabled": {
          "type": "boolean"
        },
        "nightDarkening": {
          "$ref": "#/definitions/CustomGameNightDarkening"
        },
        "fogEdgeStyle": {
          "$ref": "#/definitions/CustomGameFogEdgeStyle"
        },
        "islandMotionEnabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "CustomMapCapabilities": {
      "type": "object",
      "properties": {
        "renderModes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "2d",
              "3d"
            ]
          }
        },
        "mobile2D": {
          "$ref": "#/definitions/CustomMapCapabilityStatus"
        },
        "mobile3D": {
          "$ref": "#/definitions/CustomMapCapabilityStatus"
        },
        "status": {
          "$ref": "#/definitions/CustomMapCapabilityStatus"
        }
      },
      "additionalProperties": false
    },
    "CustomMapCapabilityStatus": {
      "description": "Honest runtime support declarations for a custom map. Omitted fields mean the author has not assessed that target; old maps remain valid and load as legacy 2D content.",
      "type": "string",
      "enum": [
        "supported",
        "unsupported",
        "not_assessed"
      ]
    },
    "CustomMapRuntime": {
      "description": "Public engine controllers. Content and scripts belong to the map, never a mode config.",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "content"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "scrolling-shooter"
            },
            "content": {
              "$ref": "#/definitions/ShooterContent"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "content"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "pegboard"
            },
            "content": {
              "$ref": "#/definitions/PegboardContent"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "DamageType": {
      "type": "string",
      "enum": [
        "siege",
        "slash",
        "pierce",
        "blunt",
        "fire",
        "frost",
        "lightning",
        "arcane",
        "shadow",
        "nature",
        "holy",
        "water"
      ]
    },
    "DominationRules": {
      "type": "object",
      "required": [
        "enabled",
        "targetScore",
        "pointsCount",
        "scorePerSecPerPoint"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "targetScore": {
          "type": "number"
        },
        "pointsCount": {
          "type": "integer",
          "enum": [
            5,
            3
          ]
        },
        "scorePerSecPerPoint": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "DropCampaignMission": {
      "type": "object",
      "required": [
        "id",
        "number",
        "title",
        "storyIntro",
        "objective",
        "stageId",
        "stage",
        "stageDef",
        "objectives",
        "unlockAfter"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "number": {
          "type": "number"
        },
        "title": {
          "type": "string"
        },
        "storyIntro": {
          "type": "string"
        },
        "objective": {
          "type": "string"
        },
        "stageId": {
          "$ref": "#/definitions/StageId"
        },
        "stage": {
          "description": "A complete board definition ready for DropOfStoneManager.",
          "$ref": "#/definitions/StageDef"
        },
        "stageDef": {
          "description": "Alias kept for callers that name the manager input explicitly.",
          "$ref": "#/definitions/StageDef"
        },
        "objectives": {
          "$ref": "#/definitions/DropMissionObjectives"
        },
        "unlockAfter": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "DropMissionObjectives": {
      "type": "object",
      "required": [
        "bronze",
        "silver",
        "gold"
      ],
      "properties": {
        "bronze": {
          "type": "number"
        },
        "silver": {
          "type": "number"
        },
        "gold": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "FighterDef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "race",
        "faction",
        "factionColor",
        "role",
        "weapon",
        "special",
        "spriteKey",
        "speed",
        "armor",
        "firepower",
        "desc",
        "weaponProfile",
        "bombDamage"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "race": {
          "$ref": "#/definitions/PlayableRace"
        },
        "faction": {
          "type": "string"
        },
        "factionColor": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "weapon": {
          "type": "string"
        },
        "special": {
          "type": "string"
        },
        "spriteKey": {
          "type": "string"
        },
        "speed": {
          "type": "number"
        },
        "armor": {
          "type": "number"
        },
        "firepower": {
          "type": "number"
        },
        "desc": {
          "type": "string"
        },
        "weaponProfile": {
          "description": "Distinct arcade handling profile used by the live weapon/bomb code.",
          "type": "string",
          "enum": [
            "frost",
            "shadow",
            "cannon",
            "solar",
            "storm",
            "javelin",
            "thorn",
            "sunstone",
            "scrap"
          ]
        },
        "bombDamage": {
          "type": "number"
        },
        "advanced": {
          "description": "Advanced faction aircraft are earned by clearing the full starter tour.",
          "type": "boolean"
        },
        "starterId": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FrontDoorMapEntry": {
      "description": "Another map a front door lists.",
      "type": "object",
      "required": [
        "map",
        "name"
      ],
      "properties": {
        "map": {
          "description": "`/maps/<file>.json` (a shipped map) or `community:<id>` (a published map).",
          "type": "string"
        },
        "name": {
          "description": "Its name in the menu. 1..80 characters.",
          "type": "string"
        },
        "blurb": {
          "description": "One line under the name. Up to 240 characters.",
          "type": "string"
        },
        "art": {
          "description": "Its card's picture: a shipped `/assets/` image or a `ugc:` upload, under loading art's rule (absent: the game's own).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FrontDoorMenu": {
      "description": "What every front door's menu may restyle. Each field absent is the shipped game's.",
      "type": "object",
      "properties": {
        "title": {
          "description": "The menu's title (absent: the map's name). 1..80 characters.",
          "type": "string"
        },
        "tagline": {
          "description": "One line under the logo. 1..160 characters.",
          "type": "string"
        },
        "logo": {
          "description": "The logo: a shipped `/assets/` image or a `ugc:` upload, under loading art's rule (absent: the game's own).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "HillRules": {
      "type": "object",
      "required": [
        "enabled",
        "hold",
        "radius",
        "reveal"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "hold": {
          "$ref": "#/definitions/HoldLength"
        },
        "radius": {
          "description": "Tiles from the Monument centre that count toward control.",
          "type": "number"
        },
        "reveal": {
          "description": "Mark the Monument on the minimap (white until captured, then the controller's colour). Off makes it a landmark you must scout.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "HoldLength": {
      "description": "How long a Wonder / Relic set / Monument must be HELD before it wins.",
      "type": "string",
      "enum": [
        "standard",
        "short",
        "long"
      ]
    },
    "InGameScene": {
      "type": "object",
      "required": [
        "id",
        "durationSec",
        "camera"
      ],
      "properties": {
        "id": {
          "description": "Stable authored id — what `Action{k:'playCutscene'}` names.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "durationSec": {
          "type": "number"
        },
        "fps": {
          "type": "integer",
          "enum": [
            30,
            60,
            24
          ]
        },
        "hud": {
          "description": "true = HUD stays visible. Default false (HUD hidden for the duration).",
          "type": "boolean"
        },
        "lockInput": {
          "description": "Swallow player input for the duration. Default true.",
          "type": "boolean"
        },
        "letterbox": {
          "description": "Draw cinematic bars. Default true.",
          "type": "boolean"
        },
        "fade": {
          "description": "Screen fade in/out transition.",
          "$ref": "#/definitions/SceneFadeSpec"
        },
        "dayNight": {
          "description": "Time-of-day override for the shot. PRESENTATION ONLY: it must not reach `DayNightCycle`, which is sim state that feeds fog radii.",
          "type": "object",
          "properties": {
            "timeOfDay": {
              "type": "number"
            },
            "speedMultiplier": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SceneLine"
          }
        },
        "sounds": {
          "description": "Timed sound cues. Presentation only — see SceneSoundCue.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SceneSoundCue"
          }
        },
        "camera": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CamKeyframe"
          }
        },
        "camera2d": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Cam2DKeyframe"
          }
        }
      },
      "additionalProperties": false
    },
    "ItemAffix": {
      "description": "A single random bonus rolled onto an item instance. Applied as a Buff with id 'item:<slot>:<defId>:affix:<n>'.",
      "type": "object",
      "required": [
        "id",
        "stat",
        "value",
        "label"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "stat": {
          "type": "string"
        },
        "value": {
          "type": "number"
        },
        "label": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ItemInstance": {
      "description": "The optional per-instance data layer carried by an inventory/equipment slot or a ground item. Round-trips through EntitySerialization.",
      "type": "object",
      "required": [
        "defId",
        "itemLevel",
        "rarity",
        "source",
        "rolledStats",
        "affixes",
        "procs"
      ],
      "properties": {
        "defId": {
          "type": "string"
        },
        "itemLevel": {
          "type": "number"
        },
        "rarity": {
          "$ref": "#/definitions/ItemRarity"
        },
        "source": {
          "type": "string",
          "enum": [
            "preset",
            "drop",
            "gambling"
          ]
        },
        "rolledStats": {
          "description": "Base def stats scaled by itemLevel.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "stat",
              "value"
            ],
            "properties": {
              "stat": {
                "type": "string"
              },
              "value": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "affixes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ItemAffix"
          }
        },
        "procs": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ItemProc"
          }
        },
        "grantsDamageType": {
          "description": "Elemental weapon → ADDS this element as a bonus rider to the hero's attacks while equipped (does NOT swap the primary Combat.damageType). The per-hit amount applied lives in ItemSystem (see elementRiderAmount).",
          "$ref": "#/definitions/DamageType"
        },
        "elementAmount": {
          "description": "Optional explicit per-hit elemental rider amount. When set it overrides ItemSystem's rarity/itemLevel-derived default.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "ItemProc": {
      "description": "An on-hit proc registered while the item is equipped. The proc system fires it on the 'attack-landed' event. Either an elemental damage burst (element+damage) or a short self-buff aura (auraStat+auraValue+durationTicks).",
      "type": "object",
      "required": [
        "id",
        "trigger",
        "chance",
        "label"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "trigger": {
          "type": "string",
          "const": "on_hit"
        },
        "chance": {
          "description": "0..1 chance to fire per landed attack.",
          "type": "number"
        },
        "element": {
          "description": "Bonus elemental damage burst.",
          "$ref": "#/definitions/DamageType"
        },
        "damage": {
          "type": "number"
        },
        "auraStat": {
          "description": "Temporary self-buff applied on proc.",
          "type": "string"
        },
        "auraValue": {
          "type": "number"
        },
        "durationTicks": {
          "type": "number"
        },
        "label": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ItemRarity": {
      "type": "string",
      "enum": [
        "common",
        "uncommon",
        "rare",
        "epic",
        "legendary"
      ]
    },
    "KingReveal": {
      "description": "Who sees a King on the minimap.",
      "type": "string",
      "enum": [
        "always",
        "owner",
        "never"
      ]
    },
    "LobbyDais": {
      "description": "Where the chosen hero stands in a lobby backdrop: the platform's centre (x, y) and the hero's height, as fractions of the picture, and the painting's pitch in degrees.",
      "type": "object",
      "required": [
        "x",
        "y",
        "height",
        "pitch"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "height": {
          "type": "number"
        },
        "pitch": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "MapEnvironment": {
      "description": "Per-map environment overrides. Every field is optional; an absent field means \"use the biome default\", which is what keeps the block omittable.",
      "type": "object",
      "properties": {
        "weather": {
          "description": "Overrides `BIOME_WEATHER` for this map. Cosmetic.",
          "$ref": "#/definitions/WeatherKind"
        },
        "weatherIntensity": {
          "description": "0..1 multiplier on precipitation density. Cosmetic.",
          "type": "number"
        },
        "timeOfDay": {
          "description": "0..1 through the day/night cycle, matching `DayNightCycle.getDayProgress()`. **SIM-AFFECTING** — see the header. 0 is the historical cycle start.",
          "type": "number"
        },
        "dayNightSpeed": {
          "description": "Cycle speed multiplier. 0 freezes the map at `timeOfDay`, 1 is normal, N runs the sun N× faster. **SIM-AFFECTING** — see the header.",
          "type": "number"
        },
        "lightTint": {
          "description": "Hex multiply applied to `Ambient3D` / `Sun3D`. `0xffffff` is neutral.",
          "type": "number"
        },
        "sky": {
          "description": "Sky dome anchors, overriding `BIOME_SKY_DAY[biome]`.",
          "$ref": "#/definitions/MapSkyOverride"
        },
        "fogDensity": {
          "description": "Multiplier on the biome's atmospheric fog. 1 is the biome default; >1 is thicker air. Cosmetic — this is scene fog, NOT fog of war.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "MapFormatVersion": {
      "description": "Every format version that has ever been written.",
      "type": "integer",
      "enum": [
        1,
        5,
        4,
        2,
        3
      ]
    },
    "MapPlayerSlot": {
      "description": "One authored seat. Everything except `id` is optional; an omitted field means \"whatever the engine would have done\", so a partially-filled roster is safe.",
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "description": "Seat index (0..MAX_PLAYERS-1). Matches the `p` on entities.",
          "type": "number"
        },
        "controller": {
          "$ref": "#/definitions/MapSeatController"
        },
        "race": {
          "description": "The seat's faction. THE reason this roster exists: nothing in the format carried a race before, so `inferPlayerRacesFromMap` tallied entity id prefixes and took the majority — which mislabels any seat whose army is mixed, mercenary-heavy, or empty.",
          "type": "string",
          "enum": [
            "dwarf",
            "goblin",
            "ratmen",
            "lizardmen",
            "wood_elf",
            "high_elf",
            "dark_elf",
            "human",
            "undead",
            "random"
          ]
        },
        "team": {
          "description": "Allies share a team. Absent ⇒ own team (free-for-all), as today.",
          "type": "number"
        },
        "color": {
          "description": "Minimap/unit colour index override.",
          "type": "number"
        },
        "res": {
          "description": "ABSOLUTE starting resources for this seat — overrides `STARTING_RESOURCE_PRESETS`, which is a global, all-seats setting.",
          "type": "object",
          "properties": {
            "gold": {
              "type": "number"
            },
            "lumber": {
              "type": "number"
            },
            "stone": {
              "type": "number"
            },
            "oil": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "workers": {
          "description": "Starting worker count override (default `STARTING_WORKERS`).",
          "type": "number"
        },
        "tech": {
          "description": "Upgrade / building ids this seat starts having researched or unlocked.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ai": {
          "description": "Per-seat AI configuration.",
          "type": "object",
          "properties": {
            "difficulty": {
              "type": "string",
              "enum": [
                "medium",
                "easy",
                "hard",
                "llm"
              ]
            },
            "personality": {
              "description": "Forced AI personality (otherwise drawn from `gameRandom`).",
              "type": "string"
            },
            "firstAttackTick": {
              "description": "First tick this seat is allowed to attack.",
              "type": "number"
            },
            "passive": {
              "description": "Never attacks.",
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "camera": {
          "description": "Where this seat's CAMERA starts, if not at its town hall.",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        }
      },
      "additionalProperties": false
    },
    "MapRules": {
      "description": "Per-map rule overrides. Every field absent ⇒ shipped behaviour.",
      "type": "object",
      "properties": {
        "heroes": {
          "description": "Hero uniqueness/cap rules — see `players/heroRules.ts`.",
          "type": "object",
          "properties": {
            "uniquePerPlayer": {
              "description": "Reject a train when this player already has that heroId alive or queued. `true` = shipped behaviour.",
              "type": "boolean"
            },
            "uniqueGlobal": {
              "description": "Reject a train when ANY player already has that heroId alive or queued. `false` = shipped behaviour (heroes are unique per player, not per match).",
              "type": "boolean"
            },
            "capOverride": {
              "description": "Absolute cap on living+queued heroes per player, replacing the town-hall tier cap. `null` = shipped behaviour (tier 1: 1 hero, tier 2: 2 heroes, tier 3: 3 heroes max). A number applies at every tier.",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "additionalProperties": false
        },
        "standardVictory": {
          "description": "`false` disables the last-team-standing win check entirely.",
          "type": "boolean"
        },
        "minPlayers": {
          "type": "number"
        },
        "maxPlayers": {
          "type": "number"
        },
        "noStartingUnits": {
          "description": "`true` suppresses the automatic town-hall + workers fallback.",
          "type": "boolean"
        },
        "targetFps": {
          "description": "The frame rate this map asks the adaptive graphics to hold (20..120; mapTargetFps.ts). The match aims for the higher of this and the player's own setting, trading graphics detail to hold it. A race asks for 60.",
          "type": "number"
        },
        "keepResolution": {
          "description": "The adaptive graphics keep the render resolution until shadows, terrain, trees, water and grass detail are spent (mapTargetFps.ts `mapAdaptiveHold`). A race sets it: at speed blur reads worse than plainer scenery.",
          "type": "boolean"
        },
        "fog": {
          "description": "Fog mode override.",
          "type": "string",
          "enum": [
            "normal",
            "explored",
            "off"
          ]
        },
        "victory": {
          "description": "Victory ruleset pinned BY THE MAP — see `players/victoryRules.ts`.",
          "type": "object",
          "properties": {
            "preset": {
              "description": "The name the player picked. Presentation and telemetry only — no system branches on it, they branch on the flags below.",
              "type": "string",
              "enum": [
                "standard",
                "conquest",
                "wonder",
                "relics",
                "regicide",
                "score",
                "domination",
                "king_of_hill",
                "capture_the_flag"
              ]
            },
            "conquest": {
              "description": "Last-team-standing is armed.",
              "type": "boolean"
            },
            "wonder": {
              "$ref": "#/definitions/WonderRules"
            },
            "relics": {
              "$ref": "#/definitions/RelicRules"
            },
            "regicide": {
              "$ref": "#/definitions/RegicideRules"
            },
            "hill": {
              "$ref": "#/definitions/HillRules"
            },
            "score": {
              "$ref": "#/definitions/ScoreRules"
            },
            "domination": {
              "$ref": "#/definitions/DominationRules"
            },
            "ctf": {
              "$ref": "#/definitions/CtfRules"
            }
          },
          "additionalProperties": false
        },
        "city": {
          "description": "Cities of Stone (docs/modes/CITIES_OF_STONE.md): present, the match runs a city sim (zoning, lots, taxes) on this map. Like victory a map value wins over the lobby's. Absent: no city system exists and the match is byte-identical to one played before cities did.",
          "$ref": "#/definitions/CityRules"
        },
        "race": {
          "description": "Wheels of Stone (docs/modes/WHEELS_OF_STONE.md): present, the match is a race round this map's circuit (`race/raceTypes.ts`), every seat drives a race car and empty seats are AI drivers. Absent: no race system exists and the match is byte-identical to one played before races did.",
          "$ref": "#/definitions/RaceRules"
        },
        "sea": {
          "description": "Sea of Stone (docs/modes/SEA_OF_STONE.md): present, the match is a voyage (`sea/seaTypes.ts`): every seat is a crew with one ship, fishing, trading and sailing between this map's ports. Absent: no sea system exists and the match is byte-identical to one played before the sea.",
          "$ref": "#/definitions/SeaRules"
        },
        "brink": {
          "description": "Brink of Stone (docs/modes/BRINK_OF_STONE.md): present, the match is a spell brawl on this map's arena (`brink/brinkTypes.ts`): every seat is a caster on a shrinking platform, empty seats are bots. Absent: no arena system exists and the match is byte-identical to one played before it.",
          "$ref": "#/definitions/BrinkRules"
        },
        "survivors": {
          "description": "Shard Survivors (docs/modes/SHARD_SURVIVORS.md): present, the match is a run (`survivors/survivorsTypes.ts`): every person is a hero in the middle of a zone, attacks and spells cast themselves, the horde closes in and bosses come on the clock. Absent: no run system exists and the match is byte-identical to one played before it.",
          "$ref": "#/definitions/SurvivorsRules"
        },
        "party": {
          "description": "Grumbar Party (docs/modes/GRUMBAR_PARTY.md): present, the match is a party (`party/partyTypes.ts`): every seat is a guest, empty seats are AI guests, and the match is a string of minigames in this map's arenas. Absent: no party system exists and the match is byte-identical to one played before.",
          "$ref": "#/definitions/PartyRules"
        },
        "disableAi": {
          "description": "`true` prevents AISystem and LLMAISystem from running macro/attack logic for AI players. Useful for scripted Tower Defense, RPGs, or boss encounter maps where creeps/invaders are controlled strictly by triggers.",
          "type": "boolean"
        },
        "allowedBuildings": {
          "description": "Optional whitelist of building IDs the player's builders can construct. If set, only these buildings appear in the build menu and can be constructed. Ideal for Tower Defense maps where builders should only build towers.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "MapScript": {
      "description": "One custom script a map carries.",
      "type": "object",
      "required": [
        "id",
        "lang",
        "source",
        "compiled",
        "apiLevel"
      ],
      "properties": {
        "id": {
          "description": "Author-visible identity, unique within the map.",
          "type": "string"
        },
        "lang": {
          "description": "What `source` is written in. `js` skips the TypeScript strip, not the bans.",
          "type": "string",
          "enum": [
            "ts",
            "js"
          ]
        },
        "source": {
          "description": "The author's text. Authoring only — never evaluated.",
          "type": "string"
        },
        "compiled": {
          "description": "The JavaScript the sandbox runs. Must equal a fresh compile of `source`.",
          "type": "string"
        },
        "apiLevel": {
          "description": "The script API level `source` was written against.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "MapSeatController": {
      "description": "How a seat is driven. `user`/`computer` are the two that produce a `Player`; the rest exist so an author can reserve or disable a slot. `creep` and `hostile` map onto the neutral-hostile owner, `neutral` onto the `p < 0` prop owner.",
      "type": "string",
      "enum": [
        "neutral",
        "creep",
        "none",
        "user",
        "computer",
        "hostile"
      ]
    },
    "MapSimulationProfile": {
      "type": "object",
      "required": [
        "mode",
        "tickRate"
      ],
      "properties": {
        "mode": {
          "description": "Local opts out of RTS lockstep. It is never accepted in an online lobby.",
          "type": "string",
          "enum": [
            "lockstep",
            "local"
          ]
        },
        "tickRate": {
          "type": "integer",
          "enum": [
            20,
            30,
            60,
            120
          ]
        }
      },
      "additionalProperties": false
    },
    "MapSkyOverride": {
      "description": "Sky anchors, structurally identical to a `BIOME_SKY_DAY` row.",
      "type": "object",
      "required": [
        "horizon",
        "zenith",
        "haze"
      ],
      "properties": {
        "horizon": {
          "type": "number"
        },
        "zenith": {
          "type": "number"
        },
        "haze": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "MapType": {
      "description": "The map's TOPOLOGY. Biome is the separate material axis — every map type is available in every biome, and nothing here names a climate.",
      "type": "string",
      "enum": [
        "standard",
        "river",
        "islands",
        "continents",
        "coastal",
        "arena",
        "dungeon",
        "skylands"
      ]
    },
    "MasterDef": {
      "type": "object",
      "required": [
        "id",
        "heroId",
        "name",
        "race",
        "faction",
        "factionColor",
        "title",
        "powerName",
        "powerDesc",
        "portrait",
        "passiveDesc"
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/MasterId"
        },
        "heroId": {
          "description": "Canonical hero identity used by animated portraits and model tooling.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "race": {
          "$ref": "#/definitions/PlayableRace"
        },
        "faction": {
          "type": "string"
        },
        "factionColor": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "powerName": {
          "type": "string"
        },
        "powerDesc": {
          "type": "string"
        },
        "portrait": {
          "type": "string"
        },
        "passiveDesc": {
          "type": "string"
        },
        "empoweredDesc": {
          "description": "What mastery rank 4 does to the power (DropOfStoneManager.empowered).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "MasterId": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "borin_dwarf",
            "aeloria_elf",
            "grok_orc",
            "vespera_undead",
            "iron_thane",
            "lunara_huntress"
          ]
        },
        {
          "type": "object",
          "required": [
            "length"
          ],
          "properties": {
            "length": {
              "description": "Returns the length of a String object.",
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "MercCampEntry": {
      "description": "One neutral hire building, as a saved map stores it.",
      "anyOf": [
        {
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        },
        {
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ],
          "minItems": 3,
          "maxItems": 3,
          "additionalItems": false
        }
      ]
    },
    "MovingObstacleDef": {
      "type": "object",
      "required": [
        "id",
        "type",
        "x",
        "y",
        "radius",
        "speed"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "sweeper",
            "cog",
            "bumper"
          ]
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "radius": {
          "type": "number"
        },
        "speed": {
          "type": "number"
        },
        "amplitude": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PartyAiSkill": {
      "type": "string",
      "enum": [
        "easy",
        "hard",
        "normal"
      ]
    },
    "PartyArenaDef": {
      "type": "object",
      "required": [
        "shape",
        "w",
        "edge",
        "floor",
        "dressing"
      ],
      "properties": {
        "shape": {
          "type": "string",
          "enum": [
            "circle",
            "rect"
          ]
        },
        "w": {
          "description": "Width (a circle's diameter), tiles.",
          "type": "number"
        },
        "h": {
          "description": "Height, tiles (a circle: ignored).",
          "type": "number"
        },
        "edge": {
          "$ref": "#/definitions/PartyEdge"
        },
        "floor": {
          "$ref": "#/definitions/PartyFloor"
        },
        "dressing": {
          "$ref": "#/definitions/PartyDressing"
        },
        "start": {
          "$ref": "#/definitions/PartyStart"
        },
        "obstacles": {
          "description": "Solid pillars, rocks or crates inside the arena.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PartyObstacle"
          }
        },
        "maze": {
          "description": "A maze of hedges laid by the generator and known to the sim (cell size, tiles).",
          "type": "number"
        },
        "finish": {
          "description": "The finish band for goal games: the north edge by default.",
          "type": "string",
          "enum": [
            "north",
            "east"
          ]
        },
        "night": {
          "description": "Night: the arena is lit by lanterns (the view darkens it).",
          "type": "boolean"
        },
        "sunken": {
          "description": "A sunken arena: its floor sits this many cliff levels (1..2) below the ground round it, and the cliff is its wall (no fence). Throwers stand up on the rim. Only for `edge: 'wall'`.",
          "type": "number"
        },
        "venue": {
          "description": "This arena's venue (default: the party's `venue`).",
          "$ref": "#/definitions/PartyVenue"
        },
        "biome": {
          "description": "The biome the arena is drawn in (its ground, grass, cliffs, water and light), swapped in place behind a fade when the party moves to it; absent: the one its dressing suggests (`partyArenaBiome`). Never a cave biome.",
          "$ref": "#/definitions/Biome"
        },
        "props": {
          "description": "The set piece: props laid round the game's own characters (the Scrap King's heap, the smith's anvil, the sentinel's plinth), at (x, y) tiles from the arena's centre. Scenery only: the sim never sees them.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PartySetPiece"
          }
        }
      },
      "additionalProperties": false
    },
    "PartyAvatarDef": {
      "description": "The guests' look and moves for one game.",
      "type": "object",
      "properties": {
        "costume": {
          "description": "A unit every guest becomes for this game (a sheep, an ogre, a cat). Absent: their own character.",
          "type": "string"
        },
        "scale": {
          "description": "Draw scale on the costume or character.",
          "type": "number"
        },
        "speed": {
          "description": "Top speed, tiles per second (default PARTY_SPEED).",
          "type": "number"
        },
        "accel": {
          "description": "How fast a guest reaches the speed it steers for (per second, default PARTY_ACCEL; ice is low).",
          "type": "number"
        },
        "radius": {
          "description": "Collision radius, tiles.",
          "type": "number"
        },
        "lives": {
          "description": "Hits a guest takes before it is out (survive games, default 1).",
          "type": "number"
        },
        "a": {
          "description": "Spacebar / pad A.",
          "$ref": "#/definitions/PartyButtonDef"
        },
        "b": {
          "description": "E / pad B.",
          "$ref": "#/definitions/PartyButtonDef"
        },
        "ghost": {
          "description": "Guests pass through each other (crossings, races). Default false.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "PartyButtonDef": {
      "description": "One button's action. A part may take a button over instead (the keg's throw, a mash).",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "dash"
            },
            "power": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "jump"
            },
            "seconds": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "shoot"
            },
            "look": {
              "$ref": "#/definitions/PartyShotLook"
            },
            "speed": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            },
            "homing": {
              "type": "number"
            },
            "life": {
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            },
            "radius": {
              "type": "number"
            },
            "bounce": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "whip"
            },
            "boost": {
              "type": "number"
            },
            "seconds": {
              "type": "number"
            },
            "heat": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sprint"
            },
            "boost": {
              "type": "number"
            },
            "seconds": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "lob"
            },
            "look": {
              "$ref": "#/definitions/PartyShotLook"
            },
            "range": {
              "type": "number"
            },
            "warn": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PartyDressing": {
      "description": "The look of an arena's surroundings (the generator's dressing kit).",
      "type": "string",
      "enum": [
        "market",
        "farm",
        "meadow",
        "forest",
        "graveyard",
        "castle",
        "ruins",
        "beach",
        "winter",
        "volcano",
        "swamp",
        "cavern",
        "garden",
        "circus",
        "scrapyard"
      ]
    },
    "PartyEdge": {
      "description": "What is past an arena's edge.",
      "type": "string",
      "enum": [
        "water",
        "lava",
        "wall"
      ]
    },
    "PartyFeelDef": {
      "description": "A game's feel knobs (PartyGameDef `feel`).",
      "type": "object",
      "properties": {
        "buffer": {
          "type": "number"
        },
        "coyote": {
          "type": "number"
        },
        "hitStop": {
          "type": "number"
        },
        "shake": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PartyFloor": {
      "description": "The ground the arena is drawn and played on. `ice` slides. `water` is open water inside its shore (the shore is the wall, no fence): for ships, a naval costume, which float on it.",
      "type": "string",
      "enum": [
        "water",
        "wood",
        "stone",
        "snow",
        "ice",
        "grass",
        "sand",
        "dirt",
        "ash"
      ]
    },
    "PartyFormat": {
      "description": "Who plays against whom.",
      "type": "string",
      "enum": [
        "ffa",
        "teams",
        "one_vs_all"
      ]
    },
    "PartyGameDef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "goal",
        "blurb",
        "controls",
        "format",
        "win",
        "seconds",
        "arena",
        "parts"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "goal": {
          "description": "One line on the title card: how to win.",
          "type": "string"
        },
        "blurb": {
          "description": "Two sentences on the title card.",
          "type": "string"
        },
        "quip": {
          "description": "The host's line on the title card (Grumbar's, in the shipped games).",
          "type": "string"
        },
        "controls": {
          "description": "The legend on the title card: what moving, A and B do, and `type` for a game played at the keyboard.",
          "type": "object",
          "properties": {
            "move": {
              "type": "string"
            },
            "a": {
              "type": "string"
            },
            "b": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "format": {
          "$ref": "#/definitions/PartyFormat"
        },
        "win": {
          "$ref": "#/definitions/PartyWin"
        },
        "seconds": {
          "description": "Time limit, seconds.",
          "type": "number"
        },
        "overtime": {
          "description": "A score game level at the whistle plays on until the next score breaks the tie, at most `seconds` more (then it ends level); `call` is the word on screen (default 'Sudden death!'). Not for a game whose part places the guests itself (a rope's lean).",
          "type": "object",
          "required": [
            "seconds"
          ],
          "properties": {
            "seconds": {
              "type": "number"
            },
            "call": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "camera": {
          "description": "The play camera, if not the party's own: `pitch` radians from looking straight down (the party's is about 0.8; 1.2 is low, down a street), `dist` tiles from what it looks at, `y` tiles south of the arena's middle to look at.",
          "type": "object",
          "properties": {
            "pitch": {
              "type": "number"
            },
            "dist": {
              "type": "number"
            },
            "y": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "target": {
          "description": "For `win: 'score'`: the first to this many points ends it.",
          "type": "number"
        },
        "lowWins": {
          "description": "Lowest score wins (a cursed skull).",
          "type": "boolean"
        },
        "arena": {
          "$ref": "#/definitions/PartyArenaDef"
        },
        "avatar": {
          "$ref": "#/definitions/PartyAvatarDef"
        },
        "parts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PartyPartDef"
          }
        },
        "tags": {
          "description": "Tags for the setup's filters and the HUD's chip: 'dodge', 'race', 'brawl', 'skill', 'luck', 'team', 'brains'.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "minPlayers": {
          "description": "Fewest guests it plays with (default 2).",
          "type": "number"
        },
        "feel": {
          "description": "Game feel, each optional (absent: the party's own, partyTuning `PARTY_BUFFER_SECONDS` and the rest; 0 turns one off). Rules, the same on every screen: `buffer`, seconds a press that came a moment too early (a cooldown, a hop not yet landed, a stun wearing off) is kept and fires the tick it can, 0..0.3; `coyote`, seconds a guest who runs off the floor in a game with a jump can still jump, and a skipping rope forgives a late hop, 0..0.3. Drawing only: `hitStop`, seconds the picture holds on a blow this screen's guest lands or takes, 0..0.2; `shake`, the camera shake on it, 0..1.",
          "$ref": "#/definitions/PartyFeelDef"
        }
      },
      "additionalProperties": false
    },
    "PartyGatherItem": {
      "description": "A pickup on offer in a gather game.",
      "type": "object",
      "required": [
        "look",
        "value",
        "weight"
      ],
      "properties": {
        "look": {
          "description": "A prop id, or `unit:<id>` for a creature that wanders (and flees with `flee`).",
          "type": "string"
        },
        "value": {
          "description": "Points it is worth (negative: a bad one).",
          "type": "number"
        },
        "weight": {
          "description": "How often it turns up relative to the others.",
          "type": "number"
        },
        "flee": {
          "description": "A creature runs from guests within this many tiles.",
          "type": "number"
        },
        "speed": {
          "description": "A creature's speed, tiles per second.",
          "type": "number"
        },
        "scale": {
          "description": "A creature drawn this much bigger, and a little easier to catch (a chicken across a wide field).",
          "type": "number"
        },
        "stun": {
          "description": "A bad one stuns the guest who takes it for this many seconds.",
          "type": "number"
        },
        "life": {
          "description": "Seconds it stays before it is gone again (a kobold popping up; absent: until taken).",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PartyHitEffect": {
      "description": "What a hit does to a guest.",
      "type": "string",
      "enum": [
        "hook",
        "out",
        "stun",
        "back",
        "knock",
        "wash",
        "freeze"
      ]
    },
    "PartyObstacle": {
      "type": "object",
      "required": [
        "x",
        "y"
      ],
      "properties": {
        "x": {
          "description": "Centre relative to the arena's centre, tiles.",
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Circle radius; or `w` and `h` for a box.",
          "type": "number"
        },
        "w": {
          "type": "number"
        },
        "h": {
          "type": "number"
        },
        "prop": {
          "description": "The prop drawn there (the generator places it; the sim only knows the shape).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PartyOrder": {
      "description": "The orders a boss can give in `obey`.",
      "type": "string",
      "enum": [
        "rune",
        "jump",
        "south",
        "west",
        "north",
        "east",
        "freeze",
        "move",
        "centre"
      ]
    },
    "PartyPartDef": {
      "description": "One mechanic. A game is a list of them.",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "look",
            "every",
            "count",
            "radius",
            "warn"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "barrage"
            },
            "look": {
              "$ref": "#/definitions/PartyShotLook"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "count": {
              "$ref": "#/definitions/PartyRamp"
            },
            "radius": {
              "$ref": "#/definitions/PartyRamp"
            },
            "warn": {
              "$ref": "#/definitions/PartyRamp"
            },
            "aim": {
              "description": "Share of the blasts aimed at a guest (the rest fall anywhere).",
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            },
            "line": {
              "type": "boolean"
            },
            "fire": {
              "type": "number"
            },
            "throwers": {
              "description": "Units drawn round the rim as the throwers (catapults), facing in.",
              "type": "object",
              "required": [
                "unit",
                "count"
              ],
              "properties": {
                "unit": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "flyer": {
              "description": "A line barrage's flyer: a unit that sweeps along each strafing run high up, over the middle as the fire falls.",
              "type": "object",
              "required": [
                "unit"
              ],
              "properties": {
                "unit": {
                  "type": "string"
                },
                "scale": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "from",
            "every",
            "max",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "swarm"
            },
            "unit": {
              "type": "string"
            },
            "look": {
              "type": "string"
            },
            "from": {
              "type": "string",
              "enum": [
                "edge",
                "holes",
                "trees",
                "graves",
                "hives"
              ]
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "max": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "radius": {
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            },
            "scale": {
              "description": "Each creature drawn this much bigger (small dark bats read as nothing from up high).",
              "type": "number"
            },
            "wake": {
              "description": "Seconds a spot glows before its creature wakes (trees, graves).",
              "type": "number"
            },
            "spots": {
              "description": "Spots creatures rise at (holes, trees, graves), placed by the generator.",
              "type": "number"
            },
            "movers": {
              "description": "They see only a guest that moves: one standing still is not hunted (bees).",
              "type": "boolean"
            },
            "sting": {
              "description": "Points a caught guest loses on top of the hit's own (a score game), default 0.",
              "type": "number"
            },
            "life": {
              "description": "Seconds a creature stays before it goes home (default: for good).",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "zombies",
            "costume"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "plague"
            },
            "zombies": {
              "type": "number"
            },
            "costume": {
              "type": "string"
            },
            "speed": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "fuse"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "hot_bomb"
            },
            "fuse": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "reach": {
              "type": "number"
            },
            "blast": {
              "type": "number"
            },
            "bombs": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cell",
            "crack",
            "fall",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "crumble"
            },
            "cell": {
              "type": "number"
            },
            "crack": {
              "type": "number"
            },
            "fall": {
              "type": "number"
            },
            "look": {
              "type": "string",
              "enum": [
                "wood",
                "stone",
                "ice"
              ]
            },
            "steps": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "arms",
            "speed",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sweeper"
            },
            "arms": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "look": {
              "type": "string",
              "enum": [
                "fire",
                "scythe",
                "log"
              ]
            },
            "reverse": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "low": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "radius",
            "speed",
            "every",
            "warn",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "safe_zone"
            },
            "radius": {
              "$ref": "#/definitions/PartyRamp"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "warn": {
              "type": "number"
            },
            "look": {
              "type": "string",
              "enum": [
                "fire",
                "frost",
                "spikes"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "dance",
            "claim"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "chairs"
            },
            "dance": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "claim": {
              "type": "number"
            },
            "seat": {
              "description": "What the guests claim (default 'throne'): a carved throne, a standing stone whose rune lights, a giant toadstool.",
              "type": "string",
              "enum": [
                "throne",
                "runestone",
                "toadstool"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "mode",
            "units",
            "speed",
            "gap"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "lanes"
            },
            "mode": {
              "type": "string",
              "enum": [
                "cross",
                "stampede",
                "surf"
              ]
            },
            "units": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "gap": {
              "$ref": "#/definitions/PartyRamp"
            },
            "lanes": {
              "description": "`cross`: carts in lanes across a long arena. `stampede`: herds charging down the field. `surf`: waves rolling down lanes.",
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            },
            "look": {
              "type": "string",
              "enum": [
                "unit",
                "wave"
              ]
            },
            "size": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "green",
            "red",
            "warn"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "stop_go"
            },
            "green": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "red": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "warn": {
              "type": "number"
            },
            "perch": {
              "type": "number"
            },
            "watcher": {
              "description": "Who keeps watch from the far end (absent: nobody, the towers' lamps alone).",
              "type": "string"
            },
            "towers": {
              "description": "Lamp towers in pairs along the sides, their lamps green, amber and red with the light.",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "boss",
            "every",
            "window",
            "orders"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "obey"
            },
            "boss": {
              "type": "string"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "window": {
              "$ref": "#/definitions/PartyRamp"
            },
            "orders": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PartyOrder"
              }
            },
            "perch": {
              "type": "number"
            },
            "back": {
              "description": "How far behind the arena's north edge the boss stands, tiles (1.6): further back for a set piece under him.",
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "forms",
            "names"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "rps"
            },
            "forms": {
              "type": "array",
              "items": [
                {
                  "type": "string"
                },
                {
                  "type": "string"
                },
                {
                  "type": "string"
                }
              ],
              "minItems": 3,
              "maxItems": 3,
              "additionalItems": false
            },
            "names": {
              "type": "array",
              "items": [
                {
                  "type": "string"
                },
                {
                  "type": "string"
                },
                {
                  "type": "string"
                }
              ],
              "minItems": 3,
              "maxItems": 3,
              "additionalItems": false
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "look",
            "from",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "fetch"
            },
            "look": {
              "type": "string"
            },
            "from": {
              "type": "string",
              "enum": [
                "centre",
                "sky"
              ]
            },
            "at": {
              "type": "string",
              "const": "bases"
            },
            "slow": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "guards": {
              "type": "object",
              "required": [
                "unit",
                "count",
                "speed"
              ],
              "properties": {
                "unit": {
                  "type": "string"
                },
                "count": {
                  "type": "number"
                },
                "speed": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "steal": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "guards",
            "range",
            "cone",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "stealth"
            },
            "unit": {
              "type": "string"
            },
            "guards": {
              "type": "number"
            },
            "range": {
              "type": "number"
            },
            "cone": {
              "type": "number"
            },
            "speed": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "items",
            "max",
            "every"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "gather"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PartyGatherItem"
              }
            },
            "max": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "grow": {
              "type": "number"
            },
            "shove": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "mode"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "hill"
            },
            "mode": {
              "type": "string",
              "enum": [
                "zone",
                "crown"
              ]
            },
            "radius": {
              "type": "number"
            },
            "move": {
              "type": "number"
            },
            "rate": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cell"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "paint"
            },
            "cell": {
              "type": "number"
            },
            "bombs": {
              "type": "boolean"
            },
            "look": {
              "type": "string",
              "enum": [
                "light",
                "paint"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "look",
            "radius",
            "goals"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "ball"
            },
            "look": {
              "type": "string"
            },
            "radius": {
              "type": "number"
            },
            "goals": {
              "type": "string",
              "enum": [
                "teams",
                "bases"
              ]
            },
            "mass": {
              "type": "number"
            },
            "mouth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "rounds",
            "wait"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "reaction"
            },
            "rounds": {
              "type": "number"
            },
            "wait": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "rounds",
            "period"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "timing"
            },
            "rounds": {
              "type": "number"
            },
            "period": {
              "$ref": "#/definitions/PartyRamp"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "target"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "mash"
            },
            "target": {
              "type": "number"
            },
            "team": {
              "type": "boolean"
            },
            "look": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "runes",
            "start"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "memory"
            },
            "runes": {
              "type": "number"
            },
            "start": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cups",
            "rounds",
            "swaps",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "shell"
            },
            "cups": {
              "type": "number"
            },
            "rounds": {
              "type": "number"
            },
            "swaps": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "dealer": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sprint_race"
            },
            "auto": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "crowd",
            "count"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "hunt"
            },
            "crowd": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "count": {
              "type": "number"
            },
            "shots": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "hp",
            "slam",
            "radius"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "boss"
            },
            "unit": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "hp": {
              "type": "number"
            },
            "slam": {
              "$ref": "#/definitions/PartyRamp"
            },
            "radius": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "costume",
            "scale",
            "slam",
            "radius"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "giant"
            },
            "costume": {
              "type": "string"
            },
            "scale": {
              "type": "number"
            },
            "slam": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "scale",
            "radius",
            "speed",
            "turn",
            "retarget",
            "slam",
            "slamRadius",
            "punch",
            "charge"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "rampage"
            },
            "unit": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "scale": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "turn": {
              "$ref": "#/definitions/PartyRamp"
            },
            "retarget": {
              "$ref": "#/definitions/PartyRamp"
            },
            "slam": {
              "$ref": "#/definitions/PartyRamp"
            },
            "slamRadius": {
              "type": "number"
            },
            "punch": {
              "$ref": "#/definitions/PartyRamp"
            },
            "charge": {
              "$ref": "#/definitions/PartyRamp"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "drummer",
            "beats",
            "tempo",
            "window"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "rhythm"
            },
            "drummer": {
              "type": "string"
            },
            "beats": {
              "type": "number"
            },
            "tempo": {
              "$ref": "#/definitions/PartyRamp"
            },
            "window": {
              "type": "number"
            },
            "perch": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "counted",
            "rounds",
            "min",
            "max",
            "run"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "count"
            },
            "counted": {
              "type": "string"
            },
            "decoys": {
              "type": "string"
            },
            "rounds": {
              "type": "number"
            },
            "min": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "run": {
              "type": "number"
            },
            "noun": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "rounds",
            "period"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "slide"
            },
            "rounds": {
              "type": "number"
            },
            "period": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "colours",
            "max",
            "every"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sort"
            },
            "colours": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "caller",
            "rounds",
            "mode",
            "seconds"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "typing"
            },
            "caller": {
              "type": "string"
            },
            "rounds": {
              "type": "number"
            },
            "mode": {
              "type": "string",
              "enum": [
                "out",
                "points"
              ]
            },
            "seconds": {
              "$ref": "#/definitions/PartyRamp"
            },
            "points": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "words": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "lockout": {
              "type": "number"
            },
            "perch": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "mode",
            "rounds",
            "target",
            "show"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "clock"
            },
            "mode": {
              "type": "string",
              "enum": [
                "closest",
                "fuse"
              ]
            },
            "rounds": {
              "type": "number"
            },
            "target": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "show": {
              "type": "number"
            },
            "points": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "laps",
            "inner",
            "saws",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "laps"
            },
            "laps": {
              "type": "number"
            },
            "inner": {
              "type": "number"
            },
            "saws": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "cross": {
              "type": "number"
            },
            "back": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "purse",
            "swing"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "market"
            },
            "purse": {
              "type": "number"
            },
            "swing": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "stocks": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PartyStockDef"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cell",
            "colours",
            "calm",
            "warn",
            "down"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "colour_call"
            },
            "cell": {
              "type": "number"
            },
            "colours": {
              "$ref": "#/definitions/PartyRamp"
            },
            "calm": {
              "$ref": "#/definitions/PartyRamp"
            },
            "warn": {
              "$ref": "#/definitions/PartyRamp"
            },
            "down": {
              "type": "number"
            },
            "look": {
              "type": "string",
              "enum": [
                "wood",
                "stone"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "under",
            "look",
            "rows",
            "per",
            "width",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "platforms"
            },
            "under": {
              "type": "string",
              "enum": [
                "water",
                "lava"
              ]
            },
            "look": {
              "type": "string",
              "enum": [
                "stone",
                "log",
                "raft"
              ]
            },
            "rows": {
              "type": "number"
            },
            "per": {
              "type": "number"
            },
            "width": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "bank": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "spots",
            "every",
            "up",
            "max"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "gallery"
            },
            "spots": {
              "type": "array",
              "items": {
                "type": "array",
                "items": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ],
                "minItems": 2,
                "maxItems": 2,
                "additionalItems": false
              }
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "up": {
              "$ref": "#/definitions/PartyRamp"
            },
            "max": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            },
            "penalty": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "to",
            "steps",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "shrink"
            },
            "to": {
              "type": "number"
            },
            "steps": {
              "type": "number"
            },
            "warn": {
              "type": "number"
            },
            "look": {
              "type": "string",
              "enum": [
                "ice",
                "raft"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "crowd"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "masquerade"
            },
            "crowd": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "costume",
            "radius",
            "speed",
            "cooldown"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "bowl"
            },
            "costume": {
              "type": "string"
            },
            "scale": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "cooldown": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "turner",
            "period"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "skipping"
            },
            "turner": {
              "type": "string"
            },
            "period": {
              "$ref": "#/definitions/PartyRamp"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "r",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "pit"
            },
            "r": {
              "type": "number"
            },
            "look": {
              "type": "string",
              "enum": [
                "water",
                "lava"
              ]
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "max",
            "every"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "stack"
            },
            "look": {
              "type": "string",
              "enum": [
                "stone",
                "gold",
                "crate"
              ]
            },
            "max": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "sway": {
              "type": "number"
            },
            "window": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "band",
            "beats",
            "tempo",
            "window"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "dance"
            },
            "band": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "beats": {
              "type": "number"
            },
            "tempo": {
              "$ref": "#/definitions/PartyRamp"
            },
            "window": {
              "type": "number"
            },
            "perch": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cell",
            "crates",
            "fuse",
            "range",
            "kegs"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "powder"
            },
            "cell": {
              "type": "number"
            },
            "crates": {
              "type": "number"
            },
            "fuse": {
              "type": "number"
            },
            "range": {
              "type": "number"
            },
            "kegs": {
              "type": "number"
            },
            "drops": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "max",
            "every"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "conga"
            },
            "unit": {
              "type": "string"
            },
            "max": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "spacing": {
              "type": "number"
            },
            "cut": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "hoards",
            "dig"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "dig"
            },
            "hoards": {
              "type": "number"
            },
            "dig": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "count",
            "speed",
            "flee",
            "pen"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "herd"
            },
            "unit": {
              "type": "string"
            },
            "count": {
              "type": "number"
            },
            "speed": {
              "type": "number"
            },
            "flee": {
              "type": "number"
            },
            "pen": {
              "type": "number"
            },
            "bark": {
              "type": "number"
            },
            "cooldown": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "turn",
            "life"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "trail"
            },
            "turn": {
              "type": "number"
            },
            "life": {
              "$ref": "#/definitions/PartyRamp"
            },
            "gaps": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "cols",
            "rows",
            "looks"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "pairs"
            },
            "cols": {
              "type": "number"
            },
            "rows": {
              "type": "number"
            },
            "looks": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "cell": {
              "type": "number"
            },
            "show": {
              "type": "number"
            },
            "hold": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "putt"
            },
            "bunkers": {
              "type": "number"
            },
            "meter": {
              "type": "number"
            },
            "power": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "trees",
            "hp",
            "fall"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "chop"
            },
            "trees": {
              "type": "number"
            },
            "hp": {
              "type": "number"
            },
            "fall": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            },
            "squash": {
              "type": "number"
            },
            "regrow": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "pond",
            "wait"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "fish"
            },
            "pond": {
              "type": "number"
            },
            "wait": {
              "type": "array",
              "items": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "minItems": 2,
              "maxItems": 2,
              "additionalItems": false
            },
            "bite": {
              "type": "number"
            },
            "golden": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "houses",
            "every",
            "grow"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "blaze"
            },
            "houses": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "grow": {
              "$ref": "#/definitions/PartyRamp"
            },
            "douse": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            },
            "loss": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "speed",
            "every",
            "items",
            "anvils"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "belt"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/PartyGatherItem"
              }
            },
            "anvils": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "rounds",
            "show",
            "answer",
            "units",
            "most"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "fibs"
            },
            "rounds": {
              "type": "number"
            },
            "show": {
              "type": "number"
            },
            "answer": {
              "type": "number"
            },
            "units": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "most": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "ingredients",
            "length",
            "every",
            "max"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "recipe"
            },
            "ingredients": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "length": {
              "type": "number"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "max": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "boxes",
            "dig"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "search"
            },
            "boxes": {
              "type": "number"
            },
            "dig": {
              "type": "number"
            },
            "key": {
              "type": "number"
            },
            "coins": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "count",
            "turn",
            "every",
            "speed",
            "look"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "turret"
            },
            "count": {
              "type": "number"
            },
            "turn": {
              "$ref": "#/definitions/PartyRamp"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "speed": {
              "type": "number"
            },
            "look": {
              "$ref": "#/definitions/PartyShotLook"
            },
            "radius": {
              "type": "number"
            },
            "effect": {
              "$ref": "#/definitions/PartyHitEffect"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "unit",
            "every",
            "max",
            "speed"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "horde"
            },
            "unit": {
              "type": "string"
            },
            "every": {
              "$ref": "#/definitions/PartyRamp"
            },
            "max": {
              "type": "number"
            },
            "speed": {
              "$ref": "#/definitions/PartyRamp"
            },
            "reach": {
              "type": "number"
            },
            "worth": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            },
            "scale": {
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PartyPickMode": {
      "description": "How each round's game is chosen.",
      "type": "string",
      "enum": [
        "random",
        "vote",
        "loser",
        "playlist",
        "free"
      ]
    },
    "PartyPlot": {
      "description": "Where an arena sits on the map: its centre, tiles.",
      "type": "object",
      "required": [
        "x",
        "y"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PartyRamp": {
      "description": "A ramped number: the first value at the start of the game, the second at the end.",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        }
      ]
    },
    "PartyRules": {
      "description": "The party rules a map carries in `rules.party`.",
      "type": "object",
      "required": [
        "version",
        "pool",
        "rounds",
        "pick",
        "plots",
        "hall"
      ],
      "properties": {
        "version": {
          "type": "number"
        },
        "pool": {
          "description": "The games this party can play: shipped ids (`partyGames.ts`) or ids of the map's own `games`.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "games": {
          "description": "The map's own games, or a shipped game reshaped (same id).",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PartyGameDef"
          }
        },
        "rounds": {
          "description": "Games in the party (1..PARTY_MAX_ROUNDS).",
          "type": "number"
        },
        "pick": {
          "$ref": "#/definitions/PartyPickMode"
        },
        "playlist": {
          "description": "For `pick: 'playlist'`: the games in order (cycled when the party is longer).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "aiSkill": {
          "$ref": "#/definitions/PartyAiSkill"
        },
        "seed": {
          "description": "Mixed into the party's own random stream.",
          "type": "number"
        },
        "characters": {
          "description": "Character per seat (`\"3\": \"goblin_peon\"`). A person's seat without one picks at the party's start.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "roster": {
          "description": "The characters this party offers (unit ids). Default: the shipped roster (`partyCharacters.ts`).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "pickSeconds": {
          "description": "Seconds the character pick stays open with two people or more (default 25; alone it waits for the pick).",
          "type": "number"
        },
        "plots": {
          "description": "The arena of every game in the pool: its centre on the map. The generator writes it.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/PartyPlot"
          }
        },
        "hall": {
          "description": "The hall: where the party gathers between games and the podium stands at the end.",
          "$ref": "#/definitions/PartyPlot"
        },
        "finale": {
          "description": "The last round pays double (default true).",
          "type": "boolean"
        },
        "bonuses": {
          "description": "Bonus awards at the end (most wins, most seconds, unluckiest): +1 game's first place each. Default true.",
          "type": "boolean"
        },
        "name": {
          "description": "A display name for the party (the map's).",
          "type": "string"
        },
        "show": {
          "description": "The host's show (default true): the opening fly-in, the late fee (a vault safe dropped on whoever came last and is still standing) and the finale's fireworks for everyone off the podium.",
          "type": "boolean"
        },
        "venue": {
          "description": "The party's venue (default 'big_top'): Grumbar's treasury big top round the hall and every arena (striped tent, bunting, lanterns, stands with a crowd); 'open': the bare ground. An arena may choose its own (`arena.venue`).",
          "$ref": "#/definitions/PartyVenue"
        },
        "pickPads": {
          "description": "A vote or the last-placed guest's pick is made by walking onto the game's drum in the hall (default true); the HUD's cards still take a click. False: the cards only.",
          "type": "boolean"
        },
        "menu": {
          "description": "The party's setup screen when the map is opened from Custom Games or `/play?party=setup&map=<ref>` (src/game/custom/frontDoor.ts): a title, a tagline and a logo over the map's own games and guests (each absent is Grumbar Party's own). False: no setup screen, the map launches as written.",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/FrontDoorMenu"
            }
          ]
        },
        "hallSetup": {
          "description": "The party opens with its setup in the hall (default false; Custom Games turns it on unless `menu` is false): every guest picks who they come as, and the party's host (its first person by seat) picks how long it runs, how each game is chosen, the AI guests' skill, how many guests there are and which games are in (src/game/party/partySetup.ts). It waits for the host to start, or `pickSeconds` when set. Alone and online it is the same screen.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "PartySetPiece": {
      "description": "One prop of an arena's set piece.",
      "type": "object",
      "required": [
        "prop",
        "x",
        "y"
      ],
      "properties": {
        "prop": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "deg": {
          "description": "Rotation in degrees (props that snap turn by 90s); absent: facing the arena's middle.",
          "type": "number"
        },
        "scale": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PartyShotLook": {
      "description": "Shots and falling things the view draws.",
      "type": "string",
      "enum": [
        "fireball",
        "meteor",
        "boulder",
        "snowball",
        "firepot",
        "arrow",
        "spear",
        "acid",
        "quill",
        "bolt",
        "tomato",
        "cannonball",
        "hook"
      ]
    },
    "PartyStart": {
      "description": "How the guests stand at the start.",
      "type": "string",
      "enum": [
        "ring",
        "teams",
        "south",
        "west",
        "bases",
        "lanes"
      ]
    },
    "PartyStockDef": {
      "description": "One company on a market's floor.",
      "type": "object",
      "required": [
        "name",
        "start"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "start": {
          "type": "number"
        },
        "swing": {
          "description": "How wildly it moves, against the market's own swing (default 1).",
          "type": "number"
        },
        "colour": {
          "description": "Its colour on the board, the post and the HUD (RGB).",
          "type": "number"
        },
        "boom": {
          "description": "Its news: what sends it up, what sends it down (each called after the company's name: \"Deepdelve Mine: ...\").",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "slump": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "PartyVenue": {
      "description": "Where a scene stands: inside Grumbar's big top, or out in the open.",
      "type": "string",
      "enum": [
        "big_top",
        "open"
      ]
    },
    "PartyWin": {
      "description": "What decides the placings.",
      "type": "string",
      "enum": [
        "score",
        "survive",
        "goal"
      ]
    },
    "PegColor": {
      "description": "Drop of Stone — Type definitions and constants for the Pachinko physics minigame. Built for Shards of Stone custom games.",
      "type": "string",
      "enum": [
        "blue",
        "orange",
        "purple",
        "green"
      ]
    },
    "PegMotionDef": {
      "type": "object",
      "required": [
        "kind",
        "centerX",
        "centerY",
        "speed"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "slide",
            "orbit"
          ]
        },
        "centerX": {
          "type": "number"
        },
        "centerY": {
          "type": "number"
        },
        "speed": {
          "type": "number"
        },
        "amplitudeX": {
          "type": "number"
        },
        "amplitudeY": {
          "type": "number"
        },
        "phase": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PegShape": {
      "type": "string",
      "enum": [
        "round",
        "bar"
      ]
    },
    "PegboardContent": {
      "type": "object",
      "required": [
        "stages",
        "masters",
        "stageId",
        "masterId",
        "seed"
      ],
      "properties": {
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/StageDef"
          }
        },
        "missions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DropCampaignMission"
          }
        },
        "masters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MasterDef"
          }
        },
        "stageId": {
          "type": "string"
        },
        "masterId": {
          "type": "string"
        },
        "seed": {
          "type": "number"
        },
        "startingBalls": {
          "type": "number"
        },
        "firingImpulse": {
          "type": "number"
        },
        "progression": {
          "type": "string",
          "enum": [
            "drop",
            "campaign"
          ]
        },
        "scriptedScoring": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "PlayableRace": {
      "type": "string",
      "enum": [
        "dwarf",
        "goblin",
        "ratmen",
        "lizardmen",
        "wood_elf",
        "high_elf",
        "dark_elf",
        "human",
        "undead"
      ]
    },
    "PropBlockOverride": {
      "description": "Blocking override for one placement.",
      "type": "object",
      "properties": {
        "layers": {
          "description": "Layers to block; absent = the def's layers.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "ground",
              "air",
              "naval",
              "sight",
              "build"
            ]
          }
        },
        "cells": {
          "description": "Cells to block, relative to the anchor at rotation 0 (rotated with the placement in 90° steps); absent = the def's (rotated) footprint.",
          "type": "array",
          "items": {
            "type": "array",
            "items": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "minItems": 2,
            "maxItems": 2,
            "additionalItems": false
          }
        }
      },
      "additionalProperties": false
    },
    "PropCityCondition": {
      "type": "string",
      "enum": [
        "intact",
        "weathered",
        "damaged",
        "ruined",
        "construction"
      ]
    },
    "PropCityOptions": {
      "description": "Customisation for one procedural city building. Every field is optional; absent fields fall back to the seeded defaults for that archetype.",
      "type": "object",
      "properties": {
        "seed": {
          "type": "number"
        },
        "wealth": {
          "$ref": "#/definitions/PropCityWealth"
        },
        "condition": {
          "$ref": "#/definitions/PropCityCondition"
        },
        "colors": {
          "description": "Per-slot colour as 0xRRGGBB.",
          "type": "object",
          "properties": {
            "cloth": {
              "type": "number"
            },
            "roof": {
              "type": "number"
            },
            "walls": {
              "type": "number"
            },
            "trim": {
              "type": "number"
            },
            "metal": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "heraldry": {
          "description": "Heraldry motif cell, 0..8 (heraldry-motifs-v1).",
          "type": "number"
        },
        "trade": {
          "description": "A shop's trade: its hanging sign, awning colourway and architectural accent. Absent: a shop picks a random sign, as before.",
          "$ref": "#/definitions/PropCityTrade"
        },
        "party": {
          "description": "Party walls (terraces): the sides, relative to the street face, that a neighbour's building touches. The building runs to the lot line there with no openings (CITY-FAC-C; cityCustomisation's CityParty).",
          "type": "object",
          "properties": {
            "left": {
              "type": "boolean"
            },
            "right": {
              "type": "boolean"
            },
            "back": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "scale": {
          "description": "How large the building is drawn, 1..2 (absent = 1): a town built at game scale (townLayout `buildingScale`). The city plans are two-thirds the size of the props and units round them, so such a town gives each building a lot of `ceil(scale x footprint)` tiles and draws the plan's own mesh this much larger, centred in it. It multiplies the placement's `s` and is NOT part of the building's template (every scale shares one mesh). Read it with propCityScale.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "PropCityTrade": {
      "description": "A shop's trade (data/props/defs/shopTrades.ts): the common trades every faction has, then the faction-only ones.",
      "type": "string",
      "enum": [
        "magic",
        "cloth",
        "food",
        "general",
        "weapons",
        "armour",
        "bows",
        "alchemy",
        "potions",
        "herbs",
        "jewels",
        "books",
        "explosives",
        "embalmer",
        "runes",
        "enchanter",
        "jade",
        "warp"
      ]
    },
    "PropCityWealth": {
      "type": "string",
      "enum": [
        "poor",
        "modest",
        "rich"
      ]
    },
    "PropCorruptionMode": {
      "description": "What a prop's faction corruption IS: - 'gameplay' (the default): real creep in the sim's CorruptionMap, seeded and settled at match start, owned by no seat (NEUTRAL_CORRUPTION_OWNER). The matching faction gets its payoffs on it (Ratmen speed, Goblin haste and scrap, Ratmen placement), every other faction treats it as foreign creep in the placement gates. Hashed, saved, fogged like any creep. Only `TileMap.props` placements seed it (the pre-props list stays visual). - 'visual': the render-only decor layer, the look without the rules.",
      "type": "string",
      "enum": [
        "gameplay",
        "visual"
      ]
    },
    "PropPlacement": {
      "description": "One placed prop. Serialized in the map file's prop list (the props format delta reads the legacy field too). `r`, `s`, `v` are optional so every pre-props map stays valid.",
      "type": "object",
      "required": [
        "typeId",
        "x",
        "y"
      ],
      "properties": {
        "typeId": {
          "description": "PropDef id.",
          "type": "string"
        },
        "x": {
          "description": "Anchor tile (top-left of the footprint at rotation 0). Props that block or are entities must sit on whole tiles; decor may use fractional (sub-tile) positions so it can be grouped tightly. See isValidPropPosition.",
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Rotation in whole degrees, 0..359. Snapped per the def's `rotation`.",
          "type": "number"
        },
        "s": {
          "description": "Uniform scale; clamped to the def's `scaleRange`.",
          "type": "number"
        },
        "v": {
          "description": "Variant index, 0..variants-1.",
          "type": "number"
        },
        "city": {
          "description": "Per-placement city-building options (procedural faction buildings). Untrusted map data: decoders MUST clamp it with the city kit's normalizeCityOptions (the public /api/validate runs the decoder).",
          "$ref": "#/definitions/PropCityOptions"
        },
        "block": {
          "description": "Per-placement blocking override. 'none' turns a blocking def into pure decor here (e.g. a walkable gap in a ruin wall); an object replaces the def's layers and/or cells (e.g. an arch blocking only its two pillars, a scaled-up boulder claiming 2x2). Absent = the def's blocking.",
          "anyOf": [
            {
              "type": "string",
              "const": "none"
            },
            {
              "$ref": "#/definitions/PropBlockOverride"
            }
          ]
        },
        "corrupt": {
          "description": "Per-placement decor corruption (see PropCorruption; visual only). `false`: off here. `true`: the def's default (a faction prop with no default gets a footprint-sized one). A number: that radius in tiles, in the def's (or the prop's faction's) style. Absent: the def's default.",
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            }
          ]
        },
        "corruptionMode": {
          "description": "Whether this placement's corruption is REAL sim creep ('gameplay') or only the look of it ('visual'). Absent: the map's `propCorruptionMode`, itself 'gameplay' when absent. See PropCorruptionMode.",
          "$ref": "#/definitions/PropCorruptionMode"
        }
      },
      "additionalProperties": false
    },
    "RaceAiSkill": {
      "description": "How well the AI drivers drive.",
      "type": "string",
      "enum": [
        "easy",
        "hard",
        "normal"
      ]
    },
    "RaceCupState": {
      "type": "object",
      "required": [
        "id",
        "round",
        "rounds",
        "points"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "round": {
          "type": "number"
        },
        "rounds": {
          "type": "number"
        },
        "points": {
          "description": "Points so far by seat id.",
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    },
    "RaceDebrisPlacement": {
      "description": "A light prop by the road that a car knocks flying (`rules.race.debris`): [x, y, prop typeId, heading]. Tiles, and the race's heading frame (0 faces +x, PI/2 faces +y): the prop's front faces along the heading. The sim stands each one as a `debris` object; solid props stay walls in the grid.",
      "type": "array",
      "items": [
        {
          "type": "number"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "number"
        }
      ],
      "minItems": 4,
      "maxItems": 4,
      "additionalItems": false
    },
    "RaceFeature": {
      "description": "A feature placed along the circuit. `at` is the fraction of a lap (0 = the start line, 0.5 halfway round); `offset` is tiles to the right of the centre line (negative: left) and `width` its span across the circuit in tiles.",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "boost"
            },
            "at": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            },
            "width": {
              "type": "number"
            },
            "length": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "ramp"
            },
            "at": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            },
            "width": {
              "type": "number"
            },
            "strength": {
              "type": "number"
            },
            "boost": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "crest"
            },
            "at": {
              "type": "number"
            },
            "strength": {
              "type": "number"
            },
            "length": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "items"
            },
            "at": {
              "type": "number"
            },
            "count": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "from",
            "to",
            "surface"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "surface"
            },
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "surface": {
              "type": "string",
              "enum": [
                "mud",
                "ice",
                "shallow"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "from",
            "to",
            "fill"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "gap"
            },
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "fill": {
              "type": "string",
              "enum": [
                "water",
                "lava",
                "chasm"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "from",
            "to"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "barrier"
            },
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "side": {
              "type": "string",
              "enum": [
                "both",
                "left",
                "right"
              ]
            },
            "gap": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "boulders"
            },
            "at": {
              "type": "number"
            },
            "period": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "geyser"
            },
            "at": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            },
            "period": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "at"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "shards"
            },
            "at": {
              "type": "number"
            },
            "count": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "RaceMenu": {
      "description": "A race map's setup screen (see RaceRules.menu).",
      "type": "object",
      "properties": {
        "circuits": {
          "description": "The circuits the screen offers, at most 16, each a map carrying `rules.race` (absent: this map alone). Wheels of Stone's own are its nine bundled circuits, `/maps/race-<id>.play.json`.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FrontDoorMapEntry"
          }
        },
        "cups": {
          "description": "Grand Prix cups, at most 8: each a name and 2..8 of `circuits` (by their `map`), raced in order for points.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceMenuCup"
          }
        },
        "title": {
          "description": "The menu's title (absent: the map's name). 1..80 characters.",
          "type": "string"
        },
        "tagline": {
          "description": "One line under the logo. 1..160 characters.",
          "type": "string"
        },
        "logo": {
          "description": "The logo: a shipped `/assets/` image or a `ugc:` upload, under loading art's rule (absent: the game's own).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "RaceMenuCup": {
      "description": "One Grand Prix cup on a race map's menu.",
      "type": "object",
      "required": [
        "name",
        "circuits"
      ],
      "properties": {
        "name": {
          "description": "1..80 characters.",
          "type": "string"
        },
        "circuits": {
          "description": "The rounds in order, each the `map` of one of the menu's circuits.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "RaceMode": {
      "description": "Race against rivals, or alone against the clock.",
      "type": "string",
      "enum": [
        "race",
        "time_trial"
      ]
    },
    "RaceRailDef": {
      "description": "A ley-road: a stretch of the circuit where gravity follows the road (TRACKS_PLAN.md, phase 1). Placed by control-point index (`4.5` is halfway from point 4 to point 5), so a spliced loop never moves it.",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "id",
            "shape",
            "from",
            "to"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "shape": {
              "type": "string",
              "enum": [
                "corkscrew",
                "wall",
                "bank",
                "bridge"
              ]
            },
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "bank": {
              "type": "number"
            },
            "rise": {
              "type": "number"
            },
            "w": {
              "type": "number"
            },
            "boosts": {
              "description": "Boost pads across the road, at these fractions along its inside (0 its start, 1 its end; at most 6).",
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "id",
            "shape",
            "at",
            "radius"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "shape": {
              "type": "string",
              "const": "loop"
            },
            "at": {
              "type": "number"
            },
            "radius": {
              "type": "number"
            },
            "side": {
              "type": "number"
            },
            "w": {
              "type": "number"
            },
            "boosts": {
              "description": "Boost pads across the road, at these fractions along its inside (0 its start, 1 its end; at most 6).",
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "RaceRules": {
      "description": "The race rules a map carries in `rules.race`.",
      "type": "object",
      "required": [
        "track",
        "laps"
      ],
      "properties": {
        "track": {
          "$ref": "#/definitions/RaceTrackDef"
        },
        "laps": {
          "description": "1..9.",
          "type": "number"
        },
        "mode": {
          "$ref": "#/definitions/RaceMode"
        },
        "speedClass": {
          "$ref": "#/definitions/RaceSpeedClass"
        },
        "aiSkill": {
          "$ref": "#/definitions/RaceAiSkill"
        },
        "items": {
          "description": "Item crates on the circuit (default true).",
          "type": "boolean"
        },
        "abilities": {
          "description": "Each car's signature ability (default true).",
          "type": "boolean"
        },
        "karts": {
          "description": "Car per seat (`\"3\": \"goblin_boom_wagon\"`). A seat without one is picked in the garage, or gets a default.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "roster": {
          "description": "The cars this map offers: the garage shows only these, and a seat without a car gets one of them. Default: every car.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "garageSeconds": {
          "description": "Seconds the garage stays open for picks (0: no garage). Default: 20 with two people or more; with one, the garage opens, untimed, when the map leaves that person's car to them (no `karts` entry), and not otherwise.",
          "type": "number"
        },
        "cup": {
          "description": "A Grand Prix round: which cup, which round, and the points so far by seat.",
          "$ref": "#/definitions/RaceCupState"
        },
        "seed": {
          "description": "Mixed into the race's own random stream (item rolls, AI lanes).",
          "type": "number"
        },
        "timeOfDay": {
          "description": "The hour the race runs at (the map's `meta.env` carries the sun itself). Default day.",
          "$ref": "#/definitions/RaceTimeOfDay"
        },
        "debris": {
          "description": "Light props by the road that cars knock flying.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceDebrisPlacement"
          }
        },
        "spectators": {
          "description": "The crowd: drawn by the view as cardboard cut-outs, never units in the world. At most 400.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceSpectatorRow"
          }
        },
        "sections": {
          "description": "The circuit's sections as the generator built them (a town, a market square, a farm, a graveyard): kind and lap distances. Cosmetic: for the view, the HUD and tools; the sim never reads it.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind",
              "from",
              "to"
            ],
            "properties": {
              "kind": {
                "type": "string"
              },
              "from": {
                "type": "number"
              },
              "to": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "menu": {
          "description": "The setup screen this map opens in (its Play in Custom Games, or `/play?race=setup&map=<ref>`): the garage over this map's `roster`, then the circuit screen, titled, tagged and badged by the menu, offering its circuits and Grand Prix cups. Absent: this circuit alone, under its own name. `false`: no setup screen; the map launches as it is, its cars and settings as written. Menus only; the sim never reads it.",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/RaceMenu"
            }
          ]
        },
        "setup": {
          "description": "The race is set up inside its own map (default false; Custom Games turns it on): it opens in its garage, where every driver picks a car and the race's host (its first person by seat) picks the kind of race, the laps, the class, how many rivals and how sharp, and the items (`race_setup`), then starts it (`race_start`), or asks for another circuit (`race_circuit`, which the shell loads). Fewer rivals send AI cars home. It waits for the host, or `garageSeconds` when set. Alone and online it is the same screen.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "RaceShortcutDef": {
      "description": "A shortcut: a second way between two points of the lap, off the circuit. The sim follows a car along it and credits the lap distance it stands for (so the checkpoints between `from` and `to` pass in order and nothing else does: it saves the stretch it bypasses and never a lap).",
      "type": "object",
      "required": [
        "id",
        "name",
        "kind",
        "from",
        "to",
        "points",
        "width"
      ],
      "properties": {
        "id": {
          "description": "Stable id (the HUD, the co-driver and the events name it).",
          "type": "string"
        },
        "name": {
          "description": "What players call it (\"the Old Mine\").",
          "type": "string"
        },
        "kind": {
          "description": "How it looks and plays: `path` a track through the wilds, `cave` a slot through rock, `jump` a ramp over a ravine (fall short and the pit crew hauls you back), `bog` mud that favours off-road cars, `gap` a gap in a wall or a hedge.",
          "type": "string",
          "enum": [
            "gap",
            "path",
            "cave",
            "jump",
            "bog"
          ]
        },
        "hidden": {
          "description": "Its mouth is hidden (vines, trees, a crack in the rock): the HUD should not draw it until a car has used it.",
          "type": "boolean"
        },
        "from": {
          "description": "Lap fraction where it leaves the circuit.",
          "type": "number"
        },
        "to": {
          "description": "Lap fraction where it rejoins.",
          "type": "number"
        },
        "points": {
          "description": "Its centre line, open, in driving order: the first point on the circuit's centre line at `from`, the last at `to`.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "width": {
          "description": "Width in tiles.",
          "type": "number"
        },
        "surface": {
          "description": "What it is made of (default road).",
          "type": "string",
          "enum": [
            "mud",
            "shallow",
            "road",
            "offroad"
          ]
        },
        "ramp": {
          "description": "A jump ramp `at` tiles along it.",
          "type": "object",
          "required": [
            "at"
          ],
          "properties": {
            "at": {
              "type": "number"
            },
            "strength": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "gap": {
          "description": "A ravine across it, `from`..`to` tiles along it: a car that does not clear it falls.",
          "type": "object",
          "required": [
            "from",
            "to",
            "fill"
          ],
          "properties": {
            "from": {
              "type": "number"
            },
            "to": {
              "type": "number"
            },
            "fill": {
              "type": "string",
              "enum": [
                "water",
                "lava",
                "chasm"
              ]
            }
          },
          "additionalProperties": false
        },
        "risk": {
          "description": "How risky the AI reckons it (0 safe .. 3 a leap of faith): easy drivers take 0, normal up to 1, hard up to 3.",
          "type": "number"
        },
        "shards": {
          "description": "Shards strung along it, the reward for finding it.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "RaceSpectatorRow": {
      "description": "One spectator the map stands at the circuit (`rules.race.spectators`): x, y (tiles), the townsfolk unit, facing (radians, 0 = +x), and optionally the height they stand at (tiles: a grandstand's tier).",
      "anyOf": [
        {
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 4,
          "maxItems": 4,
          "additionalItems": false
        },
        {
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 5,
          "maxItems": 5,
          "additionalItems": false
        }
      ]
    },
    "RaceSpeedClass": {
      "description": "The three speed classes (the 50cc / 100cc / 150cc of the genre).",
      "type": "string",
      "enum": [
        "pony",
        "warhorse",
        "dragon"
      ]
    },
    "RaceTimeOfDay": {
      "description": "The hour a race runs at. The generator freezes the map's sun there (`meta.env`: `timeOfDay`, `dayNightSpeed` 0), so the engine's day/night cycle draws it and every peer reads the same bytes. Each circuit has a default; the setup screen may override it.",
      "type": "string",
      "enum": [
        "day",
        "dusk",
        "night"
      ]
    },
    "RaceTrackDef": {
      "description": "A complete circuit, embedded in the map so a community map can carry its own.",
      "type": "object",
      "required": [
        "id",
        "name",
        "points",
        "width"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "points": {
          "description": "Closed loop, at least 4 points, in the order cars drive it.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceTrackPoint"
          }
        },
        "width": {
          "description": "Default circuit width in tiles.",
          "type": "number"
        },
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceFeature"
          }
        },
        "shortcuts": {
          "description": "Second ways round (see RaceShortcutDef).",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceShortcutDef"
          }
        },
        "rails": {
          "description": "Ley-roads: loops, corkscrews, wall rides, bridges (see RaceRailDef).",
          "type": "array",
          "items": {
            "$ref": "#/definitions/RaceRailDef"
          }
        },
        "offroad": {
          "description": "What the ground beside the circuit is (sets its surface).",
          "type": "string",
          "enum": [
            "snow",
            "mud",
            "grass",
            "sand"
          ]
        },
        "scenery": {
          "$ref": "#/definitions/RaceTrackScenery"
        }
      },
      "additionalProperties": false
    },
    "RaceTrackPoint": {
      "description": "One control point of a circuit. The spline passes through every one.",
      "type": "object",
      "required": [
        "x",
        "y"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "w": {
          "description": "Circuit width in tiles at this point (absent: the track's `width`).",
          "type": "number"
        },
        "level": {
          "description": "Cliff level (0..7) the generator raises the ground to here. Visual hills.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "RaceTrackScenery": {
      "description": "Scenery the generator dresses a circuit with. Not read by the sim.",
      "type": "object",
      "properties": {
        "grandstand": {
          "description": "Grandstands, crowds and bunting at the start/finish straight.",
          "type": "boolean"
        },
        "crowd": {
          "description": "Crowd density along the edges (0..1).",
          "type": "number"
        },
        "barrierStyle": {
          "description": "The barrier family: hay, fence, stone, tilt (a tournament barrier), faction.",
          "type": "string",
          "enum": [
            "stone",
            "hay",
            "fence",
            "tilt",
            "iron"
          ]
        },
        "faction": {
          "description": "The faction whose bunting, arches and townsfolk dress the circuit.",
          "type": "string"
        },
        "arch": {
          "description": "The start and finish arch across the line, with its countdown lamps: one of the game's arches by id (`meadowbrook`, `starwood`, `gloomroot`, `scrapheap`, `frostfang`, `emberforge`, `skyreach`, `nightshade`, `sunscale`; RACE_ARCH_IDS). Absent: the circuit's own when its track id starts with one, else a plain gantry with a lamp bar.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "RegicideRules": {
      "type": "object",
      "required": [
        "enabled",
        "reveal"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "reveal": {
          "$ref": "#/definitions/KingReveal"
        }
      },
      "additionalProperties": false
    },
    "RelicCount": {
      "description": "How many Relics a map carries.",
      "anyOf": [
        {
          "type": "integer",
          "enum": [
            5,
            3,
            7
          ]
        },
        {
          "type": "string",
          "const": "auto"
        }
      ]
    },
    "RelicRules": {
      "type": "object",
      "required": [
        "enabled",
        "hold",
        "count",
        "reveal"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "hold": {
          "$ref": "#/definitions/HoldLength"
        },
        "count": {
          "$ref": "#/definitions/RelicCount"
        },
        "reveal": {
          "description": "Mark un-banked relics on the minimap.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "ResourceOverrides": {
      "description": "Sparse per-tile amounts, `[x, y, amount]` per entry, keyed by resource.",
      "type": "object",
      "properties": {
        "tree": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "gold": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "stone": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "oil": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      },
      "additionalProperties": false
    },
    "RockFormationDensity": {
      "type": "string",
      "enum": [
        "sparse",
        "moderate",
        "dense"
      ]
    },
    "RockFormationStyle": {
      "type": "string",
      "enum": [
        "none",
        "ridges",
        "mountains",
        "ravines",
        "boulders",
        "outcrop",
        "wallcluster",
        "mixed",
        "random"
      ]
    },
    "Rot": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3
      ]
    },
    "SceneFadeSpec": {
      "description": "Screen fade transition for beginning/ending of a cutscene.",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "'in' = fades from solid color to clear; 'out' = fades from clear to solid color; 'both' = fades in then out.",
          "type": "string",
          "enum": [
            "both",
            "out",
            "in"
          ]
        },
        "durationSec": {
          "description": "Duration of the fade transition in seconds (default 1.0s).",
          "type": "number"
        },
        "colorHex": {
          "description": "Hex color for the fade (default '#000000').",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SceneLine": {
      "description": "One timed subtitle line inside an InGameScene.",
      "type": "object",
      "required": [
        "t",
        "text"
      ],
      "properties": {
        "t": {
          "description": "Seconds from scene start.",
          "type": "number"
        },
        "who": {
          "description": "Speaker name shown above the line. Optional.",
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "hold": {
          "description": "Seconds the line stays up. Default 3.",
          "type": "number"
        },
        "portraitKey": {
          "description": "Optional portrait key (e.g. 'dwarf_thane', 'goblin_brawler', 'borin', 'hero--borin', or unit type id).",
          "type": "string"
        },
        "side": {
          "description": "Dialogue layout side ('left' | 'right' | 'center' | 'auto'). Default 'auto' or 'left'.",
          "$ref": "#/definitions/SceneLineSide"
        },
        "soundId": {
          "description": "Optional voice audio sound cue id (played at line start).",
          "type": "string"
        },
        "audioDurationSec": {
          "description": "Voice audio clip duration in seconds. Drives exact line hold & camera cut timing.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SceneLineSide": {
      "type": "string",
      "enum": [
        "auto",
        "left",
        "right",
        "center"
      ]
    },
    "SceneSoundCue": {
      "description": "One timed sound cue inside an InGameScene. PRESENTATION ONLY: it is played by the client watching the scene, never by the sim, so a client that skipped the scene simply does not hear it.",
      "type": "object",
      "required": [
        "t",
        "soundId"
      ],
      "properties": {
        "t": {
          "description": "Seconds from scene start.",
          "type": "number"
        },
        "soundId": {
          "description": "A SoundManager id (same namespace as the `playSound` trigger action).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ScoreRules": {
      "type": "object",
      "required": [
        "enabled",
        "limitMinutes"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "limitMinutes": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SeaAct": {
      "type": "object",
      "required": [
        "id",
        "n",
        "title",
        "waters",
        "steps"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "n": {
          "type": "number"
        },
        "title": {
          "type": "string"
        },
        "waters": {
          "type": "string"
        },
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaStoryStep"
          }
        },
        "next": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SeaBottleDef": {
      "description": "A message in a bottle: lore, a story clue, or a treasure's mark.",
      "type": "object",
      "required": [
        "id",
        "x",
        "y",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "text": {
          "type": "string"
        },
        "who": {
          "description": "Spoken in the story's voice when found (a cast id); else read as a note.",
          "type": "string"
        },
        "treasure": {
          "type": "object",
          "required": [
            "x",
            "y",
            "gold"
          ],
          "properties": {
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            },
            "gold": {
              "type": "number"
            },
            "blueprint": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "SeaCameraRules": {
      "description": "How the voyage's camera may look at a crew's ship. Absent: the follow view, with the helm view a key away.",
      "type": "object",
      "properties": {
        "helm": {
          "description": "Players may take the helm view (H): low behind their ship, turning with it, and pulled back up while guns are out or a ship is hunting them. Default true.",
          "type": "boolean"
        },
        "start": {
          "description": "The view the voyage opens in: 'follow' (default: the angled view that follows the ship) or 'helm'.",
          "type": "string",
          "enum": [
            "follow",
            "helm"
          ]
        }
      },
      "additionalProperties": false
    },
    "SeaCaptain": {
      "type": "object",
      "required": [
        "name",
        "people"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "people": {
          "$ref": "#/definitions/PlayableRace"
        }
      },
      "additionalProperties": false
    },
    "SeaCarriedItem": {
      "description": "An item in a carried hold, where it lay.",
      "type": "object",
      "required": [
        "defId",
        "x",
        "y",
        "rot",
        "ageS"
      ],
      "properties": {
        "defId": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "rot": {
          "$ref": "#/definitions/Rot"
        },
        "ageS": {
          "type": "number"
        },
        "lengthCm": {
          "type": "number"
        },
        "morph": {
          "type": "string",
          "enum": [
            "golden",
            "shardtouched"
          ]
        }
      },
      "additionalProperties": false
    },
    "SeaCharacter": {
      "description": "Who speaks a line. `portrait` is one of Sea of Stone's painted portraits by key (`harbourmaster`, `assets/sea/portraits/<key>.webp`), a picture a map names (a shipped `/assets/` image or a `ugc:` upload), or null.",
      "type": "object",
      "required": [
        "id",
        "name",
        "title",
        "people",
        "portrait"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "people": {
          "type": "string"
        },
        "portrait": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "SeaChartSeaDef": {
      "description": "One sea of a voyage's chart (see SeaRules.chart).",
      "type": "object",
      "required": [
        "id",
        "name",
        "tier",
        "biome"
      ],
      "properties": {
        "id": {
          "description": "What gates (`to`), the voyage (`zone`) and a story's `zone` objectives call it.",
          "type": "string"
        },
        "name": {
          "description": "1..80 characters.",
          "type": "string"
        },
        "tier": {
          "description": "How dangerous its waters are, 1 home waters .. 5 the end of the story: pirates and their prizes rise with it.",
          "type": "integer",
          "enum": [
            1,
            5,
            4,
            2,
            3
          ]
        },
        "biome": {
          "description": "The map's biome (ground, trees and light), for the loading screen and the chart.",
          "type": "string"
        },
        "blurb": {
          "description": "The chart's one line about it, and what its waters ask of a ship. Up to 300 characters each.",
          "type": "string"
        },
        "advice": {
          "type": "string"
        },
        "acts": {
          "description": "The story acts set in these waters (a step of one counts only here).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "map": {
          "description": "Its map: a shipped `/maps/<file>.json` or a published `community:<id>`, carrying `rules.sea` with this sea as its `voyage.zone`. Absent: one of the game's own seas by id (`isles`, `atolls`, `ember`, `bone`, `tempest`).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SeaCoveDef": {
      "description": "A pirate cove: an island camp with shore batteries, its own ships and a vault.",
      "type": "object",
      "required": [
        "id",
        "name",
        "x",
        "y",
        "r",
        "landingX",
        "landingY",
        "vaultX",
        "vaultY",
        "batteries",
        "ships"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "x": {
          "description": "The cove's water, and how far its ships patrol from it (tiles).",
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "type": "number"
        },
        "landingX": {
          "description": "Where a ship lies to land a party at the vault, and the vault itself (on land).",
          "type": "number"
        },
        "landingY": {
          "type": "number"
        },
        "vaultX": {
          "type": "number"
        },
        "vaultY": {
          "type": "number"
        },
        "batteries": {
          "description": "Shore guns, on land (tile centres).",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "ships": {
          "description": "The ships it keeps (SeaPirateClassId).",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "SeaCrewCarry": {
      "description": "What a crew takes from one zone to the next: everything it has earned (seaVoyage.ts carryOf / applyCarry).",
      "type": "object",
      "required": [
        "v",
        "shipUnit",
        "classId",
        "hullShare",
        "baseHull",
        "gold",
        "lineId",
        "reelId",
        "baits",
        "gunsId",
        "plateId",
        "lanternId",
        "gear",
        "hold",
        "fleet",
        "blueprints",
        "prizes",
        "bountyOwed",
        "caught",
        "earned",
        "sunkCount",
        "piratesSunk",
        "league",
        "brotherhood",
        "story",
        "codex",
        "bottles",
        "unlocks",
        "tavernNight",
        "tavernUpgrades",
        "tavernServed",
        "tavernEarned",
        "charted"
      ],
      "properties": {
        "v": {
          "type": "integer",
          "const": 1
        },
        "shipUnit": {
          "type": "string"
        },
        "classId": {
          "type": "string"
        },
        "hullShare": {
          "description": "The hull's share of its ceiling (a battered ship arrives battered).",
          "type": "number"
        },
        "baseHull": {
          "type": "number"
        },
        "gold": {
          "type": "number"
        },
        "lineId": {
          "type": "string"
        },
        "reelId": {
          "type": "string"
        },
        "baits": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "gunsId": {
          "type": "string"
        },
        "plateId": {
          "type": "string"
        },
        "lanternId": {
          "type": "string"
        },
        "gear": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "hold": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaCarriedItem"
          }
        },
        "fleet": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "unit",
              "classId",
              "hull",
              "hold"
            ],
            "properties": {
              "unit": {
                "type": "string"
              },
              "classId": {
                "type": "string"
              },
              "hull": {
                "type": "number"
              },
              "hold": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/SeaCarriedItem"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "blueprints": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prizes": {
          "type": "number"
        },
        "bountyOwed": {
          "type": "number"
        },
        "caught": {
          "type": "number"
        },
        "earned": {
          "type": "number"
        },
        "sunkCount": {
          "type": "number"
        },
        "piratesSunk": {
          "type": "number"
        },
        "league": {
          "type": "number"
        },
        "brotherhood": {
          "type": "number"
        },
        "story": {
          "description": "The step by id (step indices move when acts are added).",
          "type": [
            "object",
            "null"
          ],
          "required": [
            "stepId",
            "progress",
            "choice",
            "done"
          ],
          "properties": {
            "stepId": {
              "type": "string"
            },
            "progress": {
              "type": "number"
            },
            "choice": {
              "type": [
                "string",
                "null"
              ]
            },
            "done": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "codex": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "n",
              "best",
              "golden"
            ],
            "properties": {
              "n": {
                "type": "number"
              },
              "best": {
                "type": "number"
              },
              "golden": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "bottles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "unlocks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tavernNight": {
          "type": "number"
        },
        "tavernUpgrades": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tavernServed": {
          "type": "number"
        },
        "tavernEarned": {
          "type": "number"
        },
        "charted": {
          "description": "Zones this captain has sailed, in the order first reached.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "penId": {
          "description": "The harbour pastimes (seaHarbour.ts): the pen and its fish, the trophy wall, regatta times and medals.",
          "type": "string"
        },
        "pen": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "defId",
              "lengthCm"
            ],
            "properties": {
              "defId": {
                "type": "string"
              },
              "lengthCm": {
                "type": "number"
              },
              "morph": {
                "type": "string",
                "enum": [
                  "golden",
                  "shardtouched"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "trophies": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "defId",
              "lengthCm",
              "day"
            ],
            "properties": {
              "defId": {
                "type": "string"
              },
              "lengthCm": {
                "type": "number"
              },
              "morph": {
                "type": "string",
                "enum": [
                  "golden",
                  "shardtouched"
                ]
              },
              "day": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "regattaBest": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "regattaMedals": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "wonders": {
          "description": "Wonders of the Gyre charted (data/seaWonders.ts).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "passengers": {
          "description": "People taken off boats in distress, not yet landed.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "people",
              "souls",
              "boat"
            ],
            "properties": {
              "people": {
                "type": "string"
              },
              "souls": {
                "type": "number"
              },
              "boat": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "honours": {
          "description": "Captain's honours earned, and boats' people landed.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rescued": {
          "type": "number"
        },
        "salvaged": {
          "description": "Bell dives: wrecks' relics raised (`<zone>:<wreck>:<relic>`, so a sea's old wrecks stay picked), and relics raised by kind.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "relicsRaised": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        }
      },
      "additionalProperties": false
    },
    "SeaDanger": {
      "description": "Calm Seas: no pirate ever attacks. Fair: they do, and sinking costs a little. Ironman: sinking ends the voyage.",
      "type": "string",
      "enum": [
        "calm",
        "fair",
        "ironman"
      ]
    },
    "SeaFightStyle": {
      "description": "How it fights once hooked (cast/CastSim.ts): a runner bolts away and back; a thrasher jerks in short violent bursts; a sounder dives for the floor; a circler swims wide rounds under the hull (lean with it); a holer makes for a hole in the rocks and snags the line if left there; a leaper throws itself clear of the water and shakes the hook unless the line goes slack.",
      "type": "string",
      "enum": [
        "runner",
        "thrasher",
        "sounder",
        "circler",
        "holer",
        "leaper"
      ]
    },
    "SeaFishBehaviour": {
      "description": "Sea of Stone's fish (docs/modes/SEA_OF_STONE.md, \"Fish\").",
      "type": "string",
      "enum": [
        "shoal",
        "darter",
        "lurker",
        "bottom",
        "legend"
      ]
    },
    "SeaFishDef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "region",
        "sprite",
        "shape",
        "lengthCm",
        "price",
        "depthM",
        "time",
        "behaviour",
        "rarity",
        "swim",
        "power",
        "stamina",
        "wary",
        "freshDays",
        "bait",
        "codex"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "region": {
          "$ref": "#/definitions/SeaFishRegion"
        },
        "catchBy": {
          "description": "How it is caught: on the line (the cast), or only in a pot.",
          "type": "string",
          "enum": [
            "line",
            "pot"
          ]
        },
        "sprite": {
          "description": "Under `/assets/sea/fish/v2/` (assetPaths.ts seaFishSprite).",
          "type": "string"
        },
        "shape": {
          "description": "Hold footprint: rows split by '/', '#' a cell, '.' empty. Rotations are allowed.",
          "type": "string"
        },
        "lengthCm": {
          "description": "Length range in centimetres; the catch rolls inside it.",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        },
        "price": {
          "description": "Gold for a fresh fish of middling length, before the port's demand.",
          "type": "number"
        },
        "depthM": {
          "description": "Metres below the surface it swims between.",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        },
        "time": {
          "$ref": "#/definitions/SeaFishTime"
        },
        "behaviour": {
          "$ref": "#/definitions/SeaFishBehaviour"
        },
        "rarity": {
          "$ref": "#/definitions/SeaFishRarity"
        },
        "swim": {
          "description": "Cruising speed in the cast, metres a second.",
          "type": "number"
        },
        "power": {
          "description": "How hard it pulls on the line, 0..1.",
          "type": "number"
        },
        "stamina": {
          "description": "Seconds of hard pulling in it before it tires.",
          "type": "number"
        },
        "wary": {
          "description": "Chance it noses the hook and turns away, 0..1.",
          "type": "number"
        },
        "freshDays": {
          "description": "In-game days it stays fresh out of ice.",
          "type": "number"
        },
        "bait": {
          "description": "Baits it takes most readily.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "codex": {
          "description": "One line for the codex.",
          "type": "string"
        },
        "fight": {
          "description": "How it fights once hooked; absent, its behaviour's way (see seaFightStyle).",
          "$ref": "#/definitions/SeaFightStyle"
        },
        "protected": {
          "description": "The harbours fine a crew for landing it (absent: the shipped protected species only).",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "SeaFishRarity": {
      "type": "string",
      "enum": [
        "common",
        "uncommon",
        "rare",
        "legendary"
      ]
    },
    "SeaFishRegion": {
      "description": "Where it lives: the Isles' three waters, or one of the Chart's further seas (seaVoyage.ts).",
      "type": "string",
      "enum": [
        "lagoon",
        "reef",
        "deep",
        "atolls",
        "ember",
        "bone",
        "tempest"
      ]
    },
    "SeaFishTime": {
      "type": "string",
      "enum": [
        "day",
        "dusk",
        "night",
        "any"
      ]
    },
    "SeaGateDef": {
      "description": "The Chart (docs/modes/SEA_OF_STONE.md, \"The Chart: connected seas\"): a story voyage is several sea maps, one per zone, joined by sea gates. Sailing into an open gate ends this map; the shell builds the next zone's map with every crew's progress in `voyage.carry` (as a Grand Prix carries its points), so a hop is just another map launch and the same on every machine.",
      "type": "object",
      "required": [
        "id",
        "name",
        "kind",
        "to",
        "toGate",
        "x",
        "y",
        "r",
        "outX",
        "outY",
        "outHeading"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "description": "'passage': a channel between two runed sea-stones at the chart's edge; 'rune': a ring of standing stones out at sea.",
          "type": "string",
          "enum": [
            "rune",
            "passage"
          ]
        },
        "to": {
          "description": "The zone it leads to, and the gate there a ship comes out of.",
          "type": "string"
        },
        "toGate": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Reach to take it, tiles.",
          "type": "number"
        },
        "outX": {
          "description": "Where a ship arriving through this gate lies, and which way she faces (out into this zone).",
          "type": "number"
        },
        "outY": {
          "type": "number"
        },
        "outHeading": {
          "type": "number"
        },
        "requires": {
          "description": "What opens it: a story unlock (data/seaStory.ts rewards). Absent, it is always open.",
          "type": "object",
          "required": [
            "unlock",
            "text"
          ],
          "properties": {
            "unlock": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "SeaLine": {
      "description": "One spoken line: `who` is a character of the story's cast (or `narrator`).",
      "type": "object",
      "required": [
        "who",
        "text"
      ],
      "properties": {
        "who": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SeaObjective": {
      "description": "What a step asks; the sim counts it from the moment the step begins.",
      "anyOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "count"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sell"
            },
            "count": {
              "type": "number"
            },
            "port": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "gold",
            "port"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "pay"
            },
            "gold": {
              "type": "number"
            },
            "port": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "count"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "catch"
            },
            "count": {
              "type": "number"
            },
            "depthMin": {
              "type": "number"
            },
            "species": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "id"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "bottle"
            },
            "id": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "port"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "visit"
            },
            "port": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "count"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "sink"
            },
            "count": {
              "type": "number"
            },
            "tag": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "faction"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "board"
            },
            "faction": {
              "type": "string",
              "enum": [
                "pirate",
                "merchant"
              ]
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "options"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "choose"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "label",
                  "detail"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "detail": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "zone"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "zone"
            },
            "zone": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "point"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "const": "reach"
            },
            "point": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "SeaPortDef": {
      "description": "A port: where a crew docks, sells its catch and buys gear.",
      "type": "object",
      "required": [
        "id",
        "name",
        "people",
        "x",
        "y",
        "r",
        "exitX",
        "exitY",
        "exitHeading"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "people": {
          "description": "Whose port it is: its look, its prices, its shop.",
          "$ref": "#/definitions/PlayableRace"
        },
        "x": {
          "description": "The harbour mouth a ship docks at (tile centre).",
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Docking reach, tiles.",
          "type": "number"
        },
        "exitX": {
          "description": "Where a ship leaves from and which way it faces.",
          "type": "number"
        },
        "exitY": {
          "type": "number"
        },
        "exitHeading": {
          "type": "number"
        },
        "wants": {
          "description": "Species this port pays more (or less) for: id -> price multiplier.",
          "type": "object",
          "additionalProperties": {
            "type": "number"
          }
        },
        "haven": {
          "description": "A pirate haven: only the Brotherhood docks here (Phase 4).",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "SeaRegattaDef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "port",
        "buoys",
        "par",
        "prize"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "port": {
          "description": "Starts and finishes at this port's mouth.",
          "type": "string"
        },
        "buoys": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "par": {
          "description": "Seconds for gold, silver and bronze.",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 3,
          "maxItems": 3,
          "additionalItems": false
        },
        "prize": {
          "description": "Gold paid the first time each medal is won.",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 3,
          "maxItems": 3,
          "additionalItems": false
        }
      },
      "additionalProperties": false
    },
    "SeaRegionDef": {
      "description": "Waters a crew may not enter until it has unlocked them (the story's gates).",
      "type": "object",
      "required": [
        "id",
        "name",
        "rects"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "rects": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x0",
              "y0",
              "x1",
              "y1"
            ],
            "properties": {
              "x0": {
                "type": "number"
              },
              "y0": {
                "type": "number"
              },
              "x1": {
                "type": "number"
              },
              "y1": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "gate": {
          "type": "object",
          "required": [
            "unlock",
            "text"
          ],
          "properties": {
            "unlock": {
              "type": "string"
            },
            "text": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "SeaRoamerDef": {
      "description": "A pirate that sails a round of open water rather than a cove's.",
      "type": "object",
      "required": [
        "cls",
        "route"
      ],
      "properties": {
        "cls": {
          "type": "string"
        },
        "route": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "SeaRules": {
      "type": "object",
      "required": [
        "version",
        "homePort",
        "ports",
        "spots"
      ],
      "properties": {
        "version": {
          "type": "number"
        },
        "seed": {
          "description": "The voyage's own seed (its wind, its cast seeds).",
          "type": "number"
        },
        "homePort": {
          "description": "Where every crew starts.",
          "type": "string"
        },
        "ports": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaPortDef"
          }
        },
        "spots": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaSpotDef"
          }
        },
        "captains": {
          "description": "Seat -> captain (name and people); a seat without one is a human captain of the seat's race.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/SeaCaptain"
          }
        },
        "ships": {
          "description": "Seat -> ship unit id; absent, the captain's people's fishing boat.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "wind": {
          "description": "The wind at the start.",
          "type": "object",
          "required": [
            "toAngle",
            "strength"
          ],
          "properties": {
            "toAngle": {
              "type": "number"
            },
            "strength": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "daySeconds": {
          "description": "Seconds of game time in an in-game day (default SEA_DAY_SECONDS).",
          "type": "number"
        },
        "startGold": {
          "type": "number"
        },
        "easyReel": {
          "description": "The fight plays itself, more gently.",
          "type": "boolean"
        },
        "danger": {
          "$ref": "#/definitions/SeaDanger"
        },
        "coves": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaCoveDef"
          }
        },
        "roamers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaRoamerDef"
          }
        },
        "bounties": {
          "description": "The harbourmasters post wanted captains.",
          "type": "boolean"
        },
        "story": {
          "description": "The story this map tells: the shipped one by name (data/seaStory.ts), the map's own, or none (Open Waters).",
          "anyOf": [
            {
              "type": "string",
              "const": "drowned_crown"
            },
            {
              "$ref": "#/definitions/SeaStoryDef"
            }
          ]
        },
        "fish": {
          "description": "Species this map adds, or changes by id (data/seaFish.ts): its own fish, caught and sold like the shipped ones.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaFishDef"
          }
        },
        "regions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaRegionDef"
          }
        },
        "bottles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaBottleDef"
          }
        },
        "lanes": {
          "description": "Merchant lanes between ports (League ships sail them).",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "from",
              "to"
            ],
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "storyPoints": {
          "description": "Where the story stages its set pieces.",
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "pvp": {
          "description": "Pirate Waters (Phase 5): crews' guns hit each other's ships.",
          "type": "boolean"
        },
        "gates": {
          "description": "Gates out of this zone to the others: each `to` is one of the chart's seas.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaGateDef"
          }
        },
        "chart": {
          "description": "The seas of this voyage, in story order, the first where a new voyage begins: what its gates lead to and its story's `zone` objectives name, each with its own map. Every map of one voyage carries the same chart. Absent: the Gyre's five (seaVoyage.ts SEA_ZONES), the game's own seas, generated.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaChartSeaDef"
          }
        },
        "menu": {
          "description": "The setup screen this map opens in (its Play in Custom Games, or `/play?sea=setup&map=<ref>`): Sea of Stone's captain, danger and day choices over this voyage, titled, tagged and badged by the menu. Absent: under the map's own name. `false`: no setup screen; the map launches as it is, its captains and settings as written. Menus only; the sim never reads it.",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/FrontDoorMenu"
            }
          ]
        },
        "voyage": {
          "description": "This map's place in a story voyage's chart; absent, a voyage of one map.",
          "$ref": "#/definitions/SeaVoyageRules"
        },
        "vents": {
          "description": "Steam vents in the water (seaWeather.ts: they blow where the zone's weather has them).",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "regattas": {
          "description": "Regatta courses (seaHarbour.ts).",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaRegattaDef"
          }
        },
        "wonders": {
          "description": "Wonders of the Gyre in this sea (data/seaWonders.ts): charted when a ship comes within `r` tiles of the point.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaWonderSite"
          }
        },
        "camera": {
          "description": "The camera: whether players may take the helm view, and which view the voyage opens in.",
          "$ref": "#/definitions/SeaCameraRules"
        }
      },
      "additionalProperties": false
    },
    "SeaSpotDef": {
      "description": "A fishing ground: who lives there and how deep it is.",
      "type": "object",
      "required": [
        "id",
        "name",
        "x",
        "y",
        "r",
        "depthM",
        "fish"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "description": "Reach to fish it, tiles.",
          "type": "number"
        },
        "depthM": {
          "type": "number"
        },
        "fish": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "count"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "count": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "SeaStoryDef": {
      "description": "A story a voyage tells (`rules.sea.story`): its cast, its acts of steps, and the line the HUD shows once it is told. A map names the shipped one (`\"drowned_crown\"`) or writes its own in this shape (content/docs/map-editor/build-a-sailing-game.mdx).",
      "type": "object",
      "required": [
        "title",
        "cast",
        "acts"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "cast": {
          "description": "Everyone who speaks, by id; `narrator` needs no entry.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/SeaCharacter"
          }
        },
        "acts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaAct"
          }
        },
        "done": {
          "description": "The HUD's line once the last act is told.",
          "type": "string"
        },
        "toCome": {
          "description": "What the HUD says of an act still to be written, by its id (an act's `next`).",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "SeaStoryStep": {
      "type": "object",
      "required": [
        "id",
        "title",
        "goal",
        "objective",
        "intro",
        "outro"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "goal": {
          "description": "The objective as the HUD shows it.",
          "type": "string"
        },
        "objective": {
          "$ref": "#/definitions/SeaObjective"
        },
        "intro": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaLine"
          }
        },
        "outro": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeaLine"
          }
        },
        "branch": {
          "description": "Only on this branch of an earlier choice.",
          "type": "string"
        },
        "reward": {
          "type": "object",
          "properties": {
            "gold": {
              "type": "number"
            },
            "blueprint": {
              "type": "string"
            },
            "league": {
              "type": "number"
            },
            "brotherhood": {
              "type": "number"
            },
            "unlock": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "stage": {
          "description": "Something the map stages when the step begins (rendering and sim both read it).",
          "type": "string",
          "const": "gulls_pride"
        },
        "spawn": {
          "description": "Foes the step brings out at story points when it begins in its own sea, tagged for its 'sink' objective.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "cls",
              "point",
              "tag"
            ],
            "properties": {
              "cls": {
                "type": "string"
              },
              "point": {
                "type": "string"
              },
              "tag": {
                "type": "string"
              },
              "n": {
                "type": "number"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "SeaVoyageRules": {
      "type": "object",
      "required": [
        "zone"
      ],
      "properties": {
        "zone": {
          "description": "This map's sea: one of its chart's ids (SeaRules.chart; absent chart: seaVoyage.ts SEA_ZONES).",
          "type": "string"
        },
        "arriveGate": {
          "description": "The gate the crews came in by: they start there, not at the home port.",
          "type": "string"
        },
        "startPort": {
          "description": "A voyage resumed from the captain's log: the port it was saved at (they start there).",
          "type": "string"
        },
        "carry": {
          "description": "Seat -> the progress its crew brings.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/SeaCrewCarry"
          }
        }
      },
      "additionalProperties": false
    },
    "SeaWonderSite": {
      "description": "Where a wonder of the Gyre lies in a sea (its name and lore are data/seaWonders.ts).",
      "type": "object",
      "required": [
        "id",
        "x",
        "y",
        "r"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "r": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "ShooterContent": {
      "type": "object",
      "required": [
        "level",
        "fighters",
        "waves",
        "aircraftId",
        "difficulty"
      ],
      "properties": {
        "level": {
          "$ref": "#/definitions/AcesLevelConfig"
        },
        "fighters": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FighterDef"
          }
        },
        "waves": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AcesWaveDef"
          }
        },
        "aircraftId": {
          "type": "string"
        },
        "difficulty": {
          "type": "string",
          "enum": [
            "hard",
            "normal",
            "danmaku"
          ]
        },
        "startInHangar": {
          "type": "boolean"
        },
        "scrollSpeed": {
          "type": "number"
        },
        "adventureLoadout": {
          "$ref": "#/definitions/AdventureLoadout"
        },
        "progression": {
          "description": "Official progression is opt-in presentation; cloned maps default to independent play.",
          "type": "string",
          "enum": [
            "campaign",
            "aces"
          ]
        },
        "scriptedScoring": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "SpawnerSpec": {
      "description": "A data-driven spawner attached to ANY building (D4). See `CreepSpawner`.",
      "type": "object",
      "required": [
        "squad"
      ],
      "properties": {
        "squad": {
          "description": "ANY unit type ids — cross-faction is fine, and always was: `squad` is an arbitrary `string[]` and `spawnCreepUnit` accepts any id with a `UnitDef`.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "respawn": {
          "description": "[min, max] ticks between respawn attempts. Default 900/1800 (45-90s).",
          "type": "array",
          "items": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "minItems": 2,
          "maxItems": 2,
          "additionalItems": false
        },
        "leash": {
          "description": "Soft leash radius. Default CREEP_LEASH_RADIUS.",
          "type": "number"
        },
        "hardLeash": {
          "description": "Hard leash radius. Default CREEP_HARD_LEASH_RADIUS.",
          "type": "number"
        },
        "activation": {
          "description": "Wake radius. Default CREEP_CAMP_ACTIVATION_RADIUS.",
          "type": "number"
        },
        "owner": {
          "description": "Seat the spawned units belong to. Default CREEP_PLAYER_ID; a real seat makes this a FRIENDLY spawner.",
          "type": "number"
        },
        "hostile": {
          "description": "`false` ⇒ no `Creep` component: no leash, no bounty, no dormancy. Default true. NOTE: this path charges no population either way.",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "StageDef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "subtitle",
        "biome",
        "pegs"
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/StageId"
        },
        "name": {
          "type": "string"
        },
        "subtitle": {
          "type": "string"
        },
        "biome": {
          "type": "string",
          "enum": [
            "forest",
            "winter",
            "swamp",
            "wasteland",
            "glade"
          ]
        },
        "art": {
          "description": "The picture behind the board on its lobby card (an asset path; the board itself is drawn from its pegs); left out, its biome's built-in painting.",
          "type": "string"
        },
        "backdrop": {
          "description": "The board screen's backdrop while this board is chosen; left out, its biome's built-in painting.",
          "type": "string"
        },
        "pegs": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "color": {
                "$ref": "#/definitions/PegColor"
              },
              "shape": {
                "$ref": "#/definitions/PegShape"
              },
              "radius": {
                "type": "number"
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "rotation": {
                "type": "number"
              },
              "motion": {
                "$ref": "#/definitions/PegMotionDef"
              }
            },
            "additionalProperties": false
          }
        },
        "movingObstacles": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/MovingObstacleDef"
          }
        },
        "bumpers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BumperDef"
          }
        }
      },
      "additionalProperties": false
    },
    "StageId": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "skylands",
            "foundry",
            "sunspire",
            "blood_gulch",
            "crypt"
          ]
        },
        {
          "type": "object",
          "required": [
            "length"
          ],
          "properties": {
            "length": {
              "description": "Returns the length of a String object.",
              "type": "number"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "SurvivorsBossDef": {
      "type": "object",
      "required": [
        "name",
        "moves",
        "unit",
        "hp",
        "damage",
        "speed"
      ],
      "properties": {
        "name": {
          "description": "Its name on the boss bar.",
          "type": "string"
        },
        "title": {
          "description": "Its title under the name.",
          "type": "string"
        },
        "moves": {
          "description": "What it does, in turn.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SurvivorsBossMove"
          }
        },
        "moveEvery": {
          "description": "Seconds between moves.",
          "type": "number"
        },
        "unit": {
          "description": "The unit it is drawn as (any unit with a model).",
          "type": "string"
        },
        "hp": {
          "description": "Health at tier 1 on Normal, before the run's ramp.",
          "type": "number"
        },
        "damage": {
          "description": "Damage a touch (melee) or a shot (ranged).",
          "type": "number"
        },
        "speed": {
          "description": "Tiles a second.",
          "type": "number"
        },
        "radius": {
          "description": "Body radius, tiles.",
          "type": "number"
        },
        "kind": {
          "description": "`melee` walks into you; `ranged` keeps its distance and shoots; `charger` rushes when near.",
          "type": "string",
          "enum": [
            "melee",
            "ranged",
            "charger"
          ]
        },
        "xp": {
          "description": "Experience a kill is worth (a shard's value).",
          "type": "number"
        },
        "scale": {
          "description": "Drawn this much bigger than the unit (absent: 1).",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsBossMove": {
      "description": "A boss's attacks: each telegraphed on the ground before it lands.",
      "type": "string",
      "enum": [
        "summon",
        "slam",
        "charge",
        "nova",
        "volley",
        "quake"
      ]
    },
    "SurvivorsDifficulty": {
      "description": "How hard a run is (opened zone by zone: win Normal to open Heroic, Heroic to open Mythic).",
      "type": "string",
      "enum": [
        "normal",
        "heroic",
        "mythic"
      ]
    },
    "SurvivorsEnemyDef": {
      "description": "One monster a zone sends: a unit (its model and name) and how it fights.",
      "type": "object",
      "required": [
        "unit",
        "hp",
        "damage",
        "speed"
      ],
      "properties": {
        "unit": {
          "description": "The unit it is drawn as (any unit with a model).",
          "type": "string"
        },
        "hp": {
          "description": "Health at tier 1 on Normal, before the run's ramp.",
          "type": "number"
        },
        "damage": {
          "description": "Damage a touch (melee) or a shot (ranged).",
          "type": "number"
        },
        "speed": {
          "description": "Tiles a second.",
          "type": "number"
        },
        "radius": {
          "description": "Body radius, tiles.",
          "type": "number"
        },
        "kind": {
          "description": "`melee` walks into you; `ranged` keeps its distance and shoots; `charger` rushes when near.",
          "type": "string",
          "enum": [
            "melee",
            "ranged",
            "charger"
          ]
        },
        "xp": {
          "description": "Experience a kill is worth (a shard's value).",
          "type": "number"
        },
        "scale": {
          "description": "Drawn this much bigger than the unit (absent: 1).",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsHour": {
      "description": "The light a run is fought in.",
      "type": "string",
      "enum": [
        "day",
        "dusk",
        "night"
      ]
    },
    "SurvivorsMenu": {
      "type": "object",
      "properties": {
        "zones": {
          "description": "The zones the lobby offers, 1..12 (this map among them, or not).",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FrontDoorMapEntry"
          }
        },
        "title": {
          "description": "The menu's title (absent: the map's name). 1..80 characters.",
          "type": "string"
        },
        "tagline": {
          "description": "One line under the logo. 1..160 characters.",
          "type": "string"
        },
        "logo": {
          "description": "The logo: a shipped `/assets/` image or a `ugc:` upload, under loading art's rule (absent: the game's own).",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsRules": {
      "description": "`rules.survivors`: a run on this map.",
      "type": "object",
      "required": [
        "zone"
      ],
      "properties": {
        "zone": {
          "description": "The zone fought on this map (a shipped zone id, or the map's own zone in `zoneDef`).",
          "type": "string"
        },
        "zoneDef": {
          "description": "A creator's own zone (its monsters, bosses and names); absent: the shipped zone `zone` names.",
          "$ref": "#/definitions/SurvivorsZoneDef"
        },
        "difficulty": {
          "$ref": "#/definitions/SurvivorsDifficulty"
        },
        "heroes": {
          "description": "Seat -> hero id, for seats whose hero the map names (absent: they pick in the lobby).",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "roster": {
          "description": "Heroes a creator's map offers (absent: every hero).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lobby": {
          "description": "Open in the lobby (heroes picked, the host starts the run) rather than straight into the run.",
          "type": "boolean"
        },
        "seed": {
          "description": "The run's seed (absent: one draw from the match's stream).",
          "type": "number"
        },
        "cx": {
          "description": "Where the heroes stand at the start, tiles (absent: the middle of the map).",
          "type": "number"
        },
        "cy": {
          "type": "number"
        },
        "bounds": {
          "description": "How far from the middle the run may go, tiles (absent: to the map's edge, less a margin).",
          "type": "number"
        },
        "obstacles": {
          "description": "Copses, rocks and stones the run walks round: circles in tiles.",
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "x",
              "y",
              "r"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "r": {
                "type": "number"
              }
            },
            "additionalProperties": false
          }
        },
        "tuning": {
          "$ref": "#/definitions/SurvivorsTuning"
        },
        "hour": {
          "description": "The light the run is fought in: `day`, `dusk` or `night` (absent: the shipped zone's own, else day).",
          "$ref": "#/definitions/SurvivorsHour"
        },
        "menu": {
          "description": "The front door a creator's map makes (or false: launch as written).",
          "anyOf": [
            {
              "type": "boolean",
              "const": false
            },
            {
              "$ref": "#/definitions/SurvivorsMenu"
            }
          ]
        },
        "world": {
          "description": "An endless world: no edge. The land is made in 32-tile chunks from a seed as the party walks, and a chunk walked back to is the same chunk. The map's own tiles are the first window of it (224 tiles square, the heroes in its middle). With a world, `bounds` holds only the lobby and `obstacles` is ignored: the chunks make their own.",
          "$ref": "#/definitions/SurvivorsWorldRules"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsTuning": {
      "description": "A map's own numbers over the defaults in `survivorsTuning.ts` (every field optional).",
      "type": "object",
      "properties": {
        "runSeconds": {
          "description": "Seconds until the final boss comes (the run's length).",
          "type": "number"
        },
        "bossEverySeconds": {
          "description": "Seconds between the mini-bosses (2 minutes: four of them before a ten-minute final boss).",
          "type": "number"
        },
        "maxAlive": {
          "description": "The most monsters alive at once.",
          "type": "number"
        },
        "enemyHealth": {
          "description": "Monster health and damage multipliers on top of the difficulty's.",
          "type": "number"
        },
        "enemyDamage": {
          "type": "number"
        },
        "xpRate": {
          "description": "Experience and gold multipliers.",
          "type": "number"
        },
        "goldRate": {
          "type": "number"
        },
        "handSeconds": {
          "description": "Seconds a level-up hand waits in co-op before the first card is taken.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsWorldRules": {
      "description": "An endless world's land (`rules.survivors.world`). Its look is the run's zone's.",
      "type": "object",
      "properties": {
        "seed": {
          "description": "The land's seed (absent: the zone's own). The same seed makes the same land.",
          "type": "number"
        },
        "density": {
          "description": "Clumps (copses and rocks to walk round) in each 32-tile chunk, 0..12 (absent: 5).",
          "type": "number"
        },
        "scatter": {
          "description": "Loose small props (walked through) in each chunk, 0..80 (absent: 30).",
          "type": "number"
        },
        "leash": {
          "description": "How far a hero may walk from the middle of the party in co-op, tiles 12..40 (absent: 36). Alone there is no leash.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SurvivorsZoneDef": {
      "description": "A zone: where the run is, who comes, and when.",
      "type": "object",
      "required": [
        "id",
        "name",
        "tiers",
        "bosses",
        "final"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "subtitle": {
          "description": "One line under the name (\"The Long Night\").",
          "type": "string"
        },
        "blurb": {
          "type": "string"
        },
        "tiers": {
          "description": "The monsters, weakest first; the run walks up this ladder as the clock runs.",
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/SurvivorsEnemyDef"
            }
          }
        },
        "bosses": {
          "description": "The mini-bosses, one every `bossEverySeconds`.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SurvivorsBossDef"
          }
        },
        "final": {
          "description": "The zone's last boss: killing it wins the run.",
          "$ref": "#/definitions/SurvivorsBossDef"
        }
      },
      "additionalProperties": false
    },
    "TilesetSlotSource": {
      "description": "Where one slot's texture comes from.",
      "type": "object",
      "required": [
        "biome"
      ],
      "properties": {
        "biome": {
          "description": "Source biome. Unknown biomes fall back to the map's own biome.",
          "type": "string"
        },
        "variant": {
          "description": "0-based variant index within the source biome's layer. Defaults to the destination slot's own index.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "TilesetSourceMap": {
      "description": "Authored per-slot sourcing. Absent slots take the map biome's own texture.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/TilesetSlotSource"
      }
    },
    "WeatherKind": {
      "description": "Cosmetic precipitation only. Weather never changes simulation rules.",
      "type": "string",
      "enum": [
        "none",
        "rain",
        "snow"
      ]
    },
    "WonderProgress": {
      "description": "How much of an ENEMY Wonder's construction the rest of the lobby is told.",
      "type": "string",
      "enum": [
        "off",
        "quarters",
        "exact"
      ]
    },
    "WonderRules": {
      "type": "object",
      "required": [
        "enabled",
        "hold",
        "progress"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "hold": {
          "$ref": "#/definitions/HoldLength"
        },
        "progress": {
          "description": "Construction-progress visibility. See WonderProgress.",
          "$ref": "#/definitions/WonderProgress"
        }
      },
      "additionalProperties": false
    }
  }
}
