{
  "$schema": "https://sebastianaaltonen.com/assets/modding/spillway/level.schema.json",
  "version": 2,
  "materials": [{"id": "floor", "builtin": "concrete"}, {"id": "wall", "builtin": "steel"}],
  "player": {"position": [0, 4.55, -16]},
  "brushes": [
    {"op": "add", "shape": "box", "center": [0, 2, 0], "size": [48, 4, 48], "material": "floor"},
    {"op": "add", "shape": "box", "center": [0, 7, 0], "size": [12, 6, 1], "material": "wall"}
  ],
  "fluids": [],
  "gates": [{"id": "north", "floor": [0, 4, 20], "size": [8, 8, 4], "yaw": 180}],
  "pickups": [{"kind": "ammo", "position": [0, 5, -13]}],
  "dropLimits": {"ammo": 5, "health": 3, "energy": 1, "grenade": 2, "mine": 0, "foam": 0, "lure": 0},
  "waves": [{"afterTrigger": "open_gate", "groups": [
    {"gate": "north", "enemy": "constructor", "count": 5, "intervalSeconds": 1}
  ]}],
  "extraWaves": [{"id": "ambush", "announcement": "none", "groups": [
    {"gate": "north", "enemy": "runner", "count": 2, "intervalSeconds": 1}
  ]}],
  "triggers": [
    {
      "id": "open_gate",
      "area": {"shape": "box", "center": [0, 6, -6], "size": [8, 4, 4]},
      "actors": "player",
      "delaySeconds": 0.5,
      "actions": [
        {"type": "brushes", "brushes": [
          {"op": "subtract", "shape": "box", "center": [0, 6, 0], "size": [4, 4, 2]},
          {"op": "add", "shape": "box", "center": [8, 4.5, 0], "size": [4, 1, 4], "material": "floor"}
        ]},
        {"type": "explosion", "position": [-8, 6, 0], "radius": 3, "damage": 20, "push": 20},
        {"type": "pickup", "kind": "bfg", "position": [0, 8, -2]},
        {"type": "enableTrigger", "trigger": "ambush_relay"}
      ]
    },
    {"id": "ambush_relay", "enabled": false,
      "area": {"shape": "box", "center": [0, 6, -6], "size": [8, 4, 4]}, "delaySeconds": 3,
      "actions": [{"type": "wave", "wave": "ambush", "gates": ["north"]}]},
    {
      "id": "rocket_trap",
      "area": {"shape": "sphere", "center": [8, 6, 8], "radius": 3},
      "actors": "both",
      "repeat": true,
      "actions": [{"type": "projectile", "projectile": "rocket", "position": [8, 7, 16], "velocity": [0, 0, -18]}]
    }
  ]
}
