[
  {
    "id": "MISSION_GET_DRIVEBELTS",
    "type": "mission_definition",
    "name": "Find Drive Belts",
    "description": "Obtain 3 drive belts in exchange for credit with the loggers.",
    "goal": "MGOAL_CONDITION",
    "difficulty": 2,
    "value": 4000,
    "goal_condition": {
      "or": [
        { "u_has_items": { "item": "drivebelt", "count": 3 } },
        { "u_has_items": { "item": "drivebelt_makeshift", "count": 3 } }
      ]
    },
    "end": { "effect": { "run_eocs": "EOC_MISSION_GET_DRIVEBELTS_done" } },
    "origins": [ "ORIGIN_SECONDARY" ],
    "followup": "MISSION_LUMBERMILL_GET_1000_NAILS",
    "has_generic_rewards": true,
    "dialogue": {
      "describe": "I need three drive belts.",
      "offer": "Some of our machinery received some damage before <the_cataclysm> and we were waiting on replacement parts.  Now everything's changed and those parts are more important than ever.  Get us three drive belts and I'll give you some credit with us.",
      "advice": "If you can't find actual drive belts on engines, a good replacement can be made from a belt and some duct tape.  Nothing difficult.",
      "accepted": "I'll be here when you get back.  Good luck!",
      "rejected": "Someone's got to do it.",
      "inquire": "Do you have the belts?",
      "success": "Wonderful!  Thanks, <name_g>, we'll be fine for a long while from now.",
      "success_lie": "Where are they?  I don't believe you.",
      "failure": "That's unfortunate.  I guess we'll have to find someone else to do it."
    }
  },
  {
    "id": "MISSION_LUMBERMILL_GET_1000_NAILS",
    "type": "mission_definition",
    "name": "Get 1,000 Nails",
    "description": "Obtain 1,000 nails in exchange for credit with the loggers.",
    "goal": "MGOAL_FIND_ITEM",
    "item": "nail",
    "count": 1000,
    "difficulty": 5,
    "value": 300000,
    "origins": [ "ORIGIN_SECONDARY" ],
    "followup": "MISSION_LUMBERMILL_GET_6800_NAILS",
    "has_generic_rewards": true,
    "dialogue": {
      "describe": "I need 1,000 nails.",
      "offer": "Along with those drive belts, we were waiting for some nails for structural repairs.  Due to <the_cataclysm>, we obviously never received them.  So, I need you to get us 1,000 nails.  We'll pay you fairly.",
      "advice": "Taking apart some furniture in town should get what you need.",
      "accepted": "I'll be here when you get back.  Good luck!",
      "rejected": "Someone's got to do it.",
      "inquire": "Do you have the nails?",
      "success": "Our warehouse was about to fall apart.  These will be extremely helpful to us.",
      "success_lie": "Where are they?  I don't believe you.",
      "failure": "That's unfortunate.  I guess we'll have to find someone else to do it."
    }
  },
  {
    "id": "MISSION_LUMBERMILL_GET_6800_NAILS",
    "type": "mission_definition",
    "name": "Get 6,800 Nails",
    "description": "Obtain 6,800 nails in exchange for credit with the loggers.",
    "//": "170 wood walls * 40 nails per wall",
    "followup": "MISSION_LUMBERMILL_GET_6_BLANKETS",
    "goal": "MGOAL_FIND_ITEM",
    "item": "nail",
    "count": 6800,
    "difficulty": 32,
    "value": 2000000,
    "origins": [ "ORIGIN_SECONDARY" ],
    "end": {
      "update_mapgen": [
        { "om_terrain": "lumbermill_0_0_ocu", "place_nested": [ { "chunks": [ "occupied_lum_wall_0_0" ], "x": 0, "y": 0 } ] },
        {
          "om_terrain": "lumbermill_0_1_ocu",
          "place_nested": [ { "chunks": [ "occupied_lum_wall_0_1" ], "x": 0, "y": 0 } ]
        },
        {
          "om_terrain": "lumbermill_1_0_ocu",
          "place_nested": [ { "chunks": [ "occupied_lum_wall_1_0" ], "x": 0, "y": 0 } ]
        },
        {
          "om_terrain": "lumbermill_1_1_ocu",
          "place_nested": [ { "chunks": [ "occupied_lum_wall_1_1" ], "x": 0, "y": 0 } ]
        }
      ]
    },
    "has_generic_rewards": true,
    "dialogue": {
      "describe": "I need 6,800 nails.",
      "offer": "While fairly sturdy, the metal fence around this place won't hold out for long.  So, we've decided to replace it with a wall.  However, the nails we had were used to repair our existing structures, and they weren't nearly enough.  After some calculations, we need 6,800 nails to do it.  That may seem like a lot, but we're willing to give you a TON of credit for it.",
      "advice": "You might have to do more than just scrapping a bunch of furniture.  Dismantling a building somewhere in town could get you what you need.",
      "accepted": "I'll be here when you get back.  Good luck!",
      "rejected": "Well, I suppose that's reasonable.",
      "inquire": "Do you have the nails?",
      "success": "That's absolutely amazing!  I can't thank you enough for this!",
      "success_lie": "You're a fucking scammer, <name_b>!",
      "failure": "That's unfortunate.  I guess we'll have to find someone else to do it."
    }
  },
  {
    "id": "MISSION_LUMBERMILL_GET_6_BLANKETS",
    "type": "mission_definition",
    "name": "Find 6 Blankets",
    "description": "Obtain 6 blankets or quilts in exchange for credit with the loggers.",
    "goal": "MGOAL_CONDITION",
    "difficulty": 5,
    "value": 4000,
    "//": "Dynamic response dialogs would be more natural to accept so many alternate items here.",
    "goal_condition": {
      "or": [
        { "u_has_items": { "item": "blanket", "count": 6 } },
        { "u_has_items": { "item": "fur_blanket", "count": 6 } },
        { "u_has_items": { "item": "electric_blanket", "count": 6 } },
        { "u_has_items": { "item": "quilt", "count": 6 } },
        { "u_has_items": { "item": "quilt_patchwork", "count": 6 } }
      ]
    },
    "origins": [ "ORIGIN_SECONDARY" ],
    "end": {
      "update_mapgen": { "om_terrain": "lumbermill_1_1_ocu", "place_nested": [ { "chunks": [ "occupied_lum_hotel_1_1" ], "x": 0, "y": 0 } ] },
      "effect": { "run_eocs": "EOC_MISSION_LUMBERMILL_GET_6_BLANKETS_done" }
    },
    "followup": "MISSION_LUMBERMILL_SET_TRADE_ROUTE",
    "has_generic_rewards": true,
    "dialogue": {
      "describe": "I need 6 blankets.",
      "offer": "Now that we should be safe from harm, I decided to start adding a few things to this place.  Right now, we don't have anywhere to comfortably sleep, so we're building a small sleeping quarter.  We just need 6 big, warm blankets or quilts to finish our project.",
      "advice": "I figure any hotel or motel in town should have lots of blankets.",
      "accepted": "I'll be here when you get back.  Good luck!",
      "rejected": "Well, someone's got to do it.",
      "inquire": "Did you find us some bedding yet?",
      "success": "Thanks!  Feel free to sleep here if you want.  It's the least we can do for the help.",
      "success_lie": "How is this supposed to help us?",
      "failure": "That's unfortunate.  I guess we'll have to find someone else to do it."
    }
  },
  {
    "id": "MISSION_LUMBERMILL_SET_TRADE_ROUTE",
    "type": "mission_definition",
    "name": "Establish A Trade Route",
    "description": "Establish trade relations between the loggers and a refugee center, and bring back a writ of the agreement.",
    "goal": "MGOAL_FIND_ITEM",
    "item": "trade_writ",
    "count": 1,
    "difficulty": 35,
    "value": 4000,
    "origins": [ "ORIGIN_SECONDARY" ],
    "start": { "assign_mission_target": { "om_terrain": "evac_center_18", "om_special": "evac_center", "reveal_radius": 0 } },
    "has_generic_rewards": true,
    "dialogue": {
      "describe": "Go negotiate a trade agreement.",
      "offer": "While some of us were out scavenging, we spotted an old evac shelter that looks like it might have some people inside.  I want you to go over there, find whoever runs the joint, and see if we can make a deal with them for some processed lumber.  This will be invaluable to our survival.",
      "advice": "It should be pretty simple making the deal, but I'd recommend taking a car over there myself.",
      "accepted": "I'll be here when you get back.  Good luck!",
      "rejected": "Please give it a try?  This is really important to us.",
      "inquire": "What did they say about the deal?",
      "success": "Thank you!  We're set for life on this one!",
      "success_lie": "How does this help us?",
      "failure": "That's unfortunate.  I guess we'll have to find someone else to trade with."
    }
  }
]
