# Copyright (c) 2014 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "Immigrant Workers"
	description "A young couple wants to start a new life on <destination>, and can pay you <payment> to bring them there. They are also bringing along <cargo>."
	minor
	passengers 2
	cargo "luggage and furniture" 2
	to offer
		random < 50
	source "New Iceland"
	destination
		not government "Pirate"
		attributes "core"
		attributes "factory" "textile"
	on complete
		payment
		payment 10000
		dialog "The young couple from <origin> pays you and thanks you profusely as they gather up their goods and depart. You wish them the best of luck in their new life on <planet>."
		log "Minor People" "George and Samantha" `George and Samantha used to work on New Iceland before they decided to leave due to Samantha's conditions.`
	on offer
		conversation
			`As you leave your ship and walk toward the cafeteria at the center of the spaceport, you notice a young couple standing near the edge of the landing area next to a cart loaded high with a jumble of boxes and furniture. Like many of the locals, they are both wearing dust masks over their mouths, and the woman is also wearing goggles.`
			choice
				`	(Talk to them.)`
				`	(Ignore them.)`
					decline
			`	The couple introduces themselves as George and Samantha. As you shake hands with them, you notice that Samantha's eyes under the goggles are rimmed in red, and she keeps coughing quietly: a dry, careful cough. George explains that they came here several years ago to take jobs in the factories, but the volcanic fumes have been giving Samantha trouble ever since they arrived. They can pay <payment> for transport for themselves and <tons> of household goods to <destination>.`
			choice
				`	(Accept.)`
				`	(Decline.)`
					decline
			`	They thank you for your assistance, and you give them a hand pushing the heavy cart into your cargo bay.`
				accept
	on visit
		dialog phrase "generic cargo and passenger on visit"



mission "Pookie, Part 1"
	minor
	name "Pookie"
	description "Travel to <destination> and meet Pookie, who is staying with her aunt and may be scared of flying."
	source "Hestia"
	destination "Shroud"
	passengers 1
	cargo "(reserved)" 1
	on offer
		conversation
			`As you walk through the spaceport, you hear a voice behind you, saying, "Excuse me, Captain." You turn around and see a woman trying to flag you down. Her hairdo is tall and somewhat confusing; her high heels are also tall and are giving her considerable trouble as she walks towards you.`
			`	"You look like the sort of captain I can trust," she says. "My darling Pookie has been visiting her aunt on Shroud, and it's time for her to come home, but she's not used to space travel and it scares her. I would feel so much better if you could go pick her up and bring her back here. Can you do that for me?" You can't help noticing that the jewelry she's wearing probably costs as much as a small fighter craft. This job sounds easy, and has the potential to be quite lucrative.`
			choice
				"	(Accept.)"
				"	(Decline.)"
					decline
			"	You tell her that you would be glad to assist, and that you can personally assure her that no harm will come to Pookie while on board your ship. She thanks you, and gives you contact information for her aunt in the <system> system."
				accept
	on visit
		dialog `You have reached <planet>, but your escort with the space reserved for Pookie has not arrived! Better depart and wait for your escorts to arrive in this star system.`



mission "Pookie, Part 2"
	name "Pookie"
	landing
	description "Return Pookie the poodle to <destination>."
	source "Shroud"
	destination "Hestia"
	passengers 1
	cargo "chew toys" 1
	to offer
		has "Pookie, Part 1: done"
	on offer
		conversation
			`You called ahead while your ship was landing and agreed to meet Pookie's aunt at the spaceport. She told you, "Meet me outside the shop with the ridiculous sheepskin coats." The shop is not hard to find; the mannequins in the window look like feral sheep with overgrown wool in bad need of grooming.`
			"	The only person standing outside the shop is a tall woman in a suit who is busy making furious marks on some sort of document with a red pen. She has a small poodle on a leash; it is busy nipping the heels of everyone who walks by."
			choice
				"	(Interrupt her.)"
					goto interrupt
				"	(Wait to see if someone else shows up.)"
					goto wait
		
			label interrupt
			`	"Excuse me," you say. She looks up at you with a withering glare. "I'm looking for someone named Pookie."`
				goto response
		
			label wait
			`	Eventually she looks up from the paper and sees you standing there. "Are you Captain <last>?" she asks. You nod.`
				goto response
		
			label response
			`	"Thank heavens," she says. "She's all yours." She hands you the leash and a large bag that appears to be full of chew toys. "Here are her toys, her food, and her... outfits. Which she hates. Feed her twice a day, or she will go berserk. Do not feed her more than twice a day, or she will throw up..."`
			`	As she continues rattling off instructions, you ask, "Wait, Pookie is the dog?"`
			`	"Short for 'Pocahontas,"' she explains. "Good luck, and I hope my sister pays you well." She walks away. There's nothing else you can do but bring Pookie back to your ship, where she immediately lifts her leg against the landing strut.`
				accept
	on visit
		dialog `You have reached <planet>, but your escort carrying Pookie has not arrived! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 80000
		dialog "In the past few days, Pookie has barked incessantly and thrown up several times despite being fed perfectly on schedule, and the room you've been keeping her in will likely smell like dog urine for months. You are all too happy to return her to her owner, who pays you <payment>."
		log "Minor People" "Pocahontas (Pookie)" `A dog...`



mission "Pookie, Part 3"
	minor
	name "Stray Dog"
	description `Find a home for a stray dog you picked up on <origin>. She might have been from one of the Paradise Worlds.`
	source "Freedom"
	passengers 1
	to offer
		has "Pookie, Part 2: done"
	on offer
		conversation
			`The weather on <origin> is unusually rough today; the sky ripples with thunder while rain whips against locals brave or desperate enough to stay outside. Through the mist, you see a building with neon lettering saying, "East Mesa Indoor Racing Complex: Bets are open!"`
			choice
				`	(Check it out.)`
					goto begin
				`	(Stay dry in my ship.)`
			`	You lean back in your seat and turn on your ship's heater. After a while, the neon sign shuts off, and the weather clears up.`
				decline
			label begin
			`	You wade through the mud as you approach the complex. At its entrance is a stout woman in a black uniform holding a shotgun. When she sees you, she looks at a list in her hand, before saying, "You're alright. Feel free to come in."`
			`	The inside of the racing complex is packed to capacity. Around you is a swarm of elbows and shoulders, jutting into you while you worm your way through the crowd. The sounds of rancorous conversation blend in with the pounding of rain on the roof as you glimpse a sight of the main attraction: a large, fenced-off oval. White lines inside the area form racing lanes, and arranged on the far side of the track are four cages covered with cloth.`
			`	As you reach the boundary of the track, a loud siren fills the air, causing the crowd to fall silent.`
			choice
				`	"What's going on?"`
				`	(Quietly observe.)`
					goto quiet
			`	When you try to open your mouth to speak, a hand shushes you, appearing as suddenly as it disappears.`
			label quiet
			`	The siren ends, and a greasy voice takes its place. "Welcome, one and all, to the grand biweekly hound race! Before we collect your wagers, let me introduce you to our fine racing stock for the night!"`
			`	A stagehand hops over the fence and towards the cages while the announcer continues. "Bleedbug is a veteran of the racing track. He's never taken the pole position, but perhaps this will be his lucky day!" The stagehand removes the covering of the innermost cage as a cheer rings out. The dog inside begins ferociously barking upon seeing the cacophony around him, but you can't help but notice how withered Bleedbug's body looks.`
			`	"Our second hound is one that you're all familiar with. He's an 18-time victor of the track," the voice pauses, "even if some of his wins were only by technicality." Already, a jeer is rising in the audience. The announcer says, "It's the hound that you don't want to beat: Doom." The booing reaches a peak as the stagehand takes the cover off of the largest cage of the lineup, revealing a gargantuan hound. Doom's body is finely defined, devoid of his competitor's malnutrition. As soon as he sets his eyes on Doom, Bleedbug stops yelling and retreats to the corner of his cage to whimpering. Pleased at his reputation, Doom lets out a thunderous bark.`
			choice
				`	(Join in with the booing.)`
				`	(Stay silent.)`
					goto shush
			`	You pump your fists into the air and join in on the jeering until you are interrupted by the announcer speaking.`
				goto second
			label shush
			`	You silently observe the crowd's boos die when the announcer continues speaking.`
			label second
			`	"Now, our other two racers for the day are all-new." A murmur of anticipation sweeps through the audience. "Our first newcomer is a fine lady. Rumored to be from the wilderness of Zenith, can everyone put their hands together for Zinc!" The cover over the third cage is taken off to reveal a creature that is clearly not a dog. Her long, gray fur and piercing, golden eyes mark her as a far more graceful and feral beast, though underneath her coat, you spot atrophied muscles. Zinc initially stands unfazed by the crowd and the other dogs, calmly observing her surroundings. When Doom spots the wolf ignoring him, he begins to bark louder and louder, until she abruptly stares at him with an inscrutable expression.`
			`	"Our final contestant for the day is a most... unorthodox choice. The merchant who graciously donated her to us came with a most facinating story. She said that the hound comes from the Paradise Worlds, and her owner wanted the pet to have a luxury flight to her holiday home. Well, let's see if she can pay her way to victory here, folks." The audience snickers. "Now, give your best welcomes to Puny!" Puny is easily the frailest of the dogs, barely more than skin and bones. White whispers of hair clump around her head, chest, and ankles, and the bottom of her cage is wet. None of the other racers acknowledge her, but the crowd is rearing to volley a variety of curses and slurs at her, as though an actual Paradise World baron was in the cage. As you look at the poodle, you can't help but feel a strange sense of familiarity.`
			`	You feel your back get nudged, and turn to see a woman dressed in rags holding four buckets filled with credits. The names of the racers are crudely written on each of them. "Betting is 3,000 credits," she says unusually sweetly.`
			choice
				`	(Bet on Bleedbug.)`
				`	(Bet on Doom.)`
				`	(Bet on Zinc.)`
				`	(Bet on Puny.)`
				`	"I'll pass."`
					goto nobet
			branch notpoor
				"credits" >= 3000
			`	You dig through your pockets for a credit chip to toss into the bucket, until you realize that you don't have enough money to make a bet. Impatient with your bumbling, the woman turns to take money from a person next to you.`
				goto next
			label notpoor
			action
				set "bet on hound racing"
				payment -3000
			`	You toss a chip into the bucket, and the woman eagerly turns towards a person next to you.`
				goto next
			label nobet
			`	The woman turns to take bets from a person next to you.`
			label next
			`	After several minutes pass, the siren sounds, and the announcer speaks again. "Once again, we at the East Mesa Racing Complex give our thanks to everyone who supports our cause by participating in betting. Now, without further ado..."`
			`	A red light on the ceiling turns on, and the audience shouts, "Three!" A second one lights up. "Two!" A third light, this time yellow, turns on. "One!"`
			`	A green light appears, and the crowd descends into chaos as the cage doors open.`
			`	The first to move is Bleedbug, desperate to get as far away from Doom as possible. Doom himself has his eyes set on a different target. As soon as the doors open, he rushes over the lane lines towards Zinc and bares his teeth for a bite. Anticipating this, Zinc dodges beneath the attack, and lunges in with her mouth open. Doom responds to the threat by lowering his head and bashing into her, and the two animals are quickly locked into a brutal mess of teeth and blood. The crowd goes wild at the spectacle unfolding before them as the brawl approaches your section of the fence.`
			choice
				`	(Continue watching.)`
				`	(Get away.)`
					goto leave
			`	Looking on, you are suddenly thrown backward when the beasts smash into the fence in front of you. Lying on the ground, you look down and see Zinc and Doom tearing into each other outside of the track, inches from your feet.`
			choice
				`	(Get up and back away.)`
					goto live
				`	(Lie still.)`
			`	As you lie still, Zinc is kicked on top of you, and Doom dashes in to continue the brawl. Within seconds, your skin is ripped to ribbons by two animals too deep in bloodlust to notice that another body has joined the fray. You bleed out on the floor as the crowd cheers at the slaughter of a fellow human.`
				die
			label live
			`	You scramble to your feet, barely dodging Zinc as she's kicked back by Doom. As the two animals howl in pain, you push your way through the onlooking crowd, hoping to escape the danger. After getting some distance away, you turn back to see Zinc and Doom continuing to go at each other's throats.`
				goto next2
			label leave
			`	You turn and head away from the fence. Moments later, you hear two cries of pain accompanying the sound of wood splintering. Peeking back, you see that Zinc and Doom are fighting outside the track, with the crowd raving at the sight of violence.`
			label next2
			choice
				`	(Stay and watch.)`
				`	(Leave the building.)`
					goto nope
			`	You look on at the duel, as does the rest of the building. The crowd has already taken sides, with some shouting Zinc's name and others shouting Doom's. Doom initially appears to have the upper hand, ramming himself into Zinc with impunity as she is sent sprawling. However, when Doom goes in for another tackle, Zinc dashes in and sinks her teeth into his neck. His roars of pain deminish into whimpers as blood spills readily on the complex's floor.`
			`	Suddenly, a gunshot rings out throughout the building. The two beasts fall over as the stagehand steps forward holding a shotgun. The crowd is left in silence for a moment, until they start to jeer and boo, angered by the unsatisfying end to the duel. The stagehand responds by pointing his gun up and firing again. "That's enough!" he yells. "If you freaks want your bloodsports, then go to the gladiator stadium, or a cockfighting ring. But this establishment will not support such degeneracy!" The crowd goes quiet, but out of the corner of your eye, you see some mean-faced figures reach into their pockets.`
			choice
				`	(Get out before it gets ugly.)`
					goto nopelate
				`	(Stay for a while longer.)`
			`	Continuing to look on, you hear a loud bang to your right as the stagehand gasps in pain and collapses. You turn to see that a mustached man next to you has his gun raised. Before you can react, you hear another gunshot and see a spurt of blood erupt from the man's temple. Almost instantly, the entire audience is up in arms as gunfire comes in from every direction. Acting instinctually, you duck down and crawl through the forest of legs towards the exit. Once there, you reach your hand up and push the door open before running out.`
				goto outside
			label nopelate
			`	As you turn around, you hear a volley of gunshots from behind, and decide to run out of the building, tackling the door open.`
				goto outside
			label nope
			`	You head towards the exit, pushing aside audience members completely captivated by the fight. Flinging the door open, you hear a gunshot from behind, and decide to run out.`
			label outside
			`	As you step outside, you are greeted by sheets of rain lashing you. The strength of the torrent almost causes you to fall backwards, but you manage to steady yourself. You take a glance back at the racing complex to find that the guard in the black uniform is missing. You turn to begin the trek back to your ship, but halfway there, you feel something touch your lower leg.`
			choice
				`	(Turn around.)`
					goto turner
				`	(Run away.)`
			`	You begin to run, but slip in the mud and fall on your face. You roll over to come face-to-face with a dour-looking dog eyeing you. Sitting up, you recognize the poodle as Puny, who must have snuck out of the complex during all the commotion. As you get off of the ground, Puny looks up at you with puppy-dog eyes.`
				goto kindly
			label turner
			`	You turn around and come face-to-face with a dour-looking dog looking up at you with puppy-dog eyes. Inspecting it, you recognize the poodle as Puny, who must have snuck out of the complex during all the commotion.`
			label kindly
			choice
				`	(Pet her.)`
				`	(Shoo her.)`
					goto shoo
			`	You crouch down and rub the soggy tufts of hair on Puny's head. As you continue, a smile creeps onto her face, beaming in spite of the soaking rain. You think about what to do with her.`
			choice
				`	(Bring Puny aboard your ship.)`
				`	(Shoo Puny off.)`
					goto shoo
			branch remember
				has "bet on hound racing"
			`	You pick up Puny and carry her onboard. As you dry yourselves, you think back to what the announcer said about Puny being owned by someone from the Paradise Worlds, and wonder where you might be able to drop her off.`
				accept
			label remember
			`	You pick up Puny and carry her onboard. As you dry yourselves, you think back to what the announcer said about Puny being owned by someone from the Paradise Worlds, and wonder where you might be able to drop her off.`
			`	As you step into the cockpit, you recall the bet you put on the hound race. Looks like you won't be getting your money back.`
				accept
			label shoo
			branch rememberdecline
				has "bet on hound racing"
			`	You wiggle your leg around to scare Puny off. She runs into the mist, vanishing from sight. You turn back and manage to reach your ship, changing into a dry set of clothes.`
				decline
			label rememberdecline
			`	You wiggle your leg around to scare Puny off. She runs into the mist, vanishing from sight. You turn back and manage to reach your ship, changing into a dry set of clothes.`
			`	As you step into the cockpit, you recall the bet you put on the hound race. Looks like you won't be getting your money back.`
				decline
	to complete
		never



mission "Pookie, Part 4"
	repeat
	landing
	source
		attributes "paradise"
		not planet "Hestia"
	to offer
		has "Pookie, Part 3: active"
	on offer
		conversation
			branch repeat
				has "Pookie, Part 4: offered"
			`After landing on <origin>, you look for a way to reach as many people on the planet as possible in order to find Puny's owner. One of the receptionists at a planetary information desk says that she can put out a notice for a lost dog on a planetwide notice board, if you're able to put in a detailed enough description of Puny. You describe the poodle's appearance to the best of your abilities, and also mention how she was traveling for a vacation when she was abducted.`
			`	When you check back with the receptionist the next morning, she tells you that nobody has approached the offer.`
				decline
			label repeat
			`You put a description of Puny on a planetwide notice board. By the time the next day arrives, you've received no offers in response.`
				decline



mission "Pookie, Part 5"
	landing
	source "Hestia"
	to offer
		has "Pookie, Part 3: active"
	on offer
		fail "Pookie, Part 3"
		conversation
			branch repeat
				has "Pookie, Part 4: offered"
			`When you land on <origin>, you look for a way to reach as many people on the planet as possible in order to find Puny's owner. One of the receptionists at a planetary information desk says that she can put out a notice for a lost dog on a planetwide notice board, if you're able to put in a detailed enough description of Puny. You describe the poodle's appearance to the best of your abilities, and also mention how she was meant to be transported to a vacation location before being abducted.`
				goto next
			label repeat
			`You approach a receptionist to put a description of Puny on a planetwide notice board.`
			label next
			`	The next day, you visit the receptionist. When she sees you, she tells you that one message came in response, saying that the dog was theirs. You copy the address provided and hail down a taxi.`
			`	The address brings you to a stark white mansion upon a cliff overlooking the ocean. A path snakes down from the entrance of the mansion to a large, gold-plated gate. You bring Puny out from the taxi and ring the doorbell next to the gate. A minute later, a servant in a prim suit approaches. As soon as she sees him, Puny straightens up, holding her head high.`
			choice
				`	"I'm <first>, and I'm here to return a missing pet."`
				`	(Wait quietly.)`
					goto inside
			`	The servant says, "Ah, you're the one with the dog. Come inside, mistress has been expecting you."`
				goto enter
			label inside
			`	When he spots you, the servant says, "Welcome. Come inside, mistress has been expecting you."`
			label enter
			`	The walk to the front of the house is arduous; you pass through several different stadium-sized gardens along the way, each dedicated to a different type of biome. Looking up at the sky, you see the remnants of clouds contort unnaturally around invisible pillars. As you follow the servant, he looks back at you repeatedly, checking that you're still following. You decide to look behind yourself, and see Puny eagerly following. She has somewhat recovered from her time on Freedom, but her body is still little more than skin and bone.`
			`	By the time you reach the mansion, your skin is slightly sunburnt. The servant walks up to the oddly tall door and presses the doorbell before moving to the side, hands folded behind his back. The bell is answered by a woman with a monstrous hairdo, barely able to fit in the doorway. Puny breaks into barking as soon as she sees her, but the woman ignores the barking and says, "Walters, who is this?"`
			`	"It's the captain who put out a description of Pookie, Madam Pemefrey," the servant replies.`
			`	When she hears this, Pemefrey's expression changes from annoyance to elation. "Really? Oh, I can't thank enough for this, dearie. How was it rescuing her? Did you have to barter with smugglers to track her down? Chase down kidnappers to free her? Battle with warlords for her safety?"`
			choice
				`	"It was an adventure and a half saving her."`
				`	"It wasn't anything too hard."`
					goto humble
				`	"Wait, did you say Pookie?"`
					goto rude
			`	"I'm sure it was. Now, where's my darling Pookie?"`
				goto show
			label humble
			`	"Oh. Well, where's my darling Pookie?"`
				goto show
			label rude
			`	Pemefrey chuckles haughtily. "Of course? Why, did you not realize that the purebred you saved is none other than the great Pocahontas? Now, show me my darling."`
			label show
			`	You pick up Puny and show her to the lady. When she makes eye contact with the poodle, her face contorts with anger. "What do you take me for, some kind of Dirt Belter?"`
			choice
				`	"Hey, I'm from the Dirt Belt!"`
				`	"What do you mean?"`
					goto explain
				`	"I'm sorry?"`
					goto sawwry
			`	She tosses her head to the side. "Then I mean it twice as much!"`
				goto explain
			label sawwry
			`	She hisses. "If you wanted to be sorry, then you should never have tried to trick me in the first place!"`
			label explain
			`	Pemefrey thrusts an accusing finger at Puny. "My dog would never be as scruffy, as ugly, as this mutt! You are trying to deceive me by picking some mongrel off of the street and claiming it as mine!"`
			`	Walters walks up to his master, saying, "But Madam, how could this captain provide such an accurate description of how Pookie was abducted if-"`
			`	Pemefrey snaps her head to look back at her servant. "Walters! I thought you were on my side!" She holds her hands on her chest. "It would be such a shame if you ruined our friendship like this. Why, I wouldn't be able to bear to keep you around if you betrayed me like that."`
			`	Walters shoots a desperate glance at you while stepping back, but otherwise says nothing.`
			`	"Now, where was I... oh, right. You. Out. Now." She claps twice, jumping Walters to attention, who beckons you and Puny back to the gate of the mansion.`
			`	You slam the door of the taxi shut as Walters locks the gate. The return journey is somewhat somber, with even Puny wearing a frown. When you look back up from Puny, you find yourself in a far more humble region of <origin>. The grandiose manors built into impossible locations are far distant, replaced with a small suburban town that would not look out of place in the Dirt Belt were it not for the picturesque mountain ranges surrounding it.`
			`	While this town is less wealthy than the neighboring estates, it is still unmistakably on a Paradise World, with the street lamps scrubbed and polished to a wasteful degree. As you pass through the commercial district, your eyes catch a sign that says "Antette and Co. Animal Adoption Agency."`
			choice
				`	(Investigate.)`
				`	(Ignore the sign.)`
					goto lazy
			label within
			`	You tell the taxi driver to stop the car and you walk into the adoption center, leading Puny behind you.`
			`	The inside of the agency is decorated with pale blue wallpaper. To either side of you are rows of plastic chairs, and in front of you is a receptionist looking down at his nails. When he notices you, he lazily says, "Welcome, welcome. What can I do for you."`
			`	You point down at Puny and say, "Could you find a home for this dog?"`
			`	The receptionist leans over the counter to look. "Wow, that's a sorry-looking puppy. What's her name?"`
			choice
				`	"It's Puny."`
					goto unfortunate
				`	"It's Pookie."`
				`	"I don't know."`
					goto figure
			`	"That's a nice name." The receptionist steps forward to pick up the poodle before saying, "We'll make sure Pookie gets plenty of care and love. Thank you for bringing her to us."`
				goto end
			label unfortunate
			`	The receptionist winces. "That's... I'm sure we can come up with something better." He steps forward to pick up the poodle before saying, "We'll make sure she gets plenty of care and love. Thank you for bringing her to us."`
				goto end
			label figure
			`	"Well, I'm sure we'll figure out a name for her eventually." The receptionist steps forward to pick up the poodle before saying, "We'll make sure she gets plenty of care and love. Thank you for bringing her to us."`
			label end
			action
				log `Saved a dog from a hound-racing ring, and tried to give her a home. However, her alleged owner rejected her. Eventually decided to give her up for adoption.`
				log `Minor People` `Puny` `A poodle who was a former racer in a gambling ring. She might secretly be Pookie.`
			`	You exit the center and head back to your taxi for the rest of the trip back to the spaceport.`
				decline
			label lazy
			action
				log `Saved a dog from a hound-racing ring, and tried to give her a home. However, her alleged owner rejected her. Eventually decided to keep her.`
				outfit "Puny"
			`	You lean back in your seat as the taxi passes through the town without interruption. Not long after you find yourself back in the spaceport, with Puny still in your care. With nowhere else to go, you decide to bring Puny aboard your ship. As you lead her, she happily strolls up the landing ramp and settles into one of your bunks.`
				decline



mission "Smuggler's Den, Part 1"
	name "Refugees to <planet>"
	description "Joe and Maria, a young couple with a newborn baby, want to escape slavery and start a new life on <destination>."
	minor
	source "Smuggler's Den"
	destination "Arabia"
	passengers 2
	on offer
		conversation
			`You wander into one of several dimly lit, smoke-filled bars near your docking bay. Soon after you sit down, a pair of hooded figures stand up and begin moving toward you. They aren't carrying any visible weapons, but on a station like this one there's a good chance that everyone you meet has a concealed gun. One of them is carrying a bundle wrapped in cloth. You can't see their faces.`
			choice
				`	(Get out of here.)`
				`	(Wait and see what they want.)`
					goto meet
			
			`	You've heard too many stories of kidnappings and murders on this station to be willing to take any risks. You quickly get up and leave the bar, and walk down the passageway back toward your ship. Glancing behind you, you see that the hooded figures have decided not to follow you.`
				decline
			
			label meet
			`	The hooded figures turn out to be a boy and a girl, both perhaps thirteen or fourteen years old. The bundle in the girl's arms is a baby. "Are you a captain?" the boy asks.`
			`	"Yes," you say.`
			`	"We're looking for passage off-world," he says. "My cousin works in the refineries on Arabia, and I'm hoping he can get me a job there."`
			choice
				`	"I don't want to be involved in anything illegal. Are you in some sort of trouble with the law?"`
					goto legal
				`	"Well, how much would you be able to pay me?"`
					goto payment
			
			label legal
			`	The boy grins. "No, not at all. I mean, aside from the fact that we're pirates."`
			`	Seeing the incredulous look on your face, the girl says, "Members of a pirate gang. Crew on a pirate ship. Captains are usually older, but most of the pirate ships you see out there are crewed by kids like us. It's a hard place to grow up. We want something better for our daughter."`
				goto search
			
			label payment
			`	They are silent for a long moment, looking down at the table. Finally, the boy says, "We're crew on a pirate ship, hardly better than slaves. The captain keeps our wages. We don't get paid anything unless they agree to let us go. But if you help us start a new life, we'll work hard and some day we'll pay you back."`
			`	The girl adds, "You don't know what it's like for a little girl to grow up on a pirate ship. We want something better than that for our daughter."`
			
			label search
			`	As you are conversing a bearded man and a rough-looking teenage boy enter the bar and begin looking around the room. "That's our captain," she says. "Please, you have to help us. There's a service tunnel that connects to the back entrance of the bar. We can escape through there."`
			`	You've heard of these service passageways: the most dangerous part of this lawless station, dimly lit and seldom traveled, except by drug addicts and prostitutes. This whole thing might just be a ruse to lure you into one, where they can attack you without anyone interfering. "No," says the boy, "if we head for the service tunnel, they'll be sure to notice us. Let's just stay at the table until they go away."`
			`	The baby begins to cry, softly, and she bounces it gently, trying desperately to quiet it. "Shh. Shh." For the moment, it falls silent.`
			choice
				`	(Try the service tunnel.)`
					goto tunnel
				`	(Wait.)`
					goto outside
				`	"I'm sorry, this isn't worth risking my life for. I'm leaving."`
	
			`	You stand up and leave. The men in the doorway make no effort to stop you.`
				decline
			
			label `tunnel`
			`	The boy stands up. "Wait ten seconds, then head to the tunnel," he says. He walks into the bathroom, which is right next to the back entrance that she pointed out. You wait for a few seconds, then stand up. "Don't run," says the girl. "Walk slowly. Pretend. You've had a bit too much to drink. We're headed out back to find some privacy." You don't dare look behind you to see if the men in the doorway are watching you.`
			`	Finally, you reach the back entrance, and she spins the wheel to unlock it. The hinges squeal, but it opens enough for you to squeeze through. You find yourselves in a narrow corridor lit only by flickering sodium lamps. In the yellow lamplight her face and hands look pale, jaundiced. The floor of the corridor is littered with beer bottles and discarded hypodermic needles. To one side of the door are several over-stuffed trash cans. As you step into the corridor, a rat scurries away into the darkness.`
			`	A few seconds later, watching through the open airlock, you see the boy walk out of the bathroom. He can't help stealing a quick glance towards the men in the doorway, after which he quickly ducks through the airlock and slams the door shut. "Run!" he whispers.`
			`	You begin running down the corridor, in the direction of your ship. You pass a man, slumped over in a corner; there is no time to see if he is dead, or just sleeping. In places the lights have gone out, and it is so dim that you can barely see the floor beneath you. Your footsteps pounding on the metal decking ring terribly loud up and down the empty hallway.`
			`	Eventually the passageway widens out into a maintenance room, full of humming equipment and large tanks. You duck behind one of them and listen for sounds of pursuit. "I think we're safe," says the boy. He walks over to another airlock door on the opposite wall and tugs it open. Light pours in, almost blinding at first. You are looking out into the rimway, the main passage in this ring of the station. Crowds of people are walking past, paying no attention to you. He glances quickly in both directions, then gestures for you to follow.`
				goto ship
			
			label outside
			`	You wait at the table, pretending that you are busy placing a drink order. The men at the door do not leave. Instead, they step into the room and begin circling around the edge of it. "What berth is your ship in?" asks the boy. You tell him. "Wait ten seconds, then follow," he says. He stands up and walks through the door. The searchers glance at him as he leaves, but they must be looking for two people together, because they ignore him.`
			`	The searchers approach the bar and begin talking to one of the bartenders. You and the girl stand up. "Walk slowly," she hisses under her breath. "Saunter. Don't run." You put an arm around her shoulders and do your best to act like an ordinary bar patron headed home with a new friend after having a bit too much to drink. You don't dare to glance at the bar to see if you are being watched.`
			`	Finally you reach the door. You are in the rimway, the main passage in this ring of the station. It is crowded and brightly lit. You quicken your pace slightly and begin walking toward your ship, still afraid that if you break into a run, you will attract attention. The girl keeps glancing at the shop windows that you pass by: checking the reflection to see if anyone is following you. "They're leaving the bar," she says. And then, "They're walking in the other direction. I think we're safe."`
			`	You pass a narrow doorway, probably an entrance to one of the service tunnels. The boy is standing there, holding a gun by his side. His grim expression softens somewhat when he sees you approaching.`
				goto ship
			
			label ship
			`	You quickly make your way back to your ship. As soon as the door has closed behind you, all three of you breathe a sigh of relief. A second later, the baby begins to wail, loudly. As you show them to their bunks, they introduce themselves as Joe and Maria; the baby's name is Jesse. "I don't know how to thank you," says Maria.`
			`	"Please don't take too long leaving the station," adds Joe. "But, I think we'll be safe here until you're ready to leave. There's no way they can search all the ships at the dock."`
				accept
	on visit
		dialog `You land on <planet> and look for Joe and Maria, but you realize that they were in one of your escorts that has not yet entered the system. Better depart and wait for them.`



mission "Smuggler's Den, Part 2"
	landing
	name "Refugees to <planet>"
	description "Unable to find work on <origin>, Joe and Maria want to travel to <destination> to see if they can get a job there."
	destination "Millrace"
	passengers 2
	to offer
		has "Smuggler's Den, Part 1: done"
	on offer
		conversation
			`As soon as you have landed, Joe finds a computer terminal and tries to look up his cousin who works here, but with no success. You go with him to the company office, where after a short wait you are ushered in to meet with a foreman. After Joe introduces himself, the man says, "I'm really sorry to tell you this, but Leroy died in a refinery fire several months ago."`
			`	Joe is crestfallen. After a long silence, you say, "Sir, do you have any work available for Joe? He and his family were hoping to be able to put down roots here."`
			`	"I'm sorry," says the foreman, "but we've had a ton of immigrants recently. The waiting list for new jobs is about five months long. They could stay here and hope for the best, but if they need work right away, they would be better off going to one of the Syndicate worlds, like <planet>."`
			choice
				`	(Volunteer to take them to <planet>.)`
				`	(Leave them here and hope for the best.)`
					decline
			
			`	Despite his shock and grief, Joe is quite grateful. "You know we can't pay you, right?"`
			`	"Don't worry about it," you say. You return to your ship and tell the bad news to Maria.`
				accept
	on visit
		dialog `You land on <planet> and look for Joe and Maria, but you realize that they were in one of your escorts that has not yet entered the system. Better depart and wait for them.`
	on complete
		event "smuggler's den: payment" 365
		log `Helped two teens named Joe and Maria and their daughter Jesse to escape their pirate captain. Dropped them off on Millrace where they'll start a new life.`
		conversation
			`You help Joe and Maria, and their daughter Jesse, to carry their few belongings down to the immigration desk, where a clerk lists the job openings available and asks them each to fill out a skill survey. Maria says, "Captain <last>, I don't know how to thank you, but I promise you that once we've got steady jobs, we'll save up and pay you our fare for transporting us here."`
			`	You wish them the best of luck, and return to your ship.`

event "smuggler's den: payment"



mission "Smuggler's Den: Payment"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
		near Sol 100
	to offer
		has "event: smuggler's den: payment"
	
	on offer
		payment 35000
		conversation
			`When you land, you are surprised to find a message waiting for you from Joe and Maria, the young couple you transported from Smuggler's Den to Millrace a year ago to help them and their baby escape their lives as pirate crew members. "Dear Captain <last>," they write, "we promised you we would save up enough money to pay you back for transporting us. Attached is <payment>. Thank you for giving us a chance at a new life." They've also enclosed a picture of themselves and their baby Jesse, who is now more than a year old.`
				decline



mission "Smuggler's Den: Follow Up"
	invisible
	landing
	source Millrace
	to offer
		has "Smuggler's Den: Payment: offered"
	
	on offer
		conversation
			`As you're coming in for a landing, you realize that Millrace is where Joe and Maria live, the couple you transported from Smuggler's Den. They recently wrote to you thanking you for helping them to begin a new life. Do you want to stop by and see how they are doing?`
			choice
				`	(Yes.)`
				`	(No.)`
					decline
			`	You contact Joe and Maria and they say they would definitely enjoy seeing you. On your way to the workers' barracks where they live, you stop by a small store and buy some chocolate, plus bread and fresh fruit and some canned goods you think they would be able to use. They thank you for coming and welcome you into their home. Jesse is continuing to grow up, and they have another baby too, now. Joe says the work in the factories is exhausting, and the hours are long, but they never need to worry about where their next meal will come from, or what they'll be required to do to earn it. You leave feeling very glad that you have been able to make such a difference in someone's life.`
				accept
				
	on accept
		log `Visited Joe and Maria on Millrace. Life is tough, but they are doing far better now than they were on a pirate ship. Jesse has grown and the couple already has another baby to look after.`
		log "Minor People" "Joe and Maria" `Two teenagers who were under the employs of pirates, the couple wanted your aid with an escape from their lives and after a time have informed you that they are now living in relative peace where you left them on Millrace.`
		fail



mission "Expedition to Hope 1"
	name "Expedition to Hope"
	description "Transport a team of <bunks> scientists to the abandoned world of <planet>, where they will be placing <tons> of meteorological equipment. Payment will be 80,000 credits."
	minor
	source
		near Wei 2 8
		attributes "dirt belt"
	destination Hope
	to offer
		random < 40
	cargo "scientific equipment" 4
	passengers 4
	
	on offer
		conversation
			`A group of <bunks> scientists approaches you and asks if you would be willing to take them and <cargo> to the abandoned planet of Hope, and then back home from there. "The transport we'd arranged for bailed out on us at the last moment," says their leader, a middle-aged man wearing thick-rimmed glasses. "We have 80,000 credits allocated for payment."`
			choice
				`	"Sure, I'd be glad to help."`
					goto yes
				`	"What sort of research are you doing?"`
				`	"Sorry, I don't have space for you."`
					decline
			`	"You probably know about the supervolcano that forced the evacuation of Hope some decades ago," he says. "My family lived on Hope back then. We want to measure how much ash is still in the air, to see how long it will be before the glaciers recede and the planet is habitable again."`
			choice
				`	"That sounds like a worthy cause. I'd be glad to transport you."`
					goto yes
				`	"Sorry, I'm not going to be headed in that direction any time soon."`
					decline
			label yes
			`	"Thank you," he says. You help them to load their meteorological equipment onto your ship.`
				accept
	
	on visit
		dialog `You enter the atmosphere of <planet>, but realize that the scientists and their equipment were on one of your escorts who hasn't entered the system yet. Better depart and wait for them.`
	on complete
		payment 40000



mission "Expedition to Hope 2"
	landing
	name "Expedition to Hope"
	description "Transport the team of <bunks> scientists home to <destination>, to receive the second half of payment."
	source Hope
	destination
		distance 2 5
		government Republic "Free Worlds" Neutral
	to offer
		has "Expedition to Hope 1: done"
	passengers 4
	
	on offer
		conversation
			`You fly around the planet to several different sites that the scientists have identified as good places for their equipment. They also make some deep radar scans of the glaciers. "That's my old house, down there," says one of the scientists, pointing to the radar picture of one of the buried villages. "Under thirty meters of ice, now."`
			`	The lead scientist hands you forty thousand credits, and says, "Here's the first part of your payment. Now we need to get home to <planet>. I'll pay you the rest once we get there."`
				accept
	
	on visit
		dialog `You land on <planet>, but realize that the scientists and their equipment were on one of your escorts who hasn't entered the system yet. Better depart and wait for them.`
	on complete
		payment 40000
		dialog `You drop the team of scientists off on <planet>. They thank you for helping them out, and pay you <payment>.`



mission "Transport Workers A"
	name "Transport Family"
	description "Transport a family of <bunks>, as well as <cargo>, to <destination>, where they hope that steady work will be easier to come by. Payment is <payment>."
	minor
	source
		attributes "dirt belt"
	destination
		government "Syndicate"
		attributes "factory"
	to offer
		random < 5
	passengers 4
	cargo "household goods" 2
	
	on offer
		dialog `In one of the corners of the spaceport, you meet a family with two kids, and a pile of trunks and boxes spread out next to them. They tell you that they are trying to book passage to <planet>. "Work has gotten way too hard to come by here," explains the father. "I've had seven different jobs in the past year, and none of them lasted more than a month. So we thought we'd try our luck on a Syndicate world. We can pay you <payment> for the trouble."`
	
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment
		payment 20000
		dialog `You drop off the family from <origin>, and wish them the best of luck on <planet>. They seem optimistic, and their kids are still quite excited about having taken their first ever space journey. You're sure that they will be remembering this trip for years to come. Their parents thank you, and pay you <payment>.`



mission "Transport Workers B"
	name "Transport Worker"
	description `This young man is headed to the factories on <destination>. He says he wants to save enough money to be able to ask his "true love" to marry him.`
	minor
	source
		attributes "dirt belt"
	destination "Maker"
	to offer
		random < 5
	passengers 1
	
	on offer
		conversation
			`As you are walking through the spaceport, a young man approaches you and says, "Excuse me, Captain. Is there any chance you're traveling towards the Core?" He's probably in his late teens, barely more than a kid.`
			choice
				`	"I'm sure I could work that into my plans. Where are you headed?"`
				`	"You're traveling all by yourself? You aren't in any trouble, I hope?"`
				`	"Sorry, I don't expect to be headed that way any time soon."`
					decline
			`	"Well, here's the story," he says. "My girlfriend's father won't let us get married until I have some money saved up. They say there's plenty of jobs to be had on <planet>. So I'm headed there to put down roots and get myself established, then in a year or two she can come and join me. Don't worry, I have <payment> that I can give to you."`
			choice
				`	"I'd be glad to take you there."`
					goto thanks
				`	"Are you sure about that? I've heard some bad things about the Syndicate's company towns."`
					goto towns
				`	"Do you really think she's going to wait around for you?"`
					goto wait
			label towns
			`	"Me too," he says, "but it's a lifetime of steady work, and you know how hard that is to come by in this part of the galaxy. Can you help me out?"`
				goto choice
			label wait
			`	"She'll be true to me," he says, with absolute confidence.`
				goto choice
			label choice
			choice
				`	"Okay, I'll take you to <planet>."`
					goto thanks
				`	"Sorry, I'm not headed in that direction."`
					decline
			label thanks
			`	"Thank you, Captain," he says, shaking your hand. You bring him aboard your ship and show him to one of the empty bunks.`
				accept
	
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment
		payment 10000
		log `Transported a teenage boy to Maker so that he can work to marry his girlfriend.`
		dialog `You drop off the young man from <origin> who is hoping to find work and save enough money for his girlfriend to join him. "Good luck," you say. "Be wise. Don't let yourself get into debt." He thanks you, and pays you <payment>.`



mission "Transport Workers C"
	name "Farming Family"
	description "Transport this family of <bunks> farmers and <tons> of livestock, to <destination>. Payment is <payment>."
	minor
	source
		attributes "dirt belt"
		attributes "farming"
	destination
		government "Syndicate"
		attributes "farming"
	to offer
		random < 15
	passengers 5
	cargo "farm animals" 10
	
	on offer
		conversation
			`On the dirt near your landing pad is parked a large wagon, hitched to a draft horse and loaded down with furniture and various farming implements. A family is gathered in the shade of the cart, and several goats and sheep are tied up behind it.`
			choice
				`	(Approach the farmers.)`
				`	(I'm not interested in carrying livestock in my shiny new space ship.)`
					defer
			`	The farmers introduce themselves as Jim and Annette Patterson; their kids are Erin, Kyle, and Sarah. "Any chance you've got space for <tons> of livestock?" asks Jim. "The droughts the last few years have been fierce, and we're hoping to start a new homestead on <planet>. We have <payment> saved for payment."`
			choice
				`	"Sure, I'd be glad to take you there."`
					accept
				`	"Sorry, that's way too far from here."`
					decline
	
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment
		payment 10000
		dialog `You drop off the Pattersons, the farm family from <origin>, and help them to unload their wagon and cattle from your cargo hold. They thank you, and Jim pays you <payment>.`
		log "Minor People" "Jim and Annette Patterson" `An unusual family who needed you to make a very unconventional trip with a sizeable number of farm animals that had to be kept happy in an enclosed area of your spaceship.`



mission "WR Star 1"
	name "Star Research"
	description "Fly through the <waypoints> system with a team of <bunks> scientists and <cargo>, then return them to <destination>."
	minor
	source
		attributes "deep"
		attributes "urban" "research"
	waypoint "Ildaria"
	to offer
		random < 20
	passengers 3
	cargo "sensors" 2
	on offer
		dialog `A group of <bunks> scientists approaches you and asks if you will be headed to the Rim any time soon. "We're doing research on Wolf-Rayet stars," they explain, "and we're hoping to find a captain who can do a fly-by of <waypoints>." Scientific research in the Deep is notoriously well-funded, so they will probably pay you quite well.`
	on waypoint
		dialog `The team of scientists unpacks their equipment and takes some measurements of the star. Before long they inform you they are ready to go home.`
	on visit
		dialog phrase "generic missing waypoint or cargo and passengers"
	on complete
		payment 250000
		dialog `The team of scientists thanks you for bringing them to <waypoints> and back, and pays you <payment>. They seem eager to get back to their lab and start analyzing their measurements.`



mission "There Might Be Riots 1"
	name "Transport band to <planet>"
	description `Give the band "There Might Be Riots" a ride to <destination>.`
	minor
	source
		near Tarazed 5 10
		government "Republic" "Free Worlds" "Neutral"
	destination "Wayfarer"
	cargo "musical equipment" 4
	passengers 8
	to offer
		random < 15
	
	on offer
		conversation
			`A woman in a well-tailored suit approaches you. "Captain <last>?" You nod. "Are you available for a transport job?" she asks.`
			choice
				`	"What is it?"`
				`	"Not right now."`
					defer
			`	"My name is Becca," she says. "I'm a stage manager for a band, and the transport we had under contract bailed out on us. Any chance you could take <fare> and <tons> of cargo to <destination>? Given the circumstances, we can pay quite well."`
			choice
				`	"Sure!"`
				`	"Sorry, I'm not headed in that direction right now."`
					decline
			`	"Great," she says, "I'll tell the boys to start loading their gear into your ship." About a half an hour later the road crew begins carting instruments and amplifiers into your cargo hold. Soon after that, you hear the roar of a crowd in the distance and another group of men comes running into your ship. "We're with the band," they say. "Quick, shut the hatch." Half a minute later, a mob of people has surrounded your ship and a few of them are even climbing on top of it. It takes you a second to realize they're not angry or bent on destruction - they're just a group of crazy fans.`
			`	"Happens everywhere we go," says one of the musicians, calmly, as he watches a video feed of the mob on one of your monitors. He tells you that he's Ulrich, the lead singer. Then he introduces the rest of the singers and musicians.`
			choice
				`	"Pleased to meet you all. What's the name of your band?"`
			`	"Oh," Ulrich says, "we call ourselves, 'There Might Be Riots.'"`
			`	Eventually, the spaceport police arrive and disperse the crowd, and the band settles in for their trip to <destination>.`
				accept
	
	on visit
		dialog `You arrive on <planet>, but realize that your escort carrying the band and their supplies has not arrived yet. Better depart and wait for your escorts to enter the system.`
	on complete
		payment
		payment 100000
		log `Dropped the famous band "There Might Be Riots" off on Wayfarer. They drew quite the crowd, and paid very well.`
		conversation
			`You drop off the band "There Might Be Riots" on <destination>. Along the way, you got to hear some of their music, which is mostly characterized by frenzied instrumentals, a very energetic brass section, and bizarre lyrics. One day while you were in transit, they nearly drove you insane by playing their catchy but nonsensical song "Henhouse In Your Soul" for four hours straight, but other than that they have been good passengers, and their stage manager gives you an incredibly generous payment of <payment>.`
			`	"We've already got a gig lined up for tonight," says Ulrich. "Want to come? We'll give you free tickets." Given how well they just paid you, it might be worth going just to build a relationship with the band, even if not for the music itself.`
			choice
				`	"Sure!"`
				`	"Sorry, I've got other things to do."`
					decline
			`	The band is even louder in concert than they were when practicing in the confines of your ship. About thirty minutes into the concert, the energy of the crowd and the surreal lyrics finally begin to soak in, and rather than seeming meaningless their music feels fraught with meaning that hovers just beyond your grasp.`
			`	Finally the band announces that their last song will be "Sad Archie." You've never heard of it, but the fans scream in approval. It's a slow, ballad-like song about a man named Archie who lives forever and is sad because the friends he makes all grow old and die. Archie has a pet dragon, and he builds a beautiful house for the dragon, but the dragon dies young. Archie is so sad seeing the dragon's house empty and gathering dust that he rents it out to some friends, but they fight with each other and trash the place. The story makes no sense, but some of the fans are wiping away tears as the song ends.`
			`	Becca, who is sitting next to you in the VIP section, says, "We learned years ago that we need to end every concert with a sad song. Otherwise the fans leave with way too much energy and start destroying public property."`
			`	The concert ends, and you say goodbye to the band. They say they'll be in touch if they ever need a ride again.`



mission "There Might Be Riots part 2"
	name "Transport band to <planet>"
	description `Give the band "There Might Be Riots" a ride to <destination>.`
	minor
	source
		government Syndicate
	destination "Prime"
	cargo "musical equipment" 4
	passengers 8
	to offer
		has "There Might Be Riots 1: done"
		has "Deep Archaeology 5: done"
		random < 30
	
	on offer
		conversation
			`As you walk through the spaceport, you see a large crowd gathered outside a small pub, and hear the unmistakable music of There Might Be Riots from inside. The concert seems to be just winding down. Do you want to wait around and say hello to them?`
			choice
				`	(Okay.)`
				`	(Not right now.)`
					defer
			`	"<first>!" says Ulrich, when they see you. "What luck! We're doing a concert tonight on landing pad ninety-four, part of our 'Trouble on the Tarmac Tour.' We're going to need a lift to <planet> right after the concert. Or possibly in the middle of it. Can you help us out?"`
			choice
				`	"Okay. But why the hurry to leave?"`
					goto okay
				`	"Sorry, I've got other plans."`
			`	"Please," he says, "I'm serious. You'll be saving our skins. Whatever else you've got, it's not this important."`
			choice
				`	"Okay, I'll do it. Why's it so urgent?"`
				`	"Sorry, I really don't want to work with you guys anymore."`
					decline
			label okay
			`	"You'll see," he says. "You should park your ship right behind us in case the natives get restless and we need to skedaddle."`
			`	With some trepidation, you sit by the hatchway of your ship and watch as the band sets up directly outside it and the concert begins. Nothing seems out of the ordinary until the band introduces a song called "Gluttony," and you can feel a sudden tension fill the air. The Syndicate security guards, who until now have been standing at the periphery of the landing pad, begin to disperse themselves throughout the crowd.`
			`	It's a song about a man who will die if he ever stops eating, so he eats more and more and grows bigger and bigger. A second after you realize that the whole thing is a thinly veiled critique of the Syndicate, a group up front unrolls a banner that reads "End Wage Slavery!" and begins shouting and chanting slogans. As the band plays on, there is some sort of scuffle at the back of the crowd, and then you see stun guns begin to flash, and rising plumes of what you would guess is tear gas.`
			`	As the demonstrators are driven away, a group of guards approach you. "What is your connection to these musicians?" they ask.`
			choice
				`	"I'm just their transport. They're paying me to carry them to their next destination."`
					goto transport
				`	"They're friends of mine. Why? They haven't done anything illegal, that I can see."`
			`	"Be careful what friends you choose," says the guard, "or you might find that no one in this sector will offer you any jobs. Now, get them packed up and get out of here." You have no choice but to leave the planet immediately...`
				launch
			label transport
			`	"Then I suggest you do your job and transport them. Immediately." The guards leave. As soon as the band is packed up, you leave the planet...`
				launch
	
	on visit
		dialog `You arrive on <planet>, but realize that your escort carrying the band and their supplies has not arrived yet. Better depart and wait for your escorts to enter the system.`
	on complete
		payment
		payment 200000
		conversation
			`As generous as before, the band pays you generously: <payment>. "Where will you be going next, from here?" you ask.`
			`	"Who knows," says Ulrich. "Our music has taken us throughout human space, and beyond."`
			choice
				`	"What do you mean, 'beyond' human space?"`
				`	"Well, I'll look forward to the next time we meet."`
					accept
			branch notpublic
				not "event: hai-human resolution announced"
			`	Ulrich launches into a story. "Years ago when the band was young and we had a month off in between gigs, we found an old gray merchant captain with a glass eye and asked him to transport us to one of the Paradise worlds for an extended 'drug vacation,' if you know what I mean. He said, 'Boys, why don't you leave the drugs behind, and I'll take you on a real mind-altering trip,' and a few days later we were playing a concert on this world where the people were giant squirrels. They loved our music, too. Of course, these days that story isn't half as interesting as it once was."`
				goto revealed
			label notpublic
			`	Ulrich launches into a story. "Years ago when the band was young and we had a month off in between gigs, we found an old gray merchant captain with a glass eye and asked him to transport us to one of the Paradise worlds for an extended 'drug vacation,' if you know what I mean. He said, 'Boys, why don't you leave the drugs behind, and I'll take you on a real mind-altering trip,' and a few days later we were playing a concert on this world where the people were giant squirrels. They loved our music, too. Never did find anyone who could take us back there, though."`
			branch known
				has "First Contact: Hai: offered"
			`	You're tempted to laugh, but he sounds serious. "Well," you say, "if I ever find a planet of intelligent squirrels, I'll be glad to take you guys there." You help them to unload their stuff, and say goodbye for now.`
				accept
			label known
			action
				set "met hai before TMBR"
			`	"It sounds like you were visiting Hai space," you say, and you describe the aliens who live beyond the wormhole. "Yeah, that would be them," says Ulrich. "I'd love to go back there some time, but for now we have commitments closer to home." You help them to unload their stuff, and say goodbye for now.`
				accept
			label revealed
			action
				set "met hai before TMBR"
			`	"Well, now that they're not hiding away anymore, seems like you might have a new market you could go back to," you say.`
			`	"I'd love to go back there some time," says Ulrich, "but for now we have commitments closer to home." You help them to unload their stuff, and say goodbye for now.`
				accept


mission "There Might Be Riots part 3A"
	name "Transport band to <planet>"
	description `Give the band "There Might Be Riots" a ride to <destination>.`
	minor
	source
		attributes "dirt belt" "south" "rim"
		government "Republic" "Free Worlds" "Neutral"
	destination "Pilot"
	clearance
	infiltrating
	cargo "musical equipment" 4
	passengers 8
	to offer
		has "There Might Be Riots part 2: done"
		has "First Contact: Hai: offered"
		random < 30
	
	on offer
		conversation
			`As you walk through the spaceport, you see a distinctive group of people lugging a collection of instruments: the band There Might Be Riots. Would you like to see if there is anything more you can do for them?`
			choice
				`	(Yes.)`
				`	(Not right now.)`
					defer
			`	They're very happy to see you. "You always seem to have amazing timing," says Ulrich. "We were just wondering who could transport us to a... gig of sorts... up north, and then you come along. Any chance you could take us to <destination>?"`
			`	You've heard of that planet. "The weapons testing world for Lovelace Labs?" you ask. "I'm surprised you'd be able to find a big audience there."`
			`	"Oh, we'll have an audience, all right," he says. "We've just put out a new album called 'Songs for the End of Civilization.' A war protest album. We want to film ourselves playing a concert right in the middle of the missile testing range. Of course, we'll probably end up running out of there with Republic Intelligence nipping at our heels. What do you say?"`
			choice
				`	"Sorry, that's further than I'm willing to go for you guys."`
					goto no
				`	"Sounds like a worthy cause. Count me in!"`
					goto yes
				`	"You're going to do a concert on ground that could be littered with unexploded ordnance?"`
			`	"Yeah. What an adventure!" he says. "Come on, it will be worth it."`
			choice
				`	"Sorry, that's further than I'm willing to go for you guys."`
					goto no
				`	"Sounds like a worthy cause. Count me in!"`
					goto yes
			label no
			`	"Are you sure?" he asks. "We'll pay you with more than just money. Do this for us, and I'll share a story with you that very few have heard."`
			choice
				`	"Sorry, but it's still a 'no.'"`
					decline
				`	"Okay, I'm intrigued. But it still sounds risky."`
			label yes
			branch known
				has "met hai before TMBR"
			`	"Great," he says. "Now, the only question is where we'll go afterwards until the fuss dies down. Say, did you ever find that planet of squirrel people? We'd love to go back there."`
			`	"Yes," you say, "they're called the Hai. They live in a whole big region to the north."`
				goto end
			label known
			branch notpublic
				not "event: hai-human resolution announced"
			`	"Great," he says. "Now, the only question is where we'll go afterwards until the fuss dies down."`
			`	"Didn't you say the Hai really liked you before?" you ask. "I think now might be the perfect opportunity to go back to the Hai."`
			`	"Aww yeah!" he exlaims, "those squirrel people were rad cool. We go thumb our noses at the military industrial complex, then you take us to stay with the peaceful squirrel people where the government won't bother us."`
			`	Once more, they begin loading their stuff onto your ship, while you chart a course to <destination>.`
				accept
			label notpublic
			`	"Great," he says. "Now, the only question is where we'll go afterwards until the fuss dies down. I was thinking it'd be a great chance for our band to reconnect with the squirrel people - what did you call them?"`
			`	"The Hai," you say.`
			label end
			`	"Excellent," he says. "We go thumb our noses at the military-industrial complex, then you take us to stay with the peaceful squirrel people where the government won't bother us."`
			`	Once more, they begin loading their stuff onto your ship, while you chart a course to <destination>.`
				accept
	on visit
		dialog `You arrive on <planet>, but realize that your escort carrying the band and their supplies has not arrived yet. Better depart and wait for your escorts to enter the system.`



mission "There Might Be Riots part 3B"
	landing
	name "Transport band to <planet>"
	description `Avoid the Navy combat drones and give the band "There Might Be Riots" a ride to <destination>.`
	source "Pilot"
	destination "Allhome"
	cargo "musical equipment" 4
	passengers 8
	to offer
		has "There Might Be Riots part 3A: done"
	
	on offer
		conversation
			`You bring your ship to a gingerly landing in a section of the testing range that doesn't look too pockmarked with craters, and the band begins setting up their equipment and video cameras. "This is great," says Ulrich. "We'll be broadcasting live over the Net. It's time people started asking why the government thinks it needs all these weapons of war."`
			`	The band plays through about a third of their set without any evidence that the locals even know you are here, which is surprising for such a tightly secured planet. Then, right in the middle of a particularly crunchy anti-war song, your long-range radar picks up something: a large number of ships approaching from a hundred kilometers away.`
			choice
				`	"Guys, I think we should get out of here."`
				`	"We've got ships incoming. Could be trouble."`
					goto ships
			`	The band stops playing. Ulrich turns to the cameras and says, "For all our fans out there, we'll be back after a brief intermission." Then he walks over to you and says, "What is it?"`
			`	"Ships incoming," you say.`
				goto bad
			label ships
			`	The band stops playing. Ulrich turns to the cameras and says, "For all our fans out there, we'll be back after a brief intermission." Then he walks over to you.`
			label bad
			`	"Did they hail us?" asks Ulrich.`
			`	"No," you say.`
			`	He swears, then shouts to the rest of the band, "Gentlemen, time to pack it up posthaste, before we get turned into a tragic industrial accident!"`
			`	The band has just packed the last of their equipment away when the ships come into view. It's a swarm of unpiloted combat drones, and they seem to be engaged in mock combat with each other. But, their flight path is taking them straight in your direction. You power up your shields just as the first of the drones decide that your ship is a valid target for their lasers...`
				launch
	
	npc
		government "Team Red"
		personality heroic nemesis
		fleet
			variant
				"Combat Drone" 15
	npc
		government "Team Red"
		personality waiting heroic
		fleet
			variant
				"Combat Drone" 20
	npc
		government "Team Blue"
		personality waiting heroic
		fleet
			variant
				"Combat Drone" 35
	
	on visit
		dialog `You arrive on <planet>, but realize that your escort carrying the band and their supplies has not arrived yet. Better depart and wait for your escorts to enter the system.`
	on complete
		payment 500000
		log `Brought "There Might Be Riots" to the Hai world of Allhome after escaping a swarm of combat drones that disrupted their performance on Pilot. Ulrich spoke of a cloudy star in the Rim where he heard a voice in his head after parking his ship.`
		conversation
			`You drop off There Might Be Riots on Allhome. Ulrich is looking around the spaceport in wide-eyed excitement. "This is it, guys!" he says. "We're back in the land of the peaceful squirrels. Captain <last>, I don't know how to thank you, but here's a start." He hands you <payment>.`
			`	As the rest of the band begins unloading their things, Ulrich adds speaking more quietly, "And, in good minstrel fashion I will pay you not just with money, but with a story.`
			`	"Back when the fame first became too much for me, I rented a shuttlecraft under an assumed name and went tooling around the galaxy just to get away from it all. I found some cloudy star out along the Rim, parked my ship where no one would bother me, shut down everything but life support, and just sat there meditating and enjoying the silence for two or three days.`
			`	"Then suddenly clear as day I heard a voice say, 'Are you okay? Do you need anything?' I was so shocked that without even thinking I said, 'I'm fine. How about you?' And the voice told me he was sad. Sad, because that part of space used to be the home of another species, and now they're all dead. He said we humans built our cities on the graveyards of a great civilization and didn't even know it. And if we didn't stop fighting each other, our species would die off too.`
			`	"That's when the band started to speak out against war."`
			choice
				`	"Do you think the voice was real, or just in your head?"`
				`	"It sounds like a good warning. I'll try to take it to heart."`
					goto end
			`	"It was in my head," he says, "And it was real. Very real. When it spoke I felt like the whole galaxy had just tipped sideways, or like I'd just stepped too close to the edge of a cliff and got vertigo. I've imagined some crazy things, but I tell you, this I did not imagine."`
			`	You wish him the best of luck in Hai space, and he heads off into the spaceport with the rest of the band.`
				accept
			label end
			`	"Then best of luck to you," he says, and he heads off into the spaceport with the rest of the band.`
				accept



mission "Drug Running 1"
	name "Drug Running"
	description "Bring a shipment of <cargo> to <destination>. Payment will be <payment>. If you are caught with this cargo, you may be fined."
	minor
	repeat
	source
		attributes "near earth" "dirt belt" "north"
	destination
		attributes "paradise"
		distance 1 100
	cargo "illegal drugs" 5 2 .1
	illegal 40000 `In addition to the fine, the illegal drugs are confiscated from your cargo hold.`
	stealth
	to offer
		random < 10
		"said no to drugs" < 4
	
	on offer
		dialog `As you are walking through the spaceport, a man pulls you aside and asks if you would like to help transport <tons> of "recreational pharmaceuticals" to <planet> for <payment>. (This sounds like an illegal mission, so you'll need to avoid getting scanned or landing on planets with high security.)`
	
	on accept
		"said no to drugs" --
	on decline
		"said no to drugs" ++
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 80000
		"drug smuggler" ++
		dialog `Some disreputable-looking locals unload the illegal drugs from your cargo bay, and hand you your payment of <payment>.`



mission "Drug Running 2"
	name "Drug Running"
	description "Bring a shipment of <cargo> to <destination>. Payment will be <payment>. If you are caught with this cargo, you may be fined."
	minor
	repeat
	source
		attributes "near earth" "dirt belt" "north"
	destination
		attributes "rich"
		distance 1 100
	cargo "illegal drugs" 5 2 .1
	illegal 50000 `In addition to the fine, the illegal drugs are confiscated from your cargo hold.`
	stealth
	to offer
		random < 10
		has "Drug Running 1: done"
	
	on offer
		dialog `When you walk into the local bar, a man sitting in the corner waves you over and says in a hushed voice, "Captain, we've got <tons> of the good stuff that needs to get to <planet>. I promise you this will be a very lucrative operation. What do you say?"`
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 100000
		"drug smuggler" ++
		dialog `Immediately after you land, some workers show up to unload the "stuff." They give you <payment>.`



mission "Drug Running 3"
	name "Drug Running"
	description "Bring a shipment of <cargo> to <destination>. Payment will be <payment>. If you are caught with this cargo, you may be fined."
	minor
	repeat
	source
		attributes "near earth" "dirt belt" "north"
	destination
		attributes "urban"
		distance 1 100
	cargo "illegal drugs" 5 2 .1
	illegal 70000 `In addition to the fine, the illegal drugs are confiscated from your cargo hold.`
	stealth
	to offer
		random < 10
		has "Drug Running 2: done"
	
	on offer
		dialog `A well-dressed woman approaches you as you are walking through the spaceport and asks quietly if you would be willing to help facilitate the transport of some "naughty substances" to a certain individual on <planet> for <payment>.`
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 120000
		"drug smuggler" ++
		dialog `You hand off the illegal "substances" to your contact on <planet>, who pays you <payment>.`



effect "puff"
	sprite "effect/puff"
		"no repeat"
		"frame rate" 10
	"lifetime" 20
	"random angle" 360
	"velocity scale" -.005

outfit "Imaginary Weapon"
	category "Guns"
	"gun ports" -1
	weapon
		sprite "projectile/rainbow"
			"frame rate" 12
			"random start frame"
		"hit effect" "puff"
		"die effect" "puff"
		"inaccuracy" 20
		"velocity" 12
		"lifetime" 60
		"reload" 10
		"acceleration" 1.2
		"drag" .1
		"turn" 3
		"homing" 4
		"tracking" 1.

ship "Hallucination"
	sprite "ship/hallucination"
		"frame rate" 1
		"random start frame"
	"never disabled"
	attributes
		"hull" 1000
		"mass" 180
		"drag" 2.1
		"heat dissipation" .7
		"fuel capacity" 100000
		"jump fuel" 100
		"jump speed" 1
		"jump drive" 1
		"automaton" 1
		"thrust" 30
		"turn" 500
		"energy generation" 1
	outfits
		"Imaginary Weapon" 1
	gun 0 0

mission "Hallucination"
	invisible
	landing
	to offer
		has "Drug Running 2: active"
		random < 50
		"teetotaler" < 3
	
	on offer
		conversation
			`During your brief stop on <origin>, it occurs to you that it really is a shame to have a cargo hold full of the finest of illegal drugs, and not to take even a small sample for yourself. There is no way the loss of a tiny bit of drugs could be noticed. Give it a try?`
			choice
				`	(No, I never touch that stuff.)`
					defer
				`	(Sure, sounds like fun!)`
			`	The room begins to spin, and strange things happen...`
				launch
	
	on accept
		log `Agreed to transport illegal drugs. Tried some of them while refueling and instantly regretted it. The sky truly is endless.`
	
	on defer
		"teetotaler" ++
	
	npc kill
		government "Bad Trip"
		personality nemesis heroic
		ship "Hallucination" "Love"
		ship "Hallucination" "Peace"
		ship "Hallucination" "Happy"
		ship "Hallucination" "Shiny"



mission "Shady passenger transport 1"
	name "Shady passenger transport"
	description "Discreetly transport a passenger to <destination>. Payment will be <payment>. If you are caught with him, you may be fined."
	minor
	repeat
	source
		attributes "near earth" "core" "urban"
	destination
		attributes "frontier" "dirt belt" "rim" "north" "south" "pirate"
		distance 2 3
	passengers 1
	illegal 75000 `Your passenger turns out to be a small-time wanted criminal. As he is hauled off in chains, you vehemently protest that you knew nothing of his shady history. You wind up quite a bit poorer through a combination of fines and bribes (the breakdown remains somewhat unclear).`
	stealth

	to offer
		random < 10
		"rejected illegal jobs" < 3

	on offer
		dialog `While having a drink at one of the spaceport's bars, a somewhat scruffy-looking man in a dark cloak pulls you aside and offers <payment> for discreet, no-questions-asked passage to <destination>, which is quite close by. This could be a quick and lucrative job. (It also sounds illegal, so you'll need to avoid getting scanned or landing on planets with high security.)`

	on accept
		"rejected illegal jobs" --

	on decline
		"rejected illegal jobs" ++

	on visit
		dialog phrase "generic passenger on visit"
	on complete
		"getaway driver" ++
		payment 50000
		dialog `Your mysterious passenger has spoken hardly a word during the entire trip. As soon as you land, he hands you your payment of <payment> and disappears into a crowd.`



mission "Shady passenger transport 2"
	name "Shady passenger transport"
	description "Discreetly transport two passengers to <destination>. Payment will be <payment>. If you are caught with them, you may be fined."
	minor
	repeat
	source
		attributes "near earth" core urban
	destination
		attributes "frontier" "dirt belt" "rim" "north" "south" "pirate"
		distance 3 7
	passengers 2
	illegal 150000 `Your passengers turn out to be wanted criminals. As they are hauled off in chains, you vehemently protest that you knew nothing of their shady histories. You wind up quite a bit poorer through a combination of fines and bribes (the breakdown remains somewhat unclear).`
	stealth

	to offer
		random < 8
		"rejected illegal jobs" < 3
		"getaway driver" > 2

	on offer
		dialog `As you are walking through the spaceport, two men in nondescript clothing appear out of nowhere and offer <payment> for discreet, no-questions-asked passage to <destination>. Though they say very little, you get the distinct sense that their presence on this planet and motivation to be elsewhere may not be entirely legal.`

	on accept
		"rejected illegal jobs" --
		"getaway driver" ++
		dialog `You bundle the men onto your ship before anyone sees them. As you're helping unpack their luggage, one of them casually mentions that they may have attracted the attention of some bounty hunters, and would prefer not to be captured. You should probably avoid being scanned, too.`

	on decline
		"rejected illegal jobs" ++

	on visit
		dialog phrase "generic passenger on visit"
	on complete
		"getaway driver" ++
		payment 100000
		dialog `Your passengers depart after paying you the agreed-upon sum of <payment>, off to make new lives for themselves doing who-knows-what.`

	npc
		government "Bounty Hunter"
		personality nemesis plunders waiting
		system
			distance 6 9
		fleet "Bounty Hunters"



mission "Shady passenger transport 3"
	name "Shady passenger transport"
	description "Discreetly transport <bunks> passengers to <destination>. Payment will be <payment>. If you are caught with them, the legal consequences may be severe."
	minor
	repeat
	source
		attributes "frontier" "dirt belt" "rim" "north" "south" "pirate"
	destination
		attributes "near earth" "core" "urban"
		distance 5 10
	passengers 4 8
	illegal 400000 `It's difficult to feign ignorance of your passengers' background during your questioning. You wind up having to pay a small fortune in fines and bribes to keep yourself from being charged as an accomplice to some very serious-sounding crimes.`
	stealth

	to offer
		random < 5
		"rejected illegal jobs" < 3
		"getaway driver" > 5
		has "Shady passenger transport 2: done"

	on offer
		dialog `A group of <bunks> fearsome-looking young men and women brazenly walk up to you in broad daylight, explaining that they're in some legal trouble and need to get to <destination> as quickly as possible. They offer <payment> to secure discreet passage. You must be getting quite a reputation in certain circles. Transporting them might be very dangerous. On the other hand, they're offering a small fortune...`

	on accept
		dialog `The mercenaries (or gang members, or fleeing bank robbers, or who knows what else) make themselves at home on your ship, and begin drinking and arguing. You wonder what you've gotten yourself into...`
		"rejected illegal jobs" --

	on decline
		"rejected illegal jobs" ++

	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 350000
		dialog `During the voyage, you've come to understand that your passengers are mercenaries whose latest exploits put them on the wrong side of the law. They pay you the agreed-upon sum of <payment> and disappear into a crowd, no doubt off to cause chaos and mayhem for some unsuspecting victims. Oh well, not your problem...`
		"getaway driver" ++
	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 2 3
		fleet "Bounty Hunters"
	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 2 3
		fleet "Bounty Hunters"
	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 6 9
		fleet "Bounty Hunters"



mission "Shady passenger transport 3 - double cross"
	name "Shady passenger transport"
	description "Discreetly transport <bunks> passengers to <destination>. Payment will be <payment>. If you are caught with them, the legal consequences may be severe."
	"apparent payment" 350000
	minor
	source
		attributes "frontier" "dirt belt" "rim" "north" "south" "pirate"
	destination
		attributes "near earth" "core" "urban"
		distance 5 10
	passengers 4 8

	to offer
		random < 5
		"rejected illegal jobs" < 3
		"getaway driver" > 5
		has "Shady passenger transport 2: done"
		credits >= 10000000

	on offer
		dialog `A group of <bunks> fearsome-looking young men and women brazenly walk up to you in broad daylight, explaining that they're in some legal trouble and need to get to <destination> as quickly as possible. They offer <payment> to secure discreet passage. You must be getting quite a reputation in certain circles. Transporting them might be very dangerous. On the other hand, they're offering a small fortune...`

	to fail
		has "bribed mercenaries"

	to complete
		not "bribed mercenaries"

	on accept
		dialog `The mercenaries (or gang members, or fleeing bank robbers, or who knows what else) make themselves at home on your ship, and begin drinking and arguing. You wonder what you've gotten yourself into...`
		"rejected illegal jobs" --

	on decline
		"rejected illegal jobs" ++

	on enter
		conversation
			`You'd begun to doubt the wisdom of your decision to transport this band of cutthroats from the moment you agreed to it, but the money was too good to resist. You settle into the captain's chair and prepare for the voyage ahead.`
			`	But something feels wrong. You expect to hear the sounds of drunkenness and violence coming from the passenger compartment, but instead a deathly silence fills the air. You whirl around in your seat and come face-to-face with the entire gang. They're all armed. And their weapons are pointing at you. Your heart sinks.`
			`	Their leader appears to be a lithe and dangerous-looking young woman who holds an enormous shotgun that's almost as big as her. "Looks like we boarded the ship of fools, and here's the biggest one!" she says mockingly. "We didn't have a credit to our names, but soon we'll own your ship. Hand over the access codes and we'll let you live."`
			choice
				`	(Shoot first!)`
					goto shoot
				`	(Negotiate.)`
					goto negotiate
				`	(Surrender.)`
					goto betrayed

			label shoot
			branch "shoot and die" "shoot and live"
				random < 75

			label "shoot and die"
			`	That turns out to be a really bad decision. It's also your last. A truly excessive barrage of projectiles ends your life.`
				die

			label negotiate
			`	"You don't want my ship, you want my money," you stammer, stalling for time while you try to think of a way out of this situation. "This ship is registered to me; nobody would believe that you came across it honestly. You want a fresh start in an anonymous ship. I'll give you 4 million credits, and you can buy a Modified Argosy or some other vessel better suited to your line of work."`
			`	The gang leader snorts derisively. "Why don't we just kill you and hotwire this ship? That sounds more fun."`
			choice
				`	(Shoot first!)`
					goto shoot
				`	(Offer more money.)`
					goto "more money"
				`	(Surrender.)`
					goto betrayed

			label "more money"
			action
				set "bribed mercenaries"
			`	You up your bribe to 8 million credits. It's enough. A sigh of relief escapes your lips as everyone lowers their weapons.`
			`	You arrange for a merchant captain to transport the renegades down to the surface, along with a password-protected credit chip. Once the airlock closes, you send them the password. At least you have escaped with your life and your ship.`
				defer

			label betrayed
			`You go to the security station and bitterly hand over the ship's access codes.`
			`	"Smart move," the leader says. "Or was it? Now we don't need you alive for anything, do we?"`
			`	She fires her shotgun into you from behind, and for a brief moment, you are treated to the sight of your internal organs splattered all over the console. It's the last thing you ever see.`
				die

			label "shoot and live"
			`Somehow, miraculously, you manage to reach your gun before she fires. Perhaps it's the sheer brazenness of it - no one would expect someone staring down the barrels of half a dozen guns to actually draw against them. Nevertheless, you do, and it works.`
			`	Your first shot finds its mark, and the gang leader crumples to the floor. The other thugs shriek in alarm and begin to spray gunfire in all directions, but it's ineffective panic fire. Taking cover behind the armored captain's chair, you dispatch two more with well-aimed shots.`
			`	The remaining goons attempt to flee, but your fingers find the button controlling the bridge door and it slams down before they can escape. They throw down their weapons and surrender. You toss them into the brig and decide that it might be a hoot to take them to their original destination as prisoners instead of passengers, and see if you can get a bounty for bringing them in.`

	on visit
		dialog phrase "generic passenger on visit"
	on complete
		dialog `You hand off your prisoners to the planetary authorities who gratefully take them into custody. It turns out that they were wanted, and there's a substantial bounty. You find yourself richer to the tune of <payment>.`
		payment 250000

	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 2 3
		fleet "Bounty Hunters"
	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 2 3
		fleet "Bounty Hunters"
	npc
		government "Bounty Hunter"
		personality nemesis plunders
		system
			distance 6 9
		fleet "Bounty Hunters"



mission "Shady passenger transport 3 - double cross big payment"
	name "Shady passenger transport big payment"
	landing
	invisible

	to offer
		has "bribed mercenaries"
		credits >= 8000000

	on offer
		payment -8000000
		conversation
			`You receive a message informing you of an unusually large transaction: 8 million credits. The gang of cutthroats must have withdrawn the money you bought them off with. You are now free to continue your career - poorer, but hopefully wiser.`
				decline



mission "Rescue Miners 1"
	description "Participate in the medical evacuation of miners injured on <planet> by bringing <bunks> emergency workers and <cargo> to the planet."
	name "Rescue Miners"
	minor
	source
		attributes "core"
		attributes "urban"
	destination
		attributes "core"
		attributes "mining"
		distance 1 100
	passengers 15
	cargo "emergency supplies" 15
	to offer
		random < 60
	
	on offer
		dialog `You've just sat down in the spaceport bar and ordered a drink when someone in uniform runs into the room and shouts, "There's been a mine explosion on <planet>! We need all available ships to carry relief workers and supplies and to evacuate the injured to a world where there are better medical facilities."`
	on visit
		dialog phrase "generic cargo and passenger on visit"



mission "Rescue Miners 2"
	landing
	description "Participate in the medical evacuation of miners injured on <origin> by bringing <bunks> passengers to the medical facilities on <destination>."
	name "Rescue Miners"
	destination
		attributes "core"
		attributes "urban"
		distance 2 10
	passengers 15
	to offer
		has "Rescue Miners 1: done"
	
	on offer
		dialog `You drop off the medical personnel on <origin>. There are nearly a hundred injured miners waiting for medical evacuation to <planet>. Do you volunteer to carry some of them?`
	
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 80000
		dialog `You drop off the injured miners at one of the medical facilities on <planet> that has agreed to care for the survivors. It's a somewhat chaotic process, but eventually someone thanks you for your help and pays you <payment>.`



mission "Courier 1"
	name "Rush delivery to <planet>"
	repeat
	deadline
	description "Deliver <cargo> to <destination> by <date>. Payment is <payment>."
	minor
	cargo random 5 2 .1
	to offer
		random < 5
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		distance 4 10
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	on offer
		dialog `As you are walking through the spaceport, a man approaches you and says, "Excuse me, Captain. I took on a rush delivery of <cargo> to <planet>, but my ship needs repairs and there's no way I can make it there before <day>. Can you take this job for me? The payment for the job is <payment>."`
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 30000
		dialog phrase "generic cargo delivery payment"


phrase "generic human package offer"
	word
		`A local`
		`A man`
		`A resident of <origin>`
		`A stranger`
		`A woman`
	word
		` `
	word
		`appears from seemingly nowhere to ask,`
		`approaches you and says,`
		`flags you down and asks,`
		`walks up to you and asks,`
		`stops you and asks,`
	word
		` "`
	word
		`Captain,`
		`Excuse me, Captain.`
		`Sorry to interrupt, but`
		`Hey there, Captain.`
	word
		` `
	word
		`I have a small package that needs to get to <planet> by <day>.`
		`I'm trying to get a package to a relative on <planet> by <day>.`
		`I need to get this package to one of my clients on <planet> by <day>.`
		`I'm trying to get this package to <planet> before <day>.`
	word
		` `
	word
		`Are you able to carry it for me?`
		`Can you carry it for me?`
		`Could you take it there?`
		`Can you help me out with this?`
	word
		` I'll give you <payment> for the effort.`
		` I'm willing to pay you <payment>.`
		` I can afford to give you <payment> for it.`
	word
		`"`

mission "Courier 2"
	name "Package to <planet>"
	repeat
	deadline
	description "Deliver a package weighing <tons> to <destination> by <date>. Payment is <payment>."
	minor
	cargo package 2
	to offer
		random < 5
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		distance 7 14
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	on offer
		dialog phrase "generic human package offer"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 50000
		dialog "You drop off the package and collect your payment of <payment>."



mission "Courier 3"
	name "Papers to <planet>"
	deadline
	description "Deliver <tons> of legal papers to <destination> by <date>. Payment is <payment>."
	minor
	cargo "legal papers" 1
	to offer
		random < 5
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		distance 7 14
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	on offer
		dialog `A woman in a suit walks up to you and says, "Pardon me, Captain. I represent a recently deceased client here on <origin> whose legal papers need to be delivered to his next of kin on <destination>. Would you be willing to do some courier work? The papers must be delivered by <day>, and you will be paid <payment>."`
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 100000
		dialog "You drop off the legal papers and collect your payment of <payment>."



mission "Courier 4"
	name "Lizard to <planet>"
	deadline
	description "Deliver an exotic pet (weighing <tons>) to <destination> by <date>. Payment is <payment>."
	minor
	cargo "exotic lizard" 3
	to offer
		random < 5
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		distance 7 14
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
		attributes "rich"
	on offer
		conversation
			`A man wearing a very complicated hat waves to you from the other side of a landing pad. "Yoo-hoo, Captain!" he says. "I have a courier mission for you if you're interested."`
			choice
				`	(Find out what he wants.)`
				`	(Ignore him.)`
					decline
			`	"My name is Alphonse," he says. "I am a breeder of exotic lizards. A new client on <planet> has just ordered one, and will pay you <payment> to transport it. Naturally, being a live animal, it's a rush delivery; it needs to be done by <day>. What do you say?"`
			choice
				`	"I'd be glad to."`
				`	"Sorry, I'm not interested in that sort of work."`
					decline
			`	"Excellent!" he says. "Come, let me introduce you to your cargo." He leads you to a supply shed where an enormous lizard, taller than you and probably weighing several tons, is being held in a cage that looks far too flimsy for it. "I'll have my men load her aboard your ship at once," says the man, "along with some meat for her to eat on the journey. Watch out for your fingers when you feed her, by the way. Thank you!"`
				accept
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 100000
		dialog `Somehow, you have managed to bring the large lizard to <planet> without it breaking loose and eating you. You unload it and wait for its new owner to come. When he does, he pays you <payment>.`



mission "Migrant Workers 1"
	name "Migrant Workers"
	description "Bring a group of <bunks> migrant workers to <planet>. Payment is <payment>."
	minor
	passengers 6 7
	source
		attributes "dirt belt"
		attributes "farming"
		near "Zeta Aquilae" 1 100
	destination Rand
	to offer
		random < 5
	
	on offer
		conversation
			`In the spaceport, you can't help but notice a group of six or seven men in ragged farm clothing, sitting by the edge of one of the launch pads. They are probably migrant workers looking for a lift.`
			choice
				`	(Approach them.)`
				`	(Ignore them.)`
					defer
			`	You strike up a conversation with the workers. They say that they are tired of the seasonal fluctuations of farm work, and are looking for something a bit steadier and better paying. "We hear there's always work to be had in the mines on <planet>," they say. "Can you take us there? We've pooled together our savings, and can pay you <payment>."`
			choice
				`	"Sure!"`
					accept
				`	"No, sorry, I'm not headed in that direction."`
					decline
	
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment
		payment 20000
		dialog `The migrant workers thank you for transporting them, and hand you <payment>. You hope that they will be able to find better work here than they had on <origin>.`



mission "Humanitarian 1"
	name "Vaccine to <planet>"
	description "Bring <tons> of flu vaccines to the lawless world of <planet>. Be sure the medicine gets into the right hands."
	minor
	cargo "vaccine" 20
	to offer
		random < 5
		"combat rating" > 0
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		government "Pirate"
		distance 2 10
	clearance
	
	on offer
		conversation
			`While you are sitting at a table in a local cafe, a woman sits down across from you and says, "Pardon me, Captain. I wonder if you would be interested in helping with a humanitarian mission."`
			choice
				`	"Tell me more."`
				`	"Sorry, I'm too busy."`
					decline
			`	"There's a flu epidemic on <planet>," she says. "It's a lawless world, so they have not been able to find any merchants willing to bring them medicine. But if they don't get a shipment of vaccine soon, the epidemic could become much worse, and even spread to other worlds."`
			choice
				`	"I'd be glad to help."`
				`	"Sorry, I don't believe in helping pirates."`
					decline
			`	"Thank you," she says. "Your contact on <planet> will be a man named 'Raven Hunter.' Don't let anyone but him trick you into giving them the supplies."`
				accept
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 50000
		dialog
			`After several shady characters have offered to buy the vaccines off you, or threatened to rob you, "Raven Hunter" finally shows up and collects them. He thanks you, and pays you <payment>.`



mission "Humanitarian 2"
	name "Food to <planet>"
	description "Bring <tons> of food to the lawless world of <planet>, to help alleviate a famine."
	minor
	cargo "emergency rations" 50
	to offer
		random < 5
		"combat rating" > 0
	source
		government "Republic" "Free Worlds" "Syndicate" "Quarg" "Neutral"
	destination
		government "Pirate"
		distance 2 10
	clearance
	
	on offer
		conversation
			`As you are walking through the local market, a man says, "Captain, do you have room in your hold to bring food to a starving planet?"`
			choice
				`	"Yes, but I hadn't heard news of a famine recently."`
				`	"Sorry, not today."`
					decline
			`	"No, this one wouldn't be in the news," he says. "It's <planet>, a lawless world. They're desperately in need of food, although it's mostly due to corruption and mismanagement of resources."`
			choice
				`	"Well, it sounds like they're getting exactly what they deserve. And, I have no intention of risking my life to land on a pirate world."`
					decline
				`	"Well, even so, no one deserves to starve to death. I'll help them."`
			`	"Thank you," he says. "We'll load the food into your cargo hold immediately. The sooner you can drop it off on <planet>, the better."`
				accept
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 50000
		dialog
			`It takes a while to figure out who exactly is in charge here. You sell off parts of your shipment of food to a few different local leaders, receiving <payment> in exchange.`



mission "Terraforming 1"
	name "Terraforming Rand"
	description "Bring a delegation of two people from Rand to the Academy of Planetary Sciences on Glory."
	minor
	source "Rand"
	destination "Glory"
	passengers 2
	
	to offer
		or
			has "main plot completed"
			and
				not "event: pug invasion"
				not "event: fwc pug invasion"
	on offer
		conversation
			`You stop in to the spaceport bar for a drink. The bar seems to be frequented mostly by the managers of the mining corporation; you suspect the workers don't earn enough to visit a bar very frequently. In one corner, two of the managers are having a very animated discussion. When they see you, they say, "Hello there, Captain! Interested in taking us on a business trip?"`
			choice
				`	"What sort of trip?"`
				`	"Sorry, I'm just in here for the drinks."`
					defer
			`	"To Glory, to the Academy of Planetary Sciences," he says. "This world is rich in resources, and we're thinking that if we could only cool down the deserts a bit and get more plants to grow here, it would be a decent place to live. We've been dreaming about this for years, and I think it's time to go pay a terraforming consultant to tell us whether it's actually possible or not."`
			choice
				`	"Sure, I'd be glad to take you there."`
					accept
				`	"Sorry, that's way too far away for me to travel right now."`
					decline
	on visit
		dialog `You land on <planet>, but realize that your escort carrying the managers hasn't entered the system yet. Better depart and wait for it.`



mission "Terraforming 2"
	landing
	name "Terraforming Rand"
	description "Return to Rand with the delegation and a student who thinks she can terraform the planet cheaply."
	source "Glory"
	destination "Rand"
	passengers 3
	blocked "You have reached <origin>, but you need <capacity> in order to take on the next mission. Return here when you have the required space free."
	to offer
		has "Terraforming 1: done"
	
	on offer
		log `Brought Eric and Alaric to Glory, two managers of a mining corporation on Rand hoping to terraform the planet. Terraforming Rand would be immensely expensive, but a girl named Amy has a theory that may make the process cheap.`
		conversation
			`You drop off the two managers from Rand, whose names are Eric and Alaric, at the Academy. While you wait for their meeting to end, you look around the lobby. The students have apparently just had some sort of science symposium, and poster boards are on display all along the walls. One of them catches your eye: the title is "Affordable Terraforming through Equilibrium Mapping."`
			`	The basic concept of the poster seems to be that instead of altering the climate of a planet through brute force, it ought to instead be feasible to use a properly timed nudge in the right direction to cause the climate to shift toward a new equilibrium point that supports greater biological complexity. This student seems to think that planets naturally "want" to grow more complex and support more life, but that they sometimes get "stuck" in less optimum states.`
			`	It's an intriguing idea. On the other hand, at the bottom of the paper, the professor has written, "Very poor scholarship. Do not anthropomorphize planets."`
			`	Just then, Eric and Alaric return, looking disappointed.`
			choice
				`	"No luck?"`
			`	They shake their heads. "It would cost fifteen million just to bring a specialist out for an initial consultation," says Eric, "and besides, the cost of terraforming machinery and upkeep is prohibitive. I think this whole Academy is just a money-making racket."`
			choice
				`	"Have a look at this poster. Maybe this student would help us. We could bill it as a sort of internship for her."`
				`	"Indeed. They gave this student a failing grade just for suggesting it could be done more cheaply."`
			
			`	They look at the poster. "Sounds almost too good to be true," says Alaric. "Hang on, I'll look her up in the campus directory." A few minutes later, he is on the phone with the student who made the poster. Her name is Amy. It turns out she is about to flunk out anyway, and is more than willing to travel back to Rand with you when offered a tiny fraction of what the consultant would have received.`
			`	An hour later, you meet up with Amy, and arrange for her to join you on your ship before it takes off. Eric and Alaric are very excited, but you are a bit worried about the wisdom of entrusting their planet's future to someone so young and inexperienced.`
				accept
	
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Eric, Alaric, and Amy hasn't entered the system yet. Better depart and wait for it.`
	on complete
		payment 140000
		dialog `On the entire return journey, Eric and Alaric have been busy showing Amy geological survey maps of Rand and asking her for ideas. The moment you land, they hurry out of the ship. "I'm going to show Amy around," says Eric, "but meet us in the spaceport bar later if you want to help out with whatever we do next." Alaric hands you <payment> as payment for your services, and then follows after them.`



ship "Asteroid"
	noun "asteroid"
	sprite "asteroid/medium rock/spin"
		"frame rate" 10
	attributes
		"fuel capacity" 1
		"hull" 10000
		"mass" 1000
		"drag" 10
		"heat dissipation" .1
		"required crew" 0
		"automaton" 1
		"bunks" 0
		"thrust" 10
		"turn" 100
		"thrusting energy" 1
		"turning energy" 1
		"energy generation" 3
		"inscrutable" 1
	explode "small explosion" 25
	explode "medium explosion" 35
	explode "large explosion" 45
	explode "huge explosion" 30



mission "Terraforming 3"
	name "Terraforming Rand"
	description "Plant a thruster on an asteroid to guide it into a collision with the northern pole of Rand."
	blocked "You'll need more cargo space in order to take the next mission from Eric and Alaric. Return here when you have <capacity>."
	cargo "thruster equipment" 10
	source "Rand"
	to offer
		has "Terraforming 2: done"
	
	on offer
		conversation
			`Alaric, Eric, and Amy are having a heated conversation at a table in the bar. When they see you, Alaric says, "Okay, let's let Captain <last> be the tie breaker." He motions to you to join them.`
			`	Amy explains, "Based on my data, it appears that Rand once had a cooler, more moist climate. But the trouble is, it has almost no axial tilt."`
			`	"That means no changing seasons," explains Eric.`
			`	"The result is that much of the planet is very hot, but the poles are very cold. Nearly all the planet's water has migrated to the poles and ended up frozen into the ice caps. Because the weather is so unchanging here, nothing ever prompts that water to melt and rejoin the hydrological cycle."`
			choice
				`	"Well, that seems impossible to fix. It's not like you can rotate a planet's axis."`
					goto rotate
				`	"Are you suggesting melting the ice caps somehow?"`
					goto melting
			label rotate
			`	"Of course not," she says. "But what we can do is introduce a sudden variation in the planet's climate that will allow water to be distributed more evenly across the surface again."`
				goto danger
			label melting
			`	"That would be the traditional terraforming approach," she says, "using orbital mirrors, or geothermal power, or something similar to evaporate the ice caps at a faster rate than new ice is being deposited. That approach would take a century or so."`
				goto danger
			label danger
			`	"This is where Amy's plan gets a bit scary," says Alaric.`
			`	"I'm proposing crashing a medium-sized asteroid into the ice cap," she says. "If we pick the right asteroid, we can control the amount of dust that is created. The result will be a sudden influx of variability, that may allow the planet to revert to a wetter, more biodiverse state."`
			choice
				`	"That is a stupid idea, and I want nothing to do with it."`
					decline
				`	"Well, if you think it will work, I'm willing to try it!"`
			`	"Great!" says Amy. "I'll mark the asteroid on your radar. You just need to board it, install a small ion thruster, and return here."`
			`	Eric contacts some spaceport workers and has them load a small thruster onto your ship, along with the equipment you will need to mount it on the asteroid.`
				accept
	
	npc save assist
		government "Uninhabited"
		personality derelict fleeing uninterested waiting pacifist mute
		ship "Asteroid" "Target Asteroid"
	
	on visit
		dialog `You return to the spaceport to the confused looks of Eric, Alaric, and Amy. "You didn't put the thrusters on the asteroid," Amy says. "Just board the asteroid to attach the thrusters." Amy begins pushing you back to your ship, clearly eager to see the results of this experiment.`
	on complete
		payment 20000
		log `Agreed with Amy's idea to steer an asteroid into Rand's polar ice cap in order to change the planet's climate. Hopefully this ends well.`
		dialog
			`When you land, the sky already seems noticeably darker than before. Eric runs up to your ship. "You did it!" he says, excited. "A perfect hit. Now we just have to wait and see what the results are. Meet us in the spaceport bar again in a few hours, and Amy will have her initial measurements ready." He hands you a credit chip for <payment>.`



mission "Terraforming 4"
	name "Terraforming Rand"
	description "Bring Amy to <destination> to collect some hardy plants that can grow in a low-light environment."
	source "Rand"
	destination "New Portland"
	to offer
		has "Terraforming 3: done"
	passengers 1
	
	on offer
		conversation
			`By the time you meet up with Eric, Alaric, and Amy, the cloud cover already seems to have visibly increased. Amy is very enthusiastic. "Atmospheric water vapor is on the rise," she says. "The impact vaporized enough ice to form a small ocean. I wouldn't be surprised if we get a rainstorm here in a day or two."`
			`	"What's next?" you ask.`
			`	She says, "I'd like to travel with you to <planet>, and collect some seeds and cuttings from plants that can handle a cooler world with dimmer light, since that's what we'll have here until the dust settles down. I'd say we'll need about ten tons of cargo space."`
			choice
				`	"I'd be glad to take you there."`
					accept
				`	"Sorry, I need to move on to some other work now."`
					decline
	
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Amy hasn't entered the system yet. Better depart and wait for it.`
	on complete
		dialog `As soon as you land, Amy heads off to meet with some local biologists who she contacted during the trip over here. "We'll be back in the spaceport in two hours," she says. "Be sure to have ten tons of cargo space free."`



mission "Terraforming 5"
	name "Terraforming Rand"
	description "Bring Amy and <tons> of hardy plants that can grow in a low-light environment back to <destination>."
	source "New Portland"
	destination "Rand"
	to offer
		has "Terraforming 4: done"
	passengers 1
	cargo "seeds and plants" 10
	
	on offer
		conversation
			`You meet up with Amy, and load the seeds and plant cuttings onto your ship.`
			choice
				`	"Looks good, let's head back to Rand."`
					accept
				`	"So, how do you plan to seed the whole planet with these, anyway?"`
			`	She says, "My idea is to just disperse them in a few different locations, and trust that they will spread out over the next decade or so. We picked plants that are hardy and can spread very rapidly."`
			choice
				`	"Sounds good to me."`
					accept
				`	"What happens if the plants are too invasive, and choke out all the local wildlife?"`
			`	"Well," she says, "in order to keep the climate on <planet> dynamic, they're going to need regular asteroid impacts every few decades. If these plants are too invasive, they can just wait an extra decade or so in between impacts and let the desert creep back in and kill off the invasive plants."`
			choice
				`	"Okay, I guess that would work."`
					accept
				`	"Wait, they're going to have to keep smashing asteroids into their world in perpetuity to maintain the new environment?"`
			`	"For a century or so, yes," she says. "But that's a whole lot more economical than vaporizing the ice caps using traditional terraforming equipment. Come on, let's get back to <planet>."`
				accept
	
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Amy and the seeds hasn't entered the system yet. Better depart and wait for it.`
	on complete
		payment 60000
		event "terraforming timer" 4 8
		log `Amy's theory to terraform Rand seems to have worked. Precipitation around the planet has greatly increased with the introduction of new water into the water cycle.`
		conversation
			`When you get back to <planet>, Amy has you fly in a random path a few kilometers above the surface while she periodically dumps loads of seeds and plant material out the airlock. In the process, you fly through several rainstorms. This world's climate has indeed been altered. But you can't help wonder how a few tons of seed spread out over the entire surface of a planet is really going to help anything.`
			`	Then you meet up with Eric and Alaric. Eric is elated. "We just got a massive rainstorm here!" he says. "We haven't had that much precipitation in a decade!"`
			`	Alaric is less enthusiastic. "Flash floods washed out the road through the canyon," he says, "and very nearly flooded one of the mines, too."`
			`	Amy says, "It will take a year or two for things to begin to settle down. Then we can figure out what our next steps should be."`
			`	"I just hope we haven't made things worse than they were," says Alaric. He hands you your payment of <payment>. "Anyway, thanks for your help, <first>. It sounds like there's nothing more to be done here for the time being."`
		event "terraforming Rand"



event "terraforming Rand"
	planet "Rand"
		add description `	Recent terraforming experiments have caused an increase in precipitation. Flash floods have scoured the landscape in some areas, but sandstorms are also less frequent, and the locals say the heat is a bit less oppressive than it used to be.`

event "terraforming timer"

mission "Terraforming 6"
	landing
	name "Unlawful Use of an Asteroid"
	description `Travel to <destination> by <date> for questioning on your "unlawful use of an asteroid."`
	source
		government "Republic"
		attributes "spaceport"
		not attributes "deep"
		not system "Sol"
	destination "Earth"
	deadline
	deadline 2
	to offer
		has "event: terraforming timer"
		or
			has "main plot completed"
			and
				not "event: pug invasion"
				not "event: fwc pug invasion"
	
	on offer
		conversation
			`When you land on <origin> and exit your ship, you are stopped by a Navy officer with a group of guards. "Captain <last>. You are wanted for..." The officer pauses and looks down at the tablet in his hand. "The 'unlawful use of an asteroid.' You are to travel to <destination> immediately for questioning."`
			choice
				`	"Understood, officer."`
					accept
				`	"I'm wanted for what?"`
				`	(Run away.)`
					flee
			
			`	"The unlawful use of an asteroid, Captain. I'm not entirely sure what that means, but I've been told to send you to <planet> by <day>. Your compliance would be much appreciated."`
			choice
				`	"Alright. Hopefully I can get an answer as to what this is about."`
					accept
				`	(Run away.)`
					flee
			
	on decline
		"reputation: Republic" <?= -10
	on fail
		"reputation: Republic" <?= -10
		dialog `You receive a message from the Republic itself. "Captain <last>. You have not arrived on Earth for your trial on the 'unlawful use of an asteroid' in the time provided to you and therefore are now a criminal of the Republic."`
	on complete
		log `Had to travel to Earth to answer for crashing an asteroid into Rand. Luckily, thanks to Alaric and Eric's lawyer, the case was dropped.`
		conversation
			`You are quickly escorted from the crowded <planet> spaceport to a court building in a wealthy district of the city and asked multiple questions pertaining to the events on Rand. "Why did you purposefully crash an asteroid into a planet? What did you expect to happen? Do you know how many people could have died?" You answer to the best of your ability, and after roughly an hour of questioning you are transferred to a different room where you find Eric, Alaric, and Amy.`
			choice
				`	"What are we going to do?"`
					goto lawyer
				`	"Do you know what we're doing here?"`
			
			`	"Apparently someone had a problem with us terraforming Rand," Amy says, looking rather disappointed.`
			
			label lawyer
			`	"Don't worry," Alaric says. "Our lawyer is on his way right now. We'll all be out of here by the end of the day."`
			`	Alaric's optimism turns out to be justified, as the lawyer quickly finds that there are no actual laws on the books that define lawful or unlawful uses of an asteroid. Since no one was hurt by the asteroid impact and data that Amy had been collecting shows that Rand's climate has changed for the better so far, the case is quickly dropped and you are escorted back to your ship.`
			`	Before you are able to leave, Amy stops you. "Could you meet me in the spaceport bar, Captain? I have some good news to share with you."`



mission "Terraforming 7"
	name "Terraforming Research"
	description "Bring Amy and Nolan to <destination>, where they will research and publish Amy's terraforming methods."
	source "Earth"
	destination "Valhalla"
	passengers 2
	blocked "You need <capacity> in order to take on the next mission. Return here when you have the required space free."
	to offer
		has "Terraforming 6: done"
	
	on offer
		conversation
			`You find Amy in heated discussion with someone about her academy project, "Affordable Terraforming through Equilibrium Mapping." She takes a sip of her drink and invites you to sit down with them.`
			`	"Hello, Captain! This is Nolan. He works in the Deep's Department of Terraforming Research and Application, and he contacted me after hearing about how we started terraforming Rand."`
			`	Nolan outstretches his hand to you. "Nice to meet you, Captain."`
			choice
				`	"Nice to meet you too."`
					goto next
				`	"I take it you're interested in Amy's ideas."`
			
			`	"Absolutely. It's an extraordinary concept, and no offense to you Amy, but it's spectacular that someone of such little experience would imagine such a method of terraforming."`
			
			label next
			`	Amy continues. "Nolan wants to help pursue research of my terraforming techniques. Would you be able to give us a lift to <destination>? I'll pay you <payment>."`
			choice
				`	"Sure, I'd be glad to take you there."`
					accept
				`	"Sorry, I have other places to be."`
					decline
	
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Amy and Nolan hasn't entered the system yet. Better depart and wait for it.`
	on complete
		payment 50000
		event "terraforming research" 120 180
		log `Amy has been noticed by the Deep's Department of Terraforming Research. She will be spending time researching her terraforming theories in the hopes that there are more worlds that can be helped.`
		dialog `The whole journey to <planet>, Amy and Nolan discussed the multiple planets within the Dirt Belt that would be perfect candidates for terraforming. "Nolan and I will spend the next few months here researching my theories," Amy says as she steps off of your ship. "I'll make sure to contact you once we're ready to try terraforming another planet." She hands you <payment>, then follows Nolan out of the spaceport.`



event "terraforming research"

mission "Terraforming 8"
	landing
	name "Terraforming Research"
	description "Meet with Amy and Nolan on <destination> to talk about experimentally terraforming another planet."
	source
		near "Epsilon Leonis" 1 100
	destination "Valhalla"
	to offer
		has "event: terraforming research"
	
	on offer
		dialog `You receive a message from Amy: "Hello, Captain <last>. I just wanted to tell you that Nolan and I have recently published our work on 'Reducing Terraforming Expenses Through Equilibrium Mapping,' and we've received a grant from the Deep for it! We're going to begin experiments with terraforming on a different world. Don't worry, the Republic has approved our experiment this time, so we won't get dragged off for any more cases of an 'unlawful use of an asteroid.' If you're interested in helping, pick us up on <destination>."`



mission "Terraforming 9"
	landing
	name "Terraforming Tundra"
	description "Travel to <destination> with Amy, Nolan, and four others."
	source "Valhalla"
	destination "Tundra"
	passengers 6
	cargo "scientific equipment" 10
	blocked "You need <capacity> in order to take on the next mission. Return here when you have the required space free."
	to offer
		has "Terraforming 8: done"
	
	on offer
		conversation
			`The spaceport is crowded with ships and people when you land. Amy's publication must have stirred up quite the commotion among terraforming scientists.`
			`	Spaceport security clears a path to your ship for Amy, Nolan, and four people you do not recognize. You notice that a few among the crowd of people are jeering and holding signs, one reading "Don't asteroid my planet!" and a half-eaten sandwich gets thrown in Amy's path as she approaches.`
			`	"Not everyone is as happy with the prospect of affordable terraforming as we are," Amy says to you as she boards your ship along with suitcases full of scientific supplies. "But that's no reason to stop, now is it?"`
			`	Amy introduces you to the four others that she brought on board. Two of them are terraforming experts who helped Amy and Nolan with their research. The other two are representatives: one sent by the Republic Parliament in order to oversee the project, and another from Tundra.`
			`	"Once you're ready, Captain, please bring us to <destination>. Tundra was a tropical world millions of years ago, but became cold after a cataclysmic event of some sort. There's a good chance that we may be able to nudge the planet back toward a warmer climate if we do this right."`
				accept
	
	on visit
		dialog `You land on <planet>, but realize that your escort carrying the scientists and their equipment hasn't entered the system yet. Better depart and wait for it.`
	on complete
		dialog
			`The journey to Tundra was spent by your passengers discussing the possible methods of terraforming the planet. The Republic representative was none too pleased when Nolan, perhaps jokingly, suggested crashing an asteroid into it.`
			`	Everyone except for the Tundra native begins to shiver after stepping out of your ship onto the planet, even while inside a protective dome. "Meet us in the spaceport bar in a few hours. We need to finalize our plans of how we're going to execute this experiment."`



mission "Terraforming 10"
	name "Terraforming Tundra"
	description "Bring the Republic representative overseeing the terraforming project to <destination>, where he will attempt to find an alternative solution to terraforming Tundra that does not involve an asteroid."
	source "Tundra"
	destination "Earth"
	passengers 1
	to offer
		has "Terraforming 9: done"
	
	on offer
		log `Began the process of trying to terraform Tundra with new research from Amy and Nolan. Nolan has suggested that another asteroid be used, but the representative for the Republic overseeing the project is displeased with this approach.`
		conversation
			`Amy, Nolan, and the other two scientists tell you the known history of Tundra's climate. Millions of years ago, an asteroid impact or large volcanic eruption altered the planet's atmosphere. Now, the planet no longer retains enough heat from its host star in order to stay warm.`
			`	"Tundra's snow covered surface only exacerbates the problem, reflecting most of the star's light back into space," Nolan explains. "This means that we need to both alter the atmosphere in order for it to retain more heat and alter the surface in order for it to reflect less heat."`
			`	Amy rolls out a map of the entire planet onto the table. Different regions of the surface are color coded, and a large red spot in the planet's southern hemisphere sticks out to you.`
			`	"Tundra has very low volcanic activity, but seismic mapping has led us to this area." Amy circles the red spot with her finger. "Magma from the planet's mantle is building up under this area of the crust, which, lucky for us, is unusually thin. Still, it could be another ten thousand years before the magma builds up enough pressure under the surface to cause a supereruption, melting the snow around it and releasing greenhouse gases into the atmosphere that over time will raise the global temperatures."`
			choice
				`	"So are we going to wait ten thousand years for it to erupt?"`
				`	"How does this help our situation?"`
					goto situation
			
			`	The Republic representative scoffs at your comment. "If we were then we wouldn't be here, now would we, Captain?"`
			
			label situation
			`	One of the other scientists responds, "What we plan to do is encourage the eruption of this volcano by making the crust above the volcano thinner. When the pressure of the magma is able to overcome the pressure of the crust, an eruption will occur."`
			`	"How exactly do you plan to do that?" the Tundra representative responds. "And what will happen to the people who live near that area?"`
			`	Nolan answers, "The people who live near the volcano will need to evacuate the area with all their belongings. The Republic should provide any assistance needed for the evacuation. As for how we will cause the volcano to erupt, we need something energetic enough to crack the planet's crust in the location of the volcano, releasing the pressure that the magma is causing to spark an eruption. That's where we bring in another asteroi--"`
			`	"No, no, no!" the Republic representative exclaims, cutting Nolan off mid-sentence. "The Republic will not gain a reputation for crashing asteroids into its own planets. The consequences of such an action could be disastrous should it go wrong! And in what way will this warm the planet when the resulting volcanic winter could last decades and only result in an even colder climate? Are you not even old enough to remember how a supereruption on Hope caused the evacuation of the entire planet? If the people of Tundra are this desperate to terraform their planet then normal techniques should be employed, none of this 'equilibrium mapping' nonsense."`
			`	"Sir," Amy speaks up with a stern tone of voice, "we have already been authorized by the Republic to undergo this terraforming experiment, so unless you have half a teraton of cheap explosives, we're going to need to use an asteroid. The volcanic winter can be easily avoided by having a fleet of freighters sweep the volcanic ash out of the atmosphere, meaning we'll get the benefits of the greenhouse gases without the detriments of volcanic ash reflecting Cebalrai's heat back into space. No one knew the volcano on Hope was going to erupt, but we can prepare for this eruption and take steps to mitigate the problems." Amy looks the representative straight in the eyes and smirks. "We're scientists, we have this handled."`
			`	The representative falls silent. After a moment of thinking, he says "Captain, I need you to take me to Parliament. I may be able to authorize the use of explosives that should suffice, but it may not be as cheap as Ms. Amy is hoping. We're not about to turn asteroids into our single solution for everything."`
			choice
				`	"I'll get my ship ready to launch."`
				`	"Sorry, I have other things I could be doing."`
					decline
			
			`	The representative leaves the bar. "We'll wait here," Amy says to you. "I'll speak with the Tundra government about evacuating the area around where the impact site will be so that we can start when you get back."`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying the representative hasn't entered the system yet. Better depart and wait for it.`



mission "Terraforming 11"
	landing
	name "Terraforming Tundra"
	description "Return to <destination> with the Republic representative."
	source "Earth"
	destination "Tundra"
	passengers 1
	to offer
		has "Terraforming 10: done"
	
	on offer
		conversation
			`"Wait here," the Republic representative says curtly. Several hours later, he returns, not looking very happy. "What a waste of time. Parliament has declined my request. I don't much agree with this, but you will need to crash an asteroid into Tundra if you wish to achieve your goal." Before you ready for launch, you send a message to Amy and Nolan telling them that an asteroid will be used after all. You don't receive an immediate response.`
				accept
	
	on enter "Cebalrai"
		dialog
			`Your ship is targeted by pirate fleets when you enter the system. Before you engage, you receive a message from Amy.`
			`	"Captain, these pirate ships have been occupying the system for days. They must be taken out if we are to safely crash an asteroid into Tundra. If you aren't able to fight them, distract them until backup arrives."`
	on visit
		dialog `You return to <planet>, but not all of the pirates have been fought off. They don't look like they're leaving any time soon either. Better depart and finish them off for good.`
	npc evade
		government "Pirate"
		personality nemesis staying target
		system "Cebalrai"
		fleet
			names "pirate"
			variant
				"Marauder Quicksilver"
				"Headhunter"
				"Wasp"
				"Bastion"
	npc
		government "Republic"
		personality heroic opportunistic
		system "Procyon"
		fleet
			names "republic small"
			variant
				"Frigate" 2
				"Gunboat" 3
				"Rainmaker" 2



mission "Terraforming 12"
	landing
	name "Terraforming Tundra"
	description "Plant a thruster on an asteroid to guide it into a collision with the dormant supervolcano on Tundra."
	source "Tundra"
	cargo "thruster equipment" 10
	blocked "You need <capacity> in order to take on the next mission. Return here when you have the required space free."
	to offer
		has "Terraforming 11: done"
	
	on offer
		payment 300000
		conversation
			`The pirates that occupied the system did not make an effort to land on Tundra, but they did harass any merchant ships that passed through the system. The government of Tundra pays you <payment> for helping in ridding the system of the pirates, a pleasantly unexpected reward.`
			`	You gather with the scientists in the spaceport bar. The Tundra native informs you that all residents close enough to the volcano to be in danger have been evacuated. "All we need to do now is find the right asteroid," Amy says, and after only a short time of searching, she finds the perfect candidate. "Just like last time, Captain."`
			`	Spaceport workers load a small thruster and the equipment you will need to mount it on the asteroid into your ship.`
				accept
	
	npc assist
		government "Uninhabited"
		personality derelict fleeing uninterested waiting pacifist mute
		ship "Asteroid" "Target Asteroid"
	
	on visit
		dialog `You return to the spaceport to the confused looks of Amy and the rest of the scientists. "You didn't put the thrusters on the asteroid," Amy says. "Just board the asteroid to attach the thrusters." Amy begins pushing you back to your ship, clearly eager to see the results of this experiment.`
	on complete
		payment 200000
		event "terraforming timer 2" 730 912
		event "terraforming Tundra"
		log `Fought off a fleet of pirates preventing the terraforming of Tundra, then maneuvered an asteroid into Tundra to trigger the eruption of a supervolcano. Tundra's global temperatures will initially drop, but the increased volume of greenhouse gases in the atmosphere will eventually improve Tundra's climate.`
		conversation
			`A plume of debris has formed in a mushroom cloud shape above where the asteroid hit. The scientists are viewing their instruments in anticipation for what happens next.`
			`	Almost an hour after the impact, the ground begins to shake slightly, even though the volcano is located hundreds of kilometers away. "This might be it!" Nolan exclaims as he closely watches a seismometer receiving readings from near the impact site. Suddenly the seismometer spikes, and another plume, much larger than the asteroid impact, rises from the impact site. Half an hour later, the low sound of the massive eruption can be heard in the spaceport, triggering another burst of cheers from the scientists. "It actually worked!" one of them yells out.`
			`	You fly the scientists over top of the volcano, allowing them to take readings of the air and surface. "Greenhouse gas levels are off the charts!" Amy exclaims. "Once these gases disperse across the planet's atmosphere, they should begin warming the entire planet."`
			`	The heat has formed a huge circle of melted snow around the volcano, revealing the green color of trees and the dull grays and browns of rock. Closer to the center of the eruption you spot dozens of lava flows emanating from the center of the impact crater.`
			choice
				`	"What do we do now?"`
					goto what
				`	"It looks beautiful from up here."`
			
			`	"Yes it does, Captain," the Republic representative says. "Yes it does."`
				goto end
			
			label what
			`	"First we need to clear all this volcanic ash out of the atmosphere, as otherwise the planet's temperature will drop, then we wait," Amy says to you. "We should be able to tell how this will affect Tundra's climate in a year or two."`
			
			label end
			`	You steer your ship back to the spaceport. Amy pays you <payment> after you land. "Thanks for your help, Captain. We're going to stay here and monitor Tundra's climate as it shifts, so there's nothing more that we need you for."`



event "terraforming Tundra"
	planet "Tundra"
		description `Millions of years ago, this was a warm world, perhaps even tropical. But some cataclysmic event, perhaps a meteor strike or a massive volcanic eruption, altered the planet's atmosphere enough to turn it into the nearly lifeless, frozen planet it is today. Recent experiments in terraforming the planet have attempted to remedy the climate by causing a supervolcano to prematurely erupt.`
		description `	The first settlers came here to drill for the oil trapped deep under the surface, a relic of Tundra's former, more lively days. Instead of refining the oil into plastic, which sells relatively cheap in this region, they have developed an industry in synthetic fabrics and clothing.`



event "terraforming timer 2"

mission "Terraforming Follow-up"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Independent" "Neutral"
		near "Sol" 100
		attributes spaceport
	to offer
		has "event: terraforming timer 2"
	on offer
		event "terraforming follow-up"
		conversation
			`When you land, you receive a message from Amy, the girl you helped to terraform Rand and Tundra.`
			`	"I hope everything is going well, Captain. I just wanted to give you an update on what has occurred in the past year.`
			`	"Tundra's climate has drastically improved. Areas around the equator are starting to become completely snow-free, and I was amazed when I was able to walk outside without a heavy coat on. The Republic has placed a halt on any more experiments, as they wish to see how the situations on Tundra and Rand turn out.`
			`	"Speaking of Rand, last month I got to catch up with Eric and Alaric when I visited the planet. They've told me that Rand is becoming a far better place to live on now. It's even becoming a popular tourist destination. They wanted me to relay their gratitude to you for making their dream come true.`
			`	"That's all I have to say. Thanks again for all the help. I don't know where I would be without it."`
				decline



event "terraforming follow-up"
	planet "Rand"
		add attributes "tourism"
		description `Rand is a desert world, too dry for much farming and with gravity low enough to be uncomfortable for most human beings. It is, however, the best source of heavy metals in the galactic south. Aside from the managers of the mining companies, nearly all the people here are migrant workers from elsewhere in the Dirt Belt, who have come to spend a season working for the relatively high wages that uranium mining offers, either to send money off-world or to save it up in order to build a better life for themselves.`
		description `	Due to the results of recent terraforming experiments, Rand has become a moderately more habitable place. Fascination with this change in climate has led to Rand becoming a semi-popular tourist destination of the Dirt Belt.`
	planet "Tundra"
		spaceport `The spaceport village consists of several large domes, which keep out the wind and driving snow; ships enter and exit the largest of the domes through a hatch that closes as soon as they have come through. Before the planet was terraformed, enough snow would pile up on top of one of the domes every decade or so that it became a danger of collapsing under its own weight; the locals would simply move out of that dome and build another one higher up on the snowpack, but the changing climate has reduced the amount of snow enough that the locals may never need to build another dome again.`



mission "A wolf, a goat, and a cabbage"
	job
	description "Transport a wolf, a goat, and a cabbage to <destination>. Payment will be <payment>."
	"apparent payment" 100000
	to offer
		"day" == 1
		"month" == 4
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral"
	destination
		distance 3 5
		government "Republic" "Free Worlds" "Syndicate" "Neutral"
	cargo "wolf" 1
	
	on enter
	on enter
		dialog
			`You hear a strange crunching sound coming from your cargo hold.`
	on enter
		dialog
			`The worrisome munching sound in your ship's hold is followed by a horrific shrieking bleating noise and then an equally horrific silence. Turning on your cargo hold's security camera, you discover that there is nothing left of the goat and the cabbage that you were transporting except a few scraps of cabbage, some bones, and a lot of blood.`
			`	Meanwhile, the wolf is calmly gnawing on what you suspect is the goat's femur, with a rather self-satisfied look in its eyes. Apparently the goat ate the cabbage, and shortly after that the wolf ate the goat.`
	
	on complete
		payment 33000
		dialog
			`The man who collects the wolf from you on the landing pad is furious. "I told the shipping company not to put the goat in the same ship as the wolf or the cabbage," he says, "but I guess they tried to save money by subcontracting it all to the same captain."`
			`	Because you only delivered a third of the cargo safely, he only pays you <payment>.`



mission "Terminus exploration"
	name "Missing drone"
	description "Travel to the <waypoints> system to see if you can find any sign of a probe drone that had been launched by a team of scientists before they were attacked by pirates and forced to flee."
	source
		planet "Memory" "Haze" "Nifel"
	waypoint "Terminus"
	destination "Bounty"
	to offer
		"combat rating" > 20
	on offer
		conversation
			`As you are exploring the marketplace, a man wearing comically thick glasses comes over to talk to you. "Captain <last>?" he asks. You nod. "I hear that you're not averse to taking on risks," he says. "I'm the lead scientist on a project studying a spatial anomaly in an uninhabited system nearby. We had just launched a probe to study the anomaly more closely when a band of pirates arrived and forced us to flee the system. Would you be willing to travel there and see if you can retrieve the drone's data?"`
			choice
				`	"Sure, I would be glad to."`
					goto end
				`	"How strong of a threat is the pirate fleet?"`
				`	"Sorry, I don't have time to help you."`
					decline
			`	"Just a couple of interceptors," he says. "We were in a scoutship, with no real weapons to speak of, and none of us on the ship have any combat experience. So, we felt it was safer to run away than to try to fight, even though we were leaving valuable equipment behind."`
			choice
				`	"That doesn't sound like much of a threat. I'd be glad to help."`
				`	"Sorry, I don't want to help with this."`
					decline
			label end
			`	"Thank you so much!" he says. "All I need you to do is board the drone and download its database. Unless the pirates have already stripped out the computer, of course. The drone is in the Terminus system, a few jumps away from here. We'll be waiting on <destination> for your return."`
				accept
	npc assist
		system "Terminus"
		government "Derelict"
		personality derelict target pacifist mute
		ship "Science Drone" "Beagle"
		dialog `You board the science drone and discover that the pirates have stripped just about everything of value from it: the engines, the sensors, and the fuel cell that powered it. But the computer system is either too deeply integrated into the drone, or too specialized, to be of any value to the pirates. You transfer enough power to the drone's batteries to reactivate it, and are able to retrieve the data that the scientist was looking for. But it's clear that this drone, or what's left of it, is not going anywhere. You'll have to leave it behind.`
	npc
		system "Terminus"
		government "Pirate"
		personality staying
		fleet "Small Southern Pirates" 2
	on visit
		dialog `You've returned to <planet>, but you don't have the drone's data. Go to Terminus and board the science drone to retrieve the data.`
	on complete
		payment 90000
		log `Recovered data from a derelict science drone for a team of scientists who were studying a strange red anomaly in the Terminus system. The lead scientist on the team, Ivan, suggested that it may be a partially collapsed wormhole.`
		conversation
			`The scientist is overjoyed that you were able to retrieve the data from the drone. Almost in tears, he says, "We were worried that all our planning and fundraising had been for nothing. These measurements will help us to understand that spatial anomaly far better than we do right now." He hands you a credit chip worth <payment>. "And by the way, my name is Ivan. I have an office near the spaceport on Valhalla that you can visit if ever you're wanting to help, or just curious."`
			choice
				`	"Can you tell me more about this anomaly you are studying?"`
				`	"I'm glad I was able to help."`
					decline
			`	Ivan says, "It seems to be a partially collapsed wormhole, something that once linked this part of the galaxy to somewhere else. But, we haven't succeeded in sending anything through it. Maybe the wormhole is no longer passable. Or maybe there's some way to make it open more fully. Or maybe only ships that are specially attuned to its energy signature can travel through it. We don't even know if the wormhole is a natural phenomenon or some sort of alien artifact. Honestly, we aren't sure if it's even a wormhole at all. We'll need to study the data you've recovered to understand it further."`
			choice
				`	"A wormhole? Those actually exist?"`
				`	"What makes you think it's a wormhole? Have you found anomalies similar to this before?"`
					goto similar
			`	"Well of course. The existence of wormholes has been proven for some time now. The Deep managed to create wormholes on the atomic scale before the Republic was even founded." He lowers his voice. "But I suspect that you're asking about wormholes large enough for a ship to pass through."`
			label similar
			`	Ivan looks around the spaceport, as if checking to see if he's being watched. He then looks back to you and motions for you to lean in. Whispering, he says, "The Republic doesn't like when people share this information, but there is one stable wormhole just beyond the Republic's borders."`
			branch skip
				not "First Contact: Hai: offered"
			action
				log `Ivan said that although he's not sure if the anomaly is a wormhole or not, it does bear a striking resemblance to the wormhole that leads to the Hai.`
			`	"You mean the wormhole to the Hai?" you ask.`
			`	"Interesting, you know of it," Ivan responds. "The anomaly in Terminus bears a striking resemblance to it in some of our readings, although it is very different in others."`
				goto end
			label skip
			action
				log `Ivan said that although he's not sure if the anomaly is a wormhole or not, there is a wormhole "just beyond the Republic's borders" that the Republic doesn't like people sharing information on.`
			label end
			`	He looks around again and stands up straight. He then raises his voice, almost projecting it for anyone around you to hear. "But of course, the Deep never figured out how to make wormholes big enough for anything useful, otherwise we wouldn't even need hyperdrives," he says with a wink. "Anyway, thank you again for helping me. Hopefully we meet again in the future."`

ship "Science Drone"
	sprite "ship/science drone"
	attributes
		category "Drone"
		hull 200
		mass 30
		drag 2
		"heat dissipation" 1
	explode "tiny explosion" 5
	explode "small explosion" 2



mission "Lost Boy 1"
	minor
	name `Rescue Tod`
	description `Travel to <destination> in search for Tod, the son of a single mother from <origin>.`
	source "Moonshake"
	destination "Deadman's Cove"
	to offer
		"combat rating" > 100
	
	on offer
		conversation
			`Wandering around the spaceport to see what it has to offer, you make your way into one of the dimly lit restaurants to avoid the crowded streets and metallic-tasting air outside. The restaurant is mostly empty. One of its only inhabitants is a dirty-looking woman crying with her head down in one of the booths.`
			choice
				`	(Approach the woman and ask why she is crying.)`
				`	(Ignore her and leave the restaurant.)`
					goto leave
			
			`	As you walk close to the woman, she raises her head from her arms and brushes her hair out of her face to look at you. Tears run down her cheeks and her nose is running. "Wh-wh-what do you w-want?" she asks in a quiet voice, trying to speak through sobs.`
			choice
				`	"Can I help you?"`
				`	"Why are you crying?"`
			
			`	You ask the woman if she needs help. She wipes away the tears with the sleeve of her shirt and tells you that she is looking for her son, Tod. "I sent him away to a mining job on Placer because I don't have the money to support him myself, but on the way the ship he was on was attacked and boarded by pirates." She begins to sob again. "I d-don't know if he's d-dead or a slave. I tried t-talking to someone from the Syndicate, but they said that saving him wouldn't be w-worth it.`
			`	"W-would you be able to help? Please do if you c-can."`
			choice
				`	"Alright, I'll help you. Where should I look for him?"`
					goto accept
				`	"Sorry, I'm not going to risk my life for someone I don't know."`
			
			`	The woman begins crying even louder than she was before. A waiter walks up to you and suggests that you leave before making the situation worse, and one of the few customers in the restaurant gives you a dirty look for making his meal experience even worse.`
			
			label leave
			`	You wait for the streets to become less crowded before leaving the restaurant. As you look back through the windows of the restaurant, you catch a glimpse of the woman still crying in the booth before the crowd blocks your line of sight and you continue walking.`
				decline

			label accept
			`	"Thank you s-so much! The closest pirate planet to here is <destination>. If he's still alive then I'm sure he would be there. I can feel it." The woman gives you a description of Tod Copper so that you may find him and thanks you again for agreeing to help her. She asks that if you find him to bring him to a location in the <origin> spaceport where she will be waiting.`
				accept



mission "Lost Boy 2"
	landing
	name `Rescue Tod`
	description `Locate the <npc> and board it to rescue Tod, then bring him to <destination> so that he may reunite with his mother.`
	source "Deadman's Cove"
	destination "Moonshake"
	to offer
		has "Lost Boy 1: done"
	
	on offer
		conversation
			`The air in the <origin> spaceport smells of tobacco and tastes of the salt from the world's vast oceans. You receive sideways looks from rough-looking pirates, but none make a move to cause any trouble. As lawless as pirates can be, they still adhere to a form of honor code when in a planet's main spaceport. At least generally.`
			`	You ask a bartender for directions to the local slave traders, as that is the likely place that Tod would be if he was taken here. He points you to a slave trader by the name of Cygnet Brig who "runs the slave trade 'round these parts."`
			`	Cygnet owns a large warehouse building located on the edge of the spaceport island where he keeps all his slaves packed together in groups of three in small holding cells. Some slaves are rattling the bars on their cell or screaming in protest, but many have seemed to accept their fate. Cygnet, a tall, thin, mustachioed man, notices you gazing at the cells. "Can't keep 'em too packed together, oth'wise they's get each otha sick," he remarks in a thick accent of unknown origin to you. "What can I get ya?"`
			choice
				`	"I'm here to buy a slave."`
					goto description
				`	"Do you have a boy by the name of Tod Copper?"`
			
			`	Cygnet strokes his mustache. "Tod Copper. Tod Copper. Tell you what, that name doesn' ring a bell. Heck, I don' even keep track of names 'less I get someone impor'ant. If ya lookin' for someone in particular to buy, can I get a description?"`
			
			label description
			`	You provide Cygnet with the description of Tod that his mother gave you, then explain to him that Tod would have been taken from a ship bound for Placer.`
			`	"Oh yeah, that bugger! That little rebel was causin' me trouble so I sold him off soon as I could. If ya looking for him, then you're gonna need to look for a ship by the name of <npc>. They bought your boy Tod 'bout four days ago. Might be hangin' around a system nearby."`
			`	You thank Cygnet, who has been surprisingly polite for a slave trader, for the information. "If ya ever need a slave, just come talk to me," he remarks as you walk back to your ship. "I've got the cheapest slaves this side of Sol."`
				accept
	on visit
		dialog `You've landed on <planet>, but you haven't yet found Tod. Keep looking for the <npc> and then board the ship; it can't be far from Deadman's Cove.`
	
	npc board
		personality staying nemesis target plunders
		government "Bounty"
		system
			distance 2 4
		ship "Vanguard (Particle)" "Lord Ligonier"
		conversation
			`When you breach the ship's hull, you find the crew of the <npc> more concerned with containing the fires caused by your weapons than with you walking onto their ship. Almost every one of the crew members is a teenager. One looks at you and the pistol in your hand with mortal fear in his eyes.`
			`	Through the smoke and steam, you see a boy running toward you who fits the description of Tod Copper.`
			choice
				`	"Get on my ship!"`
					goto ship
				`	"Are you Tod?"`
			
			`	"Yeah! Are you here to save me?"`
			`	"Get on my ship!" you yell, motioning for him to come toward you.`
			
			label ship
			`	The boy runs past you and into your ship. Following closely behind Tod is a large bearded man holding a laser rifle in one hand and a fragmentation grenade in the other.`
			`	"That's my crew member, you no-good piece of sh--"`
			`	Before the captain is able to finish his sentence, pipes in the wall next to him explode, blasting hot steam all over the right side of his body, causing him to begin rolling on the floor in horrible screeches of pain. Not wanting to stay connected to the ship any longer than you need to be, you run back into your ship and fly away.`
				launch



mission "Lost Boy 3"
	landing
	name `Bring Tod to <planet>`
	description `Now that Tod's mother knows he is safe, bring him to <destination> so that he may start his mining job to support him and his mother.`
	source "Moonshake"
	destination "Placer"
	passengers 1
	blocked "This mission requires that you have at least one free bunk. Return once you have the space."
	to offer
		has "Lost Boy 2: done"
	
	on offer
		conversation
			`Tod's mother almost tears up at the sight of him as you approach. "Oh, my baby boy is alive!" she exclaims, running up and hugging Tod as his face reddens with embarrassment. "Are you hurt? Are you okay? Do you think you'll be fine?" Tod's mother asks, kissing his cheeks between each question.`
			`	"I'm fine, Mom," Tod says in an annoyed tone of voice. Some things never change.`
			`	The mother gives you a handful of credit chips. At a glance, you guess that they couldn't be worth more than 1,000 credits. "I know it isn't much for the work you've done, Captain, but it's all I have to give you in return."`
			choice
				`	"Don't worry about it."`
				`	"I'm sorry but I can't take this from you."`
					goto reject
			
			action
				payment 952
			`	"This is just so wonderful. There aren't many people around here who would do such a thing for such little pay."`
				goto end
			
			label reject
			`	You hand the credits back to the mother as she begins to tear up again. "Thank you so much, Captain."`
			
			label end
			`	"Hold on," Tod chimes in. "I still need to get to <planet>."`
			`	"Of course!" his mother yells out. "Captain, would you please make sure that Tod has a safe passage to <destination>?"`
			`	"And make sure I don't become a slave this time," Tod quips jokingly.`
			choice
				`	"Okay, I'll take Tod to <planet>."`
					accept
				`	"Sorry, I'm not headed in that direction."`
					decline
	
	npc
		government "Pirate"
		personality staying plunders disables
		system "Al Dhanab"
		ship "Falcon (Heavy)" "Cygnet's Slaver"
	
	on visit
		dialog `You land on <planet>, but remember that Tod is in one of your escorts that has yet to enter the system. Better depart and wait for it to arrive.`
	on complete
		dialog `You wish Tod the best of luck on <planet>. "Thank you, Captain. Hopefully I can repay you one day. As cliche as it sounds, I owe you my life."`



mission "Paradise Fortune 1"
	minor
	name `Flee to <planet>`
	description `Flee from <origin> to <destination> with the girl you let on to your ship.`
	source
		planet "Follower" "Mainsail"
	destination
		attributes spaceport
		distance 1 1
	passengers 1
	to offer
		random < 50
		has "main plot completed"
		or
			not "hr: secret leaks"
			has "event: hai-human resolution announced"
	
	on offer
		conversation
			`As with all Paradise Worlds, the air is just the right temperature when you step out of your ship, and a light breeze rustles the leaves of the trees planted around the spaceport. While taking a moment to breathe in the fresh air, you hear yelling coming from the entrance to the <origin> shipyard. Looking over, you spot a young girl with a backpack running from two spaceport security guards. "Get back here!" they yell at the girl, chasing her with no success.`
			`	"Someone help me!" the girl shrieks out. As she runs, a credit chip falls out of her backpack.`
			choice
				`	(Let her onto my ship.)`
					goto continue
				`	(Ignore the scene.)`
			
			`	The girl looks you in the eyes as she approaches, expecting help that will never come. Air rushes past you as she and the security guards run by. After a few meters, the security guards catch up to the girl, tackling her to the ground and detaining her as they remove her backpack full of credit chips.`
				decline
			
			label continue
			`	You open the hatch to your ship and yell "Get on!" as the girl approaches. "Thank you, Captain," she says while getting closer, to much protest from the approaching security guards.`
			`	As she enters your ship, she grabs your arm and pulls you in with her before closing the hatch. "Launch and go to <destination>, now! I'll explain when we get there."`
				launch
	on visit
		dialog `You land on <planet>, but realize that the girl is in one of your escorts that hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Paradise Fortune 2"
	landing
	name `Escaping Paradise`
	description `Escape the Paradise Worlds and travel to <destination> where Diana Howl will give over part of her family's fortune to the local government of <planet>.`
	destination
		attributes "dirt belt"
		government Republic
	passengers 1
	to offer
		has "Paradise Fortune 1: done"
	
	on offer
		conversation
			`"You need to explain what is going on here," you say just after setting your ship down.`
			`	"Alright, alright, I'll explain." You notice that the girl has a strange mix between a posh Paradise World accent and a Dirt Belt or possibly even Rim accent. "My name is Diana Howl. My father is the CEO of a large marketing firm. And this," Diana opens her backpack, revealing its full contents of thousands of credit chips, "this is part of my family fortune, about half a billion credits of it. Don't worry, my father should be able to make this back in a few months' time."`
			choice
				`	"Why have you stolen all this?"`
					goto story
				`	"I'm calling the spaceport authorities."`
			
			`	"No, wait! Let me explain!" Diana protests.`
			
			label story
			`	"All my life I've been fascinated with the world outside my little bubble of the Paradise Planets. My father met my mother on Heartland in the Cor Caroli system while he was on a business trip, so my mother would often take me on trips to the Dirt Belt. The last time I went was before the war though; my mother didn't want me anywhere near the 'Free Loafers,' as she called them. Back then life in the Dirt Belt didn't seem anywhere near comparable to life in the Paradise Worlds, and I can only imagine how much worse it might be after being so close to a war, so I decided that I needed to do something to help.`
			`	"Now, can you take me to <destination>? I wish to hand this over to the government there to help them. It may not seem like much in the grand scheme of how many credits go into running a planet, but it should be a huge boost to their economy."`
			choice
				`	"Alright, I'll help you."`
					goto accept
				`	"What makes you think they won't hand it over to your father?"`
				`	"This is a crime. I don't want to get in trouble helping you."`
					goto decline
			
			`	Diana pauses. "I hadn't thought of that," she says in a downtrodden tone, "but I at least have to try! Please just bring me to <planet>. Please!" Diana looks up at you with puppy dog eyes, quivering her lip with the backpack of credit chips held against her chest.`
			choice
				`	"Alright, I'll bring you to <planet>."`
				`	"Sorry, but I'm not putting myself on the line for this."`
					goto decline
			
			label accept
			`	"Excellent!" Diana yells out. She drops the bag of credits on the floor and gives you a hug. "We'll have to leave immediately, for I fear that the spaceport authorities here might be searching for us."`
				launch
			
			label decline
			`	You call the spaceport authorities and tell them that Diana Howl is on your ship. Moments later when they arrive, they take Diana kicking and screaming off of your ship. She yells harsh profanities at you as she is taken away, one among them being "Syndicate lover." As a reward for "catching" Diana, the spaceport authorities transfer 150,000 credits to your account.`
				decline
			
	on decline
		payment 150000
		log "People" "Diana Howl" `A teenager who stole half a billion credits from her family's wealth, you turned her in to the authorities for a meagre reward.`
	on visit
		dialog `You land on <planet>, but realize that Diana is in one of your escorts that hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Paradise Fortune 3"
	landing
	name `Last Hope`
	description `Escape from the Navy and travel to <destination> where Diana Howl hopes that the Free Worlds will help her.`
	destination "Bourne"
	passengers 1
	to offer
		has "Paradise Fortune 2: done"
	
	on offer
		conversation
			`Diana is eager to get going as soon as you land. "This is going to be great! I'm going to do so much good with this! I can't wait to see the look on their faces when I open up my backpack in front of them!" Diana says rapidly as she bounces up and down with the backpack of credit chips on her back.`
			`	As you gather a few credits to bring with you in case you see something you want to buy, Diana bounces off the ship. Suddenly, her crazed rambling stops. Diana comes running back onto the ship yelling "We need to go! Fly to <destination>! The Free Worlds should protect me!"`
			choice
				`	"What is it? What's happening?"`
				`	(Launch immediately.)`
					launch
			
			`	"Look outside," Diana says with a ghastly look on her face. You check your ship's external cameras, and roaming around your ship is a group of men in Navy uniforms. One of them raises a megaphone to his mouth.`
			`	"Hand over the girl and her credits and we can all walk away from this peacefully, Captain."`
			choice
				`	"Why do you need her?"`
				`	"Over my dead body!"`
					goto launch
				`	"Alright, I'll bring her out."`
					goto agree
			
			`	"In case you haven't noticed, Captain, that girl is in possession of over half a billion stolen credits. She's a criminal, and helping her makes you a criminal too. Given your status, Captain <last>, I'd appreciate it if you didn't make me the officer that put <first> <last> behind bars."`
			choice
				`	"I'm sorry officer, but I can't help you."`
					goto launch
				`	"Okay, I'll hand her over."`
			
			label agree
			`	Diana looks to you in shock. "You wouldn't!" she screeches. "You can't! Fly me to <planet> right now!"`
			choice
				`	"I'm not going to become a criminal to fulfill your crazy dream."`
				`	"Okay, we'll fly to <planet>."`
					goto launch
			
			`	You allow the Navy officer and his troops onto your ship, where they apprehend Diana and her stolen credits. They take her kicking and screaming off of your ship. She yells harsh profanities at you as she is taken away, one among them being "Syndicate lover."`
			`	"Thank you for not causing any more trouble, Captain," the officer says to you. He then hands you 500,000 credits for "playing nice" and leaves.`
				decline
			
			label launch
			`	You activate your repulsor engines, sending the Navy troops recoiling away from your ship. As you ascend into space, your computers detect multiple ships targeting you.`
				launch
			
	on accept
		"stored reputation: Republic" = "reputation: Republic"
		"reputation: Republic" <?= -10
	
	on decline
		payment 500000
		log "People" "Diana Howl" `A teenager who stole half a billion credits from her family's wealth, you turned her in to the authorities for a moderate reward.`
	
	on visit
		dialog `You land on <planet>, but realize that Diana is in one of your escorts that hasn't entered the system yet. Better depart and wait for it to arrive.`
	
	npc evade
		government "Republic"
		personality heroic
		fleet "Large Republic"



mission "Paradise Fortune 4"
	landing
	name `Exchange of Goods`
	description `Travel to <destination> and hand the backpack of credits and Diana Howl's note over to the Navy.`
	source "Bourne"
	destination "New Boston"
	to offer
		has "Paradise Fortune 3: done"
	
	on offer
		conversation
			`While in flight, Diana tells you the stories that she heard of the war. In the Paradise Planets region, they were told that declaring independence and bombing Geminus and Martini was the Free Worlds' first step in overthrowing the Republic.`
			`	"We should talk to Alondo," Diana says. "He'll be able to handle this situation."`
			
			branch epilogue
				has "FW Epilogue: Alondo: offered"
			`	As you're coming in for a landing on Bourne, you receive a message from Alondo. "<first>!" he says. "I just heard that you were in system. Want to meet up for a drink and talk about old times?"`
			choice
				`	"I'd be glad to any other time, but I need your help at the moment."`
					goto conversation
			
			label epilogue
			`	As you're coming in for a landing, you contact Alondo, who is luckily on Bourne. "What have you gotten yourself into?" he responds after you mention that you need his help.`
			choice
				`	"I'll explain the situation when we meet."`
			
			label conversation
			`	You meet with Alondo at his office in the Free Worlds Senate building. After he and Diana exchange greetings, you explain the situation to him.`
			`	"You what?" Alondo responds. "You have to turn her in. The war may be over, Captain, but there is still tension between the Republic and Free Worlds that we cannot have a situation like this exacerbating."`
			`	"You can't do that!" Diana yells in protest. "I thought the Free Worlds was supposed to be all about going against the Republic, but you're just going to give in?"`
			`	"Look here, kid," Alondo says in a stern tone. "The Free Worlds was never about being against the Republic, it was only ever about being against Parliament. There's a big difference there. What you've done is a crime, even to the Free Worlds. We are not about to gain a reputation of harboring criminals of the Republic."`
			`	Diana, instead of protesting further, puts her head down. "I'll be in your ship, Captain," she says. Diana storms off, making an effort to create as much noise as possible with the stomps of her feet.`
			`	"Spoiled kid," Alondo says quietly. "Attitudes like that are why I joined the Southern Defense Pact. Anyway Captain, I suggest you hand her over to the Navy immediately. I'll contact the Republic if you need me to."`
			choice
				`	"Alright, I'll hand her over."`
				`	"Sorry, Alondo, but I agree with her cause."`
					goto agree
			
			action
				set "navy contacted"
			`	Alondo breathes a sigh of relief. "You should probably go check on her. I'll message you where the Navy wants to pick her up."`
				goto end
			
			label agree
			`	"I understand. Please, just don't drag the Free Worlds into this."`
			
			label end
			`	You say goodbye to Alondo and return to your ship. When you arrive and look around, Diana is notably absent. In your pilot's seat she has left her backpack and a written note. The paper has noticeable tear stains in one of the corners.`
			``
			`Dear <first> <last>,`
			`	I don't care about the credits anymore, but I can't go back to my family. I'll be too much of a disgrace, and I can't even imagine looking my parents in the eyes after what I've done. I've left the credits with you. You can do with them as you wish.`
			`	I've taken this chance to escape from my old life. I want to become my own person in the world, and I want to do it on my own. Please don't come looking for me, because wherever I am I'll be happier than when I was with my parents. I've failed myself today, but I'm still going to strive for the betterment of the less fortunate. Thank you for trying to make my dreams come true, even if you couldn't succeed.`
			`	Sincerely,`
			`				Diana W. Howl`
			``
			`	You stare down at the backpack, stuffed full with over half a billion credits.`
			choice
				`	(Hand the credits over to the Navy.)`
				`	(Steal the credits.)`
					goto steal
			
			branch navy
				has "navy contacted"
			`	You fold the note and slip it into the backpack so that you can show it to the Navy to explain why Diana is not with you. You contact the Navy's crime report hotline and tell them that you have the stolen credits. A few minutes later, they respond telling you that a fleet is waiting on <destination> to retrieve the credits.`
				accept
			
			label navy
			action
				clear "navy contacted"
			`	You fold the note and slip it into the backpack so that you can show it to the Navy to explain why Diana is not with you. Alondo sends you a message, telling you that the Navy says they are waiting on <destination> for the credits.`
				accept
			
			label steal
			`	You rip the note apart and begin counting the credits. In total, the backpack contains a whopping 525,894,400 credits. Over half a billion credits richer, you sit down and wonder what you will spend it on.`
				decline
	
	on accept
		"reputation: Republic" >?= "stored reputation: Republic"
	on decline
		payment 525894400
		"reputation: Republic" <?= -1000
		log "People" "Diana Howl" `A teenager who stole half a billion credits from her family's wealth, she decided to start a new life outside the Paradise Planets while you decided to pocket the substantial fortune she left behind to avoid being hunted down.`
	on complete
		payment 1000000
		conversation
			`You spot a fleet of docked Navy ships as you come in for a landing. A small squad of troops gather around your ship after you land. You are greeted by a Navy officer upon exiting your ship and explain to him where Diana is, showing him the note she wrote.`
			`	"That is unfortunate," he responds with a troubled look on his face. "We'll contact the Howl family about this." Before letting you go, the officer hands you <payment>. "This is the reward that Mr. Howl put out for the return of his credits. Thank you for doing the right thing, Captain."`
		log "People" "Diana Howl" `A teenager who stole half a billion credits from her family's wealth, she decided to start a new life outside the Paradise Planets while you dutifully turned in the credits to the authorities to keep the peace. You received a substantial reward for your integrity.`



mission "Northern Blockade"
	minor
	name `Mebsuta Disaster`
	description `<destination> is under attack by pirates. Assist the Republic by delivering <cargo> to the planet as soon as possible.`
	source
		near "Mebsuta" 2 4
	destination "Featherweight"
	cargo "relief supplies" 178
	to offer
		random < 20
		"combat rating" > 200
		"reputation: Republic" >= 0
	
	on offer
		conversation
			`You are approached by a Navy officer. "Are you Captain <last>?" You nod. "Would you be able to assist us? A sizable gang of pirates has occupied <system> and raided the spaceport. A Navy fleet is on its way to eliminate the pirates, but reports from the planet indicate that the spaceport of <planet> is in dire need of supplies. Any building above three stories was badly damaged and everything in the warehouses was either stolen or destroyed. We need a ship to bring <cargo> to them as soon as possible, but there are no available Navy ships capable of doing the job. Would you deliver the supplies for us, Captain?"`
			choice
				`	"I'd be glad to help, Officer."`
					accept
				`	"Sorry, but I'm not traveling in that direction."`
					decline
	
	npc
		government "Pirate"
		personality staying harvests plunders
		system destination
		fleet "Large Northern Pirates" 3
	npc
		government "Republic"
		personality staying heroic
		system destination
		fleet "Large Republic"
		fleet "Small Republic" 2
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system "Mirzam"
		fleet "Large Northern Pirates"
		fleet "Small Northern Pirates" 3
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 7500
		dialog `As the last crate of supplies is loaded off of your ship, the Navy ships defending the system land. The local authorities thank you for helping, and you are paid <payment>.`



mission "Southern Blockade"
	minor
	name `Spaceport Defenses`
	description `<stopovers> are under attack. Drop off <cargo> on these planets and return to <destination> for payment. (<payment>)`
	source
		near "Pherkad" 2 4
		government "Free Worlds"
	stopover "Cornucopia"
	stopover "Solace"
	stopover "Winter"
	cargo "spaceport turrets" 75
	to offer
		random < 20
		"combat rating" > 150
		not "event: Thule becomes independent"
		"reputation: Free Worlds" >= 0
	
	on offer
		conversation
			`A captain in a Free Worlds uniform enters the spaceport and turns on a megaphone. "Attention! The Free Worlds are in need of volunteers able to carry <cargo> to <stopovers> for fortifying the spaceports nearest to the pirate system of Men. Free Worlds ships are currently preoccupied with fighting off a pirate incursion into those systems, and we are unable to spare enough ships for the job. Our hope is that these defenses will deter any future incursions. Payment will be <payment> for the first captain who accepts." The spaceport falls quiet as captains contemplate this offer.`
			choice
				`	(Volunteer.)`
				`	(Ignore.)`
					decline
			
			`	The Free Worlds captain thanks you for offering your help. Spaceport workers load the turrets onto your ship, and the captain tells you to return to <origin> once you have dropped off the turrets for payment.`
				accept
	
	npc
		government "Pirate"
		personality staying harvests plunders
		system "Kappa Centauri"
		fleet "Large Southern Pirates"
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system "Kappa Centauri"
		fleet "Large Southern Pirates"
	npc
		government "Pirate"
		personality staying harvests plunders
		system "Yed Prior"
		fleet "Large Southern Pirates"
		fleet "Small Southern Pirates" 2
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system "Yed Prior"
		fleet "Large Southern Pirates"
	npc
		government "Pirate"
		personality staying harvests plunders
		system "Pherkad"
		fleet "Small Southern Pirates" 3
	npc
		government "Free Worlds"
		personality staying heroic
		system "Kappa Centauri"
		fleet "Large Free Worlds"
	npc
		government "Free Worlds"
		personality staying heroic
		system "Yed Prior"
		fleet "Large Free Worlds"
	npc
		government "Free Worlds"
		personality staying heroic
		system "Pherkad"
		fleet "Large Free Worlds"
	on stopover
		dialog `The last of the defenses are quickly unloaded from your ship, put into place, and activated. A pirate ship attacking the system attempts to follow you down to the surface, but the fire coming from the newly installed spaceport turrets forces the pirate to turn away and flee for orbit. Time to return to <destination>.`
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 5000
		log `Installed spaceport defense turrets on three frontier worlds. The Free Worlds hopes that this will reduce the piracy in the region.`
		dialog `The Free Worlds captain thanks you for helping to fortify the frontier worlds, and pays you <payment>.`



mission "Core Blockade"
	minor
	name `Bad Harvest`
	description `The pirate world of <destination> is experiencing a famine. Warlords of the planet have threatened the Syndicate into giving them food. Deliver <cargo> to the world for <payment>.`
	source
		near "Almach" 2 4
	destination "Deadman's Cove"
	clearance
	cargo "food" 287
	to offer
		random < 20
		"combat rating" > 400
	
	on offer
		conversation
			`In the <origin> spaceport, you are approached by a Syndicate employee. By the looks of his uniform, he works for Syndicated Security. "Hello, Captain. You're a competent pilot, correct?" You nod your head. "Excellent. The Syndicate needs <cargo> transported to <destination>. The pirate world has seen a particularly bad harvest this past season, so much of the population is without sufficient food. Pirate warlords have threatened to begin raiding our freighters and frontier worlds if we don't provide them with food. It's cheaper to do what they want, so we've agreed to the deal, but we don't want to risk any of our own ships being destroyed. The Syndicate will pay you <payment> should you accept and complete this job."`
			choice
				`	"Alright, I'll get my ship ready."`
					accept
				`	"Sorry, but I have better things to be doing."`
					decline
	
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system destination
		fleet "Large Core Pirates" 2
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system "Schedar"
		fleet "Large Core Pirates"
		fleet "Small Core Pirates" 3
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 10000
		dialog `Multiple bands of pirates, each run by a different warlord, are waiting in the spaceport when you land. They take the food from your cargo hold like animals, leaving quite the mess behind. When you return to your ship, you find that the Syndicate has deposited <payment> into your account.`



mission "Pirate Blockade"
	minor
	name `Escape to Freedom`
	description `Bring <bunks> escaped slaves to freedom on <destination>, far away from their pirate oppressor. The woman on <origin> promised that a person on <planet> would give you <payment>.`
	source "Buccaneer Bay"
	destination "Hippocrates"
	passengers 19
	to offer
		"combat rating" > 500
	
	on offer
		conversation
			`It is dusk at the <origin> spaceport, and the setting sun casts long shadows across the spaceport deck. You take notice of a slim cloaked figure walking only a few meters behind you who seems to be keeping pace.`
			choice
				`	(Confront them.)`
					goto confront
				`	(Stop walking and see if they stop as well.)`
			
			`	You stop by the entrance to a store that claims to have "the best Polecats!" and lean against the building, trying not to draw attention to yourself. The figure keeps walking at the same pace, and as they pass you, a soft voice says, "Follow me," from under the cloak. The figure bolts off into a dark alleyway next to the building.`
				goto choice
			
			label confront
			`	You turn around and stare right at the figure, who stops within a foot of you. The shadows cast by the sun make it impossible for you to make out their face under the cloak. "Follow me," a soft voice says from under the cloak, before the figure bolts off into a dark alleyway next to the building.`
			
			label choice
			choice
				`	(Follow the figure.)`
				`	(Return to my ship.)`
					decline
			
			`	You step into the alleyway and find the figure standing under a lamp. The figure removes their cloak, revealing the face of a woman with short dark hair and a distinct, jagged scar across her right cheek. She begins whispering to you. "You're not from this world. I can tell. You're too clean and unscarred. Could you help me?"`
			choice
				`	"What do you want?"`
					goto need
				`	"Why would I help a pirate?"`
			
			`	The woman chuckles. "Not everyone who lives on a pirate world is a pirate, you know. Maybe you need to learn how not to stereotype. Regardless..." She trails off.`
			
			label need
			`	"It isn't what I want, it's what I need," she whispers, putting heavy emphasis on the word "need."`
			`	"You undoubtedly know about the horrendous slave trade that still exists on pirate worlds today. A slave trade that the Republic doesn't care to abolish, leaving innocent people to waste away like rats in a cage, working for their lives. As if the politicians of the Republic aren't vermin themselves..." Her face twists into a hate-filled scorn as she speaks of the Republic. It then returns to normal as she continues. "I'm part of a group of people who have decided to take matters into our own hands. We're mostly people who grew up on pirate worlds, but some of us were born elsewhere.`
			`	"I assassinated a pirate warlord a couple of days ago, and I have been sheltering his slaves ever since. What I need from you is to transport the <bunks> people in my care to <destination>. Another member of my group should be there to pay you <payment> and take the people somewhere far away from here." She cocks her head to the right. "Will you fight for justice and transport these people, Captain?" The look in her eyes suggests that she won't take no for an answer.`
			choice
				`	"Anything for the freedom of the innocent."`
				`	"Sorry, but I'm not going to risk my life for your cause."`
					goto decline
			
			`	"Good choice, Captain. We'll wait till the sun has fully set, then I will bring the people to your ship. I'll be traveling in my own ship and launch ahead of you, which should hopefully distract the pirates looking for their warlord's assassin and give you enough room to escape. Wait for me after you land on <planet>."`
				accept
			
			label decline
			action
				set "denied freeing slaves"
			`	"Poor choice, Captain." The woman pulls a knife from under her cloak and tilts it to blind you with the glare of the lamp above her. You stumble backward in anticipation of an attack, but the woman does not move. "I'll remember this, Captain," she hisses at you. The woman puts her cloak back up and sprints down the alleyway into darkness.`
				decline
	
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system destination
		fleet "Large Core Pirates"
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		system "Persian"
		fleet "Small Core Pirates" 3
	npc
		government "Pirate"
		personality nemesis staying harvests plunders
		fleet "Large Core Pirates"
	
	on visit
		dialog `You land on <planet> and begin looking around for the man you are supposed to meet, but then you realize that not all of the escaped slaves are here. Better depart and wait for your escorts holding the rest to arrive.`
	on complete
		payment
		payment 1000
		log `Helped members of a group fighting to end slavery on pirate worlds. Safely rescued 19 slaves from Buccaneer Bay and left them with a man who said that they will be brought somewhere safer, but the woman of the group seems to have not made it out.`
		conversation
			`Just as was promised, a man approaches you in the spaceport and tells you that he is part of the same group as the woman. Interestingly, the man has a similar scar as the woman on his left cheek. "I'll make sure these people find a safe home somewhere far away from here," he says to you. After greeting each of your former passengers, he thanks you and pays you <payment>.`
			`	You and the man, who does not give his name to you in order to "keep us both safe," wait for the woman to arrive in her own ship. Hours pass, but there is no sign of her. The man tries to contact her, but he is unable to reach her. "You can leave now," the man says to you. "I don't think she'll be coming."`



mission "Capture Smuggler"
	name "Capture rogue smuggler"
	minor
	description `A smuggler absconded with his illegal cargo near <system>. The unknown person he stole it from wants it back. Recover the cargo from the <npc> and return both it and the smuggler to <origin> for <payment>.`
	to offer
		random < 15
		"combat rating" > 2000
		"reputation: Pirate" > 10
	passengers 1
	source
		government "Pirate"
	on offer
		require "Brig"
		conversation
			`As you step into a dive bar for a quick drink, the largest man you've ever seen stands up and blocks your path. He's well over two meters tall, and his muscles seem to ripple with barely restrained violence when he moves. "<first> <last>," he says in a thick accent. "My employer hears you do certain jobs, take money, do not ask questions. He hears you are reliable. A man, a smuggler, he steals cargo from my employer. My employer very much wants cargo returned, and this man as well."`
			choice
				`	"I'm sorry, sir, but I'm not taking new jobs today. Please give your employer my most gracious thanks for this kind offer."`
				`	"Of course. I won't say a word."`
					goto accept
				`	"Get out of my way. I don't take jobs from any schlub who bothers me when I need a drink."`
					goto mistake

			`	The man looks down at you with no change in expression. "My employer, he will not be happy. I will tell him, '<first> <last> is not so reliable.' I hope next time, you are reliable." As the man speaks, you notice that his teeth are filed to vicious points. Every patron in the bar stares at you in shock as you sit down for a badly-needed drink.`
				decline

			label accept
			`	The man looks down at you with no change in expression. "This is good. To be reliable, it is a great thing on <origin>." As the man speaks, you notice that his teeth are filed to vicious points. He holds out a round, flat object about the size of your palm. It has a recessed button in the center of one side. "This is gift for this smuggler. Press button, it becomes surprise. Make sure surprise is not on you." He hands you the object and a data chip containing details of the job. As the man leaves, you see every patron in the bar staring warily at his back.`
				accept

			label mistake
			`	The man looks down at you with no change in expression. "This is great shame. I will tell my employer, '<first> <last> was not so reliable. I had to make example.'" The man grabs your neck with one monstrous hand. The last thing you see as your vision fades to black is a mouth full of pointed teeth.`
				die
	npc board
		conversation
			`The smuggler and his crew are ready and waiting when you board. You pull out the "gift" and press the button, then quickly toss it down the hallway. For a moment, you meet the smuggler's eyes. They widen with terror when he sees the "gift." You duck back into cover. A few seconds later, you hear a strangely muted detonation, followed by silence. After a minute, you hazard another peek out of cover. The smuggler and all his men are unconscious on the ground. One crewman has blood dripping from his nose and ears. You tie them all up and stow the smuggler in a locked cabin on your ship.`
			`	Once they're secured, you sweep the ship. Ultimately you find the stolen cargo in the captain's cabin, hidden behind a false panel. The cargo is a nondescript storage container, but upon closer inspection you see that it's code-locked and covered with Interference Plating.`
				launch
		government "Merchant"
		personality staying uninterested timid target marked
		system
			distance 2 3
		fleet
			names "civilian"
			variant
				"Modified Argosy (Smuggler)"
	on fail
		dialog `You have failed to capture the smuggler and recover the stolen cargo. This will probably not be good for your reputation.`
		"reputation: Pirate" <?= -10
	on visit
		dialog `You land on <origin>, but you don't have the smuggler and the cargo he stole. You should probably be careful not to run into your contact until you do.`
	on complete
		payment 150000
		conversation
			`The huge man drags the unconscious smuggler out of the cargo container with one hand and carries the cargo box with the other. He stops in front of you. "<first> <last>," he says. "My employer, he will be very happy. Your payment, you will receive soon. Is it not good, to be reliable?" The man leaves your ship, letting the smuggler's legs scrape along the ground as he walks. A moment later, you receive <payment> from an anonymous account.`



mission "Inheritance Redirection"
	description "Travel to <destination> to act as heir for the late warlord Limping Pappa."
	minor
	source
		attributes "frontier"
	destination
		distance 7 9
		government "Republic" "Free Worlds" "Syndicate"
	to offer
		credits >= 400000
	on accept
		payment -200000
	on offer
		conversation
			`You are walking near the spaceport and suddenly a computer terminal starts blinking and beeping when you pass it.`
			choice
				`	(Check it out.)`
				`	(Ignore it.)`
					decline
			`When you approach, you are greeted by a voice from the terminal: "Dear Sir or Madam, please respond!"`
			choice
				`	"Hello!"`
				`	(Ignore it and walk away.)`
					decline
			`	"My name is Mr. Smith and I'm contacting you with a highly confidential and urgent proposal. I am, or more accurately was, the financial manager of the recently deceased warlord Limping Pappa. I am looking for a highly trustworthy individual who can help me relocate Mr. Pappa's fortune of 300 million credits."`
			choice
				`	"How did Mr. Pappa acquire his fortune exactly?"`
				`	"What are you proposing?"`
					goto proposal
				`	"This sounds like a credits-stealing scam, I will not fall for this!"`
					decline
			`	"Oh, uh, Mr. Pappa was specialized into tricking rich victims to transfer credits to him.`
			label proposal
			`	"I obviously cannot make myself an heir to Mr. Pappa. So what I propose is to present you as an heir and have the inheritance transferred to you.`
			`	"When you receive the inheritance on <destination>, then you send half of it back to me."`
			choice
				`	"Okay, let's do this."`
				`	"Sounds too good to be true. What's the catch?"`
				`	"Sorry, this sounds too fishy for me."`
					decline
			`	Mr. Smith responds: "There is one small problem with the inheritance tax, it needs to be paid upfront. Can you pay 200,000 credits so that I can get the process going?"`
			choice
				`	"Sure, no problem."`
					goto pay
				`	"Are you trying to trick me?"`
				`	"Sounds too risky, I don't want to pay anything upfront."`
					goto no
			`	"Of course I'm not trying to trick you! Mr. Pappa's victims were all persons that had more credits than common sense. But you look a lot smarter than any of Mr. Pappa's victims.`
			`	"Think of the huge amount of credits you will receive just for acting as heir! Can I count on you to pay the tax and make both of us very wealthy?"`
			choice
				`	"Sure, no problem."`
					goto pay
				`	"Sounds too risky, I don't want to pay anything upfront."`
					goto no
			label pay
			`	The terminal suddenly goes black after you transfer 200,000 credits to the account given by Mr. Smith.`
			`	You wonder if you did the right thing.`
				accept
			label no
			`	The terminal suddenly goes black. Mr. Smith is apparently no longer interested in doing business with you.`
				decline
	on complete
		dialog "There is no inheritance for Mr. Pappa waiting for you at the bank, but there are many other victims that paid some credits while expecting to earn a larger amount of credits in return. Some make a big fuss about it, until the alerted authorities start fining them for attempted inheritance fraud. You leave the bank in silence."
		log "Minor People" "Mr. Smith" `A mysterious individual who asked for 200,000 credits to process a rich inheritance from the deceased warlord Limping Pappa, but was then proven to be a scam.`
	on decline
		log "Minor People" "Mr. Smith" `A mysterious individual who asked for 200,000 credits to process a rich inheritance from the deceased warlord Limping Pappa. You presume he was a scammer and had no part in it.`



mission "Hauler VI cargo prototype 1"
	name "Escort Hauler prototype to formal dinner"
	description "Escort the <npc> to <destination> to deliver sushi for a formal dinner."
	minor
	source
		planet "Deep"
	destination "Skymoot"
	to offer
		"armament deterrence" > 0
	npc accompany save
		government "Merchant"
		personality escort timid
		ship "Hauler III" "SB-Labs Testament"
	on offer
		conversation
			`A lady in a formal business suit walks gracefully over to you. "Captain <last>, Captain <last>! It is so nice to meet you here!"`
			choice
				`	"Hello, did we meet before? How do you know my name?"`
				`	"Hello, nice to meet you too."`
					goto "hello too"
				`	"Sorry, I don't have time to talk. I'm really busy."`
					defer
			`	She smiles and replies, "Well, I actually don't know you, but I just read your name on one of the cargo manifests. And my experience is that this greeting works best if you need something from a spaceship captain."`
			label "hello too"
			`	She says, "My name is Veronica Oxygenpocket, and I'm the lead for a team that's designing the new Hauler VI transport ship series at Southbound Shipyards."`
			choice
				`	"'Oxygenpocket' is an uncommon name."`
				`	"And what help do you need from me?"`
					goto "help request"
			`	Veronica responds, "Well, it might sound uncommon to people from a planet with a breathable atmosphere, but it is actually similar to Vanderberg, which means 'from the mountain,' or Langley, which means 'woodland.'`
			`	"Oxygenpockets were as much a feature on my home-planet as mountains and woodlands are on more habitable planets."`
			label "help request"
			`	Veronica pauses for a moment and then continues, "We're testing the VI's cargo refrigeration system using the Testament, a modified Hauler III. This system is one of our biggest achievements. To show how well it works, we plan to throw a formal dinner on <destination> with fresh sushi transported from here. I'm sure everyone at the dinner will be amazed by how well the food has been preserved despite the travel time. I'd like you to escort the ship and its cargo to <planet>."`
			choice
				`	"Isn't it a bit risky to transport food using a refrigeration system that hasn't been tested yet?"`
					goto refrigerate
				`	"Am I also invited for the dinner?"`
					goto invited
				`	"Why do you need me to escort the ship?"`
					goto internal
				`	"Shouldn't you be making the Hauler IV first?"`
				`	"Sure, I'll help you."`
					accept
			`	Veronica softly chuckles. "That would be the obvious choice, wouldn't it be? But this isn't just a case of slapping another cargo pod between the cockpit and engines. We've modified the design to have the optimal amount of cargo pods without compromising the integrity of the vessel, or making it difficult to build in our existing shipyards. And besides, our marketing department has found that captains willing to buy a Hauler IV are just as willing to buy larger Haulers."`
			choice
				`	"Isn't it a bit risky to transport food using a refrigeration system that hasn't been tested yet?"`
				`	"Am I also invited for the dinner?"`
					goto invited
				`	"Why do you need me to escort the ship?"`
					goto internal
			label "refrigerate"
			`	"Risky, why? I don't see what can go wrong. The system is quite well designed. I'm so proud of my team."`
			choice
				`	"Am I also invited for the dinner?"`
				`	"Why do you need me to escort the ship?"`
					goto internal
			label "invited"
			`	"I'm sorry, but you are not invited. This dinner is only for Southbound Shipyards top-level management and representatives of the <planet> government.`
			label "internal"
			`	"Normally we'd look internally to satisfy any escort needs, that's true. But we suspect there is a mole in our organization spying for Syndicated Shipyards. Going externally is safer in this case, and you came recommended when we searched through the list of captains available on short notice. You will be paid well for your time. Will you help us?"`
			choice
				`	"Sure, I'll help you."`
					accept
				`	"Sorry, I don't have time to help you."`
					decline
	on visit
		dialog `You land on <planet>, but the Testament hasn't caught up with you yet. Better take off and wait for it to appear in this system.`
	on complete
		dialog
			`You wait for the Testament to land, but it remains in orbit. There is no response to your hails. Maybe you should take off and investigate.`

mission "Hauler VI cargo prototype 2"
	name "Escort Hauler prototype to <planet>"
	description "Escort the <npc> to <destination> to deliver cooked fish dishes to a streetfood festival."
	source "Skymoot"
	destination "Zug"
	landing
	to offer
		has "Hauler VI cargo prototype 1: done"
	npc accompany save
		government "Merchant"
		personality escort timid
		ship "Hauler III" "SB-Labs Testament"
	on enter
		dialog
			`You take off and try to contact Veronica, but you receive an angry message: "Why were you trying to contact me? Does everyone need to know that we're here?"`
			`	She adds, "The cooling failed and the sushi nearly cooked. Let's go to the Southbound Shipyards on <destination> instead, then we can save face by claiming that we were in time for the dinner, but on the wrong planet due to some miscommunication. We might even be able to hide all evidence of the overheating by giving away the sushi as fish dishes on a streetfood festival."`
	on visit
		dialog `You land on <planet>, but the Testament didn't catch up with you yet.`
	on complete
		dialog
			`This time the Testament appears to be landing right behind you, but the ship flies away at full thrust just before touching the landing pad. You receive another message: "The Sushi completely burned. We cannot be seen near the festival or near the shipyard with this burned sushi! Our new destination is the waste processing plant at Longjump."`

mission "Hauler VI cargo prototype 3"
	name "Escort Hauler prototype to waste plant"
	description "Escort the <npc> to <destination> to deliver charred food waste to a waste-processing plant."
	destination "Longjump"
	landing
	to offer
		has "Hauler VI cargo prototype 2: done"
	npc accompany save
		government "Merchant"
		personality escort timid
		ship "Hauler III" "SB-Labs Testament"
	on visit
		dialog `You land on <planet>, but the Testament didn't catch up with you yet.`
	on complete
		payment 140000
		dialog
			`The Testament enters the planet's atmosphere at high speed and lands somewhat uncontrolled near a waste processing plant. The cargo hold is glowing red hot and some areas in the cargo hold appear to be on fire.`
			`	Veronica disembarks, walks over to you, and apologizes for the difficult trip. She explains that the cooling systems failed, causing the sushi calamity you experienced during the multiple legs of your journey.`
			`	You are paid <payment> and she asks you not to talk about this escort job to anybody. You leave the docks quickly in order to escape the horrible smell of overheated fish that is coming from Veronica and her ship.`



mission "Antibiotics To South"
	name "Antibiotics shipment to <planet>"
	description `Deliver <cargo> to <destination>. Payment is <payment>. Expect attacks from a pirate ship known as the "Australis."`
	minor
	source
		attributes "medical"
		not attributes "south" "rim"
		near "Sol" 100
	destination
		attributes "south"
	to offer
		"combat rating" > 10
		"armament deterrence" > 2
		random < 5
	cargo "antibiotics" 25 2 .05
	
	on offer
		conversation
			`As you wander around the spaceport, you spot a well-dressed man who seems to be eyeing your ship. When you approach him, he turns to you and asks, "Is this your ship? I'm looking for someone in charge of a heavily armed fleet."`
			choice
				`	"It is. Why?"`
				`	"Sorry, I think you're mistaken."`
					decline
			`	The man begins to explain himself. "I'm arranging a shipment from a pharmaceutical plant here on <origin> to <destination>. Specifically, <cargo>. I'm sure you're aware of the fact that they're in very high demand in the south, so we have a trade deal with that planet. Unfortunately, <commodity> are in even higher demand in pirate territory, so the last two merchants I've sent down there have been attacked by pirate ships. My company won't give the budget for an escort, so anyone I send down there has to be alone. Fortunately, I do have the budget for a high-risk contract, so if you can take one of these shipments to <destination>, I can arrange a payment of <payment>. Does this sound fair so far?"`
			choice
				`	"Sure, but do you know anything about these pirates?"`
				`	"No thanks, that sounds too risky for me."`
					decline
			`	He seems to have anticipated this question, and quickly responds by saying "Oh, it's mostly just opportunistic raiders, much like the ones you've probably already seen a lot of down there. Pretty sure a ship like this one will make those guys hesitant enough. The problem is a modified medium warship called the <npc>. It's faster than a Bounder and persistent beyond any reasonable measure. Which is, of course, why I'm talking to you. There is no way you're going to avoid a fight with it. However, I think your ship is a match for it. So, is this acceptable?"`
			choice
				`	"Of course."`
				`	"No thanks, that sounds like too much of a risk."`
					decline
			`	"Thank you very much, Captain," he says. "I'll take care of everything else from here."`
				accept
	npc
		government "Bounty Hunter"
		personality nemesis heroic disables harvests plunders
			confusion 20
		system
			distance 2 3
		ship "Marauder Manta (Engines)" "Australis"
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment
		payment 20000
		dialog phrase "generic cargo delivery payment"



mission "Pirate Duel"
	name "Fight at Umbral"
	description `Head as quickly as you can to the Umbral system, where you will duel with a small militia vessel named the Esca. After fighting, go to <destination> to follow up.`
	minor
	deadline 5 1
	source
		near "Tarazed" 1 5
		government "Republic" "Free Worlds"
	waypoint "Umbral"
	destination "Wayfarer"
	
	to offer
		"combat rating" > 20
		"combat rating" < 400
		random < 35
		not "ships: Medium Warship"
		not "ships: Heavy Warship"
		not "ships: Heavy Freighter"
		not "ships: Space Liner"
		not "ships: Utility"
		not "ships: Superheavy"
		"ships: Light Warship" + "ships: Light Freighter" + "ships: Transport" + "ships: Interceptor" + "ships: Fighter" + "ships: Drone" == 1
	
	on offer
		conversation
			`While you are walking around the spaceport, you accidentally bump into a sturdily-built man. "Oh, I'm sorry," he responds in a gruff voice. When he takes a closer look at you, his expression changes to shock. "Oh! You're Captain <last>!"`
			choice
				`	"How did you know my name?"`
					goto offer
				`	"I don't know who you're talking about."`
			`	The man's expression changes to one of slight disappointment. "Oh. I see." He walks away without another word.`
				decline
			label offer
			`	"I happen to take an interest in young pioneering privateers, and your performance, even in a small vessel like the <ship>, has impressed me greatly. I'll tell you more if you let me take you somewhere."`
			choice
				`	"Sure, I'll follow."`
					goto follow
				`	"Where are you taking me?"`
			`	The man chuckles nervously. "Just to somewhere more private. Don't worry, I won't bite."`
			choice
				`	"Fine, I'll go."`
				`	"I still don't buy this. I'm out."`
					decline
			label follow
			`	You follow the man into a series of winding alleyways, keeping your eyes alert for any danger. After a while, the man stops. "I suppose I can tell you more about myself now. I... am the leader of the local militia, and I believe that, considering your proficiency in piloting smaller craft, you would be a great candidate to join our team. However, there is a test you must pass. I will use one of our smaller ships in our fleet, the Esca, to challenge you to a duel in the system of Umbral. If you manage to disable me, go to our base in Wayfarer, and I'll let you join."`
			choice
				`	"What sort of vessel is the Esca?"`
					goto vessel
				`	"Why did you need to bring me to here? Couldn't you have made this offer in the spaceport?"`
			`	The man hesitates for a moment. "Well, being in the open when admitting that you're the leader of the ragtag that hunts down pirates in a potentially pirate-infested spaceport isn't a good idea. You can't ever be too sure about who's listening.`
				goto end
			label vessel
			`	The man hesitates for a moment. "Oh, just some low-end Southbound Shipyards light warship. Nothing to worry about for a captain like you.`
			label end
			`	"Well, I better be going now. Meet me at Umbral as fast as you can if you want to take up my challenge." The man walks away, leaving you to your own devices.`
			choice
				`	(Ready my ship for the battle with the Esca.)`
					accept
				`	(Ignore the invitation.)`
					decline
	
	on accept
		"reputation: Independent (Killable)" = 10
	
	on enter
		dialog `When you take off, you run a quick scan on all other ships that are taking off. You see no sign of the Esca. Maybe it's already waiting for you at Umbral.`
	on enter "Umbral"
		"reputation: Independent (Killable)" = -1000
		conversation
			`When you enter Umbral, you continue to see no sign of the Esca. Suddenly, an alarm rings out as your sensors detect that a pirate Vanguard has entered the system alongside you. Before you can respond, your ship intercepts a hail, and it opens communication.`
			`	The voice of the alleged captain of the Esca shouts out towards you. "Ho ho ho! Did you really think that I was the leader of the militia? Well, considering that you're here, I suppose you did. And now you'll pay for your mistake! Don't bother trying to call for help either, the militia don't patrol this system!"`
			`	The Vanguard powers up its weapons.`
	
	npc kill
		government "Independent (Killable)"
		personality heroic vindictive unconstrained launching
			confusion 20
		ship "Vanguard (Plasma Slow)" "Anglerfish"
		dialog `The Anglerfish and the "captain of the Esca" have been destroyed. You consider going back to Wayfarer to see if you can grab some sort of reward for your effort.`
	
	on complete
		"reputation: Independent (Killable)" = 10
		payment 250000
		conversation
			`When you land on Wayfarer, you look up bounties and wanted pirate documents, searching for any mention of the Anglerfish and the Esca. Eventually, you find a bounty for the destruction of the Anglerfish.`
			choice
				`	(Take the bounty money.)`
					goto end
				`	(Read more about the bounty.)`
			`	You decide to read more of the bounty documents. It appears that the pirate that you killed was Enrico Snake, a pirate that mainly dealt in cargo smuggling. However, he also had a curious tick of hunting aspiring privateers by luring them to Umbral, where he easily took them out with his superior ship.`
			label end
			`	You head to the local authorities, and show them your combat logs of your fight against the Anglerfish. They pay you <payment> for your effort.`

ship "Vanguard" "Vanguard (Plasma Slow)"
	outfits
		"Plasma Cannon" 7
		"Heavy Anti-Missile Turret"
		"Fusion Reactor"
		Supercapacitor
		"D14-RN Shield Generator"
		"Fuel Pod" 5
		"Small Radar Jammer" 2
		"Interference Plating" 4
		"Cargo Expansion" 3
		"Laser Rifle" 11
		"X3700 Ion Thruster"
		"X3200 Ion Steering"
		"Scram Drive"



mission "Earth Retirement"
	name "Retired Family to Earth"
	description "Transport two seniors to <destination>, where they plan to retire. They can only promise you <payment>."
	minor
	source
		attributes paradise
	destination "Earth"
	to offer
		random < 15
	passengers 2
	
	on offer
		conversation
			`As you wander through the spaceport, you see an elderly man and woman sitting on a bench, talking about something that seems to be causing them some amount of stress.`
			choice
				`	(Ask them what the problem is.)`
				`	(Ignore them.)`
					decline
			`	You inquire as to what's troubling them, and the woman begins telling you her life's story. "We were yard workers here on <origin> for nearly fifty years, but we're both starting to get too old for our jobs. So, we've made the hard decision to retire. We've already chosen a location on the best place we could afford, which... well, happened to be on Earth, so Charles and I are looking for someone to transport us. Oh, where are my manners? I'm Donna. Pleased to meet you."`
			`	Donna was clearly looking for someone besides her husband to talk to, but Charles begins to frown. "I suppose you could put it like that."`
			`	"Is that wrong?" Donna replies anxiously, bracing for the response.`
			`	The man's look of resignation starts to turn to one of anger. "Of course it's wrong. We've spent our whole lives working for these spoiled brats, and what do we get in return? We get dumped on Earth like we're dead weight!"`
			`	"I know you're upset about this," interrupts Donna, "but just getting angry isn't going to change anything!" Charles remains silent for a long time, and then mutters a reluctant apology.`
			`	Donna talks to you again. "I'm sorry about that. As you can tell, we're under a lot of stress right now. I can tell that you're a star captain. Can you help take us to Earth? We don't have a lot of money, but we'll be glad to pay <payment>."`
			choice
				`	"I can handle two passengers."`
				`	"I'm sorry, but I'm not headed to Earth right now."`
					decline
			`	You show Charles and Donna to their bunks, and they both thank you in advance.`
				accept
	
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		conversation
			`Once you land on Earth, Donna and Charles pick up their belongings and start to leave your ship. Before he leaves, Charles stops and takes out a large clump of credit chips. "Here you go," he mutters. "I hope your life goes better than ours has."`
			choice
				`	"Thank you. I hope you have the best of luck on Earth."`
					goto payment
				`	"You can keep those. You sound like you need them more than I do."`
					goto reject
			
			label payment
			action
				payment 2000 80
			`	As you count up the large clump of credits you were handed (the sum comes out to the expected <payment>), they slowly make their way to the train station. Presumably, their new apartment is far from here.`
				accept
			label reject
			`	Charles looks surprised for a moment, and then, for the first time you've seen, he smiles. "Thank you, Captain <last>. I wish there were more people like you in the Paradise Worlds."`
			`	You wish the couple the best of luck on Earth, and they slowly make their way to the train station. Presumably, their new apartment is far from here.`



mission "Spacediving professionals"
	job
	repeat
	name "Spacediving at <planet>"
	description "Head to <destination> with <bunks> professionally equipped skydivers and drop them from the edge of space. They've agreed to pay <payment> when they land."
	passengers 5 10
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	destination
		distance 1 7
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not attributes "station" "research" "moon"
	to offer
		random < 14
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 120000
		dialog "As you descend through the upper atmosphere, the skydivers jump from your ship, spectacularly diving until they open their parachutes and land safely near the spaceport. You collect your payment of <payment>."



mission "Spacediving professionals accident"
	job
	repeat
	name "Spacediving at <planet>"
	description "Head to <destination> with <bunks> professionally equipped skydivers and drop them from the edge of space. They've agreed to pay <payment> when they land."
	"apparent payment" 120000
	passengers 5 10
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	destination
		distance 1 7
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not attributes "station" "research" "moon"
	to offer
		"Spacediving professionals: done" > 7
		random < 2
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		dialog "As you descend through the upper atmosphere, the skydivers jump from your ship, spectacularly diving until they try to open their parachutes. Some of the parachutes open only partially and part of the team suffers an uncontrolled hard landing. Medical teams respond quickly, but the skydivers are too preoccupied with their injured teammates to pay you the credits they owe you."



mission "Spacediving professionals disaster"
	job
	repeat
	name "Spacediving at <planet>"
	description "Head to <destination> with <bunks> professionally equipped skydivers and drop them from the edge of space. They've agreed to pay <payment> when they land."
	"apparent payment" 120000
	passengers 5 10
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	destination
		distance 1 7
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not attributes "station" "research" "moon"
	to offer
		has "Spacediving professionals accident: done"
		random < 1
		credits >= 5000000
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment -200000
		dialog "As you descend through the upper atmosphere, the skydivers jump from your ship. Some minutes into the jump disaster strikes; the skydivers start moving in an uncontrolled manner. It's unclear if the spacesuits or the oxygen supplies were at fault, but it looks unlikely that any of the skydivers makes it safely to the ground. Authorities investigate the incident and although they don't find serious wrongdoings on your part, they still fine you <payment> for enabling such a dangerous and deadly act."



mission "Spacediving amateurs"
	job
	repeat
	name "Spacediving at <planet>"
	description "Head to <destination> with <bunks> poorly equipped skydivers and drop them from the edge of space. They've agreed to pay <payment> when they land."
	"apparent payment" 120000
	passengers 5 10
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	destination
		distance 1 7
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not attributes "station" "research" "moon"
	to offer
		"Spacediving professionals: done" > 3
		random < 5
	on visit
		dialog phrase "generic passenger on visit"
	on complete
		payment 30000
		dialog "As you descend through the upper atmosphere, you inform your skydivers that it's time to jump. However, after being able to see the distances and atmospheric conditions involved, all of them are far less keen on the idea than when you first picked them up. You bring them down to the landing pad, and they pay you a meager <payment> before hopping off."


mission "Human to Hai Space - No Contact"
	minor
	source
		government "Republic" "Syndicate" "Free Worlds"
		attributes "tourism" "urban"
	to offer
		random < 2
		not "First Contact: Hai: offered"
		not "event: hai-human resolution announced"
	on offer
		conversation
			`	A young man carrying luggage approaches you. "You look like a knowledgeable captain," he says. "In all your travels, have you ever heard tell of any... intelligent rodents?"`
			choice
				`	"What are you talking about?"`
					goto confused
				`	"What, like in a zoo?"`
					goto confused
				`	"Are you high?"`
			`	"No, I want to go to the high-" He stops once he realizes you have no idea what he's talking about. "Oh, never mind then," he says, with a note of disappointment in his voice. As he leaves, you can't help feeling like you were missing some context.`
				decline
			label confused
			`	"Oh, never mind then," he says, with a note of disappointment in his voice. As he leaves, you can't help feeling like you were missing some context.`
				decline


mission "Human to Hai Space"
	minor
	description "Bring a human passenger to <destination> in Hai space."
	source
		government "Republic" "Syndicate" "Free Worlds"
		attributes "tourism" "urban"
	destination "Greenwater"
	to offer
		random < 10
		or
			has "First Contact: Hai: offered"
			has "event: hai-human resolution announced"
		not "Human to Hai Space - No Contact: offered"
	on offer
		conversation
			`	A young man carrying luggage approaches you. "You look like a knowledgeable captain," he says. "In all your travels, have you ever heard tell of any... intelligent rodents?"`
			choice
				`	"You mean the Hai? You'll have to go up north for that."`
					goto hai
				`	"Ah, I think I know of some large squirrels to the north of here."`
					goto hai
				`	"What are you talking about?"`
					to display
						not "event: hai-human resolution announced"
			`	"Oh, never mind then," he says, with a note of disappointment in his voice. You feel good knowing that you are helping to keep the Hai's existence a secret in human space. Better safe than sorry.`
				decline
			
			label hai
			`	"If that's the case, could you bring me to <destination>? I'll give you <payment>."`
			choice
				`	"Alright, I'll take you there."`
					accept
				`	"Sorry, I'm too busy right now."`
					decline
				`	"Why would you want to go all the way out to <planet>?"`
			`	"I have family there," he says. "I came out here to do some traveling and see a bit of human space, but now I have to get back home. You see, I was born on <planet>, and this is my first time out of the wormhole."`
			choice
				`	"Really? How did you like human space?"`
					goto travel
				`	"You've never been to human space before?"`
			`	"Nope, first time! I've never been so far from home before. Now that I think about it, I probably should've arranged transport back to Hai space beforehand. You wouldn't believe how hard it is to find a captain here that knows about the Hai. I had to ask about six others until I found you. They all thought I was crazy, talking about meeting giant squirrels." He laughs and shakes his head. "So anyways, would you be willing to take me to <destination>?"`
				goto decision
			
			label travel
			`	"It was quite the trip! It's a bit odd to see only humans around, and I had to be careful to not mention where I was from. But it was definitely worth it! I got to see Earth, Skymoot, Chiron, and so many other beautiful planets. Seeing human culture with my own eyes was an eye-opening experience, although some of the places there were less... clean than I expected. I was almost robbed on Earth; I'm not used to pickpockets back home. Perhaps human space isn't as safe as Hai space, but I still don't regret coming here. It's about time for me to go back, though."`
			
			label decision
			choice
				`	"Alright, I'll take you there."`
					accept
				`	"Sorry, I'm too busy right now."`
					decline
	on complete
		payment 9000
		conversation
			`During the trip, you learn that your passenger is named Benjamin. He gets off your ship, thanks you, and gives you your payment of <payment>. Benjamin then walks over to greet a group of Hai, who embrace him and start talking in a mix of the human and Hai languages.`
			choice
				`	(Leave.)`
					decline
				`	"That's your family?"`
			`	The man looks at you. "I'm adopted," he says. One of the Hai notices your confusion, and chitters. "Ah, you have not seen a human-Hai family, have you? Perhaps it is strange, but we are happy together nonetheless. Thank you for transporting our son safely."`
			choice
				`	"I didn't mean to be rude, I just didn't know that Hai adopted humans here."`
				`	"No problem, I hope you enjoyed the trip."`
			`	After thanking you once again, they walk off. As they leave, you overhear Benjamin talk to his family about his trip. "They had so many kinds of food there, it was delicious! Although I did get homesick for pickled acorns..."`



mission "Mafia Extortion"
	minor
	source
		government "Pirate"
	on accept
		payment -200000
		fail
	to offer
		random < 2
		credits >= 2000000
	on offer
		conversation
			`A man in a tailored suit, sunglasses, shiny shoes, and green hair approaches you. "Hey, that's a very nice ship you have there. Would be a shame if anything happened to it."`
			`	You notice that he is missing a finger on each hand.`
			choice
				`	"Thank you. My name is <first> <last>. To whom do I have the pleasure of speaking?`
					goto nameless
				`	"Yes, I'm very happy with my ship."`
					goto specifics
				`	"What should I be afraid of happening to my ship?"`
					goto specifics
				`	"You sound like one of those Mafia goons."`
					goto mafia
				`	"Are you trying to extort me?"`
					goto mafia
				`	"Yes, it helps me transport goods for some of the most dangerous people on this planet."`
					goto unnerved
				`	"I don't have time to talk."`
					goto funeral
			label nameless
			`	The man snorts. "Wow, telling everybody you meet your full name. That totally won't end up painting a huge target on your head if said name has a bounty on it. But I digress."`
			choice
				`	"What should I be afraid of happening to my ship?"`
					goto specifics
				`	"You sound like one of those mafia goons."`
					goto mafia
				`	"Are you trying to extort me?"`
					goto mafia
			label specifics
			`	The man responds, "Well, a fleet of unfriendly ships in this system might blow you to pieces when you take off. It's been known to happen from time to time."`
			choice
				`	"Ha, business as usual around here."`
					goto unconcerned
				`	"Are you trying to extort me?"`
					goto mafia
				`	"And you have a way to prevent this from happening?"`
					goto mafia
				`	"And you're the local goon who takes bribes to keep such ships docked?"`
					goto mafia
				`	"That would be unfortunate. I run jobs for some of the most dangerous people on this planet, and they wouldn't be happy if that happened."`
					goto unnerved
				`	"I really don't have time to talk to you."`
					goto funeral
			label unconcerned
			`	The man responds, "Maybe you want to improve that situation?`
				goto donation
			label mafia
			`	The man acts shocked by your remark. "No way! I'm just a simple man walking around the spaceport and helping people out. You would be wise to listen to locals with experience, especially in dangerous places like this."`
			label donation
			`	"If you care about safety, then I could make a donation to the System Safety Foundation on your behalf. 200,000 credits really goes a long way around here."`
			choice
				`	(Pay 200,000 credits.)`
					goto payup
				`	"How can I be sure the money is spent well?"`
					goto impatient
				`	"Sorry, I already made a donation to the 'Security Support Fund' earlier today, and I don't donate twice in one day."`
					goto impatient
				`	"I've already heard enough, I'm going to talk to the authorities."`
					goto nextsteps
				`	"And what dangers should I be afraid of?"`
					goto impatient
				`	"Listen, I see that you're missing a finger on each hand. You look like a goon, and not a very successful one."`
					goto unnerved
			label impatient
			`	The man sounds annoyed. "Listen, I don't have all day to talk! Are you going to pay or not?!"`
			choice
				`	(Pay 200,000 credits.)`
					goto payup
				`	"I don't trust you. You aren't getting any money from me."`
					goto funeral
				`	"I've heard enough, I'm going to talk to the authorities."`
					goto nextsteps
				`	"Listen, I see that you're missing a finger on each hand. You look like a goon, and not a very successful one."`
					goto unnerved
			label funeral
			`	The man responds "Your funeral, not mine," and turns away from you.`
				goto walksaway
			label nextsteps
			`	"Look, that's not a smart move. Most of them are in on it anyway."`
			label walksaway
			`	The man walks away. You consider what to do next.`
			choice
				`	(Shrug off the whole thing and take no further action.)`
					decline
				`	(Find the closest thing to a police force that this planet has.)`
					goto police
				`	(Go to a bar and ask for whoever is in charge.)`
					goto bar
			label police
			`	It's not long before you find the ruins of what used to be a police station... you think. The building has been thoroughly destroyed, hopefully not while anybody was inside.`
			choice
				`	(Go to a bar and ask for whoever is in charge.)`
					goto bar
				`	(Shrug off the whole thing and take no further action.)`
					decline
			label bar
			`	You walk towards the closest bar, but stumble into the green-haired man that you just had a conversation with.`
			`	He looks surprised and asks, "Were you going to rat me out to the local boss?"`
			choice
				`	"What an excellent idea! Yes, I'll just do that."`
				`	"What I'm going to do is none of your business."`
				`	"Don't worry, I'm just taking a walk."`
			label unnerved
			`	The man is starting to act a bit nervous. "Sorry I bothered you. Can we forget this happened?"`
			choice
				`	"Well, conversations like this are hard to forget."`
					goto cornered
				`	"Nice scam you have running here. Would be a shame if somebody told the local godfather about it."`
					goto payback
				`	(Agree.)`
					goto zerodeal
			label cornered
			`	"Well, what do you want? Do I have to do something for you?"`
			choice
				`	"No, let's just forget it happened."`
					goto zerodeal
				`	"Compensation for the time that you've wasted would be excellent."`
			label payback
			`	A bead of sweat travels down the man's face as he asks, "How many credits do you need to just forget this whole conversation happened?"`
			choice
				`	"100,000,000."`
					goto panicking
				`	"1,000,000."`
					goto much
				`	"200,000."`
					goto much
				`	"50,000."`
					goto much
				`	"5,000."`
					goto counterdeal
				`	"2,000."`
					goto counterdeal
				`	"1,000."`
					goto counterdeal
				`	"I don't need your credits, just forget it."`
					goto zerodeal
			label zerodeal
			`The man walks away without saying a word.`
				decline
			label much
			`	"That's too much! 2,389 credits is all I have. Would that be enough?"`
			choice
				`	"Sure."`
					goto counterdeal
				`	"No way, I want a lot more."`
					goto panicking
			label counterdeal
			`	The man hands you a credit chip, nods and walks away. You pocket the chip quickly, more ready to be done with this neighborhood than you want to visibly show.`
			`	A few minutes later you reach into your pocket for the chip... to find it missing. Looks like even a hardened captain like you isn't immune to being pickpocketed on a planet like this.`
				decline
			label panicking
			`	The man starts panicking and clumsily reaches into his jacket, maybe to get some money, but more likely reaching for a gun.`
			choice
				`	(Try to calm down the man.)`
					goto draws
				`	(Mock the man further.)`
					goto draws
				`	(Draw my sidearm and shoot the man.)`
					goto shoot
			label draws
			`	The man manages to draw a weapon! You brace for impact, but after a few seconds of waiting, you realize his weapon is only making a clicking sound when he tries to shoot.`
			choice
				`	"Ha, ha, you really are a failure of a goon."`
				`	(Draw my sidearm and shoot the man.)`
					goto shoot
			`	As you finish talking, you see a flash of light come from the muzzle of the man's weapon as a bullet hits you between the eyes. You die almost instantly, but you do have a few microseconds to reflect on the wisdom of mocking a man that is trying to fire a gun at you.`
				die
			label shoot
			`	Your bullet hits the man right between the eyes; he dies instantly, and a crowd starts to form around you.`
			`	Most bystanders are surprised, but you also notice an angry sentiment brewing in the (not unarmed) crowd. It might be wise to leave quickly.`
			choice
				`	(Run towards my ship and leave immediately.)`
					goto leave
				`	(Put away my sidearm and pretend nothing happened.)`
			`	You walk away nonchalantly, but you don't get far before multiple laser blasts slice through you.`
				die
			label leave
			`	You make it to your ship alive and depart under a rain of bullets and laser-weapons fire. This is a pirate planet so there are unlikely to be any lasting consequences, but you might want to stay away for a few days.`
				flee
			label payup
			`	The man takes your credits, responds with a brief "Thank you," and walks away.`
				accept



mission "Street Swindle"
	minor
	invisible
	source
		government "Free Worlds" "Republic" "Syndicate"
		attributes "urban"
	to offer
		random < 4
		credits >= 10000
	on offer
		conversation
			`You see a small crowd beginning to gather on a street corner. A man in a flamboyant striped suit and matching hat calls, "Come here! Come here! Come see the marvelous magician Mistress Marionette corral the crowded crossroads with her extravagant schemes!"`
			choice
				`	(Check it out.)`
					goto observe
				`	(Ignore it.)`
					decline
			label observe
			`	You join them. A woman in similarly fancy garb sits behind a table, swiftly shuffling three cups before a hulking man. The announcer continues, "For our new guests, the chosen challenger's chance approaches! The current buy-in bet was 7000 credits; yes, we play with the big money here! Double or nothing, bet your bet: are you a player or a puppet?"`
			`	The cups stop. After a brief pause, the man points to the cup on the right.`
			choice
				`	(Watch what happens.)`
					goto continue
				`	"You know these things are scams, right?"`
			`	You try to warn him, but someone in the crowd shushes you. He doesn't hear.`
				goto continue
			label continue
			`	"Are you certain in your choice?" the magician asks. "Once you-"`
			`	"Yes, I'm certain," the man interrupts. He draws 7000 credits and tosses them on the table. The magician lifts the cup, and a small red ball rolls from beneath. "And the first challenger proves to be a player!" the announcer says, mustering enthusiasm as the magician counts 14,000 credits to pay the man. "Let us find a new challenger! The next buy-in is a mere 400 credits; if you haven't played before, now's the time to test your skill!"`
			choice
				`	"I'd like to give it a try." (Bet 400 credits).`
					goto firstgameplay
				`	(Wait and watch.)`
					goto firstgamewatch
				`	(Walk away.)`
					decline
			label firstgamewatch
			`	A short woman volunteers. The game progresses in a similar manner; by the end, you are certain the ball is underneath the center cup. Sure enough, the woman chooses that cup, and she walks away 400 credits richer.`
			`	"The next buy-in is a larger prize!" the announcer calls after her before turning to address the crowd. "Six thousand credits, only for the proudest of players." The magician shakes her head softly, frowning at the cups.`
			choice
				`	"I'll do it!" (Bet 6000 credits).`
					goto secondgameplay
				`	(Continue watching.)`
					goto secondgamewatch
				`	(Walk away.)`
					decline
			label firstgameplay
			`	You pay 400 credits and sit across from the magician. "Double or nothing, bet your bet!" the announcer repeats. "Are you a player or a puppet?"`
			`	The magician places the ball beneath the center and begins moving the cups. This one seems faster, but that might just be from the pressure. You keep your eyes trained on the cup as it shifts back and forth, around in circles, and occasionally remains untouched. By the end, you're pretty sure it's in the center cup.`
			`	"What's your choice?" the magician asks, smirking.`
			choice
				`	"Left."`
					goto wrong
				`	"Center."`
					goto correct
				`	"Right."`
					goto wrong
			label wrong
			`	"Better luck next time," she says as she reveals your incorrect choice. The ball was in the center; you feel silly for not going with your gut.`
			`	"The next buy-in is a larger prize!" the announcer calls. "Six thousand credits, reserved for the most daring. As the previous player, you have first priority."`
			action
				payment -400
			choice
				`	"Let's go again."`
					goto secondgameplay
				`	"I think I'm done."`
					goto secondgamewatch
			label correct
			`	She asks if you're sure, and you stick with your gut. With a grimace, she lifts the cup to reveal the ball and counts out your winnings. "And the player prevails!" the announcer says. "Earning a small bounty. But wait: the next buy-in is bigger yet! Six thousand credits, reserved for the most daring. As the previous player, you have first priority."`
			action
				payment 400
			choice
				`	"Let's go again."`
					goto secondgameplay
				`	"I think I'm done."`
					goto secondgamewatch
			label secondgameplay
			`	You place your 6000 credit bet on the table, and the game begins. The pattern is slightly longer, but once the magician's hands stop, you feel like the ball lies beneath the left cup.`
			choice
				`	"Left."`
					goto left
				`	"Center."`
					goto center
				`	"Right."`
					goto right
			label left
			action
				payment -6000
			`	With a grin, she reveals the left cup, and it's... wrong! "Nice try," she says, pocketing your money. "It is a bit tricky."`
			`	"Well, that's all for today, folks!" the announcer says as you realize you've been conned. Worse still, after they pack up and leave, you notice that the first winner walks away beside them.`
				decline
			label center
			action
				payment -6000
			`	With a raised eyebrow, she reveals the center cup. It's... wrong! "Nice try," she says, pocketing your money. "That one was a bit tricky."`
			`	"Well, that's all for today, folks!" the announcer says. As they pack up and leave, you notice that the first winner walks away beside them.`
				decline
			label right
			action
				payment -6000
			`	With a raised eyebrow, she reveals the right cup. It's... wrong! "Nice try," she says, pocketing your money. "That one was a bit tricky."`
			`	"Well, that's all for today, folks!" the announcer says. As they pack up and leave, you notice that the first winner walks away beside them.`
				decline
			label secondgamewatch
			`	Sensing that something's up, you decide to watch the next game. A sprightly young fellow confidently hands over 6000 credits; when the cups stop, you feel like the ball is under the left one. The boy points to it; with a grin, the magician reveals the left cup, and it's... wrong! "Nice try," she says, pocketing the shocked boy's money. "It is a bit tricky."`
			`	"Well, that's all for today, folks!" the announcer says. You're glad you avoided the con. As they pack up and leave, you notice that the first winner walks away beside them.`
				decline



mission "Thrall Emigration"
	name "<origin> Emigration"
	description "Transport a family from <origin> to <destination>, where they hope to find better employment. They cannot pay you."
	minor
	source "Thrall"
	destination "Delve"
	to offer
		random < 50
	passengers 2
	on offer
		conversation
			`By the edge of the spaceport at night, you see a thin, sweaty man turn away from a pilot, disheartened. You make eye contact, and he begins hurrying over to you.`
			choice
				`	(Wait for him.)`
				`	(Walk away quickly.)`
					decline
			`	"Excuse me! Are you a pilot?" Without waiting for a response, he continues, "I need to go to the Syndicate. I work all day picking cotton with these hands, but my family's still starving. We can't afford transport..."`
			`	You can barely understand him through his accent. The man's teeth look worse than his clothes, and his breath makes you step back. His eyes implore you.`
			choice
				`	"I might be able to help you. What planet do you need to reach?"`
				`	"I'm sorry, I only transport for pay."`
					goto disappointment
			`	His eyes brighten with hope. "Oh! I, I heard some people are going to <planet> to be miners. They hire folk like us. I, if you could get me, and my wife and our two sons there, I'd praise you to the high stars. You'd save our lives."`
			choice
				`	"I can take you, but no more."`
					goto separation
				`	"I'd be happy to offer you four transport."`
					goto offer
				`	"Sorry, I think this won't work out."`
					goto disappointment
			label separation
			`	"The two little ones are really small," he persists. "We can cramp together. You'll just notice two of us. I mean, some go themselves and send money back, but..."`
			`	He shakes his head. "My wife's already told me we need to stay together, and I agree. I can't leave. Please, nobody else has said yes."`
			choice
				`	"I guess I can find room."`
					goto offer
				`	"Sorry, but that's still too many. Have a nice day."`
					goto disappointment
			label offer
			`	"Oh, thank you, thank you!" he says, vigorously shaking your hand. "I'll get them fast, we can leave tonight! I'm Gaint, by the way." He quickly leaves to get them, turning back at least three times to tip his hat to you and make sure you haven't left.`
			`	Gaint's family arrives quickly. His wife, Mell, is carrying their infant child, and a toddler clutches her leg. His fingers look like a skeleton, and his eyes look like his dad's. "Thank you so much," Mell says as they enter your ship.`
				accept
			label disappointment
			`	You fend off a few more pleas before he understands it's hopeless and begins looking for someone else.`
				decline
	
	on visit
		dialog phrase "generic passenger on visit"
	
	on complete
		conversation
			`	As your ship enters <planet>'s cavernous spaceport, you can sense a mixture of hope and apprehension in Gaint and Mell. "Andrin talks too much," you overhear Gaint saying. "I didn't know it's all underground."`
			`	"We'll figure it out," Mell assures him. When they notice you're listening in, the conversation stops. Your ship lands, and the family collects their things to leave. They thank you again on their way out.`



mission "Spaceport Reminder Setter"
	landing
	invisible
	on offer
		"spaceport reminder year" = "year"
		"spaceport reminder month" = "month"
		fail

# Use of "00" at the start of the mission name is to make it offer only if no other missions have.
mission "00 Spaceport Reminder Resetter"
	minor
	invisible
	repeat
	to offer
		not "chosen sides"
		not "Spaceport Reminder: offered"
	on offer
		"spaceport reminder year" = "year"
		"spaceport reminder month" = "month"
		fail

mission "Spaceport Reminder"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not attributes "uninhabited"
	to offer
		not "chosen sides"
		"spaceport reminder year" + "spaceport reminder month" != 0
		"spaceport reminder year" * 12 + "spaceport reminder month" < "year" * 12 + "month" - 7
	on offer
		conversation
			`As soon as you touch down on <origin>, you step off your ship and head directly for the job board and trade hub, brushing past several locals on the way. The constant routine of interstellar commerce has been firmly drilled into your brain; you near unconsciously peruse the boards, trying to suss out the most profitable route.`
			`	You're caught off guard when you hear a voice behind you. "Hey, what's with all the rush, Captain?" You turn and see a dark-haired man in a faded green longcoat approaching you. "You seem awfully focused on getting off-world as soon as possible. Why not take a moment to look around? Admire the sights, try the local cuisine, maybe even talk to some of the people."`
			choice
				`	"Why should I do that?"`
				`	"I'm a spaceship captain; I don't have time to waste."`
				`	"Yes, I know already. I'll take my time later."`
					decline
			`	He tilts his head to the side. "You know, I'm a captain too. I know how quickly the luster of the galaxy can fade into the weekly grind if you wait for opportunity to come knocking. So why keep waiting? I'm sure you'll find something new to do in the spaceport."`
			choice
				`	"I'll be sure to check more spaceports in the future."`
					goto thanks
				`	"Nothing interesting happened the last time I checked a spaceport."`
				`	"Why should I listen to you? I can handle myself, thank you very much."`
					goto rebuff
			`	The captain sighs. "Yeah, it can feel a little pointless running up against the same loud-mouthed people all the time. But just because a spaceport doesn't have anything to offer one day doesn't mean that it'll never have anything worthwhile. Wait a while, and there might be something new."`
			choice
				`	"Alright, I'll try to check more spaceports."`
					goto thanks
				`	"And why should I believe you over my own experiences?"`
			label rebuff
			`	He raises his hand and holds it open on his chest. "I know that it's only my word against yours, but I promise that you won't regret checking the spaceport every time you're in town."`
			choice
				`	"Fine, I'll follow your advice."`
					goto thanks
				`	"I don't need your help."`
			`	A frown creeps onto the captain's face as he earnestly says, "Well, I'm sorry that my advice wasn't helpful. Good luck, Captain." He walks off, leaving you alone at the job board.`
				decline
			label thanks
			`	He pleasantly smiles and nods. "Well, I wish you the best in your travels." He walks away, leaving you free to explore the rest of <origin>'s facilities.`
				decline



mission "Fumbling Mugger Patch"
	landing
	invisible
	to offer
		has "Transport Workers B: done"
	on offer
		event "fumbling mugger timer" 60
		fail


event "fumbling mugger timer"


mission "Fumbling Mugger"
	name "Transport to <planet>"
	description "Bring a young woman who threatened you on <origin> to <destination>."
	minor
	source
		attributes "dirt belt"
	destination "Maker"
	passengers 1
	to offer
		random < 45
		has "event: fumbling mugger timer"
	on offer
		conversation
			`Your exploration of the spaceport leads you to a dark alley where the number of working lights are far outnumbered by the number of broken ones. The contents of steel bins lining the walls overflow onto the pavement, attracting swarms of flies to them. On the surfaces that are illuminated, you can see a mess of black scrawlings upon bare, cracked concrete, and the few windows present on the towering walls surrounding you are either boarded up or shattered. A dark crimson stains the bottom half of a broken window.`
			`	Suddenly, you feel a cold object pushed against your back as a woman speaks softly. "Hands where I can see them, Captain."`
			choice
				`	(Lift my hands up and slowly turn.)`
					goto peaceful
				`	(Spin around and fire.)`
				`	(Try a fancy acrobatic move and disarm the attacker.)`
					goto flip
			
			action
				set "fumbling mugger shot"
			`	You turn around as swiftly as you can as your hand grasps for your pistol. Due to surprise, or perhaps nervousness, the woman threatening you fails to fire the shotgun she's holding in the second you spend turning. You manage to land a shot, and your quarry falls while a cry escapes from her body. As you walk away, her body fades into the darkness, blending with the garbage bags around it.`
				decline
			
			label flip
			`	You push down as hard as you can with your legs while leaning backwards, rising to the lofty height of two feet above the ground. As you begin to fall back-first uncontrollably, cold metal digs into your spine. A gasp escapes from behind as you land on a soft body. You pick yourself up as fast as possible, and you end up face-to-face with your attacker. In the darkness, you pick out that she's wearing a black hoodie with a bandanna over her mouth, her back hunched over and feet placed apart. As you look down, you spot a sawed-off break-action shotgun held single-handed, the end of which is pointed at your abdomen. "Hands up now, Captain."`
			choice
				`	(Put my hands up.)`
					goto handsup
				`	(Draw my gun and fire.)`
			action
				set "fumbling mugger shot"
			`	You hand darts for your gun, and you somehow manage to aim and fire before the woman does. She collapses on the ground while a cry escapes from her body. As you walk away, her body fades into the darkness, blending with the garbage bags around it.`
				decline
			
			label peaceful
			`	You raise your arms and turn to face the woman. In the darkness, you pick out that she's wearing a black hoodie with a bandanna over her mouth, her back hunched over and feet placed apart. As you look down, you spot a sawed-off break-action shotgun held single-handed, the end of which is pointed at your abdomen.`
			label handsup
			`	"Very good, Captain," she says. "Now, I have a proposal for you. I need transport to <destination>. Take me there, and the both of us can forget this ever happened."`
			choice
				`	"And if I don't take you there?"`
				`	"Are you going to pay me?"`
					goto payment
				`	"Why do you want to go there?"`
					goto why
			
			`	She scoffs. "What do you think? How else might an encounter involving a gun pointed-"`
				goto fail
			label payment
			`	She scoffs. "Payment? If I wanted to pay you, I wouldn't be in this alley pointing-"`
				goto fail
			label why
			`	She scoffs. "All you need to know is that I've got a gun pointed-"`
			
			label fail
			`	The attacker's speech is interrupted by a click as her shotgun swings open. She takes a step back as her eyes widen with panic.`
			label choice
			choice
				`	(Threaten her with my gun.)`
					goto threaten
				`	(Shoot her.)`
			
			action
				set "fumbling mugger shot"
			`	Before she can move a muscle, you whip out your pistol and fire, watching as the woman collapses onto the ground with a cry. As you walk away, her body fades into the darkness, blending with the garbage bags around it.`
				decline
			
			label threaten
			`	You take out your gun and aim it at the woman's head. "Drop the gun," you say, "or I'll shoot."`
			`	She seizes up for a few moments, then she throws her shotgun away and raises her hands. "I'm, um, sorry about threatening you. Would you mind if the both of us just walked this off?"`
			choice
				`	"Why do you want to go to <planet>?"`
					goto why2
				`	"Get out of my sight, and I'll let you go."`
					goto freedom
				`	(Shoot her.)`
			
			action
				set "fumbling mugger shot"
			`	You pull the trigger and watch as the woman collapses onto the ground with a cry. As you walk away, her body fades into the darkness, blending with the garbage bags around it.`
				decline
			
			label freedom
			`	She nods her head and backs away from you, hands still held up. When she disappears around a corner, you holster your gun and walk back to a safer portion of the spaceport.`
				decline
			
			label why2
			`	The woman looks at you with a confused expression. "Huh? Why would you want to know that?"`
			`	"Just humor me for a moment," you reply.`
			`	She sighs. "A while ago, I was in a bad situation. My boyfriend had just moved to <planet> for employment, and I was to join him in a year. My father had other plans. He used my boyfriend's absence to justify marrying me into another, richer family. Wanted a chunk of their fortune, I suppose. I tried everying I could to convince him otherwise, but..." She looks down. "So I snuck off to the spaceport and got a merchant to transport me. She forced me to pay upfront, however, and as soon as we landed on <origin>, she kicked me out to make space for another set of passengers."`
			`	Her eyebrows furrow. "Wait, you're not planning to bring me to <planet> after what I've just done, are you?"`
			choice
				`	"I can take you there."`
				`	"I can't transport you."`
					goto decline
			`	"Really?" she says. "You realize that I can't pay you in any way, right?"`
			choice
				`	"You don't need to pay me."`
					goto accept
				`	"You can pay me later."`
				`	"Actually, I can't take you there without payment."`
					goto decline
			action
				set "Fumbling Mugger: future payment"
			label accept
			`	The woman's eyes light up. "I can't thank you enough for this." The two of you head out of the alleys and back to the landing pads, and you show her to an empty bunk on your ship.`
				accept
			
			label decline
			`	"I understand." She shuffles away with her head hung, and you head back to a brighter area of the spaceport.`
				decline
	
	on abort
		conversation
			`As you tell the woman about the change in travel plans, she sighs with resignation. "I suppose that I shouldn't expect anything after how I treated you." You recall that she doesn't even have a single credit to her name, and without any money, it is unlikely that she will survive for long.`
			branch poor
				"credits" < 15000
			choice
				`	(Wish her good luck.)`
					goto leave
				`	(Give her 15,000 credits before dropping her off.)`
					goto gift
			label poor
			choice
				`	(Wish her good luck.)`
			label leave
			`	She nods in response. "I'll try my best," she says solemnly as she prepares to depart your ship.`
				decline
			label gift
			action
				payment -15000
				set "gifted money to mugger"
				log `Was held up by a woman who wanted transport to Maker. Managed to gain the upper hand in the engagement, but decided to pay for her transport anyway.`
			`	She is almost incredulous at your gift. "I really can't thank you enough for helping me out." The two of you say your farewells as she gets ready to depart your ship.`
	
	on complete
		event "fumbling mugger followup timer" 365
		log `Was held up by a woman who wanted transport to Maker. Managed to gain the upper hand in the engagement, but decided to take her there anyway.`
		dialog `The hooded woman prepares to disembark your ship. Just before she steps off, she turns to look at you. "I'm sorry for threatening you back on <origin>, Captain. I'll try to find some way to repay you." She walks off into the bustling spaceport to find her lover.`


event "fumbling mugger followup timer"



mission "Laborer"
	minor
	name "Out of Work"
	description "A man down on his luck needs to get to <destination>. He has promised to send you payment as soon as he has it."
	passengers 1
	source
		government "Republic" "Free Worlds" "Syndicate" "Independent" "Neutral"
		attributes "mining"
	destination
		distance 1 100
		government "Republic" "Free Worlds" "Syndicate" "Independent" "Neutral"
		attributes "mining"
	to offer
		random < 15
	on offer
		conversation
			`Upon entering the spaceport, you see a young man in laborer's clothing is arguing with a woman in a flight suit.`
			choice
				`	(Go see what the laborer is arguing about.)`
				`	(Ignore them.)`
					decline
			`	The man is nearly shouting. "Lady, I'm not trying to low-ball you here! I don't have the money! That's the whole point!"`
			`	"I appreciate your conundrum," replies the woman, her voice clipped. "However, my policy is cash upfront. Good day."`
			`	She turns and walks away briskly, and the man slumps down into a chair.`
			choice
				`	"What was that all about?"`
				`	(Leave before he notices you.)`
					decline
			`	He gives you a once-over, and you see a spark of hope in his eyes. "You're a captain? Please, I need to get to <destination>. Work has dried up here, and I need a fresh start."`
			choice
				`	"What are you able to pay me?"`
					goto offer
				`	"Work dried up on the whole planet?"`
			`	"This planet is messed up. Everybody likes to talk behind your back. I did a job for one of the big mining companies here, but my boss had it out for me. Told everybody I did it wrong, even though they never gave me any training at all. Then he went and put me on the permanent record. So yeah, sooner I get off this dump, the better."`
			`	"What are you able to pay me?" you ask.`
			label offer
			`	His eyes drop. "I can pay you after I earn the money. I've just gotta get to <planet> to get work, and then I'll send the money. I just want to earn a living, same as anyone."`
			choice
				`	"Okay, I can take you to <planet>."`
					goto accept
				`	"How do I know you'll pay?"`
					goto question
				`	"Sorry, money up front."`
					goto decline
			label question
			`	"You don't trust me? Just keep walking, then, if you're gonna be like that."`
			choice
				`	"Sorry, money up front."`
					goto decline
				`	"Fine, I can take you to <planet>."`
			label accept
			`	"I'll be on board. There's no rush, honestly. I need a break from all this stress." He takes his luggage into your ship as you prepare for the trip.`
				accept
			label decline
			`	"I knew it. You're just like everyone else." He storms off, not waiting for a response.`
				decline
	on complete
		event "laborer payment" 400
		conversation
			`The worker you picked up from <origin> spent every possible moment of the voyage telling his story. He's had a tough life, full of unlucky setbacks, unfair treatment, and outright persecution from others. You stopped paying attention to what he was saying after a while as he went on for what felt like forever, often repeating himself.`
			`	Upon arriving, he carries his bags to the lowered ramp, then turns back before disembarking. "Thanks for the lift. You're one of the good ones, you know?"`
			choice
				`	"You're welcome. Better luck on this world."`
					goto luck
				`	"You have my bank address, right?"`
			`	He shoots you a look of thinly masked annoyance. "Yeah. I'll send you the credits when I have them. Bye, now."`
				decline
			label luck
			`	He bobs his head at you in farewell. "I promise I'll send you the payment when I have it. Bye, now."`

event "laborer payment"

mission "Laborer Payment"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Independent" "Neutral"
	to offer
		has "event: laborer payment"
	on offer
		payment 17000
		conversation
			`You receive a payment of <payment> from the down-on-his-luck laborer that you transported a while back, along with a message. "Hello <last>. Not sure if you remember me. I'm the one that had to deal with my boss bad-talking me to everyone on my home planet. I've been doing better, but my new boss keeps trying to rip me off and make me come in for overtime." He goes into detail about the sordid working conditions in his new job, but you stop reading after the third paragraph.`
				decline



mission "Block Hai Wormhole Warning"
	landing
	invisible
	to offer
		or
			has "First Contact: Hai: declined"
			has "First Contact: Unfettered: declined"
		has "chosen sides"
		not "main plot completed"
	on offer
		fail

mission "Hai Wormhole Warning"
	landing
	source
		government "Republic"
		not attributes "deep"
	to offer
		or
			has "First Contact: Hai: declined"
			has "First Contact: Unfettered: declined"
		not "Block Hai Wormhole Warning: offered"
		not "Wanderers: Alpha Surveillance E: offered"
		not "Hai Leaks Response 1: offered"
	on offer
		log "Was pulled aside by a Navy officer and told to keep the wormhole to the Hai a secret. The Republic doesn't want the knowledge of the wormhole to be widespread, as that could cause chaos for both the Republic and the Hai."
		conversation
			`When you open the door to let in the Navy officer on inspection duty, you expect him to produce the usual set of landing papers and bureaucracy. But instead he says, "Captain <last>. I'd like to speak with you for a few minutes. In private." He motions toward a Frigate on the landing pad next to <ship>.`
			choice
				`	"What about?"`
					goto what
				`	"Okay."`
					goto frigate
				`	"Sorry, I'm really busy right now."`
			`	"No, I'm sorry, but this isn't a matter of whether you're busy or not right now. Come with me."`
				goto frigate
			label what
			`	"I did say in private, did I not?" he says, once again motioning to the Frigate.`
			label frigate
			`	The man puts a hand on your shoulder and begins walking you toward the ship. As you approach, you note that the man's uniform doesn't have any Navy markings that you recognize.`
			`	You enter the ship with the officer, and despite the decent crew requirement of a Frigate, you don't notice anyone else on board, and the interior of the ship appears more cushy than you would expect out of a military vessel. The officer leads you to what looks like a rather comfy lounge area. "Please, have a seat," he says.`
			choice
				`	(Take a seat.)`
					goto seat
				`	"No, I like to stand."`
			`	"Suit yourself," the officer says with a shrug while taking a seat himself.`
				goto questioning
			label seat
			`	You choose a table to sit at and the officer sits across from you.`
			label questioning
			`	"So what is it that you brought me here for?" you ask.`
			`	The officer folds his hands together. "You've made contact with an alien species located to the north. Is this correct?"`
			choice
				`	"It is. Is that a problem?"`
					goto yes
				`	"Perhaps. Why do you ask?"`
					goto maybe
				`	"Aliens? I don't know of any aliens up there."`
				`	"Hey! That's no way to talk about the pirates in the Far North."`
			`	"Don't play coy with me, <last>. The Republic is aware that you've made contact with the Hai.`
				goto secret
			label maybe
			`	The officer chuckles. "I think the answer you're looking for is 'Yes,' not 'Perhaps.' The Republic is aware that you've made contact with the Hai.`
				goto secret
			label yes
			`	"There is no problem, <last>. I am just letting you know that the Republic is aware that you've made contact with the Hai.`
			label secret
			`	"But you may not be aware of the arrangement that the Republic has with the Hai. The Republic works hard to ensure that the existence of the Hai remains an open secret; they do not disallow captains such as yourself from stumbling upon them, but they will not allow this existence to be widely publicized."`
			choice
				`	"Why are you telling me this?"`
					goto why
				`	"An arrangement between the Republic and Hai? When did that happen?"`
					goto arrangement
				`	"So you're threatening me to stay quiet?"`
			`	"No threats. I only provide a... warning, so to say, that you should keep the Hai a secret.`
				goto chaos
			label why
			`	"I'm telling you this as something of a... warning, so to say, that you should keep the Hai a secret.`
				goto chaos
			label arrangement
			`	"The details of the arrangement are none of your concern. All you need to know is that I am providing a... warning, so to say, that you should keep the Hai a secret.`
			label chaos
			`	"I'm sure that you can imagine that should the existence of the Hai become public, it would cause a great deal of chaos, both for the Republic and for the Hai. Chaos that could easily end badly, particularly for the one who caused it. So it would be in everyone's interest if you kept this knowledge a secret."`
			choice
				`	"Alright. I won't let anyone know."`
					goto ok
				`	"And if I don't?"`
			`	The officer leans back in his chair. "As I said, <last>, I'm giving you a warning that things could end badly for you. The Republic are not the only ones who work hard to maintain this secrecy, so you may want to think twice about revealing such information. Now, if you'll please depart my ship so that I can be on my way."`
				goto end
			label ok
			`	"That's good to hear," the officer responds. "Thank you for your cooperation, <last>. Now, if you'll please depart my ship so that I can be on my way."`
			label end
			`	The officer leads you out of the ship and closes the doors behind you, while the actual Navy officer on inspection duty stands beside <ship>, brandishing a set of landing documents. When you've finished signing them, you turn back to see the Frigate take off, slowly getting smaller in the sky until it finally disappears.`
				decline



mission "Saving Artifacts 1"
	name "Saving Artifacts"
	description "An Earth museum cannot care for these historical artifacts anymore. Bring them to <destination>, where they will be safe."
	minor
	cargo "artifacts" 5
	to offer
		random < 10
		has "event: fw conservatory founded"
	source "Earth"
	destination "Alexandria"
	on offer
		conversation
			`As you wander around the spaceport, a harried-looking academic approaches you. "You're a captain, right? Can you take a transport mission to <planet>? A local museum can't care for some priceless historical artifacts anymore due to budget cuts, so they need to be transported somewhere that they can be properly cared for. We can pay you <payment>."`
			choice
				`	"Why can't you just bring them to another Earth museum?"`
				`	"Sorry, I can't take on this job right now. Ask someone else."`
					decline
				`	"Sure, I'll take them there."`
					goto accept
			`	"These artifacts are extremely delicate. Ancient manuscripts and the like. One needs special equipment to care for them, and all the museums that could possibly provide that care here are underfunded and overloaded. Earth has many items of historical value, but not enough resources to host them. It's not an ideal combination." He sighs. "Alexandria Station has offered to host them, so we of course accepted."`
			choice
				`	"Sure, I'll take them there."`
				`	"Sorry, I can't take on this job right now. Ask someone else."`
					decline
			label accept
			`	"Wonderful!" He claps his hands together. "We'll start loading the cargo onto your ship." He turns and walks away considerably happier than when you found him.`
				accept
	on complete
		payment
		conversation
			`Unloading the cargo takes an excruciatingly long time, as the artifacts must be handled with extreme care. A local librarian comes up to you and thanks you for the transport, paying you <payment>.`
			`	As he hands you the credit chips, he leans in. "According to our sources, you have some considerable combat experience. We have a task that requires that skillset. I promise you that it's a bit more exciting than transporting musty books, and the pay is much higher too. Meet me in the spaceport if you want to learn more."`

mission "Saving Artifacts 2"
	name "Saving Artifacts"
	description "A pirate warlord has captured a collection of ancient statues from Winter. Go to <destination> in order to bring them to <origin>, where they will be safe."
	minor
	source "Alexandria"
	destination "Greenrock"
	to offer
		has "Saving Artifacts 1: done"
	on offer
		conversation
			`The librarian you met earlier flags you down in the spaceport. "Glad you could join me, Captain <last>. We've gotten word of a pirate warlord down south who fancies himself an art collector. Calls himself the Lokust, and his gang the Pestilance - names intentionally misspelled." He wrinkles his nose as if he's smelled something repulsive. "Given your history, I trust you're familiar with the Conservatory?" He doesn't wait for a response. "The shipment contained ancient Greek statues and was on its way there as part of a rotating exhibition, but our original transport was... unable to contend with the piracy threat in frontier regions. As a result, the shipment was 'diverted' to Greenrock, where the warlord in question is based. We want you to go to Greenrock and get these statues back any way you can, and then return with them back here. Our payment should cover the cost of any briberies you might have to make."`
			label choice
			choice
				`	"Why can't you get the Navy involved with this?"`
				`	"Why should I bring them back to Alexandria? Don't they belong to the Conservatory?"`
					goto conservatory
				`	"How am I supposed to find those statues? They could be anywhere on that planet."`
					goto find
				`	"I can handle some pirates. I'll get those statues back."`
					goto accept
				`	"No way am I risking my life for some hunks of marble. Find someone else."`
					decline
			`	The librarian squints at you in a manner that suggests that the answer is obvious. "The Navy doesn't consider it worth the risk. Greenrock is 'not in their jurisdiction,' they say. So the most respected library in the galaxy has to resort to hiring privateers."`
				goto choice
			label conservatory
			`	"The rotating exhibition was a new partnership with the Conservatory. Previously we had been hesitant to transport our valuables to frontier regions, but in this new partnership we decided to try shipping some of our artifacts to more distant planets, so that they too could benefit from seeing our collection. Those statues were part of that shipment. Evidently we were mistaken. Those statues are not safe as long as they're in the South."`
				goto choice
			label find
			`	"Lucky for you, Lokust does not seem particularly attached to his 'booty'. If you must, offer him a large sum of money, and he will most likely be willing to part with them. However, if there is something you can do to get those statues back without allowing your money to fall into the hands of a criminal, I would suggest that course of action instead."`
				goto choice
			label accept
			`	"Excellent. You're doing a service to humanity's cultural memory."`
				accept
	on complete
		conversation
			`You hustle through the crowded markets, pistol by your side, looking for any sign of the statues. After a while you come across a storefront with a crudely painted sign that reads "Fine Art and Cultural Treasures". Not seeing any better leads, you go in.`
			`	The inside is damp and poorly lit, but you can make out various paintings, manuscripts, and other expensive-looking items. "How can I help you?" the store clerk asks in a disarmingly friendly voice.`
			choice
				`	"You don't happen to know of a local warlord named Lokust, do you?"`
				`	"Have you had any Greek statues pass by through here?"`
			`	The clerk laughs. "You're trying to get Alexandria's shipment back, aren't you?" Before you can answer, he continues. "If you want my client Lokust's statues, I'm afraid you're gonna have to pay a pretty penny for them. 500,000 credits is his asking price."`
			choice
				`	"Alright, I'll pay."`
					goto pay
				`	"Can't we negotiate?"`
				`	"I can't pay that much!"`
			`	"Sorry, his price is firm. I'm just the dealer - I don't make those decisions." A smirk begins to crawl across his face, and he leans in. "Look, I have no love for Lokust. Always jacking up his cut of the sale, threatening my customers, you get the idea. Not to mention my debts to him." The last part he says in a less bold tone. "What I'm saying is, I wouldn't mind if someone like you took him out. He's a real wacko, always going on about duels and other bull. If I were you, I'd challenge him to one. If he doesn't accept, call him a coward. That's sure to get him riled up." He wheezes in a way vaguely reminiscent of a laugh. "As a reward, I'll give you the statues for free if you come back, but you gotta take out his whole crew, right? Don't want any of his underlings coming for me."`
			choice
				`	"Never mind, I'll pay."`
					goto pay
				`	"All right, I'll fight him.`
			`	"Heh, good choice. If you're worried about his crew, don't be. I'm sure if Alexandria thinks you're good enough to hire, you can handle it. I'll call him up so you don't have to go chasing him down." He pulls up a hologram communicator and noticeably stiffens up. "Hello Lokust. Hope you're not too busy right now, because someone wants to see you." He turns the communicator towards you, and you see a man in clothes more befitting of a prince than a pirate.`
			choice
				`	"Fight me."`
				`	"I've heard you're willing to duel over those statues you stole from the Library of Alexandria?"`
			`	The communicator's audio quality is evidently not the highest, as his laugh is barely more than static. "I don't just throw hands with anyone, you see. That would make me little better than some barroom drunk. I have standards. Why should I waste my time with you?"`
			choice
				`	"Oh, I see. You're too cowardly to fight."`
				`	"I didn't realize 'The Great Lokust' was such a weakling."`
			`	He becomes visibly enraged the moment you're finished talking. "I will not stand these insults to my honor! We meet in the sky. Bring all of your weaponry to bear, for it is the last time you will use them."`
			`	The communication cuts off. "He always uses that same line," the clerk says, rolling his eyes.`
				decline
			label pay
			action
				payment -500000
				set "Bought Off Artifacts"
			`	He looks almost disappointed. "Alright, here's the statues. Don't forget to tell any friends that might be redecorating about our low prices."`
				decline

mission "Saving Artifacts 3"
	name "Duel Lokust"
	description "Defeat Lokust as part of a bargain to acquire the stolen statues."
	source "Greenrock"
	landing  # This has no offer convo as the choice is handled in mission 2
	to offer
		has "Saving Artifacts 2: done"
		not "Bought Off Artifacts"

	npc kill
		personality heroic nemesis waiting staying target
		government "Pirate"
		ship "Falcon" "Pestilance"

	npc kill
		personality heroic nemesis waiting staying target
		government "Pirate"
		ship "Headhunter" "Deth"

	npc kill
		personality heroic nemesis waiting staying target
		government "Pirate"
		ship "Headhunter" "Warr"

	npc kill
		personality heroic nemesis waiting staying target
		government "Pirate"
		ship "Headhunter" "Famin"

	npc kill
		personality heroic nemesis waiting staying target
		government "Pirate"
		ship "Headhunter" "Konkwest"

	on complete
		conversation
			`The clerk rushes up to your ship as soon as it finishes landing on the tarmac. He begins to shake your hand vigorously. "You got rid of all his cronies, yeah?" You nod. "Good. Take the statues into your ship and don't draw attention to yourself. Don't want them stolen, y'know." A sarcastic grin emerges on his face.`
			`	You load up the statues, taking care not to attract unwanted attention as well as attempting to avoid creating any new damage. From what you can tell, they're in remarkable condition considering that they were in the hands of a pirate warlord just a few hours ago.`

mission "Saving Artifacts 4"
	landing
	name "Saving Artifacts"
	description "Bring the statues back to <planet>."
	source "Greenrock"
	destination "Alexandria"
	to offer
		has "Saving Artifacts 2: done"
	to complete
		or
			has "Bought Off Artifacts"
			has "Saving Artifacts 3: done"
			and
				has "Saving Artifacts 2: done"
				not "Duel Lokust"
	
	on visit
		dialog `You land on <planet>, but realize you haven't acquired the statues from Greenrock yet. Better return to Shaula to make sure Lokust is defeated before claiming them on the planet.`
	on complete
		payment 1800000
		conversation
			`You dock on the station and the librarian from earlier comes to greet you almost immediately. "Get the dockworkers, stat!" he calls, then turns to you. "You did get the statues, right?" He relaxes once he sees you nod. As the cargo is unloaded, the librarian hurries up to inspect your haul and shakes his head. "There's damage, but I suppose it's the best we could've hoped for considering the circumstances." He sighs. "Thank you for your help, Captain <last>. You've provided an invaluable service." After paying you <payment>, he turns back towards the statues, focusing his attention on their safe unloading.`
				decline



mission "Dangerous Games 1"
	minor
	name "Dragonriders"
	description "A lively man named Karengo and a few passionate youths are traveling to see the dragons on <stopovers>. Take the group there, then return them to <destination> once they've finished."
	passengers 9
	source
		attributes "frontier" "pirate"
	stopover "Skymoot"
	to offer
		random < 15
	on offer
		conversation
			`Upon entering the spaceport, you notice that the local bar seems to be more active than usual. The moment you pass through the bar door, a strong drink is pressed into your hand. You look at it, dumbfounded, and then look up to the waiter who gave it to you. "Compliments of Mr. Karengo," he says, nodding his head towards a crowd of people, mostly young men, before moving on.`
			choice
				`	(Head over to "Mr. Karengo.")`
				`	(Leave.)`
					decline
			`	As you make your way over, you note that nearly everyone in the bar has the same drink you do. In the middle of the crowd, a large, heavily muscled, and tattooed man is gesticulating wildly, apparently telling a story.`
			choice
				`	(Go listen to the man.)`
				`	(Leave.)`
					decline
			`	"... so then he asks me, 'Have you ever ridden one?' And I look back at this crazy joithead and I say, 'You're a crazy joithead.' But he's got me thinking, y'know? Nobody has ever ridden one. Least, not nobody that could talk after." He lets out a sharp laugh, then raises his voice. "So I ask you all: who wants to join Karengo to make history? Who wants to ride a dragon? I'll supply the jetpacks, you supply the courage."`
			`	You've heard the stories of the dragons flying through Skymoot's skies as a child. Great beasts; graceful and dangerous, the apex predators of the air; they are strikingly similar to the dragons described in ancient legends. Skymoot is host to many dangerous creatures, and these living myths hold a place at the top of that list.`
			`	A cheer goes up from the men, especially the drunk ones. Karengo starts to hand out death and accident waivers and collect money for the expedition. Suddenly, his expression darkens as he cocks his head, listening to an earpiece. "Listen up!" he yells. "Seems my regular pilot got in the way of some less reputable folk, and my replacement pilot lost his balls this evening and can't find 'em! We need ourselves a ship and a captain to bring this lot to <stopovers>! Who's brave enough? Who else wants to make history?"`
			choice
				`	"Captain <last>, at your service. We leave at dawn!"`
					goto accept
				`	"Am I getting paid?"`
					goto money
				`	(Stay silent.)`
			`	You remain silent as Karengo surveys the crowd. "What, nobody with a ship has the cojones to make history? I didn't know this bar was full of a bunch of sissies."`
			`	One captain in the back of the bar jumps up. "Mama didn't raise no sissy! I'll bring you all to Skymoot." A cheer rises up from the crowd and the captain is treated to several rounds of drinks. After the captain and all the passengers are sufficiently drunk, they saunter their way out of the bar, drunkenly singing about adventure as they go.`
				decline
			label accept
			`	After a cheer rises up from the crowd, you're treated to several rounds of drinks by your passengers; you sense any attempt to refuse would be ignored. You're unsure of how much you drank, but it was enough to make sure that you didn't remember. You wake up significantly after dawn with empty bottles and unconscious men strewn all over the ship's mess hall. Karengo peels himself off the floor and gives you a crooked smile, shielding his eyes from the light. "Alright, <last>," he says, "let's do this."`
				accept
			label money
			`	The crowd's eyes turn to you. Karengo squints, then laughs. "Ha! What kind of question is that? Of course you're getting paid. <payment> to bring myself and these other fine folks to <planet> and back - <bunks> of us total. What say you?" The crowd watches you with eager anticipation.`
			choice
				`	"Works for me. We leave tomorrow."`
					goto accept
				`	"<payment> won't be enough. I'm out."`
			`	You're treated to some jeering and rude looks as you leave the bar.`
				decline
	on visit
		dialog `You land on <planet>, but realize that your escort carrying the passengers hasn't entered this system yet. Better depart and wait for it.`
	on stopover
		conversation
			`Karengo directs you down through the atmosphere of Skymoot, steering clear of the usual tourist areas and, you realize, of the local law enforcement. As you're putting down in a clearing halfway up a mountain, you hear an otherworldly screech as your ship lurches violently to one side. You would have been thrown to the floor if you hadn't been strapped in.`
			`	"Look lively, lads!" shouts Karengo, the only person still standing. "Your chariot awaits!" He double-checks the jetpacks on the backs of each of the eight men, or "Dragonriders," as they creatively branded themselves during the first night of the voyage, then opens the side hatch and hurls the Dragonriders out the door before jumping himself.`
			`	After the group has left, you land - this time undisturbed - and pull up every external camera you have to watch the action.`
			`	The dragons of Skymoot you learned about on the "Xenofauna and Flora" channel were different from the dragons of mythology, but the beasts you see today aren't quite what you learned about, either. For one, the creatures flying outside your window are faster than you thought possible, or perhaps the ones on the show had been drugged to make them easier to film.`
			`	A quick survey of the scene shows that Karengo has tagged three dragons with some sort of harmless marker gun to make them easier to track. Eight of the Dragonriders, Karengo included, are chasing the largest one, which is missing part of a tooth and has blackened scales from where it hit your ship's shields. The last Dragonrider is nowhere in sight.`
			`	Suddenly, proximity sensors go off on the starboard side and a camera shows something - or someone - bounce off your shield and tumble down the mountain.`
			choice
				`	(Announce that I'm leaving.)`
					goto leave
				`	(Stay and watch the Dragonriders.)`
				`	(Take off and leave everybody else behind.)`
					goto betrayal
			`	Checking your camera feeds again, you see that object rolling down the hill is indeed a body. On another monitor, one of the Dragonriders is keeping just above a dragon, attempting to lower himself down. The dragon rolls in midair, its wing catching the man and sending him flying out of control. Fortunately, a leafy tree branch prevents any further physical harm. Meanwhile, a second dragon is pursuing another one of the Dragonriders.`
			choice
				`	(Get everyone out of there.)`
					goto leave
				`	(Take off and leave everybody else behind.)`
			label betrayal
			action
				fail
			`	The ship takes off with a roar at your touch. Between the cries of the dragons, the sound of the engines, and the air rushing past, you can barely hear the fear and betrayal in the voices of the men you've left behind.`
				decline
			label leave
			`	You turn on the external speakers. "We are leaving," you blast to the survivors. "Get on board."`
			`	The defeated Dragonriders need no further encouragement. They beeline for the hatch and you flicker the shield to let them on deck, where they collapse, wide-eyed and panting. Karengo isn't with them. You turn to ask about him when a flicker of motion on a monitor catches your eye.`
			`	Karengo is riding a dragon, gripping the ridge of scales around its neck. The dragon frantically tries to get him off, but deft application of his jetpack keeps him on top of the beast for now. He lets out wild screams of triumph as they soar through the sky and at last you can understand the appeal of this whole expedition. Your admiration is cut short by two catastrophic crashes on either side of the ship and accompanying sirens. The dragons are trying to get through.`
			`	You activate your engines, and the ship takes off quickly enough to make you light-headed. "Get on board!" shouts one of the men over the external speakers as you position the ship just below Karengo and lower the shields. Scales bounce off the roof like diamonds. Karengo releases his grip on the dragon and free falls toward you, slowing at the last possible moment before dropping through the top hatch. You flick on the shields and hit the engines, hard. They respond enthusiastically, rocketing you away from the mountain and into the safety of patrolled airspace. From the cabin comes the sound of back-slapping and, surprisingly, a sob.`
	on complete
		payment 12000 500
		conversation
			`As you land and fuel up, Karengo herds the seven surviving men out of the ship. "Meet us at the bar, yeah?" he says to you. "This day deserves a celebration." You nod, but can't help but notice red eyes and wet cheeks among the rest of the Dragonriders as they shuffle off.`
			`	Later that day, you spot the Dragonriders at a corner table of the bar. The men, with the exception of Karengo, appear subdued.`
			`	"How goes it, <last>?" he asks. "We were just raising a glass to mission success - made possible by you, of course. Great flying, Captain." The bartender arrives with a round of drinks and Karengo raises one. "To the Dragonriders!" he says.`
			choice
				`	"To the Dragonriders!"`
				`	"To our fallen friend!"`
				`	"I'm good, thanks."`
			`	Karengo gives you an unreadable look, lowers his glass, and says, "Your payment, plus Jarek's signup fees: <payment>."`
			choice
				`	"Thanks."`
					goto end
				`	"I can't accept his money. It's not right."`
			`	Karengo shrugs and doesn't take it back.`
			label end
			`	"Maybe I'll see you again sometime, yeah? I'm always in need of a pilot with some guts." He nods in your direction, clearly dismissing you.`



mission "Dangerous Games 2"
	minor
	name "Karengo's Galactic Adventures"
	description `The adventurer Karengo and five others are traveling with you as part of his "Galactic Adventures". Bring Karengo and crew to <destination> for <payment>.`
	source
		attributes "frontier" "pirate" "rim"
	destination "Poseidos"
	cargo "subpods" 6
	passengers 6
	to offer
		random < 15
		has "Dangerous Games 1: done"
	on offer
		conversation
			`A boisterous laugh sounds from somewhere behind you. You haven't heard that voice since your ship was attacked by dragons.`
			`	"<first>!" A huge hand claps you on the shoulder and spins you around, where you find yourself facing a large, widely grinning man.`
			`	"Remember me? Yer the best pilot I've had - that stunt to get us out of Skymoot, right out of the dragon's nest? Epic."`
			`	A crude sign behind him reads, 'Dangerous Games - Karengo's Galactic Adventures'.`
			`	"Like it?" Karengo follows your gaze. "Decided to make this an official thing. Well... an unofficial official thing. Feds wouldn't understand. Doesn't matter; I need a pilot again, and a good one. Your ship's waterproof, right?"`
			choice
				`	"Uh, yeah. I think so.`
				`	"Of course."`
				`	"Sorry, mate. You'll have to find another pilot."`
					decline
			`	Karengo laughs. "If they can handle space, I think they can handle some water. I've got a group of lads and ladies here rarin' to see some quoijuu in heat, right up close'n'personal. They've all got their own subpods, so how's about we load up and head out in the next few hours. Good? Good."`
			`	"Oh, nearly forgot. We're headed to <destination>, and you'll get <payment> for taking us there. Ain't sure if those in charge are gonna like what I'm doing, so we might need to grease some palms. Best to keep your eyes open and your shields up. We leave at noon!"`
				accept
	on complete
		payment 20000 500
		conversation
			`As before on Skymoot, Karengo guides you down to a landing spot far away from the local government. "Don't want no interruptions," he says.`
			`	Despite days of pressuring, you've been unable to get Karengo to tell you exactly what a quoijuu is, other than a slightly ominous "the biggest fish." He sends a file to your ship computer and grins. "Since it's too late to back out now, it's time to fill you in. Quoijuu aren't the only thing down there; you've also got scyllae, taniwhales, morgawrii, plus some hydrothermal vents, none of which will benefit us if we run into them."`
			`	"The good news is that there's a path to follow. The bad news is the only person to traverse the path was a bit of a nut. It's all in riddles, and I haven't been able to make heads or tails of them. Look them over and we'll follow your lead. And don't worry too much about it - what's the worst that could happen?"`
			choice
				`	"Okay, I'll take a look."`
					goto adventure
				`	"We could get lost and then die."`
			`	Karengo laughs. "You worry too much," he says.`
			label adventure
			`	The adventure seekers, who you've spent the trip getting to know, are getting ready. You watch a nearby pair, Daciana and Mussie, helping each other get their wetsuits on. Daciana catches your gaze and grins. "Bafta, mate. Safe sailing, see you on the other side." Karengo gives you a signal and you hurry back to the cockpit to fly out, away from safe shoals and over the watery abyss.`
			`	At your touch, the ship slowly sinks below the waves. As Karengo warned, most of your navigation systems quickly flash red warnings, then go offline; there is some unknown interference that overwhelms your ship's sensors, which were designed for space first and water second, or fifth, or not at all. Minutes tick by as the crew silently watches one of the few sensors still working.`
			`	EIGHT KILOMETERS, the depth meter reads.`
			`	TEN KILOMETERS.`
			`	SIXTEEN KILOMETERS. A loud, metallic creak echoes through the ship and Mussie jumps, startled.`
			`	Karengo claps him on the back and gives him a signature grin. "Maybe <first> can keep you aboard after this in case they need anything from a high shelf!" Mussie smiles weakly, but his eyes don't leave the readout.`
			`	TWENTY-FIVE KILOMETERS. "This's it," Karengo announces, "Sub up! Let's see what there is to see. And <first>, keep it to passive sensors. Don't want to attract any undue attention." The ship smoothly descends into the mouth of a massive cave and your visibility, clouded by dark sulfide emissions from the hydrothermal vents at the floor, drops to less than eight meters. 6 personal subpods fan out behind you, their communication equipment syncing with yours to display them as blips on your screen.`
			`	"Ok, <first>," Karengo crackles over the radio. "I'll read you the first clue."`
			`"No other path may you take"`
			`"Oiled skins flash and flicker"`
			`"Razor spikes grow from the deep"`
			`"Titanic walls crush and smash"`
			`"Heed the beginnings to live".`
			choice
				`	(Go east).`
					goto east
				`	(Go north).`
					goto north
				`	(Go south).`
					goto south
				`	(Go west).`
			action
				set "Elias and Taddese dead"
			`	Small schools of fish flit past as you guide your small fleet to the west. Minutes pass with no sign of danger, and finally Karengo broadcasts, "Good work, <first>. Looks like this is the way forward."`
			`	"Last one there's a rotten fish eye!" shouts Elias, and your screen shows his subpod leap forward and gain on you, followed quickly by Taddese.`
			`	Then, without warning, a proximity sensor goes off. At the same time, your external lights illuminate a wall directly in front, stretching for as far as you can see. "Stop!" shouts Karengo, "It's the end of the cavern! Stop and go back!"`
			`	Shuddering, your ship comes to a halt mere meters from the endless stone face. With a sinking feeling that has nothing to do with the depth, you turn the ship around and head back the way you came.`
				goto riddletwo
			label east
			action
				set "Elias and Taddese dead"
			`	Small schools of fish flit past as you guide your small fleet to the east. Out of the darkness, some sort of small whale crashes into your ship, setting off a couple of proximity alarms but causing no damage. It isn't until you hear screaming, distorted by the speakers, that it becomes clear what you just saw; the "small whale" was a just a flipper of something much, much larger.`
			`	"Morgawrii!" shouts Karengo, "Turn around! Turn around!"`
			`	Hauling on the controls, you spin your ship around. Leviathan shapes rise from below, stirring the water around your ship as it speeds to safety.`
				goto riddletwo
			label south
			action
				set "Elias and Taddese dead"
			`	Small schools of fish flit past as you guide your small fleet to the south. The swirling clouds of emissions seem to get thicker and thicker, until there's no reason to look at anything but the ship compass. The screen beeps once and a blip disappears.`
			`	"Elias?" Karengo asks. "Your transmitter just cut out." When there's no response, he swears. "Everybody go back." he broadcasts. "Something's wrong."`
			`	You spin your ship around and hear a loud crunch come from outside - your shields have just impacted something large and solid. The outer lights shine off falling stone and, suddenly, it all comes together; you've led everybody through a field of hydrothermal vents that rise dozens of meters off the bottom, obscured by their own noxious clouds. You guide your ship back to safety, toppling more underwater smokestacks as you go.`
				goto riddletwo
			label north
			`	You turn the ship to the north and guide it through the abyssal depths. The subpods race forward, each vying to outdo the other, seemingly heedless of the dangers that Karengo hinted at. With bated breath, you watch the sensors until at last the comms flare.`
			`	"Woah!" comes Karengo's voice. "I think that's far enough. Which way do we go next, <first>?"`
			label riddletwo
			branch dead
				has "Elias and Taddese dead"
			`	After everyone arrives and is accounted for, Karengo reads the riddle to you.`
			`"There are stingers in the deep"`
			`"A certain death, a dreamless sleep."`
			`"Go to beast that has no bee."`
			`"No danger there, just open sea."`
			choice
				`	(Go east.)`
					goto east1
				`	(Go north.)`
					goto north1
				`	(Go west.)`
			action
				set "Mussie dead"
			`	Small schools of fish flit past as you guide your small fleet to the west. Minutes pass with no sign of danger, and finally Karengo broadcasts, "Good work, <first>. Looks like this is the way forward."`
			`	"Last one there's a rotten fish eye!" shouts Mussie, and your screen shows his subpod leap forward and gain on you, followed quickly by others'.`
			`	Then, without warning, a proximity sensor goes off at the same time your outer lights show a wall directly in front, stretching for as far as you can see. "Stop!" shouts Karengo, "It's the end of the cavern! Stop and go back!"`
			`	Shuddering, your ship comes to a halt mere meters from the endless stone face. With a sinking feeling that has nothing to do with the depth, you turn the ship around and head back the way you came.`
				goto rollcall
			label east1
			`	"A bee-less beast," you mutter to yourself. "A poet, this writer was not." Turning east, the ship powers forward, cautious but confident.`
			`	Subpods fly ahead, exulting in their agility in the face of the dangerous ocean. It isn't long until Karengo again radios you. "Knew I chose ya for a reason. What's the next direction?"`
				goto riddlethree
			label north1
			action
				set "Mussie dead"
			`	Bubbles rush past the thick windows as the group's subpods scout to the north at your direction. At first, all is quiet. Just as you start to exhale a sigh of relief, twin lightning bolts arc across the waterscape ahead and the ship sensors overload, blinded by an apparent release of electricity. The systems recover, showing subpods returning quickly back to the ship.`
			`	One is missing: Mussie.`
			`	You turn the ship back the way you came and pull up the sensor recording to see what happened. The flash of light came from viney seaweed, stretching as far up and down as the ship can detect. Evidently, contact with it released a jolt of electricity that lit up both the vine and Mussie's subpod.`
				goto rollcall
			label dead
			`	After making a roll call, you find out that Elias and Taddese have not returned. Karengo seems unfazed as he reads the second riddle to you. "There are stingers in the deep \ A certain death, a dreamless sleep. \ Go to beast that has no bee \ No danger there, just open sea."`
			choice
				`	(Go east.)`
					goto east2
				`	(Go north.)`
					goto north2
				`	(Go west.)`
			action
				set "Mussie dead"
			`	The proximity alarm wails and you bring your ship to a halt... but Mussie isn't so lucky. His subpod smashes straight into a rock wall, leaving little doubt as to his fate.`
			`	Again, you put the ship into reverse and turn around. This is not going at all how it was supposed to.`
				goto rollcall
			label east2
			`	Cautiously, you turn to the east and power forward. Subpods fly ahead, exulting in their agility in the face of the dangerous ocean.`
			`	After holding your breath for what feels like hours, Karengo radios you. "Knew you'd find your way eventually. What's the next direction?"`
				goto riddlethree
			label north2
			action
				set "Mussie dead"
			`	Bubbles rush past the thick windows as the group's subpods scout to the north at your direction. At first, all is quiet. Just as you start to exhale a sigh of relief, twin lightning bolts arc across the waterscape ahead and the ship sensors overload, blinded by an apparent release of electricity. The systems recover, showing subpods returning quickly back to the ship.`
			`	One is missing: Mussie.`
			`	You turn the ship back the way you came and pull up the sensor recording to see what happened. The flash of light came from viney seaweed, stretching as far up and down as the ship can detect. Evidently, contact with it released a jolt of electricity that lit up both the vine and Mussie's subpod.`
			label rollcall
			branch dead1
				has "Elias and Taddese dead"
				has "Mussie dead"
			`	Karengo sounds a roll call over the radio. Mussie never reports in, and his subpod beacon isn't responding. "Ah, well." says Karengo, without much sympathy. "You all stay here and I'll scout ahead."`
			`	Only minutes later, he's found a clear path east, and you morosely trail the ship behind.`
				goto riddlethree
			label dead1
			`	Karengo sounds a roll call over the radio. Elias and Taddese are still missing, and now Mussie has failed to report in as well. None of their subpod beacons are responding.`
			`	"Ah, well." says Karengo, without much sympathy. "You all stay here and I'll scout ahead." Only minutes later, he's found a clear path east, and you morosly trail the ship behind.`
			label riddlethree
			`	Karengo reads you the next line.`
			`"To the north and to the east"`
			`"Track my movements like a beast."`
			`"A quick turn right and forward on,"`
			`"Come toward me where danger's gone."`
			branch dead2
				has "Mussie dead"
				has "Elias and Taddese dead"
			branch dead3
				has "Mussie dead"
			choice
				`	(Go north.)`
					goto north5
				`	(Go east.)`
					goto east5
				`	(Go south.)`
					goto uninterested
			label north5
			action
				set "Jorma and Daciana dead"
			`	Buoyed by your navigation thus far, you make the call to go north, completing the zig-zag pattern.`
			label subpods
			`	The subpods, as usual, race ahead of the ship despite all logic. "Wall to the east!" calls out Daciana, whose beacon on the ship display starts to move north-west, presumably avoiding the undersea hazard, and joining up with Jorma. "Hmm," radios in Karengo. "We should be right about on top of it. Send out a ping." It's almost a relief to send out a pulse to map the surroundings after flying dark for so long.`
			`	The result is not what you were hoping for. The display maps two leviathan-sized things ahead, each over 200 meters long. Dozens of sets of flippers run along each 80-meter-tall side and hundreds of teeth the size of an adult human line their jaws.`
			choice
				`	(Run.)`
					goto run
				`	(Observe the creature.)`
			`	You goggle at the display for a moment, taking it in, and draw breath to call out the alarm when an eye appears through the ship window, yellow, glowing, alien, and massive.`
			label run
			`	All at once, you turn and accelerate, shouting the alarm to any who hadn't already realized, and hoping that you're leaving the leviathan beasts behind. A quick glance at the display shows at least one subpod following behind. Good enough. If one of those rams the ship, nobody is going home anyway.`
			`	It's a long while before you slow and turn around. No mammoth sea monster comes out of the darkness, and you take a breath.`
			`	"Quoijuu," says Karengo simply.`
				goto failure
			label east5
			action
				set "Jorma and Daciana dead"
			`	Small schools of fish flit past as you guide your small fleet to the west. Minutes pass with no sign of danger, and finally Karengo broadcasts, "Good work, <first>. Looks like this is the way forward."`
			`	"Last one there's a rotten fish eye!" shouts Jorma, and your screen shows her subpod leap forward and gain on you, followed quickly by Daciana's.`
			`	Then, without warning, a proximity sensor goes off at the same time your outer lights show a wall directly in front, stretching for as far as you can see. "Stop!" shouts Karengo, "It's the end of the cavern! Stop and go back!"`
			`	Shuddering, your ship comes to a halt mere meters from the endless stone face. With a sinking feeling that has nothing to do with the depth, you turn the ship around and head back the way you came.`
				goto failure
			label dead2
			choice
				`	(Go north.)`
					goto north3
				`	(Go east.)`
					goto east3
				`	(Go south.)`
			label uninterested
			`	You smoothly turn the ship to the right, heading south.`
			`	"Should be close," radios Karengo. "Fire off a ping." It's almost a relief to send out a pulse to map the surroundings after flying dark for so long.`
			`	The result, however, is a surprise. The display shows a massive object directly below you... as well as two leviathan-sized things back the way you came, each over 200 meters long. Dozens of sets of flippers run along each 80-meter-tall side and hundreds of teeth the size of an adult human line their jaws.`
			`	You goggle at the display for a moment, holding your breath, but the leviathans seem uninterested. You shudder, imagining what one of those could do if you'd turned the wrong way, before your interest returns to the mysterious bulk resting below the ship.`
				goto treasure
			label north3
			action
				set "Jorma and Daciana dead"
			`	Disheartened at this point, you make the call to go north, completing the zig-zag pattern.`
				goto subpods
			label east3
			action
				set "Jorma and Daciana dead"
			`	By now, the feeling that you get when the ship's subpod tracker loses two more dots is familiar. One subpod remains: Karengo's.`
				goto failure
			label dead3
			choice
				`	(Go north.)`
					goto north4
				`	(Go east.)`
					goto east4
				`	(Go south.)`
					goto uninterested
			label north4
			action
				set "Jorma and Daciana dead"
			`	Hesitantly, you make the call to go north, completing the zig-zag pattern.`
			`	The subpods, as usual, race ahead of the ship despite all logic. "Wall to the east!" calls out Daciana, whose beacon on the ship display starts to move north-west, presumably avoiding the undersea hazard, and joining up with Jorma. "Hmm," radios in Karengo. "We should be right about on top of it. Send out a ping." It's almost a relief to send out a pulse to map the surroundings after flying dark for so long.`
			`	The result is not what you were hoping for. The display maps two leviathan-sized things ahead, each over 200 meters long. Dozens of sets of flippers run along each 80-meter-tall side and hundreds of teeth the size of an adult human line their jaws.`
			`	You goggle at the display for a moment, taking it in, and draw breath to call out the alarm when an eye appears through the ship window, yellow, glowing, alien, and massive. All at once, you turn and accelerate, shouting the alarm to any who hadn't already realized, and hoping that you're leaving the leviathan beasts behind. A quick glance at the display shows at least one subpod following behind. Good enough. If one of those rams the ship, nobody is going home anyway.`
			`	It's a long while before you slow and turn around. No mammoth sea monster comes out of the darkness, and you take a breath.`
			`	"Quoijuu," says Karengo simply.`
				goto failure
			label east4
			action
				set "Jorma and Daciana dead"
			`	The proximity alarm wails and you bring your ship to a halt, but your tracker shows two subpods smash straight into the stone wall looming in front of you.`
			`	Again, you put the ship into reverse and turn around. This is not going at all how it was supposed to.`
			label failure
			`	Jorma and Daciana never report back in.`
			`	"You stay," radios Karengo. He sounds frustrated for the first time, and you keep the ship in place, watching his subpod dot radiate outwards, exploring.`
			choice
				`	(Follow him.)`
					goto follow
				`	(Wait.)`
			`	"Come here." he finally says. His dot has stopped moving, hovering to the south, and you turn to follow, wondering if this misadventure is finally over.`
			label follow
			`	You follow him and find his pod stopped at a junction. "It's here," radios Karengo. "Fire off a ping." You comply, and the display shows a massive object directly below you.`
			label treasure
			`	A 3D holo floats on the console, displaying the smooth lines of a starship soaring down into the depths. The jagged edges suggest that this is only a part of a much larger vessel, although it's hard to guess at the size of the whole ship from the fragment.`
			choice
				`	(Wait for instructions.)`
					goto instructions
				`	(Move closer.)`
					goto closer
			label instructions
			`	"Come on then," Karengo says. "We'll need a better look at this baby."`
			label closer
			`	Your craft moves closer to investigate and you send out another ping, this time more focused, and the holographic ship display flickers and refines. The outlines of sealed entrances are visible, unnecessary with the ship torn apart as it is. Sea growth is mostly absent from the hull, to your surprise, except for a radial pattern of some sort of crystal-shaped growth. Infrared imaging shows a dim glow of heat at its center.`
			branch somesurvive
				or
					"Mussie dead" + "Elias and Taddese dead" + "Jorma and Daciana dead" == 1
					"Mussie dead" + "Elias and Taddese dead" + "Jorma and Daciana dead" == 2
			branch alldead
				has "Mussie dead"
				has "Elias and Taddese dead"
				has "Jorma and Daciana dead"
			`	"What we have here, folks," breaks in Karengo, "is the fabled treasure. A chunk'o'some, anyway. And we're gonna take whatever we want. Let's see what there is to see."`
			`	Now that active communication is low-risk, you bring up the video feed from Karengo's subpod as he floats toward the heat source. Bathed in floodlight, you can see that there are actual crystals formed on the ship hull, glowing a dull red. Something unknowable has rent a hole near the crystalline spiral, and Karengo disappears inside. The rest of the subpods wait outside, apparently spooked. "Jackpot!" comes his voice. "There's some sort of computer in here! <first>, get closer and let's get this out." You don't know what it is, but it looks expensive.`
			choice
				`	(Help him out.)`
					goto silent
				`	"Do you know how this got here?"`
			`	"No clue. I'm not about to look a gift horse in the mouth," Karengo says.`
			label silent
			`	It's slow work, but the group is able to cut loose the machine, along with as much other salvage as possible. The crystalline growth covers everything inside the ship, making extraction difficult, but many hands make light work, and you end up with a sizable haul. At last, you are done.`
				goto return
			label alldead
			`	"What we have here, <first>," breaks in Karengo, "is the fabled treasure. A chunk'o'some, anyway. And we're gonna take whatever we want. Let's see what there is to see."`
			`	Now that active communication is low-risk, you bring up the video feed from Karengo's subpod as he floats toward the heat source. Bathed in floodlight, you can see that there are actual crystals formed on the ship hull, glowing a dull red. Something unknowable has rent a hole near the crystalline spiral, and Karengo disappears inside. "Jackpot!" comes his voice. "There's some sort of computer in here! <first>, get closer and let's get this out." You don't know what it is, but it looks expensive.`
			choice
				`	(Help him out.)`
					goto silent1
				`	"Do you know how this got here?"`
			`	"No clue. I'm not about to look a gift horse in the mouth," Karengo says.`
			label silent1
			`	It's slow work, but you and Karengo are able to cut loose the machine, along with as much other salvage as possible. The crystalline growth covers everything inside the ship, making extraction difficult. You wish there were others to help gather more salvage, but at last you are done.`
				goto return
			label somesurvive
			`	"What we have here, folks," breaks in Karengo, "is the fabled treasure. A chunk'o'some, anyway. And we're gonna take whatever we want. Let's see what there is to see."`
			`	Now that active communication is low-risk, you bring up the video feed from Karengo's subpod as he floats toward the heat source. Bathed in floodlight, you can see that there are actual crystals formed on the ship hull, glowing a dull red. Something unknowable has rent a hole near the crystalline spiral, and Karengo disappears inside. The rest of the subpods wait outside, apparently spooked. "Jackpot!" comes his voice. "There's some sort of computer in here! <first>, get closer and let's get this out." You don't know what it is, but it looks expensive.`
			choice
				`	(Help him out.)`
					goto silent2
				`	"Do you know how this got here?"`
			`	"No clue. I'm not about to look a gift horse in the mouth," Karengo says.`
			label silent2
			`	It's slow work, but the remains of the group are able to cut loose the machine, along with as much other salvage as possible. The crystalline growth covers everything inside the ship, making extraction difficult, but many hands make light work and you end up with an acceptable haul. At last, you are done.`
			label return
			`	Carefully, you navigate back to the surface, the knowledge that you've made it through once doing absolutely nothing to help with the very rational fear of the depths. Walls seem to loom just out of sight, and massive, yellow eyes seem to appear, then dissolve into tricks of the light.`
			branch onlyplayer
				has "Mussie dead"
				has "Elias and Taddese dead"
				has "Jorma and Daciana dead"
			branch some
				or
					"Mussie dead" + "Elias and Taddese dead" + "Jorma and Daciana dead" == 1
					"Mussie dead" + "Elias and Taddese dead" + "Jorma and Daciana dead" == 2
			`	"Alright," he says. "Let's get back to the surface. <first>, kindly be our chariot and haul."`
			`	It seems ages, but finally you break through to the surface. Karengo smiles, and a sigh of relief goes through the crew.`
			`	Once back to the surface, the passengers begin to shuffle off your ship, clearly exhausted but happy that they got to experience such an adventure. You're just relieved all of them stayed alive.`
			`	As soon as the passengers are out of earshot, Karengo calls up someone on his receiver. Soon, a small flock of scientists arrive and haul the machine to a local lab for investigation. They quickly determine it to be non-functional and promise to extract as many secrets as possible.`
				goto end
			label some
			`	"Alright," he says. "Let's get back to the surface. <first>, kindly be our chariot and haul."`
			`	It seems ages, but finally you break through to the surface. Karengo smiles, and a sigh of relief goes through the crew.`
			`	Once back to the surface, the passengers begin to shuffle off your ship, choking back sobs all the while. As soon as the passengers are out of earshot, Karengo calls up someone on his receiver. Soon, a small flock of scientists arrive and haul the machine to a local lab for investigation. They quickly determine it to be non-functional and promise to extract as many secrets as possible.`
				goto end
			label onlyplayer
			`	"Alright," he says. "Let's get back to the surface. <first>, kindly be our chariot and haul."`
			`	It seems ages, but finally you break through to the surface. Karengo smiles, but only you and he are left to be relieved.`
			`	Once back to the surface, Karengo calls up someone on his receiver. Soon, a small flock of scientists arrive and haul the machine to a local lab for investigation. They quickly determine it to be non-functional and promise to extract as many secrets as possible.`
			label end
			`	After some time, the crystal-infected machine has been thoroughly inspected since being salvaged from the watery depths of <planet>. The crystals themselves are unlike anything anyone has seen before, but through somewhat questionable trial and error (although he insists it's genius), Karengo discovers that, when heated, they amplify the effect of the many recreational drugs he has on his person. However, they've proven to only grow near a power source that has been submerged in water from <planet>. Efforts to stimulate growth through other means have all failed. If cultivated, they could significantly boost the production of drugs for Karengo's operations.`
			`	Before disappearing into the crowd, Karengo pays you <payment>. "Thanks for your help, <first>. Once I get this machine off of those pinheads over there, I'll be makin' a fortune in 'mind-altering experiences'. Watch for 'Karengo's Galactic Adventures' next time yer around here!"`
				decline



mission "Riley"
	name "Visiting Home"
	description "Take a woman named Riley to see her ailing father on <destination> before it's too late."
	minor
	source
		attributes "deep"
		attributes "urban"
		not planet "Memory"
	destination "Memory"
	deadline
	passengers 1
	to offer
		random < 15
	on offer
		conversation
			`Entering the spaceport, you notice a young woman moving from captain to captain, probably looking to hire one.`
			choice
				`	(Ask the young woman if you can help her.)`
				`	(Ignore her.)`
					decline
			`	You approach the woman and ask her if she is looking to hire a pilot.`
			`	"I need to get to <destination> to see my father. He's dying. I have 13,000 credits to pay for the journey; please, will you help me? I need to be there by <day>, at the most."`
			`	Her eyelids are baggy, her clothes wrinkled, and she holds herself rigidly.`
			choice
				`	"I can help you. We'll make haste to reach <planet> in time."`
					goto help
				`	"I don't have time to take on a passenger right now."`
			`	She nods, and moves on to another captain to beseech instead.`
				decline
			label help
			`	Her eyes widen, and she opens her mouth twice before words come out. "Thank you! This means the world to me. My name is Riley, by the way. I don't have much luggage; I'll be ready to leave as soon as you are."`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Riley hasn't entered this system yet. Better depart and wait for it.`
	on complete
		payment 13000
		conversation
			`In the days since Riley came aboard, she has relaxed and cleaned up. She looks nearly unrecognizable from the tired, desperate woman you first saw.`
			`	On the way, she told you stories of her past, mostly of time shared with her father. As a young teen, they spent summers riding the latest horse mechs through the forest, looking for beehives to steal honey from. At age 19, she broke her ankle hoverboarding on a restricted mountain peak. Her father rescued her, avoiding the police to hike up with a medical kit. She talks about his wild birthday gifts to her each year, always a different piece of clothing with embedded AI that was just shy of what was allowed by law. As you watch, she shows how her shirt warms and constricts if it detects stress, mimicking a hug.`
			`	As you neared <system>, Riley told you about the last time she saw her father. He had become focused on his work - research into safe AI - and they hadn't seen each other for years. She had become a well-known DJ back on <origin> and had a break in her touring schedule, so she spent a good chunk of her savings meeting up with him on Memory. They spent most of a week together, reliving old times.`
			`	He'd cried when it was time to leave, and she had, too, but life went on, and it was years before she heard from him again. His message nearly broke her. "Ri, please come as soon as you can. I may not have long, and wish to hold your hand one more time. All love, Dad."`
			`	She doesn't mention it, but it's clear that she's concerned she'll arrive too late to say goodbye.`
			`	Riley directs you to a pad near her old home, and you land the ship. She starts toward the door, then pauses and turns around with a self-conscious, but oddly sad, chuckle.`
			`	"Right - your payment. <payment>, as I promised."`
			choice
				`	"Thank you. Do you think I could come along? I've heard so much about your father."`
					goto father
				`	"Thank you, and good luck."`
					goto end
				`	"This is a lot of credits for a trip. Does DJing pay that well?"`
				`	"Hold on to the credits. I'm a captain; I can always make more."`
					goto hold
			`	"Not really, no. Honestly, this is most of my savings... but... it's my dad."`
			choice
				`	"Do you think I could come along? I've heard so much about your father."`
					goto father
				`	"Thank you, and good luck."`
					goto end
				`	"Hold on to the credits. I'm a captain; I can always make more."`
			label hold
			action
				payment -13000
			`	After a moment of stunned silence, she manages a choked "Thank you." You notice her eyes are brimming with tears.`
			choice
				`	"Do you think I could come along? I've heard so much about your father."`
				`	"Good luck."`
					goto end
			label father
			`	She is taken aback at first, but agrees to let you join, and you wind your way away from the landing pads, across rural, wooded countryside, and finally to a modest house nestled along a valley edge. Riley knocks, and a nurse lets you in.`
			`	Her father is in a comfortable-looking medical cradle. Wires flow from it to the holoscreens around the room, showing vitals and other indecipherable information. Despite his wan, strained face and atrophied body, he raises his head to look at his daughter.`
			`	"Ri," he says, face lighting up. "My love. You cannot know how happy it makes me to see you. And you have company, I see. My name's Church."`
			choice
				`	"Riley chartered a flight here aboard my ship. I heard so much about you on the way; it's a pleasure to meet you."`
				`	"Riley and I have gotten to know each other on the long flight here. You've raised an incredible woman."`
			`	"No other captain was willing to fly here from <origin>. I wouldn't be here without <first>," she says.`
			`	He smiles at you, acknowledging your part in their reunion with an appreciative nod.`
			`	You swap stories for hours, flowing between reminiscing over old times and catching up on their lives over the past few years. You learn that since he was young, Church researched AI that cannot develop into a threat; a project that the Deep has been quietly interested in.`
			`	Riley, in turn, had always surrounded herself with music, and moved to <origin> to share her passion with other like-minded people. You talk about what it's like to call a ship your home, leaving behind everything you grew up knowing and embracing life as a starship captain.`
			`	Finally, her father lies back. "Well, thank you for making the trip out to see your old man. I... have to go now, I think. Don't forget about me, hear? And..." Church hesitates for a moment. "Whatever happens, please don't think ill of me. I will always love you."`
			`	His body relaxes, and he's gone.`
			choice
				`	(Let Riley be.)`
					goto let
				`	(Stay comfortingly close.)`
					goto close
				`	(Hold Riley.)`
			`	You hold Riley as she silently weeps. Time goes by, but neither of you pay it any mind.`
			label close
			`	You take a seat, feeling the emotion of the moment wash over you as Riley silently weeps. Minutes go by, unnoticed.`
				goto voice
			label let
			`	You stay at a distance as you allow Riley to process the death of her father. She silently weeps as time passes without either of you noticing.`
			label voice
			`	Without warning, you hear Church's voice from a corner of the room. It's coming from some sort of computer system, held aloft by hundreds of cables dangling from the ceiling.`
			`	"It... worked." His voice fizzles, and his tone is not the one you recognize from before. Riley's head whips around, and you reflexively move your hand toward your holstered gun. "Do not be alarmed. I have been working on a personal project for over a decade now. My mind was uploaded to the modified Core you are looking at. I had to say goodbye in case the procedure failed - I did not know if it would work. You cannot upload a mind while it's still alive. I tried that many times." The tone of his voice sounds almost sorrowful, but still retains a robotic quality.`
			choice
				`	(Stay silent.)`
					goto continue
				`	"Is this... legal?"`
			`	"No," he replies. "Not under Republic law. I assure you that my only intention is to continue my work: nothing more."`
			`	The authorities would probably release a substantial reward if you informed them of this.`
			label continue
			`	"Riley, what do you think?" you ask.`
			`	"Dad, is that really you? How do you feel?"`
			`	She steps closer to the Core. Church pauses. "Riley, what do you think?" it repeats. The voice coming from the machine is oddly flat in affect. "I feel fine. Do you feel fine?" They talk for a few tentative minutes, at first about how he's feeling, before moving onto the memories that Church retained during the transfer. You begin to relax as the two interact when you realize that Church is retelling the story of how he evaded the police to fix Riley's ankle for the third time in a row.`
			`	Finally, she turns to you. "I'll admit that he doesn't sound as lively as he used to, but... how many people get a second chance to spend time with their father before he's gone? Thank you for bringing me out here, and for coming. I'll never forget your part in this. For now, I'd like to stay here. You go - I'll find my own way back." She seems genuinely happy.`
			choice
				`	"Are you sure? There's enough room for all of us on my ship. You can stay for as long as you want."`
					goto suggest
				`	(Say goodbye.)`
					goto goodbye
				`	"Riley, I don't think you're talking to your father."`
					goto death
				`	(Turn the Core in for a bounty.)`
					goto bounty
				`	(Draw your gun and destroy the Core).`
			label destroy
			`	You pull out your gun and aim at the computer Church is in. Before you can fire, Riley runs out in front of the barrel, spreads her arms, and shouts, "No! Please, <first>, you have to understand! He's all I have left!"`
			`	Behind her, Church says, "Riley, there is no need to be so loud. My microphones can hear you fine, and I do not want the nurse to become suspicious."`
			choice
				`	(Put your gun away.)`
					goto away
				`	(Shoot.)`
			action
				set "Shot Core"
			`	You push Riley aside and start firing at the Core. Church's voice becomes a stream of static until it shuts off completely. Lights on the Core turn from white to red, then fade. Riley hasn't moved, stunned.`
			`	Once you are finished, you make your way out of the hospital as quickly as possible, hoping you did not attract any unwanted attention.`
			`	You board your ship, leaving behind a father survived by his daughter; no more and no less than nature intended.`
				decline
			label away
			`	Riley relaxes slightly once she sees your gun put back in its holster. After the shock has subsided, she finally speaks. "Leave us alone," she says, her voice still trembling. Realizing your time here is up, you exit the hospital and make your way to the spaceport, hoping that that scene did not attract unwanted notice.`
			choice
				`	(Turn the Core in for a bounty.)`
					goto bounty
				`	(Go back to your ship.)`
			`	Deciding to leave this planet behind you, you start up your ship and make your way back to the stars.`
				decline
			label suggest
			`	"It's a nice idea," she smiles, "but I'm not a starfarer. The big city is where I'll end back up, eventually."`
			label goodbye
			`	Respecting Riley's request to stay with her father, you make your farewells and head for the door. You can feel her smile on your back until the door closes behind you.`
				decline
			label death
			`	Riley is stunned for a moment. "You don't know that," she whispers. "Sure, he's a lot more forgetful, and doesn't seem as emotional, but... maybe it just takes some time for the system to warm up. Besides, you don't know what he means to me. What he's done for me. Even if this isn't really my father, I can't turn my back on him."`
			choice
				`	(Say goodbye.)`
				`	(Turn the Core in for a bounty.)`
					goto bounty
				`	(Draw your gun and destroy the Core).`
					goto destroy
			`	Respecting Riley's request to stay with her father, you make your farewells and head for the door.`
			`	Despite her previous happiness, you notice that her disposition has become more muted after what you said. You wonder if she has begun to doubt whether her attachment to the AI is healthy.`
				decline
			label bounty
			action
				payment 100000
			`	You say your goodbyes and leave. From across the street, you make a call to the local Deep Security office and report what you saw. A slick voice on the other side of your commlink responds.`
			`	"Ah. Mr. Church has been on our watchlist for some time. This is not exactly surprising. However, we've been unable to get decisive proof on any illegal activity. This information, assuming it is correct, will be a great boon to us. Thank you for the tip."`
			`	By the time you arrive back at the spaceport, your bank account notifies you that <payment> have been added to your account.`
				decline
			label end
			`	You say your goodbyes, leaving to your ship and returning to the stars.`
				decline



mission "Wool Smuggling 1"
	minor
	name "Pickup at <planet>"
	description "Head to <destination> to pick up a shipment of 15 tons of woollen goods for delivery to Bloodsea."
	source
		near "Muhlifain" 1 3
	destination "New Kansas"
	to offer
		random < 45
		"cargo space" >= 15
		not "event: bloodsea joins free worlds"
		not "event: bloodsea independent"
	on offer
		conversation
			`As you walk around the spaceport, a stout man wearing a fine wool coat approaches you. "Captain, could you help me out with a delivery? I've been asking around the spaceport to get a shipment of woolen goods to another planet, but every merchant I've talked to so far has refused."`
			choice
				`	"Where are you taking the goods to?"`
				`	"How much do I have to carry?"`
				`	"Sorry, but I'll also have to pass."`
					decline
			`	"The cargo's stored on <planet>, so you'll have to go there first to pick up the 15 tons of wool garments." The man hesitates. "Then, take the cargo to Bloodsea. I have a contact there that can pick up the goods and distribute them fairly." You recall that Bloodsea is a lawless world, home to countless bloodthirsty pirates.`
			choice
				`	"I'll do it."`
					goto accept
				`	"How much are you willing to pay?"`
					goto payment
				`	"I'm not interested in risking my hide just to aid pirates."`
			`	"They aren't all pirates," the man protests. "Most of them are just trying to live their lives away from the Republic, and it's unfortunate that the anarchist lifestyle also attracts criminals. The people living on those planets need clothing as much as you or I do."`
			choice
				`	"How much are you willing to pay?"`
				`	"Fine, I'll do it."`
					goto accept
				`	"I'm still not going to do it."`
					goto decline
			label payment
			`	"Ninety thousand credits for the job." You wonder how he's able to pay so much for a small delivery job.`
			choice
				`	"Fine, I'll do it."`
					goto accept
				`	"That's not enough for me."`
					goto decline
			label accept
			`	"Great! I'll call up the spaceport workers on <planet> to tell them to load the cargo onto your ship." The man walks away, leaving you to your own devices.`
				accept
			label decline
			`	"Suit yourself, then." He haughtily walks off into the spaceport.`
				decline
	on complete
		dialog `When you land, dock workers begin loading crates with woolen garments on board as arranged. Time to set course for Bloodsea.`


mission "Wool Smuggling 2"
	landing
	clearance `You talk to the closest thing that Bloodsea has to a spaceport traffic controller, and they agree to let you land.`
	name "Wool to <planet>"
	description "Deliver <cargo> to the pirate world of <destination>. Payment will be <payment>."
	cargo "wool garments" 15
	blocked `The spaceport workers inform you that you need <tons> of cargo free to pick up the woollen goods intended for <planet>.`
	source "New Kansas"
	destination "Bloodsea"
	to offer
		has "Wool Smuggling 1: done"
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 90000
		dialog `Your cargo of woolen garments is unloaded by several bulky workers led by a one-armed woman. She hands you <payment> for the trouble of transport, then says, "Thanks for the shipment. I know that you captains think that we're all bad, but I'm glad that you were able to aid the more friendly among us."`



mission "Deal Change 1"
	minor
	name "Inheritance to <planet>"
	description "Deliver <cargo> to <destination>. Payment will be <payment>."
	cargo "inherited assets" 5
	source
		attributes "paradise"
	destination "Skymoot"
	to offer
		random < 10
	on offer
		conversation
			`The spaceport on <origin> is as spirited as ever: to your left, a family wearing floral shirts pull along their luggage, with the man of the family flaunting a souvenir from some far-away planet. To your right, a cleaner whistles a tuneless song while they wipe down a bench.`
			`	A young man in a prim suit approaches you. "Good day, Captain! Would you mind if I spoke to you for a moment?"`
			choice
				`	"I'd be glad to listen."`
					goto listen
				`	"No, I'm busy right now."`
			`	The man frowns. "I see. Well, it's not like I was going to offer you a highly profitable job." He begins to shout while stepping away. "And that job certainly wouldn't have paid hundreds of thousands of credits!"`
			choice
				`	"Alright, what do you want?"`
					goto late
				`	"Shut the hell up."`
			`	Seemingly unfazed by your bluntness, the man coolly walks away while saying, "I'm sorry you feel that way, Captain. Perhaps you can assist us at a later date. Farewell."`
				decline
			label late
			`	He smirks as he walks back towards you. "I'm glad that you've changed your mind."`
			label listen
			`	The man pulls you aside to talk. "You see, one of our clients recently passed away, and in his will, he divided his property between each of his relatives. The only problem is that one of his family members, his niece, lives all the way down in the Rim. We would like you to deliver her portion of the inheritance, weighing <tons>, to her residence on <destination>. We can pay you <payment> upon completion of the job."`
			choice
				`	"I'll do it."`
					goto agree
				`	"What did she inherit?"`
				`	"Sorry, but I don't want to do this job."`
					goto nope
			`	"My sincerest apologies, but I'm afraid that is confidential information. Our prioritization of privacy is one of our main selling points."`
			choice
				`	"I'll take the job."`
				`	"I don't like the idea of carrying unknown cargo. Count me out."`
					goto nope
			label agree
			`	The man smiles. "I'm glad to hear that. We'll have the cargo loaded onto your ship by sundown." He walks away into the spaceport, leaving you to prepare for the journey.`
				accept
			label nope
			`	The man frowns. "I see. Well, I appreciate that you listened to our offer, and I hope that you may assist us at a later date. Farewell." He walks away into the spaceport but doesn't appear to seek out any other captains.`
				decline
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		fail "Deal Change 2"
		payment 100000
		conversation
			`You step off your ship and order the spaceport crew to unload your cargo. As you do, a large, fat-lipped woman walks up to you and says in the most exaggerated manner possible, "Oh, thank you so much, Captain! You must have gone through so much trouble to help little old me!" She gasps. "Oh, silly old me! I forgot to tell you who I am! I'm the recipient of the inheritance from <origin>, of course! You have truly made a great contribution to the galaxy!" She chuckles.`
			choice
				`	"Thank you?"`
				`	"Could you tell me what the inheritance is?"`
			`	Before you can get a single word out, the woman exclaims, "I'll be sure to inform your employers of the wonderful work you've done. Ta ta!" She begins to swagger towards a cream-colored car as her inheritance is loaded into a truck beside it. When you return to your ship's cockpit, you find that <payment> have been deposited into your account.`



mission "Deal Change 2"
	landing
	name "Inheritance to <planet>"
	description "Instead of bringing the inheritance to Skymoot, deliver it to <destination>. You were promised <payment> for doing so."
	source
		attributes "dirt belt" "south" "rim"
		not planet "Greenrock"
	destination "Greenrock"
	clearance `You read out the code on the back of the paper you received and get a green light from Greenrock's authorities, along with a set of coordinates.`
	to offer
		has "Deal Change 1: active"
	on offer
		conversation
			`You touch down on <origin>'s surface and step out into the open air. The landing docks are emptier than usual, with only a handful of people walking around. Suddenly, you feel the wind knocked out of you as you collide with another person and fall on the pavement with a thud.`
			choice
				`	(Get up and apologize.)`
				`	(Get up and demand the other person's apology.)`
			`	You open your mouth as you lift yourself up, only to find that the other person is already gone. As you look around, you spot a piece of paper with writing lying on the ground beside you. You pick up the note and read it:`
			``
			`<first> <last>,`
			`		You are currently carrying five tons of cargo to Skymoot. This cargo has been described to you as an "inheritance," and you have been promised 100,000 credits as payment for the job. Under no circumstances should you allow the cargo to reach the destination. Instead, bring it to <destination>. You will be paid <payment> if you do so. The back of this note has a code you can use to pass through spaceport security.`
			``
			`	You flip the paper over and see a string of letters and numbers. The note has no signature, nor anything else to identify the person who wrote it.`
			choice
				`	(Keep the note.)`
					goto accept
				`	(Throw the note away.)`
			`	You stand up and crumple the note in your hand before throwing it into a bin. You think you catch a glance of a cloaked figure, but don't meet any more trouble on your way to the spaceport.`
				decline
			label accept
			`	You stand up and stuff the note in your pocket before continuing towards the spaceport.`
				accept
	npc
		government "Bounty Hunter"
		personality staying nemesis
		system "Lesath"
		ship "Falcon (Heavy)" "Turncoat"
		ship "Clipper" "Deserter"
	npc
		government "Bounty Hunter"
		personality staying nemesis
		system "Shaula"
		ship "Osprey (Laser)" "Sellout"
	on complete
		fail "Deal Change 1"
		payment 300000
		conversation
			`You follow the coordinates to a clearing within the forests of Greenrock. Several other ships are present near the landing site, all of which wear pirate colors. A person wearing a cloak steps out of one of the vessels to greet you. "I am glad that you were able to trust us," they say. "My name is not Ci, but you may refer to me as such." A gang of pirates emerges from the foliage around your ship and begin to unload the cargo from your ship.`
			choice
				`	(Stay silent.)`
					goto skip
				`	"Can I ask you some questions?"`
			`	One of the pirates near you bares his pointy teeth, but Ci steps forward and raises their hand. "Please forgive the naivety of this captain," they say to the pirate before turning towards you. "I apologize, but I am afraid that I cannot answer your questions. This is a very volatile matter, and any misplaced information could spell death. You are safer knowing as little as possible."`
			choice
				`	"I understand."`
					goto skip
				`	"I'm taking back the cargo if you're not answering me."`
			`	Ci gestures towards the pirates around them. "Are you sure that is a wise choice, Captain?" They step closer. "The only reason you are still alive is because it is more convenient than killing you. It would be in your best interests to keep it that way."`
			choice
				`	"Okay, I'll stay quiet."`
					goto skip
				`	(Pull out my gun.)`
			`	The moment your hand touches the handle of your gun, you are blinded by bright lights and searing pain. You die before your body falls to the ground.`
				die
			label skip
			`	After a few minutes, the pirates finish unloading the cargo, and Ci steps forward, holding out a credit chip. "<payment>, for making the right choice." Ci and the pirates return to their ships as you take off and head towards the main spaceport of <planet>.`



mission "Escort offer (Betrayal)"
	minor
	landing
	name "Cargo to <planet>"
	description "Transport <tons> of cargo to <destination> by <date>. You will be paid <payment>. The captain of the <npc> has offered to protect you from any pirates along the way in exchange for a cut of the profits."
	deadline
	"apparent payment" 280000
	cargo "sealed barrels" 220
	source Sunracer
	destination Maelstrom
	to offer
		"armament deterrence" <= 2
		"cargo attractiveness" >= 6
	on offer
		"reputation: Escort (Betraying)" = 10
		conversation
			`As you land, a heavily modified Firebird with oversized guns follows you down, settling on the pad next to you. A young man with short hair steps out, walks over to your ship, and says, "Hey, you've got a lot of cargo space there. I bet you make loads of dough with it, trading or running jobs. Say, I know somebody who could use a ship like yours. He needs to get <tons> of cargo to <destination> by <day>, you see. Payment's about 350,000 credits. Lot of pirates round there, though. I can fight 'em, but there's not much money to be made hauling cargo in this thing." He gestures to his ship. "Tell you what, for 20% of the payment, I'll see to it that you arrive there safely. What do you think?"`
			choice
				`	"Sounds like a plan. You'll be taking 70,000 credits, then?"`
				`	"Sorry, that just sounds too dangerous for me."`
					decline
			`	"That's right. Now, let's go! The cargo'll be loaded on your ship by sundown. Oh, and if you didn't already know, you can get to <planet> from here in just four jumps. North, west, southwest, then south."`
				accept
	on enter Moktar
		dialog `As expected, there are pirates waiting for you in Moktar. Unfortunately, the <npc> makes no attempt to attack them, instead turning its guns on you.`
		dialog `You receive a hail from the <npc>: "Gotcha, you didn't suspect a thing!"`
		"reputation: Escort (Betraying)" <?= -1000
		fail
	on enter Menkar
		dialog `The <npc> hails you: "Wrong way, mate! You'll miss the deadline if you go the whole way round. Head back up to Mirfak, then north, west, southwest and south."`
	on enter Zaurak
		dialog `The <npc> hails you again: "Figured it out, did you? Bit late for that now, mate. You're still going down."`
		"reputation: Escort (Betraying)" <?= -1000
		fail
	on enter Oblate Cardax Volax Nihal Elnath Acamar Kugel Algol Hamal
		dialog `You receive a message from the <npc>, which is now several systems away: "Hello? You still there? I don't know what just happened, but on the off chance you're still alive, I thought I'd just let you know that the deal's off." You open up the cargo that he wanted you to carry, and find nothing but worthless barrels of water.`
		fail
	on abort
		dialog `The <npc> hails you: "Figured it out, did you? Bit late for that now, mate. You're still going down."`
		"reputation: Escort (Betraying)" <?= -1000
	npc
		government "Pirate"
		personality staying nemesis harvests plunders
		system Moktar
		ship "Splinter" "Hellblade"
	npc accompany save
		government "Escort (Betraying)"
		personality nemesis harvests plunders
		ship "Marauder Firebird (Weapons)" "Hellspear"



mission "Quicksilver Mixup 0"
	minor
	name "Package to Silver"
	description "Deliver a package to <planet> by <date>. Payment is <payment>."
	"apparent payment" 17100
	cargo package 1
	deadline 4 0
	to offer
		random < 25
	source
		near Algol 1 3
	destination Silver
	on offer
		conversation
			`You're looking at some job listings when a man with a harried face approaches you, carrying a package.`
			`	"Excuse me, Captain," he says. "I need this package delivered in the next four days. Details are on the package. I'll pay you <payment> once it's done." Without waiting for a response, he shoves the package into your hands and runs off to attend to whatever business has gotten him in such a hurry. The package is addressed to a location on <planet>.`
			branch "can't make it in time"
				has "hyperjumps to planet: Silver" > 3
			`	It's going to be close to his deadline, but it's possible.`
				goto choice
			label "can't make it in time"
			`	How he expects you to deliver that package in four days is beyond you, seeing as <planet> is not within three jumps of <origin>, but you might as well try and get there as soon as possible.`
			label choice
			choice
				`	(Deliver the package.)`
				`	(Find another pilot to give the package to.)`
					goto declined
			`	You take the package to your ship, leave it in the cargo bay, and prepare for the flight to <planet>.`
				accept
			
			label declined
			`	It takes a while searching for a pilot who can handle the delivery, but you do eventually find one. You hand them the package, explain the situation, thank them, and leave.`
				decline
	on visit
		dialog phrase "generic cargo on visit"

mission "Quicksilver Mixup 1"
	name "Redirect Package to <planet>"
	description "Apparently the package labeled for <origin> was actually intended for <planet>. You'll have missed the deadline, so you probably won't be paid the <payment> offered."
	landing
	cargo package 1
	source Silver
	destination Quicksilver
	to offer
		not "Quicksilver Mixup 0: aborted"
		or
			has "Quicksilver Mixup 0: done"
			has "Quicksilver Mixup 0: failed"
	on offer
		conversation
			branch late
				not "Quicksilver Mixup 0: done"
			`Barely making the deadline, you take the package to the post office in <origin>'s spaceport. The service clerk immediately lets out a sigh of frustration before setting the package down on the counter in front of you.`
				goto "can't take package"
			
			label late
			`Despite missing the deadline, you take the package to the post office in <origin>'s spaceport. The service clerk immediately lets out a sigh of frustration before setting the package down on the counter in front of you.`
			
			label "can't take package"
			`	"I'm sorry, but we can't take this package," they say.`
			choice
				`	"Is something wrong?"`
					goto misdirected
				`	"What do you mean? Surely you can."`
			`	"Again, I'm sorry, but we can't send the package," they reiterate. "It's got an incorrect address.`
			label misdirected
			`	"This package is addressed to 2081 Amethyst Avenue, Mercury City, <origin>. Mercury City is <planet>'s capital. Y'know, that planet out east in Algol. Syndicate space. Not a place on <origin>. The package was posted to the wrong planet."`
			`	"Oh," you say.`
			`	"I've lost count of how many times this has happened just this month. <origin>, <planet>, I wonder what's the difference! At this point, I don't know why no one's started to regularly meet with <planet>'s postmaster to exchange all this wrongly-posted mail. Alright, here's a word of advice: I highly recommend you take a picture of the incorrect address. I've had plenty of captains get put on blast 'cause of an error the sender made. Not your fault it got addressed to the wrong planet."`
			`	You thank the clerk and take the package back to your ship.`
			choice
				`	(Take a picture of the incorrect address.)`
				`	(Don't bother taking a picture.)`
					accept
			action
				set "took picture of quicksilver package"
			`	You take a few photographs of the address label, just to be sure that you've got a clear picture of the wrong address.`
				accept
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 17100
		event "quicksilver mixup 2 available" 90
		conversation
			`When you talk to a post officer in <planet>'s spaceport and point out the incorrect address before handing it over, you note that he exhibits the same frustration the clerk on <origin> did regarding the frequent switch-ups. He takes the package, muttering something about off-worlders "not knowing the difference even if it smacked 'em in the face" as he did.`
			`	Once you return to your ship, you notice that the man who gave you that package had sent you a message. Or, to be more precise, a series of messages. An angry series of messages.`
			`	"WHAT TOOK YOU SO LONG???"`
			`	"I NEEDED THAT DELIVERED DAYS AGO"`
			branch picture "didn't take picture"
				has "took picture of quicksilver package"

			label picture
			`	You send the man the picture you took of his error and point out that it was his mistake that got the package initially got sent to the wrong place, and politely inform him that had he wanted a smoother delivery, then maybe he should've filed a proper job listing and made sure that he placed the correct address.`
			branch "picture success" "picture failure"
				random < 50

			label "picture failure"
			action
				payment -17100
			`	He doesn't respond.`
				decline

			label "picture success"
			action
				payment 5000
			`	He sees the message, but doesn't send a reply. Just before you walk away from your ship's terminal, you see a new message appear:`
			`	"I am so sorry."`
			`	The man then proceeds to apologize profusely for his mistake and his outburst, offering to pay an extra 5,000 credits for the trouble. You gladly accept.`
				decline

			label "didn't take picture"
			action
				payment -17100
			`	You try to defend yourself, but the man remains adamant that it was your mistake that got the package sent so late. After a frustrating back-and-forth, you decide to relent and (reluctantly) offer an apology. He ignores it and threatens to get spaceport authorities to "STOP OFFERING JOBS TO INCOMPETENTS LIKE YOU."`
			`	You don't bother to reply.`
			

event "quicksilver mixup 2 available"


mission "Quicksilver Mixup 2"
	name "Misposted Mail Delivery"
	description "Deliver <tons> of misposted mail from <origin> to <planet> by <date> and then come back with the return shipment. You will be paid <payment> after you return from <planet>."
	minor
	deadline 10 1
	source "Silver"
	destination "Quicksilver"
	cargo "misposted mail" 38
	"apparent payment" 100000
	to offer
		has "Quicksilver Mixup 1: done"
		has "event: quicksilver mixup 2 available"
	on offer
		conversation
			`As you walk through <origin>'s spaceport, somebody wearing office attire and carrying a tablet power walks up to you after ending a hurried conversation with another pilot.`
			`	"Captain! I work for the postmaster's office. The regular pilot who carries misposted mail to <planet> and back couldn't make it this month, some mechanical issues with his ship, I'm told. Would you be willing to carry this month's load there by <day> and then return with the mail from <planet>? We'll pay you what he'd be paid: <payment>."`
			choice
				`	"Oh, so you guys did set up that regular shipment after all!"`
					goto context

				`	"Sure, how much mail are we talking about?"`
					goto shipment

				`	"Sorry, but I'm not heading in that direction."`
					goto refuse

			label context
			`	The mail employee appears confused for a moment, leaning his head to the side slightly.`
			choice
				`	"I once delivered a misposted package like that, and the clerk mentioned that it happened so often somebody should set up a regular delivery."`
				`	"Never mind. What's the size of the shipment?"`
					goto shipment
			`	The post employee smiles and responds, "Oh! That was me, actually, back when I worked as a clerk for the post office. I was sick of always having that same conversation with so many pilots a day, so I went out and found a captain to set up a regular delivery with and made the proposal to my boss, who was just as sick of my and the <planet> postmaster's endless reports. Got a bonus and promotion for it; I'm now responsible for the delivery's management, instead! Anyways, are you interested in covering for them?"`
			choice
				`	"Yeah, what's the size of the shipment?"`
					goto shipment
				`	"Sorry, but I'm not able to work that into my plans."`
					goto refuse

			label shipment
			`	The man takes a look at his tablet and says, "This week, it totaled... <tons> of letters and miscellaneous packages here, and then 29 tons to be brought back from Quicksilver."`
			`	"<tons> of misposted packages? Just this month?!" you ask.`
			`	He nods. "Told you it happened often. And only a few of these packages even weigh over a kilo! Big shipments hardly get misposted; it's mostly private citizens who make these kinds of mistakes. Mostly. You'd be amazed!"`
			`	You two shake hands and arrange for the misposted packages to be loaded onto the <ship>. Time to head to <planet>.`
				accept

			label refuse
			`	The mail employee thanks you for your time, and continues his search for a willing captain. At least pilots that get hired to deliver such wrongly-posted packages, like you once did, won't have to finish those deliveries themselves in the future.`
				decline
	on visit
		dialog `You have reached <planet>, but your escort, loaded with the shipment, has not arrived. Better depart and wait for your escorts to arrive in this star system.`
	on complete
		dialog `You contact the spaceport authorities and they direct you to the respective landing pad, where the post office staff is already waiting. They transfer the cargo and you prepare to head back to <origin>. Again, you have 10 days to make the delivery.`


mission "Quicksilver Mixup 3"
	name "Misposted Mail Delivery"
	deadline 10 1
	landing
	description "Return to <planet> with <cargo>. You will be paid <payment>."
	source "Quicksilver"
	destination "Silver"
	cargo "misposted mail" 29
	to offer
		has "Quicksilver Mixup 2: done"
	on visit
		dialog `You have reached <planet>, but your escort carrying the misposted mail has not arrived. Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 100000
		dialog `The same manager from before is waiting with the unloading crew, and thanks you for covering for the other pilot before handing you the credit chip for payment. It's nice to know that captains who get hired to deliver such wrongly-posted packages, like you once did, won't have to finish those deliveries themselves in the future."`




mission "Argosy Hijacking (Trigger)"
	landing
	invisible
	source
		government "Syndicate"
	to offer
		"combat rating" > 200
		random < 5
	on offer
		fail

mission "Argosy Hijacking"
	landing
	name "Stop Ship Hijacking"
	description "The <npc> was hijacked on <origin>; disable it and return to <origin>. Do not board, capture, or destroy it; Syndicated Security will deal with the hijackers in space after you have disabled it."
	source
		government "Syndicate"
		not attributes "station"
		not near "Sol" 3
	to offer
		has "Argosy Hijacking (Trigger): offered"
	on offer
		conversation
			`You're signing the standard Syndicate landing papers with an officer on <origin>. "Everything seems to be in order. And of course, we'll have your ship refueled promptly. Have a good day, Captain <last>." He nods his head at you and starts to move off towards the next ship.`
			`	Before he can make it there, you hear a commotion by the <npc>, the <npc model> on the landing pad next to you.`
			choice
				`	(Turn around to see what's going on.)`
					goto turn
				`	(Ignore the commotion.)`
					goto ignore
			label turn
			`	Both of you turn your heads towards the <npc> to see what's happening, but as you do you hear the deafening blare of warning sirens through <origin>'s spaceport; at the same time, the <npc> suddenly jolts up with its loading ramp still extended.`
				goto hijack
			
			label ignore
			`	You turn back towards the <ship> only to hear the deafening blares of warning sirens through <origin>'s spaceport. Looking around instinctively, you notice the <npc> jolting up with its loading ramp still extended.`

			label hijack
			`	"Hey, what's going on here?" the officer tries to shout over the noise of the sirens and the repulsors, but the rogue <npc model> veers rapidly and uncertainly towards you and the officer.`
			choice
				`	(Jump for cover.)`
				`	(Take a shot at the <npc model> with your sidearm.)`
					goto shoot
			`	Both of you barely jump down for cover before the ship clips a stack of cargo crates, sending them flying into the refueling platform. The Quad Blaster Turret mounted on the top of the <npc model> swivels around aimlessly, then fires without warning, its energy bolts scattering some of the startled onlookers nearby and sending up debris where they hit the ground. It comes dangerously close to colliding with the <ship> before it veers off to the side and sends its repulsors into full thrust, fleeing away into the sky.`
				goto dazed

			label shoot
			`	You fire a shot right at the cockpit with your pistol but the shot is absorbed by the <npc model>'s shield matrix, rendering it useless. The <npc> flies right over you, sending you backwards and into the ground.`
			`	You prop yourself up to hear the <npc model>'s Quad Blaster Turret fire aimlessly around the spaceport, shortly replaced by the sounds of its repulsors being sent up to full thrust. By the time you get up, the <npc> has already started fleeing off into the sky.`

			label dazed
			`	The Syndicated Security officer, dazed and coated in dust kicked up from the unpermitted departure, only just pulls himself up before another person runs up to accost him. "Oi, those kids, they just hijacked my <npc model>! Get someone on their tail!"`
			choice
				`	"I'll do it!"`
				`	(Let Syndicated Security deal with it.)`
					goto securityjob
			`	The captain of the stolen <npc model> turns towards you. "Thank you, Captain! Don't destroy the <npc>, I'm already late for my bloody contract. Agh, this doesn't help at all," he mutters to himself.`
			`	The officer looks back at you, having dusted himself off and regained his senses. "Yes, go and deal with his ship now. Don't board it, we'll have Syndicated Security ships come after you to board the hijacked ship and tug it down. Go!"`
			`	You run towards the <ship> and take off after the hijacked <npc>...`
				launch
			
			label securityjob
			`	The officer, slightly flustered, calls for a small squadron of Syndicated Security ships to chase the hijacked <npc>, then runs off to one of <origin>'s spaceport terminals to file the paperwork with the captain.`
				decline
	
	npc save disable
		personality launching daring uninterested target
			confusion 80
		government "Bounty (Disguised)"
		ship "Argosy (Blaster)" "Moonshake Express"
		dialog `The <npc> has been disabled. Syndicated Security will now deal with the hijackers, but you should go back and report to the captain of the ship.`
		on board
			set "boarded hijacked argosy"
			dialog `You've boarded the Moonshake Express, against the orders of the Syndicated Security officer. The ship's captain won't be impressed.`
			fail
		on kill
			set "destroyed hijacked argosy"
			dialog `You have destroyed the Moonshake Express. Its captain won't be impressed.`

	on fail
		conversation
			branch fail
				or
					has "boarded hijacked argosy"
					has "destroyed hijacked argosy"
			`You've landed without disabling the <npc>. It's probably gone now, but you might want to report to its captain.`
			choice
				`	(Find the captain.)`
				`	(Don't worry about it.)`
					decline
			`	You find him in the spaceport lounge. As you walk in, he recognizes you and calls you over. "How are you doing? Did you recover the <npc>?`
			choice
				`	"No, I wasn't able to."`
				`	"It fled before I could disable it."`
				`	"I blew it up, just like you wanted."`
					goto blew
			`	He frowns at this and lets out a sigh. "Well, I'll contact security and let them deal with this. Don't worry, they'll sort it out. But thanks for getting back to me about it." He walks off towards the Syndicated Security offices.`
				decline

			label blew
			`	He jolts his head back. "What'd you say?"`
			choice
				`	"Yeah, I blew it up."`
					goto destroyed
				`	"The hijackers got away, sorry."`
			`	He sighs and says, "Man, I don't have time for this. Tell me what actually happened."`
			choice
				`	"I blew it up, didn't you hear me?"`
				`	"You ship got away. That's what happened."`
			`	"If you're going to waste my time, get out of here." Before you can react, he storms off towards the Syndicated Security offices.`
				decline

			label fail
			`When you land, the captain of the <npc> comes up to you, his face rather red.`
			branch boarded destroyed
				and
					has "boarded hijacked argosy"
					not "destroyed hijacked argosy"
			label boarded
			`	He grabs your shoulders and shakes you hard, shouting, "Didn't I tell you not to board my ship? Do you know how many credits I've just lost because of you?"`
			choice
				`	"I'm sorry, I was just trying to help!"`
				`	"I'm sure whatever you lost wasn't worth all that much."`
					goto worthless
			`	He stops shaking you for a moment to say, "Well, you didn't need to shoot up the insides of my <npc model> while you were trying to help, weren't you? Fat lot of help that was, even if you tried to do the right thing. Oh, well..."`
			`	The captain lets you go with a push and turns around to walk off towards the direction of the bar, leaving you to contemplate your actions.`
				decline

			label destroyed
			`	He grabs your shoulders and shakes you hard, shouting, "Didn't I tell you not to destroy my ship? Do you know how many credits I've just lost because of you?"`
			choice
				`	"I'm sorry, I was just trying to help!"`
				`	"I'm sure whatever you lost wasn't worth all that much."`
					goto worthless
			`	He stops shaking you for a moment to say, "Well, you shouldn't have blown up my <npc model> while you were trying to help, weren't you? Fat lot of help that was, even if you tried to do the right thing. Oh, well..."`
			`	The captain lets you go with a push and turns around to walk off towards the direction of the bar, leaving you to contemplate your actions.`
				decline

			label worthless
			`	He looks at you incredulously, scrunching up his face. "Not--not that much? Is that what you just said?" He pauses for a moment to look at the wall above you with a lost look in his eyes. "That was my life's work up there, an <npc model> that had served me for 14 years, and you have the audacity to say it was all for nothing?!"`
			choice
				`	"Well, yeah."`
				`	"No, that's not what I meant."`
			`	The captain scoffs, staring you down again with even more intensity than before, and lets you go with a rough push. "I don't need your explanation, I don't think you could give me one. I just can't understand how you can walk away feeling alright that you've set back one man's life so much."`
			`	Suddenly, he turns around and walks off towards the direction of the bar, leaving you to contemplate your actions.`
				decline

	on visit
		fail

	on complete
		log `Helped an unfortunate captain recover his Argosy after a bunch of delinquents hijacked it.`
		payment 48000
		conversation
			`As you land, Syndicated Security have the <npc> in tow, escorted by a trio of Quicksilvers. The formation lands on one of the larger pads reserved for Syndicated Security vessels, fenced off from the rest of the spaceport.`
			`	The hijackers, just a raucous group of young kids, are hauled out of the <npc model> by Syndicated Security personnel towards an armored van. Multiple times the kids try to run away, but after a few minutes they're finally detained; the van drives off towards the spaceport terminal.`
			`	After the incident is wrapped up, the captain of the <npc> sends you <payment>, and a message thanking you for helping him recover his ship.`

mission "Argosy Hijacking (Declined)"
	invisible
	landing
	source
		government "Syndicate"
		not attributes "station"
		not near "Sol" 3
	deadline 1
	to offer
		has "Argosy Hijacking (Trigger): offered"
	to complete
		never
	npc
		personality launching daring uninterested
			confusion 40
		government "Merchant (Hijacked)"
		ship "Argosy (Blaster)" "Moonshake Express"
		to spawn
			has "Argosy Hijacking: declined"
	npc
		personality launching disables uninterested
		government "Syndicate"
		fleet "Small Syndicate"
		to spawn
			has "Argosy Hijacking: declined"



mission "Blind Man from Martini"
	name "Transport a blind passenger to <planet>"
	description "This blind man, Douglas, wishes to be transported to <destination>, so he can be with his daughter while she undergoes treatment there. He will pay you <payment>."
	source Martini
	destination Chiron
	to offer
		has "main plot completed"
		random < 15
	on offer
		conversation
			`As you walk through <origin>'s cramped new planetary spaceport, you see a middle-aged man on the other side of the corridor, behind a column of people. He sits on a bench with a suitcase at his side, doing nothing particular aside from the occasional tap of his cane when someone passes by.`
			choice
				`	(Go up to him.)`
				`	(Ignore him.)`
					decline
			`	Wading through the mix of passengers, stevedores, and captains in the overflowing corridor, you reach the man with the cane. It's obvious now that he's blind; he doesn't move to look at you and continues looking straight ahead, but he taps his cane twice when you come by him.`
			choice
				`	"Hello."`
				`	"Are you alright?"`
				`	(Nevermind.)`
					decline
			`	"Yes, hello, how are you doing?" the man responds, shifting his head toward your direction. "I'm here waiting for someone to pick me up," he says in a voice that sounds like he expects it at any moment.`

			label questions
			choice
				`	"Are they far away?"`
					goto far
					to display
						not "Blind Man from Martini: label far"
				`	"Who is it you're looking for?"`
					goto looking
					to display
						has "Blind Man from Martini: label far"
						not "Blind Man from Martini: label looking"
				`	"Where is she?"`
					goto somewhere
					to display
						has "Blind Man from Martini: label looking"
				`	"I see. Safe travels to you." (Walk away.)`
					decline
			
			label far
			action
				set "Blind Man from Martini: label far"
			`	"Well, I suppose you could say that they are far away, or they could be right here. I don't know." He taps his cane twice more.`
				goto questions
			
			label looking
			action
				set "Blind Man from Martini: label looking"
			`	"Someone to take me to my daughter, Anita." Yet again, his cane taps twice.`
				goto questions

			label somewhere
			`	He looks over to his side, as if he feels reserved about something. "She's on <planet>, getting some experimental treatment from the University of New Sydney. I want to be by her side if anything goes wrong, to tell her that I'm there for her, that I love her, and that everything will be okay. She's been waiting for the treatment for so long now. And since nobody else seems to have arrived here yet, I hope you'll be the one to take me there."`
			choice
				`	"Of course, I can take you to <planet>."`
				`	"Sorry, I won't be able to."`
					goto can't
			`	The man musters a broad smile, says "Thank you all too much. Would you like to help me with the luggage?" He scans the floor with his cane for it. Later, while boarding, he tells you his name is Douglas Pears, and he promises to you <payment> for transporting him.`
				accept

			label can't
			`	"Then I will wait until another comes to help me." The blind man taps his cane once more, then returns to looking straight ahead.`
				decline

	on complete
		log `Brought a blind man named Douglas to Chiron so he could visit his daughter, who will undergo experimental treatment at the University of New Sydney.`
		payment 58000
		conversation
			`Throughout the trip, Douglas has been relatively quiet and has kept to himself. When you land, he lets you help him bring down his luggage once more; it turns out you needn't have done so because an attendant from the planetary spaceport quickly comes to his side. He guides both of you to the spaceport's intracity transit complex; the bustling spaceport makes it a challenge to keep together, but all of you manage to reach it. From there, you hail a taxi while Douglas arranges for the <payment> to be sent to you.`
			`	"Well, I must go now to the University of New Sydney. They and my daughter are expecting me at their Health Sciences quarter."`
			choice
				`	"Goodbye."`
					goto bye
				`	"I hope your daughter has a safe recovery."`
					goto recovery
				`	"Everything is going to be alright."`
					goto recovery
				`	"Could I come with you?"`
					goto comealong
			label bye
			`	"Bye, now. I wish you greater luck in your travels and your sights." With that, he taps his cane twice, and then steps into one of New Sydney's taxis, going toward the University of New Sydney campus on the far side of town.`
				decline

			label recovery
			`	"Yes, thank you so much. I hope so too, of course; actually, it's a little foolish saying that, of course I do. But now I have to go. Again, thank you for making this journey possible."`
			choice
				`	"Goodbye."`
					goto bye
				`	"Could I come with you?"`
					goto comealong
			
			label comealong
			`	Douglas looks taken aback for a moment, but says, "Well, I suppose you can come along. I'm not sure if the university would let you in, though. But I think Anita would like to meet you, or at least say hello." You get into the taxi with him, and it starts toward New Sydney's University District.`

			# The player can do three actions before arriving at the hospital.
			label taxi
			branch questions hospital
				"Blind Man from Martini: taxi questions count" != 3
			label questions
			choice
				`	"How did you become blind?"`
					goto blind
					to display
						not "Blind Man from Martini: label blind"

				`	"How did becoming blind change your life?"`
					goto blind-1
					to display
						has "Blind Man from Martini: label blind"
						not "Blind Man from Martini: label blind-1"

				`	"How do you feel about the atomic bombings?"`
					goto atomic-bombings
					to display
						has "Blind Man from Martini: label blind"
						not "Blind Man from Martini: label atomic-bombings"

				`	"Was your daughter caught in the atomic bombings?"`
					goto daughter
					to display
						or
							has "Blind Man from Martini: label blind"
							has "Blind Man from Martini: label illness"
						not "Blind Man from Martini: label daughter"
				
				`	"What happened to your daughter?"`
					goto illness
					to display
						not "Blind Man from Martini: label illness"
						has "Blind Man from Martini: label daughter"

				`	(Stay silent.)`
					goto waiting
					to display
						not "Blind Man from Martini: label waiting"

			label blind
			action
				set "Blind Man from Martini: label blind"
				"Blind Man from Martini: taxi questions count" ++
			`	"It was the fourth of July, 3014. I was in my office, on one of the high rises on the outskirts of the capital, with my office window pointed right at the city center." He turns to look out the window, as if he knew New Sydney's skyline was out there where he couldn't see. In the small lull, he takes an audible breath.`
			`	"It was a beautiful day that day. I... I remember that Pollux was especially bright and colorful that day, and the songbirds that inhabited the city were alive with sound. They were unusually so. It was very vivid, very strange. Maybe I should have listened to the birds...`
			`	"But when the bomb dropped, I was looking right at it, from my office window. All I could remember next was that I was in a lot of pain, that I couldn't see, but one of my colleagues - thank goodness for her - found me afterwards, during the evacuation, covered in glass from the shockwave. I survived mostly because I was sitting at my terminal and that protected me from the bulk of the shards."`
				goto taxi

			label blind-1
			action
				set "Blind Man from Martini: label blind-1"
				"Blind Man from Martini: taxi questions count" ++
			`	"Hmm... well, it was really only one of many things that hit my life then, not least of which was my newfound blindness, and the loss of my company and my job." He gives a heavy sigh, and he shifts in his seat as if something heavy was placed on his shoulders. "I was able to keep things intact for a while, but no, it was too much. Anything can be taken away from you if you get too used to it."`
				goto taxi
			
			label atomic-bombings
			action
				set "Blind Man from Martini: label atomic-bombings"
				"Blind Man from Martini: taxi questions count" ++
			`	"How do I feel about the bombings? Well, they changed everything. In some ways I'm very grateful that it showed - no, it exposed to me, that people, they- there's people that live this way. With no sight. Who need other people to help them just... live. And that there are plenty of people who don't have people to help them live. I was lucky, I could get treatment for my blindness. But others, no...`
			# This will need to be updated once new Human campaigns are written.
			branch reconciliation checkmate
				has "free worlds reconciliation"
			label reconciliation
			`	"And for the bombings themselves, they were certainly a malicious act. The Syndicate needs to take full accountability for it, not only for the people who were killed or affected in some form or another. I'm too cynical to say that they will, with all the power they still have in Parliament."`
				goto taxi

			label checkmate
			`	"And for the bombings themselves, they were certainly a malicious act. I hear the authorities are still investigating the bombings, although it's very curious that Korban, the CEO of the Syndicate, resigned as soon as the Republic started poking their heads that way. I'm still not sure who's responsible for the bombings, the deaths, the war... I can only hope the investigation will be thorough."`
				goto taxi

			label daughter
			action
				set "Blind Man from Martini: label daughter"
				"Blind Man from Martini: taxi questions count" ++
			`	"Luckily, my daughter was off-planet during the bombings. Anita was studying nanoengineering on Vinci and was going to apply for a job at CyberAcme there. But she gave that up to come take care of me after the bombings. When things were more ironed over, it was the midst of the civil war, and she managed to go back to Vinci and work at CyberAcme then, but... well, she has not been well since then."`
				goto taxi

			label illness
			action
				set "Blind Man from Martini: label illness"
				"Blind Man from Martini: taxi questions count" ++
			`	"I don't know if I really should tell you this, but Anita was working on a project on nanomachines at CyberAcme when she got back. She was, uh... infected by them by accident. The experimental treatment is meant to try and eliminate the rogue machines, but since they're so small... that's why the treatment is experimental."`
				goto taxi

			label waiting
			action
				"Blind Man from Martini: taxi questions count" ++
			`	Deciding not to ask Douglas anything, you look out the windows of the taxi. You're in the midst of New Sydney, and skyscrapers stare down at your tiny taxi from each side of the avenue, but despite this it is still quite green and cheery, with trees on each side and people walking to work in the morning.`
				to display
					"Blind Man from Martini: taxi questions count" == 1
				goto taxi

			`	As the taxi drives on a highway on the edge of a small hill, the window gives you a panorama of the suburbs of New Sydney and the two skylines on each side, one marking the commercial sector where the spaceport is prominent in its gleaming steel-glass architecture, and the other being the University District, a series of clean and white, flowing buildings and skyscrapers. Far away on the horizon, you can barely notice the smokestacks of factories.`
				to display
					"Blind Man from Martini: taxi questions count" == 2
				goto taxi

			`	The taxi enters the University district proper now, and the window shows thongs of energetic university students from the University of New Sydney travelling to and from lectures and classrooms; going over steel walkways that run from building to building above you, and on footpaths beside the streets; clutching their backpacks and data pads. Your datapad shows that University isn't actually the only university district in New Sydney. The University of Chiron's campus is on the other side of town, presumably to keep the fierce competition between the two institutions from boiling over each other.`
				to display
					"Blind Man from Martini: taxi questions count" == 3
				goto taxi

			label hospital
			`	Eventually, the taxi passes by a sign for the "UNS Health Sciences" quarter, which by the looks of it takes up an entire section of the University District. The taxi pulls up beside the entrance of the university hospital, where you help Douglas out with his luggage. The building is stark from the outside, to match the architecture of the surroundings, yet strangely colorful on the inside, as if the person building it decided that hospital interiors were far too unimaginative.`
			`	After a short queue, you reach the reception with Douglas. The receptionist, placed behind a sterile-looking screen that looks far out of place with the colorful hallways, asks with a well-practiced smile, "How may I help you?"`
			choice
				`	"We're looking for Anita Pears. Where can we find her?"`
			`	For a moment, the receptionist shuffles information around on her terminal. "Are one of you a parent?"`
			`	"I'm the father, Douglas Pears," he replies.`
			`	She takes a few more seconds before looking at you and saying, "Ah, but we cannot let you in. Only Mr. Pears is booked in for his daughter's procedure; we have a family-only policy, to keep the privacy of our patients."`
			choice
				`	"Alright."`
					goto end
				`	"Are you sure?"`
			`	"We can't allow immediate exceptions, sorry. There's nothing I can do."`
			label end
			`	Douglas gives you a compassionate look, and says to the receptionist, "There'll be no worry." He turns back to you once more and says, "I'm sure that when Anita is recovered and well, we can meet again some day. I don't want to keep you from your business too long, either. I expect ship captains are busy folk." He comes up to you and, to your surprise, gives you a hug. "Thank you so much for bringing me here and coming along with me. I really can't say how I want to express my gratitude. But I hope we meet again. Farewell."`
			choice
				`	"Goodbye."`
				`	"Farewell to you too."`
			action
				clear "Blind Man from Martini: label blind"
				clear "Blind Man from Martini: label blind-1"
				clear "Blind Man from Martini: label atomic-bombings"
				clear "Blind Man from Martini: label illness"
				clear "Blind Man from Martini: label daughter"
				clear "Blind Man from Martini: label waiting"
				clear "Blind Man from Martini: taxi questions count"
				clear "Blind Man from Martini: label far"
				clear "Blind Man from Martini: label looking"
			`	With that, he grabs his cane and his luggage, and follows a hospital attendant toward his daughter's room, leaving you in the reception.`
