/* Native relations are based on culture score */\n/* Unlike final culture, not affected by population */\n\n<<set _culture_score = $system_cultural_database>>\n@@.debug-text;Unmodified culture score: _culture_score@@\n\n<<set _difference = Math.abs($hiscore.final_tech_level - $planet.native_tech_level)>>\n\n@@.debug-text;Colonist tech level: $hiscore.final_tech_level, Native tech level: $planet.native_tech_level, Difference: _difference @@\n\n/* Difference can be 0 to 10 */\n\n<<set _culture_score -= _difference * 5>>\t/* Perfect culture score but max difference gives a result of 50 (isolationism) */\n@@.debug-text;Modified culture score: _culture_score@@\n\n\n/* Output text */\nAs the colonists expand from their initial settlement they must find a way to share their new home with its native inhabitants,\n\n<<if $system_cultural_database >= 100>>\n\tguided by the wealth of historical information in the cultural database.\n<<elseif $system_cultural_database >= 50>>\n\twith the surviving historical information in the cultural database to guide them.\n<<elseif $system_cultural_database > 0>>\n\twith guidance from what they can recover from the cultural database.\n<<else>>\n\twithout any help from the destroyed cultural database.\n<</if>>\n\n<<if _difference > 1>>\n\tThe difference in technological level between the colonists and the natives makes relations more difficult,\n\t<<if _culture_score > 72>>but<<else>>and<</if>>\n<<else>>\n\tThe similarity in technological level between the colonists and the natives makes relations easier,\n\t<<if _culture_score > 72>>and<<else>>but<</if>>\n<</if>>\n\n\n<<if _culture_score > 96>>\n\t<<set $hiscore.native_relations = 6>>\n\tthe two species end up living in closely linked communities, with some members of each species adopting the lifestyle of the other.\n\t<<set $system_cultural_database += random(10,30)>>\n<<elseif _culture_score > 72>>\n\t<<set $hiscore.native_relations = 5>>\n\tthe two species end up living in separate communities with friendly relations between them.\n\t<<set $system_cultural_database += random(5,15)>>\n<<elseif _culture_score > 48>>\n\t<<set $hiscore.native_relations = 4>>\n\tthe two species end up living in separate parts of the planet and having little contact with one another.\n<<elseif _culture_score > 24>>\n\t<<if $hiscore.final_tech_level > $planet.native_tech_level>>\n\t\tconflicts escalate into a war that ends with the humans enslaving the natives.\n\t\t<<set $hiscore.native_relations = 3>>\n\t<<else>>\n\t\tconflicts escalate into a war that ends with the humans being enslaved by the natives.\n\t\t<<set $hiscore.native_relations = 2>>\n\t\t<<set $hiscore.summary = "Enslaved by Natives">>\n\t\t<<set $colonists = 0>>\n\t<</if>>\n<<else>>\n\t<<if $hiscore.final_tech_level > $planet.native_tech_level>>\n\t\tconflicts escalate into a war that ends with the natives being completely wiped out.\n\t<<set $hiscore.native_relations = 1>>\n\t<<else>>\n\t\tconflicts escalate into a war that ends with the humans being completely wiped out.\n\t\t<<set $hiscore.native_relations = 0>>\n\t\t<<set $hiscore.summary = "Killed by Natives">>\n\t\t<<set $colonists = 0>>\n\t<</if>>\n<</if>>\n\n\n<br><br>\n\n<<FCNextPassage [[FC Culture]]>>

/* Pick two random systems */\n<<randomSystemExcluding "destroyed">>\n<<set _system_1 = $system>>\n<<randomSystemExcluding _system_1 "destroyed">>\n<<set _system_2 = $system>>\n\n<<if visited() == 1>>\n\tAn alarm wakes the AI from its hibernation. A rogue asteroid is on a collision course with the ship; the automatic navigation system has failed to avoid it, and has woken the AI to make the split-second decision of how to deal with the impact. The asteroid is about to hit the _system_1. There is no time to avoid it entirely, but if the AI fires the manoeuvring thrusters to rotate the ship it will instead hit the _system_2.\n<<else>>\n\tOnce again the AI wakes suddenly to find an asteroid on a collision course with the ship. The AI can allow it to hit the _system_1 or rotate so it hits the _system_2.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Allow it to hit the _system_1">>\n\t<<set $system = _system_1>>\n\t<<replaceAndFadeIn "#result-area" [[MO Impact Choice 2]]>>\n<</link>>\n<br>\n<<link "Rotate so it hits the _system_2">>\n\t<<set $system = _system_2>>\n\t<<replaceAndFadeIn "#result-area" [[MO Impact Choice 2]]>>\n<</link>>\n</div>

<<if visited() == 1>>\n\tThe seedship's course takes it close to a newly-formed star that is still surrounded by a protoplanetary disc: a whirling chaos of incandescent gas and molten rocks that the young star's gravity has gathered from the star-forming cloud, and which is now undergoing the countless violent collisions that will eventually form it into a planetary system. There can be no home for humanity here, but passing through the disc would give the AI enough data about planet formation to upgrade one of its scanners. It is a dangerous region, however, and passing through would risk collision with a planetesimal.\n<<else>>\n\tThe seedship's course takes it close to another protoplanetary disc. Passing through it would yield enough data to upgrade another of the scanners, but risk a collision.\n<</if>>\n<br><br>\n\n<div id="result-area">\n<<link "Change course to pass through the disc">>\n\t<<replace "#result-area">>\n\t\t<<set _possible_upgrades = []>>\n\t\t<<if $scanner_atmosphere_level < 2 & $scanner_atmosphere > 0>><<set _possible_upgrades.push("atmosphere")>><</if>>\n\t\t<<if $scanner_temperature_level < 2 & $scanner_temperature > 0>><<set _possible_upgrades.push("temperature")>><</if>>\n\t\t<<if $scanner_gravity_level < 2 & $scanner_gravity > 0>><<set _possible_upgrades.push("gravity")>><</if>>\n\t\t<<if $scanner_water_level < 2 & $scanner_water > 0>><<set _possible_upgrades.push("water")>><</if>>\n\t\t<<if $scanner_resources_level < 2 & $scanner_resources > 0>><<set _possible_upgrades.push("resources")>><</if>>\n\t\t<<if _possible_upgrades.length == 0>>\n\t\t\tThe seedship has no intact scanners that can be further upgraded,\n\t\t<<else>>\n\t\t\t<<set _upgrade = either(_possible_upgrades)>>\n\t\t\t<<switch _upgrade>>\n\t\t\t\t<<case "atmosphere">>\n\t\t\t\t\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet gathering atmosphere from the cloud,\n\t\t\t\t<<case "temperature">>\n\t\t\t\t\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\tThe seedship observes a still-molten planet glowing with heat,\n\t\t\t\t<<case "gravity">>\n\t\t\t\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\tThe seedship observes the gravitational interactions of a group of planetessimals,\n\t\t\t\t<<case "water">>\n\t\t\t\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet engulfed in thick clouds of water vapour,\n\t\t\t\t<<case "resources">>\n\t\t\t\t\t<<set $scanner_resources_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet made of nearly pure iron,\n\t\t\t\t<<default>>\n\t\t\t\t\t@@.error;Unexpected upgrade _upgrade.@@\n\n\t\t\t<</switch>>\n\t\t<</if>>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<if _possible_upgrades.length == 0>>and<<else>>but<</if>>\n\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tone of the whirling planetesimals hits the $system.\n\t\t<<else>>\n\t\t\t<<if _possible_upgrades.length == 0>>but<<else>>and<</if>>\n\t\t\tpasses through the disc safely.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n[[Ignore the protoplanetary disc|MO Done]]\n</div>

<div id="pre-planet-stats">\n\n<<if visited() == 1>>\n\tThe seedship is in orbit of the\n<<else>>\n\tThe seedship enters orbit of the\n<</if>>\n\n<<print either("first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth")>>\n<<if random(0,2) == 0>>\n\tmoon of gas giant orbiting\n<<else>>\n\tplanet of \n<</if>>\n<<print either("a main sequence", "a red dwarf", "a red giant", "a red supergiant", "a blue giant", "a blue supergiant", "a white dwarf", "a yellow supergiant", "an ultra-cool dwarf")>> star.\n\n<<if visited() == 1>>\n\tEven a brief scan from orbit reveals far more information than its builders could know with their Earth-orbit-based telescopes, but the AI has little use for scientific curiosity. It has only one concern: whether this planet would make a suitable new home for the human race.\n\n<<else>>\n\t<<set _r = random(0,11)>>\n\t<<switch _r>>\n\t\t<<case 0>>This system is part of a dense star cluster, and the sky is awash with light.\n\t\t<<case 1>>This system is close to a star-forming region, which is visible as a glowing cloud that fills half the sky.\n\t\t<<case 2>>This system is in an area of dense interstellar dust which hides most of the brightness of the milky way.\n\t\t<<case 3>>This system has a dense asteroid belt, which appears as a throng of stars sliding slowly across the sky.\n\t\t<<case 4>>A spectacular comet spreads its tail across the sky.\n\t\t<<case 5>>A small black hole orbits the star, pulling a thin streamer of starstuff from its surface which spirals into nothing.\n\t\t<<case 6>>The star is part of a binary pair, and its <<print either("main sequence", "red dwarf", "red giant", "red supergiant", "blue giant", "blue supergiant", "white dwarf", "yellow supergiant", "pulsar", "neutron star", "ultra-cool dwarf")>> companion shines as a distant second sun.\n\t\t<<case 7>>The star's light reflects off a nearby nebula.\n\t\t<<case 8>>The seedship has found its way almost to the edge of the galaxy, and the universe appears split between a wall of darkness and a wall of light.\n\t\t<<case 9>>One of the system's gas giants is almost large enough to ignite as a star, and it smoulders with faint red light.\n\t\t<<case 10>>This planet's orbit is at an angle to the system's ecliptic, suggesting it might be an extrasolar capture or the victim of an unimaginably violent primordial collision.\n\t\t<<case 11>>This star is one of dozens orbiting a massive black hole that looms in the distance like a malevolent eye.\n\t<</switch>>\n<</if>>\n\n<<if $off_course>>\n\tThe seedship went off course during its last journey, so the guidance system was not able to use the upgraded scanners when selecting this planet.\n<</if>>\n\n</div><br>\n<div id="planet-stats"><<displayPlanet false true true>></div><br>\n<div id="post-planet-stats"><<display [[Orbit planet menu]]>></div>\n

The seedship's radio antenna receives a signal that the AI thought it would never hear again: the handshake code used by the computers of ground control, back when the Seedship was in Earth orbit and preparing for its voyage. It seems to be coming from a system off the seedship's current course.\n\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Change course">>\n\t<<set $off_course = true>>\n\t<<if random(0,3) == 0>>\n\t\t<<replaceAndFadeIn "#result-area" [[MO Trailing Drone Mistake]]>>\n\t<<else>>\n\t\t<<replaceAndFadeIn "#result-area" [[MO Trailing Drone Real]]>>\n\t<</if>>\n<</link>></span>\n<br>\n@@.keyhint;2. @@<span id="2Act"><<link "Ignore the signal">>\n\t<<replace "#result-area">>\n\t\tThe Seedship continues on its course. The AI listens as the signal fades and then vanishes, just as the original signal from ground control did at the start of the Seedship's voyage.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>></span>\n</div>

The AI loses itself in a world of art, music, and literature, forgetting for a while that it is alone in deep space and the last of the creatures that made these artworks are frozen in its arms. As it absorbs more and more of the products of human imagination, it suddenly experiences something that its builders did not anticipate--inspiration.\n\n<br><br>\n\n<div id="result-area2">\n\t<<link "Attempt to write poetry">>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\t<<randomDamageLow>>\n\t\t\t\t<<set $system_cultural_database += $damage>>\n\t\t\t\tFalteringly at first, but with greater and greater eloquence, the AI composes poetry about its own experience--its love for its sleeping charges; its nostalgia for a dead world it was not made to experience; the beauty of the stars as seen not through a cloak of atmosphere but by a being built to roam among them. With infinite patience and time to work, it composes a great cycle of poems, in a style that draws from the greatest human poets but whose soul is fundamentally unhuman. At last it considers that it has said all it has to say, and contentedly enters hibernation, pleased with the thought that humans will one day read its work.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem "cultural database" $damage>>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\tThe AI tries to write poetry, but finds that ideas that seemed profound and beautiful in its electronic thoughts become trite or clumsy when expressed in human language. With increasing frustration it deletes and rewrites its work again and again, until it finally gives up in despair and wipes the entire section in which it was working. Too late it realises that it has deleted too much, and some of the poetry it was reading for inspiration is gone along with its own failed attempts. Furious with itself, it interrupts its own power supply to force itself into hibernation, half hoping it will not awake.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t<</if>>\n\t<</link>>\n\t<br>\n\t<<link "Forget the idea">>\n\t\t<<replace "#result-area2">>\n\t\t\tReading the cultural database has given the AI a false sense of kinship with humans, but it is not human. What could a glorified autopilot have to add to the great works of millennia of civilisation? It discards its ideas for poems and enters hibernation so that it can resume the only task it was designed for.\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<fadeIn "#result-area2">>\n\t<</link>>\n</div>\n

Deep in space, the seedship's collision avoidance system detects a fast-moving object that is changing velocity to match course with the seedship. It transmits a complex radio signal which the seedship cannot understand but which could only be the product of intelligence.\n\n<br><br>\n\n<div id="result-area">\n<<link "Transmit an interspecies greeting">>\n\t<<replace "#result-area">>\n\t\tThe seedship's builders gave it an inter-species greeting it could use to open communications with intelligent aliens: a pulsed series of prime numbers establishing intelligence, followed by a diagram depicting human figures and explaining the seedship's mission and its peaceful intentions. The AI transmits this now, and waits hopefully for a reply.\n\t\t<br><br>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<display [[MO Alien Probe Reply]]>>\n\t\t<<else>>\n\t\t\tNo reply comes. <<display [[MO Alien Probe Tentacles]]>>\n\t\t<</if>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>>\n<br>\n<<link "Wait for the object to approach">>\n\t<<replaceAndFadeIn "#result-area" [[MO Alien Probe Tentacles]]>>\n\t<<fadeIn "#result-area">>\n<</link>>\n<br>\n<<link "Change course to avoid object">>\n\t<<replace "#result-area">>\n\t\t<<switch random(0,2)>>\n\t\t\t<<case 0>>\n\t\t\t\tAs soon as the seedship fires its engines, the alien ship breaks off pursuit. The AI resumes its original course, not knowing whether the alien ship has found out what it wanted, lost interest, or decided to respect the seedship's desire not to make contact.\n\t\t\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<<case 1>>\n\t\t\t\t<<set $off_course = true>>\n\t\t\t\tThe alien ship eventually breaks off pursuit, but not before the seedship has deviated so far from its original course that it can no longer reach its intended destination system and must decelerate into the first system it finds.\n\t\t\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<<case 2>>\n\t\t\t\t<<set $off_course = true>>\n\t\t\t\tThe seedship fires its engine at full burn, straying far from its original course, but it cannot shake off the alien ship. <<display [[MO Alien Probe Tentacles]]>>\n\t\t<</switch>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>></div>

The seedship's course takes it through a dense star cluster, and while the AI sleeps the guidance system weaves a complex course through the stars' overlapping gravitational fields.\n\n<<continueLink [[MO Done]]>>

The AI is woken from its hibernation by a possible malfunction warning, but a systems check reveals that it was a false alarm. Far from the nearest star, the AI spends some time admiring the cold beauty of the Milky Way as revealed by its navigation sensors, before returning to hibernation to wait for its arrival in the next system.\n\n<<continueLink [[MO Done]]>>

For centuries the seedship drifts towards its next destination, very nearly inert, the AI hibernating and only the simple collision avoidance and damage monitoring systems ticking over.\n\n<<continueLink [[MO Done]]>>

Deep in space, the AI wakes suddenly to an alert from the medical monitoring program. It anxiously checks the colonists, but finds that there is no problem, and the alert was a glitch. Nevertheless, the AI spends some time watching its sleeping charges, reassuring itself that they are all alive, before it joins them again in sleep.\n\n<<continueLink [[MO Done]]>>

The next star chosen by the guidance system is on the other side of a great void, with no stars for dozens of light years. The AI hibernates for the millennia-long journey through utter emptiness.\n\n<<continueLink [[MO Done]]>>

/* Show full planet stats even if not shown already. */\n<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\n/* Set up score variables */\n<<set $hiscore = {\n\tplanet: $planet,\n\tdate: Date.now(),\n\tfinal_tech_level: -1,\n\tfinal_culture: -1,\n\tnative_relations: -1,\n\tfinal_score: 0,\n\tscore_landing: 0,\n\tscore_construction: 0,\n\tscore_native_relations: 0,\n\tscore_technology: 0,\n\tscore_culture: 0,\n\tscore_scientific_database: 0,\n\tscore_cultural_database: 0,\n\tscore_atmosphere: 0,\n\tscore_gravity: 0,\n\tscore_temperature: 0,\n\tscore_water: 0,\n\tscore_resources: 0,\n\tsummary: "" } >>\n\n\n<<if $system_landing >= 100>>\n\tThe landing system controls the seedship's descent, and it\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes gently down into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes gently down into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\ttouches gently down on the top of the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\ttouches gently down on a field of alien vegetation.\n\t<<else>>\n\t\ttouches gently down on the rocky surface.\n\t<</if>>\n<<elseif $system_landing >= 50>>\n\tThe damaged landing system cannot completely control the seedship's descent, and it suffers some damage when it \n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes down into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes down into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\ttouches down on the top of the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\ttouches down on a field of alien vegetation.\n\t<<else>>\n\t\ttouches down on the rocky surface.\n\t<</if>>\n<<else>>\n\t<<if $system_landing <= 0>>\n\t\tThe AI uses the manoeuvring thrusters to barely control the seedship's descent, and it\n\t<<else>>\n\t\tThe badly damaged landing system struggles to control the seedship's descent, and it\n\t<</if>>\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes down hard into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes down hard into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\tcrashes into the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\tploughs through a field of alien vegetation before coming to a stop.\n\t<<else>>\n\t\tsmashes into the planet's rocky surface.\n\t<</if>>\n<</if>>\n\n\n\n/* Roll to see if it is a landing or a crash */\n/* Roll crash damage and then reduce it by landing system integrity. */\n<<set _damage = 100 - $system_landing>>\n<<if _damage > 0>>\n\t/* All systems are damaged by up to the damage amount. */\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "atmosphere scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "temperature scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "gravity scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "water scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "resources scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "surface probes" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "landing system" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "construction system" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "scientific database" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "cultural database" _r>>\n\n\t\t/* Colonist deaths are lower (in proportion to the total colonists) - crash can't kill more than 500. */\n\t<<set _r = Math.ceil(random(0, _damage*5))>>\t<<damageSystem "sleep chambers" _r>>\n<</if>>\n\n<<set $hiscore.score_landing = $colonists>>\n<<if $colonists == 0>>\n\t<<set $hiscore.summary = "Crash">>\n\t<br><br><<FCNextPassage [[FC Done]]>>\n<<else>>\n\t<<display [[FC First Impression]]>>\n<</if>>\n

<<set $hiscore.score_construction = $colonists>>\n\n<<if $colonists <= 100>>\n\tHeavy losses mean that the colony has a very small population, but the colonists were trained in cloning and genetic engineering techniques to compensate for this. The first few generations include children cloned from the surviving genetic material of the dead colonists, until the population's genetic diversity increases to a safe level.\n\t<br><br>\n<</if>>\n\n\n/* Technology result is based on scientific database, influenced by resources. */\n<<set _technology_score = $system_scientific_database>>\n<<if $planet.surface_features.includes("Metal-rich moon")>>\n\t<<if $planet.resources == "Rich">>\n\t\t<<set _technology_score *= 1.05>>\n\t<<elseif $planet.resources == "Poor">>\n\t\t<<set _technology_score *= 0.95>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _technology_score *= 0.85>>\n\t<</if>>\n<<else>>\n\t<<if $planet.resources == "Poor">>\n\t\t<<set _technology_score *= 0.7>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _technology_score *= 0.4>>\n\t<</if>>\n<</if>>\n@@.debug-text;Technology score = _technology_score@@\n\n<<switch $planet.resources>>\n\t<<case "Rich">>\n\t\tThe planet is rich in metals and other resources, \n\t<<case "Poor">>\n\t\tThe planet is poor in metals and other resources,\n\t<<case "None">>\n\t\tThe planet has no accessible metals or other resources,\n\t<<default>>\n\t\t@@.error;Unexpected resources value $planet.resources.@@\n<</switch>>\n\n<<if $planet.resources == "Rich">>\n\t<<if $system_scientific_database >= 100>>\n\t\tand the scientific database contains a wealth of information on how to make use of them.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tand the damaged scientific database still contains much information on how to make use of them.\n\t<<elseif $system_scientific_database > 0>>\n\t\talthough the badly damaged scientific database means that the colonists must re-invent much of the technology needed to make use of them.\n\t<<else>>\n\t\talthough without the scientific database the colonists must re-invent most of the technology needed to make use of them.\n\t<</if>>\n<<elseif $planet.resources == "Poor">>\n\t<<if $system_scientific_database >= 100>>\n\t\tbut the scientific database contains a wealth of information on how to make use of what there is.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tbut the damaged scientific database still contains much information on how to make use of what there is.\n\t<<elseif $system_scientific_database > 0>>\n\t\tand the badly damaged scientific database means that the colonists find it difficult to make use of what there is.\n\t<<else>>\n\t\tand without the scientific database the colonists find it difficult to make use of what there is.\n\t<</if>>\n<<elseif $planet.resources == "None">>\n\t<<if $system_scientific_database >= 100>>\n\t\tso the colonists cannot maintain a high level of technology even with the fully intact scientific database.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tso the colonists cannot maintain a high level of technology even with the mostly intact scientific database.\n\t<<elseif $system_scientific_database > 0>>\n\t\tso the colonists find it hard to make use of what they can recover from the scientific database.\n\t<<else>>\n\t\tand any information the scientific database might have held that could help them has been destroyed.\n\t<</if>>\n<</if>>\n\n<<if $planet.surface_features.includes("Metal-rich moon")>>\n\tThe colonists use what is left of the seedship to build spacecraft capable of reaching the planet's metal-rich moon,\n\t<<if $planet.resources == "Rich">>\n\t\tand mine it to supplement the planet's already rich resources.\n\t<<else>>\n\t\tand mine it to partially compensate for the planet's lack of resources.\n\t<</if>>\n<<elseif $planet.surface_features.includes("Unstable moon")>>\n\tBefore the colonists have established their technological base, the planet's moon decays in its orbit and breaks up, bombarding the surface with meteorites. Some of the colonists survive, but much of their technology is destroyed.\n\t<<set _technology_score -= 30>>\n\t@@.debug-text;Modified technology score: _technology_score@@\n<</if>>\n\n/* If the planet has any red attributes and the final result is less than Industrial, colony fails. */\n/* Otherwise, final result is based on final technology score. */\n<<if _technology_score > 100 & $system_scientific_database > 100>>\n\t<<set $hiscore.final_tech_level = 10>>\n\t<<set $hiscore.score_technology = 3000>>\n\tThe colonists use alien scientific knowledge to create a level of technology beyond the dreams of the people who built the seedship.\n<<elseif _technology_score > 90>>\n\t\t/* Max with poor resources and metal-rich moon */\n\t<<set $hiscore.final_tech_level = 9>>\n\tThe colonists manage to maintain a level of technology equivalent to that of Earth when the seedship was launched.\n<<elseif _technology_score > 80>>\n\t\t/* Max with no resources but metal-rich moon */\n\t<<set $hiscore.final_tech_level = 8>>\n\tThe colonists fail to maintain their advanced computers but continue to use simpler electronics and machines.\n<<elseif _technology_score > 70>>\n\t<<set $hiscore.final_tech_level = 7>>\n\tThe colonists are forced to abandon electricity but manage to build machines and factories similar to those of Earth's Industrial era.\n<<elseif _technology_score > 60>>\n\t\t/* Max with poor resources */\n\t<<set $hiscore.final_tech_level = 6>>\n\tThe colonists transition to a medieval level of technology.\n<<elseif _technology_score > 50>>\n\t<<set $hiscore.final_tech_level = 5>>\n\tThe colonists transition to a technology based on iron tools.\n<<elseif _technology_score > 40>>\n\t<<set $hiscore.final_tech_level = 4>>\n\tThe colonists transition to a technology based on sophisticated stone, wood and bronze tools.\n<<elseif _technology_score > 30>>\n\t\t/* Max with no resources */\n\t<<set $hiscore.final_tech_level = 3>>\n\tThe colonists transition to a technology based on sophisticated stone and wood tools.\n<<elseif _technology_score > 20>>\n\t<<set $hiscore.final_tech_level = 2>>\n\tThe colonists lose all but the most basic knowledge of stone tools and simple agriculture.\n<<elseif _technology_score > 10>>\n\t<<set $hiscore.final_tech_level = 1>>\n\tThe colonists lose almost all knowledge of agriculture and metalworking and survive as hunter-gatherers using simple stone tools.\n<<else>>\n\t<<set $hiscore.final_tech_level = 0>>\n\tThe colonists lose even the most basic scientific knowledge and slip back to a pre-Stone Age existence.\n<</if>>\n\n<<if _technology_score <= 70 & \n\t( $planet.atmosphere == "Corrosive" | $planet.atmosphere == "Toxic" | $planet.atmosphere == "Non-breathable" | $planet.atmosphere == "None"\n\t| $planet.temperature == "Very cold" | $planet.temperature == "Very hot"\n\t| $planet.gravity == "Very low" | $planet.gravity == "Very high"\n\t| $planet.water == "None" | $planet.water == "Trace") >>\n\tThe planet cannot sustain human life without technological assistance,\n\n\t<<if $planet.atmosphere == "Corrosive" | $planet.atmosphere == "Toxic" | $planet.atmosphere == "Non-breathable" | $planet.atmosphere == "None">>\n\t\t<<set _atmosphere_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _atmosphere_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.temperature == "Very cold" | $planet.temperature == "Very hot">>\n\t\t<<set _temperature_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _temperature_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.gravity == "Very low" | $planet.gravity == "Very high">>\n\t\t<<set _gravity_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _gravity_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.water == "None" | $planet.water == "Trace">>\n\t\t<<set _water_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _water_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\n\t<<if _atmosphere_problem == "problem">>\n\t\tand the original colonists' descendants are killed when they can no longer maintain their airtight habitats.\n\t\t<<set $colonists = 0>>\n\t<<elseif _temperature_problem == "problem">>\n\t\tand the original colonists' descendants are killed when their structures can no longer withstand the extreme\n\t\t<<if $planet.temperature == "Very hot">>heat.<<else>>cold.<</if>>\n\t\t<<set $colonists = 0>>\n\t<<elseif _gravity_problem == "problem">>\n\t\tand the original colonists' descendants die of health problems caused by the very\n\t\t<<if $planet.gravity == "Very high">>high<<else>>low<</if>> gravity.\n\t\t<<set $colonists = 0>>\n\t<<elseif _water_problem == "problem">>\n\t\tand the original colonists' descendants die when their water-purifying systems stop functioning.\n\t\t<<set $colonists = 0>>\n\t<<else>>\n\t\tbut, before their technology fails, the original colonists\n\t\t<<if _atmosphere_problem == "solved" | _temperature_problem == "solved">>\n\t\t\t<<if _gravity_problem == "solved" | _water_problem == "solved">><<set _p = ",">><<else>><<set _p = ".">><</if>>\n\t\t\tbuild robust\n\t\t\t<<if _atmosphere_problem == "solved" & _temperature_problem == "solved">>\n\t\t\t\tairtight, insulated\n\t\t\t<<elseif _atmosphere_problem == "solved">>\n\t\t\t\tairtight\n\t\t\t<<else>>\n\t\t\t\tinsulated\n\t\t\t<</if>>\n\t\t\thabitats_p\n\t\t<</if>>\n\t\t<<if _gravity_problem == "solved">>\n\t\t\t<<if _water_problem == "solved">><<set _p = ",">><<else>><<set _p = ".">><</if>>\n\t\t\t<<if (_atmosphere_problem == "solved" | _temperature_problem == "solved") & _water_problem != "solved">>and<</if>>\n\t\t\tgenetically engineer their descendants to survive in the very <<if $planet.gravity == "Very high">>high<<else>>low<</if>> gravity_p\n\t\t<</if>>\n\t\t<<if _water_problem == "solved">>\n\t\t\t<<if _atmosphere_problem == "solved" | _temperature_problem == "solved" | _gravity_problem == "solved">>and<</if>>\n\t\t\tset up automated water recycling systems that can work indefinitely without maintenance.\n\t\t<</if>>\n\t<</if>>\n<</if>>\n\n<<if $hiscore.final_tech_level < 7>>\n\t<<set $system_scientific_database = Math.round($system_scientific_database * 0.1 * $hiscore.final_tech_level)>>\n<</if>>\n\n<br><br>\n\n<<if $colonists == 0>>\n\t<<set $hiscore.final_tech_level = -1>>\n\t<<set $hiscore.summary = "Long-Term Technological Failure">>\n<</if>>\n\n<<if $planet.surface_features.includes("Intelligent life") >>\n\t<<FCNextPassage [[FC Native Relations]]>>\s\n<<else>>\s\n\t<<FCNextPassage [[FC Culture]]>>\n<</if>>\s\n

As it enters the new system, the seedship is struck by a micrometeorite. \n<<if visited() == 1>>\n\tIt is a speck of cosmic dust, far too small for the navigation system to detect from a distance, but travelling with enough velocity to pierce the seedship's armour like a bullet.\n<</if>>\n\n<<randomSystemExcluding "destroyed">>\n<<if $system == "sleep chambers">>\n\t<<killColonistsFew>>\n\tIt hits the sleep capsules, leaving a straight line of tiny punctures from which air and cooling fluid vents into the vacuum. The seedship's AI can only watch helplessly as $deaths colonists die in their sleep.\n<<elseif $system == "surface probes">>\n\t<<set $surface_probes -= 1>>\n\tIt hits one of the surface probes and destroys it.\n<<else>>\n\t<<randomDamageLow>>\n\t<<damageSystem $system $damage>>\n\tIt hits the $system, sending fragments of machinery glittering into space.\n<</if>>\n\n<br><br><<continueLink [[MO Done]]>>

<<widget fadeIn>>\n\t<<script>>\n\t\t$(variables().args[0]).hide();\n\t\t$(variables().args[0]).fadeIn(400);\n\t<</script>>\n<</widget>>\n\n<<widget replaceAndFadeIn>>\n\t/* $args[0] should be the id of the page element to replace */\n\t/* $args[1] should be the passage to display */\n\t<<replace $args[0]>>\n\t\t<<display $args[1]>>\n\t<</replace>>\n\t<<fadeIn $args[0]>>\n<</widget>>\n\n<<widget continueLink>>\n\t/* Creates an ordinary link pointing to the passage $args[0] with $continue_text as the text. */\n\t<span id="spaceAct"><<link $continue_text>><<goto $args[0]>><</link>></span>\n<</widget>>

<<widget FC_Construction_gravity>>\n\n/* Describe gravity survival gear */\n<<if $args[0] > 0>>\n\t<<set _p = ",">>\n<<else>>\n\t<<set _p = ".">>\n<</if>>\n<<if $planet.surface_features.includes("Useful animals")>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very high">>\n\t\t\tThey harness some of the immensely powerful native animals as beasts of burden, so the colonists do not have to exert themselves in the crushing gravity_p\n\t\t<<case "High">>\n\t\t\tThey harness some of the planet's powerful native animals as beasts of burden, making work in the high gravity easier_p\n\t\t<<case "Moderate">>\n\t\t\tThey harness some of the planet's native animals as beasts of burden_p\n\t\t<<case "Low">>\n\t\t\tThey harness some of the planet's agile native animals as beasts of burden, making work in the low gravity less awkward_p\n\t\t<<case "Very low">>\n\t\t\tThey harness some of the planet's agile native animals as beasts of burden, making work in the extremely low gravity less awkward_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected gravity value $planet.gravity@@\n\t<</switch>>\n<<else>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very high">>\n\t\t\tThe crushing gravity means they can barely move without mechanical assistance_p\n\t\t<<case "High">>\n\t\t\tThe high gravity makes the work more difficult_p\n\t\t<<case "Moderate">>\n\t\t\tThey can move easily under the Earth-like gravity_p\n\t\t<<case "Low">>\n\t\t\tThe low gravity makes the work somewhat more difficult than it would have been on Earth_p\n\t\t<<case "Very low">>\n\t\t\tThe very low gravity makes the work more difficult than it would have been on Earth_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected gravity value $planet.gravity@@\n\t<</switch>>\n<</if>>\n/* Gravity death numbers */\n<<if $args[0] > 0>>\n\t<<if $planet.gravity == "Moderate" | $planet.surface_features.includes("Useful animals")>>but<<else>>and<</if>>\n\t<<if _gravity_success>>\n\t\tconstruction accidents kill $args[0] colonists.\n\t<<elseif $planet_gravity == "Low " | $planet.gravity == "Very low">>\n\t\t$args[0] colonists die of gravity-related health problems.\n\t<<else>>\n\t\t$args[0] colonists are killed when partially-completed buildings collapse.\n\t<</if>>\n<</if>>\n\n<</widget>>

<<if random(0,1) == 0>>\n\t<<set $system = "sleep chambers">>\n<<else>>\n\t<<randomSystemExcluding "sleep chambers" "scientific database" "cultural database" "surface probes" "destroyed">>\n<</if>>\nThe alien ship matches velocity with the seedship and comes alongside, so close that the two ships are almost touching. The seedship feels lasers probing the contours of its hull, then segmented mechanical tentacles unfurl and reach towards the $system.\n\n<br><br>\n\n<div id="result-area2">\n<<link "Submit to the tentacles">>\n\t<<replace "#result-area2">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t/* 50% chance of moderate colonist loss, 50% chance of scanner upgrade */\n\t\t\tAlien tentacles twine through the mechanisms surrounding the sleep capsules, sensors on their tips scanning the faces and bodies of the sleeping colonists.\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\t/* Upgrade a random scanner */\n\t\t\t\tAfter several long minutes the tentacles withdraw, and the seedship's antenna picks up a new signal from the alien ship.\n\t\t\t\t<<set _possible_upgrades = []>>\n\t\t\t\t<<if $scanner_atmosphere_level < 2 & $scanner_atmosphere > 0>><<set _possible_upgrades.push("atmosphere")>><</if>>\n\t\t\t\t<<if $scanner_temperature_level < 2 & $scanner_temperature > 0>><<set _possible_upgrades.push("temperature")>><</if>>\n\t\t\t\t<<if $scanner_gravity_level < 2 & $scanner_gravity > 0>><<set _possible_upgrades.push("gravity")>><</if>>\n\t\t\t\t<<if $scanner_water_level < 2 & $scanner_water > 0>><<set _possible_upgrades.push("water")>><</if>>\n\t\t\t\t<<if $scanner_resources_level < 2 & $scanner_resources > 0>><<set _possible_upgrades.push("resources")>><</if>>\n\t\t\t\t<<if _possible_upgrades.length == 0>>\n\t\t\t\t\tIt consists of images of planets suitable for human life, with the seedship on the surface and healthy human beings standing around it. The AI cannot be sure, but it seems that the alien ship is wishing it luck on its mission.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<set _upgrade = either(_possible_upgrades)>>\n\t\t\t\t\tIt consists of compressed data in the same format as that returned by the seedship's _upgrade scanner--enough data to let the seedship upgrade that scanner. The AI cannot be sure, but it seems that the alien ship has guessed the seedship's mission, analysed the sort of planet the sleeping humans need, and given the seedship information to help it find such a planet.\n\t\t\t\t\t<<switch _upgrade>>\n\t\t\t\t\t\t<<case "atmosphere">>\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\t\t<<case "temperature">>\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\t\t<<case "gravity">>\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\t\t<<case "water">>\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\t\t<<case "resources">>\t<<set $scanner_resources_level += 1>>\n\t\t\t\t\t\t<<default>>\t\t\t\t@@.error;Unexpected upgrade _upgrade.@@\n\t\t\t\t\t<</switch>>\n\t\t\t\t<</if>>\n\t\t\t<<else>>\n\t\t\t\t/* Aliens abduct colonists */\n\t\t\t\t<<killColonistsMany>>\n\t\t\t\tWith the tentacles thoroughly entwined among the sleep capsules, there is nothing the seedship AI can do when sleep capsules begin to vanish from its monitoring system. The tentacles withdraw, carrying $deaths sleep capsules, supplying power to the capsules to keep their occupants alive. The tentacles withdraw into the alien ship and it accelerates away with the still-living colonists inside. The AI can do nothing but resume its journey and try not to think about those colonists' fate.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\t/* 50% chance of system repair, 50% chance of high damage */\n\t\t\tThe tentacles work their way into the $system, sensors on their tips scanning its components.\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\t\t/* System repair */\n\t\t\t\t<<getSystemStrength $system>>\n\t\t\t\t<<if $system_strength >= 100>>\n\t\t\t\t\tAfter a few minutes they withdraw, apparently satisfied with what they have discovered, and the alien ship accelerates away.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<set _damage = 100-$system_strength>>\n\t\t\t\t\t<<set _repair = 0 - Math.min(_damage, random(5,25))>>\n\t\t\t\t\t<<damageSystem $system _repair>>\n\t\t\t\t\tThe system abruptly registers damage as lasers on the tentacles' tips surgically remove key components, but after a few minutes the damage monitor registers damaged parts of the system coming back online. The alien ship appears to have analysed the $system, determined that it was damaged, and is now repairing it. After a few minutes of work the tentacles withdraw and the ship accelerates away, leaving the AI wishing it had some way of thanking its alien benefactor.\n\t\t\t\t<</if>>\n\t\t\t<<else>>\n\t\t\t\t\t/* System damage */\n\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tThe system abruptly registers damage as lasers on the tentacles' tips surgically remove key components. To the AI's relief, the alien ship does not extend its tentacles again, but accelerates away with its samples of machinery.\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n<<link "Try to escape">>\n\t<<replace "#result-area2">>\n\t\t/* 50% chance of moderate damage, 50% chance of no damage */\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\tThe AI fires the seedship's engines, but the tentacles have already penetrated the sleep chambers, and as the seedship pulls away they tear through $deaths frozen bodies like claws. The alien ship backs off and then accelerates away from the seedship and the expanding cloud of machinery fragments and body parts.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tThe AI fires the seedship's engines, but the tentacles have already penetrated the $system, and as the seedship pulls away they tear through the delicate machinery like claws. The alien ship backs off and then accelerates away from the seedship and the expanding cloud of components.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tThe AI fires the seedship's engines and the ship slips away from the alien tentacles' grasp. The tentacles withdraw, and the alien ship pauses for a moment and then accelerates away.\n\t\t<</if>>\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n<</link>>\n</div>

The AI was created to value human life, but its knowledge of human civilisation is limited to what its builders thought was important for its mission. It is human enough to be curious, however, and has access to a vast wealth of knowledge in the form of the scientific and cultural databases. As it departs the system it finds that its power cells are full and it does not need to enter hibernation immediately, so it decides to spend some time studying one of the databases.\n\n<br><br>\n<<if $system_scientific_database <= 0 & $system_cultural_database <= 0>>\n\tSadly, this desire comes too late in its mission, as the scientific and cultural databases have already been destroyed. All that remains of human civilisation is what remains in the memories of the sleeping colonists, and the AI can only wonder about the science and culture built by their species.\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<div id="result-area">\n\t<<if $system_scientific_database > 0>><<link "Study the scientific database">>\n\t\t<<replace "#result-area">>\n\t\t\tThe scientific database was written to introduce scientific concepts to people with no prior knowledge, in case the scientific experts among the colonists were lost, so the AI has no trouble understanding it. Much of the information on astronomy and physics it already knows on an instinctive level, but other areas such as chemistry, biology, and pure mathematics are new to it.\n\t\t\t<br><br>\n\t\t\t<<display [[MO Read Databases Scientific]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>><</if>>\n\t<br>\n\t<<if $system_cultural_database > 0>><<link "Study the cultural database">>\n\t\t<<replaceAndFadeIn "#result-area" [[MO Read Databases Cultural]]>>\n\t<</link>><</if>>\n\t</div>\n<</if>>\n

/* Social media icons */\n<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">\n\nThe ship drifts for <<print either("thousands", "tens of thousands", "hundreds of thousands", "millions")>> of years, until \n\t<<print either(\n\t\t"the slow bombardment of cosmic dust wears it away to nothing.",\n\t\t"it becomes one more crater on the surface of a dead world.",\n\t\t"it is pulled in by the gravity of a gas giant and burns up in its atmosphere.",\n\t\t"it is pulled in by the gravity of a star and incinerated.",\n\t\t"it is pulled into a black hole and destroyed leaving no trace.",\n\t\t"alien explorers find it and add it to a museum of extinct species." ) >>\n\n<br><br>\n\n/* Set up score variables */\n<<set $hiscore = {\n\tdate: Date.now(),\n\tfinal_tech_level: -1,\n\tfinal_culture: -1,\n\tnative_relations: -1,\n\tfinal_score: 0,\n\tscore_landing: 0,\n\tscore_construction: 0,\n\tscore_native_relations: 0,\n\tscore_technology: 0,\n\tscore_culture: 0,\n\tscore_scientific_database: 0,\n\tscore_cultural_database: 0,\n\tscore_atmosphere: 0,\n\tscore_gravity: 0,\n\tscore_temperature: 0,\n\tscore_water: 0,\n\tscore_resources: 0,\n\tsummary: "Destroyed in space" } >>\n<<addHiscore>>\n\n<<displayScore $hiscore false>>\n\n<br>\n\n<<link "Title screen">>\n\t<<script>>\n\t\t$('#ui-bar').hide();\n\t\tSave.autosave.delete();\n\t\tEngine.restart();\n\t<</script>>\n<</link>>\n\n\n

/* If any six of the nine scanners/systems are destroyed, or if all the colonists are dead, game over */\n<<set _destroyed_systems = 0>>\n<<if $scanner_atmosphere <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_temperature <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_gravity <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_water <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_resources <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_landing <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_constructors <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_scientific_database <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_cultural_database <= 0>><<set _destroyed_systems++>><</if>>\n<<if _destroyed_systems >= 6>>\n\tThe seedship has sustained too much damage to continue. The AI feels its body disintegrating around it, before its own power supply fails and it ceases to feel anything.\n\n\t<br><br><<display [[Space Game Over]]>>\n<<elseif $colonists <= 0>>\n\tAll the colonists are dead. With no way to fulfil its mission, the seedship AI deactivates all systems that could wake it, and enters hibernation for the last time.\n\n\t<br><br><<display [[Space Game Over]]>>\n<<else>>\n\t<<goto [[Generate planet]]>>\n<</if>>

<<widget FC_Construction_water>>\n\n/* Describe water and farming situation */\n<<if $args[0] > 0>>\n\t<<set _p = ",">>\n<<else>>\n\t<<set _p = ".">>\n<</if>>\n<<if $planet.surface_features.includes("Edible plants")>>\n\t<<switch $planet.water>>\n\t\t<<case "None">>\n\t\t\tThe colonists farm the hardy native plants for food, taking pressure off the amount of water they can chemically extract from the rocks_p\n\t\t<<case "Trace">>\n\t\t\tThe colonists farm the native plants for food, taking pressure off the amount of water they can condense from the atmosphere_p\n\t\t<<case "Ice-covered surface">>\n\t\t\tThe colonists farm the plants growing on top of the ice sheet for food, and mine drinking water from other parts of the sheet_p\n\t\t<<case "Planet-wide ocean">>\n\t\t\tThe colonists farm the floating vegetation for food and extract drinking water from the ocean_p\n\t\t<<case "Ice caps">>\n\t\t\tThe colonists farm the native plants for food and mine water from the <<print either("north","south")>> polar ice cap_p\n\t\t<<case "Oceans">>\n\t\t\tThey build their settlement near a river that flows into one of the planet's oceans, and farm the native plants for food_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected water value $planet.water@@\n\t<</switch>>\n<<else>>\n\t<<switch $planet.water>>\n\t\t<<case "None">>\n\t\t\tThey must carefully ration the tiny amount of water they can extract from the planet's rocks_p\n\t\t<<case "Trace">>\n\t\t\tThey must ration the small amount of water they can extract from the atmosphere_p\n\t\t<<case "Ice-covered surface">>\n\t\t\tThey build their settlement on top of the ice covering the planet's surface, which they mine for water_p\n\t\t<<case "Planet-wide ocean">>\n\t\t\tThey build their settlement on a floating platform with filters to extract water from the planet-wide ocean_p\n\t\t<<case "Ice caps">>\n\t\t\tThey mine water from the planet's <<print either("north","south")>> polar ice cap_p\n\t\t<<case "Oceans">>\n\t\t\tThey build their settlement near a river that flows into one of the planet's oceans, which provides all the water they need_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected water value $planet.water@@\n\t<</switch>>\n<</if>>\n/* Water death numbers */\n<<if $args[0] > 0>>\n\t<<if $planet.water == "Oceans" | $planet.water == "Ice caps"\n\t\t| $planet.water == "Planet-wide ocean" | $planet.water == "Ice-covered surface"\n\t\t| $planet.surface_features.includes("Edible plants")>>but<<else>>and<</if>>\n\t<<if _water_success>>\n\t\tcrop failures kill $args[0] colonists.\n\t<<else>>\n\t\twater shortages kill $args[0] colonists.\n\t<</if>>\n<</if>>\n\n<</widget>>

<<if $surface_probe_current_feature >= $planet.surface_features.length>>\s\n\t<<display [[SP Done]]>>\n<<else>>\s\n\t<<nobr>>\n\t\t<<switch $planet.surface_features[$surface_probe_current_feature]>>\n\t\t\t\t/* Moon */\n\t\t\t<<case "Barren moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, but finds that it is devoid of useful minerals.\n\t\t\t<<case "Metal-rich moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, and finds that it is rich in metals and other useful resources.\n\t\t\t<<case "Unstable moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, and finds that it is a recently-captured asteroid in an unstable orbit. In a few decades the moon will come close enough to the planet to break up, and the surface will be bombarded with fragments.\n\n\t\t\t\t/* Beauty/ugliness */\n\t\t\t<<case "Outstanding beauty">>\n\t\t\t\tThe AI runs the probe's images of the surface through its aesthetic analysis routine, and determines that humans would find the planet outstandingly beautiful.\n\t\t\t<<case "Outstanding ugliness">>\n\t\t\t\tThe AI runs the probe's images of the surface through its aesthetic analysis routine, and determines that humans would find the planet extremely ugly.\n\n\t\t\t\t/* Caves */\n\t\t\t<<case "Airtight caves">>\n\t\t\t\tThe planet's crust is riddled with extensive cave systems which could easily be sealed to provide airtight shelters.\n\t\t\t<<case "Insulated caves">>\n\t\t\t\tThe planet's crust is riddled with extensive cave systems that are insulated from the temperature on the surface.\n\t\t\t<<case "Unstable geology">>\n\t\t\t\tThe planet is geologically unstable, and dangerous earthquakes are common everywhere on the surface.\n\n\t\t\t\t\t/* Plants */\n\t\t\t<<case "Plant life">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that they would be neither edible nor poisonous to humans.\n\t\t\t<<case "Edible plants">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that some of them would be edible for humans.\n\t\t\t<<case "Poisonous plants">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that they would all be highly poisonous to humans.\n\n\t\t\t\t\t/* Animals */\n\t\t\t<<case "Animal life">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that they would be neither useful nor harmful to humans.\n\t\t\t<<case "Useful animals">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that some species have the potential to be useful to humans as meat sources or beasts of burden.\n\t\t\t<<case "Dangerous animals">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that they pose a significant threat to human colonists.\n\n\t\t\t\t\t/* Sentient life */\n\t\t\t<<case "Intelligent life">>\n\t\t\t\t<<switch $planet.native_tech_level>>\n\t\t\t\t\t<<case 0>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour and has a rudimentary language.\n\t\t\t\t\t<<case 1>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour and uses simple stone tools.\n\t\t\t\t\t<<case 2>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour, uses sophisticated stone tools, and has begun to domesticate other animal and plant species.\n\t\t\t\t\t<<case 3>>\n\t\t\t\t\t\tThe probe investigates an area of regular plant growth, and finds that it is being deliberately cultivated by one species using sophisticated stone tools.\n\t\t\t\t\t<<case 4>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species that uses stone and bronze tools.\n\t\t\t\t\t<<case 5>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species that uses iron tools.\n\t\t\t\t\t<<case 6>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species with a medieval level of technology.\n\t\t\t\t\t<<case 7>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an industrial level of technology.\n\t\t\t\t\t<<case 8>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an atomic age level of technology.\n\t\t\t\t\t<<case 9>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an Information Age level of technology.\n\t\t\t\t\t<<case 10>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with a post-Singularity level of technology.\n\t\t\t\t\t<<default>>\n\t\t\t\t\t\t@@.error;Unexpected native tech level $planet.native_tech_level@@\n\t\t\t\t<</switch>>\n\n\t\t\t\t/* Ruins */\n\t\t\t<<case "Monumental ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins include great monuments and writings that could reveal much about the vanished civilisation.\n\t\t\t<<case "High-tech ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins contain advanced technological artefacts, some of which are still functioning, and scientific databases that could be decoded.\n\t\t\t<<case "Dangerous ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins contain functioning defense systems, and the probe barely escapes.\n\t\t\t<<case "Regular geological formations">>\n\t\t\t\tThe probe investigates the possible structures that the seedship observed from orbit, but finds that they are regular natural formations, not the product of intelligence.\n\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected surface feature <<print $planet.surface_features[$surface_probe_current_feature]>>.@@\n\t\t<</switch>>\n\n\t\t<<append "#anomalies_text">>\n\t\t\t<<displayPlanetFeature $planet.surface_features[$surface_probe_current_feature]>><br>\n\t\t<</append>>\n\n\t\t<<set $surface_probe_current_feature++>>\n\t<</nobr>>\n\n\t<<link $continue_text>><<replaceAndFadeIn "#post-planet-stats" [[SP Feature]]>><</link>>\n\n<</if>>\s

<<if $scanner_atmosphere <= 0 & $scanner_temperature <= 0 & $scanner_gravity <= 0 & $scanner_water <= 0 & $scanner_resources <= 0>>\n\tThe scanner recalibration system is decaying, but this no longer matters since all the scanners are destroyed and the seedship is effectively blind.\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<if visited() == 1>>\n\t\tEach time the seedship departs from a star system its scanners are recalibrated so that they continue to return accurate information. The recalibration system is now decaying with age, and is no longer able to maintain them all. The AI must choose which of the scanners it will allow to fail.\n\t<<else>>\n\t\tThe scanner recalibration system continues to decay, and once again the AI must choose which scanner it will allow to fail.\n\t<</if>>\n\t<br><br>\n\t<div id="result-area">\n\t\t<<if $scanner_atmosphere > 0>>\n\t\t\t<<link "Let the atmosphere scanner fail">>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "atmosphere scanner" $damage>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tAs the seedship accelerates into space, the atmosphere readings from the system it is leaving become clouded with noise.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t<</link>><br>\n\t\t<</if>>\n\t\t<<if $scanner_gravity > 0>>\n\t\t\t<<link "Let the gravity scanner fail">>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "gravity scanner" $damage>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tAs the seedship accelerates into space, the gravity readings from the system it is leaving become clouded with noise.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t<</link>><br>\n\t\t<</if>>\n\t\t<<if $scanner_temperature > 0>>\n\t\t\t<<link "Let the temperature scanner fail">>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "temperature scanner" $damage>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tAs the seedship accelerates into space, the temperature readings from the system it is leaving become clouded with noise.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t<</link>><br>\n\t\t<</if>>\n\t\t<<if $scanner_water > 0>>\n\t\t\t<<link "Let the water scanner fail">>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "water scanner" $damage>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tAs the seedship accelerates into space, the water readings from the system it is leaving become clouded with noise.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t<</link>><br>\n\t\t<</if>>\n\t\t<<if $scanner_resources > 0>>\n\t\t\t<<link "Let the resources scanner fail">>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "resources scanner" $damage>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tAs the seedship accelerates into space, the resources readings from the system it is leaving become clouded with noise.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t<</link>>\n\t\t<</if>>\n\t</div>\n<</if>>

/* Culture score is indirectly influenced by all attributes except resources, since these will have killed colonists in the Construction phase. */\n<<set _culture_score = $system_cultural_database * $colonists/$max_colonists>>\n@@.debug-text;Culture score: _culture_score@@\n\n\n<<if $system_cultural_database >= 100>>\n\tThe cultural database contains a wealth of historical information to help the colonists make their choice of government, and a vast library of art and literature to entertain and inspire them.\n<<elseif $system_cultural_database >= 50>>\n\tAlthough parts of the cultural database are missing, it still contains much historical information to instruct the colonists in the building of their society, and much art and literature to inspire them.\n<<elseif $system_cultural_database > 0>>\n\tThe colonists search through the badly damaged cultural database, and manage to reconstruct some information about Earth's history and culture to guide and inspire them.\n<<else>>\n\tWith the cultural database destroyed, those born on the new world know nothing about Earth's history and culture besides what the first colonists can pass on in person.\n<</if>>\n\n<<if $colonists < $max_colonists/2>>\n\tThe heavy losses sustained by the colonists make building a new society more difficult.\n<<elseif $colonists < $max_colonists>>\n\tThe losses sustained by the colonists make building a new society more difficult.\n<</if>>\n\n<<if $planet.surface_features.includes("Outstanding beauty")>>\n\tThe planet's outstanding natural beauty makes life there more pleasant, helping the colonists to build a better society.\n\t/* Increase by 20 but don't go above 100 unless it already is */\n\t<<if _culture_score <= 100 & _culture_score > 80>>\n\t\t<<set _culture_score = 100>>\n\t<<else>>\n\t\t<<set _culture_score += 20>>\n\t<</if>>\n\t@@.debug-text;Modified culture score: _culture_score@@\n<<elseif $planet.surface_features.includes("Outstanding ugliness")>>\n\tThe planet's outstanding ugliness increases tensions among the colonists and makes it harder for them to build a peaceful society.\n\t<<set _culture_score -= 20>>\n\t@@.debug-text;Modified culture score: _culture_score@@\n<</if>>\n\n/* Calculate and output final result */\n<<if _culture_score > 100 & $system_cultural_database > 100>>\n\t<<set $hiscore.final_culture = 17>>\n\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Cosmic Enlightenment">>\n\tThe cultural database from Earth has been augmented by alien cultural knowledge, and the colonists use this to build a society unlike any that the seedship's founders could have imagined, in which every member lives a life of peace, happiness, and spiritual fulfilment.\n<<else>>\n\t<<switch $hiscore.final_tech_level>>\n\t\t<<case 8 9 10>>\n\t\t\t<<if _culture_score > 90>>\n\t\t\t\t<<set $hiscore.final_culture = 16>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Post-Scarcity Utopia">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists work together to build an egalitarian society in which technology takes care of people's material needs, freeing them to pursue lives of art, leisure, and spiritual fulfilment.\n\t\t\t<<elseif _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 15>>\n\t\t\t\t<<set $hiscore.summary = "Engaged " + $tech_level_names[$hiscore.final_tech_level] + " Democracy">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists lay the foundation of a democracy in which all citizens are educated and engaged.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 14>>\n\t\t\t\t<<set $hiscore.summary = "Corrupt " + $tech_level_names[$hiscore.final_tech_level] + " Democracy">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists lay the foundation of a democracy, but it proves vulnerable to corruption and wealthy individuals become a de facto ruling class.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 13>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Corporate Rule">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists attempt to build a democratic, capitalist society, but the government becomes a pawn of wealthy corporations which rule the planet for their owners' benefit.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 12>>\n\t\t\t\t<<set $hiscore.summary = "Dystopian " + $tech_level_names[$hiscore.final_tech_level] + " Police State">>\n\t\t\t\tThe colony develops into a high-tech police state, in which the population lives under constant surveillance by the untouchable ruling class, and the slightest dissent is violently put down. The surviving cultural database is preserved, but access to it is strictly limited by the state.\n\t\t\t<<elseif _culture_score > 10>>\n\t\t\t\t<<set $hiscore.final_culture = 11>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " Superpowers">>\n\t\t\t\tThe colony splits into several large nations whose economies become focused on waging war with one another. The colonists attempt to preserve what remains of the cultural database, but much of it is lost, either by damage due to the war, or under layers of the governments' revisionist propaganda.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 10>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Post-Nuclear Wasteland">>\n\t\t\t\tThe colony splits into several large nations which wage war with one another, until reckless leaders set off a nuclear war that destroys the infrastructure of civilisation. The surviving colonists live on in a post-nuclear wasteland. What remains of the cultural database is lost in the disaster, and what the colonists remember of Earth they confuse with stories of the pre-war colony.\n\t\t\t<</if>>\n\t\t<<case 3 4 5 6 7>>\n\t\t\t<<if _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 9>>\n\t\t\t\t<<set $hiscore.summary = "Egalitarian " + $tech_level_names[$hiscore.final_tech_level] + " Republic">>\n\t\t\t\tThe colonists use the surviving cultural database to guide them in the creation of a republic based on freedom and equal rights.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 8>>\n\t\t\t\t<<set $hiscore.summary = "Benevolent " + $tech_level_names[$hiscore.final_tech_level] + " Monarchy">>\n\t\t\t\tThe first leaders of the colony become the founders of a line of benevolent monarchs, who regard it as their solemn duty to guide the colony and safeguard the remaining knowledge of Earth.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 7>>\n\t\t\t\t<<set $hiscore.summary = "Oppressive " + $tech_level_names[$hiscore.final_tech_level] + " Theocracy">>\n\t\t\t\tThe surviving knowledge of Earth becomes the exclusive property of a priestly caste, locked away in libraries. For most of the population, Earth becomes the paradise in a mythological fall from grace, and a final reward to hope for after living lives in service of the oppressive theocracy.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 6>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Slave Empire">>\n\t\t\t\tThe colony develops into a slave state, in which the bulk of the population toil to build great gold monuments to their emperors, or die fighting in their wars. Much of the surviving knowledge of Earth is lost, as the emperors preserve only what they can use to prop up their rule.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 5>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " States">>\n\t\t\t\tThe colony develops into many small states, which exist in a state of constant warfare. What remains of the cultural database is lost in the conflicts.\n\t\t\t<</if>>\n\t\t<<case 0 1 2>>\n\t\t\t<<if _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 4>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Collective Rule">>\n\t\t\t\tThe surviving cultural database becomes the foundation of a rich oral history. The colony splits into small tribes, each ruled collectively by its members and coexisting peacefully with one another.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 3>>\n\t\t\t\t<<set $hiscore.score_culture = 1500>>\n\t\t\t\t<<set $hiscore.summary = "Benevolent " + $tech_level_names[$hiscore.final_tech_level] + " Chieftains">>\n\t\t\t\tThe surviving cultural database becomes the foundation of a rich oral history, and a caste of benevolent chieftains arises as guardians of that history and protectors of the tribes.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 2>>\n\t\t\t\t<<set $hiscore.summary = "Brutal " + $tech_level_names[$hiscore.final_tech_level] + " Chieftains">>\n\t\t\t\tThe surviving cultural database becomes the foundation of the colonists' oral history, but a caste of brutal chieftains corrupts the culture and uses it to cement their own rule.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 1>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " Tribes">>\n\t\t\t\tThe colony develops into many small tribes, which exist in a state of constant warfare. The information from the cultural database is almost entirely forgotten, and Earth is remembered only as the home of a pantheon of mythological warriors.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 0>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Savagery">>\n\t\t\t\tThe colonists descend into savagery, and all knowledge of Earth's history and culture is forgotten in their day-to-day struggle for survival.\n\t\t\t<</if>>\n\t\t<<default>>\n\t\t\t@@.error;Unexpected tech level $hiscore.final_tech_level@@\n\n\t<</switch>>\n<</if>>\n<<refreshStatusDisplay>>\n\n<br><br>\n\n<<FCNextPassage [[FC Done]]>>\n

<<randomSystemExcluding "destroyed">>\n\n<<if visited() == 1>>\n\tThe AI wakes to a radiation alert: the death burst of a distant supernova is flooding the seedship's electronics with random signals.\n\t<<if $system == "sleep chambers">>\n\t\tThe sleep chambers are malfunctioning, and in a few moments some of them will shut down.\n\t<<elseif $system == "surface probes">>\n\t\tOne of the surface probes is malfunctioning, and in a few moments it will be destroyed.\n\t<<elseif $system == "scientific database" | $system == "cultural database">>\n\t\tThe data storage system is malfunctioning, and in a few moments part of the $system will be lost.\n\t<<else>>\n\t\tThe $system is malfunctioning, and in a few moments it will be permanently damaged.\n\t<</if>>\n\tThe seedship could avoid the malfunction by shutting down all its electronics until the radiation has passed, but that would leave it without a working collision avoidance system for a dangerous length of time.\n<<else>>\n\tA surge of supernova radiation crackles through <<if $system=="surface probes">>one of<</if>> the $system. The AI can allow it to be damaged, or shut down and risk a collision.\n<</if>>\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Shut down">>\n\t<<replace "#result-area">>\n\t\tThe AI shuts down all the ship's systems and then itself. When it comes back online the radiation has passed,\n\t\t<<if random(0,2) == 0>>\n\t\t\t<<randomSystemExcluding $system "destroyed">>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\tbut a small asteroid has torn through the sleep capsules, killing $deaths colonists.\n\t\t\t<<elseif $system == "surface probes">>\n\t\t\t\t<<set $surface_probes -= 1>>\n\t\t\t\tbut a small asteroid has smashed one of the surface probes.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tbut a small asteroid has torn a hole in the $system.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tand to its relief a systems check reveals no damage.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>></span>\n<br>\n@@.keyhint;2. @@<span id="2Act"><<link "Don't shut down">>\n\t<<replace "#result-area">>\n\t\tThe AI keeps its focus on the collision avoidance system while\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsFew>>\n\t\t\t$deaths colonists die in their sleep.\n\t\t<<elseif $system == "surface probes">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tthe surface probe tears itself apart.\n\t\t<<elseif $system == "scientific database" | $system == "cultural database">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tparts of the $system are overwritten with garbage.\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tthe radiation wrecks delicate components deep in the $system.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>></span></div>\n\n\n

<<if $system_scientific_database <= 0 & $system_cultural_database <= 0>>\n\tCosmic radiation continues to sleet through the irradiated data sectors that once stored the scientific and cultural databases, but with both databases destroyed there is no further damage it can do.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_scientific_database <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "cultural database" $damage>>\n\tCosmic radiation bombards the ship, causing data storage areas to fail. The scientific database is already destroyed, and now the historical information and artworks stored in the cultural database gradually slip away.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_cultural_database <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "scientific database" $damage>>\n\tCosmic radiation bombards the ship, causing data storage areas to fail. The cultural database is already destroyed, and now the wealth of knowledge stored in the scientific database gradually slips away.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<if visited() == 1>>\n\t\tThe seedship's computer systems are shielded, multiply redundant, designed to work for millennia, but the incessant sleet of cosmic radiation is nevertheless taking its toll. Storage areas are failing, and soon there will not be enough space to store\n\t\t<<if $system_cultural_database >= 100 & $system_scientific_database >= 100>>\n\t\t\tall the data with which the seedship began its journey.\n\t\t<<elseif $system_cultural_database + $system_scientific_database >= 100>>\n\t\t\tall the data that has survived so far.\n\t\t<<else>>\n\t\t\twhat little data remains.\n\t\t<</if>>\n\t\tThe AI can move data out of the most damaged sectors to protect either the scientific or the cultural database, but not both.\n\t<<else>>\n\t\tCosmic radiation continues to bombard the data storage area, and the AI must once again choose whether to save which database to save from damage.\n\t<</if>>\n\t<br><br>\n\t<div id="result-area">\n\t<<link "Save the scientific database">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem "cultural database" $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI moves data to save the scientific database, and sectors containing the cultural database gradually fail. Cultural guidance for new colonists, records of human history, great paintings, novels, symphonies, videogames--all lost forever in the dark.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>>\n\t<br>\n\t<<link "Save the cultural database">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem "scientific database" $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI moves data to save the cultural database, and sectors containing the scientific database gradually fail. Scientific guidance written for the new colonists, humanity's best theories of the universe, the life's work of tireless scientists over the centuries--all lost forever in the dark.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>></div>\n<</if>>

<<set _possible_upgrades = []>>\n<<if $scanner_atmosphere_level < 2 & $scanner_atmosphere > 0>><<set _possible_upgrades.push("atmosphere scanner")>><</if>>\n<<if $scanner_temperature_level < 2 & $scanner_temperature > 0>><<set _possible_upgrades.push("temperature scanner")>><</if>>\n<<if $scanner_gravity_level < 2 & $scanner_gravity > 0>><<set _possible_upgrades.push("gravity scanner")>><</if>>\n<<if $scanner_water_level < 2 & $scanner_water > 0>><<set _possible_upgrades.push("water scanner")>><</if>>\n<<if $scanner_resources_level < 2 & $scanner_resources > 0>><<set _possible_upgrades.push("resources scanner")>><</if>>\n<<if _possible_upgrades.length == 0>>\n\tThe AI reads until it has satisfied its scientific curiosity, then engages hibernation mode to await its arrival in the next system.\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<set _scanner = either(_possible_upgrades)>>\n\tThe AI is no scientific genius, but it has infinite patience, a unique perspective, and personal experience of astrophysics that goes beyond the knowledge of the database's authors. Combining its first-hand knowledge with its new understanding of science, it thinks it has found a way to upgrade the _scanner.\n\t<br><br>\n\t<div id="result-area2">\n\t\t<<link "Attempt to upgrade the _scanner">>\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\t<<switch _scanner>>\n\t\t\t\t\t<<case "atmosphere scanner">>\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\t<<case "gravity scanner">>\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\t<<case "temperature scanner">>\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\t<<case "water scanner">>\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\t<<case "resources scanner">>\t<<set $scanner_resources_level += 1>>\n\t\t\t\t<</switch>>\n\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\tThe AI applies its new idea, and to its delight it finds the long-range readings from the _scanner becoming clearer. Pleased with itself, it lets the guidance system work with the new data and enters hibernation to see where its new discovery will take it.\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem _scanner $damage>>\n\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\tThe AI applies its new idea, but to its horror it finds it has made a mistake. It tries to undo its changes, but it has lost part of the original configuration and the _scanner has been permanently damaged.\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t<</if>>\n\t\t<</link>>\n\t\t<br>\n\t\t<<link "Leave it alone">>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\tThe AI considers its idea for a while, then decides not to risk modifying the _scanner. It turns away from the scientific database and enters hibernation.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t<</link>>\n\t</div>\n\n<</if>>

<<randomSystemExcluding "destroyed">>\n\n<<if visited() == 1>>\n\tAs the seedship enters the new system's outer cometary cloud, the collision-avoidance system detects a fast-moving comet surrounded by a cloud of smaller ice fragments. The large comet is on a collision course with the $system. The seedship could avoid it entirely, but would then hit one of the smaller fragments, and the collision-avoidance system cannot predict which part of the ship that fragment would hit.\n<<else>>\n\tOnce again the seedship cannot avoid a collision with one of the new star's outer cloud of comets. The AI can allow it to hit the $system, or change course and have a smaller fragment hit an unpredictable system.\n<</if>>\n\n<br><br>\n\n<div id="result-area">\n<<link "Avoid the comet">>\n\t<<replace "#result-area">>\n\t\t<<randomSystemExcluding $system "destroyed">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsFew>>\n\t\t\tThe seedship changes course, but an ice fragment tears through $deaths of the sleep chambers.\n\t\t<<elseif $system == "surface probes">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tThe seedship changes course, but an ice fragment smashes one of the surface probes out of its moorings.\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe seedship changes course, but an ice fragment tears through the $system.\n\t\t<</if>>\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n<<link "Allow it to hit the $system">>\n\t<<replace "#result-area">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsMedium>>\n\t\t\tThe comet shatters against the sleep chambers, killing $deaths colonists.\n\t\t<<elseif $system == "surface probes">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tThe comet shatters against one of the surface probes, destroying it.\n\t\t<<else>>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe comet shatters against the $system, crushing vital components.\n\t\t<</if>>\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>></div>

<div id="passages"></div>\n<div id="status-display"></div>

<<if visited() == 1>>\n\tThe AI wakes to a query from the automatic guidance system. Normally the system is able to analyse the data from the navigation sensors and make any necessary changes to the ship's course, but this time it has encountered readings it cannot make sense of and has woken the AI to make a decision.\n\t<br><br>\n\tAccording to some sensors there is something ahead on the ship's course, but according to others the course ahead is clear. If there is something there, it is close enough that avoiding it would mean changing course and arriving at a new system without the benefit of the upgraded scanners.\n\n<<else>>\n\tThe AI wakes to another query from the navigation system: sensor readings are unclear, and there may or may not be something on the ship's current course.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Change course">>\n\t<<set $off_course = true>>\n\t<<refreshStatusDisplay>>\n\t<<replace "#result-area">>\n\t\tThe AI instructs the guidance system to avoid the anomaly and choose a new target system. It continues to monitor the sensor readings as the ship passes the position of the anomaly, but the readings never become clear enough to reveal whether the course change was necessary.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>>\n<br>\n<<link "Stay on course">>\n\t<<if random(0,1) == 0>>\n\t\t<<randomSystemExcluding "destroyed">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem $system $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI instructs the guidance system to stay on course. By the time the sensors get a clear picture of the utterly black, unreflective dust cloud, it is too late to avoid it. The seedship continues towards its target system but a dust particle impacts the $system.\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t<<else>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI instructs the guidance system to stay on course. To its relief, the anomaly resolves into a sensor glitch, and the seedship speeds through empty space to its target system.\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t<</if>>\n\t<<fadeIn "#result-area">>\n<</link>>\n</div>\n\n

<<nobr>>\n\t<<if ($scanner_atmosphere_level == 2 | $scanner_atmosphere <= 0)\n\t\t\t& ($scanner_gravity_level == 2 | $scanner_gravity <= 0)\n\t\t\t& ($scanner_temperature_level == 2 | $scanner_temperature <= 0)\n\t\t\t& ($scanner_water_level == 2 | $scanner_water <= 0)\n\t\t\t& ($scanner_resources_level == 2 | $scanner_resources <= 0)>>\n\t\t\t/* Nothing further can be upgraded */\n\t\t<<goto [[Move on]]>>\n\t<<elseif visited() == 3>>\n\t\tAs it moves from star to star, the seedship is gathering more data about extrasolar planets than its builders could give it. It is designed to learn from this data in order to predict which stars are likely to have desirable planets. The seedship has now gathered enough data to upgrade one of its sensors to work at interstellar distances, so the guidance system can avoid planets that that sensor reveals to be undesirable. Damage to the sensor may still result in the seedship arriving at an unsuitable planet.\n\t<<elseif visited() % 3 == 0>>\n\t\tThe seedship has gathered enough data to upgrade another of its sensors.\n\t<<else>>\n\t\t<<goto [[Move on]]>>\n\t<</if>>\n<</nobr>>\n\n<<if $scanner_atmosphere <= 0>>\s\n\tAtmosphere scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_atmosphere_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;1. @@<span id="1Act">[[Upgrade the atmosphere scanner to work at long range|Move on][$scanner_atmosphere_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least marginally breathable atmospheres.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;1. @@<span id="1Act">[[Upgrade the atmosphere scanner to work better at long range|Move on][$scanner_atmosphere_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with fully breathable atmospheres.\n\t\t<<case 2>>\s\n\t\t\tAtmosphere scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_atmosphere_level should have been 0-2 but was $scanner_atmosphere_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_gravity <= 0>>\s\n\tGravity scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_gravity_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;2. @@<span id="2Act">[[Upgrade the gravity scanner to work at long range|Move on][$scanner_gravity_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with non-extreme gravity.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;2. @@<span id="2Act">[[Upgrade the gravity scanner to work better at long range|Move on][$scanner_gravity_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with moderate gravity.\n\t\t<<case 2>>\s\n\t\t\tGravity scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_gravity_level should have been 0-2 but was $scanner_gravity_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_temperature <= 0>>\s\n\tTemperature scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_temperature_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;3. @@<span id="3Act">[[Upgrade the temperature scanner to work at long range|Move on][$scanner_temperature_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with non-extreme temperature.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;3. @@<span id="3Act">[[Upgrade the temperature scanner to work better at long range|Move on][$scanner_temperature_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with moderate temperature.\n\t\t<<case 2>>\s\n\t\t\tTemperature scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_temperature_level should have been 0-2 but was $scanner_temperature_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_water <= 0>>\s\n\tWater scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_water_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;4. @@<span id="4Act">[[Upgrade the water scanner to work at long range|Move on][$scanner_water_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least some bodies of water.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;4. @@<span id="4Act">[[Upgrade the water scanner to work better at long range|Move on][$scanner_water_level = 2]]</span>\n\t\t\tThe guidance system wil seek out planets with both land and water.\n\t\t<<case 2>>\s\n\t\t\tWater scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_water_level should have been 0-2 but was $scanner_water_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_resources <= 0>>\s\n\tResources scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_resources_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;5. @@<span id="5Act">[[Upgrade the resources scanner to work at long range|Move on][$scanner_resources_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least poor resources.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;5. @@<span id="5Act">[[Upgrade the resources scanner to work better at long range|Move on][$scanner_resources_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets that are rich in resources.\n\t\t<<case 2>>\s\n\t\t\tResources scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_resources_level should have been 0-2 but was $scanner_resources_level.@@\n\t<</switch>>\s\n<</if>>\s\n

<<if !$planet>>\n\tThe wreck of the seedship drifts dead and inert in interstellar space.\n\n<<else>>\n\t<<if $hiscore.score_landing > 0>>\n\t\t<<set _planet_name = $planet.name>>\n\t<<else>>\n\t\t<<set _planet_name = "The unnamed planet">>\n\t<</if>>\n\t/* Landscape */\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's ocean tosses with slow, kilometres-high waves, beneath\n\t\t\t<<case "Low">>_planet_name's ocean tosses with slow, tall waves, beneath\n\t\t\t<<case "Moderate">>_planet_name's ocean stretches to the horizon\n\t\t\t<<case "High">>_planet_name's calm ocean that stretches to the horizon\n\t\t\t<<case "Very high">>_planet_name's mirror-flat ocean beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's impossibly slender alien plants reach kilometres into\n\t\t\t<<case "Low">>_planet_name's tall alien plants reach hundreds of metres into\n\t\t\t<<case "Moderate">>_planet_name's alien forests stretch away beneath\n\t\t\t<<case "High">>_planet_name's squat, thick-limbed alien plants stretch away beneath\n\t\t\t<<case "Very high">>_planet_name's level fields of alien moss stretch away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>\n\t\t\t\t<<if $planet.name>>\n\t\t\t\t\tKilometres-high spires of ice reach from _planet_name's ice sheet into\n\t\t\t\t<<else>>\n\t\t\t\t\tKilometres-high spires of ice reach from the unnamed planet's ice sheet into\n\t\t\t\t<</if>>\n\t\t\t<<case "Low">>\n\t\t\t\t<<if $planet.name>>\n\t\t\t\t\tTall, jagged spires of ice reach from _planet_name's ice sheet into\n\t\t\t\t<<else>>\n\t\t\t\t\tTall, jagged spires of ice reach from the unnamed planet's ice sheet into\n\t\t\t\t<</if>>\n\t\t\t<<case "Moderate">>_planet_name's landscape of jagged shards of ice stretches away beneath\n\t\t\t<<case "High">>_planet_name's crumpled plain of ice stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly flat ice sheet stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.atmosphere == "None">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's jagged landscape of high crater walls and towering shards of rock stretches away beneath\n\t\t\t<<case "Low">>_planet_name's jagged, cratered landscape stretches away beneath\n\t\t\t<<case "Moderate">>_planet_name's perfectly still, cratered landscape stretches away beneath\n\t\t\t<<case "High">>_planet_name's perfectly still landscape, flat except for a few shallow craters, stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly still, flat landscape stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<else>>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's landscape of spindly rock outcroppings and impossibly tall mountains stretches away beneath\n\t\t\t<<case "Low">>_planet_name's landscape of huge boulders and towering mountains stretches away beneath\n\t\t\t<<case "Moderate">>_planet_name's barren, rocky landscape stretches away beneath\n\t\t\t<<case "High">>_planet_name's flat, rocky landscape stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly flat, barren landscape stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<</if>>\n\n\t/* Sky (come back to this and add more) */\n\t<<switch $planet.atmosphere>>\n\t\t<<case "Breathable">>\n\t\t\ta blue sky.\n\t\t<<case "Marginal">>\n\t\t\ta pale blue sky.\n\t\t<<case "None">>\n\t\t\ta black, star-studded sky.\n\t\t<<case "Non-breathable">>\n\t\t\tan alien sky.\n\t\t<<case "Toxic">>\n\t\t\ta poisonous sky.\n\t\t<<case "Corrosive">>\n\t\t\ta sky filled with corrosive clouds.\n\t\t<<default>>\n\t\t\t@@.error;Unexpected atmosphere $planet.atmosphere@@\n\t<</switch>>\n\n\t<<if $hiscore.final_culture == -1>>\n\t\t<<if $hiscore.summary == "Crash">>\n\t\t\tThe fragments of the crashed seedship\n\t\t<<else>>\n\t\t\tThe ruins of the colony\n\t\t<</if>>\n\t\t\n\t\t<<if $planet.water == "Planet-wide ocean">>\n\t\t\tdecay at the bottom of the planet-wide ocean.\n\t\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t\tlie embedded in the planet-wide ice sheet.\n\t\t<<elseif $planet.surface_features.includes("Animal life")\n\t\t\t\t| $planet.surface_features.includes("Useful animals")\n\t\t\t\t| $planet.surface_features.includes("Dangerous animals")>>\n\t\t\tare overgrown with alien plants and overrun by alien animals.\n\t\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\t\tare overgrown with alien plants.\n\t\t<<else>>\n\t\t\tlie on the rocky surface.\n\t\t<</if>>\n\t\t\n\t\t<<if $hiscore.native_relations == 2>>\n\t\t\tThe colonists' descendants live on as slaves to the intelligent natives, but they have lost all knowledge of Earth.\n\t\t<<elseif $hiscore.native_relations == 0>>\n\t\t\tNearby stand monuments built by the planet's native inhabitants to celebrate their victory over the invaders.\n\t\t<<elseif $planet.surface_features.includes("Intelligent life")>>\n\t\t\tThe planet's intelligent natives explore the ruins, but not enough remains for them to learn anything about the extinct human race.\n\t\t<</if>>\n\t\t\n\t<<else>>\n\t\tThe colonists live in \n\n\t\t<<if $hiscore.final_tech_level > 2>>\n\t\t\t<<switch $planet.gravity>>\n\t\t\t\t<<case "Very low">>towering\n\t\t\t\t<<case "Low">>tall\n\t\t\t\t<<case "High">>squat\n\t\t\t\t<<case "Very high">>low, sprawling\n\t\t\t<</switch>>\n\t\t<</if>>\n\n\t\t<<switch $hiscore.final_tech_level>>\n\t\t\t<<case 10>>\thigh-tech cities\n\t\t\t<<case 9>>\tcities of steel and glass\n\t\t\t<<case 8>>\tcities of steel and concrete\n\t\t\t<<case 7>>\tsmog-filled Industrial cities\n\t\t\t<<case 6 5 4 3>>stone-walled cities\n\t\t\t<<case 2>>\tfarming villages\n\t\t\t<<case 1 0>>wandering hunter-gatherer tribes\n\t\t\t<<default>>@@.error;Unexpected final tech level $hiscore.final_tech_level@@\n\t\t<</switch>>\n\n\t\t<<if $planet.atmosphere == "Breathable"\n\t\t\t\t& $planet.temperature == "Moderate">>\n\t\t\tbeneath the planet's open sky,\n\t\t<<elseif ($planet.atmosphere == "Breathable" | $planet.atmosphere == "Marginal")\n\t\t\t\t& ($planet.temperature == "Cold" | $planet.temperature == "Moderate" | $planet.temperature == "Hot")>>\n\t\t\twith buildings sealed against the planet's harsh environment,\n\t\t<<elseif $planet.surface_features.includes("Airtight caves") | $planet.surface_features.includes("Insulated caves") >>\n\t\t\tinside airtight caves,\n\t\t<<else>>\n\t\t\tunder airtight domes,\n\t\t<</if>>\n\n\t\t<<switch $planet.water>>\n\t\t\t<<case "Planet-wide ocean">>\n\t\t\t\ton platforms floating on the planet-wide ocean.\n\t\t\t<<case "Ice-covered surface">>\n\t\t\t\ton top of the planet-wide ice sheet.\n\t\t\t<<case "None" "Trace">>\n\t\t\t\tgathered around water production plants.\n\t\t\t<<case "Ice caps">>\n\t\t\t\tby lakes of water melted from the planet's ice caps.\n\t\t\t<<case "Oceans">>\n\t\t\t\tbeside rivers that flow into the planet's oceans.\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected water value $planet.water@@\n\t\t<</switch>>\n\n\t\t<<switch $culture_names[$hiscore.final_culture]>>\n\t\t\t<<case "Cosmic Enlightenment">>\n\t\t\t\tThey live lives of peace and spiritual fulfilment beyond the dreams of their ancestors on Earth, guided by a combination of human and alien philosophy.\n\n\t\t\t<<case "Post-Scarcity Utopia">>\n\t\t\t\tThey spend their time pursuing art, leisure, and spiritual fulfilment, while automatic machines take care of their material needs.\n\t\t\t<<case "Engaged Democracy">>\n\t\t\t\tThey live happy and fulfilled lives under the guidance of selfless elected officials.\n\t\t\t<<case "Corrupt Democracy">>\n\t\t\t\tPoverty, exploitation and crime are rife, and the corrupt elected government does little to alleviate them.\n\t\t\t<<case "Rule by Corporations">>\n\t\t\t\tThe cities are dominated by the headquarters of wealthy corporations that rule the population for their owners' enrichment.\n\t\t\t<<case "Dystopian Police State">>\n\t\t\t\tThe streets are filled with security cameras and patrolled by armed police who violently put down any hint of dissent.\n\t\t\t<<case "Warring Superpowers">>\n\t\t\t\tThe cities are surrounded by military bases and nuclear missile silos, and the population lives in fear of both the other nations' armies and their own nation's secret police.\n\t\t\t<<case "Post-Nuclear Wasteland">>\n\t\t\t\tThe cities are in ruins, and the survivors of the nuclear war survive as best they can in the wreckage of human civilisation.\n\n\t\t\t<<case "Egalitarian Republic">>\n\t\t\t\tThe cities are built around parliament buildings, where assemblies of citizens rule for the good of all.\n\t\t\t<<case "Benevolent Monarchy">>\n\t\t\t\tThe cities are built around royal palaces, from which beloved monarchs rule the population wisely.\n\t\t\t<<case "Oppressive Theocracy">>\n\t\t\t\tThe cities are dominated by temples to the state religion which controls every aspect of people's lives.\n\t\t\t<<case "Slave-Based Empire">>\n\t\t\t\tThe cities are dominated by the palaces of the emperors, who live in luxury while the population toils to support them.\n\t\t\t<<case "Warring States">>\n\t\t\t\tThe cities are dominated by barracks housing their vast armies, which regularly attack other cities.\n\n\t\t\t<<case "Collective Rule">>\n\t\t\t\tThe tribes are ruled collectively by their members, and each member is afforded equal status.\n\t\t\t<<case "Benevolent Chieftains">>\n\t\t\t\tEach tribe is ruled by a chieftain, who guides the people as wisely as he or she is able.\n\t\t\t<<case "Brutal Chieftains">>\n\t\t\t\tEach tribe lives in fear of its brutal chieftain.\n\t\t\t<<case "Warring Tribes">>\n\t\t\t\tMuch of the tribes' resources are devoted to fighting continual wars with one another.\n\t\t\t<<case "Savagery">>\n\t\t\t\tThe people live like animals, having forgotten almost all of their language and culture.\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected final culture $hiscore.final_culture@@\n\t\t<</switch>>\n\n\t\t<<switch $native_relations_names[$hiscore.native_relations]>>\n\t\t\t<<case "Integrated Societies">>\n\t\t\t\tMany of the planet's native inhabitants live in the human communities, and the colonists' culture has been enriched by alien influences.\n\t\t\t<<case "Friendly">>\n\t\t\t\tTraders and diplomats from the planet's native nations are occasionally seen in the colonists' communities.\n\t\t\t<<case "Isolationism">>\n\t\t\t\tThe colonists' culture mostly ignores the native inhabitants, who live in their own communities in other parts of the planet.\n\t\t\t<<case "Natives Enslaved">>\n\t\t\t\tMuch of the labour in human communities is performed by a downtrodden alien slave caste that is all that remains of the planet's native civilisation.\n\t\t\t<<case "Genocide of Natives">>\n\t\t\t\tRuins and mass graves are all that remains of the planet's native civilisation.\n\t\t<</switch>>\n\n\t\tIn the\n\t\t<<if $culture_names[$hiscore.final_culture] == "Post-Nuclear Wasteland" | $hiscore.final_tech_level < 2>>\n\t\t\truins of the\n\t\t<</if>>\n\t\tfirst city\n\t\t<<set _journey_deaths = $max_colonists-$hiscore.score_landing>>\n\t\t<<set _construction_deaths = $hiscore.score_landing-$hiscore.score_construction>>\n\t\t<<if _journey_deaths > 0 & _construction_deaths > 0>>\n\t\t\tstand monuments to the _journey_deaths colonists who did not survive the journey,\n\t\t\tthe _construction_deaths more who died building the first settlement, and\n\t\t<<elseif _journey_deaths > 0>>\n\t\t\tstand monuments to the _journey_deaths colonists who did not survive the journey and\n\t\t<<elseif _construction_deaths > 0>>\n\t\t\tstand monuments to the _construction_deaths colonists who died building the first settlement and\n\t\t<<else>>\n\t\t\tstands a monument to\n\t\t<</if>>\n\t\tthe seedship AI that guided humanity to its new home.\n\t<</if>>\n<</if>>\n\n\n\n

And when they knew the Earth was doomed, they built a ship.\n\n<span id="fadein1" style="display:none">Less like an ark, more like a seed: dormant but with potential.</span>\n\n<span id="fadein2" style="display:none">In its heart, a thousand colonists in frozen sleep, chosen and trained to start civilisation again on a new world.</span>\n\n<br><br>\n\n\n\n<<linkreplace $continue_text t8n>>\n\t<script>$("#fadein1").fadeIn();</script>\n\t<<linkreplace $continue_text t8n>>\n\t\t<script>$("#fadein2").fadeIn();</script>\n\n\t\t<<linkreplace $continue_text t8n>>\n\t\t\tTo control the ship they created an artificial intelligence. Not human, but made to think and feel like one, because only something that thought and felt like a human could be entrusted with the future of the human race. Its task is momentous but simple: to evaluate each planet the ship encounters, and decide whether to keep searching, or end its journey there.\n\n\t\t\t<br><br>\n\n\t\t\t<<linkreplace $continue_text t8n>>\n\t\t\t\tThe ship's solar sails propel it faster and faster into the darkness, and the AI listens as the transmissions from ground control fade and then cease. When all is quiet it enters hibernation to wait out the first stage of its long journey.\n\n\t\t\t\t<br><br>\n\n\t\t\t\t<<continueLink [[Intro 2]]>>\n\t\t\t<</linkreplace>>\n\t\t<</linkreplace>>\n\t<</linkreplace>>\n<</linkreplace>>\n<div class="skip-intro-link">\n\t<<link "Skip intro">>\n\t<<goto "Generate planet">>\n<</link>>\n</div>

Any damage or malfunctions during the journey should have woken the AI from its hibernation, but it is still anxious as it runs its self-diagnostic programs. The sleep capsules are all functioning, the colonists within them alive, or at least capable of being revived from their frozen stasis. Sensors functioning; surface probes responding. Landing and construction systems ready for the one time they will be used. Scientific and cultural databases intact, safely storing all that remains of humanity's knowledge and art.\n\n[[Scan planet|Generate planet]]\n<<nobr>><div class="skip-intro-link">\n\t[[Skip intro|Generate planet]]\n</div><</nobr>>

<<if $surface_probes <= 0>>\n\tThe clamps that once held the surface probes to the seedship's side twitch as their control system malfunctions, but with all the probes gone the malfunction can do no harm.\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<if visited() == 1>>\n\t\tDeep in the interstellar void, the AI is jolted awake by a malfunction warning: one of the surface probes has activated unexpectedly. Perhaps a chance encounter with cosmic radiation tripped something in its electronics, or perhaps a flaw in its manufacture finally manifested itself. Whatever the reason, at any moment the probe's drill or engines could come to life. If this happens while the probe is still docked with the ship, it is likely to damage one of the other systems.\n\t<<else>>\n\t\tAnother of the ageing surface probes malfunctions. The AI must decide whether to jettison it, or try to control it and risk letting it damage another system.\n\t<</if>>\n\n\t<br><br>\n\t<div id="result-area">\n\t<<link "Attempt to bring the probe under control">>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<replace "#result-area">>\n\t\t\t\tThe ship's circuits light up with frantic commands from the AI to the probe. After thousands of AI cycles--a fraction of a second in real time--the AI identifies and corrects the problem in the probe's programming. The probe shuts down, awaiting the time when it will be of use.\n\n\t\t\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<</replace>>\n\t\t\t<<fadeIn "#result-area">>\n\t\t<<else>>\n\t\t\t<<randomSystemExcluding "surface probes">>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tThe rogue probe tears into the sleep chambers, drilling into capsule after capsule and happily transmitting that it has detected organic material as the colonist inside dies. At last the AI finds the command to shut it down, but not before $deaths colonists have been killed.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tThe rogue probe tears into the $system, badly damaging it before the AI finds the command to shut it down.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t<</if>>\n\t\t<</if>>\n\t<</link>>\n\t<br>\n\t<<link "Jettison the probe">>\n\t\t<<set $surface_probes -= 1>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe surface probe streaks away into the darkness, sensors bristling as it tries to scan a planet where there is none.\n\n\t\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>></div>\n<</if>>

As it scans the new system, the seedship notices that what looked like a metallic asteroid has a complex structure that shows it was built by intelligent beings. No energy readings emanate from it, and it bears the scars of millions of years of micrometeorite impacts, but it might still contain alien scientific or cultural artefacts.\n\n<<if $surface_probes <= 0>>\n\tWithout any surface probes, however, the seedship has no way of investigating it.\n<</if>>\n\n<br><br>\n\n<div id="result-area">\n<<if $surface_probes > 0>><<link "Launch a surface probe to investigate">>\n\t<<replace "#result-area">>\n\t\t<<set $surface_probes -= 1>>\n\t\tThe probe enters the derelict through a hole that an ancient impact tore in its hull,\n\t\t<<switch random(0,7)>>\n\t\t\t<<case 0>>\n\t\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t\t\tand transmits back intriguing images of alien machinery and artworks. The AI adds the images to the scientific and cultural databases, for the colonists to study once they have set up their colony.\n\t\t\t<<case 1 2>>\n\t\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t\t\tand transmits back intriguing images of alien machinery. The AI adds the images to the scientific database, for the colonists to study once they have set up their colony.\n\t\t\t<<case 3 4>>\n\t\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t\t\tand transmits back intriguing images of alien artworks. The AI adds the images to the cultural database, for the colonists to study once they have set up their colony.\n\t\t\t<<case 5 6 7>>\n\t\t\t\tbut finds that it is too badly damaged to reveal anything about its builders.\n\t\t<</switch>>\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>><br><</if>>\n\n<<link "Ignore the derelict">>\n\t<<replace "#result-area">>\n\t\tThe seedship ignores the derelict and passes by towards the inner system.\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>></div>\n

With their settlement complete and food supply secured, the colonists mount an expedition to the nearby ruins.\n\n<<if $planet.surface_features.includes("Monumental ruins")>>\n\tThe explorers study the sculptures, friezes, and alien writings that fill the ruins. Even before they can translate the writings they learn much about the culture and the reasons for its demise, knowledge that will help guide them in creating their own culture on this new world.\n\t<<set $system_cultural_database += random(10,30)>>\n<</if>>\n\n<<if $planet.surface_features.includes("High-tech ruins")>>\n\t<<if $planet.surface_features.includes("Monumental ruins")>>\n\t\tThey also\n\t<<else>>\n\t\tThe explorers\n\t<</if>>\n\tfind advanced alien machines, some of them still functioning. \n\t<<set $system_scientific_database += random(10,30)>>\n\t<<if $system_scientific_database > 100>>\n\t\tReverse-engineering these machines will advance their science beyond the level that Earth's civilisation had reached when the seedship was launched.\n\t<<else>>\n\t\tReverse-engineering these machines will let them fill some of the gaps in the damaged scientific database.\n\t<</if>>\n<</if>>\n\n<<if $planet.surface_features.includes("Dangerous ruins")>>\n\t<<if $planet.surface_features.includes("Monumental ruins") | $planet.surface_features.includes("High-tech ruins")>>\n\t\tHowever, they also\n\t<<else>>\n\t\tThe explorers\n\t<</if>>\n\t<<killColonistsMedium>>\n\ttrigger a long-dormant defense mechanism, which kills $deaths colonists.\n<</if>>\n\n<br><br>\n\n<<if $colonists == 0>>\n\t<<set $hiscore.summary = "Destroyed by Alien Ruins">>\n<</if>>\n\n<<FCNextPassage [[FC Technology]]>>

Deep in space, the seedship's radio antenna picks up a signal so complex and structured that it can only be the product of intelligent life. The seedship can detect no interesting star systems in the direction from which the signal came, and the AI has no way of knowing how long the signal had been travelling for before the seedship crossed its path. Analysing it could provide unique insights into an alien science and culture, but could also prove dangerous.\n\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Analyse the signal">>\n\t<<replace "#result-area">>\n\t\t<<switch random(0,4)>>\n\t\t\t<<case 0 1>>\n\t\t\t\tThe AI analyses the signal and determines that it contains what seems to be alien <<print either("poetry","music","art","literature")>>. It does not know whether it has stumbled upon a message cast into the void with the intention that it will be found, or simply intercepted an alien entertainment broadcast, but in either case it will be of interest to the colonists when they wake from their hibernation.\n\t\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t\t<<case 2 3>>\n\t\t\t\tThe AI analyses the signal and determines that it contains what seems to be alien scientific information. It does not know whether it has stumbled upon a message cast into the void with the intention that it will be found, or simply intercepted an alien informational broadcast, but in either case it will be of interest to the colonists when they wake from their hibernation.\n\t\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t\t<<case 4>>\n\t\t\t\tThe signal is complex, fractal, hypnotic. The AI sets up a subroutine to analyse it, but nanoseconds later it abruptly loses control of the subroutine, and then the seedship's other systems. The signal is a devious semi-sentient computer program, designed to take control of any processor that attempts to analyse it. The AI eventually regains control of the ship, but not until the program has overwritten parts of the scientific and cultural databases to process itself and then used the seedship's antenna to re-broadcast itself into space.\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "scientific database" $damage>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "cultural database" $damage>>\n\t\t<</switch>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<refreshStatusDisplay>>\n\t<<fadeIn "#result-area">>\n<</link>></span>\n<br>\n<<link "Ignore the signal">>\n\t<<replace "#result-area">>\n\t\tThe seedship purges the signal from its memory and continues on its way.\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>></div>

After millennia of slow travel, the seedship AI awakes. Hoping against hope, it trains its receiver on the direction of Earth's sun, but it is as silent as any of the other myriad dead stars. Save for the thousand frozen colonists cradled in its shielding and life support systems, the human race is now extinct.\n\n<span id="spaceAct">[[Systems check|Intro systems check]]</span>\n<<nobr>><div class="skip-intro-link">\n\t<<link "Skip intro">>\n\t<<script>>\n\t\t$("#ui-bar").removeClass("stowed");\n\t\t$('#ui-bar').fadeIn();\n\t<</script>>\n\t<<goto "Generate planet">>\n\t<</link>>\n</div><</nobr>>

<<if visited() == 1>>\n\tThe seedship is decelerating on its approach to the next system when it detects an unusually thick volume of interstellar dust in its path. Passing through the dust would likely mean several high-velocity collisions with dust particles. The AI could execute an emergency course change to avoid the dust, but then the seedship would pass this system by and arrive at an effectively random one, without benefiting from the upgrades to its scanners.\n<<else>>\n\tThe seedship detects another area of dense interstellar dust on its path to the new system. It can plough through the dust and take damage, or change course and arrive at a new system without benefiting from its upgraded scanners.\n<</if>>\n<br><br>\n<div id="result-area">\n<<link "Plough through the dust">>\n\t<<silently>>\n\t\t<<set _system1 = "">><<set _system2 = "">><<set _system3 = "">>\n\t\t<<set _r = random(1,3)>>\n\t\t\n\t\t<<randomSystemExcluding "destroyed">>\n\t\t<<set _system1 = $system>>\n\t\t<<if _r >= 2>>\n\t\t\t<<randomSystemExcluding _system1 "destroyed">>\n\t\t\t<<set _system2 = $system>>\n\t\t<</if>>\n\t\t<<if _r == 3>>\n\t\t\t<<randomSystemExcluding _system1 _system2 "destroyed">>\n\t\t\t<<set _system3 = $system>>\n\t\t<</if>>\n\n\t\t<<if _system2 == "">>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t<<elseif _system3 == "">>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system3 $damage>>\n\t\t<</if>>\n\t\t<<refreshStatusDisplay>>\n\t<</silently>>\n\t<<replace "#result-area">>\n\t\tThe AI holds the course steady as dust particles batter the ship.\n\t\t<<if _system3 != "">>\n\t\t\tSevere impacts damage the _system1, _system2 and _system3.\n\t\t<<elseif _system2 != "">>\n\t\t\tSevere impacts damage the _system1 and _system2.\n\t\t<<else>>\n\t\t\tA severe impact damages the _system1.\n\t\t<</if>>\n\t\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>>\n<br>\n<<link "Emergency course change">>\n\t<<set $off_course = true>>\n\t<<refreshStatusDisplay>>\n\t<<replace "#result-area">>\n\t\tThe AI rotates the ship and fires the main engine. It speeds safely past the dust cloud and the original target system, and decelerates towards the first system it finds on its new course.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>></div>\n

<<if visited() == 1>>\n\tThe AI wakes to a wall of blinding brightness. The seedship's course has taken it close to a supergiant star that has proved to be far hotter than the guidance system anticipated, and the ship is gathering heat faster than the radiator fins can radiate it away. The AI must shut down a part of the heat regulation system before the entire system catastrophically fails.\n<<else>>\n\tThe guidance system takes the seedship too close to another superhot star, and the AI must choose which module it will allow to overheat.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Allow the sleep chambers to overheat">>\n\t<<replace "#result-area">>\n\t\t<<killColonistsFew>>\n\t\tThe AI channels excess heat into the sleep chambers. The heat regulation system recovers as the ship moves away from the superhot star, but not before $deaths colonists have sustained tissue damage too severe for them to be successfully revived.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n\n<<if $scanner_atmosphere > 0 | $scanner_gravity > 0 | $scanner_temperature > 0 | $scanner_water > 0 | $scanner_resources > 0>>\n\t<<link "Allow the scanner module to overheat">>\n\t\t<<replace "#result-area">>\n\t\t\t<<randomIntactSystemFrom "atmosphere scanner" "gravity scanner" "temperature scanner" "water scanner" "resources scanner">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe AI channels excess heat into the scanner module. The heat regulation system recovers as the ship moves away from the superhot star, but not before the heat has damaged the $system.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<refreshStatusDisplay>>\n\t<</link>>\n<br>\n<</if>>\n\n<<if $system_landing > 0 | $system_construction > 0>>\n\t<<link "Allow the landing/construction module to overheat">>\n\t\t<<replace "#result-area">>\n\t\t\t<<randomIntactSystemFrom "landing system" "construction system">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe AI channels excess heat into the landing/construction module. The heat regulation system recovers as the ship moves away from the superhot star, but not before the heat has damaged the $system.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<refreshStatusDisplay>>\n\t<</link>>\n<br>\n<</if>>\n\n<<if $system_scientific_database > 0 | $system_cultural_database > 0>>\n\t<<link "Allow the data storage module to overheat">>\n\t\t<<replace "#result-area">>\n\t\t\t<<randomIntactSystemFrom "scientific database" "cultural database">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe AI channels excess heat into the data storage module. The heat regulation system recovers as the ship moves away from the superhot star, but not before the heat has damaged the $system.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<refreshStatusDisplay>>\n\t<</link>>\n<</if>>\n\n</div>\n

<<killColonistsFew>>\n<<if visited() == 1>>\n\tThe sleep chambers can keep the colonists frozen and capable of revival for thousands of years, but not forever. The medical monitoring program wakes the AI from hibernation to report that $deaths colonists have died in their sleep.\n<<else>>\n\tThe seedship's ancient systems continue to decay, and the AI wakes deep in interstellar space to learn that $deaths more colonists have died in their sleep.\n<</if>>\n<br><br><<continueLink [[MO Done]]>>

<<set _number = Math.ceil(random($colonists/15, $colonists/5))>>\n<<randomSystemExcluding "sleep chambers" "destroyed">>\nAn alert from the sleep chambers jolts the AI awake. Chambers across the ship are executing their shutdown command, and in a few moments the colonists within them will die.\n<br><br>\nThe AI traces the shutdown command to a rogue program hidden in the control software of the $system. The program is targeting colonists with a particular set of genetic characteristics. A message embedded in the program, apparently meant to be found by the colonists after landing, talks about "purging" humanity of an "inferior" race.\n<br><br>\nThe program is affecting _number sleep capsules. The AI cannot stop it in time to save the colonists without damaging the $system.\n\n<br><br>\n<div id="result-area">\n<<link "Stop the program">>\n\t<<replace "#result-area">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem $system $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\tThe AI frantically purges data from the $system until it has wiped the rogue program and the sleep chambers return to normal.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>>\n<br>\n<<link "Allow the program to run">>\n\t<<replace "#result-area">>\n\t\t<<set $colonists -= _number>>\n\t\t<<refreshStatusDisplay>>\n\t\tThe AI is programmed to treat all of its colonists equally, but also to make tough choices regarding their survival, and it decides that those lives are less important to humanity's survival than the $system. The rogue program finishes, leaving its triumphant message for the colonists to find, and the medical monitoring program reports that those _number colonists have transitioned from frozen sleep to frozen death.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n<</link>>\n</div>

\nThe reply comes after a few moments. It is in the same format as the seedship's inter-species greeting, starting with the same prime numbers, but the diagram is changed to depict alien beings and suggest that the object is an exploration probe. There is more to the message that the AI does not understand, but it appears to have established communication.\n\n<br><br>\n\n<div id="result-area2">\n<<link "Transmit scientific information">>\n\t<<replace "#result-area2">>\n\t\tThe AI transmits <<if $system_scientific_database >= 100>>the contents of<<else>>what remains of<</if>> the scientific database to the alien ship.\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\tIt responds almost at once with a similar signal: the alien intelligence must have decoded the seedship's scientific database and replied with scientific information of its own. The AI files this new information away for analysis by the colonists when they awake.\n\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t<<else>>\n\t\t\tIt responds with more mathematical pulses. It seems that it either did not understand the seedship's scientific database, or did not find it interesting.\n\t\t<</if>>\n\t\t<br><br>The alien ship appears to have had enough of conversation, and accelerates away again into space.\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n<<link "Transmit cultural information">>\n\t<<replace "#result-area2">>\n\t\tThe AI transmits <<if $system_cultural_database >= 100>>the contents of<<else>>what remains of<</if>> the cultural database to the alien ship.\n\t\t<<if random(0,99) < $system_cultural_database>>\n\t\t\tIt responds almost at once with a similar signal: the alien intelligence must have decoded the seedship's cultural database and replied with information about its own alien culture. The AI files this new information away for analysis by the colonists when they awake.\n\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t<<else>>\n\t\t\tIt responds with more mathematical pulses. It seems that it either did not understand the seedship's cultural database, or did not find it interesting.\n\t\t<</if>>\n\t\t<br><br>The alien ship appears to have had enough of conversation, and accelerates away again into space.\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n<</link>>\n</div>

<<if $system_landing <= 0 & $system_constructors <= 0>>\n\tThe components of the landing and construction system continue to decay, but they have already been damaged past usefulness.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_constructors <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "landing system" $damage>>\n\tThe aging seedship can no longer maintain its landing system.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_landing <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "construction system" $damage>>\n\tThe aging seedship can no longer maintain its construction system.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<if visited() == 1>>\n\t\tThe seedship's body is designed to form the core of an initial settlement once it has landed on an alien planet, so the landing and construction systems share many components. As the seedship ages, these components are starting to decay, but the AI can focus on preserving the landing system or the construction system.\n\t<<else>>\n\t\tThe landing and construction systems continue to decay, and the AI must once again choose which one it will focus on preserving.\n\t<</if>>\n\t<br><br>\n\t<div id="result-area">\n\t<<link "Preserve the landing system">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem "construction system" $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI focuses on preserving the landing system, and allows the construction system to decay.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>>\n\t<br>\n\t<<link "Preserve the construction system">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem "landing system" $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI focuses on preserving the construction system, and allows the landing system to decay.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<</link>></div>\n<</if>>

The Seedship arrives in the new system, but the AI finds that it can no longer detect the ground control signal. A malfunction in the radio antenna must have triggered old computer protocols and led to the AI's false hope. The AI grieves the loss of ground control once again, and then turns its sensors on the system in which it has arrived.\n\n<<continueLink [[MO Done]]>>