[
  {
    "type": "npc",
    "id": "isherwood_carlos",
    "//": "Dairy farmer the Isherwood family.",
    "//2": "Brother of Eddie, husband of Jesse.  Father of Lisa and Chris, cousin of Luke.  Son of Claire and Jack, nephew of Barry.",
    "name_unique": "Carlos Isherwood",
    "gender": "male",
    "class": "NC_ISHERWOOD_CARLOS",
    "attitude": 0,
    "mission": 7,
    "age": 44,
    "height": 176,
    "str": 9,
    "dex": 8,
    "int": 7,
    "per": 9,
    "personality": { "aggression": -2, "bravery": 4, "collector": -2, "altruism": -1 },
    "chat": "TALK_ISHERWOOD_CARLOS",
    "mission_offered": "MISSION_ISHERWOOD_CARLOS_1",
    "faction": "isherwood_family"
  },
  {
    "type": "npc_class",
    "id": "NC_ISHERWOOD_CARLOS",
    "name": { "str": "Carlos Isherwood" },
    "job_description": "I'm Jesse's husband, part of the Isherwood family.",
    "traits": [
      { "trait": "NIGHTVISION" },
      { "trait": "BADKNEES" },
      { "trait": "GOODMEMORY" },
      { "trait": "SKIN_TAN" },
      { "trait": "eye_color", "variant": "gray" },
      { "trait": "hair_short", "variant": "gray" },
      { "trait": "NO_BASH" },
      { "trait": "RETURN_TO_START_POS" }
    ],
    "common": false,
    "worn_override": "NC_Isherwood_male_worn",
    "weapon_override": "NC_ISHERWOOD_rifle",
    "skills": [
      {
        "skill": "ALL",
        "level": { "mul": [ { "one_in": 3 }, { "sum": [ { "dice": [ 2, 2 ] }, { "constant": -2 }, { "one_in": 4 } ] } ] }
      },
      { "skill": "speech", "bonus": { "rng": [ 2, 4 ] } },
      { "skill": "melee", "bonus": { "rng": [ 3, 6 ] } },
      { "skill": "survival", "bonus": { "rng": [ 7, 10 ] } },
      { "skill": "gun", "bonus": { "rng": [ 4, 8 ] } },
      { "skill": "rifle", "bonus": { "rng": [ 7, 10 ] } },
      { "skill": "archery", "bonus": { "rng": [ 8, 10 ] } }
    ]
  },
  {
    "type": "talk_topic",
    "id": [ "TALK_ISHERWOOD_CARLOS", "TALK_ISHERWOOD_CARLOS_ConvincedMarshal" ],
    "responses": [
      {
        "text": "Hi, looks like you are building a forge setup.",
        "topic": "TALK_ISHERWOOD_CARLOS_TALK1",
        "effect": [ { "u_add_var": "u_met_Carlos_Isherwood", "value": "yes" }, { "u_add_var": "u_met_an_isherwood", "value": "yes" } ],
        "condition": { "and": [ { "not": { "u_is_wearing": "badge_marshal" } } ] }
      },
      {
        "text": "Hi, Jack and Claire suggested I come talk to you about a job.",
        "topic": "TALK_CARLOS_FORGE",
        "effect": [ { "u_add_var": "u_met_Carlos_Isherwood", "value": "yes" } ],
        "condition": {
          "and": [
            { "not": { "u_is_wearing": "badge_marshal" } },
            { "compare_string": [ "yes", { "u_val": "u_learned_about_jesse" } ] }
          ]
        }
      },
      {
        "text": "Can I do anything for you?",
        "topic": "TALK_MISSION_LIST",
        "condition": { "not": { "u_is_wearing": "badge_marshal" } }
      },
      {
        "text": "<end_talking_leave>",
        "topic": "TALK_DONE",
        "condition": { "not": { "u_is_wearing": "badge_marshal" } }
      }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS",
    "dynamic_line": {
      "concatenate": [
        "*is an older middle-aged man, well-muscled and darkly tanned, with worried lines around the corners of his eyes and mouth.  He looks up as you get close",
        {
          "u_is_wearing": "badge_marshal",
          "yes": ", and then puts his hand on the butt of the rifle slung across  his back.  \"I see that badge, I think you need to keep on walking, straight off this property.\"",
          "no": {
            "u_male": true,
            "yes": ", then smiles distantly.  \"Hello Sir, what brings you here?\"",
            "no": ", then smiles distantly.  \"Hello Ma'am, what brings you here?\""
          }
        }
      ]
    },
    "responses": [
      {
        "text": "Yeah, I'm a Marshal, what are you going to do about it?",
        "topic": "TALK_LEAVE_NOW_MARSHAL",
        "effect": "hostile",
        "opinion": { "trust": -20, "value": -20 },
        "condition": { "u_is_wearing": "badge_marshal" }
      },
      {
        "text": "…[Leave.]",
        "topic": "TALK_DONE",
        "effect": { "npc_first_topic": "TALK_ISHERWOOD_CARLOS_SawMarshal" },
        "opinion": { "trust": -20, "value": -20 },
        "condition": { "u_is_wearing": "badge_marshal" }
      }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS_SawMarshal",
    "dynamic_line": {
      "u_is_wearing": "badge_marshal",
      "yes": "* glares at you, his hand moving again to his gun.  \"I see that badge, I think you need to keep on walking, straight off this property.\"",
      "no": "*rolls his eyes.  \"I'm not an idiot.  You think if you don't wear your badge, I won't know who you're working for?  Get out of here.\""
    },
    "responses": [
      {
        "text": "Look, I took it off to show I'm not here as a marshal.  I'm just here as a traveler, someone who can maybe help you out.  I know you've got problems bigger than you can handle right now.",
        "topic": "TALK_ISHERWOOD_CARLOS_MarshalSaveBarry",
        "condition": {
          "and": [
            { "compare_string": [ "yes", { "u_val": "u_learned_barry_missing" } ] },
            { "not": { "u_is_wearing": "badge_marshal" } }
          ]
        }
      },
      { "text": "…[Leave.]", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS_ConvincedMarshal",
    "dynamic_line": {
      "concatenate": [
        "*looks up warily as you approach",
        {
          "u_is_wearing": "badge_marshal",
          "yes": {
            "gendered_line": ", looking at your marshal badge immediately.  \"You said you'd keep that goddamn piece of tin out of my sight.\"",
            "relevant_genders": [ "u" ]
          },
          "no": ".  \"Yeah?\""
        }
      ]
    },
    "responses": [
      {
        "text": "Oh, right… [Leave.]",
        "topic": "TALK_DONE",
        "opinion": { "trust": -10, "value": -10 },
        "condition": { "u_is_wearing": "badge_marshal" }
      }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS_MarshalSaveBarry",
    "dynamic_line": "*struggles to think of a reply for a moment, then drops his hand from his gun.  \"We've got that under control, but you're not wrong.  An extra pair of hands wouldn't hurt, just now.  Just keep that damn badge out of my sight.\"",
    "speaker_effect": { "effect": { "npc_first_topic": "TALK_ISHERWOOD_CARLOS_ConvincedMarshal" } },
    "responses": [
      {
        "text": "Fine.  Thanks.  Tell me more about what happened to Barry.",
        "topic": "TALK_CARLOS_BARRY",
        "condition": {
          "and": [
            { "not": { "u_is_wearing": "badge_marshal" } },
            { "compare_string": [ "yes", { "u_val": "u_learned_barry_missing" } ] }
          ]
        }
      },
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS_TALK1",
    "dynamic_line": "It is coming together.  I want to make our own tools, repair our items and even create some weapons and ammunition reloading.",
    "responses": [
      { "text": "What do you need?", "topic": "TALK_MISSION_LIST" },
      {
        "text": "I heard about Barry, can you tell me what captured him?",
        "topic": "TALK_CARLOS_BARRY",
        "condition": {
          "and": [
            { "not": { "u_is_wearing": "badge_marshal" } },
            { "compare_string": [ "yes", { "u_val": "u_learned_barry_missing" } ] }
          ]
        }
      },
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_BARRY",
    "dynamic_line": "It was pink and really fast, it had lots of limbs, definitely not human.\"  Carlos rubs the back of his hand idly, staring into space.  \"It easily kept up with us when we tried to escape, horrifying stuff.  Barry just dropped to the ground, and the thing swept him away.",
    "responses": [
      { "text": "You all just gonna leave him out there to his fate?", "topic": "TALK_CARLOS_BARRY2" },
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_BARRY2",
    "dynamic_line": "*frowns at you.  \"Of course not.  We tracked it for a while, but lost the trail.  Right now we don't have the resources to try to rescue him.  My son, Chris, has been trying to pick up the trail again and figure out a rescue plan.\"",
    "responses": [
      { "text": "I could help.  Where did Chris go?", "topic": "TALK_CARLOS_BARRY3" },
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_BARRY3",
    "dynamic_line": "*shakes his head.  \"Leave Chris be, he knows what he's doing.  Give him some time.  Calling more attention to him could get both of you killed.\"",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_FORGE1",
    "dynamic_line": "The big item I need is an anvil, once I have that I can get a lot of repairs done.\"  He smiles briefly.  \"Can't exactly head to town to get it done anymore, but I learned a bit of old world metalwork from my granddad.",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_FORGE2",
    "dynamic_line": "*gestures around the workspace, which looks more set up.  \"I'm figuring things out, getting it worked out.  It's been a while since I did this kind of metalwork.",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_FORGE3",
    "dynamic_line": "Yeah, it's coming along nice.\"  He slaps the surface of the anvil.  \"Thanks for this, I'm still getting my skills back up, but it's going to be real helpful.",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_CHRIS1",
    "dynamic_line": "Chris is hiking the perimeter of our land, planning some defense options.\"  He looks you up and down.  \"Best just let him be.",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_CARLOS_CHRIS2",
    "dynamic_line": "*looks at you curiously.  \"Should be where you saw him last.  He's not missing again, is he?\"",
    "responses": [
      { "text": "<done_conversation_section>", "topic": "TALK_ISHERWOOD_CARLOS_TOPICS" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_ISHERWOOD_CARLOS_TOPICS",
    "dynamic_line": "Go on…",
    "responses": [
      {
        "text": "I heard about Barry, can you tell me what captured him?",
        "topic": "TALK_CARLOS_BARRY",
        "condition": {
          "and": [
            { "compare_string": [ "yes", { "u_val": "u_learned_barry_missing" } ] },
            { "not": { "u_is_wearing": "badge_marshal" } }
          ]
        }
      },
      {
        "text": "Is your forge operational?",
        "topic": "TALK_CARLOS_FORGE1",
        "condition": { "not": { "compare_string": [ "yes", { "npc_val": "carlos_has_anvil" } ] } }
      },
      {
        "text": "Is your forge operational?",
        "topic": "TALK_CARLOS_FORGE2",
        "condition": { "math": [ "time_since(timer_carlos_has_anvil) <= time('5 d')" ] }
      },
      {
        "text": "Is your forge operational?",
        "topic": "TALK_CARLOS_FORGE3",
        "condition": { "math": [ "time_since(timer_carlos_has_anvil) > time('5 d')" ] }
      },
      {
        "text": "Where can I find Chris?",
        "topic": "TALK_CARLOS_CHRIS1",
        "condition": { "not": { "compare_string": [ "yes", { "u_val": "u_found_chris_for_carlos" } ] } }
      },
      {
        "text": "Where can I find Chris?",
        "topic": "TALK_CARLOS_CHRIS2",
        "condition": { "compare_string": [ "yes", { "u_val": "u_found_chris_for_carlos" } ] }
      },
      { "text": "Can I do anything for you?", "topic": "TALK_MISSION_LIST" },
      { "text": "<end_talking_leave>", "topic": "TALK_DONE" }
    ]
  },
  {
    "id": "MISSION_ISHERWOOD_CARLOS_1",
    "type": "mission_definition",
    "name": { "str": "Find an anvil" },
    "goal": "MGOAL_CONDITION",
    "difficulty": 5,
    "value": 50000,
    "goal_condition": {
      "or": [
        { "u_has_item": "anvil" },
        { "u_has_item": "anvil_crude" },
        { "u_has_item": "anvil_heavy" },
        { "u_has_item": "anvil_bronze" }
      ]
    },
    "count": 1,
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "followup": "MISSION_ISHERWOOD_CARLOS_2",
    "dialogue": {
      "describe": "I need an anvil to do advanced metal work.",
      "offer": "I could really use an anvil.",
      "accepted": "You might be able to find one in a hardware store or similar.",
      "rejected": "Thanks anyway, we'll find the time to make it ourselves.",
      "advice": "If you can't find one, maybe you can make one for me.",
      "inquire": "Do you have the anvil?",
      "success": "I appreciate it, this will really make a difference, here's some horse armor I've been working on.  Eventually I'll have the whole herd outfitted.",
      "success_lie": "What good does this do me?",
      "failure": "It was a lost cause anyways…"
    },
    "end": {
      "opinion": { "trust": 1, "value": 1 },
      "effect": [
        {
          "if": { "u_has_item": "anvil" },
          "then": { "u_consume_item": "anvil", "popup": true },
          "else": {
            "if": { "u_has_item": "anvil_crude" },
            "then": { "u_consume_item": "anvil_crude", "popup": true },
            "else": {
              "if": { "u_has_item": "anvil_heavy" },
              "then": { "u_consume_item": "anvil_heavy", "popup": true },
              "else": { "u_consume_item": "anvil_bronze", "popup": true }
            }
          }
        },
        { "u_spawn_item": "leather_armor_horse", "count": 1 },
        { "npc_add_var": "carlos_has_anvil", "value": "yes" },
        { "math": [ "timer_carlos_has_anvil = time('now')" ] }
      ],
      "update_mapgen": [ { "om_terrain": "horse_farm_isherwood_4", "set": [ { "point": "furniture", "id": "f_anvil", "x": 6, "y": 12 } ] } ]
    }
  },
  {
    "id": "MISSION_ISHERWOOD_CARLOS_2",
    "type": "mission_definition",
    "name": { "str": "Find Chris Isherwood" },
    "goal": "MGOAL_TALK_TO_NPC",
    "difficulty": 3,
    "value": 20000,
    "start": {
      "assign_mission_target": {
        "//": "om_special is a no-op here - we are already at 'Isherwood Farm Mutable'. I added it to suppress a linter false positive.",
        "om_special": "Isherwood Farm Mutable",
        "om_terrain": "cabin_isherwood",
        "reveal_radius": 1,
        "random": true,
        "min_distance": 2
      },
      "update_mapgen": { "place_npcs": [ { "class": "isherwood_chris", "x": 8, "y": 17, "target": true } ] }
    },
    "end": {
      "opinion": { "trust": 1, "value": 1 },
      "effect": [ { "u_spawn_item": "chainmail_armor_horse", "count": 1 }, { "u_add_var": "u_found_chris_for_carlos", "value": "yes" } ]
    },
    "origins": [ "ORIGIN_SECONDARY" ],
    "has_generic_rewards": false,
    "dialogue": {
      "describe": "Chris hasn't come back from his latest search for Barry, I'm getting concerned.",
      "offer": "Can you go find my son and tell him to check in with us.",
      "accepted": "Thank you.",
      "rejected": "Oh well.  I hope he turns up soon.",
      "advice": "He might be on the property somewhere, maybe by that old cabin near the entrance, sometimes he camps there.",
      "inquire": "How is the search going?",
      "success": "Thanks, I was getting ready to go look myself.  Now that I have the anvil, I've been working on new armor for the horses, take this prototype I made.",
      "success_lie": "What good does this do us?",
      "failure": "I hope he didn't meet Barry's fate…"
    }
  }
]
