mapScripts:
  - type: DEFAULT # forest, mountain
    commands:
    - type: addUFO
    - type: addCraft
    - type: addBlock
      size: 2
      executions: 2
    - type: fillArea
  - type: FARM
    commands:
    - type: addUFO
    - type: addCraft
    - type: fillArea
      blocks: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
      maxUses: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
  - type: DESERT
    commands:
    - type: addUFO
    - type: addCraft
    - type: addBlock
      size: 2
      executions: 3
    - type: fillArea
  - type: JUNGLE
    commands:
    - type: addUFO
    - type: addCraft
    - type: fillArea
      blocks: [3, 4, 5, 6, 7, 8, 9, 10, 11]
      freqs: [2, 2, 2, 2, 2, 2, 2, 1, 1]
  - type: POLAR
    commands:
    - type: addUFO
    - type: addCraft
    - type: addBlock
      size: 2
    - type: fillArea
  - type: URBAN
    commands:
    - type: addCraft
    - type: addLine
      label: 1
      direction: vertical
      executionChances: 50
      rects:
        - [1, 1, 4, 1]
    - type: addLine
      label: 2
      conditionals: -1
      executionChances: 50
      direction: horizontal
      rects:
        - [1, 1, 1, 4]
    - type: addLine
      conditionals: [-1, -2]
      direction: both
      rects:
        - [1, 1, 4, 4]
    - type: addBlock
      size: 2
      executions: 4
    - type: fillArea
      # URBAN set is lacking blocks 10-13, so the numbers don't correlate properly here,
      # because these are references to the block numbers within the sets, not the file names.
      blocks: [3, 4, 10, 11, 12, 13, 14]
      freqs: [3, 3, 2, 2, 2, 2, 2]
  - type: MARS
    commands:
    - type: addCraft
    - type: addBlock
      groups: 2
    - type: fillArea
  - type: ALIENBASE
    commands:
    - type: addBlock
      groups: 2
      executions: 2
    - type: addBlock
      size: 2
      groups: 3
    - type: addBlock
      size: 2
      executions: 3
    - type: fillArea
      groups: [0, 1]
      freqs: [3, 2]
    - type: digTunnel
      direction: both
      tunnelData:
        level: 0
        MCDReplacements:
          - type: westWall
            set: 2
            entry: 18
          - type: northWall
            set: 2
            entry: 17
          - type: corner
            set: 2
            entry: 19
          - type: floor
            set: 1
            entry: 63
  - type: BOSSBATTLE
    commands:
    - type: addBlock
      groups: 2
      executions: 2
    - type: addBlock
      groups: 4
      size: 2
    - type: addBlock
      size: 2
      executions: 3
    - type: fillArea
      groups: [0, 1]
      freqs: [3, 2]
    - type: digTunnel
      direction: both
      tunnelData:
        level: 0
        MCDReplacements:
          - type: westWall
            set: 2
            entry: 18
          - type: northWall
            set: 2
            entry: 17
          - type: corner
            set: 2
            entry: 19
          - type: floor
            set: 1
            entry: 63
  - type: XBASE
    commands:
    - type: digTunnel
      direction: both
      tunnelData:
        level: 0
        MCDReplacements:
          - type: westWall
            set: 1
            entry: 13
          - type: northWall
            set: 1
            entry: 14
    - type: fillArea
      blocks: 20