[
  {
    "type": "ter_furn_transform",
    "id": "merc_spike_transform",
    "furniture": [ { "result": [ "f_empty_spike" ], "valid_furniture": [ "f_impaled_officer" ] } ]
  },
  {
    "type": "ter_furn_transform",
    "id": "merc_darkness_transform",
    "terrain": [ { "result": [ "t_nether_glass_floor", [ "t_strconc_floor", 3 ] ], "valid_terrain": [ "t_strconc_floor" ] } ]
  },
  {
    "type": "ter_furn_transform",
    "id": "merc_darkness_transform_walls",
    "terrain": [
      {
        "result": [ "t_nether_glass_floor", [ "t_nether_glass_wall", 2 ] ],
        "valid_terrain": [ "t_wall_glass", "t_concrete_wall" ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_HAUNTING",
    "condition": { "or": [ { "math": [ "XEDRA_OFFICER_STATUS == 1" ] }, "u_is_outside" ] },
    "false_effect": [
      {
        "u_spawn_monster": "mon_XEDRA_soldier",
        "real_count": [ 2, 3 ],
        "min_radius": 4,
        "max_radius": 10,
        "lifespan": [ "1 minutes", "2 minutes" ]
      },
      {
        "npc_make_sound": "<XEDRA_OFFICER>",
        "snippet": true,
        "volume": 50,
        "type": "speech",
        "target_var": { "global_val": "MERC_LOC" }
      },
      { "run_eocs": "EOC_HAUNTING", "time_in_future": [ "30 seconds", "50 seconds" ] }
    ],
    "effect": [
      { "math": [ "XEDRA_OFFICER_STATUS = 0" ] },
      { "u_message": "The sound of footsteps fade.  It's no longer tracking you.", "type": "good" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_HAUNTING_SPAWN",
    "effect": [
      { "u_location_variable": { "global_val": "MERC_LOC" }, "min_radius": 25, "max_radius": 45 },
      {
        "u_spawn_monster": "mon_XEDRA_officer",
        "real_count": 1,
        "min_radius": 1,
        "max_radius": 2,
        "target_var": { "global_val": "MERC_LOC" },
        "false_eocs": [ "EOC_HAUNTING_SPAWN" ]
      },
      {
        "u_transform_radius": 20,
        "target_var": { "global_val": "MERC_LOC" },
        "ter_furn_transform": "merc_darkness_transform"
      },
      {
        "u_transform_radius": 20,
        "target_var": { "global_val": "MERC_LOC" },
        "ter_furn_transform": "merc_darkness_transform_walls"
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_HAUNTING_STOP",
    "global": true,
    "effect": [ { "math": [ "XEDRA_OFFICER_STATUS = 1" ] } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_HAUNTING_QUEUE_STOP",
    "global": true,
    "effect": [
      { "give_achievement": "achievement_officer_kill" },
      { "run_eocs": "EOC_HAUNTING_STOP", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_conjure_memories",
    "effect": {
      "u_spawn_monster": "mon_memory",
      "real_count": 10,
      "hallucination_count": 10,
      "outdoor_only": false,
      "lifespan": [ "5 seconds", "30 seconds" ],
      "spawn_message": "A flickering silhouette appears nearby.",
      "spawn_message_plural": "Human silhouettes appear and surround you."
    }
  }
]
