[
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_ADD_TRAIT",
    "eoc_type": "EVENT",
    "required_event": "game_begin",
    "condition": { "and": [ { "not": { "u_has_trait": "iso_trait" } } ] },
    "effect": [ { "u_add_trait": "iso_trait" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_ELEVATOR",
    "effect": [
      { "math": [ "ISO_CURRENT_LEVEL++" ] },
      { "math": [ "u_ISO_CURRENT_LEVEL_DANGER = 0" ] },
      { "u_message": "The elevator starts moving before you can touch the panel.", "popup": true },
      { "run_eocs": [ "EOC_ISO_DECIDE_LEVEL" ] },
      { "run_eocs": "EOC_LAST_SCION_RETURN_STAFF", "time_in_future": 1 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_DECIDE_LEVEL",
    "condition": { "math": [ "ISO_CURRENT_LEVEL % SAFEPOINT_INTERVAL == 0" ] },
    "effect": [ { "run_eocs": [ "EOC_ISO_MICROLAB_SAFE_TP", "EOC_ISO_BIONIC_VAMPIRE_POWER_RESTORE" ] } ],
    "false_effect": [
      { "run_eocs": [ "EOC_ISO_LAST_SCION_LEVEL_SPELLS", "EOC_ISO_LAST_SCION_STORE_SPELL_LEVELS" ] },
      {
        "if": { "math": [ "ISO_CURRENT_LEVEL < 4" ] },
        "then": { "run_eocs": [ "EOC_ISO_MICROLAB_OFFICE_TP" ] },
        "else": {
          "switch": { "math": [ "rand(1)" ] },
          "cases": [
            { "case": 0, "effect": { "run_eocs": [ "EOC_ISO_MICROLAB_TP" ] } },
            { "case": 1, "effect": { "run_eocs": [ "EOC_ISO_MICROLAB_EMBED_TP" ] } }
          ]
        }
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_MICROLAB_OFFICE_TP",
    "effect": [
      {
        "u_location_variable": { "global_val": "new_map" },
        "target_params": { "om_terrain": "iso_elevator_office", "z": -1, "random": true, "cant_see": true, "search_range": 180 },
        "terrain": "t_elevator",
        "target_max_radius": 30
      },
      { "u_teleport": { "global_val": "new_map" }, "force": true }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_MICROLAB_TP",
    "effect": [
      {
        "u_location_variable": { "global_val": "new_map" },
        "target_params": { "om_terrain": "iso_elevator", "z": -1, "random": true, "cant_see": true, "search_range": 180 },
        "terrain": "t_elevator",
        "target_max_radius": 30
      },
      { "u_teleport": { "global_val": "new_map" }, "force": true }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_MICROLAB_EMBED_TP",
    "effect": [
      {
        "u_location_variable": { "global_val": "new_map" },
        "target_params": { "om_terrain": "iso_elevator_microlab_embed", "z": -1, "random": true, "cant_see": true, "search_range": 180 },
        "terrain": "t_elevator",
        "target_max_radius": 30
      },
      { "u_teleport": { "global_val": "new_map" }, "force": true }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ISO_MICROLAB_SAFE_TP",
    "effect": [
      {
        "u_location_variable": { "global_val": "new_map" },
        "target_params": { "om_terrain": "iso_elevator_safe", "z": -1, "random": true, "cant_see": true, "search_range": 180 },
        "terrain": "t_elevator",
        "target_max_radius": 30
      },
      { "u_teleport": { "global_val": "new_map" }, "force": true }
    ]
  }
]
