[
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_1",
    "dynamic_line": "Hallo, reisendre.  What can I get for you?",
    "speaker_effect": { "effect": { "npc_first_topic": "TALK_VALHALLIST_SHOPKEEPER_2" } },
    "responses": [
      { "text": "Who are you, exactly?", "topic": "TALK_VALHALLIST_SHOPKEEPER_WHO" },
      { "text": "What's your deal here?", "topic": "TALK_VALHALLIST_SHOPKEEPER_Job" },
      { "text": "I don't need anything, just gotta go.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_2",
    "dynamic_line": "Hello again, <name_g>.  What would you like today?",
    "responses": [
      { "text": "I'm sorry, who are you again?", "topic": "TALK_VALHALLIST_SHOPKEEPER_WHO" },
      { "text": "I need some supplies.", "effect": "start_trade", "topic": "TALK_VALHALLIST_SHOPKEEPER_2" },
      {
        "text": "Do you have any jobs you need done?",
        "condition": {
          "and": [
            { "u_has_var": "u_joined_valhallists", "type": "general", "context": "meeting", "value": "yes" },
            { "not": "has_assigned_mission" },
            { "not": "has_many_assigned_missions" }
          ]
        },
        "topic": "TALK_MISSION_LIST"
      },
      {
        "text": "I'd like to loan a hazmat suit.",
        "condition": {
          "and": [
            { "not": { "npc_has_var": "u_loaned_suit", "type": "general", "context": "trade", "value": "yes" } },
            { "npc_has_var": "can_loan_hazmat_suits", "type": "general", "context": "trade", "value": "yes" }
          ]
        },
        "topic": "TALK_VALHALLIST_SHOPKEEPER_Loan_Hazmat"
      },
      {
        "text": "I'd like to return a hazmat suit.",
        "condition": {
          "and": [
            { "u_has_item": "hazmat_suit" },
            { "npc_has_var": "u_loaned_suit", "type": "general", "context": "trade", "value": "yes" }
          ]
        },
        "topic": "TALK_VALHALLIST_SHOPKEEPER_Return_Hazmat"
      },
      {
        "text": "Do you want to buy any more Molotov containers?",
        "condition": { "npc_has_var": "buys_glass_bottles", "type": "general", "context": "trade", "value": "yes" },
        "topic": "TALK_VALHALLIST_SHOPKEEPER_Buy_Glass_Bottles"
      },
      {
        "text": "How are those mushrooms coming along?",
        "condition": {
          "npc_compare_time_since_var": "npc_growing_mushrooms",
          "type": "timer",
          "context": "trade",
          "op": ">=",
          "time": "30 d"
        },
        "topic": "TALK_VALHALLIST_SHOPKEEPER_Sell_Mushrooms"
      },
      {
        "text": "Do you mind if we just talk a bit?",
        "condition": { "not": { "npc_has_effect": "asked_to_socialize" } },
        "topic": "TALK_FRIEND_CHAT"
      },
      { "text": "A pleasure chatting.  Gotta go!", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_WHO",
    "dynamic_line": "I'm the warehouse manager, I just keep track of what we have at the moment.  Its not as exciting as what the warriors do, but its a necessary job.",
    "responses": [
      { "text": "What's your job around here?", "topic": "TALK_VALHALLIST_SHOPKEEPER_Job" },
      { "text": "That's cool, but I gotta got.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_Job",
    "dynamic_line": "This is our warehouse, which I run and stock.  We've got everything here from our scavenging runs; books, food, tools, materials, you name it.  I'd be willing to sell a few things for the right price.",
    "responses": [
      { "text": "Who are you?", "topic": "TALK_VALHALLIST_SHOPKEEPER_WHO" },
      { "text": "Let's talk business, then.", "effect": "start_trade", "topic": "TALK_VALHALLIST_SHOPKEEPER_2" },
      { "text": "That's cool, but I gotta got.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_Loan_Hazmat",
    "dynamic_line": "Certainly <name_g>, they've been a real help for us recently.  I can only spare one at a time though, so make sure to bring it back.",
    "responses": [
      {
        "text": "Thanks.  I'll return it when I'm done.",
        "effect": [
          { "u_spawn_item": "hazmat_suit" },
          { "npc_add_var": "u_loaned_suit", "type": "general", "context": "trade", "value": "yes" }
        ],
        "topic": "TALK_DONE"
      },
      { "text": "I think I'll hold off on renting it for now.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_Return_Hazmat",
    "dynamic_line": "Thanks <name_g>, hope it worked well for ya.",
    "responses": [
      {
        "text": "You're welcome.  I might be back for it in the future.",
        "effect": [ { "u_sell_item": "hazmat_suit" }, { "npc_lose_var": "u_loaned_suit", "type": "general", "context": "trade" } ],
        "topic": "TALK_DONE"
      },
      { "text": "I've changed my mind, I'll return it later.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_Sell_Mushrooms",
    "dynamic_line": "They're doing great!  In fact, we've started selling them for some extra profit, if you'd like any.  Twenty of 'em for two dollars is the going rate.",
    "responses": [
      { "text": "I'd like some.", "effect": [ { "u_buy_item": "mushroom", "cost": 200, "count": 20 } ], "topic": "TALK_DONE" },
      { "text": "I don't think I want any, but thanks anyways.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_VALHALLIST_SHOPKEEPER_Buy_Glass_Bottles",
    "dynamic_line": "Sure, we could always use more of them.  Show me what you've got, and we'll square out a deal.",
    "//": "Includes some things besides glass bottles, assuming it shatters easily and you could stick a rag in it if filled with oil.  Some of these could be used to make larger or smaller molotovs, with a glass bottle being a 'medium' size.",
    "repeat_responses": {
      "for_item": [ "bottle_glass", "flask_glass", "clay_canister", "jar_3l_glass_sealed", "jar_glass_sealed" ],
      "response": { "text": "I have <topic_item>.", "topic": "TALK_DELIVER_ASK" }
    },
    "responses": [
      {
        "text": "I don't have anything at the moment.  Could we talk about something else?",
        "topic": "TALK_VALHALLIST_SHOPKEEPER_2"
      },
      { "text": "I don't have anything at the moment, and I should be going.  Bye!", "topic": "TALK_DONE" }
    ]
  }
]
