[
  {
    "type": "npc",
    "id": "robofac_intercom",
    "//": "Voice behind the robofac hq intercom.  For the player to chat with an NPC through the intercom, the npc must have name_unique: the intercom.",
    "name_unique": "the intercom",
    "gender": "female",
    "class": "NC_ROBOFAC_INTERCOM",
    "attitude": 0,
    "mission": 3,
    "chat": "TALK_ROBOFAC_INTERCOM",
    "mission_offered": "MISSION_ROBOFAC_INTERCOM_ROBOT_SM_1",
    "faction": "robofac"
  },
  {
    "type": "npc_class",
    "id": "NC_ROBOFAC_INTERCOM",
    "name": { "str": "intercom" },
    "job_description": "Reading this line is a bug",
    "common": false,
    "bonus_str": { "rng": [ 8, 10 ] },
    "bonus_int": { "rng": [ 1, 2 ] },
    "bonus_per": { "rng": [ 1, 2 ] },
    "skills": [ { "skill": "speech", "level": { "dice": [ 2, 2 ] } } ],
    "shopkeeper_item_group": "NC_ROBOFAC_INTERCOM_trade",
    "carry_override": "NC_ROBOFAC_INTERCOM_trade",
    "worn_override": "NC_ROBOFAC_INTERCOM_worn"
  },
  {
    "type": "item_group",
    "id": "NC_ROBOFAC_INTERCOM_trade",
    "subtype": "collection",
    "entries": [ { "group": "robofac_basic_trade", "count": [ 15, 25 ] } ]
  },
  {
    "type": "item_group",
    "id": "NC_ROBOFAC_INTERCOM_worn",
    "subtype": "collection",
    "entries": [ { "item": "duffelbag" } ]
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_1",
    "type": "mission_definition",
    "name": { "str": "Return Field Data" },
    "description": "Investigate a nearby field and return with Dr. Prado and the robot prototype she was testing.  Failing that, retrieve the I/O recorder stored within the robot.  If the robot remains operational, avoid direct confrontation and use EMP grenades to disable it.",
    "goal": "MGOAL_FIND_ITEM",
    "difficulty": 5,
    "item": "robofac_test_data",
    "value": 1000,
    "start": {
      "assign_mission_target": { "om_terrain": "field", "reveal_radius": 2, "random": true, "search_range": 10 },
      "update_mapgen": {
        "rows": [
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "          M             ",
          "            b b         ",
          "         b b b@bb       ",
          "             b b        ",
          "                        ",
          "                        "
        ],
        "terrain": { "@": "t_grass", "b": "t_dirt", "M": "t_dirt" },
        "fields": { "b": { "field": "fd_blood", "intensity": 1 } },
        "items": { "@": { "item": "NC_ROBOFAC_SCIENTIST_worn", "chance": 100 } },
        "item": { "@": [ { "item": "grenade_emp", "amount": 2 }, { "item": "corpse" } ] },
        "monster": { "M": { "monster": "mon_robofac_prototype" } }
      }
    },
    "end": {
      "effect": [
        { "npc_add_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
        { "u_add_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" }
      ]
    },
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "followup": "MISSION_ROBOFAC_INTERCOM_2",
    "dialogue": {
      "describe": "…",
      "offer": "One of our scientists recently left the lab to perform a field test on a prototype robot, but failed to return, and has not been heard of since.  Investigate the test and return with her and the prototype.  Failing that, return with the data recorder that was attached to our prototype.",
      "accepted": "We appreciate your help, good luck.",
      "rejected": "Don't expect our help then.",
      "advice": "If the robot remains operational don’t try to fight it head on, because it WILL kill you.  Dr. Prado left the Hub with a handful of EMP grenades, use those to disable the robot.",
      "inquire": "Don't you have a job to do?",
      "success": "Unfortunate only the data was salvageable, but you have our thanks for returning it nonetheless.",
      "success_lie": "What good does this do us?",
      "failure": "Simply useless…"
    }
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_2",
    "type": "mission_definition",
    "name": { "str": "Steal a dead man's mind" },
    "description": "Find the corpse of a Hub 01's AI researcher and use the mind splicer kit to recover the memories stored inside their memory implant.",
    "goal": "MGOAL_FIND_ITEM",
    "difficulty": 5,
    "item": "mind_scan_robofac",
    "value": 1000,
    "start": {
      "assign_mission_target": { "om_terrain": "road_ew", "om_terrain_match_type": "EXACT", "reveal_radius": 2, "random": true, "search_range": 80 },
      "update_mapgen": { "place_nested": [ { "chunks": [ "robofac_mi2_convoy_ambush_chunk" ], "x": 0, "y": 0 } ] },
      "effect": [ { "u_buy_item": "mind_splicer" }, { "u_buy_item": "data_card" } ]
    },
    "end": {
      "update_mapgen": [
        {
          "om_terrain": "robofachq_surface_b0",
          "place_nested": [ { "chunks": [ "robofac_hq_surface_freemerchant_camp" ], "x": 4, "y": 0 } ]
        },
        {
          "om_terrain": "robofachq_surface_entrance",
          "place_nested": [ { "chunks": [ "robofac_hq_surface_merc_1" ], "x": 3, "y": 10 } ]
        }
      ],
      "effect": [
        { "u_buy_item": "RobofacCoin", "count": 4 },
        { "u_add_var": "completed_robofac_intercom_2", "type": "dialogue", "context": "intercom", "value": "yes" }
      ]
    },
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "followup": "MISSION_ROBOFAC_INTERCOM_3",
    "dialogue": {
      "describe": "…",
      "offer": "When the portal storms started, the Government issued an evacuation order for critical XEDRA personnel and sent convoys to retrieve them, with our head of AI research among the recalled.  We recently discovered that he died when the convoy transferring him was ambushed in the initial chaos, but his corpse and memory bionic might remain intact enough for us to extract valuable knowledge.  We want you to travel to the location, make a copy of his Bionic Memory Unit, and return it to us.\n\nthe intercom: We offer the standard hazard pay of 4 HGC for this contract.",
      "accepted": "Remember, perform the extraction /exactly/ as specified, otherwise the bionic will self-destruct.",
      "rejected": "Yes, we recognize that our request is exceptional.  Return if you change your mind.",
      "advice": "You do know what a memory unit looks like, right?  Matte gray, pill-sized, right in front of the corpus callosum.  We suggest a forceps through the eye socket, shaking slightly, then slowly and carefully…",
      "inquire": "Do you have the scan?",
      "success": "You have our thanks and payment.",
      "success_lie": "What good does this do us?",
      "failure": "Simply useless…"
    }
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_3",
    "type": "mission_definition",
    "name": { "str": "Light retrieval" },
    "description": "Reach the collapsed tower basement, and search the ruins for a photonic circuitry template.  The intercom warned you about heavy enemy presence, and of the existence of a hazardous environment.",
    "goal": "MGOAL_FIND_ITEM",
    "difficulty": 5,
    "item": "template_photonics",
    "value": 0,
    "start": {
      "assign_mission_target": {
        "om_terrain": "office_tower_collapse_b_a0",
        "om_special": "office_tower_collapsed",
        "reveal_radius": 1,
        "random": true,
        "search_range": 180,
        "z": -1
      },
      "update_mapgen": [ { "place_nested": [ { "chunks": [ "robofac_mi3_photonics_chunk" ], "x": 10, "y": 22 } ] } ]
    },
    "end": { "effect": [ { "u_buy_item": "RobofacCoin", "count": 8 } ] },
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "dialogue": {
      "describe": "…",
      "offer": "Our facility once sourced advanced photonic circuitry from a nearby robotics manufacturer.  Their building suffered major damage during the portal storms, and collapsed almost entirely.  However, preliminary scouting reveals that the basement prototyping lab likely remains intact.\n\nthe intercom: We ask you to investigate the ruins, and if possible, retrieve a template for the fabrication of said photonic circuitry.\n\nthe intercom: Completion of this contract awards 8 HGC, the standard heightened-hazard rate.",
      "accepted": "We expect your success, mercenary.",
      "rejected": "Return if you change your mind.",
      "advice": "The scout drone also revealed extensive heat signatures and high concentrations of toxic compounds within the ruins, plan accordingly.  We are willing to sell you some protective gear at a discount, if you require it.",
      "inquire": "Have you retrieved the blueprints?",
      "success": "You have our thanks and payment.",
      "success_lie": "What good does this do us?",
      "failure": "Simply useless…"
    }
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_ROBOT_SM_1",
    "type": "mission_definition",
    "name": { "str": "Iron Safari" },
    "description": "Disable and retrieve an inactive TALON UGV.  You can intercept the robot indicated by Hub 01, or find an inactive robot somewhere else.",
    "goal": "MGOAL_CONDITION",
    "difficulty": 5,
    "goal_condition": {
      "or": [
        { "u_has_items": { "item": "bot_talon_m202a1", "count": 1 } },
        { "u_has_items": { "item": "bot_secubot", "count": 1 } }
      ]
    },
    "value": 1000,
    "start": {
      "effect": [
        { "u_buy_item": "UPS_off", "count": 1 },
        { "u_buy_item": "heavy_battery_cell", "count": 1 },
        { "u_buy_item": "hm12", "count": 1 }
      ],
      "assign_mission_target": { "om_terrain": "forest", "reveal_radius": 2, "random": true, "search_range": 70 },
      "update_mapgen": {
        "rows": [
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "              M         ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        ",
          "                        "
        ],
        "terrain": { "M": "t_dirt" },
        "monster": { "M": { "monster": "mon_secubot" } }
      }
    },
    "end": {
      "effect": [
        { "u_sell_item": "bot_secubot", "count": 1 },
        { "u_sell_item": "bot_talon_m202a1", "count": 1 },
        { "u_buy_item": "RobofacCoin", "count": 2 },
        {
          "u_add_var": "completed_robofac_intercom_robot_sm_1",
          "type": "dialogue",
          "context": "intercom",
          "value": "yes"
        }
      ]
    },
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "dialogue": {
      "describe": "…",
      "offer": "We find ourselves in need of a robotic chassis of a TALON UGV.  Our scout drones have already revealed the location of a stray robot that fits our purposes, and we simply ask you to intercept it, disable it, and retrieve it for us.  We will equip you with a prototype gun fit for this purpose, if you accept.\n\nthe intercom: Completion of this contract awards 2, to compensate the cost of the provided gear.",
      "accepted": "Remember, the UGV you bring back must remain operational, a broken robot is of no use to us.",
      "rejected": "Regrettable, but understandable.  We will find someone else.",
      "advice": "The hm12 will only stun the robot if you manage to hit one of its sensors, so we suggest you to get as close as possible before making the shot.  You'll also have only one chance to make the shot, so it's better if you familiarize yourself with the gun beforehand.",
      "inquire": "Have you found the robot?",
      "success": "We expected nothing less.  We hope you found our prototype's performance to be satisfactory.",
      "success_lie": "What good does this do us?",
      "failure": "Simply useless…"
    }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM",
    "type": "talk_topic",
    "dynamic_line": {
      "npc_has_var": "npc_intercom_trade",
      "type": "dialogue",
      "context": "intercom",
      "value": "yes",
      "yes": [ "[Silence]", "[Crackles On]", "[A red LED blinks on]", "[Unintelligible]" ],
      "no": {
        "u_has_var": "u_met_robofac_intercom",
        "type": "dialogue",
        "context": "intercom",
        "value": "yes",
        "yes": "We haven't changed our mind.  Go away.",
        "no": "Hold there.  I don't care how you got access to this location, but you are coming no further.  Go away."
      }
    },
    "speaker_effect": {
      "effect": { "u_add_var": "u_met_robofac_intercom", "type": "dialogue", "context": "intercom", "value": "yes" },
      "sentinel": "robofac_intercom_firstmeet"
    },
    "responses": [
      {
        "text": "I was sent here by the traders at the refugee center.  They told me to deliver this hdd drive to you.",
        "condition": {
          "and": [
            { "not": { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "not": { "u_has_var": "completed_free_merchants_hub_delivery_1", "type": "dialogue", "context": "intercom", "value": "yes" }
            },
            { "u_has_mission": "MISSION_FREE_MERCHANTS_HUB_DELIVERY_1" }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_FREE_MERCHANT_DELIVERY_1"
      },
      {
        "text": "The traders also mentioned you were looking for help.",
        "condition": {
          "and": [
            { "not": { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "u_has_var": "completed_free_merchants_hub_delivery_1",
              "type": "dialogue",
              "context": "intercom",
              "value": "yes"
            }
          ]
        },
        "trial": { "type": "LIE", "difficulty": 1 },
        "success": { "topic": "MISSION_ROBOFAC_INTERCOM_1_INTRODUCTION" },
        "failure": { "topic": "MISSION_ROBOFAC_INTERCOM_1_INTRODUCTION" }
      },
      {
        "text": "Wait!  What??",
        "condition": {
          "and": [
            { "not": { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "not": { "u_has_var": "completed_free_merchants_hub_delivery_1", "type": "dialogue", "context": "intercom", "value": "yes" }
            },
            { "not": { "u_has_mission": "MISSION_FREE_MERCHANTS_HUB_DELIVERY_1" } },
            { "not": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_1" } }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_PLEAD"
      },
      {
        "text": "You do realize that the front door is just open?",
        "condition": {
          "and": [
            { "not": { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "not": { "u_has_var": "completed_free_merchants_hub_delivery_1", "type": "dialogue", "context": "intercom", "value": "yes" }
            },
            { "not": { "u_has_mission": "MISSION_FREE_MERCHANTS_HUB_DELIVERY_1" } },
            { "not": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_1" } }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_PLEAD"
      },
      {
        "text": "It's the apocalypse out here!  Please let me in!",
        "condition": {
          "and": [
            { "not": { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "not": { "u_has_var": "completed_free_merchants_hub_delivery_1", "type": "dialogue", "context": "intercom", "value": "yes" }
            },
            { "not": { "u_has_mission": "MISSION_FREE_MERCHANTS_HUB_DELIVERY_1" } },
            { "not": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_1" } }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_PLEAD"
      },
      {
        "text": "I was just looking for valuables, maybe I can trade with you instead?",
        "condition": {
          "and": [
            { "not": { "npc_has_var": "npc_failed_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" } },
            {
              "not": { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" }
            }
          ]
        },
        "trial": { "type": "PERSUADE", "difficulty": 1 },
        "success": { "topic": "TALK_ROBOFAC_INTERCOM_TRADE" },
        "failure": { "topic": "TALK_ROBOFAC_INTERCOM_NO_TRADE" }
      },
      {
        "truefalsetext": {
          "condition": { "npc_has_effect": "npc_said" },
          "true": "There are other things I need to bring up…",
          "false": "[Identify yourself before the Intercom]"
        },
        "condition": {
          "and": [
            { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
            { "npc_has_var": "npc_intercom_job_speech", "type": "dialogue", "context": "intercom", "value": "yes" }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      {
        "text": "…",
        "condition": {
          "and": [
            { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
            {
              "not": { "npc_has_var": "npc_intercom_job_speech", "type": "dialogue", "context": "intercom", "value": "yes" }
            }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_1_JOBS"
      },
      {
        "truefalsetext": {
          "condition": { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
          "true": "[Leave]",
          "false": "Alright, I'm leaving."
        },
        "topic": "TALK_DONE"
      }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_1_JOBS",
    "type": "talk_topic",
    "dynamic_line": "Your handling of our 'rogue robot' situation was impressive, and its become clear that we greatly underestimated your usefulness.  If you are interested, we are willing to offer you extra contracts, all of them with  proper compensation from now on.",
    "speaker_effect": {
      "effect": { "npc_add_var": "npc_intercom_job_speech", "type": "dialogue", "context": "intercom", "value": "yes" },
      "sentinel": "intercom_1_jobs"
    },
    "responses": [ { "text": "I'll keep that in mind", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" } ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SERVICES",
    "type": "talk_topic",
    "dynamic_line": [
      "So, do you need something?",
      "Yes, mercenary?",
      "Mercenary.",
      "Mercenary.",
      "Don't you have a mission to do?",
      "Well?",
      "Say it.",
      "Get with it.",
      "Make it quick.",
      "Don't loiter.",
      "Don't do anything stupid.",
      "Ugh I hate intercom duty…  Wait is the speaker still on?",
      "Please don't bother us senselessly.",
      "What's up with the interference in this thing?",
      "Speak slowly and clearly.  Please.",
      "Say again?",
      "If/you speak to/understand… you/me. Yes?"
    ],
    "speaker_effect": { "effect": { "npc_add_effect": "npc_said", "duration": "600" } },
    "responses": [
      { "text": "About that contract…", "topic": "TALK_MISSION_INQUIRE", "condition": "has_assigned_mission" },
      {
        "text": "About those contracts…",
        "topic": "TALK_MISSION_LIST_ASSIGNED",
        "condition": "has_many_assigned_missions"
      },
      {
        "text": "Any jobs you need done?",
        "condition": {
          "and": [
            { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" },
            { "and": [ { "not": "has_assigned_mission" }, { "not": "has_many_assigned_missions" } ] }
          ]
        },
        "topic": "TALK_MISSION_LIST"
      },
      {
        "text": "Lets trade.",
        "condition": { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES",
        "effect": "start_trade"
      },
      {
        "text": "The traders at the refugee center asked me to deliver this drive of FEMA data…",
        "condition": {
          "and": [
            {
              "not": { "u_has_var": "completed_free_merchants_hub_delivery_1", "type": "dialogue", "context": "intercom", "value": "yes" }
            },
            { "u_has_mission": "MISSION_FREE_MERCHANTS_HUB_DELIVERY_1" }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_FREE_MERCHANT_DELIVERY_1"
      },
      {
        "text": "What the hell were you testing out there?",
        "condition": {
          "and": [
            { "u_has_var": "completed_robofac_intercom_1", "type": "dialogue", "context": "intercom", "value": "yes" },
            {
              "not": { "npc_has_var": "told_about_prototype", "type": "dialogue", "context": "intercom", "value": "yes" }
            }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_PROTOTYPE_ASK"
      },
      {
        "text": "So, about that protective gear?",
        "condition": {
          "and": [
            { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_3" },
            {
              "not": { "npc_has_var": "npc_bought_protective_gear", "type": "dialogue", "context": "intercom", "value": "yes" }
            }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR"
      },
      {
        "text": "[1 HGC] Buy a map of the local area.",
        "condition": {
          "and": [
            { "u_has_var": "completed_robofac_intercom_2", "type": "dialogue", "context": "intercom", "value": "yes" },
            { "not": { "npc_has_var": "sold_local_map", "type": "dialogue", "context": "intercom", "value": "yes" } }
          ]
        },
        "topic": "TALK_ROBOFAC_INTERCOM_BUY_LOCAL_MAP"
      },
      {
        "truefalsetext": {
          "condition": { "npc_has_var": "npc_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
          "true": "I gotta go.",
          "false": "Alright, I'm leaving."
        },
        "topic": "TALK_DONE"
      }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_NO_TRADE",
    "type": "talk_topic",
    "dynamic_line": "No.  Now leave.",
    "speaker_effect": {
      "effect": { "npc_add_var": "npc_failed_intercom_trade", "type": "dialogue", "context": "intercom", "value": "yes" },
      "sentinel": "no_intercom_trade"
    },
    "responses": [ { "text": "…", "topic": "TALK_DONE" } ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_TRADE",
    "type": "talk_topic",
    "dynamic_line": "I guess the lab can do without some of this stuff.",
    "responses": [ { "text": "…", "effect": "start_trade", "topic": "TALK_DONE" } ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_PROTOTYPE_ASK",
    "type": "talk_topic",
    "dynamic_line": "It was a modified Wraitheon chassis, with a custom AI.  We hoped it would interact with the outside world for us, but you know how well it went…  Shame about what happened, with the evisceration and all…",
    "speaker_effect": {
      "effect": { "npc_add_var": "told_about_prototype", "type": "dialogue", "context": "intercom", "value": "yes" },
      "sentinel": "told_about_prototype"
    },
    "responses": [ { "text": "…", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" } ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR",
    "type": "talk_topic",
    "dynamic_line": "Given the current context, we are willing to sell you a set of our protective gear: gas mask, suit and gear, at a considerable discount.  We will sell it for two of our coins.\n\nthe intercom: Hmm wait, we might not have your size…",
    "responses": [
      {
        "text": "[ 2 HGC ] Deal!",
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 2 } },
        "effect": [
          { "u_sell_item": "RobofacCoin", "count": 2 },
          { "u_buy_item": "mask_gas" },
          { "u_buy_item": "robofac_enviro_suit" },
          { "u_buy_item": "gasfilter_m", "count": 100 },
          { "npc_add_var": "npc_bought_protective_gear", "type": "dialogue", "context": "intercom", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      { "text": "I have to give it a thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_LOCAL_MAP",
    "type": "talk_topic",
    "dynamic_line": "To assist your operations we are willing to sell you a map of the local area, as surveyed by our cam-spy drones.  Its standing price is 1 HGC.",
    "responses": [
      {
        "text": "[ 1 HGC ] Deal!",
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 1 } },
        "effect": [
          { "u_sell_item": "RobofacCoin", "count": 1 },
          { "mapgen_update": "robofachq_surface_entrance", "reveal_radius": 40, "random": true, "search_range": 70 },
          { "npc_add_var": "sold_local_map", "type": "dialogue", "context": "intercom", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      { "text": "I have to give it a thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_FREE_MERCHANT_DELIVERY_1",
    "type": "talk_topic",
    "dynamic_line": "Understood.  Please drop the drive on the box embedded beneath the intercom.  You are welcome to leave afterwards.",
    "responses": [
      {
        "text": "[Do as the Intercom Says]",
        "condition": { "u_has_items": { "item": "fema_data", "count": 1 } },
        "effect": [
          { "u_sell_item": "fema_data", "count": 1 },
          {
            "u_add_var": "completed_free_merchants_hub_delivery_1",
            "type": "dialogue",
            "context": "intercom",
            "value": "yes"
          }
        ],
        "topic": "TALK_DONE"
      },
      { "text": "Didn't bring the hdd now, let me return with it.", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_PLEAD",
    "type": "talk_topic",
    "dynamic_line": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_1", "yes": "…", "no": "Just leave." },
    "responses": [
      {
        "text": "Wait!  Maybe I can help you!",
        "condition": { "not": { "u_has_mission": "MISSION_ROBOFAC_INTERCOM_1" } },
        "topic": "MISSION_ROBOFAC_INTERCOM_1_INTRODUCTION"
      },
      { "text": "Alright, I'll leave", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_1_INTRODUCTION",
    "type": "talk_topic",
    "dynamic_line": "There's nothing you could do for us, now leave before I'm forced to…\n[You hear a short, muffled conversation from across the intercom]\n\nthe intercom: Well, it seems we do have some use for you.  It's a dangerous task, but if you complete it we will allow you limited trading access.",
    "responses": [
      { "text": "Tell me about it.", "topic": "MISSION_ROBOFAC_INTERCOM_1_OFFER" },
      { "text": "I'm not risking myself for a deal that bad.", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_1_OFFER",
    "type": "talk_topic",
    "dynamic_line": "One of our scientists recently left the lab to perform a field test on a prototype robot, but failed to return, and has not been heard of since.  Investigate the test and return with her and the prototype.  Failing that, return with the data recorder that was attached to our prototype.",
    "responses": [
      {
        "text": "I'll do it!",
        "topic": "MISSION_ROBOFAC_INTERCOM_1_ACCEPTED",
        "effect": { "add_mission": "MISSION_ROBOFAC_INTERCOM_1" }
      },
      { "text": "Not interested.", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_1_ACCEPTED",
    "type": "talk_topic",
    "dynamic_line": "You know the deal, good luck.",
    "responses": [
      { "text": "Got any advice?", "topic": "MISSION_ROBOFAC_INTERCOM_1_ADVICE" },
      { "text": "I'll be back soon!", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "MISSION_ROBOFAC_INTERCOM_1_ADVICE",
    "type": "talk_topic",
    "dynamic_line": "If the robot remains operational don’t try to fight it head on, because it WILL kill you.  Dr. Prado left the Hub with a handful of EMP grenades, use those to disable the robot.",
    "responses": [ { "text": "Got it.", "topic": "TALK_DONE" } ]
  }
]
