[
  {
    "id": "green_maintenance_check",
    "type": "SPELL",
    "name": { "str": "Green Maintenance Badge Trait" },
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "GREEN_MAINTENANCE_ALARM"
  },
  {
    "type": "effect_on_condition",
    "id": "GREEN_MAINTENANCE_ALARM",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_green_maintenance_badge_check",
          "condition": { "not": { "u_has_item": "id_science_maintenance_green" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "bots_center_garage", "om_terrain": "lab_CORE_2x1_EC_ground" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." }, { "u_message": "lab_safety_maintenance_snippets", "snippet": true } ]
        }
      }
    ]
  },
  {
    "//": "Opens bot release if you lack a green maintenance ID card.",
    "type": "mapgen",
    "update_mapgen_id": "bots_center_garage",
    "method": "json",
    "object": { "set": [ { "line": "terrain", "id": "t_thconc_r", "x": 1, "y": 11, "x2": 1, "y2": 12 } ] }
  },
  {
    "id": "mon_lab_security_drone_GM",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "GM security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "light_green",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "green_maintenance_check" },
        "cooldown": 20,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_GM",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  },
  {
    "id": "yellow_maintenance_check",
    "type": "SPELL",
    "name": { "str": "Ocher Maintenance Badge Trait" },
    "//": "renamed player facing name to ocher.",
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "YELLOW_MAINTENANCE_ALARM"
  },
  {
    "type": "effect_on_condition",
    "id": "YELLOW_MAINTENANCE_ALARM",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_yellow_maintenance_badge_check",
          "condition": { "not": { "u_has_item": "id_science_maintenance_yellow" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "concrete_wall_o_lab_res_8_NW", "om_terrain": "lab_res_8_NWD" },
            { "mapgen_update": "concrete_wall_o_lab_res_8_NE", "om_terrain": "lab_res_8_NED" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." }, { "u_message": "lab_safety_maintenance_snippets", "snippet": true } ]
        }
      }
    ]
  },
  {
    "id": "mon_lab_security_drone_YM",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "OM security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "yellow",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "yellow_maintenance_check" },
        "cooldown": 120,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_YM",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  },
  {
    "id": "blue_maintenance_check",
    "type": "SPELL",
    "name": { "str": "Blue Maintenance Badge Trait" },
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "BLUE_MAINTENANCE_ALARM"
  },
  {
    "type": "effect_on_condition",
    "id": "BLUE_MAINTENANCE_ALARM",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_blue_maintenance_badge_check",
          "condition": { "not": { "u_has_item": "id_science_maintenance_blue" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "concrete_wall_o_lab_res_8_NW", "om_terrain": "lab_2x2_cargo_NW" },
            { "mapgen_update": "concrete_wall_o_lab_res_8_NE", "om_terrain": "lab_2x2_cargo_NE" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." }, { "u_message": "lab_safety_maintenance_snippets", "snippet": true } ]
        }
      }
    ]
  },
  {
    "id": "mon_lab_security_drone_BM",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "BM security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "blue",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "blue_maintenance_check" },
        "cooldown": 120,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_BM",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  },
  {
    "id": "blue_maintenance_check2",
    "type": "SPELL",
    "name": { "str": "Blue Maintenance Badge Trait" },
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "BLUE_MAINTENANCE_ALARM2"
  },
  {
    "type": "effect_on_condition",
    "id": "BLUE_MAINTENANCE_ALARM2",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_blue_maintenance_badge_check2",
          "condition": { "not": { "u_has_item": "id_science_maintenance_blue" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "lab_security_corridor_e", "om_terrain": "underground_lab_central_-6W" },
            { "mapgen_update": "lab_security_corridor_f", "om_terrain": "underground_lab_central_-6E" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." }, { "u_message": "lab_safety_maintenance_snippets", "snippet": true } ]
        }
      }
    ]
  },
  {
    "type": "mapgen",
    "update_mapgen_id": "lab_security_corridor_e",
    "method": "json",
    "object": {
      "place_terrain": [
        { "ter": "t_thconc_r", "x": 17, "y": 4 },
        { "ter": "t_thconc_r", "x": 17, "y": 6 },
        { "ter": "t_thconc_r", "x": 6, "y": 4 },
        { "ter": "t_thconc_r", "x": 6, "y": 6 }
      ]
    }
  },
  {
    "type": "mapgen",
    "update_mapgen_id": "lab_security_corridor_f",
    "method": "json",
    "object": {
      "place_terrain": [
        { "ter": "t_thconc_r", "x": 17, "y": 13 },
        { "ter": "t_thconc_r", "x": 17, "y": 15 },
        { "ter": "t_thconc_r", "x": 6, "y": 13 },
        { "ter": "t_thconc_r", "x": 6, "y": 15 }
      ]
    }
  },
  {
    "id": "mon_lab_security_drone_BM2",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "BM security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "cyan",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "blue_maintenance_check2" },
        "cooldown": 120,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_BM2",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  },
  {
    "id": "green_researcher_check",
    "type": "SPELL",
    "name": { "str": "Light Green Researcher Badge Trait" },
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "GREEN_RESEARCHER_ALARM"
  },
  {
    "type": "effect_on_condition",
    "id": "GREEN_RESEARCHER_ALARM",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_green_researcher_badge_check",
          "condition": { "not": { "u_has_item": "id_science_mutagen_green" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "bot_release_rearcher_green", "om_terrain": "lab_res_8_NW" },
            { "mapgen_update": "bot_release_rearcher_green_2", "om_terrain": "lab_res_8_NE" },
            { "mapgen_update": "bot_release_rearcher_green", "om_terrain": "lab_res_8_NWD" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." } ]
        }
      }
    ]
  },
  {
    "//": "Opens bot release if you lack a light green researcher ID card.",
    "type": "mapgen",
    "update_mapgen_id": "bot_release_rearcher_green",
    "method": "json",
    "object": { "set": [ { "line": "terrain", "id": "t_thconc_r", "x": 19, "y": 15, "x2": 19, "y2": 16 } ] }
  },
  {
    "//": "Opens bot release if you lack a light green researcher ID card.",
    "type": "mapgen",
    "update_mapgen_id": "bot_release_rearcher_green_2",
    "method": "json",
    "object": { "set": [ { "line": "terrain", "id": "t_thconc_r", "x": 4, "y": 15, "x2": 4, "y2": 16 } ] }
  },
  {
    "id": "mon_lab_security_drone_GR",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "LGR security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "light_green",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "green_researcher_check" },
        "cooldown": 120,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_GR",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  },
  {
    "id": "black_security_check",
    "type": "SPELL",
    "name": { "str": "Black Security Badge Trait" },
    "description": "Adds trait for badge check.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "message": "the drone scans for your ID badge.",
    "min_damage": 10000,
    "max_damage": 10000,
    "min_range": 15,
    "max_range": 15,
    "max_level": 1,
    "shape": "line",
    "effect": "effect_on_condition",
    "effect_str": "BLACK_SECURITY_ALARM"
  },
  {
    "type": "effect_on_condition",
    "id": "BLACK_SECURITY_ALARM",
    "effect": [
      {
        "run_eocs": {
          "id": "bot_black_security_badge_check",
          "condition": { "not": { "u_has_item": "id_science_security_black" } },
          "effect": [
            { "u_message": "Remain in place, unauthorized person.  Security has been activated." },
            { "mapgen_update": "toxic_gas_corridor", "om_terrain": "underground_lab_central_-6W" },
            { "mapgen_update": "lab_security_corridor_c", "om_terrain": "underground_lab_central_-6W" },
            { "mapgen_update": "lab_security_corridor_d", "om_terrain": "underground_lab_central_-6E" }
          ],
          "false_effect": [ { "u_message": "Hello, valued employee." } ]
        }
      }
    ]
  },
  {
    "//": "Releases if you lack a black security ID card.",
    "type": "mapgen",
    "update_mapgen_id": "toxic_gas_corridor",
    "method": "json",
    "object": {
      "place_fields": [
        { "field": "fd_toxic_gas", "x": 0, "y": 10, "intensity": 2, "age": 20 },
        { "field": "fd_toxic_gas", "x": 3, "y": 16, "intensity": 2, "age": 20 },
        { "field": "fd_toxic_gas", "x": 20, "y": 10, "intensity": 2, "age": 20 },
        { "field": "fd_toxic_gas", "x": 23, "y": 16, "intensity": 2, "age": 20 }
      ]
    }
  },
  {
    "type": "mapgen",
    "update_mapgen_id": "lab_security_corridor_c",
    "method": "json",
    "object": {
      "place_terrain": [
        { "ter": "t_thconc_r", "x": 19, "y": 8 },
        { "ter": "t_thconc_r", "x": 19, "y": 10 },
        { "ter": "t_thconc_r", "x": 4, "y": 8 },
        { "ter": "t_thconc_r", "x": 4, "y": 10 }
      ]
    }
  },
  {
    "type": "mapgen",
    "update_mapgen_id": "lab_security_corridor_d",
    "method": "json",
    "object": {
      "place_terrain": [
        { "ter": "t_thconc_r", "x": 19, "y": 17 },
        { "ter": "t_thconc_r", "x": 19, "y": 19 },
        { "ter": "t_thconc_r", "x": 4, "y": 17 },
        { "ter": "t_thconc_r", "x": 4, "y": 19 }
      ]
    }
  },
  {
    "id": "mon_lab_security_drone_BS",
    "copy-from": "base_drone",
    "type": "MONSTER",
    "name": { "str": "BS security drone" },
    "description": "A small quadcopter drone, it has a camera and speaker visible.  It patrols the surrounding area in a regular manner, continuously scanning individuals it encounters even if there is hardly anything left of them.",
    "diff": 2,
    "speed": 190,
    "color": "dark_gray",
    "dodge": 3,
    "default_faction": "science",
    "special_attacks": [
      {
        "type": "spell",
        "spell_data": { "id": "black_security_check" },
        "cooldown": 120,
        "monster_message": "Remain still.  Scanning for authorization."
      }
    ],
    "revert_to_itype": "bot_lab_security_drone_BS",
    "extend": { "flags": [ "COLDPROOF", "PRIORITIZE_TARGETS" ] },
    "death_drops": { "groups": [ [ "robots", 4 ], [ "eyebot", 1 ] ] },
    "death_function": { "corpse_type": "BROKEN" },
    "armor": { "bash": 2, "cut": 8, "bullet": 6 }
  }
]
