# Copyright (c) 2017 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 "Deep: Syndicate Convoy"
	minor
	name `Pickup from Hephaestus`
	description `Escort a convoy of freighters to <stopovers> where they will pick up materials needed for scientific experiments. Return the convoy to <destination> by <date> for payment (<payment>).`
	source
		attributes "deep"
		near "Gomeisa" 2
	stopover "Hephaestus"
	deadline
	to offer
		"combat rating" > 65
		not "Deep: Mystery Cubes 4: done"
		random < 30 + "deep convoy" * 15
		or
			not "chosen sides"
			has "main plot completed"
		
	on offer
		conversation
			`You are approached by a man in a Deep Security uniform who asks if you would be willing to escort a few freighters to <stopovers> and back by <day>. "We would normally have our own fleet do it," he says, "but we're short on available ships given certain circumstances."`
			choice
				`	"Sure, I can do that."`
				`	"Sorry, but I won't be traveling in that direction any time soon."`
					decline
			
			`	"Good. Before you leave, know that there may be pirate forces waiting for you in Alphard, Sirius, and Altair. You can try to avoid them, but make sure you get the freighters back on time."`
			`	The Deep Security officer wishes you good luck and walks off, leaving you to wonder how he knows where pirate fleets might be waiting for you.`
				accept
	
	npc accompany save
		government "Merchant"
		personality timid escort
		fleet
			names "civilian"
			variant
				"Container Transport" 2
				"Mule"
	npc
		government "Merchant"
		personality timid
		fleet
			fighters "civilian"
			variant
				"Dagger"
			variant
				"Boxwing"
	npc
		government "Pirate"
		personality nemesis staying
		system "Alphard"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Sirius"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Altair"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system "Castor"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system "Porrima"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Markab"
		fleet "Large Northern Pirates"
	
	on stopover
		dialog `You arrive at the pickup location on the night side of Hephaestus. The Syndicate employees who load the freighters do not allow you to see what is inside the cargo, and advise you to leave quickly once the cargo is loaded.`
	on visit
		dialog `You have reached <planet>, but you're missing something! Either you haven't visited <stopovers>, or you left part of the convoy behind.`
	on complete
		"deep convoy" ++
		payment 500000
		conversation
			`A Deep Security officer greets you when you return to <planet> with the freighters. The officer hands you <payment> and thanks you for accepting the job on such short notice. "We'll make sure to contact you in the future should we need your help. If you want to help us further at the moment, I suggest you check the job boards in the Deep for mystery delivery and retrieval jobs."`



mission "Deep: Tarazed Convoy"
	minor
	name `Pickup from Tarazed`
	description `Escort a convoy of freighters to <stopovers> where they will pick up materials needed for scientific experiments. Return the convoy to <destination> by <date> for payment (<payment>).`
	source
		attributes "deep"
		near "Gomeisa" 2
	stopover "Wayfarer"
	deadline
	to offer
		"combat rating" > 65
		not "Deep: Mystery Cubes 4: done"
		random < 30 + "deep convoy" * 15
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		conversation
			`As you are walking through the spaceport, a woman in a Deep Security uniform stops you. "You're Captain <last>, correct?" You nod. "Would you be willing to transport a handful of freighters to <stopovers> to pick up some cargo? We'd need them to return here by <day>. Normally this kind of job would be done by Deep Security, but we have no ships to spare at the moment."`
			choice
				`	"Sure, I can do that."`
				`	"Sorry, but I won't be traveling in that direction any time soon."`
					decline
			
			`	"Thank you, Captain. Before you go, I need to inform you that you may encounter pirate fleets near Tania Australis, Muphrid, and Ascella, and you might not have time to go around these systems."`
			`	The Deep Security officer wishes you good luck and walks off, leaving you to wonder how she knows where pirate fleets might be waiting for you.`
				accept
	
	npc accompany save
		government "Merchant"
		personality timid escort
		fleet
			names "civilian"
			variant
				"Freighter" 3
				"Mule" 2
	npc
		government "Merchant"
		personality timid
		fleet
			fighters "civilian"
			variant
				"Dagger" 2
			variant
				"Boxwing" 2
			variant
				"Dagger"
				"Boxwing"
	npc
		government "Pirate"
		personality nemesis staying
		system "Tania Australis"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Muphrid"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Ascella"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system "Sirius"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system "Seginus"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Tarazed"
		fleet "Large Northern Pirates"
	
	on stopover
		dialog `You and the freighters are directed to park in a private hangar owned by the Tarazed Corporation. While watching the cargo crates get loaded onto the freighters, you notice that the crates have labels on them which read "To be opened by addressee only" in large red letters.`
	on visit
		dialog `You have reached <planet>, but you're missing something! Either you haven't visited <stopovers>, or you left part of the convoy behind.`
	on complete
		"deep convoy" ++
		payment 650000
		conversation
			`A Deep Security officer greets you when you return to <planet> with the freighters. The officer hands you <payment> and thanks you for accepting the job on such short notice. "We'll make sure to contact you in the future should we need your help. If you want to help us further at the moment, I suggest you check the job boards in the Deep for mystery delivery and retrieval jobs."`



mission "Deep: Kraz Convoy"
	minor
	name `Pickup from Kraz`
	description `Escort a convoy of freighters to <stopovers> where they will pick up materials needed for scientific experiments. Return the convoy to <destination> by <date> for payment (<payment>).`
	source
		attributes "deep"
		near "Gomeisa" 2
	stopover "Rust"
	deadline
	to offer
		"combat rating" > 80
		not "Deep: Mystery Cubes 4: done"
		random < 30 + "deep convoy" * 15
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		conversation
			`A Deep Security officer approaches you when you enter the spaceport and asks if you would be able to do a job for the Deep. "We're short on Deep Security ships at the moment, but we need three Behemoths escorted to <stopovers>. After they pick up the cargo, bring them back here by <day>."`
			choice
				`	"Sure, I can do that."`
				`	"Sorry, but I won't be traveling in that direction any time soon."`
					decline
			
			`	"Much appreciated, Captain. And for your well-being as well as that of the cargo, you must know that there may be pirates waiting in Algieba, Cor Caroli, and Wei. Behemoths are tough ships, so you should be able to travel through those systems and not slow yourself down by taking alternative routes."`
			`	The Deep Security officer wishes you good luck and walks off, leaving you to wonder how she knows where pirate fleets might be waiting for you.`
				accept
	
	npc accompany save
		government "Merchant"
		personality timid escort
		fleet
			names "civilian"
			variant
				"Behemoth" 3
	npc
		government "Pirate"
		personality nemesis staying
		system "Algieba"
		fleet "Large Northern Pirates"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Cor Caroli"
		fleet "Large Northern Pirates"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Wei"
		fleet "Large Northern Pirates"
		fleet "Small Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system "Rutilicus"
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis
		system destination
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality nemesis staying
		system "Kraz"
		fleet "Large Northern Pirates"
		fleet "Small Northern Pirates"
	
	on stopover
		dialog `When you arrive, Kraz Cybernetics already has the cargo waiting by the spaceport. After a few hours of loading the massive freighters, the spaceport crew gives you the 'all clear' signal, and the Behemoth captains get ready to depart.`
	on visit
		dialog `You have reached <planet>, but you're missing something! Either you haven't visited <stopovers>, or you left part of the convoy behind.`
	on complete
		"deep convoy" ++
		payment 800000
		conversation
			`A Deep Security officer greets you when you return to <planet> with the freighters. The officer hands you <payment> and thanks you for accepting the job on such short notice. "We'll make sure to contact you in the future should we need your help. If you want to help us further at the moment, I suggest you check the job boards in the Deep for mystery delivery and retrieval jobs."`



mission "Deep: Mystery Cubes 0"
	minor
	name `Gaining an Edge`
	description `Land on the designated systems to place the mysterious cubes that Lieutenant Paris has given you, then return to <destination>.`
	source
		attributes "deep"
		not system "Zosma"
		not attributes "station"
	destination "Memory"
	stopover "New Sahara"
	stopover "Bounty"
	stopover "Heartland"
	stopover "New Tibet"
	stopover "New Greenland"
	stopover "New Switzerland"
	stopover "Tundra"
	stopover "Arabia"
	to offer
		"mystery cube" >= 3
		"combat rating" > 100
		random < "deep convoy" * 30
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		conversation
			`A Deep Security officer calls your name and approaches you as you enter the spaceport's central market. "Greetings, Captain <last>, I'm Lieutenant Paris. Would you be interested in conducting some more work for the Deep? We are currently in need of a few extra ships to assist in an ongoing situation."`
			choice
				`	"I'd love to help. What's the situation?"`
					goto situation
				`	"Sorry, but I can't help right now."`
			
			`	"Whatever plans you have, I suggest you change them, as this is an urgent situation."`
			choice
				`	"Okay, I'll help. What is the situation?"`
				`	"Then I can't help you. Sorry."`
					decline
			
			label situation
			`	"Excellent. I'm sure that you are aware that much of Deep Security is currently preoccupied, hence why we have been recruiting merchants to escort many of the Deep's convoys. The reason this is the case is that we have been attempting to detain a particularly meddlesome pirate warlord who goes by the name of 'Beelzebub.' From what we can ascertain, Beelzebub has extensive knowledge on the inner workings of Deep Security, which is making tracking him down rather difficult, as he seems to know our every move. That is where you and a few other merchants come in."`
			`	Paris reaches into his pocket and pulls out a bag. Inside of the bag are at least two dozen of the mysterious cubes that you have transported in the past, only with one distinct difference: a thick red streak running down the middle of each cube.`
			`	"The Deep requires that you place these on a number of worlds in the Dirt Belt which I will mark on your map for you. Place at least four of these devices around the spaceport of each marked planet, then come to <destination> where I will collect any remaining cubes that you may have. If a Deep Security ship did this then it would likely catch the attention of any pirates in the system and that information would make its way to Beelzebub, but random merchants should be inconspicuous enough to throw Beelzebub off our trail. Is that clear?"`
			choice
				`	"Crystal clear, Lieutenant. I will prepare to leave shortly."`
					accept
				`	"What do these cubes do?"`
			
			`	"I don't believe that I am authorized to tell you that. Just know that they will help us catch Beelzebub."`
			choice
				`	"Understood. I'll place the cubes for you."`
					accept
				`	"This feels too secretive for me. I don't want to help anymore."`
					decline
	
	npc
		government "Pirate"
		personality disables plunders harvests
		system
			distance 5 10
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality disables plunders harvests
		system
			distance 10 15
		fleet "Large Northern Pirates"
	npc
		government "Pirate"
		personality disables plunders harvests
		system
			distance 15 20
		fleet "Large Northern Pirates"
	on stopover
		dialog `You have placed cubes on the last of the planets that Paris has asked you to. When you look into the bag you find that there are three left. Go to <destination> to give the remaining cubes to Paris.`
	on complete
		event "deep: warlord detected" 21
		payment 500000
		log `Placed multiple mysterious cubes on planets in the Dirt Belt for the Deep. Deep Security is using these cubes to somehow help in their hunt for a pirate warlord named "Beelzebub."`
		conversation
			`You find Lieutenant Paris waiting for you in the spaceport. You hand him the bag of remaining cubes, and he hands you <payment> for helping.`
			choice
				`	"Is there anything else that you need me to do?"`
					goto next
				`	"Are you able to tell me what the cubes are for?"`
			
			`	Paris takes a moment to pause before responding. "They're sensor devices. They are used to track the movement of pirate fleets, but they are almost useless alone; dozens could be needed in a single system to track entire fleets. The ones that I gave you were fine-tuned though, designed to only detect the ship that we know that Beelzebub is using. That is all that I am allowed to tell you, at least for the time being."`
			
			choice
				`	"Is there anything else that you need me to do?"`
			
			label next
			`	"Not at the moment, Captain, but I'll contact you should anything else arise."`

event "deep: warlord detected"



mission "Deep: Mystery Cubes 1"
	landing
	name `Travel to <planet>`
	description `Travel to <destination> to learn more about the situation with the warlord Beelzebub.`
	source
		government "Republic" "Free Worlds" "Neutral" "Syndicate" "Independent"
		not system "Sol"
	destination "Luna"
	to offer
		has "event: deep: warlord detected"
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		dialog `You receive a message from Lieutenant Paris. "Greetings, Captain. The situation involving Beelzebub has gone slightly sour, and the Navy is involved now. I have been asked to gather the merchants who assisted the Deep previously in placing the cubes. If you are interested, please come to <destination>."`



mission "Deep: Mystery Cubes 2"
	landing
	name `Blockading the Devil`
	description `Travel to <destination> to set up a blockade in hopes of capturing the warlord Beelzebub.`
	source "Luna"
	destination "Maelstrom"
	deadline
	to offer
		has "Deep: Mystery Cubes 1: done"
	
	on offer
		log `Traveled to a restricted Navy base on Luna. Beelzebub has been causing trouble for both Deep Security and the Navy, so they have begun recruiting merchants to help in the search for the warlord.`
		conversation
			`A pair of men in Navy uniforms escort you to a restricted area of the Luna facility. One of them uses a keycard to open an elevator and ushers you in. The elevator opens up many floors below the spaceport, to an area of the facility that looks far newer than that on the surface.`
			`	You are kept in what looks like a waiting room along with five others. After a bit of talking, you find out that these are the other merchant captains who helped place the cubes across different regions of the galaxy.`
			`	An hour of waiting passes, and Lieutenant Paris walks into the room followed by a Navy admiral. "I hope you are all enjoying your stay," the admiral remarks. "Now. How is it that most of the cubes you placed were mysteriously disabled shortly after pirates entered each system?"`
			`	The admiral looks to each of the captains in the room, seemingly waiting for a response.`
			choice
				`	(Say nothing.)`
					goto next
				`	"Maybe they know how to detect the cubes."`
			
			`	The admiral looks at you. "Doubtful." Paris nods, as if to back up this claim.`
			label next
			`	He clears his throat and continues, "Allow me to explain the situation. Roughly two weeks after the last of your 'deliveries' were activated, the sensors identified Beelzebub's ship in the northern reaches of the Dirt Belt. We dispatched half of the nearest Navy garrison to apprehend the vessel, only to arrive and find a convoy of Star Barges instead.`
			`	"Worse, while our ships were in pursuit of the decoys, a pirate fleet managed to assault their home base and captured a handful of docked Cruisers. And, amidst the chaos, most of the cubes you placed in the Dirt Belt and Core were disabled!"`
			`	Before the admiral can work himself up further, Paris intercedes with the rest of the story. "The cubes that Deep Security had you position on multiple worlds were surveillance devices - sensor cubes, as we call them - designed to track Beelzebub's ship and notify us when the ship was located. It can be presumed that Beelzebub now has access to these cubes and has undoubtedly converted them to work in his favor. It may take us weeks to retrieve them, but at the moment it can be assumed that Beelzebub knows where we will be."`
			choice
				`	"Why are you involving us in this?"`
				`	"Are we part of a plan to take Beelzebub down?"`
			
			`	"Beelzebub is perhaps the most wanted pirate warlord since the 28th century. With both Navy and Deep technology now in the hands of this criminal, every available ship will be required to take him down. Given this, we are now hoping that you would be willing to assist us in trapping Beelzebub. The six of your fleets combined would certainly make up for anything that the Navy has lost in the attack."`
			`	"How much will we be paid?" one of the other merchant captains asks. "At minimum, one million credits," the admiral replies. The captain who asked instantly agrees to help, as do two others.`
			choice
				`	"I'll help as well."`
					goto accept
				`	"Sorry, but I am not interested in helping."`
			
			`	One other merchant captain also declines, and you both are escorted out of the room, into the waiting elevator. The trip back to the surface is silent, and your escort dismisses you both with a simple "Goodbye."`
				decline
			
			label accept
			`	In the end, only one of the merchant captains declines. She is escorted out of the room, and the admiral explains each merchant captain's new role.`
			`	"We assume that Beelzebub knows where we will be, but we know where he is as well - the stolen Cruisers and the pirate fleet that attacked our base moved toward the Core. Given the severity of the crime that Beelzebub has just committed, he will undoubtedly attempt to get as far away from the law as possible. That leaves us only two possible destinations: Buccaneer Bay, or the anarchist colonies of the Far North. Our best guess is that the colonies are the more appealing option to a warlord.`
			`	"We'll be setting up multiple blockades in hopes of boxing Beelzebub in as a number of fleets sweep the galaxy. Captain <last>, you will be stationed on <destination> with Lieutenant Paris and a small Navy fleet. Please gather your things and travel there immediately."`
				accept
			
	on visit
		dialog `You have reached <planet>, but some of your escorts have not yet reached the system. Wait for all escorts to enter the system before landing.`
	
	npc accompany save
		government "Deep Security"
		personality heroic escort
		fleet
			names "deep"
			variant
				"Mule"
				"Raven" 2
	npc accompany save
		government "Republic"
		personality heroic opportunistic escort
		fleet
			names "republic capital"
			variant
				"Cruiser"
				"Gunboat" 2



mission "Deep: Mystery Cubes 3: Escorts"
	landing
	invisible
	to offer
		has "Deep: Mystery Cubes 2: done"
	to fail
		has "Deep: Mystery Cubes 4: done"
	npc kill
		government "Deep Security"
		personality heroic escort vindictive
		fleet
			names "deep"
			fighters "deep fighter"
			variant
				"Mule"
				"Raven" 2
				"Dagger"
	npc kill
		government "Republic"
		personality heroic opportunistic escort vindictive
		fleet
			names "republic capital"
			variant
				"Cruiser"
				"Gunboat" 2
	npc kill
		government "Republic"
		personality timid
		fleet
			fighters "republic fighter"
			variant
				"Combat Drone" 4



mission "Deep: Mystery Cubes 3"
	landing
	name `Defend <planet>`
	description `Destroy the pirates attacking <planet>.`
	source "Maelstrom"
	to offer
		has "Deep: Mystery Cubes 2: done"
	
	on offer
		conversation
			`Several of the <planet> spaceport landing pads are suitable for even the largest of Navy capital ships. Paris explains to you that at one time this world was used as a major Navy base, but has since been replaced by Farpoint closer to the Far North anarchist worlds.`
			`	Once every ship is parked, a captains' briefing is held on an empty landing pad. "Don't expect this job to be fun," Lieutenant Paris states. "We could be waiting around here for days before anything happens, and we need to stay in system the entire time."`
			choice
				`	"What do we do while we wait?"`
			`	"For now, you can walk around the spaceport and see what there might be to do, but don't stray too far, otherwise you might never get back to your ship in time." Paris hands you a communication device. "This way you can be notified when something happens regardless of where you are. I'm going to stay on my ship and monitor the incoming transmissions."`
			choice
				`	(Wander the spaceport.)`
				`	(Stay near my ship.)`
					goto ship
			`	Other than the occasional blaring of a train whistle, the spaceport of <planet> is rather tranquil. You pass the time by talking to a few tourists, most of whom are getting ready to go rock climbing. While walking through the restaurant district, the ground begins to shake slightly. Many of the locals don't even react to the earthquake, and eventually it subsides. Once you have walked through the entire spaceport and seen all that it has to offer, you begin to make your way back to your ship.`
				goto mirfak
				
			label ship
			`	One of the Navy crewmen produces a football from their cabin, and a small game begins inside of an open landing pad. Others try to pass the time by reading or writing. Everyone comes to a standstill though once the ground begins to rumble; an earthquake. A Navy member calls out to everyone, "Don't worry, this is a small one. We get earthquakes like this a lot on Gemstone." The shaking eventually subsides, and you decide to go into your ship to rest.`
			
			label mirfak
			`	Suddenly, your communication device beeps and you hear Lieutenant Paris' voice, "The blockade in Mirfak has just been attacked. I repeat, the blockade in Mirfak has just been attacked. Reports are that the blockade has sustained heavy losses as the pirate fleet included one of the stolen Cruisers."`
			`	A rather young recruit asks, "Should we go help them?" to which a senior officer responds, "We were given orders and we're going to follow them unless told otherwise." The comms fall silent, and the waiting resumes.`
			``
			`	A few anxious hours pass with no new information. Suddenly, without warning, one of the Ravens takes off and your communications device begins blaring. "A pirate fleet just jumped into the system, alongside two Navy Cruisers painted in pirate colors!" All the captains and their crew scatter for their ships, ready to fight.`
				launch
	
	npc kill
		government "Pirate"
		personality staying heroic unconstrained target harvests plunders
		fleet
			names "pirate"
			variant
				"Cruiser" 2
				"Fury (Laser)" 3



mission "Deep: Mystery Cubes 4"
	landing
	name `Rendezvous on <planet>`
	description `Travel to <destination> with reinforcements for its blockade.`
	source "Maelstrom"
	destination "Farpoint"
	to offer
		has "Deep: Mystery Cubes 3: done"
	
	on offer
		conversation
			`Despite the commandeered Navy Cruisers, the pirates were unable to break through the blockade. After all of your group has landed, Paris invites the captains into his ship and makes contact with mission control. He relays the battle report, and you hear that the blockade in Matar was also attacked, but no stolen Cruisers were sighted.`
			`	"What are your orders, Admiral?" Paris asks over the comms.`
			`	"Lieutenant, your report makes three Cruisers accounted for, yet still no sign of Beelzebub. Our recon fleets have almost reached the blockades, meaning we'll catch this warlord soon enough. After the Navy fleet sweeping toward your post enters Nihal, I want you to lead everyone to <destination>. Beelzebub may be planning an attack on the blockade there with the remaining three Cruisers."`
			`	"Understood sir." After contacting the captain of the Navy fleet approaching <origin>, Paris holds a short all-hands briefing to inform the crew that they should be ready to leave for <destination> in a few hours.`
				accept
	
	npc
		government "Republic"
		personality heroic opportunistic escort entering
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier"
				"Combat Drone" 6
				"Dagger" 4
	npc
		government "Merchant"
		personality staying vindictive
		system destination
		fleet
			names civilian
			variant
				"Bastion"
				"Manta" 2
	npc
		government "Republic"
		personality staying heroic opportunistic vindictive
		system destination
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Cruiser"
				"Combat Drone" 4
				"Frigate"
	npc
		government "Deep Security"
		personality staying heroic opportunistic vindictive
		system destination
		fleet
			names "deep"
			fighters "deep fighter"
			variant
				"Aerie" 2
				"Dagger" 4
				"Corvette (Speedy)"
	npc
		government "Republic"
		personality heroic opportunistic vindictive
		system Sol
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier"
				"Cruiser" 2
				"Combat Drone" 14
				"Lance" 4
				"Frigate" 2
	npc evade
		government "Pirate"
		personality staying heroic unconstrained target plunders harvests
		system destination
		fleet
			names pirate
			variant
				"Cruiser" 3
				"Marauder Leviathan"
				"Leviathan (Hai Engines)"
				"Headhunter (Particle)" 3
				"Firebird (Plasma)" 2
				"Marauder Firebird (Weapons)" 2
	
	on enter "Alnitak"
		dialog `Alnitak is in chaos when you enter the system. An outnumbered defense fleet is fighting a group of pirate ships, and among the pirates your sensors identify the three stolen Cruisers.`
	on visit
		dialog `You have landed on <planet>, but there are still pirates attacking the system. Defeat all of the pirates in order to complete this mission.`
	on enter "Hassaleh"
		set "deep: passed through north"
	on complete
		event "assisted the deep" 7
		payment 1000000
		log `Helped to destroy the last of the Navy Cruisers stolen by Beelzebub, but he has escaped. The Navy is still searching, but is no longer asking for help from merchants.`
		log "People" "Beelzebub" `Beelzebub, as many call them, is one of the most notorious pirates in human space. They're responsible for committing countless acts of crimes against both humanity and the Republic government and are still at large somewhere in the galaxy despite a major setback.`
		conversation
			`As you come in for a landing, you can see that a number of buildings have taken fire from the pirate fleet above. White tents have been set up to tend to the wounded and multiple ships are being repaired. You are directed to an unscathed building in which a number of Navy officers, the admiral you met on Luna, Lieutenant Paris, and your fellow merchant captains have convened. After you enter the room and get settled down, the admiral begins to speak.`
			`	"Here's the sitrep. Beelzebub's ship was spotted entering the system, followed by the rest of the pirate fleet. His ship seemed to disappear in the confusion, so we have no idea where he went. Either Beelzebub is currently hiding on the anarchist worlds or has made a dash for the Core, in which case the chase goes on."`
			branch core
				not "deep: passed through north"
			
			`	"Beelzebub can't have gone to the Core," Paris butts in. "We traveled here through the uninhabited systems. We would have seen Beelzebub had he gone that way."`
			`	"That's good news then. All we have to do is wait Beelzebub out until he decides to poke his little head back out.`
			
			label core
			`	"Luckily, all six stolen Cruisers are accounted for, albeit destroyed. Deep Security forces have begun to collect the stolen sensor cubes. We can confirm that Beelzebub was watching our every move, since the cubes are being found all over the Paradise Worlds and Core. They should all be retrieved within the next week." The admiral then turns to the merchant captains. "Now that Beelzebub doesn't have the upper hand anymore, you are no longer needed. As promised, <payment> will be transferred to each of your accounts for your services."`
			`	"Thank you, Admiral," one of the captains replies.`
			`	"No, thank you. All of you. You didn't have to accept this risk but you did, and I speak for the whole Navy when I say that we are grateful for that."`

event "assisted the deep"



mission "Deep: TMBR 0"
	minor
	name `Find "There Might Be Riots"`
	description `Find and convince "There Might Be Riots" to throw a concert on <destination>.`
	source
		not system "Aludra"
		attributes "deep"
	destination "Midgard"
	deadline 120
	to offer
		random < 60
		has "There Might Be Riots part 3B: done"
		not "Deep: Remnant 0: offered"
		not "Deep: Project Hawking: offered"
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		conversation
			`When you enter the <origin> spaceport, you hear what is undoubtedly a "There Might Be Riots" song playing loudly enough for everyone in the spaceport to hear. A quick glance around reveals the source of the noise to be the external speakers of a nearby Bounder and several people dancing.`
			choice
				`	(Dance with them.)`
					goto dance
				`	(See what's going on.)`
				`	(Ignore them.)`
					defer
			
			`	You approach the Bounder and count five people dancing in total: three women and two men. One of the women dancing notices you walking over and exclaims, "Looks like someone else is about to join the party!" Her shout is met by a raucous cheer from the rest of the dancers, but you refuse to dance when they try to pull you into the fray.`
			`	After the music begins to subside, one of the dancers introduces himself to you as Garrison. Garrison then lists off the names of his fellow dancers: Pierre, Rayna, Hannah, and Laura. As you make your introductions, you learn that everyone here is part of the same research team, working for one of the Deep's many science bureaus, and they are currently wrapping up a short vacation by listening to their favorite band before they travel to Midgard on assignment.`
				goto choice
			
			label dance
			`	You approach the Bounder and count five people dancing in total: three women and two men. One of the women dancing notices you walking over and exclaims, "Looks like someone else is about to join the party!" Her shout is met by a raucous cheer from the rest of the dancers, and they pull you into the fray.`
			`	After a few minutes of dancing, the music begins to subside. One of the dancers introduces himself to you as Garrison, and lists off the names of his fellow dancers: Pierre, Rayna, Hannah, and Laura. As you make your introductions, you learn that everyone here is part of the same research team, working for one of the Deep's many science bureaus, and they are currently wrapping up a short vacation by listening to their favorite band before they travel to Midgard on assignment.`
			
			label choice
			`	"How do you know about 'There Might Be Riots?'" Hannah asks you.`
			choice
				`	"I've met them."`
					goto met
				`	"I just like to listen to their music."`
			
			`	One of the other scientists, an older looking man named Pierre, looks right at you and stares. After a few moments he says, "I know you! You were in the 'Songs for the End of Civilization' broadcast from Pilot!" The rest of the scientists start agreeing with him as they look at you closer.`
			
			label met
			`	"You know 'There Might Be Riots?' You are so lucky!" says Rayna.`
			`	"I couldn't even see them during the 'Trouble on the Tarmac' tour, but you've met them? That's insane!" shrieks Laura.`
			`	Hannah chimes in, "Do you know where the band is? They've been quiet for a while now, ever since that broadcast. I heard rumors that the Republic detained them for trespassing, but since you're here..."`
			choice
				`	"I know where they are and rest assured, they're safe."`
				`	"Sorry, I don't know where they are."`
					goto decline
			
			`	The group falls silent until Rayna asks "Do you think you could bring them to us for a live concert?"`
			choice
				`	"I'd love to."`
				`	"No thanks. I have better things to do."`
					goto decline
			
			`	All five scientists burst out in a cheer, clearly excited for the chance to see their favorite band live. As the cheering dies down Laura says, "We must get going now, <first>. We're being stationed on Midgard for the next few months, so if you do find 'There Might Be Riots,' please bring them there." Each member of the group says goodbye to you as they depart.`
				accept
			
			label decline
			`	The group looks visibly disappointed. A few minutes of talking later, they inform you that they must depart for Midgard and say their farewells.`
				decline
	to complete
		never
	to fail
		has "Deep: TMBR 1: offered"



mission "Deep: TMBR: Hint"
	name `Reunite with the band`
	description `A human on <origin> indicated she saw "There Might Be Riots" perform on <destination> last week. Hopefully they are still there.`
	source
		not system "Fah Soom"
		government "Hai"
		attributes "human tourism"
	destination "Greenwater"
	to offer
		has "Deep: TMBR 0: active"
		not "Deep: TMBR 1: offered"
		random < 30
	
	on offer
		conversation
			`It takes you a while, but after a few hours of asking around the spaceport, you finally find someone who knows where the band is. "I saw them on <destination>," she says. "They were throwing a pretty gnarly concert just last week. I haven't heard of them playing anywhere else, so they might still be there."`
				accept



mission "Deep: TMBR 1"
	landing
	name `Transport band to <planet>`
	description `Give the band "There Might Be Riots" a ride to <destination> so that they can perform for the Deep scientists.`
	source "Greenwater"
	destination "Midgard"
	blocked "You have reached <origin>, but you'll need <capacity> to continue this mission. Return here when you have the required space free."
	cargo "musical equipment" 4
	passengers 8
	to offer
		has "Deep: TMBR 0: active"
	on offer
		conversation
			`You find "There Might Be Riots" playing a gig right in the spaceport of <origin>. Judging by the large number of Hai in the audience, they seem to have amassed quite the following, even in Hai space.`
			`	While the band intermixes crowd favorites and some new songs clearly inspired by their time in Hai space, you make your way to the side of the makeshift stage. Once the concert ends, Ulrich notices you and approaches.`
			`	"Captain <last>, it's been a while! We've been having a great time with the peaceful squirrels ever since you dropped us off. It's the craziest experience we've ever had." He regales you with a number of adventures the band has been on since they came to Hai space, and how they were all surprised that even in such an idyllic place war was still a reality. "Say, what brings you here?"`
			`	He listens intently to your story of the scientists on <planet>, but his brow furrows when you mention the rumor of imprisonment by the Republic.`
			branch public
				has "event: hai-human resolution announced"
			`	"Maybe we've been away long enough. I thought there would be some rumors or recordings that made it back to the Republic from here, but this place is a pretty well-kept secret, so perhaps not. Maybe it's time to go back to the land of the humans."`
				goto return
			label public
			`	"Maybe we've been away long enough. With recent events, I suppose it's only a matter of time until our presence here becomes known more widely to the Republic anyway, so we don't exactly gain much by staying. Maybe it's time to go back to the land of the humans."`
			label return
			`	Ulrich gathers up the rest of the band and they pack up their supplies. You chart a course for <destination> as they load their musical equipment on your ship and get ready for the long ride back to human space.`
				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 250000
		log `Brought "There Might Be Riots" back to human space from their vacation in Hai space to play a concert for a team of scientists in the Deep.`
		conversation
			`Almost as soon as "There Might Be Riots" steps off your ship, a crowd gathers. When it is clear that the band is not simply disembarking, but preparing to perform, the uproar makes you glad that you had not given any advance notification to the locals. As the band gets ready, you contact the spaceport authorities and have them notify Garrison and the other scientists that you have returned. The authorities don't seem too enthused about hosting a concert with no advance warning, but they agree to send your message.`
			`	The crowd gets larger and larger over time, and judging by the increased number of ships landing, word has quickly spread that "There Might Be Riots" is back.`
			`	As Ulrich and the band take the stage, you spot the scientists in the front row, grinning and cheering wildly. The first song is one you heard them play in Hai space, and even though none in the audience know the words to sing along, they appear to love the message, and the cheers and screams only grow more frenetic.`
			`	During an intermission, you invite the scientists onto your ship to personally meet the band. The thrill in the eyes of each of the scientists is astounding as they meet the members of "There Might Be Riots."`
			`	Before the intermission ends, each of the scientists thank you personally for bringing the band to Midgard, and Pierre even hands you <payment>. "It's the least we could give you," he adds. As the scientists start to depart your ship to listen to the rest of the concert, Hannah runs back to hug you before rejoining her friends in the crowd.`



mission "Deep: Interrogation"
	landing
	invisible
	source
		attributes "deep"
		attributes "spaceport"
	to offer
		has "Deep Archaeology 5: done"
	
	on offer
		log `Was interrogated by the Deep for helping Albert Foster. The Deep now knows that Albert Foster thinks that there is an artificial singularity on Midgard.`
		conversation "deep: questioning"



mission "Deep: Questions"
	landing
	name `Mysterious Message`
	description `Travel to <destination> to meet the author of an encrypted message.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not system "Zosma"
	destination
		attributes "deep"
		attributes "urban"
	to offer
		has "event: assisted the deep"
		has "Deep: Interrogation: offered"
		not "deep: helped before archaeology"
	
	on offer
		dialog `Upon landing, you receive an encrypted message from an unknown sender. "Hello, Captain <last>. Your recent assistance of the Deep is much appreciated. I'd like to speak with you on <destination> if you are interested." The message is not signed.`
	on complete
		conversation "deep: questioning"



conversation "deep: questioning"
	branch question1
		has "Deep: Interrogation: offered"
	
	`When you land on <origin> and open your ship's main hatch, you find yourself face-to-face with two Deep Security officers, neither of whom appear armed. "Hello, Captain <last>. We're going to need to ask you some questions. If you would please step off of your ship and follow us, that would be much appreciated."`
	choice
		`	(Follow their orders.)`
			goto orders
		`	"Why do you need to question me?"`
		`	(Close the hatch and flee.)`
			goto flee
	
	`	"Because we wish to question you on the nature of your work for Albert Foster. Now please, step off your ship and come with us."`
	choice
		`	(Follow their orders.)`
		`	(Close the hatch and flee.)`
			goto flee
	
	label orders
	`	You follow the officers to a building located on the eastern edge of the spaceport. You are led to a small, dimly lit room on the second floor that contains nothing but two chairs and a table. You are told to sit in one of the chairs and wait.`
		goto questioning
	
	label flee
	`	You attempt to close the hatch, but a strong tingling sensation radiates from your abdomen. As you drop to the floor convulsing, you hold your eyes open long enough to glimpse a stun gun in one officer's hand.`
	``
	`	You wake up, slumped in a chair, in a dimly lit room. Across the table is another chair, empty. As you twist about, examining the rest of the room, the lingering soreness in your abdomen reminds you that even though you are alone for the moment, attempting to leave is likely unwise.`
	
	label questioning
	choice
		`	(Wait.)`
	
	`	Ten minutes pass in silence until a figure enters the room. In the dim light, you discern a tall, dark woman wearing what looks like a Deep Security uniform. Some of its badges, pins, and striping are unfamiliar to you.`
	`	"I hope my men didn't have to struggle too much to get you here."`
	choice
		`	"Don't worry, it was just fine."`
		`	"It wasn't the warmest welcome I've ever received."`
	
	`	The woman chuckles slightly. "No need to be sarcastic with me. Now, you know why you're here."`
	choice
		`	"I do?"`
			goto clueless
		`	"I didn't commit any crimes, so you have no right to detain me."`
	
	`	"Indeed, no crimes were committed during your work for Albert Foster, but we still have the right to detain you to keep the Deep safe. Cause us no trouble during this little meeting, answer my questions, and you will be on your way in a few minutes' time.`
		goto foster
	
	label clueless
	`	"Well if you don't then let me jog your memory: You took a small chip of wood from a historical church on Midgard - nothing criminal, mind you - and returned it to Vinci, where I assume you handed it over to the 'archaeologist' Albert Foster." The tone of her voice as she says "archaeologist," clearly conveys her disdain for his title. "Later you returned to Midgard with Albert Foster in tow, prompting us to run you out of the Deep.`
	
	label foster
	`	"My first question to you: what exactly were you doing with Albert Foster?"`
	choice
		`	"We were scanning Midgard with gravitational field mapping equipment and spotted an artificial singularity before we fled."`
			goto honest
		`	"He told me he was researching the Deep and he needed help conducting his research."`
	
	`	"And why do you think he needed someone else to do the work for him?"`
	choice
		`	"Because he wanted something illegal done."`
		`	"Because he isn't allowed in the Deep."`
			goto allowed
	
	`	"I already told you that you didn't commit a crime. The reason is that Foster has caused the Deep plenty of trouble in the past, so we don't particularly enjoy his presence. Now, did Albert make any discoveries due to your assistance?"`
		goto choice
	
	label allowed
	`	"Precisely. Now, did Albert make any discoveries due to your assistance?"`
	
	label choice
	choice
		`	"He discovered that the church on Midgard is far older than should be possible, dating back to at least the early 1700s."`
		`	"We spotted something on Midgard that he called an 'artificial singularity.'"`
			goto honest
		
	`	"Interesting finding, Captain. Is there anything else that he discovered?"`
	choice
		`	"No."`
		`	"Yes. We used gravitational mapping equipment on Midgard and we found what looked like an artificial singularity."`
			goto honest
	
	`	The woman does not respond for a few seconds. When she does begin speaking, you have to lean in to hear her. "Don't lie to me. I can make this experience very uncomfortable for you."`
	choice
		`	"Alright. We discovered an artificial singularity on Midgard."`
	
	`	"See? That wasn't so hard to admit, now was it?"`
	
	label honest
	branch helped
		has "Deep: Mystery Cubes 4: done"
	
	`	The woman's mouth turns into a sly smile as she leans back in her chair. "Thank you for the information. That is all we needed you for. You will be escorted back outside momentarily. Enjoy the rest of your day, <first> <last>."`
		goto next
	
	label helped
	action
		set "deep: helped before archaeology"
	`	The woman's mouth turns into a sly smile as she leans back in her chair. "Thank you for the information, Captain. Before I let you go, I'd like to thank you for the work you've done for the Deep. I was interested to hear that the same Captain who helped us pursue Beelzebub also helped Albert Foster. Don't worry, we all make stupid mistakes. We'll scratch this one off your record.`
	`	"You clearly mean no harm to the Deep, so I'll give you the privilege of asking me any questions you might have after this encounter."`
		goto questions
	
	label question1
	`You are escorted by two <planet> security guards to a Corvette occupying a landing pad close to the spaceport's Deep Security complex. Standing below the Corvette is the tall, dark-skinned woman who questioned you on your work for Albert Foster.`
	`	"Good evening, Captain," she looks up to the overcast sky for a moment, "or whatever time of day it might be right now. I've been informed that you proved yourself a great asset to the Navy and Deep Security in tracking down and... almost trapping Beelzebub. Please, come inside my ship for a moment."`
	choice
		`	(Follow her.)`
			goto ask
		`	"Why?"`
	
	`	"You can leave if you wish to, but I'd only be keeping you for a moment."`
	choice
		`	(Enter her ship.)`
		`	(Leave.)`
			decline
	
	label ask
	`	The woman closes the Corvette's hatch, leaving you in the light of dim fluorescent bulbs. This must be quite an old ship to still be using fluorescent bulbs instead of the LED lights that most modern ships use for their interiors.`
	`	"I've asked you onto my ship so that we may have some privacy. You clearly mean no harm to the Deep. For starters, I'm sure you'll be happy to hear that we've scratched your incident with Albert Foster from your record. Additionally, I'm extending you the privilege of asking me any questions you might have relating to our last encounter."`
		goto questions
	
	label questions
	choice
		`	"When was the Deep really settled?"`
		`	"Is there really an artificial singularity on Midgard?"`
			goto singularity?
		`	"I don't have any questions."`
			goto none
		
	`	"The exact date has been lost to time, but folklore states that the first humans arrived here in the mid-1300s, before the time of the 'Black Death' plague on ancient Earth. It's not wise to believe in wonder tales, though."`
	choice
		`	"Were the original humans of the Deep really brought here by aliens?"`
		`	"I don't have any more questions."`
			goto none
		
	`	"That's a question for the people who were originally brought here." The woman flashes another sly smile.`
	choice
		`	"Is there really an artificial singularity on Midgard?"`
		`	"I don't have any more questions."`
			goto none
		
	`	"Those gravitational mapping devices can be so finicky sometimes. I'm sure it was nothing."`
		goto done
	
	label singularity?
	`	"Those gravitational mapping devices can be so finicky sometimes. I'm sure it was nothing."`
	choice
		`	"When was the Deep really settled?"`
		`	"I don't have any questions."`
			goto none
		
	`	"The exact date has been lost to time, but folklore states that the first humans arrived here in the mid-1300s, before the time of the 'Black Death' plague on ancient Earth. It's not wise to believe in wonder tales, though."`
	choice
		`	"Were the original humans of the Deep really brought here by aliens?"`
		`	"I don't have any more questions."`
			goto none
		
	`	"That's a question for the people who were originally brought here." The woman flashes another sly smile.`
	
	label done
	branch question2
		has "Deep: Interrogation: offered"
	
	`	"That will be enough questions for now. You will be escorted back outside momentarily. Enjoy the rest of your day, Captain."`
		goto next
	
	label question2
	`	"That will be enough questions for now."`
		goto next
	
	label none
	branch question3
		has "Deep: Interrogation: offered"
	
	`	"If that is all, then this meeting is over. You will be escorted back outside momentarily. Enjoy the rest of your day, Captain."`
		goto next
		
	label question3
	`	"Very well."`
		goto next
	
	label next
	branch question4
		has "Deep: Interrogation: offered"
	
	`	The woman gets up from her chair and stops in the doorway. She turns her head slightly and says in a low voice, "I'll be watching," then leaves. Moments later, the same two men that brought you here step into the room and ask you to follow them. They lead you to an entryway and lock the door as you step out into the spaceport.`
		decline

	label question4
	`	The woman opens the hatch to the ship. "We might meet again in the future. Stay on your best behavior and our next meeting will surely be on good terms. Goodbye, Captain."`
		decline
	


mission "Deep: Project Hawking"
	minor
	name `Research Supplies`
	description `Fetch research supplies from <stopovers> and return them to <destination> by <date> for "Project Hawking."`
	source
		attributes "deep"
		not attributes "station"
	destination "Midgard"
	clearance
	stopover "Carbuncle Station"
	stopover "Prime"
	stopover "Vinci"
	passengers 4
	cargo "project supplies" 50
	deadline
	deadline 10
	to offer
		random < 40
		has "Deep: Mystery Cubes 4: done"
		or
			not "chosen sides"
			has "main plot completed"
		
	on offer
		conversation
			`While walking away from an argument with a local merchant over the price of a basket of fruit (ten credits is far too much for only a dozen pieces of fruit), you spy a group of four scientists moving about, briefly speaking with various captains.`
			branch know
				has "Deep: TMBR 0: offered"
			`	One of them sees you, and after a brief moment examining the tablet in his hand, leads the group toward you.`
			`	"Hello, Captain," the tall man among the group says. "<first> <last>, is it?" You nod. "Splendid. I'm Garrison, and these are my colleagues Hannah, Pierre, and Laura. We're looking for a captain who would be able to give us a ride to a few planets in the Paradise sector where we will be acquiring supplies for our research. The Deep is currently short on spare transport ships, but did give us permission to hire trustworthy merchant captains so we don't miss our deadline. Would you be able to help?"`
			choice
				`	"I'd be glad to help. Where do you need to go?"`
					goto accept
				`	"Sorry, I'm too busy at the moment. You'll need to find a different captain."`
					decline
			
			label know
			`	You recognize them as Garrison, Hannah, Pierre, and Laura, the scientists who asked you to find There Might Be Riots. "<first> <last>, is that you? What a great time to run into you!" Garrison exclaims. "We're looking for a captain who can give us a ride to a few planets in the Paradise sector while we pick up supplies for our research. We'd normally use an official transport from the Deep, but they're having some trouble sparing one at the moment. Instead, we received permission to hire a trustworthy merchant captain to act as our transport. Would you be able to help?"`
			choice
				`	"I'd be glad to help. Where do you need to go?"`
				`	"Sorry, I'm too busy at the moment. You'll need to find a different captain."`
					decline
			
			label accept
			`	"Thank you, Captain. The planets that we need to go to are..." Garrison turns to the other three scientists. "<stopovers>," Hannah says.`
			`	"... Thanks. After we've gathered all the supplies, we'll need to be dropped off on <destination>."`
			`	You bring the scientists to your ship where they quickly make themselves comfy in the bunk rooms. As you walk to the bridge, you overhear Pierre quietly communicating with what you assume to be the spaceport authorities, "... <last> agreed. I expect Project Hawking to proceed on schedule. We will arrive before <day>." As you prepare for launch, you wonder what you've just signed up for.`
				accept
	
	on accept
		"reputation: Independent (Killable)" = 10
	
	npc
		government "Independent (Killable)"
		personality staying
		system "Naos"
		ship "Marauder Quicksilver (Engines)" "Gusoyn"
	
	on visit
		dialog `You arrive on <planet>, but realize that your escort carrying the scientists and their supplies has not arrived yet. Better depart and wait for your escorts to enter the system.`
	on complete
		"reputation: Independent (Killable)" = 10
		payment 1500000
		log `Helped gather materials for "Project Hawking," an energy and weapons research project being conducted by scientists of the Deep. A pirate Quicksilver attacked the building where the supplies were being placed and crashlanded into the ground, triggering an earthquake.`
		conversation
			`"Don't go to the spaceport," Garrison says. "We'll be dropping the supplies off elsewhere." He directs you toward the mountains.`
			branch know
				has "Deep Archaeology 5: done"
			`	As the peaks loom nearer, Garrison points to a set of four landing pads adjacent to a single building, the entire complex surrounded by trees. The nearest village is easily a few kilometers away.`
				goto next
			
			label know
			`	As the peaks loom nearer, Garrison points to a set of four landing pads adjacent to a single building, the entire complex surrounded by trees. It is very close to the church whose wood you sampled for Albert Foster, meaning that it is also very close to where his gravitational sensors supposedly identified an "artificial singularity."`
			
			label next
			`	Several dozen forklifts are waiting for your ship on the surface, and your passengers busy themselves by supervising the unloading process. The high fencing around the landing pads prevents you from wandering, but you stretch your legs and enjoy the clear mountain air while you can.`
			`	Your stroll around the launchpads is interrupted by the familiar warning tones emitted by landing spacecraft, and you look up to see a Deep Security Raven, descending rapidly. It lands next to the <ship>, and Lieutenant Paris steps out, looking rather distressed.`
			`	"Captain! I'm going to need your ship's scanner logs from as far back as when you took this job."`
			`	Hearing the urgency in his voice, you hastily return to your ship's cockpit, copy the scanner logs onto a data chip, and bring it to Paris. He views the logs on a tablet.`
			`	"There appear to be three unidentified ships that began following you after each time you retrieved more cargo. Whether their intent is malicious or not, they are clearly interested in this project."`
			choice
				`	"What are you going to do?"`
				`	"Do you fear that we're in danger?"`
			`	"I have no idea." Paris looks over to the crew that are unloading the cargo. "Hurry up, men!" One of them shouts back, "Only a few more crates left, Sir."`
			`	Paris turns to you and says "I suggest you leave immediately," and then turns to the scientists, "and you four should come with me while we figure out what is happening here. Here may not be safe for you."`
			`	In space, the noise from high-powered atomic engines can only be heard as a dull rumbling, and even then, only aboard the ship they propel. In atmosphere, however, they are deafening. The thunderclap of a high-speed atmospheric re-entry forces everyone to look up. A battle-scarred Quicksilver in pirate colors is racing toward the building. The workers scramble for cover, abandoning their machinery and the cargo.`
			choice
				`	(Run for my ship.)`
				`	(Run for the nearest cover.)`
					goto cover
			
			`	You sprint toward your ship as fast as you can, but before you can reach it you hear the Quicksilver's cannons roar to life. The projectiles stream right overhead, exploding into the side of the building, sending rubble everywhere and knocking you off your feet.`
				goto crash
			
			label cover
			`	You duck for cover behind a concrete barrier that divides two landing pads when you hear the Quicksilver's cannons roar to life. The projectiles stream right overhead, exploding into the side of the building, sending rubble everywhere.`
			
			label crash
			`	As quickly as it appeared, the Quicksilver disappears, shrouded from view by the trees. Even though its engine noise has abated, Paris has to shout for his orders to be heard above the commotion. As you rise to your feet you feel the earth heave, and a few moments later the muffled thud of an explosion drowns out Paris' voice. A dark cloud of smoke is rising up from a half kilometer away, in the direction the Quicksilver flew. Even in daylight you can see light from the fires below, reflected ominously by the airborne soot. A second tremor, somehow larger than the first, catches everyone off guard, knocking you back to the ground.`
			choice
				`	"Earthquake!"`
				`	"What is happening?"`
			
			`	No one is able to hear you over the low rumble of the shaking ground and the rustling of the forest around the complex. The building, already scarred and torn open by weapons fire, crumbles under the new stresses leaving only a pile of rubble. A minute after the tremor began, the vibrations stop, leaving the air silent; not even the rustle of the leaves or the tweet of a bird can be heard.`
			`	Everyone is clearly startled by the experience as they slowly raise themselves from the ground. You spot Garrison helping up Pierre and Hannah. Lieutenant Paris and Laura are in a tight embrace, but quickly release each other when they notice you looking.`
			`	A few Deep Security ships begin to land, dropping off medics and cleanup crews to take care of the destroyed building. One of the ships flies in the direction of the fire. Paris says to you, "Captain, I think you should leave. Deep Security will handle the situation here."`
			`	You say goodbye to the scientists, who thank you for helping them, even if much of the cargo was destroyed. You board your ship and fly toward the spaceport. Upon landing, you find that <payment> have been transferred to your account from Deep Security.`



mission "Deep: Project Hawking: Carbuncle"
	landing
	invisible
	source "Carbuncle Station"
	to offer
		has "Deep: Project Hawking: active"
	to fail
		has "Deep: Project Hawking: done"
	npc kill
		government "Independent (Killable)"
		personality waiting
		ship "Marauder Splinter (Engines)" "Abaddon"
	on offer
		conversation
			`The majority of Carbuncle Station is restricted to normal visitors. The workers here will not even refuel your ship upon request. It's clear that Lovelace Labs, the owners of this station, have secrets stored within the walls of this station.`
			`	You open your docking doors, only to find the bulkhead doors to the rest of the station blocked by three well-armed security officers. You follow the scientists' lead and approach the guards. They spend several minutes conversing, but eventually a guard activates a toggle on his communicator. A video screen next to the bulkhead blinks on, revealing a woman in a uniform distinctly more embellished than those of the guards before you.`
			`	"What brings you here to Carbuncle Station?"`
			`	Pierre responds with only two words, "Project Hawking," and the screen momentarily goes blank. When it flickers on again, she is equally succinct and says only, "Admit three."`
			`	After a short discussion, Garrison agrees to stay behind with you. Pierre, Hannah, and Laura are led through an awkwardly small opening in the bulkhead door, into the restricted area. Rather than wait in front of the guards, you return to the comfort of your ship with Garrison.`
			choice
				`	"How should we pass the time while we wait?"`
				`	"How long will it be before they come back?"`
					goto wait
			
			`	"It shouldn't take long for them to come back, so we could have a short chat if you want."`
				goto questions
			
			label wait
			`	"At most ten minutes. In the meantime, we could have a short chat. I find dead air annoyingly awkward."`
			
			label questions
			choice
				`	"Do you know what Lovelace Labs keeps in this station?"`
				`	"What is 'Project Hawking'?"`
					goto project
			
			`	"I haven't the faintest idea what they keep here. Even if I did, I'm sure I wouldn't be allowed to tell you. The only thing I know for sure they have here are components for the project we're working on."`
			`	"Project Hawking?" you ask. Garrison nods.`
			
			label project
			`	"The exact details of Project Hawking are classified. I'm not able to tell you much aside from the fact that we're doing energy and weapons research. Scientists from the Deep who are highly specialized in a certain field will be asked to work on government projects every so often.`
			`	"In the field of energy engineering, I'm among the best that the Deep has to offer. I worked on the Dwarf Core." Garrison pauses and chuckles to himself before saying, "I also contributed toward the creation of those comically impractical LP576a Battery Packs that I have yet to see a single ship using.`
			`	"Anyhow, because of my past work, the Deep approached me to work on this project. The pay was better than what I was getting before so I accepted it. It was a pleasant surprise to meet my partners as well. Hannah graduated in the same undergrad class as me, double majoring in quantum mechanics and ancient history, of all things."`
			choice
				`	"What is it that you need from Carbuncle Station that is so secret?"`
				`	"What about Pierre and Laura?"`
					goto partners
			
			`	"Like I said already, the project is classified. It's not something I would understand, though. It's in Laura's field of expertise. You see, she has a PHD in--"`
				goto end
			
			label partners
			branch electron
				has "event: navy using mark ii ships"
			`	"Pierre is an older guy, he's been working on laser weaponry for the better part of three decades now. Before this he was working on a separate project, but the Deep asked that he take time away from that to work on Project Hawking while they try to find a replacement for him, since the project needed someone with better knowledge in laser weaponry than the rest of us.`
				goto laura
			
			label electron
			`	"Pierre is an older guy. He has been working on laser weaponry for the better part of three decades now. If you've ever seen an Electron Beam in action, you have him to thank for that. And a few others, of course, but one of his findings is really what brought the whole project together.`
			
			label laura
			`	"Laura, on the other hand--"`
			
			label end
			`	Before Garrison can finish speaking, the other three scientists return, helping each other carry a sealed metal box. "We're just going to set this in the back, if you don't mind," Pierre says. The scientists make themselves cozy in the bunk rooms and get ready to depart.`
			`	A chirping from your ship's radio indicates you have received a message from the station. You open it and are not shocked at its contents:`
			``
			`		Your immediate departure is required.`
			`					Carbuncle Station Docking Authority`
			``
			`	You signal to your crew and passengers that takeoff is imminent, and obey the wishes of Lovelace Labs' research station.`
				launch



mission "Deep: Project Hawking: Prime"
	landing
	invisible
	source "Prime"
	to offer
		has "Deep: Project Hawking: active"
	to fail
		has "Deep: Project Hawking: done"
	npc kill
		government "Independent (Killable)"
		personality waiting
		ship "Marauder Raven (Engines)" "Krampus"
	on offer
		conversation
			`As you approach the massive <planet> spaceport building, Pierre directs you to park on a landing pad on the third story, close to the warehouse section. "We're picking up various materials used in the creation of ships, that we need samples of for testing," Pierre explains.`
			`	The scientists speak with the spaceport authorities, who begin loading several tons of alloys into your cargo from an overhead platform. You sit with Pierre as you wait for them to finish.`
			choice
				`	"That's a lot of different alloys. What are they going to be used for?"`
				`	"Why did we need to come all the way to Prime to get these materials?"`
					goto alloys
			
			`	Pierre cocks his head to the side as he looks at you. "We're going to destroy them. Short and simple. We need to see how different ship alloys hold up to the technology we're working on.`
			
			label alloys
			`	"We could have gotten materials from a shipyard local to the Deep, but Betelgeuse Shipyards gets regular shipments of metals more commonly used by shipyards in the Dirt Belt, so it's really the closest place to get everything we need."`
			choice
				`	"Do you enjoy the work you do for the Deep?"`
				`	"How long have you been working for the Deep?"`
			
			label story
			`	"Let me answer that question with a short story of my life." Pierre clears his throat and puffs up his chest a little, as if preparing himself to tell a great epic. He may enjoy talking about himself a little too much...`
			`	"I was born on Windblain in the Regor system. It's a small, quiet world of little galactic importance, but you should give it a visit sometime. My family wasn't the most well off, so I needed to work hard in my studies, which paid off immensely. Thanks to my exceptional grades in university, I was offered a government job even before graduation. I've been working directly for the Deep for the past 35 years and counting, and I've loved every minute of it! My younger sister though... well, let's just say she wasn't so focused on being successful in school and ended up on the wrong side of the law.`
			`	"How about you?"`
			`	You tell Pierre about your life on New Boston, and how you saved up your money working at the textile mill from the age of fifteen until you were able to buy a pilot's license and finally leave your home world for the stars.`
			`	"We aren't too different then," Pierre remarks. "We both worked hard to get where we are today. Thanks for sharing, <first>."`
			`	"The cargo is all in, Captain!" Garrison yells down from the platform above. "We're ready when you are!"`
				accept



mission "Deep: Project Hawking: Vinci"
	landing
	invisible
	source "Vinci"
	to offer
		has "Deep: Project Hawking: active"
	to fail
		has "Deep: Project Hawking: done"
	npc kill
		government "Independent (Killable)"
		personality waiting
		ship "Marauder Manta (Engines)" "Valac"
	on offer
		conversation
			`"It might take a while to get a hold of the electronics we need," Pierre says after you land. "Just stick around the spaceport while we're gone."`
			`	"You guys can handle it, right?" Hannah asks. "I haven't been to Vinci in years. I want to see the virtual reality activities they have in the spaceport arcade now."`
			`	The other three scientists agree that they can make do without her, and she immediately runs off in the direction of the spaceport arcade. When you find her, she is busy playing a VR table tennis game against an AI hologram. By the look of things she is an amazing player, and the score is currently tied.`
			choice
				`	"You're doing great! Do you play table tennis often?"`
				`	"You can do it!"`
				
			`	Hannah slams the virtual ball with her paddle, causing it to bounce off the table, fly right past her opponent, and disintegrate into thin air.`
			`	"I did pretty good, didn't I? It's my first time playing table tennis, too."`
			`	"How did you do that good for your first time?"`
			`	"I'm just a quick learner. Always have been. In university I would do work for my history courses while sitting through lectures on quantum mechanics. Got straight A's in both classes without a problem."`
			choice
				`	"That's a strange combination of classes."`
				`	"What did you learn in ancient history?"`
					goto history
			
			`	"That's what everyone else told me, too. It was fun though, and a lot of what I learned in ancient history was just as interesting as what I learned in quantum mechanics."`
			`	"What did you learn in ancient history?" you ask.`
			
			label history
			`	"I could spend weeks on end talking about what I learned in those classes. The most interesting thing I learned has to be my ancestry. Most of my ancestors came from a place on Earth called Scandinavia, and my last name means 'garden' in an ancient language.`
			`	"It's interesting to know where my ancestors lived over a thousand years ago when humanity was still stuck on Earth. It's amazing that the hyperdrive was invented when it was too, because we could have easily wiped ourselves out if we hadn't. Life still isn't perfect across the galaxy, but it's still far better on average than it was on Earth alone."`
			`	Hannah looks like she is ready to endlessly blather on about Earth before the hyperdrive was invented, but you are saved by Laura. "We got the electronics we need loaded onto your ship, Captain. Garrison and Pierre are waiting for us there."`
				accept



mission "Deep: Remnant 0"
	minor
	name `Fetching keystones`
	description `Buy 10 quantum keystones from Hai space and return them to <destination>, where Ivan and his team will research them and their link to the spatial anomaly in Terminus.`
	source
		attributes "deep"
		not system "Epsilon Leonis"
	to offer
		random < 40
		has "Deep: Mystery Cubes 4: done"
		has "Terminus exploration: done"
		has "First Contact: Hai: offered"
		has "main plot completed"
	
	on offer
		conversation
			`While wandering through the spaceport, you are approached by a man you instantly recognize as Ivan, the scientist whose drone you recovered data from in Terminus, thanks to his comically thick glasses. He mentions that he heard how helpful you have been to others within the Deep.`
			`	"I was hoping you would continue assisting us in our research on the spatial anomaly in Terminus. Thanks to the data you retrieved, we have deduced that the anomaly is in fact some sort of wormhole, but it is far too unstable to support sending anything through it."`
			`	Ivan looks around then leans in to whisper to you. "I must ask you, do you know of the Hai?" You nod. "Splendid!" He jumps up, nearly knocking his own glasses off his face. "Then you will be able to help. One of the scientists on my team grew up in their territory, and suggested that the so-called 'quantum keystones' which they sell might have something to do with the wormhole. He recalls hearing some Hai folktales of these stones making travel between the stars easier, and since the Hai once lived close to where the wormhole is, there may be a relation. Given that it would be immensely difficult to stabilize the wormhole with our current knowledge, it may be that these stones will make access into the wormhole easier. Would you kindly retrieve ten of them for us, so that we may be able to discover if these legends are true?"`
			branch remnant
				has "First Contact: Remnant: offered"
			choice
				`	"I would be glad to help."`
				`	"Sorry, but Hai space is too far for me."`
					decline
					
			`	"Thank you again, Captain!" he says very enthusiastically. "I'd have traveled myself, but I must confess we are low on funds and will not receive more unless we make some sort of discovery. We will be able to pay for half the cost of the stones once you return."`
				accept
			
			label remnant
			choice
				`	"I already know what is on the other side of the wormhole. In fact, installing a single quantum keystone is enough to enter into the spatial anomaly."`
				`	"Sorry, but Hai space is too far for me right now."`
					decline
			action
				set "deep: knew of stones before scientists"
			`	Ivan looks like he is about to fall over with joy after you mention having entered the wormhole. "Really? Please, tell me what you found!"`
			branch friendly
				has "event: ember waste label"
			action
				set "deep: did reveal remnant"
			`	You tell Ivan all that you saw on the other side of the wormhole, and how you found strange-looking humans who communicate in song and sign language that attacked you after you wouldn't submit to a blood test. You also mention the other oddities of the region of space, including the strange alien creatures in Nenia that are able to survive in the vacuum of space, as well as the large number of wormholes that allow traversal throughout the region.`
				goto end
			
			label friendly
			choice
				`	(Reveal the existence of the Remnant.)`
				`	(Don't reveal the existence of the Remnant.)`
					goto secret
			action
				set "deep: did reveal remnant"
			`	You tell Ivan about how the region of space beyond the wormhole is known as the "Ember Waste" and that it is inhabited by a group of friendly humans who fled there during the Alpha Wars. These humans have advanced independently from the rest of humanity for centuries. You mention their strange culture, sharing what you can remember about the songs the Remnant people sang.`
			`	You also mention the other oddities of the Ember Waste, including the strange alien creatures in Nenia that are able to survive in the vacuum of space, as well as the large number of wormholes that allow traversal throughout the region.`
				goto end
				
			label secret
			action
				set "deep: did not reveal remnant"
			`	You tell Ivan about the region of space beyond the wormhole and its vast loneliness. You describe the ever-present red glow, similar to the color of the wormhole. You also mention the strange alien creatures in Nenia that are able to survive in the vacuum of space, as well as the large number of wormholes that allow traversal throughout the region.`
			
			label end
			`	"This is very interesting, and would turn out to be an amazing discovery if true. Please, bring us the quantum keystones so that we might try to understand the properties which allow entry into the wormhole's threshold. Later we will learn more about this region that you describe. Oh, before I forget: we can pay you for half of the cost of the keystones."`
			choice
				`	"I would be glad to help."`
					accept
				`	"Sorry, I don't want to help with this."`
					decline
	on visit
		dialog `You do not have the 10 quantum keystones that Ivan asked you to purchase in Hai space. You should return here after obtaining them.`
	on complete
		outfit "Quantum Keystone" -10
		event "deep: keystone research" 14
		payment 60000
		log `Ran into the scientists who are investigating the anomaly in Terminus. Gave them ten quantum keystones from Hai space to examine.`
		conversation
			branch TMBR
				has "Deep: TMBR 0: offered"
			`Upon returning to <planet>, you learn that Ivan has left for his research lab on Valhalla, but his research assistant, Rayna, is waiting to retrieve the keystones. She hands you <payment>, enough to pay for half of the cost of the stones.`
				goto end
			
			label TMBR
			`Upon returning to <planet>, you learn that Ivan has left for his research lab on Valhalla, but instead you find that Rayna is waiting to retrieve the keystones. She hands you <payment>, enough to pay for half of the cost of the stones.`
			
			label end
			`	"Thank you for buying these keystones for us. It may take us a month or two to fully study them. We'll contact you when we're in need of your assistance again."`

event "deep: keystone research"



mission "Deep: Remnant: Keystone Research"
	landing
	name `Travel to <planet>`
	description `Meet up with Ivan on <destination> to learn about his research on the quantum keystones you brought him.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not system "Epsilon Leonis"
	destination "Valhalla"
	to offer
		has "event: deep: keystone research"
	
	on offer
		dialog
			`You receive a message from Ivan, the scientist working on the spatial anomaly in Terminus. "Captain, we have finished studying the quantum keystones, and they do in fact allow access through the wormhole. Please meet with me on <destination> if you wish to continue helping us with our research."`



mission "Deep: Remnant 1"
	landing
	name `Exploring the Unknown`
	description `Explore the region of space beyond the Terminus wormhole. Return to <destination> after exploring everything you can reach.`
	source "Valhalla"
	waypoint "Terminus"
	to offer
		has "Deep: Remnant: Keystone Research: done"
		not "deep: knew of stones before scientists"
		not "First Contact: Remnant: offered"
		# A relic of how Deep: Remnant use to be structured.
		not "Deep: Remnant 1A: offered"
		not "Deep: Remnant 1B: offered"
		not "Deep: Remnant 1C: offered"
	
	on offer
		conversation "deep: remnant"
	on accept
		outfit "Quantum Keystone" 1
	on enter "Arculus"
		dialog `This region of space appears to be inhabited. You should attempt to find out more about the beings living here.`
	on enter "Nenia"
		set "discovered void sprites"
		dialog
			`This system is full of strange, space-dwelling creatures that appear to be eating asteroids. The sight of their mouthparts chewing rock into dust is sure to be a recurring nightmare for any captain who visits this system. You make a note to avoid flying too close, in case they mistake your ship for their next meal.`
			`	With these strange creatures so close to the wormhole, one can only wonder what lies deeper in this region of space.`
	on visit
		dialog `You have landed on <planet>, but you have not explored enough of the space beyond the wormhole. Return to the wormhole and continue exploring the region for anything of interest.`
	to complete
		has "First Contact: Remnant: offered"
		has "discovered void sprites"



mission "Deep: Remnant 2"
	landing
	name `Analyze Wormholes`
	description `Ivan and his team are interested in studying the wormholes beyond the one in Terminus. Return to the strange region of space and travel through the wormholes that create a loop while carrying the scanning equipment.`
	source "Valhalla"
	waypoint "Cardea"
	waypoint "Insitor"
	waypoint "Segesta"
	waypoint "Aescolanus"
	cargo "astronomical recorders" 5
	blocked `You've returned to <planet>, but Ivan informs you that you'll need <capacity> available for this next mission. Return when you have the available space.`
	to offer
		or
			has "Deep: Remnant 1: done"
			and
				has "Deep: Remnant: Keystone Research: done"
				not "Deep: Remnant 1: offered"
				not "Deep: Remnant 1A: offered"
				not "Deep: Remnant 1B: offered"
				not "Deep: Remnant 1C: offered"
				or
					has "deep: knew of stones before scientists"
					has "First Contact: Remnant: offered"
	on offer
		conversation "deep: remnant"
	on visit
		dialog `You've returned to <planet>, but you haven't traveled through all the wormholes yet. Return to the strange region of space and travel through the loop of wormholes.`



conversation "deep: remnant"
	branch "on second mission" "on first mission"
		has "Deep: Remnant 1: done"
	
	label "on first mission"
	`You contact Ivan after you land and he sends you directions to his research lab, located on the outskirts of the city. "Quite the distance from my office, but we work with what we have," he comments. When you arrive, you hardly have time to greet Ivan, Rayna, and the others before Ivan begins discussing what they have learned from the quantum keystones.`
	branch "knew before" "didn't know before"
		has "deep: knew of stones before scientists"
	
	label "knew before"
	`	"As you mentioned before, a single keystone is sufficient to enter the wormhole," Ivan says. "We've determined that there is a stabilization effect, either on the ship or the wormhole, that allows matter to cross the threshold. However, we'll need much more time and data to fully understand the true mechanism.`
	branch remnant1
		has "deep: did reveal remnant"
	`	"Last time, you mentioned that there were alien creatures able to survive the vacuum of space, correct?"`
	`	You nod.`
	`	"Right. Well, it would be extremely interesting if we were to learn more about these alien creatures.`
		goto end

	label remnant1
	`	"Last time, you mentioned that there were humans living in this space, the... the 'Remainder?'"`
	`	"Remnant," you say.`
	`	"Right, that was it. Well, it would be extremely interesting if we were to learn more about this people.`
		goto end
	
	label "didn't know before"
	`	"We've analyzed the keystones, and surprisingly they do allow entry into the wormhole in Terminus," Ivan explains. "It would appear that the stones stabilize the wormhole as the ship passes through it, or maybe it is stabilizing the ship in some way and not the wormhole. We'll need much more time to fully understand the true mechanism that is at play here. Whatever the case is, one stone is required for each ship to pass through the wormhole.`
	`	"We sent a single drone through the wormhole to test that it was passable, and programmed it to return immediately in case the region beyond is hostile or dangerous. Would you be willing to explore the region for us? You may want to install a ramscoop, as we are unsure if there will be anywhere for your ship to refuel."`
	branch "know now" "still don't know"
		has "First Contact: Remnant: offered"
	
	label "know now"
	choice
		`	"Actually, I already explored the region beyond the wormhole while you were researching."`
			goto skip
		`	"Sorry, I don't want to work for you anymore."`
			decline
	
	label "on second mission"
	`When you return, Ivan and the rest of the scientists wait eagerly for you to explain what you discovered.`
	
	label skip
	`	You begin by recounting your experience with the strange space-dwelling creatures you found in the Nenia system. Ivan's eyes go wide when you mention the ease with which they fed on asteroids, and how they seemed to effortlessly escape from the gravity of local gas giants. You also mention that there are more strange wormholes like the one that you passed through to enter the region of space, including a series of wormholes that create a loop between multiple systems.`
	branch friendly
		has "event: ember waste label"
	action
		set "deep: did reveal remnant"
	`	You then tell them about the strange-looking humans who communicate in song and sign language that attacked you after you wouldn't submit to a blood test.`
		goto remnant2
		
	label friendly
	choice
		`	(Reveal the existence of the Remnant.)`
		`	(Don't reveal the existence of the Remnant.)`
			goto secret
	action
		set "deep: did reveal remnant"
	`	You then tell them about the Remnant, a group of friendly humans who fled human space during the Alpha Wars and have advanced independently of humanity for centuries, and how they call the region of space the "Ember Waste."`
		goto remnant2

	label secret
	action
		set "deep: did not reveal remnant"
	`	The group of scientists looks captivated the entire time, almost like kindergarten children listening to a fairy tale. When you finish talking, they immediately chatter among themselves, seeming to be most interested in the alien creatures which inhabit the region. They seem to agree that they need to learn more about these aliens.`
	`	"We can seek to learn more about these alien creatures later," Ivan says.`
		goto end
		
	label remnant2
	`	The group of scientists looks captivated the entire time, almost like kindergarten children listening to a fairy tale. When you finish talking, they immediately chatter among themselves, seeming to be most interested in the human beings which inhabit the region. They seem to agree that they need to learn more about these humans, and more specifically about the technology which they have developed.`
	`	"We can seek to learn more about this group of humans later," Ivan says.`

	label end
	`	"But, first and foremost, we should continue our work on understanding these wormholes. You mentioned a strange series of wormholes. Their behavior is definitely noteworthy. Could you return to this region of space while carrying a suite of astronomic instruments? If you travel through these wormholes, we may learn more about what makes them tick."`
	choice
		`	"Okay, I'm willing to do it."`
		`	"Sorry, but I didn't agree to help you beyond that first job. Goodbye."`
			decline
	`	"Wonderful! We'll get the instruments loaded onto your ship immediately."`
		accept

	label "still don't know"
	choice
		`	"I'm always willing to go on an adventure."`
		`	"This sounds too risky. You're going to need to find someone else to go exploring."`
			decline
	`	"Splendid! We will give you a single quantum keystone in order to travel through the wormhole. Return here once you have finished exploring."`
		accept



mission "Deep: Remnant 3: Secret"
	landing
	name `Analyze Alien Creatures`
	description `Scan the "outfits" of the alien creatures in Nenia, then return to the scientists on <destination> with the detailed scanner logs.`
	source "Valhalla"
	waypoint "Nenia"
	to offer
		has "Deep: Remnant 2: done"
		has "deep: did not reveal remnant"
	
	on offer
		conversation "deep: remnant 3"
	on accept
		event "remnant: nenia empty"
	
	npc "scan outfits"
		government "Indigenous Lifeform"
		personality timid mining harvests staying mute
		system "Nenia"
		fleet
			cargo 0
			variant
				"Void Sprite"
				"Void Sprite (Infant)"
		dialog `You have finished scanning the alien creatures in the system. You may now return to <destination> with the scanner logs.`
	
	on visit
		dialog `You show your scanner logs to Ivan, but he shakes his head. "This isn't enough. There should be more creatures for you to scan in <waypoints>. Make sure you're using an outfit scanner as well."`
	on complete
		event "deep: scan log research" 14
		event "remnant: nenia restored"
		log `Scanned alien creatures beyond the wormhole in Terminus and handed the scan logs over to Ivan and his team.`
		dialog `The team is visibly excited when you return with the scanner logs. "Give us a few weeks to look these over," Ivan says. "Then we will contact you about what we want you to do next."`



mission "Deep: Remnant 3: Revealed"
	landing
	name `Analyze Remnant Ships`
	description `Scan the outfits of the Remnant ships in Arculus, then return to the scientists on <destination> with the detailed scanner logs.`
	source "Valhalla"
	waypoint "Arculus"
	to offer
		has "Deep: Remnant 2: done"
		has "deep: did reveal remnant"
	
	on offer
		conversation "deep: remnant 3"
	on accept
		event "deep: arculus empty"
	
	npc "scan outfits"
		government "Remnant"
		personality staying uninterested
		system "Arculus"
		fleet
			names "remnant"
			variant
				"Albatross"
				"Starling"
		dialog `You have finished scanning the Remnant ships in the system, and they don't seem to have taken too kindly to that. You may now return to <destination> with the scanner logs.`
	
	on visit
		dialog `You show your scanner logs to Ivan, but he shakes his head. "This isn't enough. There should be more ships for you to scan in <waypoints>. Make sure you're using an outfit scanner as well."`
	on complete
		event "deep: scan log research" 14
		event "deep: arculus restored"
		log `Scanned Remnant ships beyond the wormhole in Terminus and handed the scan logs over to Ivan and his team.`
		dialog `The team is visibly excited when you return with the scanner logs, but become more somber when you mention that the ships became hostile when you scanned them. "Give us a few weeks to look these over," Ivan says. "Then we will contact you about what we want you to do next. By then, should we return, hopefully those ships won't be too upset anymore."`

event "deep: arculus empty"
	system "Arculus"
		remove fleet "Large Remnant"
		remove fleet "Small Remnant"
		remove fleet "Remnant Transport"
		remove fleet "Remnant Home Guard"
		remove fleet "Korath Ember Waste Raid"

event "deep: arculus restored"
	system "Arculus"
		add fleet "Large Remnant" 3000
		add fleet "Small Remnant" 2200
		add fleet "Remnant Transport" 2200
		add fleet "Remnant Home Guard" 2000
		add fleet "Korath Ember Waste Raid" 40000



conversation "deep: remnant 3"
	`The team of scientists is already waiting in the spaceport when you arrive. They remove the equipment from your ship and immediately begin analyzing the results after returning to the lab.`
	`	"At first glance, this series of wormholes seems no different than the one that is used to enter this region of space, but it will require some time for us to go over all the data the sensors collected," Ivan explains to you.`
	branch revealed
		has "deep: did reveal remnant"
	`	"While you wait, though, I have another job you could do. You mentioned something about strange alien creatures beyond the wormhole that seemed to be able to survive in the vacuum of space. Would you be able to return there and scan them for us? These alien creatures won't have 'outfits' for the scanners to pick up, but a typical outfits scanner is still likely to give us the most information."`
		goto end

	label revealed
	`	"While you wait, though, I have another job you could do. You mentioned something about a group of humans, or at least human-like beings, beyond the wormhole. Would you be able to return there and scan their ships for us? I'd be interested in seeing what an outfits scanner returns. You need not contact them, simply find a couple of ships and scan them so that we might learn more about their capabilities."`
	label end
	choice
		`	"Sounds like a good plan. I'll be back as soon as I can."`
			accept
		`	"Sorry, but I'm not comfortable with this idea. You'll need to find someone else."`
			decline



event "deep: scan log research"



mission "Deep: Remnant Research"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	to offer
		has "event: deep: scan log research"
	
	on offer
		payment 250000
		conversation
			`You receive a message from Ivan after you land. "Thanks for all your help recently. We brought our findings to the Deep government, but given their sensitive nature the Deep is taking its time deciding whether to fund further research. In the meantime, I've transferred <payment> of my own funds to your account. I have no doubt the Deep will approve further funding for our project in the future, so I've simply written this off as a business expense. I'll contact you once we continue our research beyond the wormhole. Thanks again!"`
				decline



# Patch mission for v0.9.13. If the player finished these missions prior to this update, then that means they must have revealed the existence of the Remnant to the Deep.
mission "deep: player revealed remnant"
	landing
	invisible
	to offer
		has "Deep: Remnant Research: offered"
		not "deep: did reveal remnant"
		not "deep: did not reveal remnant"
	on offer
		set "deep: did reveal remnant"
		fail


mission "deep: remnant: rest period"
	landing
	invisible
	to offer
		has "Deep: Remnant Research: offered"
	on offer
		event "deep: remnant: rest period" 365
		fail

event "deep: remnant: rest period"



mission "Deep: Remnant: Continue Research"
	name `Travel to <planet>`
	description `Meet up with Ivan on <destination> to continue helping with research on the Ember Waste.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not system "Epsilon Leonis"
	destination "Valhalla"
	to offer
		has "event: deep: remnant: rest period"
		has "deep: did reveal remnant"
	on offer
		conversation
			`You receive a message from Ivan, the Deep scientist who you helped to discover the Remnant in the Ember Waste. "Captain <last>, it's been so long. The Deep has finally finished reviewing our research in the Ember Waste, and we've been approved for further funding! Please meet us on <destination> if you wish to assist us again. Your help would be appreciated, but we will make progress even if you're unable to help."`
			choice
				`	(Accept.)`
					accept
				`	(Decline.)`
					decline



mission "Deep: Remnant: Engines"
	landing
	name `Fetching Engines`
	description `Acquire "Forge-Class" thruster and steering engines from the Remnant and bring them to <destination>.`
	source "Valhalla"
	to offer
		has "Deep: Remnant: Continue Research: done"
		has "deep: did reveal remnant"
	
	on offer
		conversation
			`Thanks to the new funding grants from the Deep, the team has moved their research lab into a more advanced facility closer to the spaceport. "This new location will make transferring cargo from your ship to the lab much easier, something we expect to do a lot of in the next few months. It's also much closer to my office, which will make life much easier," Ivan adds. "A careful study of the outfit scans you collected has indicated that the Remnant technology uses unprecedented advancements and improvements that haven't been seen in any human technology before.`
			
			branch friendly
				has "event: ember waste label"
			`	"Even though the Remnant have attacked you, we are very interested in what additional secrets their technology may hold. Are you willing to steal some of their technology and bring it to us for analysis?"`
			choice
				`	"Is this really necessary?"`
				`	"I'd be more than happy to help."`
					goto accept
				`	"Sorry, but I'm not interested in working for you anymore."`
					decline
			
			`	"If they aren't willing to be friendly and simply sell you their technology then I'm afraid that this is the only way that we can obtain it. You don't have to destroy their ships if you don't want to, we simply need you to disable a few and take some of their outfits."`
			choice
				`	"Alright, I'll do it."`
					goto accept
				`	"Sorry, but I'm not going to attack human beings for the sake of science."`
					decline
			
			label friendly
			`	"You told us that these humans were friendly... well, until you scanned their ships, that is. Do they allow you to purchase their technology?"`
			branch license
				has "license: Remnant"
			`	"No," you respond. "They haven't given me a license to buy any of their outfits or ships."`
			`	The scientists ponder this for a moment. Eventually, Rayna speaks up. "Maybe if you assist them in some way they may welcome you into their society. I can imagine that they are a little wary after all those years on their own. Try doing jobs for them or see if anyone in their spaceports needs something from you."`
			`	"You could also plunder their technology if they won't sell it to you," Ivan chimes in. "Without killing them, of course," he adds.`
			choice
				`	"I'll see if I can try to get my hands on what you need."`
					goto accept
				`	"Sorry, but I'm not interested in doing that kind of work for you."`
					decline
			
			label license
			`	"Yes," you respond. "I had to do a few odd jobs for them, but they eventually allowed me to purchase their outfits and ships."`
			`	"Then all you need to do is buy whatever we ask you to and bring it back here. Are you interested?"`
			choice
				`	"I'd be glad to help."`
				`	"Sorry, but I don't want to spend money for your research."`
					decline
			
			label accept
			`	"Great!" Ivan exclaims. "Right now we'd be interested in studying their engines. Please bring us one Forge-Class Thruster and one Forge-Class Steering. They shouldn't be too hard to get."`
				accept
	
	on visit
		dialog `You have landed on <planet>, but you do not have both a Forge-Class Thruster and Forge-Class Steering. Return to <planet> once you have obtained both engines.`
	on complete
		outfit "Forge-Class Thruster" -1
		outfit "Forge-Class Steering" -1



mission "Deep: Remnant: Generators"
	landing
	name `Fetching a Generator`
	description `Acquire a Millennium Cell generator from the Remnant and bring it to <destination>.`
	source "Valhalla"
	to offer
		has "Deep: Remnant: Engines: done"
	
	on offer
		payment 417000
		conversation
			`An unloading crew quickly removes the engines from your ship and transports them to Ivan's research lab. You are escorted into a lobby where one of the administrative staff pays you <payment> in exchange for the engines. He asks you to wait, indicating that Ivan or one of the other scientists should be out to meet you shortly. After about three hours of waiting, Ivan enters the room.`
			`	"These engines, they are fantastic! The scans made them seem similar to human ion engines, but surprisingly they can outperform even atomic engines! The thrust-to-mass ratio is great, and they have somehow avoided the immense heat generation that our engines emit. They do have some downsides, but it's still amazing that such an isolated group of humans could make technological leaps beyond even what the Deep has accomplished.`
			`	"We've decided that the next Remnant technology we'd like to examine is their power generation. Could you bring us one of their Millennium Cells?"`
			choice
				`	"Sure. I'll be back in no time at all."`
					accept
				`	"Sorry, but I'm no longer interested in working for you."`
					decline
	
	on visit
		dialog `You have landed on <planet>, but you do not have a Millennium Cell. Return to <planet> once you have obtained the generator.`
	on complete
		outfit "Millennium Cell" -1



mission "Deep: Remnant: Inhibitor Cannon"
	landing
	name `Fetching a Cannon`
	description `Acquire an Inhibitor Cannon from the Remnant and bring the weapon to <destination>.`
	source "Valhalla"
	to offer
		has "Deep: Remnant: Generators: done"
	
	on offer
		payment 276500
		conversation
			`Again, the Remnant technology is removed from your ship and transported to the research lab. You wander into the waiting area and are paid <payment>. After several hours, the scientists come to you with their initial findings.`
			`	"This Millennium Cell is little more than a radiothermal generator. Not exactly the best kind of generator if you're looking for lots of power - our Fusion Reactors are far better at that - but for a radiothermal generator, it produces remarkably little heat. We'll have to take it apart to find out how they are manipulating the decay heat so effectively, but preparing for that will take some time.`
			`	"I suppose by now you've seen the Remnant ships in combat more than a few times. The outfit scans showed one of their primary weapons is a modified Particle Cannon, but we'd need to see the actual weapon in order to understand how the modification works. Would you retrieve an Inhibitor Cannon for us?"`
			choice
				`	"I'd be glad to."`
					accept
				`	"Sorry, but I'm no longer interested in working for you."`
					decline
	
	on visit
		dialog `You have landed on <planet>, but you do not have an Inhibitor Cannon. Return to <planet> once you have the weapon.`
	on complete
		outfit "Inhibitor Cannon" -1



mission "Deep: Remnant Surveillance"
	landing
	name `Remnant Surveillance`
	description `Land on each of the Remnant worlds (<stopovers>) and place a number of sensor cubes. Then return to <destination> once you are done.`
	source "Valhalla"
	stopover "Viminal"
	stopover "Aventine"
	stopover "Caelian"
	to offer
		has "Deep: Remnant: Inhibitor Cannon: done"
	
	on offer
		payment 235500
		log `Delivered various pieces of Remnant technology to the Deep to be examined. Ivan's project has drawn the attention of the Deep, and the Inhibitor Cannon was taken away by Deep Security before it could be researched.`
		conversation
			`Instead of sending the Inhibitor Cannon to Ivan's lab, the unloading crew transfers it to a waiting Deep Security ship, which immediately departs when its cargo bay doors close. Unlike the previous crews that met you upon landing, they are all in military garb. When you meet Ivan at his lab, he explains that the Deep was especially interested in the Remnant technology after reading his previous reports, and that his team would need to study it in a "more secure location."`
			branch friendly
				"reputation: Remnant" >= 1
			`	Ivan hands you <payment>. "Thank you for all the help, Captain <last>. You've done a lot for humanity in these past few months. It may take us years to fully understand the technology you have brought us, but rest assured that once we do understand it, the galaxy will be a better place. I'll see you later, Captain. Stay safe."`
				decline
				
			label friendly
			`	Ivan hands you <payment>. "Thank you for all the help, Captain <last>, but I have one last thing to ask." Ivan reaches into his pocket and retrieves six objects that you recognize as sensor cubes. "Would you bring two of these to each of the Remnant worlds? We've been learning a great deal from the study of the Remnant outfits, but aside from your scanning logs we have very little information on the Remnant ships. If you were to place these near their spaceports, they would be able to scan any nearby ships, which would be most helpful."`
			choice
				`	"You can count on me, Ivan."`
				`	"Sorry, but this doesn't seem like the right thing to do. You'll need to find someone else to do this for you."`
					decline
			
			`	"Thank you, Captain. Return here once you have finished, and I'll ensure you are well compensated for the journey."`
				accept
	
	on visit
		dialog `You have landed on <planet>, but you have not placed two cubes on all the Remnant worlds. Return to the Ember Waste and make sure you have placed surveillance devices on <stopovers>.`
	on complete
		payment 500000
		log `Secretly placed sensor cubes near the spaceport of each Remnant planet. Ivan hopes to use the data gathered from these cubes to learn more about Remnant ships.`
		dialog
			`When you return to <planet>, you are unable to find Ivan. Instead, Rayna waves you down and hands you a credits chip worth <payment>.`
			`	"Ivan told me to give this to you, Captain. Thanks again for helping us out so much. We couldn't have done it without you."`



mission "Deep: Remnant Surveillance - Viminal"
	landing
	invisible
	source "Viminal"
	to offer
		has "Deep: Remnant Surveillance: active"
	on offer
		conversation
			`You try to make an effort to not be seen as you decide where to place the cubes. You place one outside of the spaceport dome, burying it in the snow so it is difficult to find. The other you tuck into a dark corner of the spaceport, and as soon as you let it go it blends in surprisingly well with its surroundings.`
				decline

mission "Deep: Remnant Surveillance - Caelian"
	landing
	invisible
	source "Caelian"
	to offer
		has "Deep: Remnant Surveillance: active"
	on offer
		conversation
			`You place the first of the cubes at the entrance of a now-abandoned underground settlement, in a dark area where it will not be seen. Unable to find a good spot for the second, you decide to leave it in a ditch and cover it in sand. Although you are unable to see anyone, you feel that you are being watched. As the only non-Remnant you are not exactly inconspicuous, but no one approaches you as you return to your ship.`
				decline

mission "Deep: Remnant Surveillance - Aventine"
	landing
	invisible
	source "Aventine"
	to offer
		has "Deep: Remnant Surveillance: active"
	on offer
		conversation
			`As you walk through the oldest part of the town, you spot an alleyway that has plenty of nooks in which a cube can be concealed. You decide to place the other one far outside of town, near the top of the valley where the spaceport can still be seen.`
				decline



mission "remnant: clear deep surveillance"
	landing
	invisible
	to offer
		has "Deep: Remnant Research: offered"
	on offer
		clear "Remnant: Deep Surveillance: offered"
		fail

mission "Deep: Scientist Rescue Timer"
	landing
	invisible
	to offer
		has "Deep: Project Hawking: done"
	on offer
		event "deep: scientist rescue timer" 60
		fail

event "deep: scientist rescue timer"



mission "Deep: Scientist Rescue 0"
	minor
	name "Locate Missing Scientists"
	description "A Star Queen transporting prominent Deep scientists has gone missing. It was last seen near the Betelgeuse system in the Far North. Find its whereabouts and return it to <destination> if possible."
	source
		attributes "deep"
		not attributes "station"
	destination "Valhalla"
	waypoint "Betelgeuse"
	to offer
		has "event: deep: scientist rescue timer"
		or
			not "chosen sides"
			has "main plot completed"
	
	on offer
		conversation
			`While watching a local sports game on the telescreen of a spaceport restaurant called "The <origin> Sif," your name is called from the entrance. You turn your head and spot Lieutenant Paris waving at you to come outside. You pay for your meal and walk outside.`
			`	"Hello Captain. Do you have a moment to talk?"`
			choice
				`	"I do. What do you need?"`
					goto situation
				`	"Sorry, but I'm busy right now."`
			
			`	"This isn't a situation that can wait, Captain. You are needed immediately."`
			choice
				`	"What is it?"`
				`	"I can't help you. You're going to need to find someone else."`
					decline
			
			label situation
			`	"A number of scientists have been kidnapped during a venture to the Far North. Their intent was to research the Wolf-Rayet star in the Gorvi system. Due to this system's proximity to the anarchist worlds, very little research has been conducted on it. Pierre, Hannah, and... and Laura were all aboard the Star Queen which contained the scientists. Since you know them I only thought it fair that you should know about the situation.`
			`	"It was yesterday that we were informed of the kidnapping. The Star Queen and its escorts were preparing to refuel on Prime in the Betelgeuse system when a large pirate fleet entered the system. The Star Queen's escorts were swiftly destroyed, and she was captured. We lost all communications with the vessel after that. Would you be willing to help us locate the Star Queen while we prepare a rescue force?"`
			choice
				`	"I would be glad to help. I'll prepare my ship immediately."`
					accept
				`	"Why can't you locate it yourself?"`
			
			`	"Given the importance of the scientists aboard the Star Queen, we took great care in providing them with some of the strongest warships we had. The loss of these ships and their crew is a major blow to Deep Security's combat capabilities. We are recoiling from the impact of this loss while we assemble a proper rescue fleet and are unable to spare any ships for a scout fleet at this moment.`
			`	"In a situation like this, every minute matters, and if someone like you can find the Star Queen quickly then that means that there is a higher chance everyone can come out of this alive."`
			choice
				`	"Okay, I'm willing to help."`
					accept
				`	"Sorry, but this doesn't sound worth it to me."`
					decline

	on enter "Arneb"
		set "found star queen"
		dialog `As you enter Arneb, your scanners pick up the Star Queen landing on Haven. Unfortunately, there are also a large number of pirate vessels headed in your direction. You should report back to Paris on <destination> for further instruction.`
	on visit
		dialog `You have landed on Valhalla, but you have not located the Star Queen! Find it somewhere in the Far North.`
	to complete
		has "found star queen"



mission "Deep: Scientist Rescue 0: Prime"
	landing
	source "Prime"
	to offer
		has "Deep: Scientist Rescue 0: active"
		not "found star queen"
	
	on offer
		conversation
			`The Star Queen is not in this system, so you attempt to find somebody who may have some information. After visiting several shops, you find a merchant who was clearing cargo through customs as the Star Queen departed. According to her, a large pirate fleet jumped in, eviscerated the escorts with weapons she had never seen before, and escaped north towards Rigel with the hostage Star Queen. You can only hope the trail is not already cold.`
				decline



mission "Deep: Scientist Rescue 0: Farpoint"
	landing
	source "Farpoint"
	to offer
		has "Deep: Scientist Rescue 0: active"
		not "found star queen"
	
	on offer
		conversation
			`After speaking with a Navy officer for a few minutes, you find out that the Star Queen came through here over a week ago, escorted by several large pirate ships. The Navy did not want to risk the lives of those on the ship by engaging the pirate fleet, so they let it continue north.`
			`	You spot preparations for a rescue mission, but upon inquiring, learn that the recent destruction of a number of Navy capital ships in the days preceding the Star Queen's abduction resulted in an order to wait for additional reinforcements before any Navy ships are allowed to leave station.`
			`	The Navy officer ends by hinting that the Star Queen is likely to be in Alnilam or Arneb, as those systems are the farthest from anyone looking to find or rescue the ship.`
				decline



mission "Deep: Scientist Rescue 0: Pirates"
	invisible
	landing
	destination "Haven"
	to offer
		has "Deep: Scientist Rescue 0: active"
	to fail
		or
			has "Deep: Scientist Rescue 3A: done"
			has "Deep: Scientist Rescue 3B: offered"
	npc kill
		government "Pirate"
		personality nemesis staying
		system Arneb
		ship "Leviathan (Hai Engines)" "Barbas"
		ship "Leviathan (Hai Engines)" "Barbatos"



mission "Deep: Scientist Rescue 0: Haven"
	landing
	source "Haven"
	to offer
		has "Deep: Scientist Rescue 0: active"
	
	on offer
		conversation
			`You spend a few hours scanning the surface of the planet in an attempt to find the Star Queen, but nothing comes up. It will likely require military-grade scanners in order to find the ship, which the Deep Security rescue fleet will undoubtedly have.`
				decline



mission "Deep: Scientist Rescue 0: Haven Pirates Backup"
	landing
	invisible
	source "Haven"
	destination "Valhalla"
	to offer
		has "Deep: Scientist Rescue 0: Haven: offered"
		has "Deep: Scientist Rescue 0: Pirates: done"
		has "Deep: Scientist Rescue 0: active"
	npc evade
		government "Pirate"
		personality staying harvests plunders
			confusion 20
		system "Arneb"
		fleet "Large Northern Pirates" 2
		fleet "Small Northern Pirates"



mission "Deep: Scientist Rescue 1"
	landing
	autosave
	name "Secure the Scientists"
	description "Escort the <npc> to <destination> to retrieve the Star Queen. Escorts will be waiting for you on Memory in the Zosma system and Farpoint in the Alnitak system."
	source "Valhalla"
	destination "Haven"
	clearance
	to offer
		has "Deep: Scientist Rescue 0: done"
	
	on offer
		payment 250000
		log `Located the Deep Star Queen that was kidnapped by pirates while en route to Gorvi. Deep Security has finished gathering their rescue fleet and will soon be making the trip to rescue the scientists.`
		log "People" "Tom Paris" `Paris is a high ranking guard in Deep Security, equivalent to an admiral in the Republic Navy. While most of Deep Security is designed to keep the Deep safe internally and repel any pirates that might try to make their way into the region, Paris is in charge of Deep Security's external affairs, defending the Deep's interests outside its own borders.`
		conversation
			`You return to Valhalla and find Lieutenant Paris with a large group of men and women in Deep Security uniforms. As you approach them, the Lieutenant stops speaking to the group after noticing you. "Captain <last>! Have you located the Star Queen?"`
			choice
				`	"Yes, it is located on <destination>, but is heavily defended."`
			
			branch unknown
				has "Deep: Scientist Rescue 0: Prime: offered"
			`	You mention the multiple heavy warships that you saw in the system, and the fact that there are likely many more waiting on Haven.`
				goto next
			
			label unknown
			`	You mention the multiple heavy warships that you saw in the system, and the fact that there are likely many more waiting on Haven. You also relay the merchant's claim that the pirates were using weapons she had never seen before.`
			
			label next
			`	After hearing this news, many of the faces in the group turn grim as they realize that they will need to fight to retrieve the Star Queen. Paris ponders this information for a moment, then turns back to the group. "Guards, ready your ships!" The group responds with a collective "Sir, yes sir!" before running off to their ships.`
			`	Before leaving for his own ship, he walks up to you and hands you <payment>.`
			`	"Thank you for locating the Star Queen. Now, Captain <last>, would you be willing to help us? If the Star Queen is as heavily defended as you say it is, we are going to need every ship we can get."`
			choice
				`	"I'd be glad to."`
				`	"I would rather let the professionals handle things. Good luck."`
					decline
			
			`	"Thank you so much. The plan is to rendezvous with a number of warships on Memory and then head to Alnitak. My superiors received word from the admiral on Farpoint that there are a number of Navy ships at the ready to avenge their fallen comrades, so I expect we'll pick up some help there when we refuel. After the fleet is mustered, we go to Arneb." He smiles tensely, adding, "Just make sure that the <npc> makes it onto the planet. She'll be carrying the landing crew, along with myself."`
			`	The communications device on his belt rings, and he quickly responds, giving orders to the fleet that will be joining you on the mission. Before you can return to your ship, he says, "Good luck, Captain, and may we all make it out of this alive. We'll meet you in orbit."`
				accept
	
	npc accompany save
		government "Deep Security"
		personality escort
		ship "Mule (Heavy)" "D.S.S. Faraday"
	
	on visit
		dialog `You have landed on Haven, but you left the <npc> behind! Wait for the <npc> to enter the system before landing.`
	on accept
		event "battle in arneb"
	on fail
		event "battle in arneb end"

event "battle in arneb"
	system "Arneb"
		remove fleet "Large Northern Pirates"
		remove fleet "Small Northern Pirates"
		remove fleet "Large Republic"
		add fleet "Large Republic" 10000



mission "Deep: Scientist Rescue 1: Pirates"
	invisible
	landing
	to offer
		has "Deep: Scientist Rescue 0: done"
	to fail
		or
			has "Deep: Scientist Rescue 3A: done"
			has "Deep: Scientist Rescue 3B: offered"
	npc kill
		government "Pirate"
		personality nemesis staying
		system "Arneb"
		ship "Firebird (Hai Shields)" "Murmur"
		ship "Firebird (Hai Shields)" "Ronove"
		ship "Headhunter (Hai)" "Naberius"
		ship "Headhunter (Hai)" "Zozo"



mission "Deep: Scientist Rescue 1: Recruit Escorts"
	landing
	name "Deep Security escorts on <planet>"
	description "Lieutenant Paris mentioned an escort squadron of Deep Security ships was preparing to join you on your mission. Meet up with them on <destination>, if you want to."
	source "Valhalla"
	destination "Memory"
	to offer
		has "Deep: Scientist Rescue 0: done"
	to fail
		or
			has "Deep: Scientist Rescue 1: declined"
			has "Deep: Scientist Rescue 1: done"



mission "Deep: Scientist Rescue 1: Escorts"
	invisible
	landing
	source "Memory"
	to offer
		has "Deep: Scientist Rescue 1: Recruit Escorts: done"
	to fail
		has "Deep: Scientist Rescue 2: done"
	
	on offer
		conversation
			`As you land, you notice a group of Deep Security warships - three Aeries and their fighter squadrons - loading munitions just outside of the spaceport. Before you can make it into the spaceport, one of the pilots waves you over for a brief conversation: aside from a few trivial items left on their preflight checklist, the warships are ready to launch and join in on the rescue mission.`
				accept
	npc kill
		government "Deep Security"
		personality heroic escort
		fleet 3
			names "deep"
			fighters "deep fighter"
			variant
				"Aerie"
				"Dagger" 2



mission "Deep: Scientist Rescue 1: Recruit Reinforcements"
	landing
	name "Republic Navy escorts on <planet>"
	description "Lieutenant Paris mentioned that some Navy officers were interested in avenging the loss of their comrades. Meet up with them on <destination>, if you want to."
	source "Valhalla"
	destination "Farpoint"
	to offer
		has "Deep: Scientist Rescue 0: done"
	to fail
		or
			has "Deep: Scientist Rescue 1: declined"
			has "Deep: Scientist Rescue 1: done"



mission "Deep: Scientist Rescue 1: Reinforcements"
	invisible
	landing
	source "Farpoint"
	to offer
		has "Deep: Scientist Rescue 1: Recruit Reinforcements: done"
	to fail
		has "Deep: Scientist Rescue 2: done"
	
	on offer
		conversation
			`While refueling at the Farpoint Navy base, you are approached by two Navy officers who recognize you as Captain <last>. They tell you that Lieutenant Paris contacted them a few days ago, indicating that the rescue fleet was en route and would be reaching the Alnitak system shortly. They inform you that they have requisitioned two Cruisers to assist in the Star Queen's retrieval, and depart for their ships.`
				accept
	npc kill
		government "Republic"
		personality heroic escort
		fleet 2
			names "republic capital"
			fighters "republic fighter"
			variant
				"Cruiser"
				"Combat Drone" 4



ship "Star Queen" "Star Queen (Unarmed)"
	outfits
		"NT-200 Nucleovoltaic"
		"LP072a Battery Pack"
		"D94-YV Shield Generator"
		"Small Radar Jammer" 3
		"X3700 Ion Thruster"
		"X3200 Ion Steering"
		"Hyperdrive"



mission "Deep: Scientist Rescue 2"
	landing
	name "Return to <planet>"
	description "Now that you have secured the Star Queen, escort it safely to <destination>."
	source "Haven"
	destination "Valhalla"
	to offer
		has "Deep: Scientist Rescue 1: done"
	
	on offer
		conversation
			`The remaining fleet quickly enters the atmosphere of Haven and begins scanning the surface. After roughly an hour of flying, you receive a transmission that the Star Queen has been found, along with its coordinates.`
			`	You watch from afar as the Mule lands outside a hangar in some sort of pirate facility. The Mule immediately unloads what looks to be at least four dozen armed soldiers who quickly surround and breach the hangar. "Lieutenant, they have alien technology in here," one of the soldiers says over the radio. "Some of it is from the Hai, but some of it I've never seen before."`
			`	"Plant explosives on any alien technology you find. We don't have the capabilities to take it all back with us. It's better off destroyed."`
			`	After fifteen minutes, the hangar doors slide open to reveal the Star Queen, still intact. You hear chatter over the radio saying that most of the crew and scientists are still inside.`
			`	"Good job, everyone," you hear Lieutenant Paris say over the comms. "Now we just need to make it back to <destination> in one piece." Just as he says that, a bright light pierces the sky, obliterating the Mule while its shields are down. Soldiers begin scrambling into the Star Queen, which quickly takes off into space along with the rest of the fleet. You turn your repulsor engines to full and begin flying up into space behind them as multiple explosions come from the facility behind you.`
				launch
	
	on enter
		dialog "As your engines roar, you notice a large pirate ship looming over the planet. Even from the underside, it is undeniably a Bactrian, but how a pirate could ever attain one is a mystery."
		dialog `	You receive a transmission from Lieutenant Paris. "I have a sneaking suspicion that Beelzebub may be behind this. I suggest we jump out of here immediately and make it back to the Deep alive before taking on that Bactrian."`
	
	npc accompany save
		government "Deep Security"
		personality timid escort
		ship "Star Queen (Unarmed)" "D.S.S. Alcubierre"
	
	on visit
		dialog `You have landed on Valhalla, but you left the <npc> behind! Wait for it to enter the system before landing.`
	on fail
		event "battle in arneb end"



ship "Bactrian" "Bactrian (Cosmic Devil)"
	outfits
		"Inhibitor Cannon" 2
		"Hai Tracker Pod" 2
		"Hai Tracker" 168
		"Tracker Storage Pod" 2
		"Pulse Turret" 4
		"Point Defense Turret"
		"Heavy Anti-Missile Turret"
		"Boulder Reactor" 2
		"Hai Ravine Batteries"
		"Hai Chasm Batteries"
		"Hai Diamond Regenerator"
		"Liquid Helium Cooler"
		"Outfits Expansion" 4
		"Quantum Keystone"
		"Tactical Scanner"
		"Outfit Scanner"
		"Cargo Scanner"
		"Ramscoop"
		`"Bondir" Atomic Thruster`
		`"Bufaer" Atomic Steering`
		"Hyperdrive"
	gun "Inhibitor Cannon"
	gun "Inhibitor Cannon"
	gun "Hai Tracker Pod"
	gun "Hai Tracker Pod"
	turret "Heavy Anti-Missile Turret"
	turret "Pulse Turret"
	turret "Pulse Turret"
	turret "Pulse Turret"
	turret "Pulse Turret"
	turret "Point Defense Turret"



mission "Deep: Scientist Rescue 2: Pirate Bactrian"
	landing
	invisible
	destination "Valhalla"
	to offer
		has "Deep: Scientist Rescue 1: done"
	to fail
		has "Deep: Scientist Rescue 2: done"
	npc kill
		government "Pirate"
		personality staying nemesis
		ship "Bactrian (Cosmic Devil)" "Cosmic Devil"
		dialog
			`After the Bactrian is eliminated, you receive a transmission from an unknown source. It suddenly opens on its own and an electronically distorted voice begins speaking to you.`
			`	"Well done, Captain. Well done at being a thorn in my side. You will pay for this. One day."`
			`The transmission cuts out as abruptly as it had started.`



mission "Deep: Scientist Rescue 2: More Pirates"
	landing
	invisible
	to offer
		has "Deep: Scientist Rescue 1: done"
	to fail
		or
			has "Deep: Scientist Rescue 3A: done"
			has "Deep: Scientist Rescue 3B: offered"
	npc kill
		government "Pirate"
		personality staying nemesis
		ship "Leviathan (Hai Weapons)" "Furfur"
		ship "Leviathan (Hai Weapons)" "Pithius"



mission "Deep: Scientist Rescue 3A"
	landing
	name "Take down the Devil"
	description "You have returned the scientists, but the pirates still have a Bactrian. Eliminate it and return to <destination>."
	source "Valhalla"
	waypoint "Arneb"
	to offer
		has "Deep: Scientist Rescue 2: done"
		not "Deep: Scientist Rescue 2: Pirate Bactrian: done"
		not "Deep: Scientist Rescue 3B: offered"
	
	on offer
		payment 2000000
		log `Escorted the rescued Star Queen back to the Deep. Some of the crew didn't make it. The pirates still have a Bactrian, and the Deep wants it destroyed.`
		conversation
			`As you land near the Star Queen, you can see its passengers being escorted off. Hannah comes running off the ship in tears over to Garrison, who must have arrived as soon as he heard the news. A medical team is examining each passenger while a Deep Security officer asks questions and jots down the responses. Sadly, you also notice a number of body bags next to the ship, likely from scientists or crew that were found dead on the ship.`
			`	Lieutenant Paris is waiting for you outside of your ship, and hands you another <payment> when you walk up to him. "Thanks for all the help, Captain <last>. We couldn't have done it without you."`
			`	Paris looks back to the Star Queen, and you can overhear one of the Deep Security officers listing off names. "Sarah Reevs, Nicole Faye, Pierre Joules, Laura Paris..." the list goes on for slightly over a dozen total names. "The surviving crew tells us that only a few were killed initially, either during boarding or by being thrown out the airlock on the way to Haven. Most of the others were either killed or dragged off after they had reached their destination at a facility of some sort, its purpose unidentifiable to the crew."`
			`	When you look back to Lieutenant Paris, you notice that he is holding back tears. Laura Paris was one of the scientists who died.`
			`	He talks to you in a rather strained voice. "I want you to return to Arneb and take out every single one of those pirates that are left. Especially the Bactrian. We try to keep Bactrians out of unworthy hands, so whenever a pirate gets one we make sure we destroy it immediately. Seeing as how we're going to be busy here for a while, you need to be the one who destroys it."`
			choice
				`	"I'll make sure it gets done, Lieutenant."`
					goto accept
				`	"I'm sorry, but I don't have the power to defeat that Bactrian. You're going to need to do it yourself."`
			
			`	"I see... Good luck on your travels, Captain <last>." Lieutenant Paris starts walking over to the Star Queen, leaving you alone next to your ship.`
				decline
			
			label accept
			`	"Thank you, <first>." Lieutenant Paris starts walking over to the Star Queen, leaving you alone next to your ship.`
				accept
	
	npc kill
		government "Pirate"
		personality staying nemesis
		system "Arneb"
		ship "Bactrian (Cosmic Devil)" "Cosmic Devil"
		dialog
			`After the Bactrian is eliminated, you receive a transmission from an unknown source. It suddenly opens on its own and an electronically distorted voice begins speaking to you.`
			`	"Well done, Captain. Well done at being a thorn in my side. You will pay for this. One day."`
			`The transmission cuts out as abruptly as it had started.`
	on decline
		event "battle in arneb end"
	on visit
		dialog "You landed on Valhalla, but you didn't kill the Bactrian! Return to Arneb and make sure that the Bactrian is destroyed and forever out of pirate hands."
	on fail
		event "battle in arneb end"
	on complete
		set "license: City-Ship"
		event "battle in arneb end"
		log `Destroyed the pirate Bactrian that was attempting to prevent the rescue of the Star Queen and was given a city-ship license by Paris.`
		log "People" "Beelzebub" `Deep Security suspect that Beelzebub was behind the kidnapping of a Star Queen full of Deep scientists. In the attempt to rescue the scientists, a pirate owned Bactrian known as the "Cosmic Devil" was destroyed, although it would appear that either Beelzebub was not on the ship, or escaped the ship before it was destroyed.`
		conversation
			`When you return to Valhalla, the Star Queen is no longer on the landing pad and the spaceport seems to be running normally. Shortly after landing, you find Lieutenant Paris at the same restaurant in which he first found you. Before saying a word to you, he hands you a license.`
			`	"Thank you. I've said it before, but there's really no way I can thank you enough."`
			`	You look down at the license that Paris just handed you and notice that it's a city-ship license, one that will allow you to purchase the Bactrian. "I think it's only fair that you be able to purchase one after having to fight one to the death, and the government of the Deep agrees. It's really the least I... we could do for you."`
			choice
				`	"Thank you so much! I'll make sure that this gets put to good use."`
				`	"Really? You shouldn't have."`
			
			`	"It's yours to keep. I hope you have good luck with your travels, and have fun using the Bactrian. It's a mighty fine ship to fly." Lieutenant Paris pays his bill and leaves, as you ponder the possibilities that await.`



mission "Deep: Scientist Rescue 3B"
	landing
	invisible
	to offer
		has "Deep: Scientist Rescue 2: done"
		has "Deep: Scientist Rescue 2: Pirate Bactrian: done"
		not "Deep: Scientist Rescue 3A: offered"
	
	on offer
		set "license: City-Ship"
		event "battle in arneb end"
		payment 2000000
		log `Escorted the rescued Star Queen back to the Deep. Some of the crew didn't make it. Destroyed the pirate Bactrian that was attempting to prevent the rescue of the Star Queen and was given a city-ship license by Paris.`
		log "People" "Beelzebub" `Deep Security suspect that Beelzebub was behind the kidnapping of a Star Queen full of Deep scientists. In the attempt to rescue the scientists, a pirate owned Bactrian known as the "Cosmic Devil" was destroyed, although it would appear that either Beelzebub was not on the ship, or escaped the ship before it was destroyed.`
		conversation
			`As you land near the Star Queen, you can see its passengers being escorted off. Hannah comes running off the ship in tears over to Garrison, who must have arrived as soon as he heard the news. A medical team is examining each passenger while a Deep Security officer asks questions and jots down the responses. Sadly, you also notice a number of body bags next to the ship, likely from scientists or crew that were found dead on the ship.`
			`	Lieutenant Paris is waiting for you outside of your ship, and hands you another <payment> when you walk up to him. "Thanks for all the help, Captain <last>. We couldn't have done it without you."`
			`	Paris looks back to the Star Queen, and you can overhear one of the Deep Security officers listing off names. "Sarah Reevs, Nicole Faye, Pierre Joules, Laura Paris..." the list goes on for slightly over a dozen total names. "The surviving crew tells us that only a few were killed initially, either during boarding or by being thrown out the airlock on the way to Haven. Most of the others were either killed or dragged off after they had reached their destination at a facility of some sort, its purpose unidentifiable to the crew."`
			`	When you look back to Lieutenant Paris, you notice that he is holding back tears. Laura Paris was one of the scientists who died.`
			`	He turns to you and hands you a license, then says in a rather strained voice. "Thank you. I've said it before, but there's really no way I can thank you enough."`
			`	You look down at the license that Paris just handed you and notice that it's a city-ship license, one that will allow you to purchase the Bactrian. "I think it's only fair that you be able to purchase one after having to fight one to the death, and the government of the Deep agrees. It's really the least I... we could do for you."`
			choice
				`	"Thank you so much! I'll make sure that this gets put to good use."`
				`	"Really? You shouldn't have."`
			
			`	"It's yours to keep. I hope you have good luck with your travels, and have fun using the Bactrian. It's a mighty fine ship to fly." Lieutenant Paris starts walking over to the Star Queen, leaving you alone to ponder the possibilities that await.`
				decline

event "battle in arneb end"
	system Arneb
		remove fleet "Large Republic"
		add fleet "Small Northern Pirates" 400
		add fleet "Large Northern Pirates" 500
		add fleet "Large Republic" 15000



mission "Stone of our Fathers 1"
	name "Stone of our Fathers"
	description "Travel to <destination>, and drop Skaldgar off at the home he abandoned long ago."
	minor
	passengers 1
	to offer
		random < 50
	source "Helheim"
	destination "Norn"
	on offer
		conversation
			`Helheim's spaceport has all the constant hustle and bustle of a boomtown. It's dirty, lively, and packed with workers. As you walk through the spaceport, an aged man in a worn and weathered roustabout jacket waves his arm toward you and approaches you.`
			`	"You've got the look of one who knows a ship inside and out," he says. "Name's Skaldgar, ain't much for ships; earth, soil, and rock are my domain. But I do got a need to travel." He pauses as a wistful look briefly passes over his face. "I left, you see, decades ago. No goodbye. No note. Just... left. Living with others, taking care of others, hard on a man like me. I like solitude, peace, and work. But now my bones are brittle: the radiation, earth-rot as we call it, has taken hold and my time is running out. And I find, I don't want to be alone anymore."`
			`	He stops and frowns. "Look at me, rambling like an ol' man. Ser, Captain, I'd like to pay you <payment> to take me home, to <destination>."`
			choice
				`	"If you have coin, I have room."`
				`	"I guess I can take a small detour."`
				`	(Shake my head. I have better things to do than bus old men around.)`
					goto decline
			`	He nods, grunts, and heads to your ship with a small knapsack cradled under his arm, clearly ready to travel to <planet> at a moment's notice.`
				accept
			label decline
			`	With a disappointed look on his face, he nods once and slides back into the endless sea of people.`
				decline
	on visit
		dialog `You have reached <planet>, but your escort carrying Skaldgar has not arrived! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 15000
		event "Stone waiting" 30
		dialog `Skaldgar is as clean as you've seen him: scrubbed, shaved and wearing clothes that are respectable, if a few decades out of style. His eyes glisten, and he turns to you.`
			`	"I've made a lot of mistakes in my life. Comin' home, even if I'm hated - or worse, forgotten - ain't one of them. Thank ya kindly for the passage."`
			`	You wish the old codger a joyful homecoming, and watch as he disappears into the sleepy spaceport.`
		
event "Stone waiting"



mission "Stone of our Fathers 2"
	name "Stone of our Fathers"
	description "Return Skaldgar to <destination>."
	minor
	passengers 1
	to offer
		has "event: Stone waiting"
	source "Norn"
	destination "Helheim"
	on offer
		conversation
			`In the nearly abandoned spaceport of Norn, a scruffy and slow-moving figure shuffles toward you. "Captain <first>! Good to see you, friend. It's Skaldgar; ya gave me a ride here some time ago," he calls out as he approaches you.`
			`	"Got a nephew who works at the port, let me know he saw you comin' in." He claps you on the back. "Things have been mostly good, hard though, the family - some are glad to see me, to remember me, and others..." he pauses. "Well, some mistakes you just can't take back."`
			`	He looks away briefly, and then nods at his packed bag. "It was good to come back here one last time. But the soil, the work calls to me. I'm only good at one thing in this world, and I intend to do it to the very end. So, I was wonderin', could ya take me back to <planet>?"`
			choice
				`	(Nod. Skaldgar and his hard-earned money are more than welcome aboard my ship.)`
					goto accept
				`	"No thanks. I have better things to do than bus old men around."`
			`	Skaldgar glares at you briefly then shrugs. "S'pose you do. S'pose you do." He turns and wanders away.`
				decline
			label accept
			`	Skaldgar rewards you with a genuine, if uneven, smile and then picks up his pack to board your ship.`
				accept
	on visit
		dialog `You have reached <planet>, but your escort with Skaldgar has not arrived! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		event "Stone Waiting more" 60
		payment 25000
		dialog `Helheim's hustle and bustle threatens to overwhelm the senses, yet Skaldgar, for all his age and illness, seems to have a skip in his step as he saunters out of your ship and into the teeming masses.`
			`	Just as he is about to be swept up in the current of humanity, Skaldgar turns and gives you one last wave, and then is gone.`
		
event "Stone Waiting more"



mission "Stone of our Fathers 3"
	name "Stone of our Fathers"
	description "Take Skaldgar's stone back to his family on <destination>."
	minor
	to offer
		has "event: Stone Waiting more"
	source "Helheim"
	destination "Norn"
	on offer
		conversation
			`As always, Helheim is packed to the brim with transient workers coming and going, with dreams of either getting rich or getting out. A youngish looking man in a dirty roustabout jacket waves at you and approaches.`
			`	"Yer that Cap'n that Skaldgar always went on about, aren'tcha?" The young man attempts to imitate Skaldgar with a deep and ponderous voice, "Him that knows the currents of space like we know our stone, and the like." The man grins sheepishly, " Ol' Skaldgar always had a way with words, he did."`
			`	The young man then looks down, somberly, and pulls from his pocket a small, well-worn stone with some strange markings on it and holds it out to you.`
			`	"He wanted," he begins haltingly, "he wanted you, only you, to take this back to his folk on Norn." He swallows. "It's the old ways, it is. This, it needs to be returned, and not by a stranger." The young man then shrugs. "Best to let'cha know, I ain't have no money to pay you. This would be a favor for the ol' man."`
			choice
				`	(Reach out and accept the stone.)`
					goto accept
				`	"Nope. Not going to do it. I run a ship, not a charity."`
			`	The young man nods knowingly. "Guess Skaldgar was wrong about you, but I understand. We all gotta eat." He turns and slides back into the endless crowd.`
				decline
			label accept
			`	You're surprised at how cool the smooth stone feels in your palm.`
			`	He smiles sadly. "Skaldgar always had a nose for good folks. Anyways, he told me he had a nephew named Helm who worked at the Norn spaceport. Find 'im and he can get'cha and this stone where it needs to go." The young man than looks you in the eye and gives a slow respectful nod, "For Ol' Skaldgar, may he be findin' ore in hel."`
			`	And with that, the man disappears into the crowd.`
				accept
	on complete
		dialog `It turns out there is no need to search for Helm, as he is waiting for you when you land.`
			`	"I figured for you to be returning, it would either be with Skaldgar or with" - he pauses - "news." He looks around. "And I don't see Skaldgar."`
			`	You show him the odd stone you'd been given, and Helm stiffens then nods. "As I figured. Best we meet in the spaceport to discuss what comes next."`



mission "Stone of our Fathers 4"
	name "Stone of our Fathers"
	description "Take Skaldgar's stone back to his Family-Cairn on <destination>."
	passengers 1
	to offer
		has "Stone of our Fathers 3: done"
	source "Norn"
	destination "Alfheim"
	on offer
		conversation
			`Helm meets you in the nearly deserted spaceport bar. "Ma always had a soft spot for Uncle Skaldgar. Even after he ran off 35 years ago, she still spoke fondly of him. He always sent the family money, he was good like that. Not as good, though, in sending his love."`
			`	Helm sighs, "This is going to be tough, but as bearer of the Stone, you are going to need to present it to his son. His family lives on a drifting algae island to the south of here. Are you willing to accompany me?"`
			choice
				`	"I've come this far. I might as well finish it."`
					goto accept
				`	"Absolutely, I want to see this through."`
					goto accept
				`	"No, This is as far as I go. I got the stone to you, and it's your problem now."`
					goto decline
			label decline
			`	Helm nods, knowingly, "Fair enough, star-traveler. I will handle it from here."`
				decline
			label accept
			`	Helm smiles when you agree to accompany him. "This is right," he says.`
			`	After making a few preparations, he leads you out to the harbor, where you climb aboard a small ocean-going craft that you assume belongs to him. He works on the controls for a bit and then sits down across from you as the ship veers out into the open ocean.`
			`	"It's an old custom," he says, nodding toward the stone in your hand. "Goes back to the founding of The Deep, the first settlers. On a person's 16th birthday they are given a stone to carry with them through their lives. On special, or momentous occasions, they are to carve a few runes into it, a few cherished memories chiseled into hard stone."`
			`	Helm pauses as a flock of jabbering sea-birds passes near the ship, indicating a nearby island, and then continues. "And then when that person dies, that stone is returned by the closest family member to the Family-Cairn."`
			`	Helm looks up and his eyes scan the horizon. "We're almost there; gather your things." Helm stands and returns to the ship's controls.`
			choice
				`	"But why do I have to be the one to bring the stone to his son?"`
					goto why
				`	"Where do the stones come from?"`
					goto from
			label why
			`	Helm shrugs as he maneuvers the ship into dock. "It is the old way. To make certain the stone is not lost, mishandled, or acquired by enemies. If the family is not near when its owner passes, it is given to a trusted friend who becomes its bearer. That task is too important and too sacred to be given to a stranger or courier. For you to take it all the way to his son, so that he may return it to earth, is right."`
				goto earth
			label from
			`	Helm shrugs as he maneuvers the ship into dock. "Wherever makes the most sense at the time a stone is given. If I recall correctly Skaldgar's stone was given to him by his mother, my grandmother, from an old mine Skaldgar had been exploring on the mainland. Even at 16 he loved the earth."`
			label earth
			`	Helm ties up the ship at a makeshift dock and you follow him toward a dour gray building not far away. You realize this entire algae island, as small as it is, must belong to a single individual or family.`
			`	When you arrive at the hardy and sea-stained wooden door, Helm knocks thunderously upon it and calls out, "Thorleif, open up!"`
			`	After a brief wait the door opens ponderously, revealing a large, red-bearded, middle aged man who looks like a younger and much healthier Skaldgar. You realize that you must be standing before the man's son. A wide and open grin forms on his face when he sees Helm, and he gives the man a warm embrace. "Ah cousin! It's been too long, what brings you to my humble home?"`
			`	Thorlief then notices you and frowns. "And who have you brought with you?"`
			choice
				`	(Answer for myself.)`
				`	(Let Helm answer for me.)`
					goto helm
			`	You smile somberly at Thorleif. "I was a friend of Skaldgar. I gave him a ride a few times, and, most recently, was entrusted with his stone."`
				goto stone
			label helm
			`	Helm puts a hand on Thorleif's shoulder. "This here is <first>, they've come a long way to see you, and to bring you Skaldgar's stone."`
			label stone
			`	Thorleif tenses up. "Never speak that name!" His eyes narrow. "Helm, I want nothing to do with that stone, this person," Thorleif says, gesturing toward you, "or whatever else that old man wanted or cared about."`
			`	Thorleif glances toward the horizon as he clenches and unclenches his fists, taking a few slow breaths, regaining his composure. "I realize you have traveled far and would not be able to get back to the mainland before night. So you may stay in the guest quarters, and leave first thing in the morning. I will have no one say that Thorleif was inhospitable."`
			choice
				`	(Keep quiet and follow Helm towards the guest rooms.)`
					goto rooms
				`	(Try to say something on Skaldgar's behalf.)`
			`	"Wait," you say before Thorleif can stomp off. "I do not, could not, know all that has happened here, that has gone on between you and your father. But I know that every time I met him he clearly regretted whatever happened, and constantly spoke of his mistakes. He's gone now, mistakes and all, and this stone... I don't think it represents forgiveness, but maybe acceptance of who he was, and that now he is gone."`
			`	Thorleif turns to you, his face flashing red, and speaks through clenched teeth, "I have no father. I have no memories of such a man, and I will make no effort to remember someone who didn't stick around long enough to know me. Now, go to your rooms and leave me be!"`
			label rooms
			`	You quietly follow Helm to two small, sparsely decorated rooms, clearly intended for guest use. Helm clears his throat, "This may surprise you, but that actually went better than I thought it would."`
			`	Helm then turns his attention to a small window and the darkening horizon beyond it. "Dark clouds are gathering, I fear we may be here longer than a single night."`
			choice
				`	(Head off to bed as the first rains begin to patter against the roof.)`
			`	You awake to the riotous din of hard rain crashing against the building. As Helm predicted, a powerful storm blew in during the night, the floating island besieged by savage weather. By midmorning, the walls are starting to creak as howling forces of nature bash against it unceasingly.`
			`	You hear a door open and struggle to close, followed by the sound of heavy sloshing footsteps. Thorleif, soaked to the bone, stands before you and Helm in the main room. "It's a Fimbulhrithr," Thorleif exclaims, "One of the worst I've yet seen. If we do not act quickly it could well flatten everything on this isle. Will you help me?"`
			choice
				`	(Offer to help Thorleif.)`
					goto help
				`	"No, I've done enough for this family already. Especially for free!"`
			`	Thorleif growls, "Knew better than to trust a friend of that useless old man. I gave you a place to sleep, and now you won't lift a hand to save it? I should have expected no less!" Thorleif and Helm hurry off to tend to the island during the storm, leaving you idle inside.`
			`	Thorleif and Helm heroically use the island's metal rudder and rudimentary engine to steer it away from the storm and to calmer, safer seas. However, with only the two of them many of the out-buildings are destroyed, along with a few of the small watercraft Thorleif used to fish and work on.`
			`	You get the impression that this is an expensive and major loss for Thorleif. The moment the winds are calm, he demands Helm take you back to the mainland and your ship. "This Captain," Thorleif says, his voice oozing with disgust, "is just as lucky as my so-called father. I want him gone."`
			`	For most of the trip back to your ship, Helm says nothing. He has been cool to you ever since you refused to help save the island. Finally, as you are preparing to disembark from his ship, he stops you. "You've done Skaldgar no favors here. I'd appreciate it if we don't see from you again."`
			`	Helm holds up his hand showing off the stone in his palm. "I took it while you were napping. Skaldgar made a mistake with you, and I will at least see the stone properly tended. Goodbye." Helm indicates toward the exit and waits for you to depart before casting off again in his ship.`
				decline
			label help
			`	Thorleif nods and takes you and Helm outside into the storm, or Fimbulhrithr. Thorleif and Helm work the island's metal rudder and rudimentary engine to steer the island away from the storm, while you are given the task of tying everything down that is liable to fly away.`
			`	With the storm comes unnatural darkness, and the sky is filled with debris and fish and all manner of items that do not belong in it. You hurry as fast as you can, saving as much as possible.`
			`	After hours of hard work, the storm begins to subside, and the sea and sky begin to calm. An exhausted Thorleif and Helm stagger over to you, and Thorleif surveys his small island. "Without your help I would have lost much of what stands intact. It was a lucky thing you came when you did."`
			`	With that, he turns and heads back to the main dwelling, with you and Helm in tired tow.`
			choice
				`	(Wash up and warm up in the main room around the fire.)`
			`	You spend the evening warming yourself by a roaring fire, telling Helm and Thorleif tales of your exploits in space and many of the wonders you've seen.`
			`	In turn, they tell you about the sea beasts, leviathans, and krakens that they have met on the ocean currents of Norn. Of lost isles filled with forgotten treasure or strange people, or stories even, about the ancient elves who once aided their ancestors and are said to be around still.`
			choice
				`	(Ask about the elves.)`
				`	(Ask about lost treasure.)`
					goto treasure
			`	The idea of Elves, or Alfar as they call them, intrigues you, and you ask what they know of them.`
			`	"The Alfar," Thorleif begins, "are said to have been a great help to us in the early days. Some say they spared us from plagues and protected us from monsters. Many still offer sacrifices and prayers to them, so that they remember us and know that we are friends and allies still."`
			`	Thorleif shrugs. "This may be true, and good at that, but others think the Alfar, for all their apparent good works, cannot be trusted. Their minds are unknowable and filled with mischief, and their aims are not ours. This is the belief that our family holds to. They should be respected, but also feared. We must look to each other for support and strength, and trust not in the deeds of strangers."`
				goto family
			label treasure
			`	You could always use a little extra money, and this trip, while engaging, has certainly not made you any richer, so you ask about hidden treasures. Helm and Thorleif both grin at this and glance at each other knowingly. They launch into tales of the riches of lost civilizations, or forgotten pirate hoards, or even early human kingdoms. It's easy to lose things on a fog-covered ocean world with floating islands, all too easy.`
			`	When they are done regaling you with tales, they mention to you that maybe some other time they'll take you out into the deep ocean and perhaps you'll find what you're looking for. They smile wolfishly at that, and you think they might be putting you on. "Have you ever found treasure out here?" you ask.`
			`	Thorleif shrugs. "Coming here... from Alfheim long ago, our descendants felt that the world itself was the real treasure. We have no need to go chasing dreams in the abyss."`
			label family
			`	As the conversation winds down and the hour grows late Helm excuses himself to bed, for he, like the rest of you, is dog tired after the day's events. You stand too, feeling your own need for sleep.`
			`	"<first>," Thorleif says without looking up from the fire. "I've been thinking. I can never forgive my father for what he did. Leaving me and mom like that. But I can, I think, make peace with it. I can accept the stone." He looks up and smiles, "You brought some luck with you, and a man should never argue with luck."`
			`	He stands up. "We'll talk in the morning."`
			choice
				`	(Head to bed for some well deserved sleep.)`
			`	The day is bright and the sky is clear, the storm long forgotten as you prepare your things. Both men meet you in the main room. Thorleif opens up his hand to accept the stone, which you gladly place into it. He smiles and looks it over, tracing his finger along its chiseled runes.`
			`	"Thank you, <first>." You nod, happy to be done with this mission and free to fly the space lanes once more.`
			`	"Just more thing," Thorleif adds with a sly grin. "I'll need a captain willing to ferry me to Alfheim. That's where my family's cairn is located."`
			`	Before you know it, the three of you are on Helm's boat and heading for the spaceport.`
			`	"Alfheim," Thorleif says idly, "you know of it? The name means the home of the Alfar, or elves as you call them. I've never been there, only heard of it. It'll be strange to visit the world of my ancestors."`
			`	Helm stays behind as you and Thorleif load your gear onto your ship.`
			`	You're not sure exactly how you got mixed up into all this, and yet, it all feels right to you. Like you are where you should be, doing what you should do. This adventure may not involve intergalactic wars or the secrets of the ancients, but sometimes it really is just about people. People like Skaldgar and Thorleif and Helm.`
				accept
	on complete
		conversation
			`The journey to Alfheim was interesting, if uneventful. Thorleif had never been in space before, and every jump left him quite ill. At the same time, however, he found so much wonder in it: seeing the dark void and bright stars with his own eyes; watching the tiny worlds recede into the distance. You could, through his eyes, experience the wild adventure of space anew.`
			`	Throughout the trip, he told you stories of his family: They were called the Hlewagast and originally settled as some of the first colonists on Alfheim in the early history of The Deep. How they had been explorers and adventurers before taking land here to settle down on and work. How his great grandparents had decided to leave Alfheim, dismayed by the rampant pillaging of resources and looking once more for adventure, and how they had come to Norn. Seeking the waves, and the storms, and the solitude.`
			`	Through all of this, you got a better feel for Thorleif, Skaldgard and his people, and are almost sorry when your ship approaches Alfheim.`
			`	On landing, you are surprised by how much Alfheim reminds you of Helheim. Though the environment and ecology of the worlds are remarkably different, both are primarily used for resource extraction, and thus filled with boomtown employees and migrants looking for work, chasing dreams, and trying to make their way in the world.`
			`	Thorleif points to the spaceport. "Let's see if we can find a guide in there. There's a village we'll need to find, assuming it even exists anymore and hasn't been abandoned or destroyed to make room for a new oil rig."`
	on visit
		dialog `You have reached <planet>, but your escort carrying Thorleif and Helm has not arrived! Better depart and wait for your escorts to arrive in this star system.`



mission "Stone of our Fathers 5"
	name "Stone of our Fathers"
	description "Take Ragnhild and Thorleif back to <destination>."
	passengers 2
	to offer
		has "Stone of our Fathers 4: done"
	source "Alfheim"
	destination "Norn"
	on offer
		conversation
			`Thorleif is clearly uncomfortable being in a place so jam-packed with people. You help him keep his bearings and work your way to a young woman managing a visitor kiosk in the Spaceport.`
			`	The woman looks up with a tired, practiced smile. "Welcome to Alfheim. Are you looking for work, or looking for a specific rig site? Please be aware that proof of employment is required before I can give you any details on company rigs."`
			`	Thorleif shakes his head. "Lady, no. We're not... anyone's employees, nor do we need work here. I am looking for a village, hamlet really, called Grimssalr. It's where my folk come from."`
			`	The woman frowns for a second then seems to break from a trance as real warmth washes over her face. "I am sorry, it's just been so long since I've dealt with people who weren't looking for work. Alfheim, well, it is what it used to be, but only just more so now." She shrugs, "I know of Grimssalr though. I'm actually from Lindsvoll, in the same valley."`
			`	"So can you tell us where it is?" Thorleif asks earnestly. The woman smiles shyly at Thorleif. "Tell you? How about I take you there?"`
			choice
				`	(Invite her onboard.)`
					goto accompany
				`	(Reject the offer.)`
			`	You start to say that it isn't necessary for her to accompany you, when Thorleif cuts you off. "That sounds great!"`
			`	She smiles broadly at Thorleif and nods.`
			choice
				`	(Sigh and shake my head.)`
			label accompany
			`	She immediately abandons her kiosk and shrugs. "I didn't care much for that job anyways."`
			`	You and Thorleif follow her to a local transit hovercraft, where she and Thorleif quickly sit together. You find yourself sitting alone.`
			`	For the next three hours, it sounds as if they are in deep conversation, while you drift in and out of sleep watching as oil fields give way to rainforests and then rainforests shrink before great wooded mountains.`
			`	At some point you feel Thorleif shaking your shoulder. "We're here."`
			choice
				`	(Rise from my seat.)`
			`	The town of Grimssalr is nestled along the foothills of the towering Ettin mountains in western Alfheim. Town is perhaps too generous a word; it is instead more like a couple dozen houses filled with old people long abandoned by their children seeking wealth and adventure elsewhere.`
			`	The woman, who you've learned is named Ragnhild, introduces Thorleif to some of the folks here, and before long they have found ways to connect their ancient genealogies together and everyone is suddenly treated as family. Before you know it, you are eating their meager yet hearty fare, swapping stories of adventures, and listening to legends about the old times.`
			`	As the sun begins to set, Thorleif approaches you, "It is time," he says. "The journey to the cairn is only a short hike from here. I would like you to accompany me. I think Skaldgar would have wanted that."`
			choice
				`	(Accompany Thorleif.)`
					goto followcairn
				`	"It's best that you do this alone."`
			`	Thorleif frowns. "I cannot. It does not feel right. It is only because of you that I am here at all. I need you by my side to finish this. For me, and for him."`
			choice
				`	(Accompany Thorleif.)`
					goto followcairn
				`	"I am sorry. But I will not go."`
			`	Thorleif's face reddens and he abruptly turns from you. He has no words left to argue with and leaves you to wait in the village.`
			`	A short time later he returns, his eyes wet and red.`
			`	"I have made my peace, I have read the runes of his life and returned his stone to the Family-Cairn of Hlewagast. He had few happy moments, and the only recent ones involved us both. He is gone now, and we remain." Thorleif wipes tears from his eyes. "Let us rest, and eat, and drink for a time. Skaldgar would have liked that, too."`
				goto drinkandbemerry
			label followcairn
			`	You follow Thorleif up a mostly overgrown trail for about half an hour before finally stepping out into a wide open plain. The wind is cool and refreshing, and the grass blows with a steadiness that is somehow reassuring. There is something special and timeless about this meadow.`
			`	You notice over two dozen columns of stone arranged in a circle around a much more massive and impressive structure - a wall cut from some sort of metal you don't recognize. It is covered with letters and images that are unfamiliar to you.`
			`	"That is an Elf-Stone. It is why we built our Family-Cairns here. Such stones can be found on most worlds in The Deep. Indestructible, and left by the Alfar for some unknowable reason. Some, like this one, have been mostly forgotten. Others though, are important places of celebration and even worship."`
			`	He points at a smallish cairn next to the Elf-Stone. "This, though, is what we're here for."`
			`	You eye the worn and weather-beaten cairn with a faded name plate that has 'Hlewagast' carved into its base.`
			`	Thorleif approaches the cairn.`
			`	Thorleif holds up the stone of his father in his palm and begins to read the runes carved upon it.`
			`	"The day my mother gave me this stone and said she was proud of me."`
			`	"The day my son Thorleif was born."`
			`	"The day I struck the mother lode on Helheim."`
			`	"The day I met <first>, who helped me find my family again."`
			`	"The day I saw my son again, even though he would not see me."`
			`	Thorleif sniffs, takes a moment to write down something he saw on the stone, and then walks forward and places it upon the cairn, at home now with hundreds of other stones each with their own handful of memories.`
			`	"He had not so many good memories, I think," Thorleif said quietly. "I realize now that mine too are quite few. Perhaps that, if nothing else, is a lesson he can teach me. For that I thank you, father."`
			`	With that, Thorleif turns from the cairn with teary eyes. "It is done. Let us head back."`
			choice
				`	(Follow Thorleif back to the village.)`
			`	The two of you trudge back to the small hamlet of Grimssalr, with its people happy at having guests and long lost relatives, and to Ragnhild, happy to spend more time with Thorlief, where you feast and talk and laugh and remember.`
			label drinkandbemerry
			`	You enjoy yourself well into the evening before Thorleif approaches you. It's time to head back.`
			`	"This place," Thorleif begins, "this world, it feels like it has forgotten its soul. Industry and greed have taken hold, and the old happy places like Grimssalr are dying. It is good my family left here all those years ago. Norn is, and has been, a good place to be."`
			`	Thorleif then nods to Ragnhild. "Which is also why my very new and very dear friend Ragnhild has decided to join us on the return trip to Norn." You look to Ragnhild but somehow you can't feel that you're surprised at the news.`
			`	She smiles brightly. "Best offer I've had in a long time." The three of you board your ship and prepare for the journey home.`
				accept
	on visit
		dialog `You have reached <planet>, but your escort with the space reserved for Thorleif and Ragnhild has not arrived! Better depart and wait for your escorts to arrive in this star system.`
	on complete
		payment 500000
		conversation
			`The trip back to Norn was restful.`
			`	You spent most of it listening to Ragnhild tell the old stories and legends of Alfheim that she had learned as a child.`
			`	Stories about alien trees whispering dark secrets, of oil barons destroying sacred sites and being cursed by alien artifacts they were too blinded by greed to see, and even tales of the elves and miracles of the Elf-Stones.`
			`	Again, as before, you're almost sad when you make it back to Norn. The time for telling stories has ended, and the time for saying goodbye has begun.`
			`	Thorleif wraps you in a bear hug. "I thank you for all you have done, <first>. I was so wound up in my own anger and bitterness I couldn't see anything beyond my own pain. But now, I feel like I can live again. Trust that our meeting has been etched into my own stone. I hope someday you come back and visit us. To remember us small folk on a small world so far from places of power and grand events. Remember you'll always have a home here."`
			`	With that Thorleif and Ragnhild make their way off your ship. Thorleif only takes a few steps out into the quiet Norn spaceport before stopping suddenly and turning back towards you.`
			`	"I almost forgot. The old man, well, he had quite a bit of money saved up. I don't think he hardly spent anything on himself. Anyways, I've decided to split the inheritance with you. After taxes, your half comes out to around 500,000 even."`
			`	Thorleif shrugs, laughs, and walks with Ragnhild hand in hand out into the foggy mists of Norn.`



mission "Home for Skadenga 1"
	name "Home for Skadenga"
	description "Search for the Setstokkr on <stopovers>, and then return back to <planet>."
	minor
	to offer
		random < 50
	source "Nifel"
	stopover "Asgard"
	stopover "Windblain"
	on offer
		conversation
			`There is a feeling of deep melancholy in the nearly deserted spaceport. A few plaques adorn the walls, proudly boasting of earlier times when Nifel was a place of relevance in the galactic community. Most are old images of researchers and doctors and their miracle cures.`
			`	But now this place is a ghost-town, and you walk its empty halls unsure of why you even bothered to explore it in the first place.`
			`	You turn a corner and find a woman standing near a booth with blown up images of ice-covered scenery. She waves at you excitedly.`
			`	"Hello, ser! I hope you've been enjoying your stay in our state of the art spaceport! But why stay cooped up in here, when you could be out there?" She gestures toward the windows.`
			`	"Explore the breath-taking Glaesisvellir ice-plains, or the boiling Slidr river. We'll even take you to the Hrimbrimr valley where the famous Rigellian cure was discovered!`
			`	"So ser," she continues, "what do you say? Should I sign you up for the VIP Winter-Wonder Excursion Package for a special time limited-only offer of 2,000 credits?"`
			choice
				`	"Sure, I'd love to see more of this world."`
					goto excursion
				`	"No, uh, thanks. Freezing to death in the frigid tundra doesn't sound like a good time to me."`
			`	The woman frowns, but nods knowingly. "I am afraid, ser, most seem to think the way you do. Still, if you ever run into anyone out there who might be interested, let them know. We could really use the work." With that, she turns and walks briskly back to her booth.`
				decline
			label excursion
			action
				payment -2000
			`	The woman's face lights up, and you get the sense that she isn't used to hearing "yes" very often. "Oh, that is wonderful ser, just wonderful!"`
			`	She puts her finger to her ear and says, "Hjlod, we have a customer! Get the crawler warmed up!" The woman then drops her hand and waves to you. "Right this way, ser! And might I add - you will not be disappointed." She chatters excitedly about the cultural, artistic and scientific merits of the trip as she leads you toward a large pressure hatch.`
			`	She hits a switch and the hatch opens; she then escorts you into a frigid maintenance dock. A loud, ugly vehicle is whirring at the center of a mess of broken and discarded parts. "There she is!" The woman is nearly shouting as she speaks over the mechanical hum. "We call her Brunhilda, the Queen of the Ice, a most.. durable vehicle, capable of giving you an authentic ice-explorer experience!"`
			`	The Ice-Crawler, Brunhilda, looks less than dependable to you. It appears to be a run-down, mishmash of parts and jury-rigged technology forced onto a three century old Ice-Crawler, probably used by the original colonists.`
			choice
				`	"Are you sure this thing is safe?"`
				`	"How old is this thing?!"`
					goto old
			`	The woman hesitates. "Don't you worry! Why, that Ice-Crawler is the safest place in all of Nifel! Those other accidents were flukes, and what happened to her sister Ice-Crawler, Gudrun, was entirely unforeseeable."`
				goto what
			label old
			`	"Well, you know the old saying, 'They don't build 'em like they used to'? It's your lucky day because that is when this was built! Part of the excitement of the tour is riding in an authentic four hundred year old colonial Ice-Crawler."`
			label what
			`	The woman pulls out a small touchscreen. "For very standard liability reasons, I need you to quickly put your digital signature right here. You, or your estate, can't sue us if you're injured or die on the excursion. Furthermore there is no expectation of rescue should you get lost out there, or the Ice-Crawler breaks down." She gives you a small forced smile. "Not that it ever would happen, and like I said, this is a very standard waiver in the tourist trade. I wouldn't think too much about it."`
			`	She holds up the touchscreen for you to sign.`
			choice
				`	(Key my signature.)`
					goto yolo
				`	"I've changed my mind. I am going to pass on this excursion."`
			`	The woman's face, red with the cold, looks crest-fallen, but unsurprised, like she was half expecting this outcome. "Brunhilda can be an... intimidating vehicle, it's true. But she is safe ser, I assure you. Either way, I'll take you back to the spaceport."`
			`	With that, you follow the woman back to the warm and nearly empty spaceport, where she leaves you to return to her forlorn booth.`
				decline
			label yolo
			`	With your signature in hand, the woman's eyes sparkle, and there is a skip in her step as she leads you to the Ice-Crawler. She pulls a lever on the outside of the vehicle that opens a door and releases a ramshackle ramp for you to climb. She indicates that you should walk up the feeble looking ramp. "Hjlod will be your driver and tour-guide for the duration of your excursion. She is waiting for you within. On behalf of Intrepid Ice Adventures Limited, I would like to wish you a happy and safe expedition!"`
			choice
				`	(Board the Ice-Crawler.)`
			`	The Ice-Crawler, 'Brunhilda,' smells of oil, atmosphere, and perspiration. The confines are tight, with a padded bench area and threadbare seat-belts. There are wires and hard angles everywhere. You're careful not to get tangled in the green, white and blue wires running overhead and into the cockpit. You take a seat and strap in.`
			`	It is only a little warmer here than it was in the maintenance dock. To your left and right are wide, scratched, and frost-rimmed windows.`
			`	"Velcome. I am called Hjlod." The thickly accented woman looks back from the driver's seat. She has short blonde hair, and her face and arms are covered in long weaving blue tattoos. "I am from here. I have spent whole life traversing this tundra. I know like back of hand." She gives you a lopsided grin and then pats the steering console. "And Brunhilda here, she never let you down."`
			`	Hjlod turns away from you and starts pulling some levers. "Now," she says, "let's begin."`
			choice
				`	(Sit back as the motor hums and the Ice-Crawler lurches to a start.)`
			`	After a few hours of crawling through a bleak, blank wasteland in silence, Hjlod turns the crawler into what looks like a bleaker and blanker wasteland.`
			scene "scene/iceplains"
			`	"This is famous Glaesisvellir ice-plain. Story say once whole convoy of researcher disappear here. Can drill hole in ice for fishing. There is very good tasting voolly octopus beneath it." Hjlod slows down and looks back at you. "You have question?"`
			label questions
			choice
				`	"What happened to the researchers?"`
					to display
						not "skadenga: asked about researchers"
				`	"Is it safe to drive over the ice?"`
					to display
						not "skadenga: asked about ice"
					goto ice
				`	"Are there sea-monsters beneath the ice?"`
					to display
						not "skadenga: asked about monsters"
					goto monster
				`	"Nope. No questions."`
					goto noquestion
			action
				set "skadenga: asked about researchers"
			`	"Long time ago. Researcher convoy look for bacterial pharmaceutical. Many researcher convoy in area. Most smart use native pathfinder, like me. This convoy, they not so smart, they say pathfinder waste of money. They go out in ice alone and they never come back."`
			`	Hjlod shrugs. "Maybe they fall in ice. Maybe they get eaten by Ice-Slug. Maybe avalanche fall on them. Maybe fall on own veapon and die. Nobody ever find them. Tour-guide book say that some night you can see their ghost haunting ice. Tour-guide book dumb."`
			`	"Any more question?"`
				goto questions
			label ice
			action
				set "skadenga: asked about ice"
			`	"Very safe. Except when not. Ice always frozen, but sometime very thin. I can tell. You cannot. Trust Hjlod and you not drown and get eaten by Ice-Slug."`
			`	"You have more question?"`
				goto questions
			label monster
			action
				set "skadenga: asked about monsters"
			`	"Every world have animal. Some animal big, some small. Voolly octopus, mostly small. Size of this Ice-Crawler, only. Vorst in Glaesisvellir ice-plains is Ice-Slug. They can squeeze through tiniest hole in ice. This take long time, for they are as big as house. They have no teeth, too hard to squeeze through little hole, but they have acid spit. Put hole in Ice-Crawler, easy. They eat many foolish researcher and tourist."`
			`	She smiles at you. "You're not foolish tourist. You are with Hjlod. You are safe."`
			`	"Any more question?"`
				goto questions
			label noquestion
			`	"Is smart, not to ask question. Hjlod tell you best parts only." Hjlod gives you a quick grin and swivels back into her makeshift cockpit. "Enough ice-plain, now ve go to next stop."`
			scene "scene/iceplains2"
			choice
				`	(Look out at the bright Ice-Plains as they slowly disappear into the dull horizon.)`
			`	The Ice-Crawler plows through snow, hill, mountain, and tundra for another hour or two before a massive and oddly shaped rock passes into view. Hjlod stops the Ice-Crawler so you can look at it.`
			scene "scene/lonelyrock"
			`	"This is rock," she says matter-of-factly. You look at it for a while and realize there is a face half chiseled into it.`
			`	"You are done looking? Ve are good to move to next stop?" Hjlod asks.`
			choice
				`	"Yep, I don't need to look at this rock any longer."`
					goto riverlike
				`	"Wait, is that part of a man's face carved into it? What is so special about this rock?"`
			`	"That rock is supposed to celebrate man who discover Rigellian cure. He was called Hank, or Henry, or Bill, or something." Hjlod shrugs with evident disdain. "The cure was found here, but back when tundra was melting and Nifel was a little varmer. They say this man discover it and they want to make grand statue for him. But it turn out Nifel not so great place for statue. Beside, no one like statue of liar."`
			`	Hjlod turns back to her controls and gets the Ice-Crawler moving forward again. "That is enough about stupid rock and stupider man.`
			label riverlike
			`	"Now ve go to river," she tells you. The large, oddly shaped rock falls out of your field of view as the Ice-Crawler turns away from it.`
			scene "scene/snowfield"
			`	The uneventful journey to the boiling ice river of Slidr is suddenly interrupted when a deep tremor followed by a thunderous boom shakes the Ice-Crawler to its core and causes it to slip on the disturbed ice and snow. Somewhere outside, subsequent rumble starts to build rapidly. After Hjlod regains control of the crawler, she immediately veers away from the noise. "That vas Nifel-quake, and loud noise was avalanche, or landslide, maybe both. This is not good."`
			`	Despite her calm demeanor, she wields the Ice-Crawler with reckless abandon as she tries to avoid the rumbling snow. The machine protests with creaks and whirrs and pops as it strains to claw itself out of the way faster than it has probably gone for hundreds of years. The closer the rumbling gets, the more difficulty Hjlod seems to have retaining traction.`
			`	"I think-" Hjlod starts to say when a mountain of snow crashes into the Ice-Crawler with deafening force. All sense of travelling distance is lost as the snow blots out the windows and the crawler is dragged bumping and twisting over uneven terrain. You and Hjlod hold tight as you're tossed around until, eventually, the crawler grinds up against something reasonably solid and comes suddenly to a rest, partially on its side.`
			`	A few moments later, the rumbling finishes passing you by.`
			choice
				`	(Unbuckle the seatbelt and get up.)`
			`	By the time you are on your feet, Hjlod has already gathered up numerous supplies and is preparing to open the hatch and dig her way to the surface. She looks at you. "Nothing to vorry about. Happens all time. Vell, not really. First time this happen, but Hjlod not let you die, probably. I can lead us to settlement not far from here."`
			`	She tosses you an old, scruffy jacket with a tear along one of its arms. "Valking in cold, good for health. Maybe not as far as ve must go, but you laugh about later. Good story to tell back home."`
			choice
				`	(Put on the jacket and follow Hjlod out onto the ice.)`
					goto jacket
				`	"No way. I am done with this. I am calling my ship, or fixing this Ice-Crawler. Either way, I am not going anywhere."`
			`	Hjlod shrugs. "You may die, or maybe not. Signals vork strange here at times. Good luck and remember. No refund." With that, Hjlod opens the hatch and disappears in the cold white flurry outside.`
			choice
				`	(Quickly shut the hatch behind her.)`
			`	Alone, you have a decision to make. You can dismantle portions of the Ice-Crawler and use them to strengthen your personal comms to get a signal out to the <ship>. Or, you can try to repair the Ice-Crawler and get it running again - in which case you wouldn't be able to use its parts to boost your comm signal.`
			choice
				`	(Cannibalize the Ice-Crawler to communicate.)`
				`	(Try to fix the Ice-Crawler.)`
					goto fixme
			`	You have much more faith in your ship than some antique vehicle. You spend hours ripping once-vital machinery out of the Ice-Crawler in order to make a signal booster for your comms, eventually cobbling together a functional booster and programming a repeating burst S.O.S. message into it.`
			`You're certain your ship will eventually pick it up. Unfortunately, the damage you've done to the Ice-Crawler has affected its heater, which gives out during your eighth hour of waiting. In the meantime, you put on the jacket Hjlod left you and stuff it with rags and trash in a bid to keep warm.`
			choice
				`	(Try to ignore the cold and get some sleep.)`
			`	As the hours go by, you lose feeling in your hands and feet. There are no rations, and what stale warmth was once here is now gone. Hopefully, you didn't make a mistake waiting here. You know you made a mistake by going on this miserable tour. You just want to be warm again, and you certainly don't want to die here.`
			`	You begin to fade in and out of consciousness, when suddenly you feel a deep vibration, and hear a low rumble from outside.`
			`	There is no memory of what happens next. But somehow you must have crawled out of that ice buried Ice-Crawler, through the snow, and into the hatch of your ship, because the next thing you do remember is laying in your ship, warming up, and being glad that the ordeal is over.`
				decline
			label fixme
			`	After hours of tinkering with the guts of the machine, you manage to repair most of it, and all it costs you is one bad burn on your arm. Now, what it comes down to is a sequence of wires. If you can plug these in correctly, the Ice-Crawler should start back up.`
			choice
				`	(White, green, blue.)`
					goto boom
				`	(Green, white, blue.)`
					goto greatsuccess
				`	(Blue, green, white.)`
					goto boom
			label boom
			`	You're confident that this is the correct sequence of wires. You plug each one in and start the Ice-Crawler up. The vehicle hums to life.`
			choice
				`	(Pump a fist into the air.)`
				`	(Cheer.)`
					goto cheer
			`	In a moment of levity, you pump your fist into the air.`
			`	Unfortunately, your fist does not make it very far. The Ice-Crawler, with its criss-crossed wires, has a critical energy build up that results in an instantaneous, completely deadly explosion.`
			scene "scene/smeer"
			`	The Ice-Crawler, your entire body, your fist, and more than a couple hundred tons of snow are all incinerated in a fraction of a second.`
				die
			label cheer
			`	The sense of accomplishment inside you is so overwhelming that you find yourself unable to contain it. A cry of pure joy leaps out of your mouth. Or begins to. Unfortunately, it doesn't get too far, as the Ice-Crawler, with its criss-crossed wires, has a critical energy build up that results in an instantaneous, completely deadly explosion.`
			scene "scene/smeer"
			`	The Ice-Crawler, your entire body, and more than a couple hundred tons of snow are all incinerated in a fraction of a second.`
				die
			label greatsuccess
			`	With the final cord in place, you hold your breath as you start the Ice-Crawler. The engine hums to life and you wait a few more cautious seconds for the inevitable explosion... which never comes.`
			`	You breathe easy. You did it! After a few minutes getting accustomed to the controls you manage to pull the Ice-Crawler out of the snow. What will you do now?`
			scene "scene/icepicture"
			choice
				`	(Follow Hjlod's tracks.)`
					goto followher
				`	(Try and find a way to the spaceport.)`
			`	You've had enough of this expedition. Hjlod said she was fine, and you'll leave it at that. You turn the Ice-Crawler around and make your way back to the spaceport.`
			`	It only takes a couple hours, and the controls on the Ice-Crawler are relatively easy. When you pull into the maintenance dock, the sales woman comes to meet you and is dismayed that Hjlod is not with you.`
			`	She hasn't heard from Hjlod and fears the worst. You hope it all works out as you head back to your ship and as far away from this place as possible.`
				decline
			label followher
			`	Hjlod's tracks are clearly visible in the crisp snow, and you're able to follow them for hours. Just as the second sun is setting, the footprints come to an end at a mound of snow.`
			`	You leave the vehicle and investigate. You find an exhausted, freezing Hjlod and help her back into the Ice-Crawler. She does not have the strength to speak, and you worry without immediate medical attention that she won't make it.`
			`	As darkness descends, you see a flickering light in the distance.`
			choice
				`	(Drive toward the flickering light.)`
					goto flicker
				`	(Drive back to the spaceport.)`
			`	There is no guarantee that the flicker of light is anything more than a waste of time. You turn the Ice-Crawler around and head back toward the spaceport at the fastest speed you dare.`
			`	Long hours pass and you press on while Hjlod lays unconscious...`
			`	Finally, in the dead of night you arrive back at the spaceport. Medics swarm your vehicle, and while you learn she'll live, you are also told that she will lose her hands and feet to frostbite. The woman who sold you the excursion thanks you profusely for saving her friend, but still refuses to give you a refund.`
				decline
			label flicker
			`	Exhausted, you drive toward the flickering light and discover it is emanating from a small village.`
			`	Moments after entering what you assume is the village center, people flock toward your idle vehicle. Before you know it, they have the hatch open and have carried Hjlod out.`
			`	A young woman, bearing facial tattoos similar to Hjlod, approaches you and escorts you to a communal bunk house for the night. You're too tired to get a handle on what is going on and decide that it can wait for tomorrow.`
			scene "scene/snowvillage"
			choice
				`	(Sleep now, think later.)`
					goto villagearrival
			label jacket
			action
				set "put on jacket"
			`	You throw on the jacket and stuff a few rags in your coat for good measure.`
			`	Hjlod nods at you and opens the hatch. "It is only meter to surface."`
			`	She plunges into the snow and swim-climbs her way up it. You follow her, and though the cold is shocking, you are relieved when you quickly rise above it into the icy clear air above.`
			`	"Stay close," she says as she begins to trek through the snow. "Any path but mine is dangerous."`
			scene "scene/snowplain"
			choice
				`	(Walk in Hjlod's footsteps.)`
					goto travel
				`	(Meander around.)`
			`	Hjlod abruptly stops and glares at you. "You are fool. You vill certainly die, and you endanger me in process. This is no game, valk only vhere I valk or die."`
			choice
				`	(Walk in Hjlod's footsteps.)`
					goto travel
				`	(Continue to meander.)`
			`	You walk in your looping meandering pattern, stepping where you want, and not paying any attention to the path Hjlod is taking.`
			`	You feel righteous vindication as the hours pass and nothing bad happens; proof that Hjlod was just being bossy. She should have no say over what you are doing; it's her fault you're stuck out here stranded on some trash-planet in the blinding cold in the first place.`
			`	At that thought you do some anger-stomping, really letting her know that you could care less about her worthless warnings. Which is, of course, when you hear a weird gurgling sizzle. You look down at your feet and see there is not packed snow beneath them, but that a gray-purple blob that has wrapped itself around your leg.`
			choice
				`	(Try and shake free.)`
					goto free
				`	(Call out to Hjlod for help.)`
			`	Damn your pride. "Hjlod, help! Something's got my foot!" you cry.`
			`	Hjlod looks back at you with a dull expression on her face. "Is it purple-gray in color?"`
			`	"Yes, yes! Quick, help. I don't know what to do."`
			`	"Vhat you do is listen to Hjlod, and not make stompy circles in snow like spoilt child."`
			`	"Please, Hjlod!" You cry as the last of your boot dissolves away and you feel the slimy slug on your exposed foot.`
			`	"It is too late. Ice-Slug has you. Vhat you do now is die. Horribly." Hjlod turns and starts jogging away from you.`
			choice
				`	(Try and pull free.)`
			label free
			`	Despite using all your strength, your leg won't budge. The sizzling noise continues and you are overwhelmed with a sharp horrific burning sensation. Your eyes water and you scream out in pain for help and mercy.`
			`	You keep pulling, trying to break free. The air thickens with the scent of your liquified foot, and something gives as you fall forward. You look down to see your leg missing from the knee down. You try to push it out of your mind as you desperately claw forward, trying to escape the gray-purple blob that is forming up behind you.`
			`	Try as you might, you can't cry out Hjlod's name; instead your screams are savage, hollow noises. You reach for her, you reach for anyone, but it's too late. The Ice-Slug has caught up to you, and you feel its acidic tendrils wrapping around your remaining leg and lower torso. The pain is agonizing as your lower body begins to dissolve.`
			`	You look up one last desperate time, hoping to see Hjlod coming to rescue you, but all you see is a gray smudge on the horizon, a distant person who has long left you for dead. You are alone now with the Ice-Slug and the pain. You consider briefly your mistakes before you are dissolved and eaten.`
				die
			label travel
			`	The cold, monotonous trudging weighs on you as the hours pass. You're dimly aware of Nifel's two suns as they make their journey across the wide open sky.`
			`	Evening and exhaustion approach hand in hand, and as the last sun sets, you're not sure how much farther you can go. "There!" Hjlod breaks the silence of hours as she points at the weak flicker of light in the twilight landscape. "This is good," she admits hoarsely as you both stumble toward the light. "Ve vould have not survived night."`
			`	The night air grows too cold. You slow as your body begins to shutdown and frostbite gnaws at your hands, feet and exposed arm. The light is still too distant, and you can barely move. You think you see the shadows of humanoid figures against the light. But then you stumble and fall. You crawl for as long as you can. And then nothing.`
			choice
				`	(Wake up.)`
			label villagearrival
			branch "bodyaches"
				has "put on jacket"
			`	The pale morning light of the first sun filters in through a synthetic window and onto your face. You try to escape back into sleep, but something feels off and groggily you peer out at your surroundings.`
				goto barracks
			label bodyaches
			`	The pale morning light of the first sun filters in through a synthetic window and onto your face. Your body aches and you try to sink back into sleep, but something feels off and you focus on your surroundings.`
			label barracks
			`	You're in a half-wooden, half-synthetic barracks, a strange mix of primitive earth-tech and old colonial architecture. That, in and of itself, isn't that alarming. What is, however, is the group of people gathered around your bed quietly staring and pointing at you.`
			choice
				`	"Excuse me?"`
			`	The crowd steps back, and an elderly woman steps forward. Her gray hair is rolled up into tight, elegant braids, and her face and hands are covered in faded, blue tattoos.`
			`	"We are pleased to call you guest. You have saved our daughter, and more; you will save us all." The elderly woman and everyone behind her kneels before you.`
			branch "withhjlod"
				has "put on jacket"
			action
				set "Hjlodsaved"
			choice
				`	"Woah, woah, woah! What do you mean 'save us all?'"`
					goto woah
				`	"Your daughter? Hjlod? Is she alright?"`
			`	The elderly woman smiles warmly. "It is good of you to ask. Thanks to you, Hjlod will be fine. Had you been any later, she would have lost her hands, or worse. But she is recovering now and will join us later."`
			choice
				`	"Woah, woah, woah! What do you mean 'save us all?'"`
			label woah
			`	The elderly woman opens her palms and spreads them wide. "This is village of Udainsakr. I am Ondurdis, or leader, and we are Skadenga, daughters of Skade, the Troll-Goddess of ice, mountains, and cold."`
			`	"For nearly century we have been waiting for person who bore mark of Skade." She points a tattooed hand at the electric burn on your arm you received while repairing the Ice-Crawler. "It seems we have been waiting for you."`
				goto woahafter
			label withhjlod
			choice
				`	"Woah, woah, woah! What do you mean 'save us all?'"`
			`	The elderly woman opens her palms and spreads them wide. "This is village of Udainsakr. I am Ondurdis, or leader, and we are Skadenga, daughters of Skade, the Troll-Goddess of ice, mountains, and cold."`
			`	"For nearly century we have been waiting for person who bore mark of Skade." She points a tattooed hand at the ice burn on your arm you received while traveling through the snow. "It seems we have been waiting for you."`
			label woahafter
			choice
				`	"What do you expect me to do?"`
					goto expect
				`	"What do you mean a century? How long have you been here? Why were you waiting for me?"`
			`	The Ondurdis raises an eyebrow. "So you want to know our secrets? We ask much, so I will tell you more than most know. Long ago, the so-called-elves brought the Skadenga to Deep. We had to make penance for some mistakes. Our volva, or seeress, saw that to make amends we must come to Nifel. We did not know why, but when we found the Goddess-Stone, we knew we had made right decision.`
			`	"Since then, we have lived here and acted as guides and pathfinders to others. It was one of our sisters, Eymani, an herbalist, who discovered the cure to Rigellian plague. We thought this was why we had been sent here. Our duty to act as handmaidens of healing.`
			label expect
			`	"With each passing year, Nifel grows colder and outsiders less frequent. Our numbers dwindle as does our usefulness. This is dying world, and we need new home. Eighty years ago one of our holiest sisters had vision. She saw that stranger with mark of Skade would arrive and that stranger would help us find new home."`
			`	The Ondurdis points a boney finger right at you. "First, you must discover which world will be our home. Then you must find us transportation. We will of course pay you in one way or another. Would you do this for us?"`
			choice
				`	"I'll do it. I won't let you guys down."`
					goto doit
				`	"No. This isn't my problem. I just need to get back to my ship."`
			`	The Ondurdis bows and steps back. "If that is your wish, then you must not be the one we wait for." With that, she and everyone else leave the barracks.`
			branch "useshuttle"
				has "put on jacket"
			`	You climb out of your bunk and head to the Ice-Crawler. From there, you head straight back to the spaceport. The trip takes a few hours and you spend some of it pondering the strange course of events - how you went from a life or death struggle against the elements to being some rustic community's savior.`
			`	"Oh, well." You say to yourself, "I can't save everyone."`
				goto onboard
			label useshuttle
			`	You hear the familiar rumble of a shuttle overhead, you climb out of your bunk to go to meet it. From there, you head straight back to the spaceport. The trip is brief, and you have little time to consider all that has transpired since you decided to take the excursion. You worry you may need therapy.`
			label onboard
			`	The spaceport rises into view, and before you know it you're back safely onboard your ship.`
				decline
			label doit
			`	The Ondurdis smiles. "Thank you." She nods toward the door. "Come with me."`
			`	In the light of early day, the village looks stranger than you remember. Carved wooden structures weave flawlessly into sleek fabricated composites in a marriage of ancient with new. Oddly enough, the effect does not clash, but instead gives off an impression of seamless artistry. To the south, there is an open space filled with high-stacked stone cairns. At the center of the space, or holy site, is a giant wall made of an unusual gleaming metal and surrounded by eight ornate wooden pillars. The wall, despite being filled with strange letters and images, is dominated by the single image of a giant humanoid. As you stare into the structure, you feel unnaturally chilly.`
			`	"That is Goddess-Stone." The Ondurdis gestures toward the large stone-wall. "This is why we settled here. Most worlds in Deep have stones like this upon them. They go by many names; Elf-Stones, God-Stones, Jotun-Stones, and more. Now, at base of wall, those pillars, they are our Setstokkr. They are holy relics of our folk, and guided us here, to this very wall, long ago. Just as they will guide us once more to our new home. There are eight Setstokkr here, but once there was nine."`
			`	The Ondurdis turns back to you. "You must find the ninth Setstokkr, the missing pillar. It was dropped in space long ago, and we believe based on where it started it could have only found its way to one of two worlds. It either on Windblain in the Regor system, or Asgard in the Naos system." Offering you a small storage device, the Ondurdis continues, "Setstokkr have... unusual properties. This drive contains information that will allow you to track them. Go to these worlds, see if you can find the Setstokkr, and return to us with news. We are eager to know where Skade will send us."`
			`	The sky glows and the earth rumbles as a shuttle lands not far from the village. "That shuttle will return you to the spaceport and your ship. May Skade guide you." With that The Ondurdis leaves you.`
			choice
				`	(Head to the shuttle)`
					goto shuttle
				`	(Take a moment to investigate Goddess-Stone.)`
			`	You walk toward the park filled with stone cairns, wooden pillars and Goddess-Stone.`
			`	At this distance, you can see that the cairns have name-plates at their bases. Some are so faded and worn you cannot make out the names. Others are easier to read and appear to be family names. Myrlinga, Baning, and Amalung are the few you can read.`
			`	Beyond the cairns are the well-carved wooden pillars, or Setstokkr as the Ondurdis called them. They are each over 10 meters tall, and all covered entirely in runic script, images, and patterns. A few have unshorn branches that include their own carvings as well, while most are limbless. On one Setstokkr, you notice that a frequent carving within its entwined animals is similar in shape to the burn on your arm.`
			`	Finally, you reach the massive Goddess-Stone itself. You see now almost no part of the wide surface is bare. There are images within images, letters within letters. These exotic letters bear no relationship to the runes found on the Setstokkr. These are truly alien.`
			choice
				`	(Head to the shuttle.)`
			label shuttle
			branch "threefingers"
				has "put on jacket"
			`	A lone figure stands next to the idling shuttle. As you draw closer you recognize Hjlod.`
			`	"I just vant to thank you." Hjlod's gray-blue eyes glitter in the morning light. "I alvays say Hjlod keep tourist safe. But yesterday you save Hjlod. I vill not forgot, know this."`
				goto lopsided
			label threefingers
			`	A lone figure stands next to the idling shuttle. As you draw closer, you recognize Hjlod. "You see," she says, "Stick with Hjlod, and you live, probably." She holds up a bandaged, three-fingered hand and shrugs. "Mostly."`
			label lopsided
			`	Hjlod offers one of her lopsided grins and then leaves you alone with the shuttle. It is time to go.`
				accept
	on stopover
		dialog
			`You land on the final world you were asked to visit. Once you're done here, you should return to Nifel.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		event "nifel waiting" 15
		conversation
			`	Upon landing, you get a recorded voice message from Hjlod. "<first>, ve're busy evacuating isolated Skadenga communities. Come back in few veeks vhen things settle down."`
			`	The message abruptly ends.`



event "nifel waiting"



mission "Home for Skadenga 2"
	invisible
	landing
	to offer
		has "Home for Skadenga 1: active"
	source "Windblain"
	destination "Nifel"
	on offer
		conversation
			`In the high-atmosphere of <origin>, your ship's sensors pick up traces of the exotic Setstokkr matter. They pinpoint the material to the southern rim of a sparsely-populated island-continent, in the small coastal settlement of Hrithfjall.`
			`	Your ship lands just outside the settlement, and you leave with your handheld tracker keyed to the Setstokkr material. The trail goes cold once you enter the settlement. The hamlet Hrithfjall is little more than a few dozen wooden structures along a single overgrown road. The buildings themselves are well-crafted and finely designed, but many of them appear to be abandoned. There are no townsfolk about, but you notice recent footprints headed toward the shore, which you follow.`
			scene "scene/seascape"
			`	The great seas of Windblain churn beneath the chalk-white cliffs and blue-green sky. As you scan the horizon, your eyes catch the glare of reflected light beyond a distant precipice. You head in that direction and find a figure seated at the precipice's edge. An aged man sits cross-legged, looking out into the sea and at a gleaming metal wall towering over the gray waves about a mile out from shore.`
			`	The old man speaks without turning and says in a raspy voice, "Hail, stranger. Have you come to pay your respects?"`
			choice
				`	"Pay my respects to what?"`
				`	"Who are you?"`
					goto who
			`	"Why, the Ran-Stone, of course." The old man points toward the metal tower in the sea. "Few come here any more. Few remember, or care, about the old ways. But the goddess Ran, she is as patient and as terrible as the sea, and like the sea, she has claimed this world.`
			`	"So why are you here bothering old Aldfrith, if not to look upon the great countenance of divinity?"`
				goto why
			label who
			`	"I am called Aldfrith. I live in nearby Hrithfjall, though I spent most my life living on the sea and making every port my home." Aldfrith's eyes glaze over for a moment as he speaks.`
			`	"But those days are behind me. Now, I mostly sit, think, and live. On the high seas I saw things... things that cannot be explained, that cannot be understood. So, now I sit here, before the great Ran-Stone, the very countenance of divinity, and reflect upon mystery."`
			`	"So why are you here, if not to pay respect to Ran?"`
			label why
			choice
				`	"I am looking for an ornate wooden pillar covered in carvings that fell from space."`
				`	"Have you seen any old, wooden relics around here?"`
					goto relics
			`	Aldfrith strokes his white beard for a moment. "The tide brings in all sorts of interesting driftwood. But driftwood from space? That's a tall tale or a deep mystery, that is."`
			`	He looks up at you with a bemused smirk. "Nope. Nothing like that here. If you're interested in the driftwood though, that gets used for our boats and homes."`
				goto ran
			label relics
			`	"Relics, eh?" Aldfrith cackles. "Sailors will always be over-eager to tell a stranger about fantastic treasures in the deep waves."`
			`	The old man pauses and scratches his head for a moment. "But, alas, I can think of nothing wood-made that would be considered a relic. The salty air and saltier sea don't allow untreated wood to linger long in these parts. Unless it's a boat or a home, your relic is not here."`
			label ran
			`	You turn your attention to the great, gleaming metal wall in the sea. Unlike the Goddess-Stone of Nifel, this one has no towering figure upon it. Instead it is more abstract, with fractal swirls and wave-like patterns. As you stare at it, you feel a wildness growing inside your heart that dissipates the moment you look away. You turn, leaving the stone to its wave, and the man to his stone.`
			`	You run your tracker in Hrithfjall once more, but again it fails to lock onto anything. There are faint diffuse traces of the exotic material all around you, but nothing concrete. There is little more you can learn here at the moment, so you head back to your ship.`
				accept
	to complete
		has "event: nifel waiting"
		has "Home for Skadenga 3: offered"
	on complete
		conversation
			`When you enter <planet>'s atmosphere, you receive a message that Hjlod will be waiting for you in the spaceport.`
			`	Before you have a chance to head into the port however, you are met by a well-dressed administrator and a couple of nondescript guards.`
			`	"Captain <last>," the administrator says crisply. "You are invited to a meeting in the VIP Conference room. If you would please follow me."`
			choice
				`	"Pass. Have your bosses send me a letter or something, and I'll be sure to get to it in my own time."`
					goto pass
				`	"No, thanks. I'm actually supposed to be meeting someone."`
					goto someone
				`	"Sure thing. Lead the way."`
			`	The guards take you by the arms. "I am pleased you are being so agreeable. Consider this a precaution." The administrator promptly turns, and you all follow.`
				goto fancypants
			label pass
			`	As you try to get around the administrator, his goons grab you. "Respectfully, Captain, this is not an invitation you are at liberty to dismiss."`
				goto fancypants
			label someone
			`	"Ah yes, don't worry. We have the port authority keeping your hill-witch friend busy. You'll likely be done before she is." The administrator nods to his guards, who close in on you.`
			`	"Regrettably, this is not an invitation you are at liberty to ignore. So let us be on our way, shall we?"`
			label fancypants
			`	You are brought to a large research complex just outside the spaceport, and deposited in a high-end, white, minimalistic conference room with two well-dressed and important looking men. "Thank you, Lars. Take the guards and wait for us outside," the man seated across from you says.`
			`	"Of course, sir." The administrator, whose name seems to be Lars, turns and is followed outside by his two goons.`
			`	The man who spoke looks at you with a friendly smile and, without a shred of irony, says, "I am so glad you agreed to meet with us. I realize an accomplished Captain like yourself is in great demand, so we will endeavor to keep this brief."`
			`	"I am Jakob Forsyth, Vice Planetary-Governor of Nifel and CEO of Nifel-Research Solutions Incorporated, and the man sitting beside me is Henrik Fogel, Deputy Lieutenant-Sub-Director of the Census and Culture Bureau for The Deep. We've been monitoring you ever since you first arrived and became entangled with those sad, backwards, hill-witches." Jakob takes a sip from an elegant glass on the table.`
			choice
				`	"If you've been watching me, does that mean you knew about the Ice-Crawler accident and did nothing?"`
			`	"Of course I knew." Jakob answers. "It is my business to know. The only people who live here anymore are employees of my firm and those hill-witches." Holding up both hands in a placating gesture, he adds, "And I really am sorry we could not extract you from that avalanche. We don't have the resources allocated to support rescue missions anymore; various services, including emergency ones, are only barely functional. The whole operation on this planet is being shut down, you know. Not enough opportunity to make a profit left here. That's why it will be completely uninhabited within 50 years."`
			choice
				`	"You're abandoning an entire planet?"`
			`	He leans forward with a sly look on his face. "Think about it. Why employ a worldwide workforce of 300,000 in the vain hope of discovering new pharmaceutical products on a snowy wasteland? There hasn't been a profitable discovery here in generations. It's a money pit. You run a ship, a business, you understand.`
			`	"There is, however, one hiccup." Jakob leans back. "A thorn that has been in our side since our research firm first colonized this world over 600 years ago. Those crazy hill-witches. Sure, early on they had their uses as guides and whatnot. But, they are a cultural dead end, an atavistic blight on our corporate world. You know," he continues with a humorous glint in his eye, "They actually believe that they were brought here during Earth's stone-age by magical space-fairies."`
			`	"Now, now." Henrik finally cuts in. "We here in the Deep do value all our resident people and cultures. We are not here to denigrate our citizens, no matter how unusual."`
			choice
				`	"But they're leaving. So what's the problem?"`
					goto leaving
				`	"I thought folk tales of elves were common in the Deep. What makes the Skadenga so different from the rest of you?"`
			`	Henrik leans back. "Well, you're not wrong. In fact, there's been studies about whether the Skadenga are truly a traditional reflection of the Deep people or an extreme offshoot of what we used to be. Suffice to say, I believe it's the latter, and most modern Deep historians would agree with me.`
			`	"Here's what really makes them different: our popular folk tales are like the childhood stories you heard of, say, the boogeyman. The Skadenga don't just tell them - they formed a religion out of those stories. If you've spoken with them, I'm sure you can tell that it's quite reminiscent of ancient paganism. Certainly they can practice whatever they want, but we're concerned about some of the usual connotations of paganism. We haven't been able to prove any extreme behavior, but their religion gives us reason to suspect it. If they stay culturally isolated from the rest of the Deep, their religion could progress in ways more... harmful. I'll leave it at that."`
				goto resettle
			label leaving
			`	Henrik clears his throat. "Leaving, yes, but to where? These poor people are in grave need of our help, our public services. Their primitive, superstitious existence is both an embarrassment to the Deep, and a humanitarian crisis that we need to solve."`
			label resettle
			`	"The Deep would never forcibly resettle a population. But with your help, we have an opportunity to guide them to a place where they could receive the help they need. We know you recently visited Windblain and Asgard. Sending them to Windblain, a barely inhabited world with no useful public services, would be a huge mistake. These poor wretches would disappear into the uncharted wilds. Asgard, however, has a robust civil service and safety net that would be perfect to help them adapt to our modern culture.`
			`	"This is why I asked the Vice Planetary-Governor to hold this meeting. The Deep needs you to convince these poor, backwards people that they should live on Asgard." Henrik shrugs. "For all we know, you've already decided to tell them Asgard is the best choice, in which case we're really not asking you to do anything you weren't already planning on doing. We will also help facilitate the move by providing transportation. Furthermore, for your support in this delicate matter, we will transfer 850,000 credits to your account upon their arrival in Asgard. Really, everyone wins this way."`
			choice
				`	"But the Skadenga-"`
				`	"I don't think-"`
				`	"That's great news-"`
			`	Jakob interrupts you before you have a chance to finish your sentence. "Now, listen, you just think it over. We don't need your answer now. All we need is for you to guide those people to Asgard. If you do that, the Transport Union on Valhalla will have the ships you need. If you don't, well, things might be more difficult for everyone. And remember, we'll pay you in real credits. Not charm bracelets."`
			`	"Lars!" Jakob calls, and the administrator and his two guards promptly enter the room. "Show Captain <last> back to their ship. Our meeting is concluded."`
			`	"Of course, sir," Lars replies.`
			`	The guards grab you and "escort" you off the premises. With that distraction out of the way, it's time to go meet Hjlod at the spaceport.`



mission "Home for Skadenga 3"
	invisible
	landing
	to offer
		has "Home for Skadenga 1: active"
	source "Asgard"
	destination "Nifel"
	on offer
		conversation
			scene "scene/busystreet"
			`In the crowded high-atmosphere of Asgard, it is difficult to find any reading that matches that of the exotic Setstokkr material. You do get one anomalous ping from a related material located in the urban center of Helsingor.`
			`	Your ship lands in a regional spaceport that serves Helsingor, and your handheld tracker leads you to the heart of the city, where you discover a massive, winding mall. The tracker leads you inside the mall.`
			`	Once inside, your eyes catch the glint of a vast metallic structure around which the entire mall is built. You can make out unusual pictures and alien letters carved into it. It appears that the shopping mall has been built around Asgard's God-Stone, and that the Stone is being used as an exotic accent wall for the myriad of shops in the structure.`
			choice
				`	(Follow the tracker.)`
			`	For a moment you forget the God-Stone and focus on following the tracker. It leads you to a themed restaurant on the top floor called "The Adventurer's Due." The restaurant is filled with exotic artifacts allegedly taken from all corners of known and unknown space.`
			`	Your tracker homes in on one case. It contains a rune covered box, with patterns that look similar to those used by the Skadenga. The panel above it reads:`
			``
			`	'This box once contained the cure to the Rigellian Plague. It belonged to the renowned explorer, adventurer, and researcher Dr. Henry Forsyth. It was donated by the Forsyth Foundation for Academic Honesty.'`
			``
			`	Disappointed, you head back down to the lower levels of the mall and take a seat at a small in-door park at the base of God-Stone. After a moment, a woman wearing a well-pressed pantsuit approaches you.`
			choice
				`	(Offer a non-committal "Hello.")`
				`	(Grin and say, "Hey!")`
				`	(Ignore her.)`
			`	"Hello!" She gives you a professional smile. "It's a beautiful place, isn't it? Not just the mall, but the town of Helsingor itself."`
			`	She sits next to you. "You might not realize it, but homes here are incredibly affordable right now. If you're looking for a new place to live, now is the time." She lowers her voice. "But you'll have to act soon. The Helsingor secret is about to get out, and once it does, prices here will skyrocket!`
			`	"There are three huge prefabricated housing developments that have just completed construction on the edges of town. I could get you an appointment today if you're interested." She hands you a card. "My name is Carla Von Hausen, and I'd be happy to serve as your real-estate agent." She gives you a sharp, practiced smile that does not quite reach her eyes.`
			choice
				`	"Beat it, lady."`
				`	"Thanks, but I am just passing through."`
					goto stars
				`	"My home is among the stars."`
					goto stars
			`	A frown flickers across Carla's face for a brief second before her professional smile reasserts itself. "Trust me, why rent when you can own? Why move a large family to an empty world with poor restaurant selections when you could move them here?"`
			`	She stands and smooths her suit jacket. "When you change your mind, I'll be here." With that, she's gone, and you are free to turn your attention back to the God-Stone.`
				goto elfstone
			label stars
			`	Carla rewards you with a condescending smile. "Ah, darling. You might work in space, but eventually, you'll need a world to call home."`
			`	She stands and smooths her suit jacket. "When you are ready to make the real-estate leap, you know where to find me." Carla winks at you and then strolls off in the crowds of shoppers. Alone, you turn your attention back to the God-Stone.`
			label elfstone
			`	The parts of the God-Stone that are exposed at this level are dull and lusterless. You search for a pattern but can make nothing out due to how little of the wall is visible. It's sectioned off, with every shop and restaurant having its own piece. As you stare at it you feel nothing, just an emptiness. You do notice a plaque by a large part of unobstructed wall.`
			choice
				`	(Read the plaque.)`
				`	(Return to my ship.)`
					goto ship
			`	The plaque labels the God-Stone as "Colonial Graffiti" and reads:`
			``
			`	During the Colonization of The Deep in the 23rd Century, the earliest colonists erected large metal slabs and wrote pseudo-letters on them. It is believed that this was done in order to raise the prestige of their early worlds. They would claim the stones were powerful alien artifacts, or that they were made by an earlier population of humans who had arrived on the world thanks to the intercession of fairies.`
			`	Either for profit, or out of a longing for home, many local communities promoted these ideas about the origins of these structures. Scientists have determined these structures were once large segments of the metal hulls of the original colony ships. To date, there has been some difficulty in identifying exactly what alloy they were constructed from.`
			`	Most worlds in the Deep have "Colonial Graffiti," and they are proud reminders of our enterprising colonial origins. They are sometimes known in older texts, and by early communities, as God-Stones and Elf-Stones.`
			``
			`	Here at the Helsingor Family-Fun-Shopping-Center, we are committed to celebrating our past! This is why we, in the spirit of graffiti being the cultural touchstone of the day, have renovated this colonial structure into a central communication piece and made it a vital part of our vibrant community!`
			``
			`	You finish reading the plaque, and look at the dull gray metal wall and the inhuman things carved upon it. It looks nothing like a ship's hull.`
			label ship
			`	These people seem disconnected from their past. You wonder if the Skadenga could help them reconnect with it, but worry that the place would change the Skadenga more than they could change it. There is nothing more you can do here. You head back to your ship.`
				accept
	to complete
		has "Home for Skadenga 2: offered"



mission "Home for Skadenga 4"
	name "Transport for Skadenga"
	description "Travel to <destination> to secure transportation for the Skadenga."
	to offer
		has "Home for Skadenga 2: done"
		has "event: nifel waiting"
	source "Nifel"
	destination "Valhalla"
	on offer
		conversation
			`There are no signs of Hjlod when you arrive at the mostly empty spaceport. You spend a few minutes wandering around before you see her heading down the hall toward you. "Sorry to be late, you vould not believe all paper-vork they had for me. I think they aren't happy about Ice-Crawler."`
			choice
				`	"That's okay. I didn't mind waiting."`
					goto waiting
				`	"I was abducted by the Vice Planetary-Governor."`
			`	"That is no surprise," Hjlod says nonchalantly. "They alvays do thing like this. It matters not to us."`
			`	You ask her if she's worried you've been compromised - that you might be working against the Skadenga's best interests. Hjlod shakes her head. "No. Future is set. Vhat vill, vill be. You are given task to tell us vhere to go, ve go vhere you say. The rest is just noise.`
			label waiting
			`	"Now," Hjlod says, "Tell me about Setstokkr. Did you find it?"`
			choice
				`	"I found nothing definitive."`
					goto nothing
				`	"I think I found traces of it on Windblain."`
					goto nothing
				`	"I found a strange box similar to the Setstokkr on Asgard."`
			`	"Sounds like herbalist box. Ondurdis had one long before I vas born. Gave it to liar. It not important though, not Setstokkr."`
			label nothing
			`	"Sending big piece of vood through space probably not best idea Ondurdis had." Hjlod smirks. "Still, it does not matter so much what you find. Only how you felt. You saw the vorlds. Vhere should ve go?"`
			choice
				`	"Windblain."`
				`	"Asgard."`
					goto asgard
			action
				set "Nifel"
			`	You answer, "There is a nearly abandoned village called Hrithfjall next to a coastal God-Stone. Something about that place felt right. I believe that is where the Skadenga should migrate."`
			`	Hjlod nods. "Hrithfjall sounds like good place. I vill tell Ondurdis.`
				goto end
			label asgard
			action
				set "Asgard"
			`	You answer, "On Asgard, there is a great market built around their God-Stone, and many new homes in need of people to fill them. The people there have lost their way and they need the Skadenga to remind them of who they were."`
			`	Hjlod nods. "The Skadenga have alvays been guides, pathfinders. I vill tell Ondurdis.`
			label end
			`	"Vhen you were gone, thing, or assembly, vas held. Ondurdis called in all Skadenga from all villages across Nifel. You must find transportation for 2,200 folk. That is what Onderduis told me to tell you."`
			`	You frown and ask, "Did she provide money?"`
			`	Hjlod shakes her head. "No. Ve could not afford it. You must go to Valhalla and convince head of Transport Union to support us." She squeezes your shoulder. "Thank you for help. For finding us new home. Ve need it. I must report now to Ondurdis. Skade be vith you." She turns and leaves.`
				accept
	on complete
		conversation
			`	Outside your ship, you are met by a representative of the Transport Union. "We have been expecting you, Captain <last>." They escort you to an elevator and up to the penthouse of the tallest building in Valhalla's capital of Himinbjorg.`
			scene "scene/tower"
			`	Three youngish men adorned in trending clothes smile as you enter. "Ah, Captain <last>, what a pleasure to finally meet you. I am Kaiden, and these are my associates Braiden and Grayden. We are executives of the Transport Union. Obviously, we were made aware you would be coming and are looking forward toward creating a lasting and beneficial relationship with you and your... clients.`
			`	"We've heard that you have this inspiring idea to transport an entire backwater community from one world to another," Kaiden says.`
			`	"Really inspirational," Braiden chimes in.`
			`	"So inspiring," Grayden adds with an opaque hand gesture you think you've seen done by celebrities.`
			`	"At the Transport Union, we say that 'it's about the people in the transports,' which is why we're humbled and excited to offer you our support in this beautiful and inspiring humanitarian adventure of yours," Kaiden finishes. Braiden and Grayden both clap enthusiastically.`
			`	Kaiden waits for the ovation to subside then continues with a knowing smile. "So, tell us humble servants of the people: where to transport these poor souls?"`
			branch asgard
				has "Asgard"
			choice
				`	"That's fantastic news! The Skakenga will need transport to Windblain."`
				`	"They need to go to Windblain."`
			`	A hush falls over the room, and both Braiden and Grayden look to Kaiden with confused expressions on their faces.`
			`	"Wind. Blain." Kaiden says slowly. "Wiiiindblaaain. Are you sure that is the world these simple people wish to travel to? Maybe you got an invoice mixed up? Perhaps wrote the wrong name down?" Braiden and Grayden both silently nod.`
			choice
				`	"Windblain. Yes. I am sure."`
				`	"Did I stutter?"`
			`	"That changes things, then." Kaiden turns to Grayden. "Are there even incentives?"`
			`	Grayden is busy scanning through a tablet. "No re-urbanization kickbacks, no university-study grants, not even a housing development utilization bonus. The entire thing will probably still be a tax write off, but the Census and Culture Bureau won't be happy. Plus, obviously, no finder's fee from them."`
			`	Kaiden then looks to Braiden who shakes his head. "Public Relations for people moving to... Windblain? No one who is anyone lives on Windblain, and no one else cares about those people."`
			`	"Yeah, we're sorry, but this isn't going to work for us." Kaiden puts on a pained face. "This just isn't the kind of project we are willing to take on at the moment." They all stand in near unison. "In the future, try not to waste our time." Kaiden says as the three of them exit the room.`
			`	Your escort reappears. "I've been instructed to inform you that there is no one else in the Deep capable of moving the amount of people you want to move. When you're ready to be practical, contact us and we'll be more than happy to help. Now, follow me out of the building." You ride the long elevator down to the lobby and are shown the door. As you leave, another employee follows you out. As he passes you, he quietly says, "Meet me in the spaceport."`
				decline
			label asgard
			choice
				`	"That's fantastic news! The Skakenga will need transport to Asgard."`
				`	"They need to go to Asgard."`
			`	Kaiden beams. "Brilliant. Just brilliant. I was just telling my colleagues here about what a great place Asgard would be for this tribe. The publicity will be huge. The universities will probably want to run various studies. There will be all sorts of government programs and initiatives there to help them accept the proper Deep culture and become productive citizens like the rest of us."`
			`	Grayden, Braiden and Kaiden all start shaking each others' hands and congratulating each other on being part of something so inspirational. After their celebration is over, Kaiden turns back to you. "Our transport fleet is at your disposal. They are being refitted at Mani in the Avior system."`
			`	The three stand up in unison. Grayden and Braiden leave, and Kaiden turns from the door. "We are so happy you stopped by today and gave us this opportunity to really give back to the needy communities out in our neighborhood." With that, they are all gone, and your escort returns to lead you out.`
				decline



mission "Home for Skadenga 5"
	landing
	name "Transport for Skadenga"
	description "Travel to <destination> to prepare the Transport Union Fleet."
	to offer
		has "Asgard"
	source "Valhalla"
	destination "Mani"
	on complete
		event "mani refit" 21
		conversation
			scene "scene/citydark"
			`Mani is a quiet, empty moon with only a few hubs of human activity. The Deep Security forces, Transport Union, and other semi-governmental fleets are all serviced here.`
			`	A Transport Union executive meets you when you touch down. "It'll take a while for the ships to be ready, Captain <last>. We're primitive-proofing them so that those ice-savages from Nifel don't accidentally kill themselves. I'll send you a message when the ships are ready. It should take about three weeks," the executive explains as he skims through a time table displayed on his tablet.`
			`	"When the ships return covered in hay, feces, and other low-tech trash, it'll take us weeks to get them in a usable state again," he mutters before promptly turning and leaving.`



event "mani refit"



mission "Mani Refit"
	landing
	name "Mani Refitted"
	to offer
		has "event: mani refit"
	description "Head back to <destination> and meet up with the Transport Union's Fleet."
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not planet "Mani"
	destination "Mani"
	on offer
		conversation
			`Your inbox blinks with a new message from the Transport Union:`
			`	"The fleet is ready for its inspirational journey. Please return to Mani.`
			`		-Jayden, Mani Administrator, Transport Union"`
				accept



mission "Home for Skadenga 6"
	landing
	name "Transport the Skadenga"
	description `Escort a fleet of freighters, refitted for carrying the Skadenga, to <destination>.`
	source "Mani"
	destination "Nifel"
	to offer
		has "Mani Refit: done"
	on offer
		conversation
			`You arrive at the spaceport to see a Union Executive overseeing the final preparations of his fleet. After a moment, the last crewmembers leave his side and board their ships. He walks over to you. "The fleet is ready to launch. Your mission is to escort them to Nifel, pick up as many as they can hold from there, and drop them off on Asgard. The fleet should be able to head back to Nifel and perform the rest of the resettlement trips from there, but please, try to keep all of them in one piece."`
			choice
				`	"Let's get this over with."`
				`	"Don't worry, your ships are in good hands."`
				`	"It's time to take the Skadenga home."`
			`	The ground you are standing on shakes as the ships begin to launch.`
				launch
	npc accompany save
		government "Deep Security"
		personality timid escort
		ship "Bactrian" "D.T.U. Endeavor"
		ship "Bulk Freighter" "D.T.U. Consistency"
		ship "Bulk Freighter" "D.T.U. Dependable"
		ship "Freighter" "D.T.U. Empathy"
	on visit
		dialog
			`You have reached <planet>, but not all the Transport Union ships have arrived yet. You should take off and wait for them to catch up with you.`



mission "Home for Skadenga 7"
	landing
	name "Transport the Skadenga"
	description `Escort a fleet of freighters, refitted for carrying the Skadenga, to <destination>.`
	source "Nifel"
	destination "Asgard"
	to offer
		has "Home for Skadenga 6: done"
	on offer
		conversation
			`The fleet touches down just outside the over-crowded village of Udainsakr. The landscape is filled with the gathered Skadenga.`
			`	The Ondurdis approaches you. "Leaving is difficult, but all winters must come to end." As her people board the ships, she adds, "I will be going on first trip to Asgard, but I must rejoin my folk. Thank you for this, and we shall speak again at our new home."`
				accept
	npc accompany save
		government "Deep Security"
		personality timid escort
		ship "Bactrian" "D.T.U. Endeavor"
		ship "Bulk Freighter" "D.T.U. Consistency"
		ship "Bulk Freighter" "D.T.U. Dependable"
		ship "Freighter" "D.T.U. Empathy"
	on visit
		dialog
			`You have reached <planet>, but not all the Transport Union ships have arrived yet. You should take off and wait for them to catch up with you.`
	on complete
		payment 850000
		event "skadenga death" 367
		conversation
			`For the occasion of the first of the Skadenga arrivals, Helsingor has remade itself into a mad circus. There are impromptu bands playing, random, unplanned parades, teeming crowds of excited neighbors holding up signs welcoming the Skadenga into the 31st century. There is also every kind of emergency and civil personnel available here. Firemen, police, doctors, social workers; all claiming, testing, prodding, and questioning the dazed immigrants. The Ondurdis finds you in the chaos and lets you know she wishes to see the God-Stone.`
			scene "scene/buildings"
			`	Together, you travel to the mall, and you explain to her how the structure was built around it, using it as an accent wall to the various posh establishments within.`
			`	Upon seeing this, the old and overwhelmed matron falls to her knees in tears. "These folk are lost," she says. "We are lost."`
			`	The Ondurdis looks at you with her tear-wrecked face and says, "You are instrument of Skade. I saw it. But why? Why this? Why to us?"`
			`	After that, she will say no more to you. She lifts her eyes to the sky and begins to chant wildly. A few Skadenga who have made it this far join her. Various news outlets swarm around them to record the Ondurdis' breakdown.`
			`	You back away slowly and bump into someone. You turn to see the real-estate agent Carla Von Hausen smiling at you. "Well done, Captain <last>. I've been authorized to tell you that my superiors have deposited 850,000 credits into your account, as was agreed upon earlier."`
			choice
				`	"Your superiors!?"`
			`	Carla grins. "The Census and Culture Bureau. I am one of their field agents. They are most pleased with how you handled this. Helping the Skadenga reintegrate into our culture is a big win for both the Bureau and the Skadenga.`
			`	"Anyways, I just wanted to pass that on. I have lots of work to do, thanks to you." She winks and wanders into the crowd.`
			`	You return to your ship to count your money as you hear the Transport Union ships engage their engines to pick up another load of the Skadenga.`



event "skadenga death"



mission "Skadenga Call 1"
	landing
	name "Check on Hjlod"
	description `Fly to <destination> to see what Hjlod and the Skadenga need from you. Make sure to have 52 bunks spare when you land.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not planet "Asgard"
	destination "Asgard"
	to offer
		has "event: skadenga death"
	on offer
		dialog
			`There is a new message in your inbox from Hjlod, one of the Skadenga you helped relocate to <planet>.`
			`	"<first>, we need your help. Come to <planet>, and have space for 52 souls."`



mission "Skadenga Call 2"
	landing
	name "Return the Skadenga"
	description "Take the Skadenga refugees back to <destination>."
	source "Asgard"
	destination "Nifel"
	blocked `You recall that Hjlod wanted you to have 52 bunks spare for the mission. Return when you have enough room.`
	passengers 48
	to offer
		has "Skadenga Call 1: done"
	on offer
		conversation
			`The Asgard spaceport hums with a thousand indecipherable conversations. It is a landscape overburdened with kinetic humanity. You spend hours wandering through the crowds for a glimpse of Hjlod. Exhausted, you are ready to throw in the towel when you feel a strong hand grab your arm. You turn to see a familiar tattooed face. Her eyes are dark and dull, her hair thin and unkept, her face creased with unhappiness.`
			`	"Not a vord." Hjlod says as you walk toward a portion of the spaceport that is marked "Closed - Under Construction." She draws you along. It's strange to see her so changed over such a short period of time. It's only been a year since you brought her here.`
			`	She ushers you past various barriers meant to keep a compliant public out. Finally, she leads you into a long hallway filled with the detritus of life: empty food containers, dirty blankets, other less savory items. People are also here - dirty, clumped together, wretched-looking.`
			`	Hjlod turns back to you. "It safe to talk novhere. But ve must, so here must do."`
			choice
				`	"What do you want from me?"`
				`	"Who are these people?"`
					goto who
			`	Hjlod glares at you. "From you? Everything. For that is what you took from us.`
			`	"I do not know vhy you did it. Vhy you brought us here. If Skade really let us down. Or if you ignored her," she growls. "But it does not matter. All that matters is that ve leave, and that is vhy ve need you."`
				goto here
			label who
			`	Hjlod laughs and tears run down her cheeks. "Do you not recognize us? Our great savior? Ve are the Skadenga, and this is your handivwork."`
			`	She look away from you and continues. "The rest are not dead, no. But they have left us. Most are happy; happy to be fed, happy to be entertained, happy to forget vho they are, happy to be Skadenga in name, but not in practice. But those here cannot accept that. Ve refuse to become them.`
			`	"Ve hide now. From the social workers, from the service providers, from the government. They can still find us, they know ve are here, but vhat they don't know is that ve can leave. That you can take us avay from here."`
			label here
			`	Hjlod takes a deep, calming breath. "I call because you are our only hope. They vill not let us leave. They vill not let us be. They will steal our souls." She points a shaky finger at you. "Take us back to Nifel. All those who are left. Take us home. Ve know the cold vill get us eventually. But better to live on a dying vorld as Skadenga than to live here as nothing."`
			choice
				`	"I will help you."`
					goto help
				`	"I need to think about it."`
			`	Hjlod grimaces. "Once they know you are here, they vill collect us. Come back here in an hour. Any longer than that, and ve vill be gone." She slumps down on the ground as you exit the dark, dirty tunnel where the remaining Skadenga cling to their fleeting identity.`
			`	Alone, you have a decision to make. You can return to help them escape this world. Or you can find Clara Von Hausen, the Census and Culture Bureau undercover agent, and report to her what is going on. She would probably pay you well for the information.`
			choice
				`	(Return to Hjlod and help the Skadenga.)`
					goto Hjlod
				`	(Find Carla.)`
			`	You leave Hjlod and her gang of stubborn savages behind, and return to the active parts of the thrumming spaceport. Carla's contact information, as an alleged real estate agent, is easy to find, and in a few minutes you have her on call. "Captain <last>, it is a pleasure to hear from you again. What-so-ever can I help you with?" she says with believable cheerfulness.`
			`	You tell her about the Skadenga hiding in the spaceport and their plans to escape to Nifel.`
			`	"Oh dear!" Carla says. "How terrible. Those poor, foolish simpletons would surely suffer on that terrible frozen world. How misguided of them. We are aware that some have struggled to assimilate. It's quite tragic, but we will handle things from here. Hopefully, we can convince them to integrate eventually. It really is for the best. I wish their old leader could have seen that before she died. It would have been easier for everyone.`
			`	"As always, we appreciate your valuable contributions. I'll authorize a generous sum of credits to be transferred to your account. I need to get some approvals so it may take a couple of days to come through. Thank you, and buh-bye!"`
				decline
			label Hjlod
			`	You return to Hjlod, who is surprised that you came back at all, and let her know that you going to help them.`
			label help
			`	Hearing this, the slumped and depressed dredges in the hall stir and rise from their stupor. Hurriedly, some gather items while others race off further into the dark, unused parts of the spaceport.`
			`	"Ve have 52 people that need off this vorld right now." Hjlod hesitates a moment, and then adds, "I know how much you like money. Ve have pooled all our savings together and will pay you <payment> for this job." She grabs a ragged duffle bag and a group gather around her. "The rest vill meet us at your ship. Ve move now."`
			choice
				`	(Follow Hjlod.)`
			`	Once you're back in the operational spaceport, you and your group move quickly, while drawing occasional glances from curious on-lookers. A large group of disheveled Skaldenga are waiting for you when you reach your ship. "Everyone on, quickly!" Hjlod barks at her people.`
			`	A few moments later, they are all on board. "Asdis, headcount!" Hjlod orders. As you're waiting, two more dirty and gaunt Skadenga show up. Asdis adds them to her count and then addresses Hjlod. "Ondurdis, 48 total."`
			`	Hjlod frowns. "It's Arnson's family isn't it? I told him he was too far."`
			`	A commotion boils up from a few terminals down, and you see some civil servants and local police officers heading your way. Asdis is also watching. "They could still be coming."`
			`	"It's too late for them." Hjlod shuts the hatch. "<first>, if ever ve vere friends. Take off, now."`
			choice
				`	(Take off.)`
					goto takeoff
				`	(Power down the ship and open the hatch.)`
			`	You turn off your ship's ignition, pop open the hatch before Hjlod can react, and jump out. Carla Von Hausen, at least two civil service workers, and a squad of police officers arrive within seconds. Carla gives you a tight smile. "Decided to do the right thing in the end? We appreciate it."`
			`	The police officers enter your ship and start restraining and removing the Skadenga aboard it.`
			`	"As always, we appreciate your help and value our continued working relationship. Expect a payment for your aid in the next couple days, after I've gotten it approved." Carla steps back to assess the Skadenga, most of which are sullen and reserved. One, however, is screaming, kicking, and biting.`
			`	The unruly Skadenga is dragged past you, and spit splashes against your cheek. "I'll kill you, <first>. If ever ve meet again I'll kill you. You've killed me. You've killed me." Hjlod's red and tear-stained face recedes as officers drag her away.`
			`	"Misguided girl," Carla says sadly. "We'll take it from here. Have a wonderful day, Captain <last>."`
				decline
			label takeoff
			`	You punch it, and your ship burns for the stars. Hjlod visibly relaxes when the thrust kicks in. She closes her tired eyes and slumps to the floor. "Thank Skade," is all she says.`
				launch
	on complete
		payment 12481
		event "the book" 200
		event "nifel hjlod" 2700
		conversation
			scene "scene/snowvillage"
			`Your ship touches down just outside the abandoned village of Udainskar. Silently, your passengers disembark and drift into the world they once knew and thought never to see again. The village appears to have weathered its abandonment well, and it appears the people here will not have too much trouble picking up where they left off.`
			`	Hjlod lingers besides your ship for just a moment. "The credits are in hard-drive on your ship's console. I hope it makes you happy.`
			`	"I do not know vhy you sent us to that place. But I am happy to be home. So go, and maybe one day I vill not hate to see you again."`



event "nifel hjlod"



event "the book"



mission "Skadenga Call 3"
	landing
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	to offer
		has "Skadenga Call 2: declined"
	on offer
		payment 300000
		event "asgard hjlod" 2000
		conversation
			`You receive a message from your bank that <payment> have been deposited into your account from the Census and Culture Bureau of The Deep. The following memo is attached:`
			`	"For heroic and selfless service to the ideals and prosperity of The Deep."`
				decline



event "asgard hjlod"



mission "Skadenga Call 4"
	landing
	source "Nifel"
	to offer
		has "event: nifel hjlod"
	on offer
		event "hjlod waits again" 360
		conversation
			`A familiar woman is waiting for you outside your ship. Although it's been more than seven years since you've last seen her, you recognize Hjlod instantly. Her eyes are brighter than when last you parted, and she has the same lopsided grin that you remember. "<first>, I saw your ship landing, and thought I vould say hello."`
			`	You ask her how she has been, and she tells you that the small community of Skadenga have rebuilt and thrived here. That there has even been a small amount of immigration to their tiny town. That word had gotten out about their desperate escape from Asgard.`
			`	She tells you that she forgives your past actions, and hopes you find whatever it is you are looking for among the stars. She even hugs you before she leaves.`
				decline



event "hjlod waits again"



mission "Skadenga Call 5"
	landing
	to offer
		has "event: asgard hjlod"
	on offer
		payment 27
		conversation
			`You receive a message from the Census and Culture Bureau of the Deep. The Deep Citizen known as Hjlod has died. The cause of death appeared to be related to heavy substance abuse. The Bureau has determined that you are her closest relation and has forwarded you her entire inheritance: <payment>.`
			decline


mission "Home for Skadenga 8"
	name "<planet> Mystery Man"
	description "Travel to <destination>, and meet up with Hroar in the spaceport."
	to offer
		has "Nifel"
	source "Valhalla"
	destination "Muspel"
	on offer
		conversation
			`The Transport Union employee is waiting for you near the entrance. He's wearing a wide-brimmed hat, a bulky scarf, a long coat with an up-turned collar, and sunglasses. You worry his over-the-top efforts to look nondescript will only draw more attention.`
			`	"Can't speak long," he says. "It's too dangerous. I can't afford to be seen with you."`
			`	You ask him what this is all about.`
			`	"I don't agree with what the Union or the Deep are doing. I was raised in a small town where we still respected our past, and I couldn't just sit around and do nothing. So listen: with the Union against you, there's no transport company that will pick up your contract, with one exception. There's a bold renegade mineral baron on <planet>. He hates the Union, and may be willing to do what you ask."`
			choice
				`	"How do I find him?"`
			`	The Union employee begins moving away from you. "Name's Hroar. You can usually find him in the Red Rock Saloon, inside the Muspel Spaceport."`
			`	The disgruntled Union employee then says, quite loudly, "I do not know where the bracelet shop is, please stop asking me!" and hurries away from you.`
				accept
	on complete
		dialog
			`You've arrived at the rusty-hued world that is Muspel. You should head into the spaceport to see if you can find Hroar.`



mission "Home for Skadenga 9"
	to offer
		has "Home for Skadenga 8: done"
	source "Muspel"
	on offer
		event "hroar message" 13
		conversation
			`The floor of the spaceport is covered in the dirty red dust of hundreds of shuffling feet. Prospectors, miners, drillers, and all their attendant associates are intermixed here, gossiping about the latest finds, accidents, and hauls. Every person, either saturated in red earth or immaculately clean, creates a visual aid to boundaries of class, paycheck, and leadership.`
			scene "scene/redrocks"
			`	The Red Rock Saloon is located deep in the trade-craft section of the spaceport, far enough from the tourist areas to discourage anyone but the locals and those with business to enter.`
			choice
				`	(Enter the Red Rock Saloon.)`
			`	The doors swing open, revealing a dimly lit room filled with rough unsavory people. Piano music is playing on a cheap speaker, and the eyes of the patrons slide to get a good look at you without turning their heads. There is an expectant pause. You get the feeling they are waiting for you to either announce something or leave.`
			choice
				`	"I'm looking for Hroar."`
			`	For a moment nothing happens, and then a gruff voice spirals out from a dark corner. "Back here."`
			scene "scene/hroar"
			`	You walk to the back of the saloon and find a gruff man in a long reddish-brown jacket seated with his back against the wall, and a bottle of whiskey on his otherwise empty table. "Have a seat," he says.`
			`	After you sit, he places a gun on the table. "So the Allen boys think they can send some greenhorn killer to take me out?" Hroar barks a laugh. "Not likely." With his free hand, he takes a swig of his whiskey. "Here's what's going to happen. I am not going to kill you. Only maim you, a bit. And you tell the Allen boys that the next person they send will come back even worse. We had a deal, and I expect them to keep it."`
			choice
				`	"You got the wrong person. I don't even know who the Allen boys are."`
					goto prenext
				`	"I was not sent by the Allen whoevers, and if you even touch me, I will burn this entire planet to ash."`
			branch buffboi
				"combat rating" > 8104
			`	Hroar breaks into uproarious laughter. People sitting the booth over, who were obviously listening, also start laughing. "Don't make threats you can't back up. Or you're gonna be a messenger in a bodybag.`
			label prenext
			`	"If it wasn't the Allen boys who sent you, who do you work for? The Leshinskis? Mad Mikkel's Gang? Or maybe the Hanovarian?" Hroar pauses. "Nah, not his style. So who?"`
				goto next
			label buffboi
			`	Hesitation flickers on Hroar's face, and he lifts his hand away from his gun. "No need to be making threats like that. We're all friends here."`
			`	His expression shifts as he changes the subject. "I doubt the Allen boys could afford someone like you, so why exactly are you here?"`
			label next
			choice
				`	(Explain the situation.)`
			`	After you finish your explanation, Hroar frowns. "This is some kind of pickle you've gotten yourself into. And humanitarian or not, I ain't a man who is known for working for free. But what you heard is correct: if you need people moved and the Union won't do it, I'm your best bet in the Deep.`
			`	"It would be something to give the Union a black eye like this. And I would generate some good will - I could probably even recoup most the costs in tax-write offs and government grants. But still..." He drifts off, then looks at you hard for a moment. "Tell you what. I'll do it, for free, if you promise to owe me a favor in the future. A favor for a favor. What'dya say?"`
			choice
				`	"Deal."`
					goto deal
				`	"What kind of favor?"`
				`	"No deal."`
					goto lastchance
			`	"Oh, I don't know. Something always needs doin' around here. I went from rags to riches, you know, and a journey like that leaves lots of disgruntled folk in your wake. Plus business at times requires a certain sort of captain. Whatever it will be, I'll have you know I run a legitimate - well, mostly legitimate - organization, and you won't be asked to do anything too illegal."`
			`	He grins. "So, what do you say? Deal?"`
			choice
				`	"Deal."`
					goto deal
				`	"No deal."`
			label lastchance
			`	Hroar leans back. "Friend, listen up. If the Union won't do it, and I won't do it, then no one will. You'll either have to get those 2,200 bunks yourself, or it just ain't happenin'. I promise I won't ask anything of you too illegal. So, you sure you want to say no?"`
			choice
				`	"I'm in. Deal."`
					goto deal
				`	"I'm out. No deal."`
			action
				set "refusedhroar"
			`	Hroar smirks. "Alright. You're out. Get outta my booth, and good luck on your little charity adventure." Hroar goes back to drinking his whiskey as the saloon's swinging door hits you on your way out.`
				decline
			label deal
			action
				set "dealwithhroar"
			`	"Good. Good. People making deals. That's what society is all about, ya know? Alright, listen up: it'll take me about two weeks to get my fleet ready to transport your friends. Will take a good handful of trips too, but you only need to guide us for the first one. So, come back here then and we'll get this show on the road."`
				decline



event "hroar message"



mission "Home for Skadenga 10"
	landing
	name "Head Back to <planet>"
	to offer
		has "event: hroar message"
		has "dealwithhroar"
	description "Head back to <destination>, and meet up with Hroar's fleet."
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not planet "Muspel"
	destination "Muspel"
	on offer
		conversation
			`Your inbox blinks with a new message from Hroar on <planet>.`
			`	"Everything is ready. Get back here.`
			`				-Hroar`
			`			CEO of Hardy Hroar's Haulers`
			`			'We're an unstoppable force that has never met an immovable object!'"`
				accept



mission "Home for Skadenga 11"
	name "Evacuate Nifel"
	description "Escort Hroar's fleet to <destination> to pick up the Skadenga."
	source "Muspel"
	destination "Nifel"
	to offer
		has "Home for Skadenga 10: done"
	on offer
		conversation
			`The <origin> spaceport is filled with crews doing final checks on their various haulers. You find Hroar near a cluster of captains.`
			`	"<first>!" Hroar calls out as you near. "Glad you got here in time! Word is the Union boys are furious about this. Undermines their authority and what not; it's great." He claps you on your back. "My captains are ready. How about we get this rodeo started?"`
			choice
				`	"Yee-haw!"`
				`	"It's about time."`
			`	Launch sirens blare as the crews all load up in their ships and the fleet takes off!`
				launch
	npc accompany save
		government "Merchant"
		personality timid escort
		ship "Behemoth" "H.H.H. Hroar's Howl"
		ship "Hauler" "H.H.H. Red Dawn"
		ship "Hauler" "H.H.H. Crimson Carrier"
		ship "Hauler III" "H.H.H. Unstoppable Force"
		ship "Hauler II" "H.H.H. Fixed Income"
		ship "Mule" "H.H.H. Breadbasket"
		ship "Star Queen" "H.H.H. Land of Plenty"
		ship "Star Barge" "H.H.H. Bandwagon"
		ship "Bounder" "H.H.H. Rustborn"
	on visit
		dialog
			`You have reached <planet>, but the Hardy Hroar's Hauler ships have not all arrived yet. You should take off and wait for them to catch up with you.`



conversation "land at windblain"
	scene "scene/seasidecliffs"
	`The reserved and limited government of Windblain pays neither you nor your fleet any heed as you make your way down to the outskirts of Hrithfjall. An empty, windswept landscape beneath gray clouds and a small group of weathered fishermen are waiting for you outside your ship.`
	`	"I thought I'd be seeing you again," Aldfrith says at the front of his small delegation. "I dreamt that ice rained down upon the seas, and that Ran was glad of it." The creases in his face bunch up as he smiles at the memory, and then his eyes wander to the disembarking Skadenga. A moment later, the Ondurdis joins you.`
	`	"So, you are the ice that falls from the stars?" asks Aldfrith with a hint of mirth in his eyes.`
	`	"We are Skadenga, daughters of Skade. Mistresses of ice, mountain, and cold. But, I think now, she sends us to her sister Ran." The Ondurdis replies.`
	`	Aldfrith nods slowly. "We are the folk of Ran; the offspring of the surf, the students of the wind, and the watchers of the storm. We welcome you and your people here. Though there are few here at present, many more of our number can be found out amongst the surging seas." He glances at the growing number of Skadenga. "If you follow me, I will escort you to our village and show you what buildings you may use. Though I fear we can not house so many."`
	`	The Ondurdis smiles. "We thank you for your hospitality. It is good to find others who remember the old ways. Fear not, though; we are resourceful lot." Turning to you, she continues, "Meet me near the ships at makeshift spaceport in a few hours. I have much to do at moment." She and many others then follow Aldfrith and his group to the halls of Hrithfjall.`
	branch self
		has "refusedhroar"
	`	As you watch them leave, you hear the sound of Hroar's fleet taking off and heading back to Nifel to pick up the rest of the Skadenga.`
	label self
		decline



mission "Home for Skadenga 12"
	landing
	name "Evacuate <origin>"
	description `Escort Hroar's fleet carrying the Skadenga to <destination>.`
	source "Nifel"
	destination "Windblain"
	to offer
		has "Home for Skadenga 11: done"
	on offer
		conversation
			`The fleet touches down just outside the crowded village of Udainsakr. The landscape is filled with the gathered Skadenga.`
			`	The Ondurdis approaches you. "Leaving is difficult, but all winters must come to end." She watches as her people climb aboard the fleet. "I will be taking first trip to Windblain, but I must rejoin my folk. Thank you for this, and we shall speak again at our new home."`
			`	She leaves you with a warm smile in the wintry village.`
				accept
	npc accompany save
		government "Merchant"
		personality timid escort
		ship "Behemoth" "H.H.H. Hroar's Howl"
		ship "Hauler" "H.H.H. Red Dawn"
		ship "Hauler" "H.H.H. Crimson Carrier"
		ship "Hauler III" "H.H.H. Unstoppable Force"
		ship "Hauler II" "H.H.H. Fixed Income"
		ship "Mule" "H.H.H. Breadbasket"
		ship "Star Queen" "H.H.H. Land of Plenty"
		ship "Star Barge" "H.H.H. Bandwagon"
		ship "Bounder" "H.H.H. Rustborn"
	on visit
		dialog
			`You have reached <planet>, but the Hardy Hroar's Hauler ships have not all arrived yet. You should take off and wait for them to catch up with you.`
	on complete
		event "skadenga life" 367
		conversation "land at windblain"



mission "Home for Skadenga Captain"
	landing
	name "Evacuate <origin>"
	description `Escort your fleet carrying the Skadenga, to <destination>.`
	passengers 2200
	source "Nifel"
	destination "Windblain"
	to offer
		has "refusedhroar"
	on offer
		conversation
			`Your fleet touches down just outside of the crowded village of Udainsakr. The landscape is filled with the gathered Skadenga.`
			`	The Ondurdis approaches you. "Leaving is difficult, but all winters must come to end." She looks curiously at your fleet. "This I did not expect. These are not Transport Union. These are yours? You brought your own fleet to help us?"`
			`	You smile and shrug, letting her know that sometimes you just have to do things yourself. She shakes her head. "You are full of surprises, <first>. Perhaps I'll surprise you someday as well."`
			`	Her eyes wander to her people who are busy embarking. "I must rejoin my folk. But thank you for this, and we shall speak again at our new home." The Ondurdis leaves you with a warm smile in the wintry village.`
				accept
	on visit
		dialog
			`You have reached <planet>, but your ships have not all arrived yet. You should take off and wait for them to catch up with you.`
		
	on complete
		event "skadenga life" 367
		conversation "land at windblain"



event "skadenga life"



mission "Home for Skadenga 13"
	source "Windblain"
	to offer
		or
			has "Home for Skadenga 12: done"
			has "Home for Skadenga Captain: done"
	on offer
		outfit "Tear of Skade"
		event "the book" 200
		conversation
			`The Ondurdis bows to you when you arrive. "You have chosen good home for us."`
			scene "outfit/skadetear"
			`	She has a small, wooden box with inlaid runes that looks very similar to the one you saw at Midgard. She opens the box to reveal a blue glowing stone with a single rune inscribed on it. "We call these Tears of Skade. We found few of them buried around Goddess-Stone of Nifel. They are always cold, and may be useful in warm ship." She hands you the box.`
			choice
				`	"You honor me. Thank you."`
					goto honor
				`	"A glowing stone? After all I did? Where's the money?"`
			`	The Ondurdis shakes her head sadly. "I have given you something more valuable than any amount of money. Yet, you spurn it. There is value here, in this happy community, in our story, that is worth more than credits. Take this sacred stone, for you have earned it, and in time I hope you learn what I have failed to teach."`
			`	She leaves you to her happy community and new home, with the strange stone and a lonely silence of your own making.`
				decline
			label honor
			`	"No, it is you who honor us. We will not forget this. Now, I told you when we met I would answer question. What would you like to know?"`
			choice
				`	"How old are you?"`
				`	"Who were the elves?"`
					goto elves
				`	"Why were the Skadenga making amends?"`
					goto amends
				`	"No. I am done here."`
					goto done
			`	The Ondurdis' eyes sparkle mischievously. "Too old. Suffice to say, my name is Eymani, and I was Pathfinder who discovered cure to Rigellian plague. As to how I am so old, or all that I have seen: I cannot say more, for it is not my story to tell."`
				goto done
			label elves
			`	"Elves is broad term. Many creatures over long ages have been called elves. But, here, in Deep, I believe there are two kinds. First, there are alfar, known by many. They were ones who transported us here from Earth. I do not know why they did this, but I do know that it was not out of kindness. They are devious, and they are opaque."`
			`	The Ondurdis lowers her voice and leans in. "But there is another kind of elf here. The Hudulfolk, the Hidden. They served makers of God-Stones. They are rare, and mostly dormant. I do not think even alfar are aware of them. They cannot be trusted, for no alien can be, but are not devious. Each Hidden is different, but all are connected to natural world. When Skadenga were new upon Nifel, we had some small dealing with them before they returned to sleep of eons."`
				goto done
			label amends
			`	The Ondurdis nods slowly. "On Earth, before alfar, or elves, came to us, we had forsaken Skade. Men of Book had persuaded us to abandon old ways and embrace their new religion. We deserted our temples, forsook our trees, and thought ourselves the better for it."`
			`	Her old face scrunches up in anger at the memory. "When we were brought to Deep, when we saw Goddess-Stone, we realized our folly. We would atone, and we would be strong." She looks up at you, her eyes bright and her face firm. "And strong we have been."`
			label done
			`	"That is enough whispering of old secrets." She straightens up and smooths her dress. "I have much to do, and I imagine so do you. Take care, <first>. May Skade protect you." The leader of the Skadenga returns to her people on the windswept hills of the small, picturesque town of Hrithfjall.`
			scene "scene/sunset"
			`	With the conversation concluded, you wander back toward your ship as the sun sets. You hear the hustle and bustle all around you of eager people pursuing a new and exciting life. The promise of a new beginning is almost as intoxicating as the faint hint of sea-salt on the cool breeze that ruffles your clothes.`
			`	You wonder if you're forgetting anything - if you should find Hjlod and speak with her. But she is nowhere in sight, and you realize there will be time to see her again. You climb aboard your ship and leave these people to their new home, and you wonder: in all the bright stars and warm worlds, where might your home be?`
				decline



mission "Homecoming to Skadenga"
	description "Take the mourning Skadenga to <destination>, so that they can enact the rites of their dead. Payment is <payment>."
	source "Windblain"
	destination "Nifel"
	passengers 5
	to offer
		has "Home for Skadenga 13: offered"
		has "event: skadenga life"
	on offer
		conversation
			scene "scene/Seasunset"
			`The familiar sight of <origin> brings up old memories. It's been more than a year since you helped the Skadenga settle <origin>, and you wonder if you should check in on them.`
			choice
				`	(Visit Hrithfjall.)`
				`	(Don't visit Hrithfjall.)`
					decline
			`	It's a short journey to the outskirts of Hrithfjall. You are evidently spotted from afar, as someone is waiting for you.`
			`	Hjlod's lopsided smile is warm and refreshing. "<first>!" She says with genuine joy. "You did not say goodbye! How can I forgive?" You hug her. You walk together along the shore toward Hrithfjall. She tells you all about the growing village - how the Skadenga are thriving here, and how they've gotten along with the Ran-Folk.`
			`	She points to a small wooden craft up ahead. "I built her." She says with pride. "No more Ice-Crawler for Hjlod. I am sailor now. I take curious tourist out now and again. Much safer than Ice-Crawler, except when we capsize." She shrugs and grins. "Perhaps someday you'll be my tourist again. This time, I promise no accidents. Also, there are no Ice-Slugs to worry about." She pauses for a moment. "There are Shark-Kraken though. But don't worry. Hjlod will take care of you."`
			`	You spend the afternoon in Hrithfjall, where you are treated like a guest of honor. The Ondurdis seems younger than you remember, and also appears quite fond of old Aldfrith. You eat strange fish, listen to unlikely stories, and laugh at outrageous jokes.`
			`	As the sun sinks in the sky, you announce that you should be heading back. "Wait," the Ondurdis says. "I have task for you. If you are interested."`
			choice
				`	"What is it?"`
					goto task
				`	"Sure; I'd do anything for you guys."`
					goto task
				`	"Hard pass."`
			`	You explain you've already done enough for them and are needed elsewhere. They graciously accept your excuses, and you leave back to your ship.`
				decline
			label task
			`	The Ondurdis smiles. "I knew you would accept.`
			`	"We have folk here who have died over last year. Mostly old, a few in accidents, nothing out of ordinary. But each Skadenga carries with them life-stone, upon which they carve their memories. When Skadenga dies, these stones must be returned to their Family-Cairns by their nearest relative or closest friend. But, all our Family-Cairns are on <planet>."`
			`	She then nods at you. "If you could transport family members of deceased to return their stones, it would mean much to everyone here. We would pay you <payment>."`
			choice
				`	"Of course."`
					goto yes
				`	"I'll do it for free."`
					goto yesyes
				`	"No thanks."`
			`	You explain to them you have more pressing matters to attend to and cannot be a taxi service for their grieving. They graciously accept your excuses, and you leave back to your ship.`
				decline
			label yesyes
			`	The Ondurdis shakes her head. "You have already done too much for us for too little pay. We can afford to pay you, and we will."`
			label yes
			`	"The five Stone-Bearers will accompany you back to your ship. They will pay you <payment> for transport to <planet>. May Skade and Ran watch over your journey." The Ondurdis turns this into a toast, which everyone gladly participates in.`
			`	Hjlod walks with you and your passengers back to your ship. "Be well, <first>."`
				accept
	on complete
		payment 50000
		event "hjlod waits" 360
		conversation
			`The abandoned village of Udainsakr is cold, dark, and half-buried in unrelenting snow. Everything feels colder than you remember, and you wonder how long before this planet is a perpetual snowball.`
			`	The five Skadenga you brought are polite and circumspect. Upon landing, they hand you <payment>, leave your ship and head for the Goddess-Stone of Skade with its attendant piles of stones. They each navigate their way to a specific cairn, stand there for a moment, speaking or chanting, and then place their stone upon it. Solemnly, they return to you with their task complete. There is nothing else for them to do here, and they request you take them home.`



mission "Stones of Skadenga 1"
	landing
	name "Stones of Skadenga"
	source "Nifel"
	passengers 5
	destination "Windblain"
	description "Return the Skadenga mourners to <destination>."
	to offer
		has "Homecoming to Skadenga: done"
	on complete
		event "skadenga mourners" 90
		dialog
			`The Skadenga are gladdened to be home. Something about being on <planet> lifts their spirits, and they thank you for your help.`



event "skadenga mourners"



event "hjlod waits"



mission "Stones of Skadenga 2"
	landing
	name "Stones of Skadenga"
	description "Take the mourning Skadenga to <stopovers>, so that they can enact the rites of their dead, then return them to <planet>. Payment is <payment>."
	source "Windblain"
	stopover "Nifel"
	passengers 8
	to offer
		has "event: skadenga mourners"
		has "Stones of Skadenga 1: done"
	on offer
		dialog
			`A group of eight Skadenga approach you. They ask if you'd be willing to take them to <destination> so that they can return their loved-one's stones to their Family-Cairns, offering <payment> for their transportation.`
	on stopover
		dialog
			`The eight Skadenga solmenly make their way off your ship and into the icy lands of Nifel. After a few hours they return, cold, and eager to return home to Windblaine.`
	on complete
		dialog
			`The Skadenga are happy to be home. The churning seas of <planet> lift their spirits, and they head out into the sea-sweet air after paying you <payment>.`
		payment 80000





mission "Stones of Skadenga 3"
	source "Windblain"
	to offer
		has "Stones of Skadenga 2: done"
	on offer
		conversation
			`You're surprised to see the Ondurdis walking toward you.`
			`	She nods politely before speaking. "<first>, I just wanted to thank you for ferrying our Stone-Bearers to <planet> and back. I have added this task to the job board so you can more easily assist in the future. I've also let them know they need enough money to pay for a return trip." The Ondurdis touches your shoulder, and then walks away.`
				decline



mission "Stone-Bearers to Nifel"
	description "Take the mourning Skadenga to <stopovers>, so that they can enact the rites of their dead, then return them to <planet>. Payment is <payment>."
	source "Windblain"
	stopover "Nifel"
	passengers 1 10 .7
	job
	repeat
	to offer
		has "Stones of Skadenga 3: offered"
		random < 30
	on visit
		dialog phrase "generic missing stopover or passengers"
	on stopover
		dialog
			`The mourners take their small stones and head off to visit the cairns of their ancestors. After some time they return to your ship, happy to see the frozen-wastes of Nifel left behind.`
	on complete
		payment
		dialog
			`The Skadenga hand you <payment> as they disembark and return to their lives on Windblain.`



mission "Hjlod Remembers Windblain"
	landing
	name "Hjlod Remembers"
	description `Hjlod wishes to meet with you again on <planet>.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not planet "Windblain"
	destination "Windblain"
	to offer
		has "event: hjlod waits"
		has "Hjlodsaved"
	on offer
		dialog
			`Your inbox hums with a new message from <planet>:`
			`	"Dear <first>,`
			`	I never properly thanked you for saving my life on Nifel all those years ago. If you're ever in the neighborhood, please stop by <planet>.`
			`				Signed, Hjlod"`
	on complete
		outfit "Tear of Skade"
		conversation
			`Hjlod is waiting for you when you land. She looks healthy, strong, and happy - less gaunt and stressed then you recall her looking on Nifel when you first met. She gives you a hug. "Alvays good to see you, <first>. I have been thinking, vith all that vent on and needed to be done, I never had chance to thank you for saving me from cold."`
			`	She reaches into her pocket and pulls out a small pouch. "I have stone that has long been in my family. I wish to give it to you. Keep you cold in hot ship, remind you of Hjlod in far-off galaxy."`
			scene "outfit/skadetear"
			`	Hjlod gives you a glowing blue Tear of Skade, just like the one The Ondurdis gave you sometime before.`
			`	"How many of these are there?" you ask.`
			`	"Only few," she answers. "They were found around the Goddess-Stone in the early days. Passed from Skadenga mother to Skadenga daughter. I have no daughter, but I have you, so this is now yours."`
			`	You thank her and spend the rest of the day with her, talking, laughing and walking upon the friendly earth of <planet>.`



mission "Hjlod Remembers Nifel"
	landing
	name "Hjlod Remembers"
	description `Hjlod wishes to meet with you again on <planet>.`
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
		not planet "Nifel"
	destination "Nifel"
	to offer
		has "event: hjlod waits again"
		has "Hjlodsaved"
	on offer
		dialog
			`Your inbox hums with a new message from Nifel.`
			`	"Dear <first>,`
			`	I never properly thanked you for saving my life all those years ago. If you're ever in the neighborhood, please stop by <planet>.`
			`				Signed, Hjlod"`
			
	on complete
		outfit "Tear of Skade"
		conversation
			`Nifel is colder than you remember. The snow is deeper, and the ice harder. Despite this, the small recolonized settlement of Udainsakr appears to be thriving. Although it started with less than 50 Skadenga, thanks to the steady flow of pilgrims, the village population now numbers over a thousand.`
			`	Hjlod finds you and gives you a small smile. "I am glad you came."`
			`	She reaches into her pocket and pulls out a small wooden box, similar to the one you saw displayed at Asgard years ago. "I have been thinking," Hjlod says. "Maybe all this vas vill of Skade. Maybe you took us to Asgard to make us stronger, to make us better. It is bitter lesson, but I understand it now."`
			`	She holds out the box. "This is Tear of Skade. Only few ever found, and this I give to you. For saving my life, for bringing us back here, for making us stronger."`
			scene "outfit/skadetear"
			`	The box opens, displaying a small, blue glowing rock. "Alvays makes cold. Alvays. Useful on hot ship. Keep this vith you, and know Skadenga vith you too," Hjlod says, handing it to you.`
			`	Her eyes water, and she wipes them. "Your story is forever chiseled on our stones."`
			`	She turns and leaves you there, holding a Tear of Skade, and shivering in Nifel's unforgiving cold.`



mission "The Book of Skadenga"
	minor
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral" "Independent"
	to offer
		random < 10
		or
			has "event: the book"
	on offer
		conversation
			`As you wander through the spaceport, something catches your eye at a kiosk selling gifts, trinkets, and other odds and ends.`
			`	There's an old-style book there, bound up in an ice-blue cover, titled: "The Skadenga Saga: Against All Odds, by Hjlod Hrimnirsdottir."`
			choice
				`	(Ignore the book and move on.)`
					goto ignore
				`	(Pick the book up.)`
			branch windblain
				has "Home for Skadenga 13: offered"
			`	The book feels solid in your hands, and you scan through it. There are chapters about near death survival on Nifel, the subtle hostility of Asgard, the sudden death of the old Ondurdis, who you learn was named Eymani, and the triumph of Hjlod and the survivors on Nifel.`
				goto end
			label windblain
			branch captain
				has "Home for Skadenga Captain: done"
			`	The book feels solid in your hands, and you scan through it. There are chapters about near death survival on Nifel, corrupt Deep officials, the colorful haulers on Muspel, and the ultimate triumph on Windblain.`
				goto end
			label captain
			`	The book feels solid in your hands, and you scan through it. There are chapters about near death survival on Nifel, corrupt Deep officials, and the ultimate triumph on Windblain.`
			label end
			`	You place the book back on its stand as the attendant notices you. "It's pretty popular, that one. I hear it started this whole 'back-to-nature' primalism cult." He shrugs. "Whatever sells, ya know. Anyways, you buying?"`
			`	You decline. You already know that story.`
				decline
			label ignore
			`	You keep walking. You already know that story.`
				decline
