[
  {
    "type": "effect_type",
    "id": "sold_pet"
  },
  {
    "type": "talk_topic",
    "id": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR",
    "dynamic_line": {
      "compare_string": [ "yes", { "npc_val": "dialogue_first_meeting_knows_u" } ],
      "yes": "<greet>",
      "no": "Finally, someone who isn't part of those <zombies>."
    },
    "speaker_effect": { "effect": { "npc_add_var": "dialogue_first_meeting_knows_u", "value": "yes" } },
    "responses": [
      {
        "text": "Yeah, today's your lucky day.  Hand over your stuff, or you'll be one yourself.",
        "trial": { "type": "INTIMIDATE", "difficulty": 30 },
        "success": { "topic": "TALK_WEAPON_DROPPED", "effect": "drop_weapon", "opinion": { "trust": -4, "fear": 3 } },
        "failure": { "topic": "TALK_DONE", "effect": "hostile" },
        "condition": { "not": { "compare_string": [ "yes", { "npc_val": "dialogue_first_meeting_knows_u" } ] } }
      },
      {
        "text": "Hey, nice to meet you.",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
        "condition": { "not": { "compare_string": [ "yes", { "npc_val": "dialogue_first_meeting_knows_u" } ] } }
      },
      {
        "text": "<greet>",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
        "condition": { "compare_string": [ "yes", { "npc_val": "dialogue_first_meeting_knows_u" } ] }
      },
      { "text": "<end_talking_bye>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
    "dynamic_line": "What can I do for you?",
    "responses": [
      { "text": "Who are you, exactly?", "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_WHO" },
      {
        "text": "I'd like to ask you a few questions.",
        "topic": "TALK_FRIEND_CONVERSATION",
        "condition": {
          "and": [
            { "math": [ "n_npc_trust() >= 2" ] },
            { "compare_string": [ "yes", { "npc_val": "dialogue_first_meeting_knows_u" } ] }
          ]
        }
      },
      {
        "text": "Wanna buy something, maybe sell off what you don't need?",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
        "effect": "start_trade"
      },
      { "text": "Could I buy one of your pets?", "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_BUY_PETS" },
      {
        "text": "Any jobs you need done?",
        "condition": { "and": [ { "not": "has_assigned_mission" }, { "not": "has_many_assigned_missions" } ] },
        "topic": "TALK_MISSION_LIST"
      },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_WHO",
    "dynamic_line": {
      "gendered_line": "I worked here before <the_cataclysm> dumped everything in the <freaking> bin.  I took care of all the animals here, and when the <zombies> started roaming the streets, I gathered every pet or stray I could.  I still take care of them, just gotta worry about the <zombies> now on top of disease, cleanliness, etc.",
      "relevant_genders": [ "npc" ]
    },
    "responses": [
      {
        "text": "That's quite noble of you, but how do you take care of so many animals?",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_PETS"
      },
      {
        "text": "Wanna buy something, maybe sell off what you don't need?",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
        "effect": "start_trade"
      },
      {
        "text": "Any jobs you need done?",
        "condition": { "and": [ { "not": "has_assigned_mission" }, { "not": "has_many_assigned_missions" } ] },
        "topic": "TALK_MISSION_LIST"
      },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_PETS",
    "dynamic_line": "To be honest with you, it's been pretty difficult.  I sneak out at night or whenever there's an opening to grab whatever I need and come back before something notices me.  I've been held up for quite a while whenever a horde decides to pass by.  Good thing we had some spare bookcases lying around, or I'd be a goner by now.",
    "responses": [
      { "text": "Interesting.", "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO" },
      {
        "text": "Wanna buy something, maybe sell off what you don't need?",
        "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO",
        "effect": "start_trade"
      },
      {
        "text": "Any jobs you need done?",
        "condition": { "and": [ { "not": "has_assigned_mission" }, { "not": "has_many_assigned_missions" } ] },
        "topic": "TALK_MISSION_LIST"
      },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_BUY_PETS",
    "dynamic_line": "I hate to see them go, but I think you'd be able to take better care of one than I can right now.  I can sell you a cat or dog of your choosing, for $25 and $50, respectively.",
    "responses": [
      { "text": "I've changed my mind, let's talk about something else.", "topic": "TALK_NPC_ANIMAL_SHELTER_SURVIVOR_INTRO" },
      {
        "text": "I'll have a dog.",
        "condition": { "not": { "npc_has_effect": "sold_pet" } },
        "effect": [
          { "u_buy_monster": "mon_dog", "cost": 5000, "pacified": true },
          { "npc_add_effect": "sold_pet", "duration": "24 hours" }
        ],
        "topic": "TALK_DONE"
      },
      {
        "text": "I'll have a cat.",
        "condition": { "not": { "npc_has_effect": "sold_pet" } },
        "effect": [
          { "u_buy_monster": "mon_cat", "cost": 2500, "pacified": true },
          { "npc_add_effect": "sold_pet", "duration": "24 hours" }
        ],
        "topic": "TALK_DONE"
      },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  }
]
