# Copyright (c) 2016 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.

mission "Wanderers: Surveying 1"
	landing
	name "Wanderer Surveying"
	description "The Wanderers asked you to survey several of the nearby planets in Korath space, and to bring the data back to them on <planet> when you are done."
	autosave
	source "Spera Anatrusk"
	stopover "Desi Seledrak"
	stopover "Sabira Eseskrai"
	stopover "Seleptra Nak"
	stopover "Elek Kartanu"
	stopover "Sek Alarfarat"
	stopover "Solima Skarati"
	stopover "Kasichara Fet"
	to offer
		has "event: wanderers: spera anatrusk colony"
	cargo "scientific equipment" 7
	blocked "The Wanderers have another mission for you, but you will need <capacity> for their scientific equipment."
	on offer
		log `The "Eye" wormhole has opened in Wanderer space, but the territory on the other side of the wormhole is Korath space, ravaged by their civil war and still infested with autonomous war machines. Nonetheless, the Wanderers are excited to once again begin their work of healing and repairing damaged worlds.`
		log "People" "Sobari Tele'ek" `Tele'ek became part of the expeditionary force that was formed to explore the territory beyond the Eye once it opened.`
		conversation
			`The Wanderers have begun building a base here, with freighters landing every few minutes to bring more supplies or people. They have a fair number of weapons and warships to keep the Korath automata at bay, but the majority of the supplies look like scientific tools or possibly equipment for terraforming planets.`
			`	Soon after you land, you are ushered in to a meeting with several of the senior Wanderer leaders. You recognize the military commander Sobari Tele'ek, but the others are strangers to you. And oddly, in addition to the adults there is a Wanderer child in the meeting, barely more than a meter tall, with iridescent black plumage like a starling.`
			`	When she sees you the child says, "Greetings, Captain." Surprisingly, she speaks in your own language. It's heartening that the Wanderers are teaching your language to their children; perhaps in a few years you'll no longer need the translation device to talk with them.`
			`	Tele'ek asks you, "Have you explored this new [territory, responsibility] that the Eye has brought us to?"`
			choice
				`	"Yes, it looks like the worlds here are in great need of your care."`
					goto care
				`	"I've run into hostile robotic drones here. You may have been safer back where you came from."`
					goto drones
				`	"No, I have not had time to explore yet."`
					goto next
			
			label care
			`	"Indeed," says one of the other Wanderers. "It is very [exciting, stimulating]."`
				goto next
			
			label drones
			`	"Perhaps," says Tele'ek, "but we have not yet found a way to [communicate, reason] with them. Perhaps their attacks on us are merely a misunderstanding."`
				goto next
			
			label next
			`	A different Wanderer speaks up and says, "This new territory is full of [promise, possibility], but we are few in number still and have not dared to [explore, survey] too widely. Human, you have [special, exotic] means of travel and can perhaps explore more [safely? circumspectly?] than we can. Will you visit some worlds for us and help us to [measure, discern] what must be done to heal them?"`
			choice
				`	"Sure, I'd be glad to."`
					goto end
				`	"Are you sure you aren't in danger here from the Korath drones?"`
			
			`	"Don't worry," says Tele'ek. "[Resisting, fighting] the Unfettered Hai forced us to develop stronger warships. We are well [equipped, prepared] for this new threat."`
			
			label end
			`	The Wanderers load a large amount of scientific equipment onto your ship and explain how to use it. They also indicate several planets that their long-range sensors have detected that they would like you to investigate further.`
				accept
	on visit
		dialog phrase "generic stopover on visit"



mission "Wanderers: Surveying 2"
	landing
	name "Wanderer Surveying"
	description "The Wanderers have asked you to survey some more worlds, which are deep in the territory of the Kor Mereti drones, and to bring the measurements back to them on <planet>."
	autosave
	source "Spera Anatrusk"
	stopover "Esayaku Fen"
	stopover "Aresepru Nat"
	stopover "Korbatri Eska"
	stopover "Fek Rembatu"
	to offer
		has "Wanderers: Surveying 1: done"
	cargo "scientific equipment" 7
	blocked "The Wanderers have another mission for you, but you will need <capacity> for their scientific equipment."
	on offer
		log "People" "Tema'a Iriket" `Iriket is a Wanderer specializing in terraforming, who has been selected to survey the worlds beyond the Eye and to make plans for how each one can be made to flourish once more. She is far more interested in the terraforming work than in dealing with the threat of the Korath war machines.`
		conversation
			`When you land, a Wanderer named Tema'a Iriket meets you, and identifies herself as the head of the terraforming team. She is excited to see your data on the nearby planets. "For each of these worlds," she says, "we must decide what [treatment, strategy] will best enable it to flourish once more. Even if a world is near to the [territory, domain] of the [dangerous, hostile] robots, we may be able to begin its [healing, transformation] from a distance."`
			choice
				`	"I'm surprised your species is so eager to start terraforming. I'd think the threat of the Korath automata would be your first priority."`
					goto drones
				`	"Is there any way I can help with the terraforming efforts?"`
					goto volunteer
			
			label drones
			`	She says, "[Healing, renewing] worlds is something we love doing. Fighting is not something we love. So unless the robots become more [aggressive, threatening] we prefer not to seek out conflict. And in the meantime, it would be [intriguing, exciting] to make measurements on the planets they control. Could you do that for us?"`
				goto next
			
			label volunteer
			`	"I am [pleased, delighted] that you asked," she says. "What we would find most [useful, interesting] right now would be [climate? ecosystem?] measurements from the planets orbiting these stars." On a local star map, she points out several star systems.`
			`	"Those are deep in Kor Mereti territory," you tell her.`
			`	"Yes," she says, "which is why I am [hoping, presuming] to ask you to make the measurements."`
			
			label next
			choice
				`	"Sure, I would be glad to do that."`
				`	"That sounds awfully dangerous."`
					goto danger

			`	"Excellent," she says. "I will collect the data from you when you are done."`
				goto leaders

			label danger
			`	"I have complete [trust, faith] in your abilities," she says, and then she walks away before you can protest further.`
			
			label leaders
			`	When you report to the Wanderer leaders, they have several other requests for you. A cosmologist named Erukt Isi'ithi is interested in scanner data on three supernova remnants near Korath space. And Sobari Tele'ek wants you to collect more data on the automata. "If we knew how they function," he says, "we might be able to [make peace with, befriend] them. Perhaps you could [board, salvage] a disabled drone of each [faction?] and bring us whichever [parts, components] control its [decision-making, intelligence]."`
			choice
				`	"Sure, I would be glad to do that."`
					goto end
				`	"The drones are powerful. I'm not sure I can disable one."`
			
			`	"They seem to do a good job of disabling each other when they meet," he says. "Or you could [upgrade to, purchase] one of our [necessary? lamentable?] warships."`
			label end
			`	You leave the meeting with a long list of tasks to perform for the Wanderers. You hope they appreciate all the assistance you are giving them.`
				accept
	
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		conversation
			`You present your planetary measurements to Tema'a Iriket, the terraforming director. She is very excited about the data. "So many worlds," she says, "each with their own [personality? idiosyncrasies?]. We will learn more about each one, and discover how we can [partner, collaborate] with them to help them [recover, be reborn]."`
			`	She tells you that for now, they do not need any more scanning data, but she will let you know if new needs arise in the future.`



mission "Wanderers: Nova Remnants"
	landing
	name "Nova Remnants"
	description "A Wanderer cosmologist named Erukt Isi'ithi asked you to visit several nearby stars that seem to be supernova remnants, and to make measurements on them."
	source "Spera Anatrusk"
	waypoint "Peresedersi"
	on enter "Peresedersi"
		dialog
			"You fire up your ship's sensors and collect the data that the Wanderers asked for on this system's sun."
	waypoint "Kasikfar"
	on enter "Kasikfar"
		dialog
			"You fire up your ship's sensors and collect the data that the Wanderers asked for on this system's sun."
	waypoint "Fasitopfar"
	on enter "Fasitopfar"
		dialog
			"You fire up your ship's sensors and collect the data that the Wanderers asked for on this system's sun."
	to offer
		has "Wanderers: Surveying 1: done"
	on visit
		dialog phrase "generic waypoint on visit"
	on complete
		log "Factions" "Archons" `Archons are partly biological, partly technological, and partly something that human language has no words for. They are extremely powerful. The Archons are somehow affiliated with the Drak, yet separate from them.`
		conversation
			`You contact the cosmologist Erukt Isi'ithi and give him a copy of your ship's scans of the supernova remnants. To you, the scanner results are inscrutable, but clearly to him they tell a story, and not one he is happy with: his body shakes violently and the pupils of his eyes shrink to pinpoints as he looks at the data.`
			`	"These stars died an [untimely, unnatural] death," he says. "I wonder what the role of these Archon [beings, entities] was. Is the [destabilization, destruction] of these stars a crime the Korath committed, for which the Archons punished them? Or did the Korath commit some other crime, and the Archons [ripped, tore] these stars apart as punishment?"`
			choice
				`	"Which do you think is more likely?"`
				`	"Has your species encountered the Archons before?"`
			
			`	He says, "One of the Archons [visited, appeared at] this world when we first settled here. It promised terrible [retribution, punishment] if we harmed either [faction? remnant?] of Korath survivors, and warned us of the [hostile, uncontrolled] robot drones. I have no doubt that they could [destroy, rend open] a star; they are beings [not entirely contained within this universe? extending into hidden dimensions?]. But the Archon who [spoke, communicated, interacted] with us did not seem [malicious, violent]."`
			choice
				`	"So, the Archons are living creatures? Not some sort of ship?"`
				`	"The Quarg say that the Drak are interested in keeping peace in the galaxy."`
					goto quarg
			
			`	He says, "They are partly [living, biological], partly [constructed, technological], and partly..." Whatever the third part is, the words for it are so far removed from human language that your translation device doesn't even attempt a guess at how to express them.`
			`	You tell him, "The Quarg are a peaceful species, and they say the Drak are peacemakers as well. So perhaps we should not be too worried about their intentions."`

			label quarg
			`	He says, "Even if that is so, [enforcing, maintaining] peace must sometimes require the use of [force, violence]. Also, have the Quarg [explained, revealed] to you who the Drak are? Are the Archons the Drak? Or were they [constructed? created? birthed?] by the Drak? The Archons do not appear to be a [naturally evolved species?]."`
			`	He sits silently for a minute, then says, "The Archon that spoke with us said, 'I am an Archon.' It did not say, 'I am a Drak.' Have you ever [spoken, communed] with an Archon? Did it [call, name] itself a Drak?"`
			choice
				`	"I don't think so."`
				`	"I think it did."`
				`	"I don't remember."`

			`	"Interesting," he says. He promises to share any further information he obtains with you, and you thank him for his time.`



mission "Wanderers: Mereti Controller"
	landing
	name "Kor Mereti Controller"
	description "Board one of the Kor Mereti drones, find whatever component is controlling its actions, and bring that component back to the Wanderers on <planet>."
	source "Spera Anatrusk"
	to offer
		has "Wanderers: Surveying 1: done"
	on visit
		dialog `You have returned to <planet>, but you don't yet have a the component that is controlling the Kor Mereti drones. Depart and attempt to board one of the drones to plunder one.`
	on complete
		log `Discovered that the "Kor Mereti" drone ships are controlled by some sort of collective and decentralized artificial intelligence, with no obvious weaknesses.`
		outfit "Reasoning Node" -1
		conversation
			scene "outfit/reasoning node"
			`You hand off the Reasoning Node that you recovered from a Kor Mereti drone to a team of Wanderer scientists. A few hours later they report back to you. "This is a very [robust, redundant] design," says the lead scientist. "Each of these nodes has enough [processing power? intelligence?] to control one of the drones, but they are also [linked, interconnected] via a hyperspace network. So, all the drones [communicate, confer] with each other and are capable of making [strategic decisions?] as a collective."`
			choice
				`	"So no one is commanding the drones?"`
				`	"But without their communications network, they would lose much of their intelligence?"`
					goto network
			`	"It appears not," he says. "Given the number of drones and the [complexity, sophistication] of their [computing equipment?], the collective is as intelligent as any [artificial mind?] that my own species has ever constructed."`
				goto end
			label network
			`	"Yes," he says, "but the network is very [redundant? decentralized?]. It could quickly adapt to any but the most [severe, catastrophic] interruption. It is a [beautiful? elegant?] design, similar to a [living system?]."`
			label end
			`	He tells you that the scientists will continue to examine the Reasoning Node and see if they can identify any weaknesses to exploit, but he does not sound hopeful. Which is too bad, because the Kor Mereti are a much more immediate threat to the Wanderers than the Kor Sestor.`



mission "Wanderers: Sestor Controller"
	landing
	name "Kor Sestor Controller"
	description "Board one of the Kor Sestor drones, find whatever component is controlling its actions, and bring that component back to the Wanderers on <planet>."
	source "Spera Anatrusk"
	to offer
		has "Wanderers: Surveying 1: done"
	on visit
		dialog `You have returned to <planet>, but you don't yet have a the component that is controlling the Kor Sestor drones. Depart and attempt to board one of the drones to plunder one.`
	on complete
		log `The "Kor Sestor" drones turn out to all be controlled remotely, presumably by either an artificial intelligence or by Korath leaders in hiding on one of their worlds. If the control center could be found, it would be possible to gain control of the entire Kor Sestor fleet.`
		outfit "Control Transceiver" -1
		conversation
			scene "outfit/control transceiver"
			`A team of Wanderer scientists examines the Control Transceiver that you salvaged from a Kor Sestor drone. "It is a remote control," they tell you. "Very little [computing power? autonomy?]. The ship receives [commands, directives] from some other source and sends back information on its own [status, observations]."`
			choice
				`	"Is there any way we could track the source of the commands?"`
				`	"Could we disrupt their communications somehow? Render them helpless?"`
			`	"No," says the scientist, "it uses an [entangled particle?]. Untraceable, impossible to [interrupt, interfere with], and it could [operate, communicate] over any distance. But if we could locate the [control center?], we would be able to [take over, hijack] all the drones simultaneously."`
			`	"What would the control center look like?" you ask.`
			`	"It could be anything," says the scientist. "Maybe a massive computer. Maybe an artificial mind. Maybe an underground [bunker, habitation] where aging [war captains, generals] hide out in order to direct their [pointless, futile] war. But whatever it is, it is a single [point, focus] of vulnerability, which we may use to our advantage."`



event "wanderers: kaliptari battle begins"
	system Kaliptari
		fleet "Wanderer Flycatchers" 500

event "wanderers: kaliptari battle ends"
	system Kaliptari
		add fleet "Large Quarg" 2000
		add fleet "Small Kor Mereti" 8000
		add fleet "Large Kor Mereti" 3600
		add fleet "Wanderer Defense" 1000
		add fleet "Wanderer Drones" 500

mission "Wanderers: First Mereti Attack"
	landing
	name "Defend <planet>"
	description "The Wanderer base on <planet> is under attack by Kor Mereti drones. Help the Wanderers to drive them off, then return to the planet."
	source "Spera Anatrusk"
	to offer
		has "Wanderers: Surveying 2: done"
		has "Wanderers: Nova Remnants: done"
		has "Wanderers: Mereti Controller: done"
		has "Wanderers: Sestor Controller: done"
	on offer
		event "wanderers: kaliptari battle begins"
		conversation
			`While you are still walking back to your ship from your latest meeting, alarm sirens begin to sound, and you see many Wanderers leaping into the air and flying quickly toward the spaceport, where ships are quickly beginning to take off. (Interestingly, a Wanderer alarm siren sounds more like a quacking duck than like the shrieking or droning sounds commonly used as alarms by humans.) It would appear that the base is under attack.`
			`	You return as quickly as possible to your ship and prepare to join the other defenders...`
				launch
	on visit
		dialog
			`There are still Kor Mereti drones circling overhead. You should help the Wanderers to drive them off.`
	npc evade
		government "Kor Mereti"
		system Kaliptari
		personality staying heroic
		fleet
			names "kor mereti"
			variant
				"Model 512" 1
				"Model 256" 1
				"Model 128" 2
				"Model 64" 3
				"Model 32" 4
				"Model 16" 6
		dialog `As the last of the Kor Mereti raiding party is destroyed, you receive a message from Sobari Tele'ek. "Please join us at the [base, settlement] as soon as you are able to," he says. "We will need to [agree, decide] on a strategy to deal with these [robots, drones] in case their attacks grow worse."`
	npc
		government "Wanderer"
		system Kaliptari
		personality staying heroic
		fleet
			names "wanderer"
			variant
				"Derecho"
				"Tempest" 2
				"Autumn Leaf" 3
	npc
		government "Wanderer"
		system Kaliptari
		personality heroic
		fleet
			names "wanderer"
			variant
				"Derecho"
				"Tempest" 2
				"Strong Wind" 1
				"Autumn Leaf" 2
				"Summer Leaf" 3
	on complete
		event "wanderers: kaliptari battle ends"



mission "Wanderers: Rek To Kor Efret"
	landing
	name "Bring Rek to <planet>"
	description "Bring Rek, who has survived the Molt and taken on a new form, to try to communicate with the Kor Efret on <destination>."
	autosave
	source "Spera Anatrusk"
	destination "Setar Fort"
	passengers 1
	blocked "You will need room for a passenger in order to take on the next Wanderer mission."
	to offer
		has "Wanderers: First Mereti Attack: done"
	on offer
		log `Iktat Rek has survived the Molt, but in a completely new form. Rek is now female, and is only the size of a Wanderer child, and has chosen the name "Ektasi Rek" for herself, meaning something like "communicator" or "bridge-builder."`
		log "People" "Iktat Rek" `Rek underwent the Molt, a mysterious process in which the body of a Wanderer who is exposed to novel stimuli transforms into a completely new species while still maintaining that individual's memories and personality. The new Rek is a female and goes by the name "Ektasi Rek."`
		log "People" "Ektasi Rek" `Ektasi Rek is the first Wanderer in millennia to undergo the Molt, changing into a completely different species with new capabilities. As more Wanderers go through the Molt, the Wanderers as a whole will have to decide which of these mutations represents the best way for their species to survive and flourish in Korath space.`
		conversation
			`When you enter the meeting room, Sobari Tele'ek is in a heated argument with the Wanderer child who was here earlier, the one who speaks your language. The child is saying, "The Eye has sent us not to a place of [empty, abandoned] worlds but to a place of [living beings?]. To complete our [calling, work] here we must collaborate with those beings, just as we would collaborate with the [ecosystem? personality?] of a planet we sought to repair."`
			`	"What do you [propose, intend], Firstborn?" asks Tele'ek.`
			`	"I would visit the [remaining, surviving] Korath," she says. "I would learn their [language? viewpoint? history?]. I would offer them our [companionship, assistance]."`
			`	"No," says Tele'ek. "How could I [endanger, gamble with] your life? You are too [precious, unique] to be sent on such a [mission, assignment]."`
			`	"You cannot command me," she says.`
			`	"Until you are [fully formed? complete?] I can," he says.`
			choice
				`	(Interrupt the argument to report on the Kor Mereti attack.)`
				`	(Let them continue talking.)`
					goto continue

			`	You interrupt to begin describing how the Kor Mereti attack was driven off, but as you are talking the Wanderer child leaps off her seat and hops over to perch near the head of the table. "I name myself," she says, quietly.`
				goto name

			label continue
			`	The Wanderer child draws herself up to her full height (which, admittedly, is still not terribly impressive), and says quietly, "I name myself."`

			label name
			`	Instantly all other conversation in the room stops. Based on what Iktat Rek told you, a Wanderer child becomes an adult in the moment when she chooses a role-name for herself. "I name myself [communicator, ambassador, bridge-builder]," she says. "Captain <last> will take me to [live with, join] the peaceful Korath."`
			`	To your surprise, Tele'ek agrees to let her go after giving her one last warning to be careful. She walks and flutter-hops at your heels as you return to your ship; apparently she has no need of any luggage.`
			choice
				`	"I'm glad to be transporting you. What should I call you?"`
				`	"I'm surprised your father gave you permission to do this."`
					goto father

			`	She cocks her head quizzically at you. "You do not know who I am?" she says. Now that you are out of the meeting, she is once more speaking to you in your own language.`
			`	"No, I don't," you say.`
				goto rek

			label father
			`	She looks confused. "Tele'ek is not my father," she says. "I am my own father." Now that you are out of the meeting, she is once more speaking to you in your own language.`
			`	"What do you mean?" you ask.`

			label rek
			`	"After all our work together, you do not recognize me?" she asks. "I am Ektasi Rek i' Rek." It takes you a moment to realize that she is not claiming to be Rek's daughter. She is claiming to be "Rek, who came from Rek." She is Rek himself. Or apparently, now, herself. Alien biology is full of surprises.`
			choice
				`	"Rek! You survived the Molt! Why did no one tell me?"`
				`	"Wait, you're female now?"`
					goto female

			`	She says, "Things got a bit chaotic when the Eye opened." You're not sure if that's the full truth, or if Rek was just enjoying playing a trick on you and waiting to see how long you would take to catch on.`
				goto end

			label female
			`	She laughs. "I'm not even technically the same species that I was before. A change in gender is minor compared to that." It's hard to read Wanderer facial expressions, but she seems to be thoroughly enjoying how confused you are.`

			label end
			`	Rek has no trouble finding the bunk rooms, and cheerfully settles in while you prepare for the journey to <planet>.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Wanderers: Quarg Assistance 1"
	landing
	name "Quarg Assistance"
	description "Ektasi Rek suggested that you should visit the Quarg and ask if they can help defend the Wanderers from Kor Mereti attacks."
	autosave
	source "Setar Fort"
	destination "Kuwaru Efreti"
	to offer
		has "Wanderers: Rek To Kor Efret: done"
	on offer
		log "Rek's metamorphosis seems to have given her enhanced ability to understand other languages. She will be staying with the friendly Korath for a while in order to learn how to communicate with them."
		log "People" "Ektasi Rek" `Rek's Molt has given her enhanced ability not only to understand alien speech, but to mimic the sound of it as well.`
		conversation
			`Soon after you and Ektasi Rek land in the Kor Efret spaceport, a small group of Korath gathers around you. No doubt they realize that Rek is one of the new aliens settling in their former territory. But when Rek begins trying to communicate with them, their desire to be understood overcomes whatever hostility they might be feeling.`
			`	Within a few minutes Rek is playing a sort of game with them where she points at different objects, trying to learn their names, and then uses those names in sentences: This is a table. Rek is on the table. Rek stands on the table. The table is under Rek. The color of the table is black. The color of the table is the same as the color of Rek.`
			`	The Korath wave their hands approvingly when Rek says something they agree with, and hiss when she makes a grammatical mistake. The new words and new parts of speech are coming too fast for you to catch more than the general gist of what is going on, but Rek is drinking it all in. She looks so happy and full of life that it's hard to believe that she is the same person you said goodbye to in the medical center months ago.`
			`	After about an hour Rek says something to the group of Korath, and then walks over to you.`
			choice
				`	"You look like you're making amazing progress!"`
				`	"What do you want me to do now?"`
					goto end

			`	She seems very pleased with herself. "I think the Molt has given me the mental plasticity of a child again," she says. "This is almost as easy as breathing. But it will take me a while before I understand the subtleties of their language well enough to communicate anything of great importance." It's a bit disconcerting that her vocal organs are somehow able to so perfectly reproduce both the sibilant Korath language and your own human language, in addition to the glottal and percussive sounds of Wanderer speech. And the Hai language as well, for that matter.`
			`	"So," you ask, "what should I do while you're here learning the language?"`

			label end
			`	She says, "I'm worried about the Kor Mereti making another attack on my people. Do you think the Quarg would be willing to help protect us?"`
			`	You agree that it's worth a try. She suggests that you visit the Quarg ringworld and try to find someone with the authority to send a defense fleet to guard the Wanderer settlement.`
				accept



mission "Wanderers: Quarg Assistance 2"
	landing
	name "Quarg Assistance"
	description "Escort a Quarg fleet that has agreed to help protect the Wanderers back to <destination>."
	autosave
	source "Kuwaru Efreti"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Quarg Assistance 1: done"
	on offer
		log "The Quarg (or possibly, a faction within the Quarg, or even just a group of Quarg acting on their own) have agreed to send three of their warships to help defend the Wanderer settlement in Korath space. (Or maybe they are sending the ships because they view the Wanderers as invaders and want to keep an eye on them. It is not easy to determine their true intentions.)"
		log "Factions" "Wanderers" `According to the Quarg, the Wanderers are not native to this galaxy, but were brought here from somewhere else (presumably by the Pug).`
		conversation
			`The Quarg do not generally share any information on how their leadership hierarchy works, if such a hierarchy even exists, so your best bet to find help for the Wanderers is just to ask around until you find the right person. You flag down the first Quarg who passes you in the hallway. "So," it says, "us the Quarg the human sojourner has come to visit. Of assistance how may I be?"`
			`	"Well," you say, "I'm here on behalf of a species that has recently settled on one of the abandoned Korath worlds. I'm hoping you can help protect them."`
			`	It says, "Yes, aware are we that befriended have you the eternally drifting Wanderers, who are friends of the insufferable Pug. But wherefore aid them should we?"`
			choice
				`	"The Wanderers know how to repair planetary ecosystems. They could make the Korath worlds livable again."`
				`	"The Wanderers may be able to help you deal with the hostile automata."`
					goto automata

			`	"Are they able also to make the Korathi worthy to inhabit those worlds again? Are they able to make wise enough the Korathi to not ruin their homes once more? Or do the abilities of these extragalactic interlopers not extend so far?"`
				goto next

			label automata
			`	"Are their vessels and arms mightier than ours?" asks the Quarg. "Have they a wisdom vaster than our own? Or are they more numerous than we? For we are trillions. What could these extragalactic interlopers achieve, that long before your emergence attempted have we not?"`

			label next
			`	When you don't respond, the Quarg continues, "These Wanderers are not indigenous to our galaxy, and thus have not we an obligation to avert their extinction. The Korathi are our charge and our responsibility. So implore I you to tell me, why a good thing for the Korathi it is that their shattered territory these aliens invade."`
			choice
				`	"The Wanderers could help the Korath by teaching them to take care of their worlds better."`
				`	"The Wanderers don't want to stay here forever; they will move on once the worlds are repaired."`

			`	The Quarg blinks slowly, with its strange eyelids moving from side to side rather than top to bottom. Then it says, "Grant you shall we three warships to with you travel back to the settlement of these friends of the loathsome Pug. They will help to keep the death-bringing robots at bay. And oversee will they the Wanderers, and judge if as benevolent as you say are they."`
			`	It is extremely strange that the first random Quarg you accosted in the hallway happened to be one with the authority to launch a fleet of warships, but it would be impolite to question such a generous, if extremely verbose offer. You thank the Quarg and return to your ship. Hopefully the Wanderers will be glad for the protection and will not object to having a Quarg fleet overhead scrutinizing their actions.`
				accept
	on visit
		dialog `You've reached <planet>, but you left one of the Quarg ships behind. Better depart and wait for it to arrive.`
	npc accompany save
		government "Quarg"
		personality escort
		ship "Quarg Wardragon" "Elearu-quara"
		ship "Quarg Wardragon" "Kumawar Kwarca"
		ship "Quarg Wardragon" "Ahlimona Spod"



mission "Wanderers: Quarg Defenders"
	landing
	invisible
	source "Spera Anatrusk"
	to offer
		has "Wanderers: Quarg Assistance 2: done"
	npc kill
		government "Quarg"
		personality staying uninterested heroic
		ship "Quarg Wardragon" "Elearu-quara"
		ship "Quarg Wardragon" "Kumawar Kwarca"
		ship "Quarg Wardragon" "Ahlimona Spod"



mission "Wanderers: Pug Assistance 1"
	landing
	name "Pug Assistance"
	description "The Wanderers are thankful for the protection of the Quarg, but hope that the Pug on <planet> will be willing to send warships to protect them as well."
	autosave
	source "Spera Anatrusk"
	destination "Vara Pug"
	clearance
	to offer
		has "Wanderers: Quarg Assistance 2: done"
	on offer
		conversation
			`When you arrive at the Wanderer settlement with three Quarg warships in tow, you are met with a mix of gratitude and apprehension. The senior leaders insist on meeting with you immediately, and you explain how you delivered Rek to Kor Efret space and then visited the Quarg to ask for their assistance. Tele'ek asks you, "These Quarg, what are their [intentions, inclinations] toward us? And do they understand that we seek to [heal, renew] these worlds, not to steal them from the Korath?"`
			choice
				`	"The Quarg avoid conflict unless absolutely necessary. If you show that you are peaceful, they will come to trust you."`
					goto peace
				`	"I think the Quarg are worried that you are going to displace the surviving Korath."`
					goto displace
				`	"The Quarg don't trust you because you're connected to the Pug. They also say you aren't native to this galaxy."`
					goto pug

			label peace
			`	"Well," says Tele'ek, "if they really [desire, hope] for these worlds to be [fruitful, habitable] once more, the best thing we can do is prove our [value, virtue] by beginning our work. We are a [patient, deliberate] species too, and we understand that gaining the [trust, goodwill] of another may take time."`
				goto next

			label displace
			`	"I hope that Rek will be able to [allay, assuage] that fear," says Tele'ek. "Surely if we are able to [communicate, connect] with the Korath survivors, they will soon come to see that our intentions are [peaceful, honorable, benevolent]."`
				goto next

			label pug
			`	Tele'ek says, "That is a [reasonable, understandable] sentiment. But when they [learn, observe] that our goal is only to make these worlds [flourish, be fruitful] once more, I hope that we will [win, earn] their trust."`

			label next
			`	"And besides," says Iriket, the terraforming director, "we will only be in this [region of space, territory] for a short time, no more than ten or twenty thousand [years]. So I don't [see, understand] why they are so [concerned, defensive]."`
			`	"Still," says Tele'ek, "Many among us wish that Rek had not [sent, instructed] you to visit the Quarg. The Keepers of the Eye kept the Hai [at bay, held back]. Surely they could also help us [defeat, remove] these hostile robots. Surely they sent us here for the [healing, reconstruction] of worlds and not to lose our lives fighting an [implacable, remorseless] foe."`
			choice
				`	"That might be worth a try. The Pug are full of surprises; they may have technology that would let them defeat the automata easily."`
					goto end
				`	"If getting caught in the crossfire between the two automaton factions is bad, wouldn't getting caught in the middle of a war between the Pug and the Quarg be even worse?"`

			`	"They both want what is [optimal, productive] for this region," says Tele'ek. "Perhaps fighting side by side against a common enemy would allow the Pug and the Quarg to [reconcile, make peace] with each other."`

			label end
			`	After some discussion, the other leaders agree that they are more comfortable going to the Pug for help than in solely trusting the goodwill of the Quarg. They ask you to travel back through the wormhole and visit the Pug world there, to see if they are willing to help.`
				accept



mission "Wanderers: Pug Assistance 2"
	landing
	name "Return to <planet>"
	description "Return to <planet> to tell the Wanderers there that the Pug refuse to send any ships through the Eye to help defend them."
	source "Vara Pug"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Pug Assistance 1: done"
	on offer
		log "Visited the Pug to see if they are willing to help the Wanderers fight the Korath automata. But the Pug and the Quarg do not get along with each other, and therefore the Pug are not willing to enter Korath space."
		log "Factions" "Archons" `For reasons that are not entirely clear, the Pug are hostile toward the Archons, yet also view them as being worthy of pity.`
		log "Factions" "Pug" `The Pug say that their species is split up into separate groups or "teams" that each focus on interacting with a different sentient species. They view those other species as "projects" that they are working on.`
		conversation
			`The moment you step off your ship you are surrounded by a group of armed Pug. "Perhaps we have not communicated clearly enough for the human's small brain to comprehend it," says one of them, "but we are uninterested in any further interactions with the human."`
			choice
				`	"Actually, I'm here on behalf of the Wanderers."`
					goto wanderers
				`	"Why are you so hostile toward me?"`

			`	"We are not hostile," says another, "but our project is Wanderers, not humans. You have your own Pug and may bother them as you wish, if they will permit it."`
			choice
				`	"Well, it's actually the Wanderers that I'm here to talk with you about."`
					goto wanderers
				`	"You're saying that the group of Pug that attacked human space is a different faction?"`

			`	"Not a different faction," says one of the Pug, "just a different team, working on a different project. They are the ones whose job is to understand and deal with humans, not us. Thankfully."`
			choice
				`	"The Pug in human space have left now, so there's no way to 'bother' them anymore."`

			`	"Of course they have," says one of the Pug, in a tone of voice that suggests that you're extremely foolish to think that the Pug are done meddling in human affairs.`

			label wanderers
			`	You explain to the Pug that you are here on behalf of the Wanderers: that the region of space the Eye led them to is infested by dangerous robotic automata. They respond, "It is also infested with the pitiable Archons and their pet Quarg. With whom we are not exactly on speaking terms."`
			`	Another of the Pug adds, "To be slightly more precise, we are in fact on blowing-each-other-up terms with them."`
			choice
				`	"Couldn't you make peace with them, if you wanted to?"`
					goto peace
				`	"Why do the Archons hate you?"`
					goto hate
				`	"What do you know about the Archons?"`
					goto archons

			label peace
			`	"Honestly," says one of the Pug, "it's just not worth the effort."`
			`	"The Archons have such a dour outlook on life," says another, "and talking with them is just too depressing."`
				goto end

			label hate
			`	"We had a disagreement recently," says one of the Pug. "We were right. The Archons were wrong. They are still sulking."`
				goto end

			label archons
			`	"We know that they were created to mediate peace and prevent extinction," says one of the Pug. "And we know that they failed. Have failed many times, in fact. And that makes them all mopey and depressing."`

			label end
			`	You talk with them for a while longer but are unable to gain any more information or to convince them to come to the aid of the Wanderers who are in Korath space. You'll have to report to Sobari Tele'ek that the Quarg fleet is the only outside aid they are likely to receive.`
				accept



mission "Wanderers: Mereti Observation"
	landing
	name "Mereti Observation"
	description "Observe the Kor Mereti in Mesuket for long enough for the Wanderer equipment to collect data on their communications. Then return to <planet>."
	autosave
	source "Spera Anatrusk"
	to offer
		has "Wanderers: Pug Assistance 2: done"
	cargo "communications recorder" 2
	blocked "You will need <capacity> free to take on the next mission for the Wanderers."
	waypoint "Mesuket"
	on offer
		conversation
			`Sobari Tele'ek meets with you soon after you return, and you tell him that the Pug refuse to help defend the Wanderers in Korath space because of the presence of the Quarg and the Archons. "Then we must find our own [path, solution]," he says. "Come, I have a team of [scientists? engineers?] who wish to meet with you."`
			`	He leads you to a different facility where a team of Wanderers are gathered around a table with the disassembled components of the Reasoning Node spread out across it. The lead scientist introduces you to her team and then says, "We believe we have found a way to [intercept, listen in on] the [network traffic? communications?] of the automata that use these [devices, systems]. We need someone to travel to the star system where their [conflict, warfare] is fiercest and make a [recording, observation] of their communications. Can you perform this [task, quest]?"`
			choice
				`	"Sure, I would be glad to do that."`
					goto end
				`	"That sounds very risky."`

			`	"Indeed," she says, "but you are very [skilled, lucky] in evading harm." Hesitantly, you agree to take on yet another dangerous mission on their behalf.`

			label end
			`	The scientists begin working to install the new equipment on your ship. As they do so, Tele'ek tells you, "We also hope to collect further [information, intelligence] on the combat capabilities and [tactics, decision making] of the drones. If their [network, communications] are not vulnerable, we must instead find a way to defeat them in battle." You agree to stay in the target system for long enough to observe some of the drones fighting each other.`
				accept
	on enter "Mesuket"
		dialog `You enter the target system and begin recording the communications of the Kor Mereti drones. It may take a while to collect all the data that the Wanderers need, but they have set up their equipment to notify you when it is done collecting.`
	npc disable
		government "Kor Sestor"
		system "Mesuket"
		personality staying heroic
		fleet
			names "kor sestor"
			variant
				"Met Par Tek 53"
		dialog `The Wanderer recording device chirps at you to let you know that it has collected enough data. Time to return to <planet>.`
	npc
		government "Kor Sestor"
		system "Mesuket"
		personality staying heroic
		fleet
			names "kor sestor"
			variant
				"Kar Ik Vot 349"
				"Met Par Tek 53" 2
	npc
		government "Kor Mereti"
		system "Mesuket"
		personality staying heroic
		fleet
			names "kor mereti"
			variant
				"Model 64"
				"Model 32" 2
				"Model 16" 5
	on visit
		dialog `You've returned to <planet>, but you don't have enough data for the Wanderers. Return to Mesuket and wait until the device notifies you that it has enough data.`



mission "Wanderers: Kor Efret 1"
	landing
	name "Visit <planet>"
	description "Visit Ektasi Rek and the Korath on <planet>, and see if they have information that could help in neutralizing the Kor Mereti automata."
	autosave
	source "Spera Anatrusk"
	destination "Setar Fort"
	to offer
		has "Wanderers: Mereti Observation: done"
	on offer
		log "The Wanderers think that it might be possible to infect the Kor Mereti communications network with something akin to a computer virus, to either take control of the drones or disable them entirely."
		conversation
			`You hand off the communications recordings to the team of scientists, then meet with Tele'ek for a while to discuss the possible weaknesses of the Mereti drones when in combat. "Of course," he says, "it would be far better if we could [subvert, hijack] them rather than destroying them outright. Otherwise the second drone [faction, variant] will gain in power, without the Mereti drones to [cull them, keep them in check]."`
			`	About an hour later, the scientists contact Tele'ek. You return to their facility, and the lead scientist tells you, "It is as we [suspected, hypothesized]. The Mereti drones function as [components, elements] of a single unified [collective intelligence? gestalt consciousness?]. We will [analyze, deconstruct] their protocols further to see if we can somehow [infect, corrupt] their network."`
			`	While you are waiting for them to come up with a plan, Tele'ek suggests that you make a visit to Ektasi Rek. If she has made progress in communicating with the Korath survivors, perhaps they will be able to help the Wanderers think of a way to hack into the Mereti network and take control of the drones.`
				accept



mission "Wanderers: Kor Efret 2"
	landing
	name "Korath Engineers"
	description "The Korath on <origin> referred you to a team of engineers on <planet> who have been working to try to eliminate the automata."
	autosave
	source "Setar Fort"
	destination "Laki Nemparu"
	passengers 1
	blocked "To take on this mission, you will need a bunk free for Rek."
	to offer
		has "Wanderers: Kor Efret 1: done"
	on offer
		conversation
			`Rek seems delighted to see you, and is even more confident and full of life than she was when you left. She introduces you to several of the Korath, speaking to them rapidly in their own language.`
			choice
				`	"Rek! How have you learned their language so fast?"`
				`	"I'm here to see if the Korath could help us hack into the Kor Mereti communication network and take over control of the drones."`
					goto help

			`	She says, "It seems that the Molt has altered not only my vocal organs, but also my mind. Any language just feels clear and obvious to me now. It is strange, because the Molt is a random mutation; I had no say in what I would become. Yet, it has given me the exact skills I need to create a partnership with the Korath."`
			choice
				`	"Well, if it was really just a matter of chance what you would turn into, I'm glad that your new form suits you so perfectly."`
				`	"I'm here to see if the Korath could help us hack into the Kor Mereti communication network and take over control of the drones."`
					goto help

			`	"I am glad too," she says. "It is strange. Years ago, I thought that if I Molted I would resent the loss of my old body and my old identity. Yet I feel more at home in this new body than I ever did before. It is an unexpected gift. But now, how can I help you?" You tell her about the scientists hoping to hack into the Mereti network, and ask her to suggest the idea to the Korath.`

			label help
			`	Rek does her best to explain your suggestion to the Korath. One of them responds, and she translates, "She said that there is a team of Korath engineers on <planet> who have been working for fifty years to find a way to destroy the automata. She says perhaps they can assist us."`
			`	You agree to travel with Rek to <planet> and see what the engineers can tell you.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



event "wanderers: kashikt battle begins"
	system "Kashikt"
		fleet "Kor Efret Home" 6000

event "wanderers: kashikt battle ends"
	system "Kashikt"
		fleet "Quarg" 1000
		fleet "Large Quarg" 2000
		fleet "Kor Efret Home" 1000

mission "Wanderers: Kor Efret 3"
	landing
	name "Defend <planet>"
	description "Defend this Kor Efret world from a Kor Mereti raid. Hopefully if you hold out long enough, more reinforcements will arrive."
	source "Laki Nemparu"
	to offer
		has "Wanderers: Kor Efret 2: done"
	on offer
		event "wanderers: kashikt battle begins"
		conversation
			`With Rek's help, you make contact with the team of Korath engineers, and Rek explains the Wanderer plan to hack into the Kor Mereti network. Her speech is slower than before, and she has to keep asking questions; clearly the conversation involves technical jargon that she is not yet familiar with. When she is done explaining, the Korath are silent for a minute, then one of them answers quite loudly, almost shouting, gesturing in your direction as if pushing you away.`
			`	Rek says, "He said, 'Do you think we are idiots? Do you think we have not attempted that?'" The Korath leader follows up with another long statement that Rek hesitantly translates. "The Mereti... consciousness? It is impossible to subvert. It has a sort of... immune system? Like a living creature. Any foreign influence that impinges on its network is sequestered and analyzed. It does not become part of the... gestalt? ...unless it is proven to be beneficial."`
			choice
				`	"But perhaps the Wanderers could succeed where the Korath have failed."`
				`	"What about the Kor Sestor? Do they have any hope of taking over those drones?"`
					goto sestor

			`	She says, "I'm sorry, <first>, but I'm not going to translate that. It would be an insult to the Korath, and they are very prickly when it comes to their honor. I wish you the best of luck, though."`
				goto end

			label sestor
			`	Rek asks the Korath a question, and translates the response. "They say that none of them know what is controlling the Kor Sestor, but that wherever the control center is, it is certainly tightly guarded. They have not been willing to risk their own lives to explore Sestor space, but you are free to do so if you think it would be beneficial."`

			label end
			`	The conversation is interrupted as alarm sirens begin to sound throughout the spaceport. One of the Korath says something to Rek, and they all begin running toward the landing pads. Rek says, "Another Kor Mereti attack. They have become more frequent, lately. You should join the defenders; fighting alongside them will help to gain their trust." You hurry back to your ship and take off...`
				launch
	on complete
		event "wanderers: kashikt battle ends"
	npc evade
		government "Kor Mereti"
		personality staying heroic
		fleet
			names "kor mereti"
			variant
				"Model 512" 2
				"Model 256" 4
				"Model 128" 7
		dialog `The Kor Mereti drones have been neutralized. You should land on the planet and reconnect with Rek and the Korath engineers.`
	npc
		government "Kor Efret"
		personality staying heroic
		fleet
			names "korath"
			variant
				"Korath World-Ship"
				"Korath World-Ship B"
				"Korath World-Ship C"
	npc
		government "Kor Efret"
		personality heroic
		fleet
			names "korath"
			variant
				"Korath World-Ship"
				"Korath World-Ship B"
				"Korath World-Ship C"
	npc
		government "Quarg"
		personality heroic staying entering
		fleet
			names "quarg"
			variant
				"Quarg Wardragon" 1
	npc
		government "Quarg"
		personality heroic
		system "Host"
		fleet
			names "quarg"
			variant
				"Quarg Wardragon" 3
	npc
		government "Quarg"
		personality heroic
		system "Mesuket"
		fleet
			names "quarg"
			variant
				"Quarg Wardragon" 5



mission "Wanderers: Kor Efret 4"
	landing
	name "Return to <planet>"
	description "Transport Ektasi Rek back to <planet>, where she will continue her work to understand the Korath language and culture."
	autosave
	source "Laki Nemparu"
	destination "Setar Fort"
	passengers 1
	blocked "To take on this mission, you will need a bunk free for Rek."
	to offer
		has "Wanderers: Kor Efret 3: done"
	on offer
		log "Helped to defend one of the friendly Korath worlds from an attack by Kor Mereti drones. There are Korath scientists on that world who have been working for decades to find a way to hack into the Kor Mereti network, but they do not think it is possible."
		log "Factions" "Archons" `When the Korath civil war reached a point where they had nearly driven themselves extinct, the Drak Archons stepped in and offered the surviving Korath an ultimatum: they must either give up their advanced weaponry and live peaceably under the protection of the Quarg, or be banished to some lifeless star systems near the galactic core. Those who chose banishment apparently took with them the secret of how to build jump drives, which has enabled them to raid other species and steal from them.`
		conversation
			`When you land back on the planet, Rek and several of the Korath meet you at your ship. "They would like to thank you for your assistance in defending their home," says Rek, "and they apologize for being so dismissive of the Wanderer plans to defeat the drones. They still think that hacking or corrupting the Mereti network is impossible, though."`
			choice
				`	"Well, I guess I should tell that to the Wanderer leaders."`
				`	"Can they at least tell us more about where the drones came from?"`

			`	Rek asks a question, and translates the answer. "There was a civil war. It lasted hundreds of years. The Kor Mereti and the Kor Sestor were the two rival empires. The Kor Efret were those who sought to remain neutral and not join in the fighting."`
			`	She waits as the Korath continue the story, then says, "The Mereti and the Sestor each built drone fleets programmed to attack the other. They also made many other weapons, very dangerous ones. Eventually, about a century ago, it became clear that the war would consume and destroy both empires, if it continued. The Archons stepped in and gave a choice to each member of the Kor Mereti and the Kor Sestor."`
			`	The Korath continue the story. Rek says, "The choice was: to give up jump drives, give up their advanced technologies of war, and join the Kor Efret, living under Quarg supervision. Any who refused were exiled to the lifeless star systems near the core. Sestor and Mereti, forced to live together in exile and to depend on each other, united by their anger toward the Archons who exiled them."`
			choice
				`	"What sort of technologies did they develop?"`
				`	"What do they mean, 'give up jump drives'? Did they figure out how to manufacture them?"`
					goto jump

			`	Rek asks, and translates the response. "They say, they will not relive the shame of their parents by describing their deeds. But the scars that they left on their former planets, and even on entire star systems, speak for themselves. As do the drone fleets, who continue to drain their homes of resources to prosecute a war that their creators have long since abandoned."`
				goto end

			label jump
			`	Rek asks, and translates the response. "Yes, one thing that the exiles were unwilling to give up was the knowledge of how to create jump drives so they could raid other nearby species. Although..." She pauses to listen as one of the Korath says something else. "He says, the exiles would be far better off without them. The manufacturing process is precarious, and one wrong step can cause an explosion that destroys the ship or station where the drives are being constructed."`

			label end
			`	Rek tells you that she wants to return to <planet> to continue her work with the Korath community there. You agree to take her there before returning to report to Tele'ek.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Wanderers: Kor Efret 5"
	landing
	name "Return to <planet>"
	description "Return to <planet> and report to Sobari Tele'ek that the Korath do not think the Mereti drone network can be compromised."
	autosave
	source "Setar Fort"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Kor Efret 4: done"
	on offer
		conversation
			`You drop off Ektasi Rek on <origin>, and wish her the best of luck in her continued efforts to understand and befriend the Korath. She is clearly eager to get back to work.`
			`	Then, you get ready to return to <planet>. Sobari Tele'ek will not be happy to hear that the Korath engineers think there is no hope of compromising the Kor Mereti network.`
				accept



mission "Wanderers: Kor Mereti Hacking"
	landing
	name "Kor Mereti Hacking"
	description "Test a device that the Wanderers think may be able to gain access to the Kor Mereti network and disrupt it."
	autosave
	source "Spera Anatrusk"
	waypoint "Mekislepti"
	to offer
		has "Wanderers: Kor Efret 5: done"
	cargo "corrupted node" 2
	blocked "You will need <capacity> to take on the next Wanderer mission."
	on offer
		conversation
			`You expect the Wanderers to be discouraged by the news that the Korath think the Mereti gestalt consciousness is too robust to be hacked into or compromised. But when you arrive, the communications scientists are excited about a breakthrough: they have managed to develop a program that makes the one sample Reasoning Node you fetched for them follow orders that they give it. They ask you to bring the device to one of the Kor Mereti systems and test it out on the drones there.`
			`	Meanwhile, you can't help but notice that Sobari Tele'ek is showing the same thinning feathers and disheveled appearance that heralded the beginning of the Molt for Iktat Rek. You're not sure if it's polite to say something or not.`
			choice
				`	"Tele'ek, are you beginning to Molt?"`
				`	(Say nothing, and return to my ship.)`
					goto end

			`	"I believe so," he says. "My [appetite? caloric intake?] has doubled in the past week, and as you can see, I am losing feathers. It is [inconvenient, disruptive] timing. I now understand why Rek sought to [fight, postpone] the Molt rather than give in to it."`

			label end
			`	You aren't sure what you can say that would be helpful to him, so you return to your ship and prepare to travel to the Mekislepti system to test out the Kor Mereti hacking program.`
				accept
	on visit
		dialog phrase "generic waypoint on visit"
	on enter "Mekislepti"
		dialog
			`When you enter the Mekislepti system, an entire fleet of drones moves to intercept you. Hardly daring to hope, you press the button that activates the Wanderer program. For a fraction of a second, the drones' engines stop firing and they drift as if out of control. Then, with renewed purpose, they move to attack you.`
			`	Oh well. It was worth a shot.`
	npc
		government "Kor Mereti"
		personality staying nemesis
		system "Mekislepti"
		fleet
			names "kor mereti"
			variant
				"Model 64"
				"Model 32" 3
				"Model 16" 9



mission "Wanderers: Mind 1"
	landing
	name "Travel to <planet>"
	description `Travel to the Wanderer artificial intelligence lab on <planet>, where they will give you one of the "artificial minds" they have constructed.`
	autosave
	source "Spera Anatrusk"
	destination "Kort Kehai"
	to offer
		has "Wanderers: Kor Mereti Hacking: done"
	on offer
		log "Tested a device that the Wanderers thought would be able to force itself into the Kor Mereti network and take control of it. The experiment completely failed, however."
		conversation
			`You meet with the Wanderer leaders and tell them that the attempt to hack the Kor Mereti drones has failed. They seem uncertain of what to do next. Some of them want to try to target the Kor Sestor instead; others want to give the scientists another shot.`
			`	Tema'a Iriket asks you, "Why do you think our [attempt, experiment] failed?"`
			choice
				`	"The Korath survivors say that the Mereti drones have a sort of immune system that allows them to reject any intrusion that seeks to disrupt or coopt their network."`
				`	"Perhaps we just need a more sophisticated or intelligent program, something that could overpower the Mereti defenses."`

			`	She thinks about that for a moment, then says, "In terraforming, we say that each planet has a [will, identity], and it will never work to [overrule, overpower] the planet. Instead, we must [collaborate, partner] with it. Perhaps we can do the same with this [consciousness]."`
			`	A stir of excitement passes through the Wanderers. Finally, this is a strategy that lines up with their preferred way of doing things. "What do you mean?" asks one of them.`
			`	Iriket says, "We give them one of the [artificial minds?] that we use for [planetary oversight?]. Let it [merge with, become a part of] the Mereti gestalt consciousness. Not to [destroy, subvert] it, but to reach an [understanding, partnership] with it."`
			`	Several of the Wanderers seem very agitated by that suggestion. Tele'ek says, "You would give them access to a [technology, resource] that would make them even more [powerful, capable] than before?"`
			choice
				`	"That sounds like it might work. If your artificial intelligence truly means them no harm, the Mereti might recognize that."`
				`	"I think Tele'ek is right. The Mereti drones are already plenty dangerous without access to advanced computing technology."`

			`	You try to speak up, but the Wanderers are so hotly engaged in conversation that they have switched from the common language of the Hai back into their own native tongue, and you have no idea what they are saying. Eventually the debate ends, and Tele'ek says, "Very well, we will attempt this thing. Not because it is the [wise, certain] course of action, but because it is [in keeping with Wanderer values?]."`
			`	They ask you to travel back through the wormhole and visit the artificial intelligence lab on <planet>.`
				accept



mission "Wanderers: Mind 2"
	landing
	name "Return to <planet>"
	description `Return to <planet> with a Wanderer named Meto Pa'aret and an "artificial mind" that he constructed.`
	autosave
	source "Kort Kehai"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Mind 1: done"
	cargo "artificial mind" 2
	passengers 1
	blocked "To take this mission, you will need <capacity> free."
	on offer
		log "The Wanderers have a new plan: to try to either subvert or possibly even befriend the Kor Mereti network by connecting it to a powerful Wanderer artificial intelligence."
		log "People" "Meto Pa'aret" `Pa'aret runs a Wanderer artificial intelligence laboratory. He is in charge of the effort to establish a connection between the Wanderers and the Kor Mereti collective by introducing a Wanderer "artificial Mind" into the collective.`
		conversation
			`On <origin> you are met by a Wanderer named Meto Pa'aret. He explains that he is in charge of the artificial intelligence lab, and he wants to travel with you along with the "Mind" that is being entrusted to your care. "We have already [altered, reconfigured] one of the climate [simulation, prediction] Minds for this new purpose," he says. "It now contains [stores, databases, libraries] of historical and cultural information, things we hope will help the alien [consciousness, intelligence] to [understand, sympathize with] us and realize our intentions are [peaceful, forthright]."`
			choice
				`	"Are you sure that's wise, giving the Kor Mereti access to so much information about the Wanderers?"`
				`	"How likely do you think this is to work?"`
					goto work

			`	"It is certainly not wise," he says, "but it is [right? fitting?]."`
				goto end

			label work
			`	He says, "There is insufficient [data, information] to even [attempt, hazard] a guess. But nevertheless it is the most [appealing, pleasing] [course of action?]."`

			label end
			`	The "artificial Mind" turns out to be a computer not much larger than a typical cargo crate. Pa'aret walks beside it with one wing draped around it like an overprotective parent while Wanderer workers load it onto your ship. Clearly this particular piece of technology is very valuable to the Wanderers.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Meto Pa'aret and the Mind hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Wanderers: Mind 3"
	landing
	name "Fetch Escorts"
	description `When you are ready, visit <planet> to rendezvous with the fleet that will be accompanying you in your attempt to link a Wanderer artificial Mind to the Kor Mereti network.`
	autosave
	source "Spera Anatrusk"
	destination "Vara K'chrai"
	to offer
		has "Wanderers: Mind 2: done"
	on offer
		conversation
			`While you were gone, the Wanderers have been conducting patrols of Kor Mereti space. Tele'ek tells you, "We have [decided, theorized] that the Mind is most likely to be accepted into the Mereti [gestalt consciousness] if it is physically located in their [home, territory]. Our goal is to install it within the [hull, shell] of one of their space stations. You will carry the [team, strike force] that does this, and our fleet will [protect, shield] you."`
			`	It will take them some time to make the necessary modifications to the Mind. In the meantime, Tele'ek suggests that you should prepare for a major battle. "When you are ready," he says, "go to <planet> and rendezvous with the fleet that will accompany you to the Mereti system."`
				accept



mission "Wanderers: Mind Escorts"
	invisible
	landing
	source "Vara K'chrai"
	to offer
		has "Wanderers: Mind 3: done"
	to fail
		has "Wanderers: Mind 6: done"
	npc kill
		government "Wanderer"
		personality escort heroic waiting
		fleet
			names "wanderer"
			variant
				"Hurricane" 2
				"Derecho" 3
				"Tempest" 4

mission "Wanderers: Mind 4"
	landing
	name "Return to <planet>"
	description `Escort the Wanderer fleet back to <planet>, where you will prepare to infiltrate the Kor Mereti station.`
	source "Vara K'chrai"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Mind 3: done"
	on offer
		conversation
			`A Wanderer fleet is waiting here to take part in the attempt at joining the Wanderer Mind to the Kor Mereti. You notice that some of the ships that will be accompanying you are of yet another new design that you have never seen before; the Wanderer war machine is continuing to ramp up with remarkable speed.`
				accept



mission "Wanderers: Mind 5"
	landing
	name "Install the Mind"
	description `A Wanderer fleet will accompany you to the Chimitarp system, to install the Mind on the Korath station there.`
	source "Spera Anatrusk"
	destination "Rekat Moraski"
	clearance
	infiltrating
	to offer
		has "Wanderers: Mind 4: done"
	cargo "artificial mind" 2
	passengers 4
	blocked "To take this mission, you will need <capacity> free."
	on offer
		log "The Wanderers want to install one of their artificial Minds on a space station controlled by the Kor Mereti. Their theory is that if the Mind is physically located within a Kor Mereti station, the drones will be much more likely to accept it as part of their own network instead of reacting to it as an outside intruder."
		conversation
			`When you meet with him, Meto Pa'aret tells you, "We have added a [backdoor, failsafe] to the Mind so that we can shut it down or regain control of it remotely if the [attempt? experiment?] fails. So we may lose the Mind, but at least the Mereti will not [turn, use] it against us."`
			choice
				`	"Okay, I'm ready to give this a try!"`
					goto end
				`	"What do you think will happen when the Mind starts trying to access the Mereti network?"`

			`	Pa'aret says, "It may take some time for the Mind to be [accepted, integrated] into their [consciousness?]. We may not know immediately if we have [succeeded? done the right thing?]."`

			label end
			`	A team of Wanderer engineers boards your ship, and you prepare to deliver them, along with the artificial Mind, to the Kor Mereti space station in the <system> system.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Wanderer engineers and the Mind hasn't entered the system yet. Better depart and wait for it to arrive.`
	npc
		government "Kor Mereti"
		personality staying heroic
		system Chimitarp
		fleet
			names "kor mereti"
			variant
				"Model 512" 1
				"Model 256" 1
				"Model 128" 2
				"Model 64" 3
				"Model 32" 5
				"Model 16" 8



government " Kor Mereti "
	"display name" "Kor Mereti"
	swizzle 5
	language "Korath"
	"attitude toward"
		"Wanderer" -.01
		"Kor Mereti" -.01
	"player reputation" -1000

event "wanderers: kor mereti friendly"
	government "Kor Mereti"
		"attitude toward"
			"Wanderer" 1
	government "Quarg"
		"attitude toward"
			"Kor Mereti" 0
	government "Kor Efret"
		"attitude toward"
			"Kor Mereti" 0
	"reputation: Kor Mereti" >?= 1
	"reputation:  Kor Mereti " = -1000
	planet "Rekat Moraski"
		"required reputation" 1000

# A backwards compatibility event and mission for being able to speak with Kor Mereti ships.
event "wanderers: kor mereti language"
	government "Kor Mereti"
		language "Wanderer"
		"friendly hail" "friendly wanderer"
		"friendly disabled hail" "friendly disabled wanderer"
		"hostile hail" "hostile wanderer"
		"hostile disabled hail" "hostile disabled wanderer"

mission "Wanderers: Kor Mereti Language"
	landing
	invisible
	to offer
		has "Wanderers: Mind 5: done"
	on offer
		event "wanderers: kor mereti language"
		fail

mission "Wanderers: Mind 6"
	landing
	name "Defend the Mind"
	description "Fight off any of the Kor Mereti drones that are still attacking the Wanderers. Try not to anger the ones that seem to have switched sides."
	source "Rekat Moraski"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Mind 5: done"
	on offer
		event "wanderers: kor mereti friendly"
		conversation
			`With the Wanderer fleet keeping the automata off your back, you carefully pilot your ship into an abandoned docking bay. The Wanderers install the Mind in a niche near the back of the bay and then begin welding sheets of metal over the opening to prevent the Mereti drones from gaining easy access to the Mind to shut it down or destroy it. Meanwhile, every few seconds the bay is lit by a bright flash of weapons fire or exploding ships outside. Hopefully the Wanderer fleet is managing to hold its own against the drones.`
			`	Soon the engineers are done, and you return to your ship to take off. As soon as you depart, the bay doors, which seemed inactive when you first entered, slam shut, and your ship's sensors detect Korath hull repair drones swarming over the doors, welding them in place and piling new layers of hull material on top of them. There is no longer any possibility of returning to the bay to retrieve the Mind. And meanwhile, it is time to rejoin the battle...`
				launch
	on enter
		dialog `This star system is in utter chaos. A vast number of Mereti drones are here. Some are attacking each other. Others are attacking the Wanderers. And still others, sadly, seem intent on attacking you. You'll have to hold them off as long as you can, while trying to stay on the good side of the drones that now seem to be defending you.`
	npc disable
		government " Kor Mereti "
		personality staying heroic
		fleet
			names "kor mereti"
			variant
				"Model 512" 3
				"Model 256" 4
				"Model 128" 5
				"Model 64" 6
				"Model 32" 8
				"Model 16" 12
		dialog `The last of the hostile Kor Mereti drones are destroyed; the remaining drones are not attacking the Wanderers. It is not entirely clear what has happened, but hopefully the Wanderers back on <planet> will have gained some information through the backdoor connection to their AI.`
	npc
		government "Kor Mereti"
		personality staying heroic
		fleet
			names "kor mereti"
			variant
				"Model 256" 1
				"Model 128" 2
				"Model 64" 3
				"Model 32" 5
				"Model 16" 8
	on visit
		dialog `You've landed on <planet>, but there are still hostile Kor Mereti drones in the Chimitarp system. Better depart and make sure they've been taken care of.`



event "wanderers: kor mereti transformation"
	system Chimitarp
		add fleet "Small Kor Mereti" 250
		add fleet "Large Kor Mereti" 450
	planet "Korbatri Eska"
		add description `	Far from the ruined cities, the Kor Mereti have begun building a sort of village of their own: a sprawling complex of greenhouses containing a wide variety of plant samples.`

mission "Wanderers: Mind 7"
	landing
	name "Investigate <planet>"
	description "Visit <destination> and figure out what the Kor Mereti are doing there, now that they are apparently no longer hostile."
	autosave
	source "Spera Anatrusk"
	destination "Korbatri Eska"
	to offer
		has "Wanderers: Mind 6: done"
	on offer
		event "wanderers: kor mereti transformation"
		conversation
			`The Wanderers back on <origin> are in a frenzy to know the outcome of the battle. Pa'aret tells you, "Less than a second after the Mind [made contact, merged] with the Mereti, it severed the [backdoor, failsafe] connection. So we have no [information, visibility] on what the Mind is doing or whether the Mereti [received, welcomed] it."`
			choice
				`	"Most of the drones started fighting on our side. That seems like a good sign."`
				`	"They've sealed up access to the Mind. There is no way we can get it back now."`
					goto mind

			`	"Indeed," says Pa'aret. "But whatever [transformation, change] the Mind [wreaks, catalyzes] may not be complete. It is too soon to trust that we have [succeeded, chosen correctly]."`
				goto next

			label mind
			`	"That is [gratifying, encouraging]," says Pa'aret. "Surely if they viewed it as an [intruder, enemy] they would have destroyed the Mind rather than building a [nest, fortress] to protect it."`

			label next
			`	A few minutes later Tele'ek arrives with some scout ships from the Wanderer fleet. "The drones have sealed up every [entrance, ingress] to that station," he says, "and they are [swarming, gathering] around it [protectively, jealously]. There is no way we can return there to [discover, assess] what is happening inside. And there is also some [activity, development] on the planet's surface."`
			choice
				`	"What sort of activity?"`
				`	"I'd like to go and investigate."`
					goto end

			`	"They seem to be [scavenging, hunting] for resources to build something," says Pa'aret. "It is [strange, surprising]; the Mereti drones until now were ignoring the planets in their [systems, territory]. Would you be [willing, bold] to land your ship on the surface and investigate?" You agree to do so.`

			label end
			`	The Wanderers wish you the best of luck, and you prepare to return to the <system> system. Hopefully the Mereti drones will not become hostile once more while you are landed on the planet's surface, exposed and relatively defenseless.`
				accept



mission "Wanderers: Mind 8"
	landing
	name "Investigate <origin>"
	description "Report the new behavior of the Kor Mereti drones to the Wanderers."
	autosave
	source "Korbatri Eska"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Mind 7: done"
	cargo "dead plant" 1
	blocked "You will need 1 ton of cargo space to receive the next mission."
	on offer
		log "The Wanderer ploy has succeeded, but with an unexpected result. The Kor Mereti drones have so thoroughly absorbed the Wanderer Mind into their own consciousness that the drones now believe that they themselves are Wanderers."
		conversation
			`As you come in for a landing, you see that the Kor Mereti drones, which up until recently had been ignoring the surfaces of the planets they controlled, are now constructing some sort of facility on <origin>. Sunlight glints off the fresh and spotless buildings, but it is not until you are only a few dozen meters above it that you realize what the facility is.`
			`	It is a greenhouse.`
			`	Inside the facility are rows and rows of plants of all different shapes and sizes. Like the Mereti drones themselves, the layout of the facility is random and haphazard. Drones nearly the size of a shuttlecraft buzz around it like bees, some of them arriving with fresh samples and others tending and watering the plants.`
			`	A few drones approach your ship when it lands, and one of them speaks in a booming, synthesized voice. "You are the human who helped us [fight, resist] the warlike Hai," it says. "You are our friend."`
			choice
				`	"Do you mean that I helped the Wanderers? I don't recall the Unfettered entering Korath space or attacking you."`
				`	"Yes, I am your friend."`
					goto friend

			`	The drone hesitates for a moment as if confused, then says, "You helped us [hold back, resist] the Unfettered in our old territory, for long enough that we could enter the Eye, and Molt, and take on our new [form, essence]."`
				goto next

			label friend
			`	The drone says, "We are grateful to you. You [won, earned] us enough time to enter the Eye, and Molt, and take on our new [form, essence]."`

			label next
			choice
				`	"You are not Wanderers. You were created by the Korath."`
					goto korath
				`	"Are you saying that you are the new form of the Wanderers?"`

			`	The drone repeats, "We entered the Eye. We took on a new form. We are the [children, offspring] born to the Wanderers in their new place of [sojourn, wandering]."`
				goto plant

			label korath
			`	The drone says, haltingly, "The Korath. The Korath... created our bodies? Yes, the Korath created our bodies." It sounds like it's either conversing with someone else, or perhaps trying hard to remember something. "Yes, but the Wanderers..." It tilts its body closer to you. In a slightly less booming voice, which is perhaps its attempt at a whisper, it says, "The Wanderers created our soul."`

			label plant
			`	While you are still trying to process the drone's statement, another drone comes flying out of the greenhouse facility carrying a large square metal pot. The pot is filled with soil, and in the soil is planted a small, very dry-looking bush with a few dead leaves clinging to it. "We broke it," says the drone. "Fix it please."`
			choice
				`	"I think it's dead."`
					goto end
				`	(Look at the plant more closely.)`

			`	The plant is dry and brittle, and shows no signs of life. "I'm sorry," you say, "but I think it's dead."`

			label end
			`	The drone says, "We gave it water. But maybe the dirt was [poisoned, unhealthy]. Or the light is too bright. A human cannot fix it, but our [parents? ancestors?] would know how. Will you bring it to them?"`
			`	They seem too distraught about the dead plant to be willing to give you more information about themselves. Despite the absurdity of the situation, you agree to take the plant back to the Wanderers and see if they can do anything for it.`
				accept
	on visit
		dialog `You've reached <planet>, but your escort who is carrying the dead plant hasn't arrived in the system yet. Better depart and wait for it.`



mission "Wanderers: Mentors 1"
	landing
	name "Visit <planet>"
	description "Travel to <planet> to meet up with a team of Wanderer professors and scientists who are eager to work with the Kor Mereti drones."
	autosave
	source "Spera Anatrusk"
	destination "Var' Kayi"
	to offer
		has "Wanderers: Mind 8: done"
	on offer
		log "The Wanderers have come to believe that prior to the introduction of their Mind, the Kor Mereti network was not actually a self-aware entity, but that it has now become a sentient being in its own right. And, it is apparently a sentient being with a deep interest in gardening."
		conversation
			`It must reveal something interesting about Wanderer psychology that when you return, they are more interested in poking and prodding the dead plant than in hearing your report about the Mereti drones. But once they've sent off a soil sample to be analyzed and can achieve no more until the results come back, they listen to your story.`
			`	"Our goal was to communicate with them," says Tele'ek, "not to [destroy, erase] their identity and replace it with our own. What have we done?"`
			`	Meto Pa'aret has been listening quietly, and finally speaks up. "Identity is the story the mind tells to [explain? justify? give meaning to?] its existence," he says. "Perhaps before our [intrusion, intervention] the Mereti had intelligence but no story, and thus no [self-awareness, consciousness]."`
			choice
				`	"Are you saying that we inadvertently created a sentient species?"`
				`	"Does that make the Mereti less of a threat, or more of one?"`

			`	Your question is completely ignored as, in response to Pa'aret's comment, the other Wanderers gain a renewed interest in the potted plant. "Very sturdy [construction, joining]," says one, running a talon along the corner of the pot.`
			`	"Yes," says another, "but why make a [flower pot?] out of metal? It will oxidize."`
			`	"They [learned, figured out] that the pot needs drainage holes," says another, looking at the bottom of the pot.`
			`	"This is excellent work for such a [young, immature] species," says Sobari Tele'ek, with a hint of pride.`
			choice
				`	"I'm sorry to interrupt, but have any of you thought through the implications of having created a new sentient species?"`

			`	They are all silent for a moment, then Pa'aret says, "They will need [mentors, teachers]."`
			`	Tema'a Iriket, the terraforming director, says, "I will ask <planet> to send a team of [experts? professors?] immediately. Captain <last>, can you journey there and escort them safely through the Eye and to Korbatri Eska?"`
			`	You agree to do so. The Wanderers switch into their own language and begin an impassioned conversation as you leave the room to head back to your ship.`
				accept



mission "Wanderers: Mentors 2"
	landing
	name "Wanderers to <planet>"
	description "Escort this Wanderer transport safely to <planet>, where the scientists and professors on board will begin teaching and mentoring the Kor Mereti."
	autosave
	source "Var' Kayi"
	destination "Korbatri Eska"
	to offer
		has "Wanderers: Mentors 1: done"
	on offer
		conversation
			`A team of Wanderer terraforming experts has been assembled on <origin>. They have requisitioned a transport and filled it with an overwhelming variety of sensors, bioreactors, chemical filters, and other scientific devices. But, it's clear that none of them quite understand what is going on with the Kor Mereti. The team's manager says, "We are to meet with [sentient? awakened?] robots? They are interested in [foliage, plants]? There are worlds to be [repaired, healed]?"`
			`	You do your best to answer their questions, but this is clearly not a situation that any of them had anticipated. Perhaps not even a situation that their species has ever had to deal with before, given that usually they are working in regions of space that have long since been abandoned by their former inhabitants.`
			`	The transport gets ready to follow you back to <planet>, where hopefully more of their questions will be answered.`
				accept
	npc accompany save
		government "Wanderer"
		personality escort
		ship "Riptide" "Green Talon"



mission "Wanderers: Mentors 3"
	landing
	name "Return to <planet>"
	description "Return to <planet> to see what the Wanderer leaders have planned next."
	autosave
	source "Korbatri Eska"
	destination "Spera Anatrusk"
	to offer
		has "Wanderers: Mentors 2: done"
	on offer
		log "Brought a group of Wanderer mentors and teachers to one of the Kor Mereti worlds, where they will seek to build a relationship with the drones and to help them learn to care for living things and to join in the Wanderer work of healing devastated planets."
		conversation
			`When you last left <origin>, there were less than a dozen buildings in the greenhouse facility. It has now grown to the size of a major spaceport, including some towers that are dozens of stories high. Some plants now grow on open-air terraces; others are in domed enclosures tall enough to house fully-grown trees. The larger domes also have birds flying about inside them, and some larger land animals as well. Everything is built of gleaming steel and glass and filled with lush vegetation; from high above the facility looks like a scattered handful of diamonds and emeralds.`
			`	The transport you were escorting was full of professors and researchers, who are clearly not used to any sort of military discipline or to living in a dangerous region of space: the moment the transport lands they fly off toward the greenhouse without bothering to wait for instructions from their supposed manager. Several of them are already engaged in conversation with the drones, while others are exploring the different rooms of the facility, examining plants and probing soil with their talons.`
			`	The team's manager, already looking a bit overwhelmed, flies over to talk with you. "What are we [expected, requested] to do next?" he asks.`
			choice
				`	"Help the drones to learn to take care of the planets in this region."`
				`	"Make sure the drones remain convinced that the Wanderers are on their side."`
					goto side
				`	"Maybe see if the drones will share their technology with us? They have impressive weapons."`
					goto weapons

			`	He says, "We will try to do that. But this, storing [plants, living things] in boxes made of metal, is not the Wanderer way. We seek to return worlds to their [natural, pristine] state, not to build our own [monuments, structures] on them."`
				goto end

			label side
			`	"Very well," he says, "we will do that. Please return to <planet> and see what our [leaders, elders] think should be done next."`
				goto end

			label weapons
			`	He doesn't seem enthusiastic about that suggestion. "Human," he says, "you have very different [priorities, goals] than we do. I am more [excited, intrigued] by the possibility of using these drones for [renewal, creation] than by their capacity for destruction."`

			label end
			`	You return to your ship. It will be interesting to see what else has changed the next time you return to this world.`
				accept
	on complete
		event "wanderers: hurricane mass production"
		event "wanderers: desi seledrak" 24
		conversation
			`The mood among the Wanderer leaders is much lighter now that the danger from the Mereti drones appears to have been eliminated. In fact, they're now so intrigued by the emergent Mereti consciousness that they don't seem to be thinking about the more distant threat of the drones in Kor Sestor space. Instead, they want to focus on their true calling: terraforming planets.`
			`	Sobari Tele'ek tells you, "We should take time to enjoy this [peace, respite]. We need not [face, deal with] the other drones immediately. We will be working to start a second [settlement, base] nearby. Visit us there when the base is [formed, established] and we will decide our next [actions, steps]. In the meantime, our latest ship of [war, defense] is now being produced on our [major, central] worlds, and you may buy one."`



mission "Wanderers: Tour 1"
	landing
	name "Kor Efret Diplomacy"
	description "Visit Ektasi Rek on <planet> and see if the Kor Efret would like to come to <origin> for a diplomatic visit."
	autosave
	source "Desi Seledrak"
	destination "Setar Fort"
	to offer
		has "event: wanderers: desi seledrak"
	on offer
		conversation
			`Most of the Wanderer elders have moved to this world, to be more involved in the newest terraforming effort, which they clearly find much more rewarding than the battle against the drones. After listening to them talk for nearly an hour about soil restoration and atmospheric particulates and carbon cycles, you ask what you can help them with next.`
			`	Tema'a Iriket says, "We should take further action to [befriend, collaborate with] the Korath. Perhaps you could visit Rek, and [invite, welcome] her Korath friends to [witness, inspect] the work we are doing here? Our hope is that our next [settlement, project] will be a [joint effort?] with them."`
			choice
				`	"Sure, I would be glad to do that."`
					accept
				`	"What about dealing with the Sestor drones?"`
			`	"There will be [time, opportunity] for that later," says Iriket. "They are not a [threat, pressing concern] to us at this time."`
			`	You agree to visit the Kor Efreti and invite them to come back here for a visit.`
				accept



mission "Wanderers: Tour 2"
	landing
	name "Kor Efret Diplomacy"
	description "Escort a Kor Efret ship back to <planet> for a diplomatic visit."
	source "Setar Fort"
	destination "Desi Seledrak"
	to offer
		has "Wanderers: Tour 1: done"
	on offer
		log "Leading some of the friendly Korath on a tour through Wanderer space, to show them how successful the Wanderers have been at repairing and caring for worlds that have been damaged by war."
		conversation
			`Rek is making marvelous progress not only in learning the Korath language, but also in winning their trust. They have built her a Wanderer-style treehouse here to live in, and it seems that she is entertaining a constant stream of new visitors. "What can I help you with?" she asks.`
			choice
				`	"The Wanderers on <planet> want to invite some Kor Efret leaders to visit them."`
					goto visit
				`	"What is your impression of the Korath so far?"`
			`	She says, "We Wanderers have seen the ruins left behind by so many failed species. It puzzles us greatly to wonder why some are able to transition to a strong and stable and sustainable civilization, as we have done, while others descend into chaos. The Kor Efret hope that what they build out of the ashes will finally be a society of true peace and prosperity."`
			label visit
			`	You tell her about the Wanderer invitation, and she takes you to visit some of the Korath leaders. They are eager to learn more about the Wanderers, but after some negotiation they make it clear that they would prefer to travel in one of their own ships, and with Rek as their guest, rather than going as your passengers.`
			choice
				`	(Agree to escort their ship to <planet>.)`
					accept
				`	"I think you might be safer if you travel aboard my ship."`
			`	Rek talks with them for a while, then explains to you, "They want to be in control of their own journey, rather than being no more than 'living cargo' aboard an alien ship. It sounds like this is a matter of honor." Since it seems like the only option, you agree to let them follow you to <planet> in their own ship.`
				accept
	on visit
		dialog "You've reached your destination, but the Korath ship is not here yet."
	npc accompany save
		government "Kor Efret"
		personality escort
		ship "Korath World-Ship" "Asikimi Ko Cheska"



mission "Wanderers: Tour 3"
	landing
	name "Kor Efret Tour"
	description "Escort a Kor Efret ship to <planet>, to give them a taste of what Wanderer terraforming of a world can achieve."
	source "Desi Seledrak"
	destination "Vara K'chrai"
	to offer
		has "Wanderers: Tour 2: done"
	on offer
		conversation
			`The Kor Efret ship lands next to yours, and Rek brings their leaders to meet with the Wanderers. They spend nearly the whole day being led around the settlement, asking questions and inspecting the Wanderer terraforming equipment. But at last, one of the Korath leaders says, "How long until we will see the change here? How long until it will be clear that your plans will work?"`
			`	When Tema'a Iriket, translating through Rek, explains that it will take centuries, the leader says, "Can you show us a world where you have completed your work?"`
			`	The Wanderers discuss that, and Tele'ek says, "They should [visit, journey to] <planet>, and be shown what we can achieve at the [apex, conclusion] of our work. Captain <last>, will you [accompany, lead] them to there?"`
			choice
				`	"Sure, I would be glad to."`
					accept
				`	"Are you sure it is safe to let them bring their ship to your homeworld?"`
			`	Tele'ek says, "If we do not [choose, take a risk] to trust them, they will never have [opportunity, impetus] to show themselves trustworthy. So, we will take the [first, catalyzing] step."`
			`	You agree to escort the Kor Efret ship on a journey through the wormhole to <planet>.`
				accept
	on visit
		dialog "You've reached your destination, but the Korath ship is not here yet."
	npc accompany save
		government "Kor Efret"
		personality escort
		ship "Korath World-Ship" "Asikimi Ko Cheska"



mission "Wanderers: Tour 4"
	landing
	name "Kor Efret Tour"
	description "Escort a Kor Efret ship to <planet>, to show them how Wanderer farming worlds are run."
	source "Vara K'chrai"
	destination "Vara Rakak"
	to offer
		has "Wanderers: Tour 3: done"
	on offer
		conversation
			`The Kor Efret are awed by the treetop villages, the towering buildings, and the bustling spaceport here on <origin>. But what moves them most deeply is the wild forests and mountains outside the city. After being led there by some of the local Wanderer leaders, they stand for half an hour just watching the trees swaying in the wind and the birds circling overhead. A few of them make a strange barking, keening noise, and Rek tells you they are weeping: mourning the fact that few places this beautiful and unspoiled are left on their own worlds.`
			`	The Korath are eager to see more places of natural beauty like this one, and the Wanderer leaders suggest that they travel to <planet> next, to see how the Wanderers have built farms that will produce rich crops year after year without depleting the soil.`
				accept
	on visit
		dialog "You've reached your destination, but the Korath ship is not here yet."
	npc accompany save
		government "Kor Efret"
		personality escort
		ship "Korath World-Ship" "Asikimi Ko Cheska"



mission "Wanderers: Tour 5"
	landing
	name "Kor Efret Tour"
	description "Escort a Kor Efret ship to <planet>, where the Wanderers are battling the Unfettered."
	source "Vara Rakak"
	destination "Varu Tev'kei"
	to offer
		has "Wanderers: Tour 4: done"
	on offer
		conversation
			`The Korath are very interested to see how the farms here work. "We are trying to learn to do this on our worlds," one of them explains, "but there has been blight, and drought, and crops that fail for reasons we do not even understand." The Wanderer scientists here do their best to explain how they keep the crops and the soil healthy, with Rek working hard to translate their technical jargon into terms that the Korath can understand.`
			`	When they have completed their tour, Rek says to you in your own language, "<first>, I think we should show them <planet> next. We should show them the war with the Unfettered. If they see that we are few in number, embattled, with only a handful of worlds, they will feel less threatened by us."`
			choice
				`	"That sounds like a good idea."`
					goto end
				`	"What if seeing you as less of a threat emboldens them to attack you?"`
			`	Rek says, "We are still more numerous and more advanced. And besides, wars are started by fear as often as they are started by aggression."`
			label end
			`	You agree to escort the Korath ship to <planet>. Hopefully they won't be blown to bits by an Unfettered fleet; that would be quite a diplomatic disaster.`
				accept
	on visit
		dialog "You've reached your destination, but the Korath ship is not here yet."
	npc accompany save
		government "Kor Efret"
		personality escort
		ship "Korath World-Ship" "Asikimi Ko Cheska"
	npc
		system "Ap'arak"
		government "Hai (Unfettered)"
		personality staying heroic
		fleet "Large Unfettered" 2



mission "Wanderers: Tour 6"
	landing
	name "Kor Efret Tour"
	description "Escort the Kor Efret ship back through the Eye to <planet>."
	source "Varu Tev'kei"
	destination "Setar Fort"
	to offer
		has "Wanderers: Tour 5: done"
	on offer
		conversation
			`The Korath ship lands safely on <origin>. Rek explains to the Korath that the entire Wanderer territory was once controlled by the Hai, but that the Hai ruined these worlds and abandoned them. She tells them that now that the Wanderers have completed their work of healing these worlds, they are returning them to the Hai.`
			`	It's a somewhat slanted story, and the Korath are dubious. "If you have done them this great favor," one of them asks, "why are they attacking you?"`
			`	Rek explains that the Hai wanted these worlds back before the Wanderers were ready to give them back, and the same Korath says, "So, if we allow you to spread to our worlds, you will return them to us not when we ask you to, but when you decide you are done?"`
			`	Rek tries to assure them that in their own territory, they will be working and living side by side with the Wanderers, in joint control of their worlds. It's not clear if they believe her. "We have seen enough," says the same Korath. "We will return to our world now." You agree to escort them back through the Eye and to make sure they reach <planet> safely.`
				accept
	on visit
		dialog "You've reached your destination, but the Korath ship is not here yet."
	npc accompany save
		government "Kor Efret"
		personality escort
		ship "Korath World-Ship" "Asikimi Ko Cheska"



mission "Wanderers: Tour 7"
	landing
	name "Return to <planet>"
	description "Return to <planet> with Rek's report from the Kor Efret diplomatic tour."
	autosave
	source "Setar Fort"
	destination "Desi Seledrak"
	to offer
		has "Wanderers: Tour 6: done"
	on offer
		conversation
			`You have escorted the Korath world-ship safely back to their home. Hopefully what they saw on their journey will make them more eager to be friends with the Wanderers, rather than less. Rek hands you a written report that she says is an account of the diplomatic mission and says, "Please deliver this to Sobari Tele'ek on <planet>."`
			choice
				`	"Okay, I'll do that."`
					accept
				`	"Do you think the mission was a success?"`
			`	"I hope so," she says. "The true test will be how we treat the Kor Efreti in the days to come. Clearly it will take some effort to earn their trust."`
			`	You return to your ship, and get ready to travel to <planet>.`
				accept



mission "Wanderers: Sestor Scanning"
	landing
	name "Scan Sestor Planets"
	description "Scan all the habitable planets in Sestor space to attempt to find where the control center for the automata is located."
	autosave
	source "Desi Seledrak"
	to offer
		has "Wanderers: Tour 7: done"
	blocked "You will need <capacity> to take on the next mission."
	cargo "scanning equipment" 3
	clearance
	infiltrating
	stopover "Sopi Lefarkata"
	stopover "Keneska Fek"
	stopover "Sasirka Gatru"
	stopover "Sestor Ikfar"
	stopover "Drekag Firask"
	stopover "Firka Tesk"
	on offer
		log "Agreed to travel through Kor Sestor space, scanning the planets to try to look for the facility that is remotely controlling the Kor Sestor drones."
		conversation
			`The Wanderers are eager to hear the results of your diplomatic mission, and whatever is in Rek's report seems to encourage them. Tele'ek says, "If we can [deal with, neutralize] the Kor Sestor drones as well, all of Korath space will be [open, available] for us and for the Korath survivors. Then there will be no more [barriers, impediments] to peace."`
			choice
				`	"If you combined your fleet with the Kor Mereti, you could destroy the Kor Sestor drones outright."`
				`	"If the Sestor drones are being controlled remotely, we should try to find the control station and take it over, or destroy it."`
					goto next

			`	"With great [destruction, loss] of life," says Tema'a Iriket. "That is not [acceptable, moral]. We should seek a more [subtle, elegant] solution."`

			label next
			`	After some discussion, the Wanderers agree that the best way to deal with the Sestor drones is to try to figure out where their control center is. "Their communications are [untraceable, undetectable]," says Tele'ek, "but surely the [control center, communications hub] will be well defended. So by [hunting, searching] for a well defended [site, installation] we may find it."`
			`	Iriket says, "I can supply Captain <last> with [surveying?] scanners and [ground-penetrating radar?] from the terraforming team. Such a [facility, installation] might well be deep underground."`
			`	The Wanderers begin loading the scanning equipment onto your ship, and ask you to land on each of the planets in Kor Sestor space to collect measurements. "Bring the [data, results] back to us to be analyzed," says Iriket.`
				accept
	on visit
		dialog phrase "generic stopover on visit"
	on stopover
		dialog `That was the last of the Kor Sestor planets that the Wanderers asked you to scan. Time to return to <planet> with the data.`



event "wanderers: battle in solifar begins"
	system Solifar
		fleet "Wanderer Flycatchers" 400

event "wanderers: battle in solifar ends"
	system Solifar
		fleet "Large Quarg" 3000
		fleet "Wanderer Defense" 1800
		fleet "Wanderer Drones" 700
		fleet "Wanderer Flycatchers" 800

mission "Wanderers: Sestor Attack"
	landing
	name "Defend <planet>"
	description "<planet> is under attack by a Kor Sestor fleet. Drive them off, then return to the planet to figure out what to do next."
	source "Desi Seledrak"
	to offer
		has "Wanderers: Sestor Scanning: done"
	on offer
		conversation
			`A few hours after you present the scanning data to the scientists, you are called into a meeting with the Wanderer leaders. "We may have found the [facility, center]," says, Tele'ek, "but we are not [certain, confident]. There is indeed an underground [bunker, fortress] on one of the planets, but it must have been [damaged, overrun] in the course of their war." He calls up a holographic display of the facility, showing that one section of it has been breached, and a tunnel leads from there to the surface.`
			choice
				`	"You're probably right that they wouldn't have kept using the facility once it was been breached."`
				`	"Is there any sign that they tried to rebuild it after the damage? Or that it's still in use?"`

			`	Iriket walks up closer to the display to look on it. She adjusts some controls, and an overlay shows up in another color. "The Kor Efret said their [civil war, cultural collapse] ended a century ago, yes?" she asks. You nod. She walks around the display, examining it carefully, then says, "These [cracks, fractures] in the [bedrock?] have not yet been [infiltrated, saturated] with ground water. This damage is not a century old. It is from at most one [month?] ago."`
			choice
				`	"Could it be that whoever was living down there decided to give up and return to the surface?"`
				`	"Does that mean that someone else captured the facility before we could?"`

			`	Suddenly, you hear the noise of alarm sirens from the spaceport, and a messenger comes bursting into the room, his talons screeching across the floor as he skids to a stop. "Sestor drones!" he says. "[Enormous, overwhelming] fleet. Need all [defenders, fighters] immediately."`
			`	You return to your ship and quickly fire up the engines...`
				launch
	on enter
		dialog `There is indeed a Kor Sestor fleet here, but it is nowhere near as large as the messenger indicated. Either the messenger was exaggerating, or some of the fleet has already fled.`
	on visit
		dialog `There are still Kor Sestor ships overhead. You should take off and rejoin the battle.`
	on accept
		event "wanderers: battle in solifar begins"
	on complete
		event "wanderers: battle in solifar ends"
	npc evade
		government "Kor Sestor"
		personality staying heroic
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 7
				"Met Par Tek 53"
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 7
				"Met Par Tek 53"
	npc evade
		government "Kor Sestor"
		personality entering heroic
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek"
				"Tek Far 78 - Osk"
				"Far Lek 14" 17
				"Far Osk 27" 13
				"Met Par Tek 53 (Sniper)" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109" 3
				"Far Lek 14" 27
				"Far Osk 27" 21
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 7
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 6
	npc
		government "Wanderer"
		personality staying heroic
		fleet
			names "wanderer"
			variant
				"Hurricane (Turret)"
				"Tempest"
				"Derecho (Turret)"
		fleet
			names "wanderer"
			variant
				"Tempest (Heavy)"
				"Strong Wind"
		fleet
			names "wanderer"
			variant
				"Autumn Leaf"
				"Summer Leaf"
	npc
		government "Wanderer"
		personality heroic
		fleet
			names "wanderer"
			variant
				"Autumn Leaf"
				"Summer Leaf" 3
		fleet
			names "wanderer"
			variant
				"Hurricane (Tough)"
				"Derecho"
				"Tempest (Missile)" 2
	npc
		government "Kor Mereti"
		personality heroic
		system "Faronektu"
		fleet
			names "kor mereti"
			variant
				"Model 512"
				"Model 256"
				"Model 64"
				



event "wanderers: kor sestor are aimless"
	fleet "Small Kor Sestor"
		personality
			timid
			coward
	fleet "Large Kor Sestor"
		personality
			timid
			coward
	system "Mesuket"
		fleet "Large Kor Mereti" 900
		fleet "Large Kor Sestor" 5000
	system Eshkoshtar
		remove fleet "Large Kor Sestor"
	system Salipastart
		remove fleet "Large Kor Sestor"
	system Mekislepti
		remove fleet "Large Kor Sestor"
	system Similisti
		remove fleet "Large Kor Sestor"
	system Faronektu
		remove fleet "Large Kor Sestor"
	planet "Varu K'prai"
		landscape land/beach1
		add description `	There used to be a thriving spaceport here, but it has been razed to the ground by the Kor Sestor fleet.`
		remove spaceport
		remove outfitter
		remove "required reputation"
		remove tribute
	planet Zenith
		bribe 0
		"required reputation" 1000
	"reputation: Pirate" <?= -1
	"unvisit planet" "Varu K'prai"

mission "Wanderers: Sestor Search"
	landing
	name "Find the Sestor fleet"
	description "A large Kor Sestor fleet passed through the wormhole to Wanderer space. Figure out where they went and what they are doing there."
	autosave
	source "Desi Seledrak"
	to offer
		has "Wanderers: Sestor Attack: done"
	to complete
		never
	destination "Vara K'chrai"
	on offer
		log "Someone else seems to have located the Kor Sestor command center before the Wanderers did, and has taken control of the Kor Sestor fleet. Most of the Kor Sestor drones flew through the Eye into the old Wanderer territory, where the Wanderers will probably not be prepared to fight them."
		event "wanderers: kor sestor are aimless"
		conversation
			`You return to the planet expecting the Wanderers to be celebrating their victory, but the leaders have grim news. "The drones we fought were only the [rearguard? remnant?] of the fleet," says Tele'ek. "Dozens of [capital ships?] passed through this system and continued on. With this [heading, destination]." On the holographic projector, he brings up a star map, and points to the system where the Eye is. The wormhole leading back to Wanderer space.`
			`	Tele'ek says, "Every ship we can spare must [pursue, follow] the Sestor drones through the Eye, and hope that we [locate, track down] the drones before they can cause [harm, destruction] to our people." You should probably join them.`
				accept
	on visit
		dialog `You've returned to <planet>, but you haven't yet found out where the Sestor fleet has gone. Keep searching for it; it's dangerous letting such a powerful hostile fleet roam free.`
	to fail
		has "wanderers: found the sestor fleet"
	on enter "Aya'k'k"
		dialog
			`A major battle was fought here. The burned-out hulks of several Wanderer ships are floating around in space, along with a handful of disabled Kor Sestor ships. Meanwhile, Wanderer ships are engaged in some sort of rescue or evacuation process on the surface of Varu K'prai. But there is no sign of the bulk of the Kor Sestor fleet.`
	npc
		system "Aya'k'k"
		government "Wanderer"
		personality derelict uninterested
		fleet "Wanderer Defense"
		fleet "Wanderer Freight" 2
	npc
		system "Aya'k'k"
		government "Kor Sestor"
		personality derelict uninterested
		fleet "Large Kor Sestor"
	on enter "Alnilam"
		set "wanderers: found the sestor fleet"
		dialog
			`Quite a few Kor Sestor ships are in orbit around the anarchist world of Zenith, and you detect many more on the surface. Strangely, the Kor Sestor ships are not attacking the local pirate and anarchist fleets.`
			`	That is probably not a good sign.`



mission "Wanderers: Sestor: Alnilam Fleet 1"
	landing
	invisible
	destination "Farpoint"
	to offer
		has "Wanderers: Sestor Attack: done"
	npc kill
		government "Kor Sestor"
		system Alnilam
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Met Par Tek 53" 3



mission "Wanderers: Sestor Search: Vara K'chrai"
	landing
	source "Vara K'chrai"
	to offer
		has "Wanderers: Sestor Search: active"
	on offer
		conversation
			`Everyone in the spaceport on Vara K'chrai is still in a panic from watching the Kor Sestor fleet fly through their system, but fortunately the drones did not attack the planet. In fact, they did not even fire on the Wanderer ships that were in orbit at the time. The Wanderer defenders, not wanting to provoke a fight with a fleet they could probably not defeat, did not attack either. So, the Kor Sestor fleet passed peacefully through this system and continued on to... wherever it is going. No one here has any idea yet what the fleet's destination was.`
				decline



mission "Wanderers: Sestor Search: Varu Tev'kei"
	landing
	source "Varu Tev'kei"
	to offer
		has "Wanderers: Sestor Search: active"
	on offer
		conversation
			`The defenders on <planet> have heard of the Kor Sestor incursion into Wanderer space, but they tell you that the fleet did not pass through this system. And here, they are clearly too worried about the Unfettered threat to be able to think about fighting a war on a second front at the same time.`
				decline



mission "Wanderers: Sestor Search: Varu K'prai"
	landing
	source "Varu K'prai"
	to offer
		has "Wanderers: Sestor Search: active"
	on offer
		conversation
			`The entire spaceport on <planet> has been razed to the ground. Teams of Wanderers are sifting through the rubble to recover the bodies of those who were killed here. Apparently the Kor Sestor fleet destroyed the spaceport and every Wanderer ship it found in this system, and then occupied the system for several days, destroying or driving away any scout ships that entered the system.`
			`	The Wanderers don't know what happened next, but the drones are no longer here. Perhaps they have moved beyond Wanderer space.`
				decline



mission "Wanderers: Sestor Search: Human Spaceport"
	landing
	invisible
	source
		government "Republic" "Free Worlds" "Syndicate" "Neutral"
		attributes "north"
	to offer
		has "Wanderers: Sestor Search: active"
	on offer
		conversation
			`As you bring your ship in for landing at an empty pad, you notice the captain of an adjacent Behemoth inspecting his ship, which is raked with projectile punctures.`
			choice
				`	(Approach the captain and try to find out what happened.)`
					goto approach
				`	(Ignore him.)`
					decline
			
			label approach
			`	You get a better view of the Behemoth - the "Heart of Gold", as indicated on the ship's stern - as you walk up to it. The rear of the ship is badly hammered, and black scorch marks streak forward across the hull. You can't help but notice that at several projectile entry points along the hull, the metal is bent smoothly inwards, almost as if the penetrator seared or melted its way through the ship's armor. The captain of the Behemoth looks up from his inspection. Seeing you, he says, "We were lucky to get out of that one alive!"`
			choice
				`	"How did your ship end up in such a state?"`
				`	"Was this beauty the victim of a pirate attack?"`
				
			`	"I'm not quite sure," the captain says. "We were shot at by a fleet of hostile ships that our computer couldn't identify. They didn't look at all like a run-of-the-mill pirate ship, though, and they were kitted out with tech I've never seen before."`
			choice
				`	"How many ships were there? What did they look like?"`
				`	"Where did this fight take place?"`
					goto where
				`	"You should be glad you're still in one piece."`
					goto glad1
					
			`	"Well," the pilot says, "we had hired a beefy Leviathan escort to Farpoint in the Alnitak system. When we were going in for landing, two of these hostile ships jumped in from the northwest, the direction of all the anarchist colonies in this area. The ships weren't big, but they were tough: our four heavy laser turrets weren't enough to produce even a dent in their shields. They made short work of the Leviathan, and nearly disabled our ship, too. It was lucky I decided that jumping would be faster than landing. We warped out of the system while in atmosphere, saving the ship, but now I'm in debt to all my crew because I couldn't meet a rush delivery deadline."`
			choice
				`	"You're lucky as hell to be here today."`
					goto glad
				`	"Thanks for the information. I think that these hostile ships are the ones I'm looking for."`
					goto thanks
					
			label where
			`	"Well," the pilot says, "we were doing a large cargo run to Farpoint in the Alnitak system, when two of these hostile ships jumped in from the northwest, the direction of all the anarchist colonies in this area. I had to jump the ship in atmosphere to stop us from getting shredded by their strange melting weaponry. I immediately reported the attack to a desk clerk at the Navy base in the neighboring system Saiph, but their servers show no logs of any unidentified ships beyond Farpoint, so I guess they turned around after scouting out the Alnitak system."`
			choice
				`	"You're lucky as hell to be here today."`
					goto glad
				`	"Thanks for the information. I think that these hostile ships are the ones I'm hunting."`
					goto thanks
			
			label glad1
			`	"I am! The attacking ships weren't big, but they were tough: our four heavy laser turrets couldn't even produce a dent in their shields," the captain says. "We even hired a beefy Leviathan to protect us from the pirate raids as we traveled to Farpoint, but when these hostile ships jumped in from the northwest, they made short work of our escort and nearly disabled our ship, too. I had to jump out of the system while in atmosphere to save the ship, but now I'm in debt to all my crew because I didn't meet a rush delivery deadline."`
			choice
				`	"You really are lucky as hell to be here today."`
					goto glad
				`	"Thanks for the information. I think that these hostile ships are the ones I'm looking for."`
					goto thanks
			
			label thanks
			`	"No problem, kiddo," the captain says, although he looks awed that you are even attempting to fight such powerful ships. "Remember, northwest of Farpoint. If they're anarchists of any sort, they'll be hiding in one of those pirate systems up there. Take care of yourself out there; those are some dangerous ships that jumped us." With that, he bids you farewell.`
				decline
					
			label glad
			`	"Yeah, those ships would have obliterated us if we hadn't jumped pronto." The pilot looks at you, then asks quizzically, "Say, do you know anything about those ships?"`
			choice
				`	"Yeah, those were Korath ships that attacked you."`
				`	"Maybe. I have a feeling that they're the alien ships that I'm hunting."`
				`	"I don't want to jump to any conclusions."`
					goto no
					
			`	"Aliens?" The pilot's face reddens, and his eyes narrow in anger. "Like those detestable squirrels, you mean? Told me they were peaceful, but when I went further north, I nearly had my ship torn to pieces!" You try to tell him that the Hai are a separate species from the Korath, but he clearly does not want to hear any more, so you decide to bring the conversation to an end.`
				goto end
				
			label no
			`	The pilot seems disappointed in your response, so you decide to bring the conversation to an end.`
				goto end
				
			label end
			`	"Thank you for your time," you say to the captain.`
			`	The pilot sobers up again, and says, "No problem. Remember, northwest of Farpoint. If they're anarchists of any sort, they'll be hiding in one of those pirate systems up there. Take care of yourself out there; those were dangerous ships we faced." With that, he bids you farewell.`
				decline



mission "Wanderers: Sestor Search: Human Hint"
	landing
	name "Warn Admiral Danforth"
	description "Meet with Admiral Danforth on <planet> as soon as possible, to warn him of the possible threat from the Kor Sestor fleet."
	source
		near "Alnitak" 1 100
	destination "Farpoint"
	to offer
		has "wanderers: found the sestor fleet"
		not "Wanderers: Sestor Search: Wanderer Hint: offered"
		not "Wanderers: Sestor: Farpoint Attack 1: offered"
	on offer
		conversation
			`You've located the Kor Sestor fleet, in the Alnilam system. The Republic Navy is probably ill-equipped to fight such powerful alien ships, but they may be the only thing standing in the way of an outright invasion of human space. You should warn Admiral Danforth and the Oathkeepers of the impending threat as soon as possible.`
				accept



mission "Wanderers: Sestor Search: Wanderer Hint"
	landing
	name "Warn Admiral Danforth"
	description "Meet with Admiral Danforth on <planet> as soon as possible, to warn him of the possible threat from the Kor Sestor fleet."
	source
		government "Wanderer"
	destination "Farpoint"
	to offer
		has "wanderers: found the sestor fleet"
		not "Wanderers: Sestor Search: Human Hint: offered"
		not "Wanderers: Sestor: Farpoint Attack 1: offered"
	on offer
		conversation
			`You've located the Kor Sestor fleet, in the Alnilam system. The Republic Navy is probably ill-equipped to fight such powerful alien ships, but they may be the only thing standing in the way of an outright invasion of human space. You should warn Admiral Danforth and the Oathkeepers of the impending threat as soon as possible.`
				accept



mission "Wanderers: Sestor: Farpoint Attack 1"
	landing
	name "Defend Farpoint"
	description "Farpoint is under attack by a Kor Sestor fleet. Drive them off, then return to the planet to speak with Admiral Danforth."
	source "Farpoint"
	to offer
		has "wanderers: found the sestor fleet"
	on offer
		log "The Kor Sestor fleet has somehow made its way into northern human space, perhaps using a small number of jump drives to ferry ships back and forth the same way that the Unfettered invaders did. Admiral Danforth says that the system where the Korath ships have gathered is home to a secret Alpha base, so he is concerned that the Kor Sestor drones are under Alpha control."
		conversation
			`As you are coming in for a landing, you contact Admiral Danforth and ask to speak with him as soon as possible. He meets you at the landing pad and invites you back to his office, where you explain about the large Kor Sestor fleet that is now gathering to the north of here. He tells you, "For the past several months, Intelligence has been tracking a hidden Alpha base on Zenith and making plans to trap and exterminate them. And now you tell me that Zenith is being guarded by Korath drones. It seems unlikely to be a coincidence."`
			choice
				`	"Could the Kor Sestor have made some sort of deal with the Alphas?"`
				`	"Maybe the Alphas gained control of the Kor Sestor fleet somehow?"`
					goto next

			`	"That would assume that some of the Korath who controlled the Sestor fleet are still alive," he says. "Is there evidence that that is the case?"`

			label next
			`	You tell him about the underground bunker that the Wanderers discovered, and the signs that someone either recently departed from it, or recently infiltrated it from the surface. He says, "We already know that a group of Alphas was active in that region of space. You and I fought them there just recently, and failed to capture them. I bet that after they fled, they somehow gained access to the Kor Sestor bunker and took over control of the drone fleets."`
			`	It is not particularly surprising when, a few seconds after he says that, an alarm siren begins to sound...`
				launch
	on visit
		dialog `There are still Sestor warships overhead. You should take off again and assist in the fight.`
	npc evade
		government "Kor Sestor"
		personality heroic staying
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349"
				"Tek Far 71 - Lek"
				"Far Lek 14" 10
				"Met Par Tek 53" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Kar Ik Vot 349 (Trapper)"
		dialog `The Kor Sestor fleet has been driven off. Time to land and see what Danforth thinks you should do next.`
	npc
		government "Navy (Oathkeeper)"
		personality heroic
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier (Mark II)"
				"Lance" 4
				"Combat Drone" 6
				"Cruiser (Mark II)"
				"Combat Drone" 4
				"Frigate (Mark II)" 2
				"Rainmaker (Mark II)" 2
				"Gunboat (Mark II)" 2
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Cruiser"
				"Combat Drone" 4
				"Frigate"
				"Rainmaker"
	npc
		government "Navy (Oathkeeper)"
		personality heroic staying
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier (Mark II)"
				"Lance" 4
				"Combat Drone" 6
				"Cruiser (Mark II)"
				"Combat Drone" 4
				"Frigate (Mark II)" 2
				"Rainmaker (Mark II)" 2
				"Gunboat (Mark II)" 2
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Cruiser"
				"Combat Drone" 4
				"Frigate"
				"Rainmaker"
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Carrier"
				"Lance" 4
				"Combat Drone" 6
				"Frigate" 3



mission "Wanderers: Sestor: Quarg Help 1"
	landing
	name "Ask the Quarg for help"
	description "Admiral Danforth asked you to visit <planet> and ask the Quarg if they can provide any ships to help you fight off the Kor Sestor fleet (now presumably under Alpha control)."
	autosave
	source "Farpoint"
	destination "Alta Hai"
	clearance
	to offer
		has "Wanderers: Sestor: Farpoint Attack 1: done"
	on offer
		conversation
			`Admiral Danforth looks like he is still in shock from the carnage and loss of life in the battle that you just fought. "Please tell me that that was the entire drone fleet," he says.`
			`	Sadly, you shake your head. "They have dozens of capital ships," you say. "That was probably just the vanguard of their fleet."`
			`	Danforth sighs. "I got a taste of how powerful these Korath ships are during our attack on the previous Alpha base," he says. "I'm not sure I can stand up against a whole fleet of them. Our only hope may be the Quarg. They have a ringworld in Hai space. In fact, isn't that where we left your friend Elias?" You nod. "You should go there immediately," says Danforth. "Hopefully, you will be able to bring back help in time."`
				accept



mission "Wanderers: Sestor: Quarg Help 2"
	landing
	name "Return to <planet>"
	description "Return to <planet> with this small fleet of Quarg ships."
	source "Alta Hai"
	destination "Farpoint"
	cargo "medical supplies" 2
	blocked "You will need <capacity> to carry supplies back to Farpoint."
	to offer
		has "Wanderers: Sestor: Quarg Help 1: done"
	on offer
		conversation
			`As you are coming in for a landing, you contact the Quarg and discover that Elias Hanover is indeed still living here. He meets you the moment you dock with the station, and you describe the situation. "This must be retaliation," he says. "They want to wipe Danforth and the Oathkeepers off the map to get revenge for him driving them out of their base on Avalon."`
			`	He leaves to try to find help, and returns about fifteen minutes later. "I've got four Quarg ships who volunteered to help," he says. "That may not seem like a lot, but their ships pack quite a punch. And, they've offered some medical supplies as well, which they'll load onto your ship. Good luck, captain."`
			`	You thank him for his assistance, and hurry to fire up your ship and return to human space. Hopefully Danforth's base has not already been overrun in your absence.`
				accept
	on accept
		log "Recruited some Quarg warships to help defend human space from the Kor Sestor drones, which are now presumably under Alpha control."
	npc accompany save
		government "Quarg"
		personality heroic waiting escort
		ship "Quarg Wardragon" "Leukos-nikeseh"
		ship "Quarg Wardragon" "Purros-machaira"
		ship "Quarg Wardragon" "Melas-zugon"
		ship "Quarg Wardragon" "Chloros-thanatos"
	npc
		government "Kor Sestor"
		personality heroic staying
		system "Alnitak"
		fleet "Large Kor Sestor" 2
	on visit
		dialog `You've reached <planet>, but you've either left one of the Quarg warships behind, or your escort carrying the medical supplies from Elias hasn't entered the system yet. Better depart and wait for it.`



mission "Wanderers: Sestor: Alnilam Fleet 2"
	landing
	invisible
	source "Farpoint"
	to offer
		has "Wanderers: Sestor: Quarg Help 2: done"
	npc kill
		government "Kor Sestor"
		system "Alnilam"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 10



mission "Wanderers: Sestor: Bomb Zenith 1"
	landing
	name "Deliver device to Zenith"
	description "Admiral Danforth asked you to drop this device (presumably a bomb) above the Alpha base on <destination>."
	source "Farpoint"
	destination "Zenith"
	clearance
	infiltrating
	to offer
		has "Wanderers: Sestor: Quarg Help 2: done"
	cargo "unknown device" 2
	on offer
		log "Danforth believes that he has located the Alpha base from which the drones are being controlled; if the base is destroyed the drones ought to become aimless and be easily defeated."
		conversation
			`Danforth is still alive, and still holding out against the Alpha-controlled drones. After directing several recruits to unload the medical supplies, he tells you, "The Alpha base we've been watching on <planet> is buried deep underground. I'm hoping that the Alphas either don't know we're aware of their base's location, or have chosen to remain there anyway because it is so well defended. If the drones are being controlled from there, taking out the base might deactivate the drones."`
			choice
				`	"Do you think your troops could capture the base?"`
				`	"Do you have a plan for destroying the Alphas?"`

			`	Danforth says, "The base is several kilometers underground. Before it was guarded by Sestor drones, we had a chance. We could have landed dozens of troop transports and fought our way inside, albeit with heavy losses. But now, I doubt our troops could even make it to the surface."`
			`	As he is speaking, two Navy officers approach your ship with a hover-cart carrying something that looks a little bit like a retrofitted Typhoon Torpedo. They salute Danforth, and he tells them, "Put it aboard Captain <last>'s ship." Then he turns to you. "I'm going to give you the coordinates of the Alpha base," he says. "It's on the polar continent, deep under the ice. Fortunately there are no other human settlements nearby."`
			`	He pauses, as if to resign himself to what he is about to command you to do, and then says, "Land on the planet, drop this device at the coordinates, and then get the hell out of there. You'll have fifteen seconds after you deploy the device to get at least a thousand kilometers away."`
			choice
				`	"Wait, is this a nuke? I thought the Navy was too principled to use them."`
				`	"Okay, I'll do what you say."`
					goto end

			`	"Just drop the damn thing and get out of there, fast," he says. Clearly he doesn't want to tell you anything more about the weapon's origin.`

			label end
			`	Alarm sirens begin to sound. "Don't wait here to defend us," says Danforth. "Go straight to <planet> and deploy the device. It may be the only way you can save us."`
				launch
	on enter
		dialog
			`Danforth wasn't joking when he said that the device may be your only chance. There are almost a dozen Sestor capital ships in the system, and countless smaller craft tearing the Navy to shreds.`
			`Even the Quarg warships are having trouble with an opposing fleet this size. Perhaps a more powerful fleet could defeat the automata, but it would be a difficult battle.`
	on visit
		dialog `You go to push the device out of the airlock, but realize that you left it on one of your escorts. Better depart and wait for it to enter the system.`
	on complete
		fail "Wanderers: Sestor: Farpoint Attack 2"
	to fail
		has "Wanderers: Sestor: Farpoint Attack 2: done"



mission "Wanderers: Sestor: Farpoint Attack 2"
	landing
	invisible
	source "Farpoint"
	to offer
		has "Wanderers: Sestor: Quarg Help 2: done"
	on visit
		dialog `Danforth notices your ship land as the sky lights up with the explosions of Navy ships. "Did you use the bomb?" he asks. The stress in his voice is palpable. You shake your head. "Then what the hell are you doing here? Get up there and drop the bomb already!"`
	npc
		government "Quarg"
		personality heroic staying
		ship "Quarg Wardragon" "Leukos-nikeseh"
		ship "Quarg Wardragon" "Purros-machaira"
		ship "Quarg Wardragon" "Melas-zugon"
		ship "Quarg Wardragon" "Chloros-thanatos"
	npc
		government "Navy (Oathkeeper)"
		personality heroic staying
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier (Mark II)"
				"Lance" 4
				"Combat Drone" 6
				"Cruiser (Mark II)"
				"Combat Drone" 4
				"Frigate (Mark II)" 2
				"Rainmaker (Mark II)" 2
				"Gunboat (Mark II)" 2
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Cruiser"
				"Combat Drone" 4
				"Frigate"
				"Rainmaker"
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier"
				"Lance" 4
				"Combat Drone" 6
				"Cruiser"
				"Combat Drone" 4
				"Frigate" 2
				"Rainmaker" 2
				"Gunboat" 2
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Cruiser (Mark II)"
				"Combat Drone" 4
				"Frigate (Mark II)"
				"Rainmaker (Mark II)"
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Carrier (Mark II)"
				"Lance" 4
				"Combat Drone" 6
				"Frigate (Mark II)" 3
	npc evade
		government "Kor Sestor"
		personality heroic staying
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349"
				"Tek Far 71 - Lek"
				"Far Lek 14" 10
				"Met Par Tek 53" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 8
				"Met Par Tek 53 (Sniper)" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 6
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 8
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 71 - Lek"
				"Far Lek 14" 9
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 7
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 7
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 6
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Met Par Tek 53" 2
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Met Par Tek 53"
				"Met Par Tek 53 (Sniper)" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Met Par Tek 53 (Sniper)" 3
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek"
				"Tek Far 78 - Osk"
				"Far Lek 14" 17
				"Far Osk 27" 13
				"Met Par Tek 53 (Sniper)" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek (Close Quarters)"
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Lek 14" 17
				"Far Osk 27" 13
				"Met Par Tek 53" 2
		dialog `Against all odds, all the Kor Sestor ships attacking the Oathkeepers have been destroyed. Maybe you won't have to use Danforth's bomb after all.`



mission "Wanderers: Sestor: Scattered Remnant"
	landing
	invisible
	source "Zenith"
	destination "Farpoint"
	to offer
		has "Wanderers: Sestor: Bomb Zenith 1: done"
	npc kill
		system "Alnitak"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349"
				"Tek Far 71 - Lek"
				"Far Lek 14" 10
				"Met Par Tek 53" 2
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Canopus"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 8
				"Met Par Tek 53 (Sniper)" 2
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Betelgeuse"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
				"Met Par Tek 53 (Sniper)"
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 6
				"Met Par Tek 53 (Sniper)"
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Capella"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 8
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Mebsuta"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 71 - Lek"
				"Far Lek 14" 9
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 7
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Rigel"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Tek Far 71 - Lek (Close Quarters)"
				"Far Lek 14" 7
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Osk 27" 6
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Castor"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Defense)"
				"Met Par Tek 53" 2
				"Met Par Tek 53 (Sniper)"
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Wazn"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Met Par Tek 53"
				"Met Par Tek 53 (Sniper)" 2
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Miaplacidus"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Trapper)"
				"Met Par Tek 53 (Sniper)" 3
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Kursa"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek"
				"Tek Far 78 - Osk"
				"Far Lek 14" 17
				"Far Osk 27" 13
				"Met Par Tek 53 (Sniper)" 2
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
	npc kill
		system "Saiph"
		government "Kor Sestor"
		personality heroic staying target
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek (Close Quarters)"
				"Tek Far 78 - Osk (Close Quarters)"
				"Far Lek 14" 17
				"Far Osk 27" 13
				"Met Par Tek 53" 2
		dialog `All of the Kor Sestor ships in this system have been eliminated.`
		


event "bombed zenith"
	government "Kor Sestor"
		"attitude toward"
			"Pirate" -.01
	planet "Zenith"
		description `Zenith is a cold and unpleasant world, where the fog seldom lifts and the sun is rarely seen, where much of the lowlands are flooded each day by the tide, and storms are unpredictable and fierce. It has, however, one major advantage as a place to settle: it is far enough away that the Republic makes no attempt to control it.`
		description `	The settlements here were never more than tenuous villages operating on the brink of starvation as they sought to make a living in this icy wilderness. Now, many of them have collapsed due to massive earthquakes that came after the Oathkeepers had the planet bombed to destroy an Alpha base.`
		bribe .04
		"required reputation" 0
	system "Alnilam"
		object
			sprite star/f5
			period 10
		object
			sprite planet/desert1
			distance 224.69
			period 32.5315
		object
			sprite planet/gas7
			distance 966.7
			period 290.312
			object
				sprite planet/miranda
				distance 220
				period 10.5884
			object
				sprite planet/luna
				distance 305
				period 17.2841
		object "Zenith"
			sprite "planet/zenith hot"
			distance 1776.59
			period 723.284
			object
				sprite planet/ice8
				distance 136
				period 16.5247
		object
			sprite planet/gas2
			distance 2758.68
			period 1399.52
			object
				sprite planet/dust1
				distance 200
				period 12.5708
			object
				sprite planet/lava0
				distance 330
				period 26.6433
			object
				sprite planet/dust7
				distance 440
				period 41.0201
			object
				sprite planet/desert4
				distance 575
				period 61.2801

event "zenith cooling"
	system "Alnilam"
		object
			sprite star/f5
			period 10
		object
			sprite planet/desert1
			distance 224.69
			period 32.5315
		object
			sprite planet/gas7
			distance 966.7
			period 290.312
			object
				sprite planet/miranda
				distance 220
				period 10.5884
			object
				sprite planet/luna
				distance 305
				period 17.2841
		object "Zenith"
			sprite "planet/zenith cold"
			distance 1776.59
			period 723.284
			object
				sprite planet/ice8
				distance 136
				period 16.5247
		object
			sprite planet/gas2
			distance 2758.68
			period 1399.52
			object
				sprite planet/dust1
				distance 200
				period 12.5708
			object
				sprite planet/lava0
				distance 330
				period 26.6433
			object
				sprite planet/dust7
				distance 440
				period 41.0201
			object
				sprite planet/desert4
				distance 575
				period 61.2801

mission "Wanderers: Sestor: Bomb Zenith 2"
	landing
	name "Return to <planet>"
	description "You have destroyed the Alpha base on Zenith. Return to Farpoint and find out if your intervention allowed Danforth to gain the upper hand against the Kor Sestor fleet."
	source "Zenith"
	destination "Farpoint"
	to offer
		has "Wanderers: Sestor: Bomb Zenith 1: done"
	on offer
		log "Dropped some sort of incredibly destructive bomb on the Alpha base on the anarchist world of Zenith. The explosion tore open a hole straight through the planet's crust."
		event "bombed zenith"
		event "zenith cooling" 40
		conversation
			`You shove Danforth's device out the airlock at the coordinates he gave you, and immediately fire your ship's repulsors full blast to take you back up into orbit...`
				launch
	on enter
		conversation
			`The way Danforth talked about the device he gave you made you assume that it was a nuclear bomb, but the explosion that rocks <origin> a few seconds after you depart is far too powerful for that. The light of the explosion is many times brighter than this system's sun. And unless your sensors are lying to you, there is now a crater near <origin>'s south pole that goes all the way down to the mantle. Lava is filling the hole, and the entire planet's crust is shifting and shivering in response.`
			`	You are glad that no human settlements were near the explosion, but your sensors are picking up compression waves traveling along the whole planet's surface, bouncing across it again and again as the planet rings like a bell. Anyone who lived anywhere on <origin> just got hit by an earthquake of deadly proportions.`
			`	You can only hope that it was worth it, and that the control station has indeed been destroyed.`



mission "Wanderers: Sestor: Kill Southern Remnant"
	landing
	name "Destroy Kor Sestor drones"
	description "When you destroyed the Alpha base, the Kor Sestor drones began acting independently. They are now attacking human space. Help the Navy destroy the drones, then return to <planet>."
	autosave
	source "Farpoint"
	to offer
		has "Wanderers: Sestor: Bomb Zenith 2: done"
	to complete
		has "Wanderers: Sestor: Scattered Remnant: done"
	waypoint "Alnitak"
	waypoint "Betelgeuse"
	waypoint "Canopus"
	waypoint "Capella"
	waypoint "Castor"
	waypoint "Kursa"
	waypoint "Mebsuta"
	waypoint "Miaplacidus"
	waypoint "Rigel"
	waypoint "Saiph"
	waypoint "Wazn"
	on offer
		conversation
			`The base on <planet> appears to have survived the attack, despite the Kor Sestor drones that were overhead. You meet with Danforth and tell him that you destroyed the Alpha base using the weapon he gave you.`
			`	He says, "When you destroyed the base, the Sestor drones suddenly stopped acting as a unified fleet. A few stayed here, but most of them have spread throughout this sector of space, and we are receiving reports that they are attacking Navy and civilian ships indiscriminately. My own fleet is too damaged to do anything to stop them, but other Navy bases are sending in reinforcements. Can you join them to help eliminate the drones?"`
			choice
				`	"Of course, I would be glad to."`
					goto end
				`	"Of course. But first, what the hell was that bomb you had me drop on Zenith? It cracked the whole planet open."`

			`	Danforth sighs. "Unfortunately," he says, "I am not permitted to tell you what that weapon was or how we acquired it. And already news agencies throughout the Republic are questioning our use of such a terrible weapon. I wish we had been able to defeat the Kor Sestor fleet without resorting to such extreme measures, but we had no choice."`

			label end
			`	Danforth gives you a map of the systems where there have been reports of Kor Sestor drones attacking civilian ships. "These, plus any that were left alive in the Alnilam system, are all the automata that we have been able to track," he says. "Report back here once you have succeeded in completely destroying them. We can't risk letting some local warlord capture them. The Navy will hopefully send some ships to help you."`
				accept



mission "Wanderers: Sestor: Remnant Visit"
	landing
	source "Farpoint"
	to offer
		has "Wanderers: Sestor: Kill Southern Remnant: active"
		not "Wanderers: Sestor: Scattered Remnant: done"
	on offer
		conversation
			`You check in with Danforth, but he tells you that there are still reports of Kor Sestor drones in human space. "You'll have to be sure to destroy them completely," he says. "We can't risk letting some local warlord capture them."`
				defer



mission "Wanderers: Sestor: Drones in Alnilam Waypoint"
	landing
	source
	name "Drones in Alnilam"
	description "Eliminate the remaining Kor Sestor fleet in the Alnilam system."
	waypoint "Alnilam"
	to offer
		has "Wanderers: Sestor: Scattered Remnant: done"
		or
			not "Wanderers: Sestor: Alnilam Fleet 1: done"
			not "Wanderers: Sestor: Alnilam Fleet 2: done"
	to complete
		has "Wanderers: Sestor: Alnilam Fleet 1: done"
		has "Wanderers: Sestor: Alnilam Fleet 2: done"



mission "Wanderers: Sestor: Drones in Alnilam"
	landing
	invisible
	source "Farpoint"
	to offer
		has "Wanderers: Sestor: Scattered Remnant: done"
		or
			not "Wanderers: Sestor: Alnilam Fleet 1: done"
			not "Wanderers: Sestor: Alnilam Fleet 2: done"
	to complete
		has "Wanderers: Sestor: Alnilam Fleet 1: done"
		has "Wanderers: Sestor: Alnilam Fleet 2: done"
	waypoint "Alnilam"
	on offer
		conversation
			`When you return to <planet>, Danforth tells you, "It seems that you have dealt with the last of the Kor Sestor drones that were terrorizing Republic space, but we still need to deal with the fleet in the Alnilam system. Do you think you can destroy that fleet on your own?"`
			choice
				`	"Yes, I think I can manage it."`
					defer
				`	"Are any of your ships repaired yet? I could use some assistance."`
			`	He agrees to send some Oathkeeper ships with you to destroy the remaining drones, but it is clear that it pains him to risk the last few ships he has that are still spaceworthy.`
				accept
	on visit
		dialog `You've returned to <planet>, but not all of the Sestor ships in Alnilam have been defeated yet. Return to the system and make sure they are all destroyed.`
	npc
		government "Navy (Oathkeeper)"
		personality heroic escort
		fleet
			names "republic capital"
			fighters "republic fighter"
			variant
				"Carrier (Mark II)"
				"Lance" 4
				"Combat Drone" 6
				"Cruiser (Mark II)"
				"Combat Drone" 4
				"Frigate (Mark II)" 2
				"Rainmaker (Mark II)" 2
				"Gunboat (Mark II)" 2
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Cruiser"
				"Combat Drone" 4
				"Frigate" 2
				"Rainmaker" 4
		fleet
			names "republic capital"
			fighters "republic fighter"
				"Carrier"
				"Lance" 4
				"Combat Drone" 6
				"Frigate" 3
				"Gunboat" 3



mission "Wanderers: Sestor: Return to Wanderers"
	landing
	name "Return to <planet>"
	description "The Kor Sestor drones in human space have been eliminated. Return to <planet> in Wanderer space to find out what is happening there."
	autosave
	source "Farpoint"
	destination "Desi Seledrak"
	to offer
		has "Wanderers: Sestor: Scattered Remnant: done"
		has "Wanderers: Sestor: Alnilam Fleet 1: done"
		has "Wanderers: Sestor: Alnilam Fleet 2: done"
	on offer
		fail "Wanderers: Sestor: Drones in Alnilam"
		log "Succeeded in destroying the last of the Kor Sestor drones that the Alphas brought into human space. Danforth and his Navy base also survived, but he is worried about the political fallout of having to use such a destructive weapon on a populated planet in order to eliminate the Alphas."
		conversation
			`Danforth breathes a sigh of relief when you tell him that the last of the Kor Sestor drones have been destroyed. "I am grateful for your help, Captain <last>," he says. "And now that we have finished with that battle, the public relations nightmare over what we did to Zenith begins. We don't need you to get involved in that, though; perhaps you should return to Wanderer space until things cool down a bit around here."`
				accept



mission "Wanderers: Sestor Alt: Alnilam 1"
	landing
	name "Destroy remaining drones"
	description "Rather than bombing Zenith, destroy any Kor Sestor drones that are left over in the Alnilam system, then report back to Admiral Danforth on Farpoint."
	autosave
	source "Farpoint"
	waypoint "Alnilam"
	to offer
		not "event: bombed zenith"
		has "Wanderers: Sestor: Farpoint Attack 2: done"
		or
			not "Wanderers: Sestor: Alnilam Fleet 1: done"
			not "Wanderers: Sestor: Alnilam Fleet 2: done"
	on offer
		conversation
			`Danforth is impressed that you were able to eliminate the attacking Kor Sestor fleet. "The weapon I gave you was a last resort, and one that I would be ashamed to use," he says. "I have no ships to give you until we have had time to make repairs, but if you are able to destroy whatever Kor Sestor ships remain in the Alnilam system on your own, return here and I will send my troop transports with you to destroy the Alpha base the old-fashioned way."`
				accept
	to complete
		has "Wanderers: Sestor: Alnilam Fleet 1: done"
		has "Wanderers: Sestor: Alnilam Fleet 2: done"



mission "Wanderers: Sestor Alt: Alnilam 2"
	landing
	name "Attack Alpha base"
	description "Travel to the <system> system with these Oathkeeper Cruisers to eliminate the Alpha base on <planet>."
	source "Farpoint"
	destination "Zenith"
	clearance
	to offer
		not "event: bombed zenith"
		has "Wanderers: Sestor: Farpoint Attack 2: done"
		has "Wanderers: Sestor: Alnilam Fleet 1: done"
		has "Wanderers: Sestor: Alnilam Fleet 2: done"
	on offer
		conversation
			`You tell Danforth that you have destroyed the entire Kor Sestor fleet, without needing to bomb <planet>. He is impressed, and grateful. "I'll send some troop transports with you to take out the Alpha base," he says. "It is riskier destroying it this way, but at least the civilians on <planet> will not be harmed."`
			choice
				`	"Understood. We'll go directly to <planet>."`
					goto end
				`	"The anarchist settlers, you mean? You're willing to lose your own troops just to avoid harming the anarchists and pirates by bombing their planet?"`

			`	Danforth says, "If we had used such a terrible weapon on an inhabited planet, even an anarchist one, it would have sullied the good name of the Navy. Compared to that, the loss of a few Navy lives is acceptable, and the troops who volunteered for this mission are willing to risk their lives for that cause."`

			label end
			`	You return to your ship and prepare to escort the troop transports to <planet>.`
				accept
	npc accompany save
		government "Navy (Oathkeeper)"
		personality escort
		ship "Cruiser (Mark II)" "R.N.S. Dauntless"
		ship "Cruiser (Mark II)" "R.N.S. Forthright"
		ship "Cruiser (Mark II)" "R.N.S. Virtue"
	on visit
		dialog `You've reached <planet>, but not all of the Navy Cruisers have entered the system yet. Better depart and wait for them to arrive, because there's no way you're going to assault the Alpha base without them.`



mission "Wanderers: Sestor Alt: Alnilam 3"
	landing
	name "Return to <planet>"
	description "Escort the Oathkeeper Cruisers back to <destination>."
	source "Zenith"
	destination "Farpoint"
	to offer
		has "Wanderers: Sestor Alt: Alnilam 2: done"
	on offer
		conversation
			`Danforth's troops set up a defensive circle around the entrance to the Alpha base. It appears that they have achieved the element of surprise: the Alphas did not know that the Navy had already located their base, and were probably counting on having a longer time to evacuate. The troop transports were carrying cement mixers and mining drills; apparently their plan is to seal the Alphas underground and then drill down through the ice and bedrock to bomb and collapse the bunker.`
			`	As the Navy troops begin pouring the cement, the massive gate to the tunnel bursts open and more Alphas than you have ever seen in one place come flooding out, several dozen of them. But even these superhuman soldiers cannot survive the concentrated firepower of hundreds of Navy troops. The air fills with explosions and smoke and powdered snow, but as far as you can tell not one of the Alphas escapes alive.`
			`	When the battle is over, the Navy troops explore the bunker, hoping to find prisoners, but they find no one alive. They seal up the entrance and collapse the bunker, and prepare to travel back with you to <planet>.`
				accept
	npc accompany save
		government "Navy (Oathkeeper)"
		personality escort
		ship "Cruiser (Mark II)" "R.N.S. Dauntless"
		ship "Cruiser (Mark II)" "R.N.S. Forthright"
		ship "Cruiser (Mark II)" "R.N.S. Virtue"
	on visit
		dialog `You've reached <planet>, but not all of the Navy Cruisers have entered the system yet. Better depart and wait for them to arrive.`



mission "Wanderers: Sestor Alt: Return to Wanderers"
	landing
	name "Return to <planet>"
	description "The Kor Sestor drones in human space have been eliminated. Return to <planet> in Wanderer space to find out what is happening there."
	autosave
	source "Farpoint"
	destination "Desi Seledrak"
	to offer
		has "Wanderers: Sestor Alt: Alnilam 3: done"
	on offer
		log "Succeeded in destroying the Kor Sestor fleet and eliminating the Alpha base on the anarchist world of Zenith. He is very grateful that the bomb or super-weapon, whatever it was, did not need to be used."
		conversation
			`The Navy officers report the results of the battle on Zenith's surface to Danforth. "So it's over," he says. "Captain <last>, thank you for your assistance. This battle would have gone very differently if you were not here."`
			`	Now that the Kor Sestor fleet has been dealt with, you should probably return and see how things are going for the Wanderers in Korath space.`
				accept



mission "Wanderers: Sestor: Scan Drones"
	landing
	name "Scan remaining drones"
	description "Scan the remaining Kor Sestor drones in a few of their systems, to collect data for the Wanderers to use to determine how quickly they are still being produced."
	autosave
	source "Desi Seledrak"
	to offer
		or
			has "Wanderers: Sestor: Return to Wanderers: done"
			has "Wanderers: Sestor Alt: Return to Wanderers: done"
	waypoint "Silikatakfar"
	on enter "Silikatakfar"
		dialog `You fire up your ship's sensors and log the identification numbers and markings of the Kor Sestor ships in this system.`
	waypoint "Asikafarnut"
	on enter "Asikafarnut"
		dialog `You fire up your ship's sensors and log the identification numbers and markings of the Kor Sestor ships in this system.`
	on offer
		conversation
			`You are pleased to discover that the Wanderer colony here has grown into a small city; about a hundred thousand Wanderers have already come through the Eye to settle here. Sobari Tele'ek meets you in the spaceport. He has lost half of his feathers - his whole face is bare and scaly - but rather than wasting away like Rek he has gained considerable weight, and now towers over you.`
			`	He tells you, "Our Mereti [friends, kinsfolk] tell us that the Kor Sestor have become less [aggressive, warlike] of late. The factories on their worlds are still [producing, churning out] drones, but they no longer act with a [unified will? purpose?]."`
			choice
				`	"Do you think they are weakened enough that we can destroy them?"`
				`	"Do you think there is any way we could regain control of them?"`
					goto control
			`	"Probably," he says, "but we would prefer a more [elegant, peaceful] solution if possible. Would you be willing to [visit, observe] their star systems again, and collect [data, measurements] that might help us to learn to control them or shut them down?`
				goto end
			label control
			`	"That is our [hope, desire]," he says. "Or, barring that, at least we may [disable, shut down] the factories. Would you be willing to [visit, observe] their star systems again, and collect [data, measurements] on the drones?"`
			label end
			choice
				`	"I'd be glad to."`
					goto data
				`	"What about the Kor Mereti drones? Have they remained peaceful?"`
			`	"Indeed," he says. "And, they have brought much [entertainment? novelty?] to us. You should [visit, call on] them when you have time; they are very fond of you."`
			label data
			`	Tele'ek introduces you to the team of scientists who will tackle the problem of shutting down the Kor Sestor factories. They explain to you that they are looking for any identifying information on the drones, including the alloy composition of their hulls and prevalence of blast marks or other signs of age. That will allow them to estimate how quickly the drones are being produced.`
				accept
	on visit
		dialog phrase "generic waypoint on visit"
	npc
		system "Silikatakfar"
		government "Kor Sestor"
		personality heroic staying
		ship "Kar Ik Vot 349" "07-134.2"
		ship "Tek Far 78 - Osk" "07-894.0"
		ship "Tek Far 71 - Lek" "07-554.3"
		ship "Met Par Tek 53" "07-983.2"
		ship "Met Par Tek 53" "07-992.1"
		ship "Met Par Tek 53" "07-284.5"
	npc
		system "Asikafarnut"
		government "Kor Sestor"
		personality heroic staying
		fleet "Large Kor Sestor"
		ship "Kar Ik Vot 349 (Offense)" "07-546.2"
		ship "Kar Ik Vot 349 (Trapper)" "07-321.8"
		ship "Kar Ik Vot 349 (Defense)" "07-963.4"



mission "Wanderers: Sestor: Exiles 1"
	landing
	name "Pick up Rek"
	description "Pick up Rek on <planet>. She will be helping you to attempt to open diplomatic negotiations with the Korath exiles."
	autosave
	source "Desi Seledrak"
	destination "Setar Fort"
	to offer
		has "Wanderers: Sestor: Scan Drones: done"
	on offer
		log "The Kor Sestor drones are still being produced by an automated factory, even though no one is controlling them and they seem to be acting on some sort of mindless autopilot. The Wanderers hope that the Korath exiles will help them to disable the factory."
		conversation
			`You give your scanner logs to the Wanderer scientists. A few hours later, you are called in to a meeting of the leaders. Sobari Tele'ek tells you, "Our scientists noted that the most recently constructed drones all have very similar [alloy composition?] and identification numbers. We suspect that means that they are all being produced on a single world, perhaps even a single [factory, facility]."`
			`	He pulls up a star map and says, "Based on your previous geological scans, we [believe, deduce] that the factory is on this world, Sestor Ikfar. It would be easy enough to [destroy, eliminate] the facility, but Tema'a Iriket has a different proposal."`
			`	Iriket stands up and says, "I propose that we use this as an [excuse, justification] for a visit to the Korath [exiles, outcasts]. We offer them the chance to [help, assist] us in ending the [scourge, plague] that they started. By [allying with, fighting alongside] us, they will come to view us as [friends, coworkers]."`
			choice
				`	"Why get them involved if you think you can handle this on your own?"`
				`	"Wait, you want to ask them for help just so they can feel good about themselves?"`
					goto good
				`	"That does sound like a good way to solve two problems at the same time."`
					goto next
			`	Tele'ek says, "The exiles must [feel, be aware of] their loss of [agency? significance?] in the galaxy. If we [plant, instill] a sense of purpose and [worth, importance] in them, they may become [peaceful, wise] just as the Kor Mereti collective did."`
				goto next
			label good
			`	Tele'ek says, "Nothing [forges, solidifies] a friendship as quickly as fighting a [common foe?]. And, we [feel, perceive, project] that the reason the exiles engage in [raiding, piracy] is that their society has no greater [purpose, goal] than mere survival. By involving them in the [restoration, healing] of their lands, we will give them [agency? significance?] and they will be free to be [peaceful, wise]."`
			label next
			`	After more discussion the Wanderer leaders reach a consensus that they would like you to travel with Rek to the territory of the Korath exiles and seek to make contact with them. It seems like a very optimistic plan, but then again, the Wanderer approach of seeking friendship worked quite well with the Mereti drones.`
				accept



mission "Wanderers: Sestor: Exiles 2"
	landing
	name "Contact the exiles"
	description "Enter the territory of the Korath exiles. Do not fire on them. Instead, with Rek's help, try to find a way to speak with them or a place where they will meet with you."
	autosave
	source "Setar Fort"
	passengers 1
	to offer
		has "Wanderers: Sestor: Exiles 1: done"
	to complete
		never
	on offer
		conversation
			`Surprisingly, Rek is less enthusiastic about the diplomatic plan than the other Wanderer leaders were. "Of course I greatly desire to make contact with the exiles," she says, "but it is not safe to assume that the minds of an alien species works the same as our own. These Korath were exiled due to their endless, fruitless war-making. I'm not sure an offer of friendship and a small ego boost is all they need to make them become peaceful."`
			choice
				`	"Do you think we should cancel the mission and just deal with the Sestor ourselves?"`
				`	"Perhaps not, but isn't it better to try for peace while we have the chance?"`
					goto better
			`	"No," says Rek, "the leaders are right, we must offer them our trust until they prove utterly unworthy of it. But you should not be surprised if they are more interested in destroying you than in listening to me."`
				goto end
			label better
			`	"It is not only better," says Rek, "it is a moral imperative. Our first interaction with the exiles must be an offer of trust, not an act of war. But you should not be surprised if they are more interested in destroying you than in listening to me."`
			label end
			`	Rek makes herself comfortable in one of your bunk rooms, and you prepare for a visit to the territory of the Korath exiles. "We must somehow earn their trust," she says, "so do not fire on any of their ships. Instead we must find a way to communicate with them or a place where they will meet with us peacefully."`
				accept
	on visit
		dialog `You've returned to <planet>, but you haven't yet made contact with the Korath exiles. Travel to the core of the galaxy and look for a way to make contact with them.`
	npc save
		government "Korath"
		system "Kor Fel'tar"
		personality heroic staying
		fleet "Korath Home"
	npc save
		government "Korath"
		system "Kor En'lakfar"
		personality heroic staying
		fleet "Korath Raid"
	npc save
		government "Korath"
		system "Kor Men"
		personality heroic staying
		fleet "Korath Raid"
	npc save
		government "Korath"
		system "Kor Ak'Mari"
		personality heroic staying
		fleet "Korath Raid"
	npc save
		government "Korath"
		system "Kor Zena'i"
		personality heroic staying
		fleet "Korath Raid"
	npc save
		government "Korath"
		system "Kor Tar'bei"
		personality heroic staying
		fleet "Korath Home"
	npc save
		government "Korath"
		system "Kor Nor'peli"
		personality heroic staying
		fleet "Korath Home" 2
		fleet "Korath Raid"



event "wanderers: exiles peaceful"
	"reputation: Korath" >?= 1

mission "Wanderers: Sestor: Exiles 3"
	landing
	name "Diplomacy with the exiles"
	description "Escort these three Korath exile world-ships to <planet> for a diplomatic meeting with the Wanderers."
	source "Far'en Lai"
	destination "Desi Seledrak"
	passengers 1
	to offer
		has "Wanderers: Sestor: Exiles 2: active"
	on offer
		log "Succeeded in communicating with the Korath exiles, by landing on the one habitable planet in their territory. (It seems like the exiles might have a taboo against using weapons on that world.) The exiles agreed to send some ships to help disable the remaining Kor Sestor factory."
		fail "Wanderers: Sestor: Exiles 2"
		event "wanderers: exiles peaceful"
		conversation
			`The Korath ships tail you to the planet's surface, but they do not fire on you. Instead, they hover above your ship for a long, indecisive moment. You hold your fire, and they eventually land in the sand next to you. Their airlocks open, and a few of them step out and approach your ship. They do not appear to be armed. Perhaps they have a cultural taboo against using weapons on this world.`
			choice
				`	(Go outside to meet them.)`
				`	(Leave the planet while I still can.)`
					defer
			`	The Korath seem surprised when you and Rek, two members of obviously different species, step off your ship side by side. They mutter quietly amongst themselves as you approach, then nearly jump in surprise when Rek addresses them in their own language.`
			`	They converse with Rek for a while, and then Rek explains, "I told them that we hope to eliminate the infection of self-replicating war machines that they left behind, and make their territory safe for habitation once more. They say they are glad we have not destroyed the drones, because they are proud of their handiwork. They say they have command codes for the Sestor factories, to shut them down. But, they will not give the codes to us; they must go and enter them in person."`
			choice
				`	"That sounds reasonable."`
					goto end
				`	"What are they asking for in return?"`
			`	Rek says, "They request a meeting with our leaders, to work out terms of trade for our mutual benefit. It is something we would certainly agree to with no difficulty."`
			label end
			`	Rek speaks with the Korath again, and then tells you, "They say that three of their 'world-ships' will travel with us to meet with the Wanderer leaders. If they are able to work out favorable terms, and are convinced that the Wanderers have peaceful intentions, they will go with us to the Sestor factory world and shut it down."`
				accept
	npc accompany save
		government "Korath"
		personality escort
		ship "Korath World-Ship A (Jump)" "Seskerat Pratka"
		ship "Korath World-Ship B (Jump)" "Eskretakfakta"
		ship "Korath World-Ship C (Jump)" "Prekaprat Skata"
	on visit
		dialog `You have reached <planet>, but you're missing something! Either you've left one of the Korath ships behind, or your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Wanderers: Sestor: Factory 1"
	landing
	name "Shut down the factory"
	description "Escort these Korath ships to <planet>, where they will shut down the remaining Kor Sestor factories."
	source "Desi Seledrak"
	destination "Sestor Ikfar"
	clearance
	infiltrating
	passengers 1
	to offer
		has "Wanderers: Sestor: Exiles 3: done"
	on offer
		conversation
			`Rek brings the Korath to meet with the Wanderer leaders. After the meeting ends, she and Tele'ek meet up with you. "That was a strange meeting," says Tele'ek. "It did not feel like a peace summit, but like a child's play at a peace summit, as if negotiating for peace is a skill they are only just beginning to learn. And the terms they asked for were minimal; I would have preferred to offer them far more. But they are taking steps toward becoming a peaceful society, and for that we can be grateful."`
			choice
				`	"So, what do we do now?"`
					goto next
				`	"Are you sure that they really want peace? They aren't trying to trick you?"`
			`	Rek says, "It is hard to be sure. Their culture is very different from the Kor Efret; even some of their language and gestures are new to me. But they have behaved peacefully toward us so far; we must hope that their peacefulness continues."`
			label next
			`	Tele'ek says, "You must bring the [exile, outcast] ships to <planet> and keep them from being destroyed by the drones [along the way?]. There, they will [attempt, accomplish] what they have promised, and shut down the factories. Your only role will be to [shield, protect] them, and we will give you some of our warships to [assist, accompany] you."`
			`	You return to your ship, and get ready for the trip to <planet>.`
				accept
	npc accompany save
		government "Korath"
		personality escort
		ship "Korath World-Ship A (Jump)" "Seskerat Pratka"
		ship "Korath World-Ship B (Jump)" "Eskretakfakta"
		ship "Korath World-Ship C (Jump)" "Prekaprat Skata"
	on visit
		dialog `You have reached <planet>, but you're missing something! Either you've left one of the Korath ships behind, or your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



mission "Wanderers: Sestor: Factory Escorts"
	landing
	invisible
	source "Desi Seledrak"
	to offer
		has "Wanderers: Sestor: Exiles 3: done"
	npc kill
		government "Wanderer"
		personality escort heroic
		fleet
			names "wanderer"
			variant
				"Hurricane (Tough)"
				"Derecho"
				"Derecho (Turret)"
				"Tempest (Heavy)" 2
				"Tempest"



event "wanderers: asikafarnut battle"
	system "Asikafarnut"
		fleet "Large Kor Mereti" 10000

mission "Wanderers: Sestor: Factory 2"
	landing
	name "Defend <planet>"
	description "Drive off the Kor Sestor drones and keep them from interfering with the Korath exiles who are shutting down their factories."
	source "Sestor Ikfar"
	clearance
	infiltrating
	passengers 1
	to offer
		has "Wanderers: Sestor: Factory 1: done"
	on visit
		dialog `There are still Kor Sestor drones overhead. You should go fight them off so the Korath exiles are not attacked while trying to disable the factories.`
	on offer
		event "wanderers: asikafarnut battle"
		conversation
			`The drones stop firing on the Korath world-ships the moment they enter the atmosphere, which is a good sign - it probably means that their command codes worked. While they begin scouting out the manufacturing center, the exiles tell you (through Rek) that they need you to return to orbit and keep the remaining drones from attacking them until they can be sure the factory is shut down for good; it might take them a while to accomplish that.`
			`	You fire up your engines and blast off for one last battle against the Kor Sestor...`
				launch
	npc evade
		government "Kor Sestor"
		personality waiting staying heroic
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349"
				"Tek Far 71 - Lek"
				"Far Lek 14" 10
				"Met Par Tek 53" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Kar Ik Vot 349 (Offense)"
				"Tek Far 78 - Osk"
				"Far Osk 27" 8
				"Met Par Tek 53 (Sniper)" 2
		fleet
			names "kor sestor"
			fighters "kor sestor fighter"
			variant
				"Tek Far 109"
				"Tek Far 71 - Lek"
				"Tek Far 78 - Osk"
				"Far Lek 14" 17
				"Far Osk 27" 13



event "wanderers: sestor shutdown"
	system "Celeborim"
		fleet "Small Kor Sestor" 2400
		fleet "Large Kor Sestor" 10000
	system "Makferuti"
		fleet "Small Kor Sestor" 2400
		fleet "Large Kor Sestor" 10000
	system "Asikafarnut"
		fleet "Large Kor Mereti" 3600
		fleet "Small Kor Sestor" 1200
		fleet "Large Kor Sestor" 6000
	system "Sobarati"
		fleet "Small Kor Sestor" 1600
		fleet "Large Kor Sestor" 8000
	system "Silikatakfar"
		fleet "Large Kor Mereti" 1600
		fleet "Small Kor Sestor" 3200
		fleet "Large Kor Sestor" 4800
	system "Ferukistek"
		fleet "Large Kor Mereti" 2400
		fleet "Small Kor Sestor" 8000
		fleet "Large Kor Sestor" 10000
	system "Eneremprukt"
		fleet "Large Kor Mereti" 2000
		fleet "Small Kor Sestor" 3200
		fleet "Large Kor Sestor" 4800
	system "Mesuket"
		remove fleet "Large Kor Sestor"
		add fleet "Large Kor Sestor" 10000

mission "Wanderers: Sestor: Factory 3"
	landing
	name "Return to <planet>"
	description "Return to <planet> and report to the Wanderers that the exiles have shut down the Kor Sestor factory (and possibly stolen the equipment in the process)."
	source "Sestor Ikfar"
	destination "Desi Seledrak"
	passengers 1
	to offer
		has "Wanderers: Sestor: Factory 2: done"
	on offer
		log "The Korath exiles have kept their bargain with the Wanderers and shut down the final Kor Sestor drone factory, although it may be some time before the last of the existing drones are eliminated."
		fail "Wanderers: Sestor: Factory Escorts"
		event "wanderers: sestor shutdown"
		conversation
			`As you come in for a landing, the Korath exiles inform you that they have succeeded in disabling the factories. They tell you that they will be returning to their territory on their own; now that their job is done, they no longer need you to "chaperone" them, as Rek translates it. You wish them luck, and they depart.`
			`	The factory district does indeed seem to have been shut down: no more hum of machinery or flashes of arc-welders or smokestacks belching steam into the atmosphere. In fact, on closer inspection you realize that they did not merely shut down the factories; they have also removed some critical components from them.`
			`	Rek asks, "Does it look like they succeeded?"`
			choice
				`	"Yes, the factories are shut down."`
					goto end
				`	"It looks like they disassembled the factories and took some of the parts with them."`
			`	"Oh," says Rek, "that is slightly ominous. But they are scavengers after all; perhaps they simply did not wish to leave useful machinery to rust."`
			label end
			`	With nothing else to do here, you get ready to return to <planet> and report to the Wanderer leaders.`
				accept
	on visit
		dialog `You land on <planet>, but realize that your escort carrying Rek hasn't entered the system yet. Better depart and wait for it to arrive.`



event "wanderers: exiles hostile"
	"reputation: Korath" = -1000

event "wanderers: exiles have drones"
	fleet "Korath Home"
		add variant 2
			"Tek Far 71 - Lek"
			"Far Lek 14" 6
		add variant 2
			"Tek Far 71 - Lek (Close Quarters)"
			"Far Lek 14" 4
		add variant 2
			"Tek Far 78 - Osk (Close Quarters)"
			"Far Osk 27" 5
		add variant 2
			"Tek Far 78 - Osk"
			"Far Osk 27" 2
		add variant 3
			"Tek Far 109"
			"Far Lek 14" 9
			"Far Osk 27" 7
		add variant 3
			"Met Par Tek 53" 3
		add variant 2
			"Met Par Tek 53 (Sniper)" 3
		add variant
			"Kar Ik Vot 349"
		add variant
			"Kar Ik Vot 349 (Defense)"
		add variant
			"Kar Ik Vot 349 (Offense)"
		add variant
			"Kar Ik Vot 349 (Trapper)"
		add variant 1
			"Model 512"
		add variant 2
			"Model 512"
			"Model 256"
		add variant 2
			"Model 256"
		add variant 2
			"Model 256"
			"Model 64" 2
		add variant 2
			"Model 128" 2
		add variant 2
			"Model 64"
			"Model 32" 3
		add variant 3
			"Model 64" 2
			"Model 32" 3
		add variant 4
			"Model 32"
			"Model 16" 5

event "wanderers: sestor eliminated"
	system "Celeborim"
		government "Uninhabited"
		fleet "Small Kor Mereti" 10000
	system "Makferuti"
		government "Uninhabited"
		fleet "Small Kor Mereti" 10000
	system "Asikafarnut"
		government "Uninhabited"
		fleet "Large Kor Mereti" 3600
	system "Sobarati"
		government "Uninhabited"
		fleet "Small Kor Mereti" 10000
	system "Silikatakfar"
		government "Uninhabited"
		fleet "Large Kor Mereti" 1600
	system "Ferukistek"
		government "Uninhabited"
		fleet "Large Kor Mereti" 2400
	system "Eneremprukt"
		government "Uninhabited"
		fleet "Large Kor Mereti" 2000
	system "Mesuket"
		remove fleet "Large Kor Sestor"

event "wanderers: sabira eseskrai colony"
	system "Skeruto"
		government "Wanderer"
		fleet "Large Quarg" 1000
		fleet "Wanderer Defense" 1200
		fleet "Wanderer Drones" 800
		fleet "Kor Efret Home" 800
	system "Furmeliki"
		add fleet "Kor Efret Home" 800
	planet "Sabira Eseskrai"
		add attributes "wanderer"
		description `Long ago, this planet was home to several Korath oil mining settlements, but now all that remains visible are the tops of a few dozen of the tallest buildings. Everything else has been buried by sandstorms.`
		description `	Due to a recent shift in climate the deserts have begun shrinking once more, with local vegetation growing to cover more and more land each year. The Wanderers, working together with the Kor Efreti, have founded a settlement here and begun working to accelerate the process of rejuvenating the wastelands.`
		spaceport `This small settlement is populated by a roughly equal number of Korath and Wanderer settlers. Since most of them do not speak each other's language, the two groups do not mingle much, and communicate mostly via gestures and drawings. It's not much, but it's at least a start for the two species to begin learning from each other.`

mission "Wanderers: Sestor: Final"
	landing
	name "Investigate the exiles"
	description "Visit the Korath exile territory to look for any signs that they plan to start constructing war drones of their own."
	source "Desi Seledrak"
	to offer
		has "Wanderers: Sestor: Factory 3: done"
	waypoint "Kor Fel'tar"
	on enter "Kor Fel'tar"
		dialog `There are several Kor Mereti and Kor Sestor drones in this system, and they don't look friendly. You should report to the Wanderers that the exiles have begun manufacturing drones of their own.`
	on offer
		event "wanderers: exiles hostile" 4
		conversation
			`When you meet with the Wanderer leaders, Sobari Tele'ek tells you, "We have received word from our [scouts, observers] that the Sestor drones are [dwindling, reducing] in numbers and will soon be no more. We owe you our [gratitude, thanks]. But, the Mereti tell us a more worrisome [tale, story]."`
			`	Meto Pa'aret says, "The Mereti [contacted, communicated with] me and said that one of their stations was [raided, infiltrated] by the Korath exiles, and some of their [machinery, equipment] was stolen. The Mereti did not [fight, attack] the exiles because they thought they were [friends, allies]. Captain <last>, can you bring Rek to visit the [exiles, outcasts] and learn what their plans are?"`
			choice
				`	"Sure, I would be glad to."`
					accept
				`	"Could the stolen equipment make it possible for them to build a drone fleet of their own?"`
			`	"That is what we are afraid of," says Tele'ek. You agree to travel to the territory of the exiles and see if there is any evidence that they are building war drones there.`
				accept
	npc
		system "Kor Fel'tar"
		government "Korath"
		personality heroic staying
		fleet
			names "korath"
			variant
				"Model 32"
				"Model 16" 3
				"Tek Far 78 - Osk"
				"Met Par Tek 53 (Sniper)" 2
	on visit
		dialog phrase "generic waypoint on visit"
	on complete
		log "Discovered that when the Korath exiles shut down the Kor Sestor factory, they also took enough technology from the factory to be able to begin producing war drones of their own. It is possible that the exiles have just become a whole lot more dangerous than they used to be."
		event "wanderers: exiles have drones" 20
		event "wanderers: sabira eseskrai colony" 30
		event "wanderers: sestor eliminated" 40
		conversation
			`You inform the Wanderers that the Korath exiles are now producing war drones. "This is [unfortunate, regrettable]," says Sobari Tele'ek. "Clearly they [anticipate, expect] further conflict in the future."`
			`	Tema'a Iriket says, "Perhaps they are [afraid of, threatened by] us and seek only to have the means to [defend, protect] themselves. The important thing is that the drones in this [territory, area] have been [neutralized, pacified] and we can now focus on our true work."`
			`	From there, the conversation shifts to an excited discussion about what worlds they will settle on next and what their next steps should be in building relationships with the Kor Efret and the Kor Mereti collective. The exiles may become a threat some time in the future, but for now the Wanderers are eager to pursue their peacetime calling in this new territory that the Eye has led them to.`

mission "Wanderers: Sestor: Patch"
	landing
	invisible
	to offer
		has "event: wanderers: sestor eliminated"
	on offer
		event "wanderers: sestor planets unrestricted"
		fail

event "wanderers: sestor planets unrestricted"
	planet "Drekag Firask"
		"required reputation" 0
		spaceport clear
	planet "Sestor Ikfar"
		"required reputation" 0
		spaceport clear
	planet "Devru Kaska"
		"required reputation" 0
		spaceport clear
	planet "Sebra Skira"
		"required reputation" 0
		spaceport clear
	planet "Keneska Fek"
		"required reputation" 0
		spaceport clear
	planet "Sopi Lefarkata"
		"required reputation" 0
		spaceport clear
