# Quests. Read at startup by the game and the server (src/model/quests/Quest.cpp).
#
#   [quest ID]
#   title = Shown in the log
#   description = The log's longer text.
#   flavor = TEXT               (a job's few lines in the voice of its posting, shown on the board
#                                 over its details; blanks as in the description. Without one the
#                                 board makes some from the job: what it asks, who posted it, its danger)
#   reward = ITEM COUNT          (repeatable; handed over by the server, once per player; ITEM can
#                                be schematic:KEY, the schematic for that recipe, or blueprint:NAME,
#                                the blueprint of assets/data/layouts/NAME.txt)
#   credits = N                  (paid by the server with the rewards)
#   next = QUEST_ID              (starts when this one is done)
#   board = yes                  (a job template: the station's board posts it, its blanks filled
#                                 from the star system, and the server tracks and pays it)
#   blank = NAME KIND ARGS       (a job's blank, filled in order: see "Blanks" below)
#   each = N                     (a job pays N credits more for each one of its amount)
#   armed = yes                  (a job against armed people: pays more and shows as dangerous)
#   gang = yes                   (the system's gang's work, design 13.4d: posted at its own table only)
#   issuers = TRADE, TRADE       (which trades' factions post the job, design 13.4: mining, hauling,
#                                 research, security, salvage, shipbuilding, settlers, charter; where the
#                                 system has none of them, whoever holds the system posts it)
#   give = ITEM COUNT            (a job hands this over when it is taken)
#   haul = N                     (a cargo job: N crates set down by the landing pad nearest where it
#                                 is taken, the issuer's, with blanks {cargo} for where they are and
#                                 {dropoff} for the zone by the pad of the place its site blank names)
#   haul_goods = TABLE           (what fills each crate: a cargo.txt table, freighter if left out)
#   freight = yes                (a freight run, design 13.5b: posted each day besides the board's
#                                 jobs, whatever the markets want (board.txt [freight]). Its blanks
#                                 `from` (an origin), `to` (a destination), `good` and `crates` say
#                                 where its crates wait, where they go, what fills them and how
#                                 many; pay is its credits, `each` per crate, and the way between)
#   chain = NAME                 (the first step of a story chain: the server runs it like a job, its
#                                 blanks filled from the chain's own seed, and a player takes it once)
#   starter = PERSON             (who starts the chain: a role, or ROLE@KIND for one at a station post,
#                                 as in shopkeeper@survey; dialog starts it with start_chain NAME)
#   stage = WHAT                 (set up in the world as the step starts: crash, surveyor, blackout)
#   late = SECONDS               (world time since the chain started after which this step leads on
#   next_late = QUEST_ID          to next_late instead of next)
#   quiet = DAYS                 (once done, the board posts no raider bounties for that many days)
#
#   [objective ID:OBJECTIVE]     (one per objective, in the order the log lists them)
#   kind = visit                 (see below)
#   text = Shown in the log. {marker} is replaced by the marker's label.
#   target = what counts         (default any)
#   count = how many             (default 1)
#   distinct = true              (each thing counts once; the default for scan)
#   optional = true              (doesn't hold the quest open)
#   place = where its marker goes: ahead M, right M, left M, behind M (from where the quest
#           started, on dry land), world other (another planet), wreck (the player's own
#           fighter), relay (the relay tower on the start world's moon), station (the system's
#           station), {BLANK} (a job's planet, structure or landmark), none
#   marker = the marker's label
#   hint = a line the log adds once the objective has been open hint_after seconds (default 300)
#
# Kinds and their targets:
#   visit    walk to the marker
#   collect  hold COUNT of an item: an item key, a resource (stone, wood, sand, plant, ice,
#            crystal, iron_ore, copper_ore, ilmenite), or a named item by its label (glider_hound_horn)
#   craft    make COUNT of an item (each item a recipe makes counts)
#   deliver  hand COUNT of an item to a person: target ITEM@ROLE (a reply appears when you talk);
#            survey:N, a survey of world N sold at the survey office
#   talk     talk to a person: a role (quartermaster, director, ...), ROLE@KIND (a station person at
#            their post: shopkeeper@cantina), or anyone
#   kill     kill: creature, a species name, gunman, or outlaw / marauder / enforcer; raider N for
#            raider fighters destroyed over world N
#   eat      eat food: food or an item key
#   scan     scan something: species, biome, ore, landmark, ruins, planet, storm (a reading of
#            strong weather overhead, one a minute; or the weather's row, as rain or dust_storm)
#   repair   weld a wrecked part back: a block key (cockpit, console), a site's key, or any; or a check on the
#            player's wreck: hull (no breaches), gear (COUNT gear under it), parts (none
#            wrecked), fuel (COUNT in its tank)
#   salvage  pull COUNT parts out of wrecked blocks: any, a part's key, or a site's (its blocks)
#   build    place a block: a block key
#   reach    get somewhere: space (out of every atmosphere), planet N, ship_tab (the Ship page open
#            in a cockpit), docked (a ship of yours on the station's pad), raiders_gone (the first
#            raiders beaten or gone) or raiders_beaten (a raider job's own fight over; with a
#            planet, "raiders_beaten N", the raiders come out of that world's air only), or
#            powered SITE (an outpost's lights lit: the server's to see)
#   clear    every armed person at a site dead: target a site (a structure blank), COUNT of them
#   store    put COUNT of an item in the containers of a site: target ITEM@SITE (the server takes
#            them out when the job is done)
#   haul     a cargo job's crates (the quest's haul): target aboard (COUNT of them in your ships)
#            or {dropoff} (COUNT of them set down in the drop-off zone)
#
# Blanks (jobs only). {NAME} in a title, description, text, target, count or place is replaced by
# what filled the blank: its name in text, its key in a target, its number in a count, its spot in
# a place. The server fills them from the seed and the game day, so a day's board is the same in
# every game and after a restart, and it names only things the system has.
#   planet [other] [living] [airless] [landmark] [stormy] [settled KIND]
#                                      a world the board's ships reach (board.txt): other than the
#                                      station's, with wildlife, without breathable air, with a
#                                      landmark, where something falls (not just wind; pays more),
#                                      where the start system's settlers built a KIND (structure
#                                      keys, as below)
#   species PLANET [hostile|timid] [land]
#                                      a surface species of that world, one that walks (key: its
#                                      name, as kill and scan targets name it)
#   ore [PLANET]                       an ore in that world's rock, or any world's (iron_ore,
#                                      copper_ore, ilmenite)
#   structure PLANET KIND              a structure on that world: outpost, settlement, wreck, ruins,
#                                      relay, derelict, trading, farm, dig, camp (mining), mine
#                                      (abandoned), sensor, geothermal, pirates, freighter, military
#                                      or pod (key: site:PLANET:KEY; number: the armed people
#                                      living there)
#   specimen PLANET                    a species of that world and what it leaves: a horn, or an egg
#                                      from its home (key: the item's label, "glider_hound_horn")
#   landmark PLANET                    a landmark on it
#   cave PLANET                        a cave mouth on it (number: how deep it goes, in metres)
#   origin                             one of the system's stations (a freight run's start: its
#                                      crates wait in its hangar), or now and then a place with a
#                                      landing pad on one of its worlds (its crates are set down by
#                                      the pad when someone on the run comes near)
#   destination BLANK                  where a freight run goes from that origin: another station
#                                      of the system, a place on a world with a landing pad, a fuel
#                                      depot, or any station of a system a gate or two away
#                                      (board.txt [freight])
#   amount MIN MAX                     a number
#   pick KEY KEY ...                   one of the keys (an item, a resource)
#   near BLANK METRES                  a dry spot about that far from another blank's spot
#   depths BLANK                       the bottom of a cave blank's open shaft
#   station SIGN                       a room of the station, by the sign at its door
# A planet blank can also say "not BLANK" (another world than that one's); a cave, "near BLANK".
#
# Item and block keys are their names in lower case with '_' for spaces: stone_pickaxe,
# iron_plate, fuel_canister, landing_gear, fabricator.

[quest test.survey]
title = Landing Survey
description = Command wants a survey of the landing site before we commit to a camp. Walk the
  marked beacons. Further instructions will follow.

[objective test.survey:near]
kind = visit
text = Reach the near survey beacon
place = ahead 70
marker = Near beacon

[objective test.survey:ridge]
kind = visit
text = Scout the far ridge
place = right 280
marker = Ridge

[objective test.survey:next-world]
kind = visit
text = Chart a beacon on {marker}
place = world other

# The self-test finishes this one to check that the server hands over rewards once.
[quest selftest.reward]
title = Self-test reward
description = Checks that a finished quest's reward comes from the server, once.
reward = fuel_canister 1

[objective selftest.reward:any]
kind = eat
text = Eat something

# ---------------------------------------------------------------- The crash start
#
# Given by the fighter's log when a survival world begins, as two quests: mending the fighter and
# surveying the world. Repair checks (hull, gear, parts, fuel) look at the player's own wreck;
# "ship_tab" is reached by opening the Ship page in its cockpit; scans come from the helmet's
# visor scanner, and "planet" from the orbital survey.

[quest tutorial.crash]
title = Get off this rock
description = Fighter log, automatic entry. Came down hard on arrival. Pilot alive, beacon lit, no
  answer from the ground. Get the fighter flying again. Nobody else is coming.

[objective tutorial.crash:check]
kind = reach
target = ship_tab
optional = true
text = Check the wreck
place = wreck
marker = Your fighter
hint = The cockpit is the burnt one at the front. Sit in it (E) and open the Ship page (H).
hint_after = 90

[objective tutorial.crash:salvage]
kind = salvage
count = 4
optional = true
text = Salvage the wreckage
hint = Break out a burnt part (the charred blocks) for the plates and wire in it.
hint_after = 240

[objective tutorial.crash:pickaxe]
kind = craft
target = stone_pickaxe
optional = true
text = Make a stone pickaxe
hint = Three stone and a wood log, in the field menu of the inventory (I).
hint_after = 240

[objective tutorial.crash:eat]
kind = eat
optional = true
text = Eat something
hint = The cargo pod (the Ship page, H, in the cockpit) holds emergency rations. Hold one and press RMB.
hint_after = 900

[objective tutorial.crash:iron]
kind = collect
target = iron_ore
count = 3
optional = true
text = Mine iron ore
hint = Ore shows in cave walls. Tap F with your helmet on to find cave mouths, then pulse again inside a cave to mark the ore in its walls.
hint_after = 600

[objective tutorial.crash:copper]
kind = collect
target = copper_ore
count = 3
optional = true
text = Mine copper ore
hint = Copper ore is the reddish one. A visor pulse (F) labels each cave mouth with the ores inside.
hint_after = 600

[objective tutorial.crash:gear]
kind = repair
target = gear
count = 3
optional = true
text = Dig out and repair the landing gear
hint = Dig the soil away from her three buried legs and from under the hull, then weld each leg whole.
hint_after = 600

[objective tutorial.crash:cannons]
kind = repair
target = cannons
count = 2
optional = true
text = Repair the cannons
hint = She flies with a burnt cannon, but it can't fire. Weld it before you reach orbit.
hint_after = 900

[objective tutorial.crash:fabricator]
kind = build
target = fabricator
optional = true
text = Build a fabricator
hint = The fabricator is a field recipe: plates, gears, circuits and glass.
hint_after = 600

[objective tutorial.crash:cockpit]
kind = repair
target = cockpit
optional = true
text = Rebuild the cockpit electronics
hint = Weld the cockpit. It needs an advanced circuit, and those need a fabricator and crystal.
hint_after = 900

[objective tutorial.crash:parts]
kind = repair
target = parts
optional = true
text = Weld or strip the other burnt parts
hint = The ship won't fly with a burnt part aboard. Weld it, or break it out.
hint_after = 900

[objective tutorial.crash:fuel]
kind = repair
target = fuel
count = 100
optional = true
text = Fuel her to reach orbit
hint = Fuel canisters (iron plate and crystal) go in the intake on the Ship page (H).
hint_after = 900

[objective tutorial.crash:space]
kind = reach
target = space
text = Fly her to orbit
hint = Take off and climb past the air, in her or a ship of your own.
hint_after = 600

[quest encounter.pirates]
title = Raiders in orbit
description = Fighter log, contact. Two unmarked fighters on an intercept course, hailing on the open band.
  Fight them off or outrun them.
next = tutorial.station

[objective encounter.pirates:survive]
kind = reach
target = raiders_gone
text = Fight off or outrun the raiders
hint = Target one (T) and match it (X) to hold your range. Shots near the lead ring bend onto it. Boost away to run.
hint_after = 60

[objective encounter.pirates:salvage]
kind = salvage
target = raider_wreck
optional = true
text = Salvage a raider's wreck
hint = A disabled raider drifts on as a wreck. Fly close, step out and break out its burnt parts.
hint_after = 300

[quest tutorial.survey]
title = Survey this world
description = Fighter log, standing orders. First survey of a world nobody has set foot on: log its
  wildlife, its land and its ore with the helmet's visor scanner, and the fighter's array maps the rest from
  orbit. Survey data pays at the station.

[objective tutorial.survey:wildlife]
kind = scan
target = species
count = 3
text = Survey the wildlife
hint = Put your helmet on and hold F to open the visor. Keep an animal in the crosshair and press LMB.
hint_after = 420

[objective tutorial.survey:biomes]
kind = scan
target = biome
count = 2
text = Survey the land
hint = Hold F and press LMB with nothing in the crosshair to analyse the land, in two kinds of country.
hint_after = 420

[objective tutorial.survey:vein]
kind = scan
target = ore
text = Survey an ore vein
hint = Inside a cave, tap F to pulse for ore in the walls, then hold F and analyse a vein it found.
hint_after = 420

[objective tutorial.survey:ruins]
kind = scan
target = site
optional = true
text = Survey the ruins
hint = If this world has ruins or a landmark, analyse it with the visor (hold F) while you stand there.
hint_after = 900

[objective tutorial.survey:orbit]
kind = scan
target = planet
text = Map it from orbit
hint = Once the fighter flies, take her up past the air. The survey array maps the world from orbit.
hint_after = 600

# No longer started: once the raiders are gone the tutorial goes straight to the station. Kept so
# a save with it open still has it.
[quest tutorial.beacon]
title = The beacon
description = In orbit the fighter picked up a faint relay signal. A relay tower stands on the
  moon of this world, put up when the settlers came and silent since. Repair it and the beacon
  will reach someone.
next = tutorial.station

[objective tutorial.beacon:find]
kind = visit
text = Find the relay tower
place = relay

[objective tutorial.beacon:console]
kind = repair
target = console
text = Weld the relay's burnt-out console
hint = The console is in the equipment shed. Welding it takes plates, glass and an advanced circuit.
hint_after = 300

# Once the raiders are seen off, the station answers: the tutorial ends there, and its job board
# takes over.
[quest tutorial.station]
title = The station
description = Fighter log, contact. The charter company's station, a short quantum jump out from the home
  world, picked up the fight and is calling you in. It's taking ships: ask for a pad, dock, and report to the dockmaster.
credits = 250

[objective tutorial.station:dock]
kind = reach
target = docked
text = Dock at the station
place = station
hint = Target the station (T), press K for a pad, fly through the hangar shield and land inside the lit lamps.
hint_after = 240

[objective tutorial.station:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

# ---------------------------------------------------------------- The station's brokers
#
# Work the brokers on the station hand out (their dialog starts these).

[quest station.ore]
title = Ore for the shipwrights
description = A broker on the station wants iron ore for the shipwrights. Bring twelve and hand
  them over.
reward = iron_plate 6
credits = 60

[objective station.ore:collect]
kind = collect
target = iron_ore
count = 12
text = Mine iron ore

[objective station.ore:deliver]
kind = deliver
target = iron_ore@broker
count = 12
text = Hand the ore to the broker

[quest station.fauna]
title = Wildlife records
description = A buyer wants wildlife records. Scan three species with the visor scanner and tell
  the broker.
reward = fuel_canister 4
credits = 80

[objective station.fauna:scan]
kind = scan
target = species
count = 3
text = Survey three species

[objective station.fauna:report]
kind = talk
target = broker
text = Tell the broker

# ---------------------------------------------------------------- The job board
#
# Templates the station's board posts (design 13.3). Each day the server fills five or six of them
# from the star system (board.txt has how many, and how pay scales with distance and danger). A
# taken job is a quest of its own ("job.cull#41"), locked to whoever took it; the server tracks
# its progress and pays it once it is done.

[quest job.survey]
issuers = research
title = Survey contract: {planet}
flavor = "Nobody has filed so much as a weather report from {planet}," the clerk says, sliding the
  contract across. "First survey gets its name on the charts. Second gets nothing."
description = The survey office wants a first look at {planet}. Land there, scan three of its
  species and two kinds of its country, map it from orbit, and sell the survey data at the
  survey office.
board = yes
blank = planet planet other living
credits = 140

[objective job.survey:land]
kind = reach
target = planet {planet}
text = Land on {planet}
place = {planet}

[objective job.survey:wildlife]
kind = scan
target = species
count = 3
text = Survey three species on {planet}

[objective job.survey:land_types]
kind = scan
target = biome
count = 2
text = Survey two kinds of country on {planet}

[objective job.survey:orbit]
kind = scan
target = planet
text = Map {planet} from orbit

[objective job.survey:sell]
kind = deliver
target = survey:{planet}
text = Sell the survey of {planet} at the survey office

[quest job.prospect]
issuers = mining
title = Prospector's job: {ore} on {planet}
description = A mining syndicate wants the grade of the {ore} under {planet}. Go down the cave
  they marked, analyse a vein of {ore}, analyse the cave mouth for its grade, and report it to
  the broker.
board = yes
blank = planet planet
blank = ore ore planet
blank = cave cave planet
credits = 90

[objective job.prospect:cave]
kind = visit
text = Reach the marked cave on {planet}
place = {cave}

[objective job.prospect:vein]
kind = scan
target = {ore}
text = Analyse a vein of {ore}
hint = Inside a cave, tap F to pulse for ore in the walls, then hold F and analyse a vein it found.
hint_after = 300

[objective job.prospect:grade]
kind = scan
target = cave
text = Analyse the cave mouth for its grade
hint = Pulse (F) by the cave mouth, then hold F and analyse it.
hint_after = 300

[objective job.prospect:report]
kind = talk
target = broker
text = Report the grade to the broker

[quest job.bulk]
issuers = shipbuilding, mining
title = Bulk order: {ore}
description = The shipwrights are short of {ore}. Mine {amount} wherever the rock holds it and
  hand it to the dockmaster.
board = yes
blank = ore ore
blank = amount amount 12 24
credits = 40
each = 5
reward = blueprint:smelter_line 1

[objective job.bulk:collect]
kind = collect
target = {ore}
count = {amount}
text = Mine {ore}

[objective job.bulk:deliver]
kind = deliver
target = {ore}@dockmaster
count = {amount}
text = Hand the ore to the dockmaster

[quest job.cull]
issuers = settlers, security
title = Cull: {species}
flavor = Two survey teams came back from {planet} short of gear and one came back short of a
  member. The settlers want the {species} pushed back from the camps, and they aren't asking nicely.
description = {species} on {planet} have been going for survey teams. Thin them out: kill
  {amount} there, then report to the dockmaster.
board = yes
blank = planet planet living
blank = species species planet hostile land
blank = amount amount 3 6
credits = 90
each = 25

[objective job.cull:kill]
kind = kill
target = {species}
count = {amount}
text = Kill {species} on {planet}
place = {planet}

[objective job.cull:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

[quest job.specimen]
issuers = research
title = Specimen order: {specimen}
description = A collector on the station pays for {specimen} from {planet}. Bring back {amount},
  by hunting or from their homes, and hand them to the broker.
board = yes
blank = planet planet living
blank = specimen specimen planet
blank = amount amount 2 4
credits = 60
each = 30

[objective job.specimen:gather]
kind = collect
target = {specimen}
count = {amount}
text = Gather {specimen} on {planet}
place = {planet}

[objective job.specimen:deliver]
kind = deliver
target = {specimen}@broker
count = {amount}
text = Hand them to the broker

[quest job.wreck]
issuers = salvage, shipbuilding
title = Wreck recovery: {wreck}
description = {wreck} came down on {planet} years ago and its burnt consoles were never
  stripped. Pull {amount} parts out of them for the shipwrights, then report to the dockmaster.
board = yes
blank = planet planet
blank = wreck structure planet wreck
blank = amount amount 4 8
credits = 70
each = 15
reward = schematic:large_engine 1

[objective job.wreck:salvage]
kind = salvage
target = {wreck}
count = {amount}
text = Salvage parts from {wreck}
place = {wreck}
hint = The burnt consoles on its flight deck break out into plates and glass.
hint_after = 300

[objective job.wreck:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

[quest job.relay]
issuers = hauling, salvage
title = Relay repair: {relay}
flavor = Ships coming in past {planet} have been flying blind since {relay} went quiet. The
  last crew sent to fix it turned back at the sight of the burnt console.
description = {relay} on {planet} has gone quiet: its transmitter console burnt out. Weld it back
  to working order and report to the dockmaster. The weld takes plates, glass and an advanced
  circuit.
board = yes
blank = planet planet other
blank = relay structure planet relay
credits = 180

[objective job.relay:weld]
kind = repair
target = {relay}
text = Weld the burnt console at {relay}
place = {relay}
hint = The console is in the equipment shed.
hint_after = 300

[objective job.relay:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

[quest job.raiders]
issuers = security
title = Raider bounty: {planet}
description = Raiders are hitting ships leaving {planet}'s air. Fly out past it and destroy
  {amount} of their fighters, then report in.
board = yes
armed = yes
blank = planet planet
blank = amount amount 1 2
credits = 120
each = 90
reward = rounds 20

[objective job.raiders:destroy]
kind = kill
target = raider {planet}
count = {amount}
text = Destroy raider fighters over {planet}
place = {planet}
hint = Fly out of {planet}'s air in a working ship: they come to you. Disable one and it is a wreck.
hint_after = 120

[objective job.raiders:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

# Freight runs (design 13.5b): posted each day besides the board's jobs and the economy's
# contracts, whatever the markets want (board.txt [freight]). The crates wait in the hangar of the
# station the run starts from, wherever the job is taken (or by the pad of the place on a world it
# starts from, once someone on it comes near); the drop-off is beside the far end's pad
# (behind the back row of a station's hangar, in a depot's pad bay, by a place's pad).
[quest job.freight]
issuers = hauling, charter
title = Freight: {good} to {to}
flavor = The manifest is short: {crates} crates of {good}, {from} to {to}. "Sealed at the dock," the
  clerk says. "They come off sealed, or they don't come off."
description = {crates} crates of {good} wait at {from} for {to}: in a station's hangar, behind its back
  row of pads, or beside a place's pad. Load them into your ship, fly them there and set them down
  in the drop-off by its pad (its border glows). The crates aren't yours: what is in them stays the
  shipper's.
freight = yes
haul = 1
blank = from origin
blank = to destination from
blank = good pick iron_plate copper_plate copper_wire iron_gear glass_pane circuit_board energy_cell fuel_canister emergency_ration drink
blank = crates amount 1 3
credits = 60
each = 20

[objective job.freight:load]
kind = haul
target = aboard
count = {crates}
text = Load the crates at {from} into your ship (a tractor beam lifts them)
place = {cargo}
optional = yes

[objective job.freight:haul]
kind = haul
target = {dropoff}
count = {crates}
text = Set the crates down in the drop-off at {to}
place = {dropoff}

# Step 34c's jobs, posted by the server from what the economy is doing (server/world/ServerEvents.cpp), not
# filled by the daily board: their blanks and pay come with the posting. A contract's deadline is
# its `due` blank.
[quest job.contract]
issuers = charter, hauling
title = Delivery contract: {amount} {good}
description = {cause}. The station is short of {good}: bring {amount} to the dockmaster before
  the deadline. Paid by the shortage, and more for goods brought down a dangerous lane ({from}).
credits = 100

[objective job.contract:deliver]
kind = deliver
target = {good}@dockmaster
count = {amount}
text = Bring {amount} {good} to the dockmaster
place = station

[quest job.bounty]
issuers = security
title = Bounty: {leader}
flavor = The notice has a grainy still of {leader}'s ship pinned to it, and someone has drawn
  a target over the cockpit. Security pays on proof, and only on proof.
description = {cause}. {leader} leads them, and the {lane} lane is paying for it. Find their ship
  on the lane and destroy it; with their leader gone the band scatters.
armed = yes
credits = 600

[objective job.bounty:kill]
kind = kill
target = {leader}
text = Destroy {leader}'s ship on the {lane} lane
place = none

[quest job.derelict]
issuers = salvage
title = Clear the derelict: {derelict}
description = Gunmen have holed up in {derelict} on {planet}. Clear them all out and report to
  the dockmaster.
board = yes
armed = yes
blank = planet planet
blank = derelict structure planet derelict
credits = 160
each = 40

[objective job.derelict:clear]
kind = clear
target = {derelict}
count = {derelict}
text = Clear {derelict}
place = {derelict}

[objective job.derelict:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

# The gang's work (design 13.4d): against a company's tower in the system's city, taken from the
# gang's fixer in the back room of a city's cantina and from nowhere lawful. The server sees the
# hack itself (objective kind `hack`: records or a chip at the place). Done, it costs
# standing with the company robbed.
[quest job.heist_records]
issuers = crime
gang = yes
title = Records job: {tower}
description = Somebody wants to read what {victim} keeps to itself. Get onto {tower}'s
  computers, reach its console, and download its records. Whoever sees you at it is your own
  trouble.
board = yes
armed = yes
blank = tower tower
blank = victim owner tower
credits = 420

[objective job.heist_records:take]
kind = hack
target = records@{tower}
text = Download {tower}'s records
place = {tower}

[quest job.heist_chip]
issuers = crime
gang = yes
title = Chip job: {tower}
description = {victim} runs something on its racks that a buyer wants. Hold a rack in {tower},
  or put its lights out, and pull the chip by hand.
board = yes
armed = yes
blank = tower tower
blank = victim owner tower
credits = 380

[objective job.heist_chip:take]
kind = hack
target = chip@{tower}
text = Pull a chip from {tower}'s racks
place = {tower}

[quest job.delivery]
issuers = hauling
title = Outpost cargo run: {outpost}
flavor = Two crates, sealed and stencilled for {outpost}, heavier than they look. Whatever is in
  them, the people out there have been waiting on it a while.
description = {outpost} on {planet} is waiting on cargo. Its crates wait by a landing pad here.
  Load them into your ship, fly them out, and set them down in the drop-off by the outpost's pad
  (its border glows). The crates aren't yours: what is in them stays the shipper's.
board = yes
blank = planet planet
blank = outpost structure planet outpost
haul = 2
haul_goods = freighter
credits = 150

[objective job.delivery:load]
kind = haul
target = aboard
count = 2
text = Load the crates into your ship (a tractor beam lifts them)
place = {cargo}
optional = yes

[objective job.delivery:haul]
kind = haul
target = {dropoff}
count = 2
text = Set the crates down in the drop-off at {outpost}
place = {dropoff}

[quest job.supply]
issuers = hauling, mining
title = Supply run: {item}
description = The station's stores are short of {item}. Make {amount} and hand them to the broker.
board = yes
blank = item pick emergency_ration meal fuel_canister
blank = amount amount 4 8
credits = 30
each = 12

[objective job.supply:make]
kind = craft
target = {item}
count = {amount}
text = Make {item}

[objective job.supply:deliver]
kind = deliver
target = {item}@broker
count = {amount}
text = Hand them to the broker

[quest job.landmark]
issuers = research
title = Landmark lead: {landmark}
description = A research outpost has a lead on {landmark}, somewhere on {planet}. Find it, scan
  it with the visor, and report to the broker.
board = yes
blank = planet planet landmark
blank = landmark landmark planet
credits = 140

[objective job.landmark:find]
kind = visit
text = Find {landmark}
place = {landmark}

[objective job.landmark:scan]
kind = scan
target = landmark
text = Scan {landmark}
hint = Stand at it, hold F to open the visor and analyse it.
hint_after = 300

[objective job.landmark:report]
kind = talk
target = broker
text = Report to the broker

# Weather jobs (step 20c): work out in the weather pays more ([pay] weather in board.txt).
[quest job.storm_readings]
issuers = research
title = Storm readings: {planet}
description = The survey office wants readings from inside the weather on {planet}. Land when it
  turns bad, stand out under it and analyse the storm overhead three times, a minute apart, then
  report to the broker.
board = yes
blank = planet planet stormy
credits = 110

[objective job.storm_readings:land]
kind = reach
target = planet {planet}
text = Land on {planet}

[objective job.storm_readings:read]
kind = scan
target = storm
count = 3
text = Take readings of the weather on {planet}
hint = Check the forecast with a visor pulse (tap F). When it turns bad, go out under open sky, hold F and analyse the storm overhead.
hint_after = 240

[objective job.storm_readings:report]
kind = talk
target = broker
text = Report the readings to the broker

# Jobs at step 30's places (design 20.1, step 30d). The trading post, farm and mining camp the
# start system's settlers built are on their own worlds ("planet settled KIND"); the rest are
# wherever the system has one.
[quest job.trade_delivery]
issuers = hauling
title = Trading post cargo: {post}
description = {post} on {planet} ordered a crate of goods. It waits by a landing pad here. Load
  it into your ship and set it down in the drop-off by the post's pad (its border glows).
board = yes
blank = planet planet settled trading
blank = post structure planet trading
haul = 1
haul_goods = freighter
credits = 100

[objective job.trade_delivery:load]
kind = haul
target = aboard
count = 1
text = Load the crate into your ship (a tractor beam lifts it)
place = {cargo}
optional = yes

[objective job.trade_delivery:haul]
kind = haul
target = {dropoff}
count = 1
text = Set the crate down in the drop-off at {post}
place = {dropoff}

[quest job.farm_delivery]
issuers = hauling, settlers
title = Farm delivery: {farm}
description = The farmer at {farm} on {planet} is short of fuel for the pumps. Take three
  canisters from the station's stores and hand them over.
board = yes
blank = planet planet settled farm
blank = farm structure planet farm
give = fuel_canister 3
credits = 100

[objective job.farm_delivery:deliver]
kind = deliver
target = fuel_canister@farmer
count = 3
text = Hand the canisters to the farmer at {farm}
place = {farm}

[quest job.pirates]
issuers = security
title = Clear the pirate camp: {camp}
description = A gang has camped at {camp} on {planet} and is raiding the settlers. Clear them all
  out and report to the dockmaster.
board = yes
armed = yes
blank = planet planet
blank = camp structure planet pirates
credits = 140
each = 40

[objective job.pirates:clear]
kind = clear
target = {camp}
count = {camp}
text = Clear {camp}
place = {camp}

[objective job.pirates:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

[quest job.freighter]
issuers = hauling
title = Salvage the freighter: {freighter}
description = {freighter} came down on {planet} with a full hold. The shipwrights want its
  burnt-out parts: break {amount} of them out, then report to the dockmaster. What's in the hold is
  yours.
board = yes
blank = planet planet
blank = freighter structure planet freighter
blank = amount amount 3 6
credits = 60
each = 15
reward = blueprint:hauler 1

[objective job.freighter:salvage]
kind = salvage
target = {freighter}
count = {amount}
text = Salvage parts from {freighter}
place = {freighter}
hint = The burnt cargo pods along its keel and the consoles on its deck break out into parts.
hint_after = 300

[objective job.freighter:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

[quest job.sensor]
issuers = research, security
title = Sensor repair: {sensor}
description = {sensor} on {planet} has stopped sending readings: a part burnt out. Weld it back to
  working order and report to the broker.
board = yes
blank = planet planet
blank = sensor structure planet sensor
credits = 150

[objective job.sensor:weld]
kind = repair
target = {sensor}
text = Weld the burnt part at {sensor}
place = {sensor}
hint = Look for the blackened console in the hut.
hint_after = 300

[objective job.sensor:report]
kind = talk
target = broker
text = Report to the broker

[quest job.rescue]
issuers = security, hauling
title = Rescue: {pod}
description = An escape pod came down on {planet} and its beacon is still calling. Find the
  survivor at {pod}, talk them into coming along, and hand them over to the dockmaster.
board = yes
blank = planet planet
blank = pod structure planet pod
credits = 120

[objective job.rescue:find]
kind = collect
target = survivor
text = Bring the survivor from {pod} along
place = {pod}
hint = Talk to them: they'll come once you ask.
hint_after = 300

[objective job.rescue:hand_over]
kind = deliver
target = survivor@dockmaster
text = Hand the survivor over to the dockmaster

# ---------------------------------------------------------------- Story chains
#
# Four short chains, each started by a person on the station (design 13.3). The server runs them
# like jobs: a step's record holds its progress, it pays the step's credits, and the next step
# follows on the same blanks. A player takes each chain once.

# The missing surveyor: a survey office clerk's colleague went quiet on another world.
[quest chain.surveyor.1]
title = The missing surveyor
description = The survey office clerk hasn't heard from their colleague on {planet} for two days.
  The fighter's beacon cut out near the marked spot. Go and look around there.
chain = surveyor
starter = shopkeeper@survey
blank = planet planet other
blank = crash near planet 70
blank = cave cave planet near crash
blank = depths depths cave
stage = crash
credits = 60
next = chain.surveyor.2

[objective chain.surveyor.1:signal]
kind = visit
text = Search near the last signal on {planet}
place = {planet}
marker = Last signal

[quest chain.surveyor.2]
title = The missing surveyor: the wreck
description = A furrow in the ground, and the surveyor's fighter at the end of it. Nobody aboard.
  Their flight log should be in the emergency crate.
credits = 60
next = chain.surveyor.3

[objective chain.surveyor.2:wreck]
kind = visit
text = Find the crashed fighter
place = {crash}
marker = Crashed fighter

[objective chain.surveyor.2:log]
kind = collect
target = flight_log
text = Recover the flight log
hint = The crew stow the log in the crate by the wreck when they leave a ship.
hint_after = 120

[quest chain.surveyor.3]
title = The missing surveyor: the cave
description = The log's last entry: "Engines gone. Suit air for a day, maybe. Heading down the cave
  mouth to the north to keep out of the wind. If anyone reads this, come quickly." Follow them down.
stage = surveyor
late = 3600
credits = 80
next = chain.surveyor.4
next_late = chain.surveyor.lost

[objective chain.surveyor.3:find]
kind = visit
text = Find the surveyor at the bottom of the cave
place = {depths}
marker = Surveyor
hint = The cave mouth is marked. Its shaft goes {cave}: bring a light.
hint_after = 300

[quest chain.surveyor.4]
title = The missing surveyor: alive
description = They're alive, just, and almost out of air. Talk to them, then tell the clerk at the
  survey office.
stage = surveyor
credits = 260

[objective chain.surveyor.4:talk]
kind = talk
target = surveyor
text = Talk to the surveyor

[objective chain.surveyor.4:clerk]
kind = talk
target = shopkeeper@survey
text = Tell the survey office clerk

[quest chain.surveyor.lost]
title = The missing surveyor: too late
description = Their pack, their helmet light still on, and nothing else. Too long in the cold. Take
  the news back to the survey office.
credits = 120

[objective chain.surveyor.lost:clerk]
kind = talk
target = shopkeeper@survey
text = Tell the survey office clerk

# Raider trouble: the dockmaster wants the raiders gone.
[quest chain.raiders.1]
title = Raider trouble
description = The dockmaster wants the raiders gone. They jump ships leaving {planet}'s air. Win a
  fight with them in orbit, and see what their wrecks can tell you.
chain = raiders
starter = dockmaster
armed = yes
blank = planet planet
blank = hideout planet not planet
blank = derelict structure hideout derelict
credits = 150
next = chain.raiders.2

[objective chain.raiders.1:fight]
kind = reach
target = raiders_beaten {planet}
text = Beat the raiders over {planet}
place = {planet}
hint = Fly out of {planet}'s air in a working ship: they come to you.
hint_after = 120

[quest chain.raiders.2]
title = Raider trouble: the nav chip
description = A raider's flight computer keeps its last jumps on a nav chip. Break the chip out of
  a raider's wreck.
credits = 80
reward = nav_chip 1
next = chain.raiders.3

[objective chain.raiders.2:salvage]
kind = salvage
target = raider_wreck
text = Salvage a raider's wreck
hint = A disabled raider drifts on as a wreck. Fly close, step out and break out its burnt parts.
hint_after = 240

[quest chain.raiders.3]
title = Raider trouble: the hideout
description = The nav chip's last jumps all end at {derelict} on {hideout}. Clear it on foot, and the
  raids will stop for a while.
armed = yes
credits = 420
quiet = 3

[objective chain.raiders.3:clear]
kind = clear
target = {derelict}
count = {derelict}
text = Clear {derelict}
place = {derelict}

[objective chain.raiders.3:report]
kind = talk
target = dockmaster
text = Report to the dockmaster

# Supply the outpost: a research outpost is short of food and power. The broker opens it to the
# cantina's regulars.
[quest chain.supply.1]
title = Supply the outpost
description = {outpost} on {planet} is short of food and its power has failed. The broker wants
  rations there first: six of them, in one of its containers.
chain = supply
starter = broker
blank = planet planet living
blank = outpost structure planet outpost
stage = blackout
credits = 120
next = chain.supply.2

[objective chain.supply.1:rations]
kind = store
target = emergency_ration@{outpost}
count = 6
text = Put six emergency rations in a container at {outpost}
place = {outpost}

[quest chain.supply.2]
title = Supply the outpost: power
description = {outpost}'s reactor burnt out and its solar panels were torn off in a storm. Weld the
  reactor back, or set solar panels where the sun reaches, so its lights come on.
credits = 220
next = chain.supply.3

[objective chain.supply.2:power]
kind = reach
target = powered {outpost}
text = Get the lights on at {outpost}
place = {outpost}
hint = A burnt reactor welds back with plates and circuits; solar panels only work in daylight.
hint_after = 300

[quest chain.supply.3]
title = Supply the outpost: the survey
description = With the lights back, {outpost}'s researcher can work again. They want three of
  {planet}'s species scanned.
credits = 180

[objective chain.supply.3:wildlife]
kind = scan
target = species
count = 3
text = Survey three species on {planet}

[objective chain.supply.3:report]
kind = talk
target = researcher
text = Report to the researcher at {outpost}
place = {outpost}

# Cantina regular: small favours from the bartender teach station life.
[quest chain.cantina.1]
title = Cantina regular
description = The bartender likes to know who's staying. Rent a bunk: a bunk pass from the cantina,
  then find your room in the dormitory.
chain = cantina
starter = shopkeeper@cantina
blank = room station Bunk Room A
credits = 20
next = chain.cantina.2

[objective chain.cantina.1:pass]
kind = collect
target = bunk_pass
text = Buy a bunk pass at the cantina

[objective chain.cantina.1:room]
kind = visit
text = Find your bunk in {room}
place = {room}

[quest chain.cantina.2]
title = Cantina regular: a proper meal
description = "Everything we serve comes up from the home world in tins." The bartender wants a meal
  made from local food: meat, crops and forage, cooked.
credits = 60
next = chain.cantina.3

[objective chain.cantina.2:cook]
kind = craft
target = meal
text = Cook a meal at a cook station

[objective chain.cantina.2:serve]
kind = deliver
target = meal@shopkeeper@cantina
text = Bring it to the bartender

[quest chain.cantina.3]
title = Cantina regular: a drink for the broker
description = "Stand the broker a drink. They keep the best work for people they drink with."
credits = 40

[objective chain.cantina.3:drink]
kind = deliver
target = drink@broker
text = Buy the broker a drink
hint = Drinks are sold at the cantina counter.
hint_after = 120
