[
  {
    "type": "npc",
    "id": "ancilla_doctor",
    "name_unique": "Doc.  Stevens",
    "gender": "male",
    "class": "NC_ANCILLA_DOCTOR",
    "attitude": 0,
    "mission": 3,
    "chat": "TALK_ANCILLA_DOCTOR",
    "faction": "no_faction"
  },
  {
    "type": "npc_class",
    "id": "NC_ANCILLA_DOCTOR",
    "name": { "str": "Ancilla Doctor" },
    "job_description": "I try to keep this gang in one piece.  It's a full time job.",
    "traits": [ { "group": "NPC_starting_traits" }, { "group": "Appearance_demographics" } ],
    "common": false,
    "bonus_int": { "rng": [ 3, 5 ] },
    "worn_override": "NC_ANCILLA_DOCTOR_worn",
    "carry_override": "NC_ANCILLA_BARKEEP_carry",
    "weapon_override": "NC_ANCILLA_BARKEEP_wield",
    "shopkeeper_item_group": [ { "group": "NC_ANCILLA_DOCTOR_stock", "rigid": true } ],
    "shopkeeper_price_rules": [
      { "group": "NC_ANCILLA_DOCTOR_stock", "premium": 2.0 },
      { "group": "NC_ANCILLA_DOCTOR_EXPENSIVE_ITEMS", "premium": 6.0 },
      { "item": "RobofacCoin", "price": 5000, "fixed_adj": 0 }
    ],
    "skills": [
      {
        "skill": "ALL",
        "level": { "mul": [ { "one_in": 3 }, { "sum": [ { "dice": [ 2, 2 ] }, { "constant": -2 }, { "one_in": 4 } ] } ] }
      },
      { "skill": "firstaid", "bonus": 7 }
    ]
  },
  {
    "type": "item_group",
    "id": "NC_ANCILLA_DOCTOR_worn",
    "subtype": "collection",
    "items": [
      { "item": "jeans" },
      { "item": "boots_combat" },
      { "item": "boxer_briefs" },
      { "item": "tshirt" },
      { "item": "apron_leather" }
    ]
  },
  {
    "type": "item_group",
    "id": "NC_ANCILLA_DOCTOR_stock",
    "subtype": "collection",
    "entries": [
      { "item": "RobofacCoin", "prob": 100, "count": [ 8, 10 ] },
      { "item": "disinfectant", "prob": 100, "count": [ 2, 10 ] },
      { "item": "bandages", "prob": 100, "count": [ 3, 10 ] },
      { "item": "saline", "prob": 100, "count": [ 1, 2 ] },
      { "group": "drugs_emergency", "prob": 100, "count": [ 4, 6 ] },
      { "group": "drugs_analgesic", "prob": 100, "count": [ 2, 4 ] }
    ]
  },
  {
    "type": "item_group",
    "id": "NC_ANCILLA_DOCTOR_EXPENSIVE_ITEMS",
    "subtype": "collection",
    "entries": [
      { "item": "morphine", "prob": 100, "count": 4 },
      { "prob": 100, "group": "antibiotics_bottle_plastic_pill_prescription_15" },
      { "prob": 100, "group": "strong_antibiotic_bottle_plastic_pill_prescription_5" },
      { "item": "anesthetic", "prob": 100 },
      { "prob": 100, "group": "oxycodone_bottle_plastic_pill_prescription_10" },
      { "prob": 100, "group": "codeine_bottle_plastic_pill_painkiller_10" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ANCILLA_DOCTOR",
    "dynamic_line": {
      "u_has_faction_trust": 10,
      "yes": "Oh, what can I do for you today?",
      "no": {
        "compare_string": [ "yes", { "u_val": "dialogue_ancilla_doctor_first_meet" } ],
        "yes": [
          "Try not to touch anything.  Keeping this place clean is a full time job.",
          { "gendered_line": "I'm free at the moment if you need something.", "relevant_genders": [ "npc" ] },
          "Did you know you can lose a medical license over tax fraud?  Couldn't be me.",
          "You try to use the autodoc alone and I'll let it carve you up.  I'm not kidding."
        ],
        "no": "Clinic is open, yes.  If you need medical assistance, I'm your man."
      }
    },
    "speaker_effect": {
      "effect": [ { "u_add_var": "dialogue_ancilla_doctor_first_meet", "value": "yes" } ],
      "sentinel": "ancilla_doctor_meet"
    },
    "responses": [
      { "text": "Could you help me with some bionics?", "topic": "TALK_ANCILLA_DOCTOR_BIONICS" },
      { "text": "I could use your medical assistance.", "topic": "TALK_ANCILLA_DOCTOR_AID" },
      { "text": "I need to trade some medical supplies.", "topic": "TALK_ANCILLA_DOCTOR", "effect": "start_trade" },
      { "text": "Is there anything I can help you with?", "topic": "TALK_ANCILLA_DOCTOR_WORK" },
      { "text": "…", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "TALK_ANCILLA_DOCTOR_AID",
    "type": "talk_topic",
    "dynamic_line": {
      "npc_has_effect": "currently_busy",
      "yes": "Come back later, I need to take care of a few things first.",
      "no": "I can take a look at you or your companions if you have any injuries.  It'll cost you, of course."
    },
    "responses": [
      {
        "text": "[4 HGC, 30m] I need you to patch me up.",
        "topic": "TALK_ANCILLA_DOCTOR_AID_DONE",
        "effect": [ { "u_consume_item": "RobofacCoin", "count": 4 }, "give_aid" ],
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 4 } }
      },
      {
        "text": "[8 HGC, 1h] I need you to patch my friends up.",
        "topic": "TALK_ANCILLA_DOCTOR_AID_DONE",
        "effect": [ { "u_consume_item": "RobofacCoin", "count": 8 }, "give_all_aid" ],
        "condition": { "u_has_items": { "item": "RobofacCoin", "count": 8 } }
      },
      { "text": "I should be fine.", "topic": "TALK_ANCILLA_DOCTOR" }
    ]
  },
  {
    "id": "TALK_ANCILLA_DOCTOR_BIONICS",
    "type": "talk_topic",
    "dynamic_line": "Sure, what are you looking for?",
    "responses": [
      {
        "text": "I was wondering if you could install a cybernetic implant…",
        "topic": "TALK_DONE",
        "effect": "bionic_install",
        "condition": { "not": { "npc_has_effect": "currently_busy" } }
      },
      {
        "text": "I was wondering if you could install a cybernetic implant in my friend here…",
        "topic": "TALK_DONE",
        "effect": "bionic_install_allies",
        "condition": { "not": { "npc_has_effect": "currently_busy" } }
      },
      {
        "text": "I need help removing an implant…",
        "topic": "TALK_DONE",
        "effect": "bionic_remove",
        "condition": { "not": { "npc_has_effect": "currently_busy" } }
      },
      {
        "text": "I need help removing an implant from one of my friends…",
        "topic": "TALK_DONE",
        "effect": "bionic_remove_allies",
        "condition": { "not": { "npc_has_effect": "currently_busy" } }
      },
      { "text": "Oh no, I was wondering if you knew where to get some.", "topic": "TALK_ANCILLA_DOCTOR_FIND_BIONICS" },
      { "text": "<end_talking_nevermind>", "topic": "TALK_NONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ANCILLA_DOCTOR_BIONICS_DONE",
    "dynamic_line": [
      "Now some protocol tests for brain damage.  Please stare at the light over there…",
      "It might take some days for your nervous system to adapt.  Come back if you experience any concerning symptoms like…",
      "I suggest you take it easy for a few days now."
    ],
    "responses": [ { "text": "…", "topic": "TALK_DONE" } ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ANCILLA_DOCTOR_AID_DONE",
    "dynamic_line": [
      "Take it easy now, or come back soon.  All the same to me.",
      {
        "gendered_line": "Now try not to do whatever you did again.  No, don't tell me more.",
        "relevant_genders": [ "u" ]
      }
    ],
    "responses": [ { "text": "…", "topic": "TALK_DONE" } ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ANCILLA_DOCTOR_FIND_BIONICS",
    "dynamic_line": "If you want to carve up cyborg corpses, find someone at the bar, not me.",
    "responses": [ { "text": "…", "topic": "TALK_ANCILLA_DOCTOR" } ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ANCILLA_DOCTOR_WORK",
    "dynamic_line": "It takes resources to keep this show running: disinfectant, antibiotics, anesthetics, so on.  I'll give you a great price if you bring any of those.",
    "responses": [ { "text": "I'll keep that in mind.", "topic": "TALK_ANCILLA_DOCTOR" } ]
  }
]
