[
  {
    "id": [ "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR", "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR_INFO" ],
    "type": "talk_topic",
    "dynamic_line": "Given the context of your assignment, we are willing to sell you a set of our protective gear - a gas mask and an environmental suit - at a considerable discount.  We will part with it for two exchange coins.\"  The intercom waits expectantly.  \"Actually, hold on, we might not have one in your size…",
    "responses": [
      {
        "text": "[2 HGC] Deal!",
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 2 } },
        "effect": [
          { "u_consume_item": "RobofacCoin", "count": 2, "popup": true },
          { "u_spawn_item": "mask_gas_half" },
          { "u_spawn_item": "robofac_enviro_suit" },
          { "u_spawn_item": "gasfilter_med", "count": 1 },
          { "npc_add_var": "dialogue_intercom_npc_bought_protective_gear", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      { "text": "What will it do for me?", "topic": "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR_INFO" },
      { "text": "I have to give it a thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_PROTECTIVE_GEAR_INFO",
    "type": "talk_topic",
    "dynamic_line": "What the gas mask does should be obvious; we'll provide you with a cartridge, of course.  The environment suit is full-body, and protects you from water, harmful radiation, and environmental hazards.  It's also rated to protect from electric shocks of up to twelve thousand volts.\"\n\n\"Bear in mind that the suit isn't armor.  It will keep you safe from the environment, but it's just Nomex and it won't protect you from anything stronger than a punch.  The modular defense system is designed to fit over it, so I'd urge you to bring them both if fighting is unavoidable."
  },
  {
    "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_consume_item": "RobofacCoin", "count": 1, "popup": true },
          { "mapgen_update": "robofachq_surface_entrance", "reveal_radius": 40 },
          { "npc_add_var": "dialogue_intercom_sold_local_map", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      { "text": "I'll have to give it some thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": [
      "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA",
      "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Small",
      "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Medium",
      "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large"
    ],
    "type": "talk_topic",
    "dynamic_line": "Excellent; please deposit the printouts in the intercom's tray.  We'll issue a reward based on the quality of your recordings.",
    "responses": [
      {
        "text": "[Deposit a NRE anomaly printout.]",
        "condition": { "u_has_items": { "item": "nre_anomaly_printout_data", "count": 1 } },
        "effect": [
          { "u_consume_item": "nre_anomaly_printout_data", "count": 1, "popup": true },
          { "math": [ "u_portal_storm_recordings_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 10 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large"
      },
      {
        "text": "[Deposit a long NRE printout.]",
        "condition": { "u_has_items": { "item": "large_printout_portal_storm_data", "count": 1 } },
        "effect": [
          { "u_consume_item": "large_printout_portal_storm_data", "count": 1, "popup": true },
          { "math": [ "u_portal_storm_recordings_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 18 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large"
      },
      {
        "text": "[Deposit an NRE printout.]",
        "condition": {
          "and": [
            { "u_has_items": { "item": "medium_printout_portal_storm_data", "count": 1 } },
            { "math": [ "portal_storm_medium_data_sold < 15" ] }
          ]
        },
        "effect": [
          { "u_consume_item": "medium_printout_portal_storm_data", "count": 1, "popup": true },
          { "math": [ "portal_storm_medium_data_sold++" ] },
          { "math": [ "u_portal_storm_recordings_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 5 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Medium"
      },
      {
        "text": "[Deposit a short NRE printout.]",
        "condition": {
          "and": [
            { "u_has_items": { "item": "small_printout_portal_storm_data", "count": 1 } },
            { "math": [ "portal_storm_medium_data_sold < 15" ] },
            { "math": [ "portal_storm_small_data_sold < 3" ] }
          ]
        },
        "effect": [
          { "u_consume_item": "small_printout_portal_storm_data", "count": 1, "popup": true },
          { "math": [ "portal_storm_small_data_sold++" ] },
          { "math": [ "u_portal_storm_recordings_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 1 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Small"
      },
      { "text": "That would be all.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Small",
    "type": "talk_topic",
    "dynamic_line": {
      "math": [ "portal_storm_small_data_sold >= 3" ],
      "yes": "Extrapolating trends from these recordings has become difficult.  Research has requested we only accept higher quality data from now on.",
      "no": {
        "compare_string": [ "yes", { "npc_val": "dialogue_intercom_accepted_nre_recording" } ],
        "no": "Excellent; this should be enough to work with.  Here's your agreed-upon reward.\"  The tray slides shut, and quickly reopens with your payment.  \"Given your performance and our constant need for new data, you are free to keep the recorder for further use.  We are willing to pay for any future data that you're able to record.",
        "yes": "&\"Thank you.\"  The recording changes hands."
      }
    },
    "speaker_effect": {
      "effect": [
        { "npc_add_var": "dialogue_intercom_accepted_nre_recording", "value": "yes" },
        { "finish_mission": "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1", "success": true }
      ],
      "sentinel": "nre_trade"
    }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Medium",
    "type": "talk_topic",
    "dynamic_line": {
      "math": [ "portal_storm_medium_data_sold >= 15" ],
      "yes": "Extrapolating trends from these recordings has become difficult.  Research has requested we only accept higher quality data from now on.",
      "no": {
        "compare_string": [ "yes", { "npc_val": "dialogue_intercom_accepted_nre_recording" } ],
        "no": "Great!  This looks like a very high-quality recording.  Because this data is much better, we are willing to pay five times what we paid for the base data collected.\"  The tray slides shut, and quickly reopens with your payment.  \"Given your performance and our constant need for new data, you are free to keep the recorder for further use.  We are willing to pay for any future data that you're able to record.",
        "yes": "&\"Excellent.\"  The recording changes hands."
      }
    },
    "speaker_effect": {
      "effect": [
        { "npc_add_var": "dialogue_intercom_accepted_nre_recording", "value": "yes" },
        { "finish_mission": "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1", "success": true }
      ],
      "sentinel": "nre_trade"
    }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large",
    "type": "talk_topic",
    "dynamic_line": {
      "compare_string": [ "yes", { "npc_val": "dialogue_intercom_accepted_nre_recording" } ],
      "no": "Uh… please allow me a second to check this in.\"  The tray slides shut, and the intercom turns off.  Roughly a minute later, it turns back on.  \"Well, it looks like this is a real treasure trove of information.  In fact, you've made quite an impression on R&D, and probably just saved us a few weeks of research at the least.  They demanded you be given a pretty significant accomplishment bonus, so… well, there you go.\"  The tray slides open, revealing an impressive pile of coins.\n\n\"Given your performance and our constant need for new data, you are free to keep the recorder for further use.  We are willing to pay for any future data that you're able to record.",
      "yes": "Fantastic.\"  The recording changes hands.  \"At this rate, we'll have some real results soon."
    },
    "speaker_effect": {
      "effect": [
        { "npc_add_var": "dialogue_intercom_accepted_nre_recording", "value": "yes" },
        { "finish_mission": "MISSION_ROBOFAC_INTERCOM_PORTAL_SM_1", "success": true }
      ],
      "sentinel": "nre_trade"
    }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR",
    "type": "talk_topic",
    "dynamic_line": "There is an infinite supply of the stuff but I guess from us you can get it clean and undamaged.  That'll be $400.",
    "responses": [
      {
        "text": "[8 HGC] Deal!",
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 8 } },
        "effect": [
          { "u_consume_item": "RobofacCoin", "count": 8, "popup": true },
          { "u_spawn_item": "armor_riot", "count": 5 },
          { "u_spawn_item": "helmet_riot", "count": 5 },
          { "u_spawn_item": "armor_riot_arm", "count": 5 },
          { "u_spawn_item": "armor_riot_leg", "count": 5 },
          { "npc_add_var": "npc_dialogue_exodii_npc_bought_riot_gear", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      {
        "text": "I'm a little tight on funds right now.  Can we work out a buy now pay later deal?",
        "condition": { "not": { "u_has_items": { "item": "RobofacCoin", "count": 8 } } },
        "topic": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR_NEGOTIATE"
      },
      { "text": "I'll have to give it some thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR_NEGOTIATE",
    "type": "talk_topic",
    "dynamic_line": "So we'd need a sweeter deal than just the money if we did this.",
    "responses": [
      {
        "text": "I can pay you what I owe in cash and looted gear.",
        "effect": [ { "npc_add_var": "npc_dialogue_intercom_u_pay_back_on_cash", "value": "yes" } ],
        "topic": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR_ON_CREDIT_ACCEPT"
      },
      {
        "text": "If you give me this deal you can have all the alien corpses, their stuff and their tower",
        "effect": [ { "npc_add_var": "npc_dialogue_intercom_u_pay_back_on_specimens", "value": "yes" } ],
        "topic": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR_ON_CREDIT_ACCEPT"
      },
      { "text": "I'll have to give it some thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_BUY_RIOT_GEAR_ON_CREDIT_ACCEPT",
    "type": "talk_topic",
    "dynamic_line": {
      "compare_string": [ "yes", { "npc_val": "npc_dialogue_intercom_u_pay_back_on_specimens" } ],
      "yes": "Well it might be more interesting than straight gear.  Tell us when it's available for inspection.  We expect you back in 20 days or less.",
      "no": "20 days then for payment."
    },
    "responses": [
      {
        "text": "Much obliged.",
        "effect": [
          { "u_spawn_item": "armor_riot", "count": 5 },
          { "u_spawn_item": "helmet_riot", "count": 5 },
          { "u_spawn_item": "armor_riot_arm", "count": 5 },
          { "u_spawn_item": "armor_riot_leg", "count": 5 },
          { "assign_mission": "MISSION_HUB01_PAY_BACK_RIOT_GEAR" },
          { "npc_add_var": "npc_dialogue_exodii_npc_bought_riot_gear", "value": "yes" }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SERVICES"
      },
      { "text": "I'll have to give it some thought.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": [
      "TALK_ROBOFAC_INTERCOM_SELL_YRAX_TOYS",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIFACET",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIAKIS",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_GOLDEN_MONOLITH",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_DELTA",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT_LEG",
      "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT",
      "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIFACET",
      "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIAKIS",
      "TALK_ROBOFAC_INTERCOM_SELL_BOT_GOLDEN_MONOLITH",
      "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_DELTA"
    ],
    "type": "talk_topic",
    "dynamic_line": "Beautiful; please put them into loading area.  We'll issue a reward depending on what you managed to scavenge.",
    "responses": [
      {
        "text": "[Deliver a broken trifacet.]",
        "condition": { "u_has_items": { "item": "broken_yrax_trifacet", "count": 1 } },
        "effect": [
          { "u_consume_item": "broken_yrax_trifacet", "count": 1, "popup": true },
          { "math": [ "u_broken_yrax_trifacet_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 1 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIFACET"
      },
      {
        "text": "[Deliver a broken triakis drone.]",
        "condition": { "and": [ { "u_has_items": { "item": "broken_yrax_triakis", "count": 1 } } ] },
        "effect": [
          { "u_consume_item": "broken_yrax_triakis", "count": 1, "popup": true },
          { "math": [ "u_broken_yrax_triakis_sold++" ] },
          { "u_spend_cash": -1000 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIAKIS"
      },
      {
        "text": "[Deliver a broken monolith.]",
        "condition": { "and": [ { "u_has_items": { "item": "broken_golden_monolith", "count": 1 } } ] },
        "effect": [
          { "u_consume_item": "broken_golden_monolith", "count": 1, "popup": true },
          { "math": [ "u_broken_golden_monolith_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 7 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_GOLDEN_MONOLITH"
      },
      {
        "text": "[Deliver a broken delta drone.]",
        "condition": { "and": [ { "u_has_items": { "item": "broken_yrax_delta", "count": 1 } } ] },
        "effect": [
          { "u_consume_item": "broken_yrax_delta", "count": 1, "popup": true },
          { "math": [ "u_broken_yrax_delta_sold++" ] },
          { "u_spend_cash": -200 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_BROKEN_YRAX_DELTA"
      },
      {
        "text": "[Drag in broken quadraphract leg.]",
        "condition": { "u_has_items": { "item": "broken_yrax_quadraphract_leg", "count": 1 } },
        "effect": [
          { "u_consume_item": "broken_yrax_quadraphract_leg", "count": 1, "popup": true },
          { "math": [ "u_broken_yrax_quadraphract_leg_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 5 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT_LEG"
      },
      {
        "text": "[Drag in broken quadraphract.]",
        "condition": { "u_has_items": { "item": "broken_yrax_quadraphract", "count": 1 } },
        "effect": [
          { "u_consume_item": "broken_yrax_quadraphract", "count": 1, "popup": true },
          { "math": [ "u_broken_yrax_quadraphract_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 25 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT"
      },
      {
        "text": "[Deliver a deactivated trifacet.]",
        "condition": { "u_has_items": { "item": "bot_yrax_trifacet", "count": 1 } },
        "effect": [
          { "u_consume_item": "bot_yrax_trifacet", "count": 1, "popup": true },
          { "math": [ "u_bot_yrax_trifacet_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 2 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIFACET"
      },
      {
        "text": "[Deliver a deactivated triakis.]",
        "condition": { "u_has_items": { "item": "bot_yrax_triakis", "count": 1 } },
        "effect": [
          { "u_consume_item": "bot_yrax_triakis", "count": 1, "popup": true },
          { "math": [ "u_bot_yrax_triakis_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 1 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIAKIS"
      },
      {
        "text": "[Deliver a deactivated monolith.]",
        "condition": { "u_has_items": { "item": "bot_golden_monolith", "count": 1 } },
        "effect": [
          { "u_consume_item": "bot_golden_monolith", "count": 1, "popup": true },
          { "math": [ "u_bot_golden_monolith_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 16 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_GOLDEN_MONOLITH"
      },
      {
        "text": "[Deliver a deactivated delta.]",
        "condition": { "u_has_items": { "item": "bot_yrax_delta", "count": 1 } },
        "effect": [
          { "u_consume_item": "bot_yrax_delta", "count": 1, "popup": true },
          { "math": [ "u_bot_yrax_delta_sold++" ] },
          { "u_spawn_item": "RobofacCoin", "count": 1 }
        ],
        "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_DELTA"
      },
      { "text": "That would be all.", "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" }
    ]
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIFACET",
    "type": "talk_topic",
    "dynamic_line": "We already have a similar model in better condition but this one is useful as a reference.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIAKIS",
    "type": "talk_topic",
    "dynamic_line": "We can probably gain some insight from studying this unit, but  it appears seriously damaged.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_GOLDEN_MONOLITH",
    "type": "talk_topic",
    "dynamic_line": "That is quite a lot of broken metal, let's hope R&D can at least salvage some materials.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_DELTA",
    "type": "talk_topic",
    "dynamic_line": "We don't need all of your glossy scrap.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT_LEG",
    "type": "talk_topic",
    "dynamic_line": "We witnessed it as a part of larger construct.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT",
    "type": "talk_topic",
    "dynamic_line": "I'm impressed you managed to drag it inside.  We gonna need to fix the lift after this one.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIFACET",
    "type": "talk_topic",
    "dynamic_line": "I believe we already have similar model already but is nice to have more, it will allow us be more active in our research.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIAKIS",
    "type": "talk_topic",
    "dynamic_line": "Oh what an interesting piece.  R&D will have a field day with it.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BOT_GOLDEN_MONOLITH",
    "type": "talk_topic",
    "dynamic_line": "I assume you were trying to figure out limits of the hm12.  I guess they are right here.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  },
  {
    "id": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_DELTA",
    "type": "talk_topic",
    "dynamic_line": "I doubt we can get a lot of information from this drone but thanks.",
    "speaker_effect": { "effect": [ { "npc_add_var": "dialogue_intercom_accepted_yrax_robot", "value": "yes" } ], "sentinel": "yrax_trade" }
  }
]
