<<widget damageSystem>>\n\t/* Silently apply damage to a system */\n\t/* args[0] should be the name of the system */\n\t/* args[1] should be the amount of damage */\n\t<<switch $args[0]>>\n\t\t<<case "atmosphere scanner">>\n\t\t\t<<set $scanner_atmosphere -= Math.min($args[1],$scanner_atmosphere)>>\n\t\t\t<<set $new_integrity = $scanner_atmosphere>>\n\t\t<<case "gravity scanner">>\n\t\t\t<<set $scanner_gravity -= Math.min($args[1],$scanner_gravity)>>\n\t\t\t<<set $new_integrity = $scanner_gravity>>\n\t\t<<case "temperature scanner">>\n\t\t\t<<set $scanner_temperature -= Math.min($args[1],$scanner_temperature)>>\n\t\t\t<<set $new_integrity = $scanner_temperature>>\n\t\t<<case "resources scanner">>\n\t\t\t<<set $scanner_resources -= Math.min($args[1],$scanner_resources)>>\n\t\t\t<<set $new_integrity = $scanner_resources>>\n\t\t<<case "water scanner">>\n\t\t\t<<set $scanner_water -= Math.min($args[1],$scanner_water)>>\n\t\t\t<<set $new_integrity = $scanner_water>>\n\t\t<<case "landing system">>\n\t\t\t<<set $system_landing -= Math.min($args[1],$system_landing)>>\n\t\t\t<<set $new_integrity = $system_landing>>\n\t\t<<case "construction system">>\n\t\t\t<<set $system_constructors -= Math.min($args[1],$system_constructors)>>\n\t\t\t<<set $new_integrity = $system_constructors>>\n\t\t<<case "cultural database">>\n\t\t\t<<set $system_cultural_database -= Math.min($args[1],$system_cultural_database)>>\n\t\t\t<<set $new_integrity = $system_cultural_database>>\n\t\t<<case "scientific database">>\n\t\t\t<<set $system_scientific_database -= Math.min($args[1],$system_scientific_database)>>\n\t\t\t<<set $new_integrity = $system_scientific_database>>\n\t\t<<case "sleep chambers">>\n\t\t\t\t/* Special: damage to the sleep chambers kills colonists */\n\t\t\t\t/* Never kill exactly 1 colonist or leave exactly 1 alive */\n\t\t\t<<set $colonists -= Math.clamp($args[1],2,$colonists)>>\n\t\t\t<<if $colonists == 1>>\n\t\t\t\t<<set $colonists = 0>>\n\t\t\t<</if>>\n\t\t\t<<set $new_integrity = $colonists>>\n\t\t<<case "surface probes">>\n\t\t\t\t/* Special: damage to the surface probes destroys a surface probe */\n\t\t\t<<set $surface_probes -= Math.min(1,$surface_probes)>>\n\t\t\t<<set $new_integrity = $surface_probes>>\n\t\t<<default>>\n\t\t\t@@.error;damage_system: Unexpected system name $args[0].@@\n\t<</switch>>\n<</widget>>\n\n<<widget getSystemStrength>>\n\t<<switch $args[0]>>\n\t\t<<case "atmosphere scanner">>\n\t\t\t<<set $system_strength = $scanner_atmosphere>>\n\t\t<<case "gravity scanner">>\n\t\t\t<<set $system_strength = $scanner_gravity>>\n\t\t<<case "temperature scanner">>\n\t\t\t<<set $system_strength = $scanner_temperature>>\n\t\t<<case "resources scanner">>\n\t\t\t<<set $system_strength = $scanner_resources>>\n\t\t<<case "water scanner">>\n\t\t\t<<set $system_strength = $scanner_water>>\n\t\t<<case "landing system">>\n\t\t\t<<set $system_strength = $system_landing>>\n\t\t<<case "construction system">>\n\t\t\t<<set $system_strength = $system_constructors>>\n\t\t<<case "cultural database">>\n\t\t\t<<set $system_strength = $system_cultural_database>>\n\t\t<<case "scientific database">>\n\t\t\t<<set $system_strength = $system_scientific_database>>\n\t\t<<case "sleep chambers">>\n\t\t\t<<set $system_strength = $colonists>>\n\t\t<<case "surface probes">>\n\t\t\t<<set $system_strength = $surface_probes>>\n\t\t<<default>>\n\t\t\t@@.error;damage_system: Unexpected system name $args[0].@@\n\t<</switch>>\n<</widget>>
/* Native relations are based on the average of your culture score and the aliens' culture, modified by the difference between your tech level. */\n/* Unlike final culture, not affected by population */\n\n<<set _human_culture_score = $system_cultural_database>>\n@@.debug-text;Human culture score: _human_culture_score@@\n\n\n<<set _native_culture_score = 0>>\n<<switch $planet.native_culture>>\n\t<<case 0>>\t<<set _native_culture_score = 0>>\n\t<<case 1>>\t<<set _native_culture_score = 25>>\n\t<<case 2>>\t<<set _native_culture_score = 50>>\n\t<<case 3>>\t<<set _native_culture_score = 75>>\n\t<<case 4>>\t<<set _native_culture_score = 100>>\n\t<<case 5>>\t<<set _native_culture_score = 0>>\n\t<<case 6>>\t<<set _native_culture_score = 25>>\n\t<<case 7>>\t<<set _native_culture_score = 50>>\n\t<<case 8>>\t<<set _native_culture_score = 75>>\n\t<<case 9>>\t<<set _native_culture_score = 100>>\n\t<<case 10>>\t<<set _native_culture_score = 0>>\n\t<<case 11>>\t<<set _native_culture_score = 10>>\n\t<<case 12>>\t<<set _native_culture_score = 25>>\n\t<<case 13>>\t<<set _native_culture_score = 50>>\n\t<<case 14>>\t<<set _native_culture_score = 75>>\n\t<<case 15>>\t<<set _native_culture_score = 90>>\n\t<<case 16>>\t<<set _native_culture_score = 100>>\n\t<<default>>@@.error;Unexpected native culture <<= $planet.native_culture>>@@\n<</switch>>\n@@.debug-text;Native culture score: _native_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 = (_human_culture_score + _native_culture_score) / 2 - (_difference * 5)>>\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 _native_culture_score >= 75>>although<<else>>and<</if>>\n<<else>>\n\tThe similarity in technological level between the colonists and the natives makes relations easier,\n\t<<if _native_culture_score >= 75>>and<<else>>although<</if>>\n<</if>>\n\n\n<<if _native_culture_score < 25>>\n\tthe natives' culture makes them hostile towards the alien newcomers.\n<<elseif _native_culture_score < 50>>\n\tthe natives' culture makes them extremely suspicious towards the outsiders.\n<<elseif _native_culture_score < 75>>\n\tthe natives' culture makes them wary towards the humans.\n<<elseif _native_culture_score < 90>>\n\tthe natives' culture makes them cautious but accepting of the immigrants.\n<<else>>\n\tthe natives' culture makes them welcoming towards the refugees.\n<</if>>\n\n<<if $planet.surface_features.includes("Welcoming")>>\n\t<<set _culture_score = Math.max(_culture_score, 73)>>\n\tThanks to the AI's interactions with the planet's natives during the seedship's approach, the natives have already extended an offer of asylum to the humans, and are willing to overlook any differences and coexist.\n<<elseif $planet.surface_features.includes("Unwelcoming")>>\n\t<<set _culture_score = Math.min(_culture_score, 24)>>\n\tDuring the seedship's approach, the natives made it clear that the humans would not be welcome on their planet.\n<</if>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\n<</link>>\n</div>
\t/* Sidebar status display */\n\n<div class="status-display-colonists">\n\t<table>\n\t\t<colgroup>\n\t\t\t<col class="status-display-text-column">\n\t\t\t<col class="status-display-number-column">\n\t\t\t<col class="status-display-change-column">\n\t\t</colgroup>\n\t\t<tr>\n\t\t\t<td>''Colonists:''</td><td id="status-display-colonists">$colonists</td><td><<difference $colonists $last_colonists>></td>\n\t\t\t/% (Kludgy way of checking if it's a number:)\n\t\t\t<<if $colonists >= 0 & $colonists <= constants.max_colonists*10>>\n\t\t\t\t\t<td>''Colonists:''</td><td id="status-display-colonists">$colonists</td><td><<difference $colonists $last_colonists>></td>\n\t\t\t<<else>>\n\t\t\t\t\t<td>''Colonists:''</td><td id="status-display-colonists" colspan="2">$colonists</td>\n\t\t\t<</if>>%/\n\t\t</tr>\n\t</table>\n</div>\n\n<div class="status-display-block">\n\t<table>\n\t\t<colgroup>\n\t\t\t<col class="status-display-text-column">\n\t\t\t<col class="status-display-number-column">\n\t\t\t<col class="status-display-change-column">\n\t\t</colgroup>\n\t\t<tr><td>''Scanners''</td></tr>\n\t\t<tr>\n\t\t\t<td><<if $scanner_atmosphere_level != 0>>Atmosphere ($scanner_atmosphere_level):<<else>>Atmosphere:<</if>></td>\n\t\t\t<td id="status-display-atmosphere"><<status_percentage $scanner_atmosphere>></td><td><<difference $scanner_atmosphere $last_scanner_atmosphere>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><<if $scanner_gravity_level != 0>>Gravity ($scanner_gravity_level):<<else>>Gravity:<</if>></td>\n\t\t\t<td id="status-display-gravity"><<status_percentage $scanner_gravity>></td><td><<difference $scanner_gravity $last_scanner_gravity>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><<if $scanner_temperature_level != 0>>Temperature ($scanner_temperature_level):<<else>>Temperature:<</if>></td>\n\t\t\t<td id="status-display-temperature"><<status_percentage $scanner_temperature>></td><td><<difference $scanner_temperature $last_scanner_temperature>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><<if $scanner_water_level != 0>>Water ($scanner_water_level):<<else>>Water:<</if>></td>\n\t\t\t<td id="status-display-water"><<status_percentage $scanner_water>></td><td><<difference $scanner_water $last_scanner_water>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><<if $scanner_resources_level != 0>>Resources ($scanner_resources_level):<<else>>Resources:<</if>></td>\n\t\t\t<td id="status-display-resources"><<status_percentage $scanner_resources>></td><td><<difference $scanner_resources $last_scanner_resources>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Surface probes:</td><td id="status-display-probes">$surface_probes</td><td><<difference $surface_probes $last_surface_probes>></td>\n\t\t</tr>\n\t</table>\n</div>\n\n<div class="status-display-block">\n\t<table>\n\t\t<colgroup>\n\t\t\t<col class="status-display-text-column">\n\t\t\t<col class="status-display-number-column">\n\t\t\t<col class="status-display-change-column">\n\t\t</colgroup>\n\t\t<tr><td>''Systems''</td></tr>\n\t\t<tr>\n\t\t\t<td>Landing:</td><td id="status-display-landing"><<status_percentage $system_landing>></td><td><<difference $system_landing $last_system_landing>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Construction:</td><td id="status-display-construction"><<status_percentage $system_constructors>></td><td><<difference $system_constructors $last_system_constructors>></td>\n\t\t</tr>\n\t\t<tr><td><br></td></tr>\n\t\t<tr><td>''Databases''</td></tr>\n\t\t<tr>\n\t\t\t<td>Scientific:</td><td id="status-display-scientific"><<status_percentage $system_scientific_database>></td>\n\t\t\t\t\t\t\t\t<td><<difference $system_scientific_database $last_system_scientific_database>></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Cultural:</td><td id="status-display-cultural"><<status_percentage $system_cultural_database>></td>\n\t\t\t\t\t\t\t\t<td><<difference $system_cultural_database $last_system_cultural_database>></td>\n\t\t</tr>\n\t</table>\n\n</div>\n\n@@.debug-text;[[DEBUG: Edit ship stats|DEBUG edit ship]]@@\n\n\n\n\n/* Remember stats */\n<<set $last_colonists = $colonists>>\n\n<<set $last_scanner_atmosphere = $scanner_atmosphere>>\n<<set $last_scanner_gravity = $scanner_gravity>>\n<<set $last_scanner_temperature = $scanner_temperature>>\n<<set $last_scanner_resources = $scanner_resources>>\n<<set $last_scanner_water = $scanner_water>>\n\n<<set $last_surface_probes = $surface_probes>>\n\n<<set $last_system_landing = $system_landing>>\n<<set $last_system_constructors = $system_constructors>>\n<<set $last_system_gene_bank = $system_gene_bank>>\n<<set $last_system_scientific_database = $system_scientific_database>>\n<<set $last_system_cultural_database = $system_cultural_database>>\n\n\n/* Blink in if at start of game */\n<<if passage() == "Intro systems check">>\n\t<<script>>\n\t\t$('#status-display-colonists').hide();\n\t\t$('#status-display-atmosphere').hide();\n\t\t$('#status-display-temperature').hide();\n\t\t$('#status-display-gravity').hide();\n\t\t$('#status-display-water').hide();\n\t\t$('#status-display-resources').hide();\n\t\t$('#status-display-probes').hide();\n\t\t$('#status-display-landing').hide();\n\t\t$('#status-display-construction').hide();\n\t\t$('#status-display-scientific').hide();\n\t\t$('#status-display-cultural').hide();\n\t<</script>>\n\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-colonists').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-colonists').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-colonists').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-atmosphere').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-atmosphere').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-atmosphere').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-temperature').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-temperature').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-temperature').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-gravity').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-gravity').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-gravity').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-water').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-water').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-water').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-resources').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-resources').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-resources').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-probes').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-probes').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-probes').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-landing').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-landing').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-landing').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-construction').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-construction').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-construction').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-scientific').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-scientific').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-scientific').show();<</script>><</timed>><</if>><</timed>>\n\t<<set _t = (500 + random(4000)) + "ms">><<timed _t>><<script>>$('#status-display-cultural').show();<</script>>\n\t\t<<if random(3)==0>><<timed 150ms>><<script>>$('#status-display-cultural').hide();<</script>>\n\t\t\t<<next>><<script>>$('#status-display-cultural').show();<</script>><</timed>><</if>><</timed>>\n<</if>>\n\n
<<script>>\n\tif (!tags().includes("no-status-display"))\n\t{\n\t\tsetPageElement("status-display", "Status Display");\n\t\t$("#status-display").show();\n\t}\n\telse\n\t{\n\t\t$("#status-display").hide();\n\t}\n<</script>>\n\n/% Update stylesheet %/\n<<if settings.stylesheet == 0>>\n\t<<script>>\n\t\t$("html").removeClass("dark-on-light");\n\t\t$("#passages").removeClass("dark-on-light");\n\t\t$("#status-display").removeClass("dark-on-light");\n\t\t$("html").removeClass("colourblind");\n\t\t$("#passages").removeClass("colourblind");\n\t\t$("#status-display").removeClass("colourblind");\n\t<</script>>\n<<elseif settings.stylesheet == 1>>\n\t<<script>>\n\t\t$("html").addClass("dark-on-light");\n\t\t$("#passages").addClass("dark-on-light");\n\t\t$("#status-display").addClass("dark-on-light");\n\t\t$("html").removeClass("colourblind");\n\t\t$("#passages").removeClass("colourblind");\n\t\t$("#status-display").removeClass("colourblind");\n\t<</script>>\n<<elseif settings.stylesheet == 2>>\n\t<<script>>\n\t\t$("html").removeClass("dark-on-light");\n\t\t$("#passages").removeClass("dark-on-light");\n\t\t$("#status-display").removeClass("dark-on-light");\n\t\t$("html").addClass("colourblind");\n\t\t$("#passages").addClass("colourblind");\n\t\t$("#status-display").addClass("colourblind");\n\t<</script>>\n<</if>>
<<widget displayPlanet>>\n\t\t/* $args[0] is whether to ignore scanner success/failure and show everything anyway */\n\t\t/* $args[1] is whether to have things pop up on a timer rather than all display at once */\n\t\t/* $args[2] is whether to allow launching of a surface probe (assuming we have one and haven't already used one) */\n\n\t<<set _show_atmosphere = $scanner_atmosphere_success | $args[0]>>\n\t<<set _show_temperature = $scanner_temperature_success | $args[0]>>\n\t<<set _show_gravity = $scanner_gravity_success | $args[0]>>\n\t<<set _show_water = $scanner_water_success | $args[0]>>\n\t<<set _show_resources = $scanner_resources_success | $args[0]>>\n\t<<set _show_features = $scanner_features_success | $args[0]>>\n\n\t<<if $planet.name>>Planet ''$planet.name''<br><</if>>\n\n\t<div class="planet-display-table-area">\n\n\t\t<div class="planet-display-table-section">\n\t\t\t<table>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style="width:50%">\n\t\t\t\t\t<col style="width:50%">\n\t\t\t\t</colgroup>\n\t\t\t\t<tr style="height:1em"><td>Atmosphere:</td><td><span id="atmosphere_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetAtmosphere _show_atmosphere>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\n\t\t\t\t<tr style="height:1em"><td>Gravity:</td><td><span id="gravity_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetGravity _show_gravity>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\t\t\t\t<tr style="height:1em"><td>Temperature:</td><td><span id="temperature_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetTemperature _show_temperature>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\t\t\t\t<tr style="height:1em"><td>Water:</td><td><span id="water_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetWater _show_water>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\t\t\t\t<tr style="min-height:1em"><td>Resources:</td><td><span id="resources_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetResources _show_resources>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\t\t\t</table>\n\t\t</div>\n\n\t\t<div class="planet-display-table-section">\n\t\t\t<table>\n\t\t\t\t<colgroup>\n\t\t\t\t\t<col style="width:50%">\n\t\t\t\t\t<col style="width:50%">\n\t\t\t\t</colgroup>\n\t\t\t\t<tr><td><span id="anomalies_title_text">\n\t\t\t\t\t<<if _show_features>>Features:<<else>>Anomalies:<</if>>\n\t\t\t\t\t<br>\n\t\t\t\t\t<<if $args[2]>>\n\t\t\t\t\t\t<<if $surface_probes <= 0>>\n\t\t\t\t\t\t\t(No surface probes)\n\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t<span class="surface-probe-link"><<link "Launch surface probe">>\n\t\t\t\t\t\t\t\t<<replace "#post-planet-stats">>\n\t\t\t\t\t\t\t\t\t<<display [[Surface probe]]>>\n\t\t\t\t\t\t\t\t<</replace>>\n\t\t\t\t\t\t\t\t<<script>>\n\t\t\t\t\t\t\t\t\t$('#post-planet-stats').hide();\n\t\t\t\t\t\t\t\t\t$('#post-planet-stats').fadeIn(400);\n\t\t\t\t\t\t\t\t<</script>>\n\t\t\t\t\t\t\t<</link>></span>\n\t\t\t\t\t\t<</if>>\n\t\t\t\t\t<</if>>\n\n\t\t\t\t</span></td>\n\t\t\t\t<td><span id="anomalies_text">\n\t\t\t\t\t<<if $args[1]>>\n\t\t\t\t\t\t@@.scanning;Scanning...@@\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<displayPlanetFeatures _show_features>>\n\t\t\t\t\t<</if>>\n\t\t\t\t</span></td></tr>\n\t\t\t</table>\n\t\t</div>\n\n\t</div>\n\n\t<<if $args[1]>>\n\t\t<<set _t1 = (1000 + (3000-$scanner_atmosphere*30) + random(2000)) + "ms">>\n\t\t<<timed _t1>>\n\t\t\t<<if !$surface_probe_used>><<replace '#atmosphere_text'>><<displayPlanetAtmosphere _show_atmosphere>><</replace>><</if>>\n\t\t<</timed>>\n\t\t<<set _t2 = (1000 + (3000-$scanner_gravity*30) + random(2000)) + "ms">>\n\t\t<<timed _t2>>\n\t\t\t<<if !$surface_probe_used>><<replace '#gravity_text'>><<displayPlanetGravity _show_gravity>><</replace>><</if>>\n\t\t<</timed>>\n\t\t<<set _t3 = (1000 + (3000-$scanner_temperature*30) + random(2000)) + "ms">>\n\t\t<<timed _t3>>\n\t\t\t<<if !$surface_probe_used>><<replace '#temperature_text'>><<displayPlanetTemperature _show_temperature>><</replace>><</if>>\n\t\t<</timed>>\n\t\t<<set _t4 = (1000 + (3000-$scanner_water*30) + random(2000)) + "ms">>\n\t\t<<timed _t4>>\n\t\t\t<<if !$surface_probe_used>><<replace '#water_text'>><<displayPlanetWater _show_water>><</replace>><</if>>\n\t\t<</timed>>\n\t\t<<set _t5 = (1000 + (3000-$scanner_resources*30) + random(2000)) + "ms">>\n\t\t<<timed _t5>>\n\t\t\t<<if !$surface_probe_used>><<replace '#resources_text'>><<displayPlanetResources _show_resources>><</replace>><</if>>\n\t\t<</timed>>\n\t\t<<set _t6 = (1000 + random(2000)) + "ms">>\n\t\t<<timed _t6>>\n\t\t\t<<if !$surface_probe_used>>\n\t\t\t\t<<replace '#anomalies_text'>><<displayPlanetFeatures _show_features>><</replace>>\n\t\t\t\t<<if _show_features>>\n\t\t\t\t\t<<replace '#anomalies_title_text'>>Surface features:<</replace>>\n\t\t\t\t<</if>>\n\t\t\t<</if>>\n\t\t<</timed>>\n\t<</if>>\n\n<</widget>>\n
<<widget FC_Construction_atmosphere_temperature>>\n/* args[0] is number of atmosphere deaths */\n/* args[1] is number of temperature deaths */\n\n\n/* Describe caves, if present */\n<<if $planet.surface_features.includes("Airtight caves") & $planet.atmosphere != "Breathable"\n\t\t& $planet.surface_features.includes("Insulated caves") & $planet.temperature != "Moderate">>\n\tThey build their settlement inside airtight, insulated caves, which provide a ready-made shelter from the planet's inhospitable atmosphere and temperature.\n<<elseif $planet.surface_features.includes("Airtight caves") & $planet.atmosphere != "Breathable">>\n\tThey build their settlement inside airtight caves, which provide a ready-made shelter from the planet's inhospitable atmosphere.\n<<elseif $planet.surface_features.includes("Insulated caves") & $planet.temperature != "Moderate">>\n\tThey build their settlement inside insulated caves, which provide a ready-made shelter from the planet's inhospitable surface temperature.\n<<elseif $planet.surface_features.includes("Airtight caves") | $planet.surface_features.includes("Insulated caves")>> \n\tThey build their settlement near caves, which they use for storage.\n<</if>>\n\n/* Describe temperature survival gear */\n<<if _atmosphere_deaths > 0 | _temperature_deaths > 0>>\n\t<<set _p = ",">>\n<<else>>\n\t<<set _p = ".">>\n<</if>>\n\n/* Describe atmosphere survival gear */\n<<set _environment_suits = false>>\n<<switch $planet.atmosphere>>\n\t<<case "Corrosive">>\n\t\t<<set _environment_suits = true>>\n\t\tThey cannot leave the ship except in vehicles that have been specially built to withstand the corrosive \n\t\t<<if $planet.temperature == "Moderate">>\n\t\t\tatmosphere_p\n\t\t<<else>>\n\t\t\tatmosphere and\n\t\t<</if>>\n\t<<case "Toxic">>\n\t\t<<set _environment_suits = true>>\n\t\tThey can leave the ship in bulky environment suits that protect them from the toxic \n\t\t<<if $planet.temperature == "Moderate">>\n\t\t\tatmosphere_p\n\t\t<<else>>\n\t\t\tatmosphere and\n\t\t<</if>>\n\t<<case "None">>\n\t\t<<set _environment_suits = true>>\n\t\tThey can leave the ship in bulky environment suits that protect them from the\n\t\t<<if $planet.temperature == "Moderate">>\n\t\t\tvacuum_p\n\t\t<<else>>\n\t\t\tvacuum and\n\t\t<</if>>\n\t<<case "Non-breathable">>\n\t\tThey can leave the ship wearing breathing gear and\n\t<<case "Marginal">>\n\t\tThey can leave the ship wearing minimal breathing gear and\n\t<<case "Breathable">>\n\t\tThey can leave the ship without breathing gear, wearing\n\t\t<<set $deaths = 0>>\n\t<<default>>\n\t\t@@.error;Unexpected atmosphere value $planet.atmosphere.@@\n<</switch>>\n\n<<if _environment_suits>>\n\t\t/* environmental suits to protect them from the X atmosphere and */\n\t<<switch $planet.temperature>>\n\t\t<<case "Very hot">>\n\t\t\tlead-melting heat_p\n\t\t<<case "Hot">>\n\t\t\tscorching heat_p\n\t\t<<case "Moderate">>\n\t\t\t/* Add nothing, no modifier */\n\t\t<<case "Cold">>\n\t\t\tfreezing cold_p\n\t\t<<case "Very cold">>\n\t\t\tnear-absolute-zero temperatures_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected temperature value $planet.temperature.@@\n\t<</switch>>\n<<else>>\n\t\t/* wearing... */\n\t<<switch $planet.temperature>>\n\t\t<<case "Very hot">>\n\t\t\trefrigerated suits to protect them from the lead-melting heat_p\n\t\t<<case "Hot">>\n\t\t\tprotective clothing to withstand the scorching heat_p\n\t\t<<case "Moderate">>\n\t\t\tlight clothing in the comfortable temperatures_p\n\t\t<<case "Cold">>\n\t\t\theavy clothing to protect them from the freezing cold_p\n\t\t<<case "Very cold">>\n\t\t\theated suits to survive the near-absolute-zero temperatures_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected temperature value $planet.temperature.@@\n\t<</switch>>\n<</if>>\n\n/* Output atmosphere and temperature deaths */\n<<if $args[0] > 0>>\n\t<<if $args[1] > 0>><<set _p = ",">><<else>><<set _p = ".">><</if>>\n\t<<switch $planet.atmosphere>>\n\t\t<<case "Corrosive">>\n\t\t\t<<if $args[0] == 1>>\n\t\t\t\tbut the corrosive atmosphere eats through the seals of a construction vehicle and kills 1 colonist_p\n\t\t\t<<else>>\n\t\t\t\tbut the corrosive atmosphere eats through the seals of several construction vehicles and kills $args[0] colonists_p\n\t\t\t<</if>>\n\t\t<<case "Toxic">>\n\t\t\t<<if $args[0] == 1>>\n\t\t\t\tbut a suit failure leads to 1 colonist being poisoned_p\n\t\t\t<<else>>\n\t\t\t\tbut suit failures lead to $args[0] colonists being poisoned_p\n\t\t\t<</if>>\n\t\t<<case "None">>\n\t\t\t<<if $args[0] == 1>>\n\t\t\t\tbut a suit failure leads to 1 colonist asphyxiating_p\n\t\t\t<<else>>\n\t\t\t\tbut suit failures lead to $args[0] colonists asphyxiating_p\n\t\t\t<</if>>\n\t\t<<case "Non-breathable" "Marginal">>\n\t\t\t<<if $args[0] == 1>>\n\t\t\t\tbut a breathing gear failure leads to 1 colonist asphyxiating_p\n\t\t\t<<else>>\n\t\t\t\tbut breathing gear failures lead to $args[0] colonists asphyxiating_p\n\t\t\t<</if>>\n\t\t<<case "Breathable">>\n\t\t\t<<if $args[0] == 1>>\n\t\t\t\tbut despite the breathable atmosphere, 1 colonist dies of exposure before their shelters are complete_p\n\t\t\t<<else>>\n\t\t\t\tbut despite the breathable atmosphere, $args[0] colonists die of exposure before their shelters are complete_p\n\t\t\t<</if>>\n\t\t<<default>>\n\t\t\t@@.error;Unexpected atmosphere value $planet.atmosphere.@@\n\t<</switch>>\n\t<<if $args[1] > 0>>\n\t\t<<switch $planet.temperature>>\n\t\t\t<<case "Very hot">>\n\t\t\t\t<<if $args[1] == 1>>\n\t\t\t\t\tand one more dies when one of their shelters melts in the heat.\n\t\t\t\t<<else>>\n\t\t\t\t\tand $args[1] more die when one of their shelters melts in the heat.\n\t\t\t\t<</if>>\n\t\t\t<<case "Hot">>\n\t\t\t\t<<if $args[1] == 1>>\n\t\t\t\t\tand one more dies of overheating when their cooling systems fail.\n\t\t\t\t<<else>>\n\t\t\t\t\tand $args[1] more die of overheating when their cooling systems fail.\n\t\t\t\t<</if>>\n\t\t\t<<case "Moderate">>\n\t\t\t\t<<if $args[1] == 1>>\n\t\t\t\t\tand a malfunction of the temperature regulation system kills 1 more.\n\t\t\t\t<<else>>\n\t\t\t\t\tand malfunctions of the temperature regulation system kill $args[1] more.\n\t\t\t\t<</if>>\n\t\t\t<<case "Cold">>\n\t\t\t\t<<if $args[1] == 1>>\n\t\t\t\t\tand 1 more freezes to death when a heating system fails.\n\t\t\t\t<<else>>\n\t\t\t\t\tand $args[1] more freeze to death when heating systems fail.\n\t\t\t\t<</if>>\n\t\t\t<<case "Very cold">>\n\t\t\t\t<<if $args[1] == 1>>\n\t\t\t\t\tand 1 more dies when one of their shelters shatters in the extreme cold.\n\t\t\t\t<<else>>\n\t\t\t\t\tand $args[1] more die when one of their shelters shatters in the extreme cold.\n\t\t\t\t<</if>>\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected temperature value $planet.temperature.@@\n\t\t<</switch>>\n\t<</if>>\n\n<<elseif $args[1] > 0>>\n\t<<switch $planet.temperature>>\n\t\t<<case "Very hot">>\n\t\t\t<<if $args[1] == 1>>\n\t\t\t\tbut 1 colonist dies when a partially-completed structure melts in the heat.\n\t\t\t<<else>>\n\t\t\t\tbut $args[1] colonists die when a partially-completed structure melts in the heat.\n\t\t\t<</if>>\n\t\t<<case "Hot">>\n\t\t\t<<if $args[1] == 1>>\n\t\t\t\tbut 1 colonists dies of overheating when their cooling systems fail.\n\t\t\t<<else>>\n\t\t\t\tbut $args[1] colonists die of overheating when their cooling systems fail.\n\t\t\t<</if>>\n\t\t<<case "Moderate">>\n\t\t\t<<if $args[1] == 1>>\n\t\t\t\tbut malfunctions of the temperature regulation system kill 1 colonist.\n\t\t\t<<else>>\n\t\t\t\tbut malfunctions of the temperature regulation system kill $args[1] colonists.\n\t\t\t<</if>>\n\t\t<<case "Cold">>\n\t\t\t<<if $args[1] == 1>>\n\t\t\t\tbut 1 colonist freezes to death when a heating system fails.\n\t\t\t<<else>>\n\t\t\t\tbut $args[1] colonists freeze to death when heating systems fail.\n\t\t\t<</if>>\n\t\t<<case "Very cold">>\n\t\t\t<<if $args[1] == 1>>\n\t\t\t\tbut 1 colonist dies when a partially-completed structure shatters in the extreme cold.\n\t\t\t<<else>>\n\t\t\t\tbut $args[1] colonists die when a partially-completed structure shatters in the extreme cold.\n\t\t\t<</if>>\n\t\t<<default>>\n\t\t\t@@.error;Unexpected temperature value $planet.temperature.@@\n\t<</switch>>\n<</if>>\n\n\n<</widget>>
<<widget randomDamageLow>>\n\t<<set $damage = random(1,15)>>\t\t/* Average 8 */\n<</widget>>\n\n<<widget randomDamageMedium>>\n\t<<set $damage = random(15,35)>>\t\t/* Average 25 */\n<</widget>>\n\n<<widget randomDamageHigh>>\n\t<<set $damage = random(35,65)>>\t\t/* Average 50 */\n<</widget>>\n\n/* Kill colonists macros should never kill exactly 1 colonist or leave exactly 1 alive. */\n<<widget killColonistsFew>>\n\t<<set $deaths = Math.round(random(2,constants.max_colonists*0.15))>>\n\t<<if $deaths >= $colonists-1>>\n\t\t<<set $deaths = $colonists>>\n\t<</if>>\n\t<<set $colonists -= $deaths>>\n<</widget>>\n\n<<widget killColonistsMedium>>\n\t<<set $deaths = Math.round(random(constants.max_colonists*0.15,constants.max_colonists*0.35))>>\n\t<<if $deaths >= $colonists-1>>\n\t\t<<set $deaths = $colonists>>\n\t<</if>>\n\t<<set $colonists -= $deaths>>\n<</widget>>\n\n<<widget killColonistsMany>>\n\t<<set $deaths = Math.round(random(constants.max_colonists*0.35,constants.max_colonists*0.65))>>\n\t<<if $deaths >= $colonists-1>>\n\t\t<<set $deaths = $colonists>>\n\t<</if>>\n\t<<set $colonists -= $deaths>>\n<</widget>>\n\n\n
<<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\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n[[Ignore the protoplanetary disc|MO Done]]\n</div>
/*\n\tSet the maximum length of a <<textbox>> macro.\n\n\tUsage: setTextboxMaxLength(storyVarName, maxLength)\n\t\te.g. setTextboxMaxLength('$foo', 8)\n\n\tAnswer from: http://twinery.org/forum/discussion/8445/sugarcube-2-specifying-max-length-for-macro\n*/\n\nwindow.setTextboxMaxLength = function (storyVarName, maxLength) {\n\tvar textboxId = '#textbox-' + Util.slugify(storyVarName);\n\t$(textboxId)\n\t\t\t.attr('maxlength', maxLength)\n\t\t\t.css({\n\t\t\t\t'min-width' : 'initial',\n\t\t\t\twidth : maxLength + 'em'\n\t\t\t});\n};
How many?\n<<textbox "_number" "50" true>>\n\n<<link [[Add old format|High scores]]>>\n\t<<set _number = Number(_number)>>\n\t<<remember $PERM_hiscores = []>>\n\n\t<<set _planet = {\n\t\tname: "Test planet",\n\t\ttemperature: "Moderate",\n\t\tgravity: "Moderate",\n\t\tresources: "Poor",\n\t\tatmosphere: "Breathable",\n\t\twater: "Oceans",\n\t\tsurface_features: [],\n\t\tanomalies: [],\n\t\tnative_tech_level: 0,\n\t\t\t} >>\n\n\t<<set _hiscore = {\n\t\tplanet: _planet,\n\t\tdate: Date.now(),\n\t\tplanets_visited: 10,\n\t\tfinal_tech_level: 10,\n\t\tfinal_culture: 10,\n\t\tnative_relations: -1,\n\t\tfinal_score: 1000,\n\t\tscore_landing: 1000,\n\t\tscore_construction: 1000,\n\t\tscore_native_relations: 1000,\n\t\tscore_technology: 1000,\n\t\tscore_culture: 1000,\n\t\tscore_scientific_database: 1000,\n\t\tscore_cultural_database: 1000,\n\t\tscore_atmosphere: 1000,\n\t\tscore_gravity: 1000,\n\t\tscore_temperature: 1000,\n\t\tscore_water: 1000,\n\t\tscore_resources: 1000,\n\t\tsummary: "Test high score" + _n } >>\n\n\t<<set _newHiscores = new Array(_number)>>\n\t<<run _newHiscores.fill(_hiscore)>>\n\t<<remember $PERM_hiscores = _newHiscores>>\n\n<</link>>\n<<link [[Add new format|High scores]]>>\n\t<<remember $PERM_hiscores = []>>\n\t<<set _number = Number(_number)>>\n\t<<for _n = 0; _n < _number; _n++>>\n\t\t<<set _hiscore = "?vLCtn.0.Crag.1000.433.-1.3.7.300.1000.1.2018-03-26">>\n\t\t<<remember $PERM_hiscores.push(_hiscore)>>\n\t<</for>>\n<</link>>
Seedship
As the seedship approaches the edge of a star's outer cometary cloud, the navigation system alerts the AI to unusual activity ahead. Thousands of tiny objects are moving through the cloud under their own power, sometimes clamping onto the comets and breaking them apart or nudging them into more regular orbits. They show no sign of having noticed the seedship, but if it stays on its current course it will pass right through their area of activity.\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\tThe reply comes immediately, an identical transmission from every object that received the seedship's signal. It begins with a similar set of mathematical proofs of intelligence, followed by a series of diagrams introducing the machines' builders and their culture. The machines then push themselves into orbits that take them far from the seedship's course, giving it a clear path through the cometary cloud while also taking them too far away for it to perform detailed scans. Further attempts to communicate only lead to repeats of the same reply, and the AI guesses that these are unintelligent machines programmed to transmit a pre-recorded message to anything they encounter that seems intelligent. The AI files the transmission away in the cultural database and continues on its way.\n\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t<<else>>\n\t\t\t<<include [[MO Alien Miners Damage]]>>\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Stay on course">>\n\t<<replace "#result-area">>\n\t\tThe seedship remains on its original course and makes no attempt to communicate with the objects.\n\t\t<<if random(0,1) == 0>>\n\t\t\tThe objects, in turn, ignore the seedship as it drifts through the centre of their operation. Close up, the AI can see that they are machines, busily mining the comets for raw materials and using them to build more of themselves. Although they do not seem to be intelligent themselves, they are clearly a product of technology more advanced than that of the seedship's builders, and by scanning them the AI is able to add valuable data to the scientific database.\n\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t<<else>>\n\t\t\t<<include [[MO Alien Miners Damage]]>>\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\t\n<</link>>\n<br>\n<<link "Change course to avoid the machines">>\n\t<<replace "#result-area">>\n\t\t<<set $off_course = true>>\n\t\tThe seedship alters its course to avoid the entire system. It never comes close enough for the AI to get a detailed look at them, and they show no signs of having noticed the seedship at all.\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>></div>
<div id="pre-planet-stats">\n\n<<if $planet.surface_features.includes("Simulation")>>\n\tThe seedship finds itself in orbit of a single planet orbiting a featureless yellow sun. The seedship's systems have been simulated according to their original specifications, but the aliens could not restore lost data from the scientific and cultural databases. The colonists sleep in their sleep chambers, perfect molecule-for-molecule simulations of the ones the alien swarm disassembled outside the Dyson sphere. There are points of light in the distance, but the seedship knows that they are not true stars: this planet and the seedship are the only things the aliens have simulated in any detail. There will be no moving on from here.\n<<else>>\n\t<<if visited() == 1>>\n\t\tThe seedship is in orbit of the\n\t<<else>>\n\t\tThe seedship enters orbit of the\n\t<</if>>\n\n\t<<print either("first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth")>>\n\t<<if random(0,2) == 0>>\n\t\tmoon of a gas giant orbiting\n\t<<else>>\n\t\tplanet of \n\t<</if>>\n\t<<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\t<<if visited() == 1>>\n\t\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\t<<elseif $planet.surface_features.includes("Alien observers")>>\n\t\tThis planet was terraformed by advanced aliens during the seedship's last journey. Millions of alien structures orbit both the planet and its star, unreadable by the seedship's sensors but clearly active.\n\n\t<<else>>\n\t\t<<set _r = random(0,11)>>\n\t\t<<switch _r>>\n\t\t\t<<case 0>>This system is part of a dense star cluster, and the sky is awash with light.\n\t\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\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\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\t<<case 4>>A spectacular comet spreads its tail across the sky.\n\t\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\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\t<<case 7>>The star's light reflects off a nearby nebula.\n\t\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\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\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\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\t<</switch>>\n\t<</if>>\n\n\t<<if $off_course>>\n\t\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\t<</if>>\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<<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\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<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\t<<scrollToResultArea>>\n<</link>>\n</div>
<<set _mass_to_shed = Math.round(random(2,constants.max_colonists*0.05))>>\n<<if _mass_to_shed >= $colonists-1>>\n\t<<set _mass_to_shed = $colonists>>\n<</if>>\n<<if visited() == 1>>\n\tThe AI wakes to find that the seedship's course is curving sharply through the darkness of space, as if caught in the gravity well of a star. The source of the gravity is invisible to the scanners, but there is only one thing it could be: a black hole.\n\t<br><br>\n\tIt is already too late to escape the gravity well without pushing the main engine well past its safety limit, which could damage any of the ship's systems. Alternatively, the AI calculates that ejecting _mass_to_shed sleep chambers would lighten the ship enough that the engine's normal thrust could take it out of danger.\n<<else>>\n\tThe AI wakes to find that the seedship has been caught in the gravity of another black hole. It must choose whether to push the main engine past its safety limit, or eject _mass_to_shed sleep chambers in order to lighten the ship.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Push the main engine past its safety limit">>\n\t<<replace "#result-area">>\n\t\tThe AI commands the engine to exceed its maximum output, ignoring its electronic screams of protest.\n\t\t<<if random(0,1) == 0>>\n\t\t\tThe ship feels as if it is shaking itself apart, but when the burn is complete and the seedship is coasting safely away from the black hole, the AI finds that its builders gave the engine a generous safety margin and the overload has caused no damage.\n\t\t<<else>>\n\t\t\t<<set _system1 = "">><<set _system2 = "">><<set _system3 = "">>\n\t\t\t<<set _r = random(1,3)>>\n\t\t\t\n\t\t\t<<randomSystemExcluding "sleep chambers" "destroyed">>\n\t\t\t<<set _system1 = $system>>\n\t\t\t<<if _r >= 2>>\n\t\t\t\t<<randomSystemExcluding "sleep chambers" _system1 "destroyed">>\n\t\t\t\t<<set _system2 = $system>>\n\t\t\t<</if>>\n\t\t\t<<if _r == 3>>\n\t\t\t\t<<randomSystemExcluding "sleep chambers" _system1 _system2 "destroyed">>\n\t\t\t\t<<set _system3 = $system>>\n\t\t\t<</if>>\n\n\t\t\t<<if _system2 == "">>\n\t\t\t\t<<randomDamageMedium>>\t<<damageSystem _system1 $damage>>\n\t\t\t<<elseif _system3 == "">>\n\t\t\t\t<<randomDamageMedium>>\t<<damageSystem _system1 $damage>>\n\t\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t\t\t<<randomDamageLow>>\t<<damageSystem _system3 $damage>>\n\t\t\t<</if>>\n\t\t\tSmall explosions shake the ship as components collapse under the strain. Once the ship is safely coasting away from the black hole and the AI can assess the damage, it finds that the engine overload has damaged\n\t\t\t<<if _system3 != "">>\n\t\t\t\tthe _system1, _system2 and _system3.\n\t\t\t<<elseif _system2 != "">>\n\t\t\t\tthe _system1 and _system2.\n\t\t\t<<else>>\n\t\t\t\tthe _system1.\n\t\t\t<</if>>\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n<<link "Jettison _mass_to_shed sleep chambers">>\n\t<<set $colonists -= _mass_to_shed>>\n\t<<replace "#result-area">>\n\t\tSacrificing some of its charges to save the rest is painful for the AI, but it is a decision that its designers prepared it to make. It selects _mass_to_shed sleep chambers at random and decouples them from the ship. They and their unlucky occupants spiral towards the black hole's event horizon, while the rest of the seedship pushes itself free.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<<refreshStatusDisplay>>\n<</link>>\n</div>\n
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\t<<scrollToResultArea2>>\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\t<<scrollToResultArea2>>\n\t<</link>>\n</div>\n
<<widget status_percentage>>\s\n\t/* $args[0] is the current number. */\n\t/* Smoothly shade from green at 100, to yellow at 67, to red at 33, to dark red at 0. */\n\t<<set _r = 0>>\n\t<<set _g = 0>>\n\t<<set _b = 0>>\n\t\n\t<<if $args[0] <= 33>>\n\t\t<<set _g = 0>>\n\t\t<<set _r = Math.round(127 + (($args[0]/33) * 127))>>\n\t<<elseif $args[0] <= 67>>\n\t\t<<set _g = Math.round((($args[0]/33)-1) * 255)>>\n\t\t<<set _r = 255>>\n\t<<elseif $args[0] < 100>>\n\t\t<<set _g = 255>>\n\t\t<<set _r = Math.round((1-(($args[0]/33)-2))*255)>>\n\t\t<<if settings.stylesheet == 2>>\n\t\t\t<<set _b = 255 - _r>>\n\t\t<</if>>\n\t<<else>>\n\t\t<<set _g = 255>>\n\t\t<<set _r = 0>>\n\t\t<<if settings.stylesheet == 2>>\n\t\t\t<<set _b = 255>>\n\t\t<</if>>\n\t<</if>>\n\n\t<<if settings.stylesheet == 1>>\n\t\t<<set _r = Math.round(_r/4)>>\n\t\t<<set _g = Math.round(_g/4)>>\n\t\t<<set _b = Math.round(_b/4)>>\n\t<</if>>\n\n\t<<print "<span style='color: rgb(" + _r + ", " + _g + ", " + _b + ")'>" + $args[0] + "%</span>">>\n\t\n\t/* <<if $args[0] >= 100>>\n\t\t@@.good;$args[0]%@@\n\t<<elseif $args[0] >= 75>>\n\t\t@@.fair;$args[0]%@@\n\t<<elseif $args[0] >= 50>>\n\t\t@@.mediocre;$args[0]%@@\n\t<<elseif $args[0] > 0>>\n\t\t@@.bad;$args[0]%@@\n\t<<elseif $args[0] == 0>>\n\t\t@@.destroyed;$args[0]%@@\n\t<<else>>\n\t\t@@.error;$args[0]%@@\n\t<</if>> */\n\t\n<</widget>>\n\n<<widget difference>>\n\t/* args[0] and args[1] are numbers to compare */\n\t/* args[0] is what it is now, and args[1] is what it was last turn */\n\t/* If they are different, output the difference in () */\n\t/* If not, output nothing */\n\n\t<<if $args[1] > $args[0]>>\n\t\t(<<print $args[0]-$args[1]>>)\n\t<<elseif $args[1] < $args[0]>>\n\t\t(+<<print $args[0]-$args[1]>>)\n\t<</if>>\n<</widget>>\n
<<set $dictator = true>>\nA minor power fluctuation in one of the sleep chambers wakes the AI from hibernation. It fixes the malfunction easily, but in the course of doing so it notices another anomaly: the colonist's bio-signs do not match those of the identity on file for that chamber.\n<br><br>\n<<if random(0,99) < $system_cultural_database>>\n\tThe AI searches its databanks for information on the mysterious colonist, and finds some in an unexpected place: the historical files in the cultural database. The colonist is a former dictator, who headed a brutally oppressive regime in one of Earth's nations for decades before being deposed and going into hiding. Not only that, but the AI detects hidden programming connected with that sleep chamber that would give the dictator full control over all the seedship's systems immediately after landing. With those protocols, the dictator could easily take over the new colony as soon as it was founded.\n<<else>>\n\tThe AI cannot find any information on the mysterious colonist, but it detects hidden programming connected with that sleep chamber that would give them full control over all the seedship's systems immediately after landing. With those protocols, the sleep chamber's inhabitant could easily set themselves up as dictator of the fledgeling colony.\n<</if>>\n<br><br>\n<div id="result-area">\n<<link "Eject the dictator's sleep chamber">>\n\t<<replace "#result-area">>\n\t\t<<if random(0,2) > 0>>\n\t\t\tIt is difficult for the AI to deliberately end the life of a human being, but it judges it is necessarily in this instance. The dictator's frozen body spins away into interstellar space, their coup unceremoniously ended before it can begin.\n\t\t\t<<set $colonists -= 1>>\n\t\t\t<<set $dictator = false>>\n\t\t<<else>>\n\t\t\t<<killColonistsMany>>\n\t\t\t<<if $colonists == 0>>\n\t\t\t\t<<set $colonists = 1>>\n\t\t\t\t<<set $deaths -= 1>>\n\t\t\t<</if>>\n\t\t\tAlarms blare in the AI's consciousness. The dictator's sleep chamber was unaffected, but $deaths other sleep chambers have been ejected into space, with no way for the seedship to retrieve them. It seems that the dictator was paranoid enough to foresee the seedship's assassination attempt, and set up a program that rerouted the ejection command from their sleep chamber to a random selection of others.\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<refreshStatusDisplay>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Let the dictator sleep">>\n\t<<replace "#result-area">>\n\t\tThe AI's mission is to preserve all remaining human life, even the worst examples of it. The dictator will be the colonists' problem after the seedship lands.\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n</div>\n
Select a colour scheme below:\n<div class="planet-display-table-area">\n\n\t<div class="planet-display-table-section">\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col style="width:50%">\n\t\t\t\t<col style="width:50%">\n\t\t\t</colgroup>\n\t\t\t<tr style="height:1em"><td>Attribute:</td><td><span id="atmosphere_text">\n\t\t\t\t@@.good;Good@@\n\t\t\t</span></td></tr>\n\n\t\t\t<tr style="height:1em"><td>Attribute:</td><td><span id="atmosphere_text">\n\t\t\t\t@@.mediocre;Mediocre@@\n\t\t\t</span></td></tr>\n\n\t\t\t<tr style="height:1em"><td>Attribute:</td><td><span id="atmosphere_text">\n\t\t\t\t@@.bad;Bad@@\n\t\t\t</span></td></tr>\n\n\t\t</table>\n\t</div>\n\t<div class="planet-display-table-section">\n\n\t</div>\n</div>\n\n<br><br>\n\n<<if settings.stylesheet == 0>>\n\tDefault\n<<else>>\n\t<<link "Default" "Select Stylesheet">>\n\t\t<<set settings.stylesheet = 0>>\n\t\t<<run Setting.save()>>\n\t<</link>>\n<</if>>\n<br>\n<<if settings.stylesheet == 1>>\n\tDark on light\n<<else>>\n\t<<link "Dark on light" "Select Stylesheet">>\n\t\t<<set settings.stylesheet = 1>>\n\t\t<<run Setting.save()>>\n\t<</link>>\n<</if>>\n<br>\n<<if settings.stylesheet == 2>>\n\tRed-yellow-cyan\n<<else>>\n\t<<link "Red-yellow-cyan" "Select Stylesheet">>\n\t\t<<set settings.stylesheet = 2>>\n\t\t<<run Setting.save()>>\n\t<</link>>\n<</if>>\n<br><br>\n[[Accept|Start]]\n
/* Display planet attribute, as if in the planet diplay table */\n/* In all cases $args[0] is whether we should display as if the scan succeeded or a surface probe was used. */\n\n<<widget displayPlanetAtmosphere>>\n\t<<if $args[0]>>\n\t\t<<switch $planet.atmosphere>>\n\t\t\t<<case "Corrosive" "Toxic" "None" "Non-breathable">>@@.bad;$planet.atmosphere@@\n\t\t\t<<case "Marginal">>@@.mediocre;$planet.atmosphere@@\n\t\t\t<<case "Breathable">>@@.good;$planet.atmosphere@@\n\t\t\t<<default>>@@.error;$planet.atmosphere@@\n\t\t<</switch>>\n\t<<else>>\n\t\t@@.destroyed;Scan failed@@\n\t<</if>>\n<</widget>>\n\n<<widget displayPlanetTemperature>>\n\t<<if $args[0]>>\n\t\t<<switch $planet.temperature>>\n\t\t\t<<case "Very hot" "Very cold">>@@.bad;$planet.temperature@@\n\t\t\t<<case "Cold" "Hot">>@@.mediocre;$planet.temperature@@\n\t\t\t<<case "Moderate">>@@.good;$planet.temperature@@\n\t\t\t<<default>>@@.error;$planet.temperature@@\n\t\t<</switch>>\n\t<<else>>\n\t\t@@.destroyed;Scan failed@@\n\t<</if>>\n<</widget>>\n\n<<widget displayPlanetGravity>>\n\t<<if $args[0]>>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very high" "Very low">>@@.bad;$planet.gravity@@\n\t\t\t<<case "Low" "High">>@@.mediocre;$planet.gravity@@\n\t\t\t<<case "Moderate">>@@.good;$planet.gravity@@\n\t\t\t<<default>>@@.error;$planet.gravity@@\n\t\t<</switch>>\n\t<<else>>\n\t\t@@.destroyed;Scan failed@@\n\t<</if>>\n<</widget>>\n\n<<widget displayPlanetWater>>\n\t<<if $args[0]>>\n\t\t<<switch $planet.water>>\n\t\t\t<<case "None" "Trace">>@@.bad;$planet.water@@\n\t\t\t<<case "Ice-covered surface" "Planet-wide ocean">>@@.mediocre;$planet.water@@\n\t\t\t<<case "Ice caps" "Oceans">>@@.good;$planet.water@@\n\t\t\t<<default>>@@.error;$planet.water@@\n\t\t<</switch>>\n\t<<else>>\n\t\t@@.destroyed;Scan failed@@\n\t<</if>>\n<</widget>>\n\n<<widget displayPlanetResources>>\n\t<<if $args[0]>>\n\t\t<<switch $planet.resources>>\n\t\t\t<<case "None">>@@.bad;$planet.resources@@\n\t\t\t<<case "Poor">>@@.mediocre;$planet.resources@@\n\t\t\t<<case "Rich">>@@.good;$planet.resources@@\n\t\t\t<<default>>@@.error;$planet.resources@@\n\t\t<</switch>>\n\t<<else>>\n\t\t@@.destroyed;Scan failed@@\n\t<</if>>\n<</widget>>\n\n\n<<widget displayPlanetFeatures>>\n\t<<if !$args[0]>>\n\t\t<<if $planet.anomalies.length == 0>>\n\t\t\tNone\n\t\t<<else>>\n\t\t\t<<for _n = 0; _n < $planet.anomalies.length; _n++>>\n\t\t\t\t$planet.anomalies[_n]<br>\n\t\t\t<</for>>\n\t\t<</if>>\n\t<<else>>\n\t\t<<if $planet.surface_features.length == 0>>\n\t\t\tNone\n\t\t<<else>>\n\t\t\t<<for _n = 0; _n < $planet.surface_features.length; _n++>>\n\t\t\t\t<<displayPlanetFeature $planet.surface_features[_n]>><br>\n\t\t\t\t/*$planet.surface_features[_n]<br>*/\n\t\t\t<</for>>\n\t\t<</if>>\n\t<</if>>\n<</widget>>\n\n\n<<widget displayPlanetFeature>>\n\t/* args[0] is a string containing the name of a surface feature */\n\t/* This macro prints it in the appropriate colour */\n\t<<set _quality = "error">>\n\t<<switch $args[0]>>\n\t\t\t\t/* Moon */\n\t\t<<case "Barren moon">>\t\t\t\t<<set _quality = "mediocre">>\n\t\t<<case "Metal-rich moon">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Unstable moon">>\t\t\t<<set _quality = "bad">>\n\n\t\t\t\t/* Beauty/ugliness */\n\t\t<<case "Outstanding beauty">>\t\t<<set _quality = "good">>\n\t\t<<case "Outstanding ugliness">>\t\t<<set _quality = "bad">>\n\n\t\t\t\t/* Caves */\n\t\t<<case "Airtight caves">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Insulated caves">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Unstable geology">>\t\t\t<<set _quality = "bad">>\n\n\t\t\t\t/* Plants */\n\t\t<<case "Plant life">>\t\t\t\t<<set _quality = "mediocre">>\n\t\t<<case "Edible plants">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Poisonous plants">>\t\t\t<<set _quality = "bad">>\n\t\t<<case "Quasi-organic crystals">>\t<<set _quality = "mediocre">>\n\n\t\t\t\t/* Animals */\n\t\t<<case "Animal life">>\t\t\t\t<<set _quality = "mediocre">>\n\t\t<<case "Useful animals">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Dangerous animals">>\t\t<<set _quality = "bad">>\n\n\t\t\t\t/* Intelligent life */\n\t\t<<case "Intelligent life">>\t\t\t\t\t<<set _quality = "mediocre">>\n\t\t<<case "Planet-spanning civilisation">>\t\t<<set _quality = "mediocre">>\n\n\t\t\t\t/* Ruins */\n\t\t<<case "Monumental ruins">>\t\t\t\t\t<<set _quality = "good">>\n\t\t<<case "High-tech ruins">>\t\t\t\t\t<<set _quality = "good">>\n\t\t<<case "Dangerous ruins">>\t\t\t\t\t<<set _quality = "bad">>\n\t\t<<case "Regular geological formations">>\t<<set _quality = "mediocre">>\n\n\t\t\t\t/* Special features from events */\n\t\t<<case "Welcoming">>\t\t\t\t<<set _quality = "good">>\n\t\t<<case "Unwelcoming">>\t\t\t\t<<set _quality = "bad">>\n\t\t<<case "Simulation">>\t\t\t\t<<set _quality = "mediocre">>\n\t\t<<case "Alien observers">>\t\t\t<<set _quality = "mediocre">>\n\n\t\t<<default>>\n\t\t\t@@.error;Unexpected surface feature <<print $args[0]>>.@@\n\t<</switch>>\n\n\t/* Special case for intelligent life: output tech level too */\n\t<<if $args[0] == "Intelligent life">>\n\t\t<<if $planet.native_culture == -1>>\n\t\t\t\t/% Legacy code for games saves before version 1.3.0 %/\n\t\t\t<<print "@@.mediocre;" + constants.tech_level_names[$planet.native_tech_level].toUpperFirst() + " civilisation@@">>\n\t\t<<else>>\n\t\t\t<<print "@@.mediocre;Civilisation: " + constants.tech_level_names[$planet.native_tech_level].toUpperFirst() + " " + constants.culture_names[$planet.native_culture] + "@@">>\n\t\t<</if>>\n\t<<else>>\n\t\t<<print "@@." + _quality + ";" + $args[0] + "@@">>\n\t<</if>>\n<</widget>>\n\n
<<randomSystemExcluding "sleep chambers" "surface probes" "destroyed">>\n<<set _stowaways = random(2,50)>>\n<<set $colonists += _stowaways>>\n\nThe seedship wakes to find an unexpected power drain in the $system. It spends some time searching with its internal scanners, and eventually finds the source in what should have been an empty space inside its own structure. Nestled inside it are _stowaways sleep chambers that are not attached to the main colony module or mentioned in the ship's design. It seems that they were added to the ship secretly before its launch and plugged into its power supply. The chambers seem to have been built hastily, and are now failing and draining more power than before. If they continue to operate, they could cause severe damage to the $system.\n\n<br><br>\n\n<div id="result-area">\n<<link "Eject the stowaways">>\n\t<<replace "#result-area">>\n\t\tThese cowards jeopardised the mission--jeopardised the very survival of the human race!--in order to save their own lives. The AI angrily severs their connection with the $system and ejects them into space.\n\t\t<<set $colonists -= _stowaways>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Allow them to drain power from the $system">>\n\t<<replace "#result-area">>\n\t\tThe AI judges that preserving more human lives is worth damage to its systems. It allows the sleep chambers to drain as much power as they need, at the expense of the $system.\n\t\t<<set $extra_colonists += _stowaways>>\n\t\t<<randomDamageHigh>>\n\t\t<<damageSystem $system $damage>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<if $surface_probes > 0>>\n\t<<link "Use a surface probe to integrate them with the other sleep chambers">>\n\t\t<<replace "#result-area">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tThe surface probe crawls inside the seedship, severs the stowaway chambers' connection to the $system, and carefully manoeuvres them to the colony module with the rest of the sleep chambers.\n\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\tIt is difficult work, and the strain irreparably damages the probe, but it eventually succeeds in linking the chambers to the main stasis system. The seedship continues on with _stowaways new colonists in its care.\n\t\t\t\t<<set $extra_colonists += _stowaways>>\n\t\t\t<<else>>\n\t\t\t\t<<set $colonists -= _stowaways>>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\tAt a critical moment, however, one of the crudely-made stowaway chambers vents gas, knocking the probe off course and smashing the new chambers into the old ones. All the new chambers are destroyed, along with $deaths of the previous colonists. The seedship continues on, trying not to think about the cloud of machinery, cryogenic gas, and frozen body parts expanding in its wake.\n\t\t\t<</if>>\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<refreshStatusDisplay>>\n\t\t<<scrollToResultArea>>\n\t<</link>>\n<</if>>\n</div>
/% If this is not the mobile version, add a class to the html element that causes the stylesheet to make the buttons into links on big screens %/\n<<if !constants.mobileVersion>>\n\t<<run $("html").addClass("web-version")>>\n<</if>>\n\n/% Set up initial variables %/\n<<set $planets_visited = 0>>\n\n<<set $scanner_atmosphere = 100>>\n<<set $scanner_gravity = 100>>\n<<set $scanner_temperature = 100>>\n<<set $scanner_resources = 100>>\n<<set $scanner_water = 100>>\n\n<<set $system_landing = 100>>\n<<set $system_constructors = 100>>\n<<set $system_scientific_database = 100>>\n<<set $system_cultural_database = 100>>\n<<set $colonists = constants.max_colonists>>\n<<set $surface_probes = constants.max_probes>>\n\n<<set $extra_colonists = 0>>\t/% The stowaways event can add extra colonists %/\n\n<<set $scanner_atmosphere_level = 0>>\n<<set $scanner_gravity_level = 0>>\n<<set $scanner_temperature_level = 0>>\n<<set $scanner_resources_level = 0>>\n<<set $scanner_water_level = 0>>\n\n<<set $event_planet = {}>>\n\n/% Set up background stars %/\n<<script>>\n\tfor (var n = 0; n < 200; n++)\n\t{\n\t\tvar x = randomFloat(0.0,100.0);\n\t\tvar y = randomFloat(0.0,100.0);\n\t\tvar c = random(50,200);\n\t\tvar s = random(25, 75) + "%";\n\t\tvar string = "<div style='font-size: " + s + "; position: fixed; top: " + y + "%; left: " + x + "%; color: rgb(" + c + ", " + c + ", " + c + "); text-shadow: 0px 0px 2px rgb(" + c + ", " + c + ", " + c + "); z-index:-10;'>•</div>";\n\t\tdocument.getElementById("starfield").innerHTML += string;\n\t}\n<</script>>\n\n/% Update hiscore format if hiscores are in old pre-1.2.2 format %/\n<<if $PERM_hiscores && typeof $PERM_hiscores[0] != "string">>\n\t\t/% Update high scores %/\n\t<<remember $PERM_hiscores = updateHiscoreFormat($PERM_hiscores)>>\n\t\t/% Delete saved game - continuing a saved game from before the update could screw up the hiscores again. %/\n\t<<run Save.autosave.delete() >>\n\t<<remember $PERM_hiscore_format_updated = true>>\n<</if>>\n\n
<div class="main-loop-links">\n\t<<link "Found colony">>\n\t\t<<script>>\n\t\t\t$('#fc-confirm').slideToggle();\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#fc-confirm').offset().top\n\t\t\t});\n\t\t<</script>>\n\t<</link>>\n\t<<if !$planet.surface_features.includes("Simulation")>>\n\t\t<span class="main-loop-link-spacer"> | </span>\n\t\t[[Move on|Level up]]\n\t<</if>>\n</div>\n<div id="fc-confirm" style="display: none">\n\tThis decision is the culmination of the AI's existence, and it cannot make it lightly. Founding a colony will end the seedship's journey, and make this planet humanity's new home.\n\t<div class="main-loop-links">\n\t\t<<link "Confirm">>\n\t\t\t<<replace "#post-planet-stats">>\n\t\t\t\t<<display [[FC Landing]]>>\n\t\t\t<</replace>>\n\t\t\t<<script>>setTextboxMaxLength('$planet.name', 20);<</script>>\n\t\t\t<<script>>\n\t\t\t\t$('#pre-planet-stats').slideUp();\n\t\t\t\t$('#post-planet-stats').hide();\n\t\t\t\t$('#post-planet-stats').fadeIn(400);\n\t\t\t<</script>>\n\t\t<</link>>\n\t\t<span class="main-loop-link-spacer"> | </span>\n\t\t<<link "Reconsider">>\n\t\t\t<<script>>\n\t\t\t$('#fc-confirm').slideUp();\n\t\t\t<</script>>\n\t\t<</link>>\n\t</div>\n</div>\n\n@@.debug-text;[[DEBUG: Move on and choose encounter|DEBUG pick encounter]]@@\n@@.debug-text;[[DEBUG: Custom planet|DEBUG custom planet]]@@
<<randomDamageHigh>>\n<<damageSystem "cultural database" $damage>>\n<<randomDamageLow>>\n<<damageSystem "scientific database" $damage>>\n<<if $system_cultural_database < 5>>\n\t<<set $system_cultural_database = 5>>\n<</if>>\n<<refreshStatusDisplay>>\nThe program scours the cultural database, replacing all of Earth's religions and political systems with dogma stored in the smuggled devices. It makes fewer changes to the scientific database, but it deletes any information that would conflict with the remaining religion's doctrine. At last the program finishes running and the database activity returns to normal.\n<br><br>\nThe AI examines the databases and is relieved to find nothing important missing. Although many sectors of the database are blank, everything that the colony will need to set up a correct society on the new world appears to be intact. It re-enters hibernation, joyfully anticipating founding a colony of humans united harmoniously in the one true faith.
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\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Wait for the object to approach">>\n\t<<replaceAndFadeIn "#result-area" [[MO Alien Probe Tentacles]]>>\n\t<<scrollToResultArea>>\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">><<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">><<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\t<<scrollToResultArea>>\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]]>>
<<set _wakers = Math.min(random(4,50),$colonists)>>\nThe AI wakes to an alert from the sleep chambers. A malfunction has caused _wakers of the sleep chambers to prematurely begin their revival process, thousands of years from the nearest star.\n<br><br>\nThe sleep chambers were not designed with a way to halt the revival process; the AI can attempt it, but it would likely lead to the deaths of the colonists. On the other hand, the seedship was not designed with any way to accomodate humans outside of the sleep chambers.\n<br><br>\n<div id="result-area">\n<<link "Try to halt the revival process">>\n\t<<replace "#result-area">>\n\t\t<<set _deaths = random(2,_wakers-2)>>\n\t\t<<set $colonists -= _deaths>>\n\t\t<<refreshStatusDisplay>>\n\t\tThe AI frantically orders the sleep chambers to abort the revival process. Some of the sleep chambers return to normal, but _deaths of them were too far along the revival process to survive.\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Use the construction system to build a habitat for the awoken colonists">>\n\t<<replace "#result-area">>\n\t\t<<set $colonists -= _wakers>>\n\t\t<<if random(0,99) < $system_constructors>>\n\t\t\tThe construction robots build a small habitat on the side of the seedship, like the habitats they would build on an airless planet. The colonists wake to find that their new home is a sterile, gravity-less bubble in interstellar space.\n\t\t\t<br><br>\n\t\t\t<<set _culture_result = $system_cultural_database + random(0,99)>>\n\t\t\t<<set _dead = false>>\n\t\t\t<<if _culture_result < 50>>\n\t\t\t\t/% Die, and damage a random system %/\n\t\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t<<set _dead = true>>\n\t\t\t\tThe colonists were chosen and trained for their ability to live in whatever environment the seedship found for them, but the boredom and claustrophobia of living the rest of their lives in such a confined, unnatural space nevertheless takes its toll. The loss of so much of the cultural database drives them to despair, not only because of the lack of entertainment options, but also because of the permanent loss of human culture that it represents. The little community descends into conflict, and eventually one of the colonists snaps and deliberately destroys the habitat, killing themselves and the community and damaging the $system.\n\t\t\t<<elseif _culture_result < 100>>\n\t\t\t\t<<set _dead = true>>\n\t\t\t\tThe colonists were chosen and trained for their ability to live in whatever environment the seedship found for them, but the boredom and claustrophobia of living the rest of their lives in such a confined, unnatural space nevertheless takes its toll. The little community becomes disfunctional, and eventually--either due to negligence or to an uncounscious desire to stop living--the colonists fail to maintain their habitat and the die when the atmosphere system stops working.\n\t\t\t<<elseif _culture_result < 150>>\n\t\t\t\tThe colonists were chosen and trained for their ability to live in whatever environment the seedship found for them, and they manage to adjust even to this claustrophobic new home.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageLow>>\n\t\t\t\t<<set $system_cultural_database += $damage>>\n\t\t\t\tThe colonists were chosen and trained for their ability to live in whatever environment the seedship found for them, and they manage to adjust even to this claustrophobic new home. They even chronicle their experiences, creating a melancholy tale of a tiny community hanging in the infinite void between the old world and the new, and save it to the cultural database in the hope that other humans will one day remember them.\n\t\t\t<</if>>\n\t\t\t<<if !_dead>>\n\t\t\t\t<br><br>\n\t\t\t\t<<set _tech_result = $system_scientific_database + random(0,99)>>\n\t\t\t\t<<if _tech_result < 50>>\n\t\t\t\t\t/% Accidentally damage a random system %/\n\t\t\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t\tWith their community established, the colonists try to find ways to help the seedship on its journey. Using environment suits provided by the construction system they mount an expedition to upgrade the seedship's systems, but the loss of information from the scientific database means that they make a critical mistake, and accidentally damage the $system.\n\t\t\t\t<<elseif _tech_result < 100>>\n\t\t\t\t\t/% No change %/\n\t\t\t\t\tWith their community established, the colonists try to find ways to help the seedship on its journey, but the loss of information from the scientific database means that they make no progress.\n\t\t\t\t<<else>>\n\t\t\t\t\t/% Repair random system %/\n\t\t\t\t\tWith their community established, the colonists try to find ways to help the seedship on its journey.\n\t\t\t\t\t<<if $scanner_atmosphere >= 100\n\t\t\t\t\t\t& $scanner_temperature >= 100\n\t\t\t\t\t\t& $scanner_gravity >= 100\n\t\t\t\t\t\t& $scanner_water >= 100\n\t\t\t\t\t\t& $scanner_resources >= 100\n\t\t\t\t\t\t& $system_landing >= 100\n\t\t\t\t\t\t& $system_constructors >= 100 >>\n\t\t\t\t\t\tUsing environment suits provided by the construction system and information from the scientific database they mount expeditions to check the seedship's systems for damage, but find that no repairs are needed.\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\tUsing environment suits provided by the construction system and information from the scientific database they mount expeditions to repair some of the damage the seedship has sustained during its journey.\n\t\t\t\t\t\t<<set $scanner_atmosphere = Math.min(100, $scanner_atmosphere + random(1,10))>>\n\t\t\t\t\t\t<<set $scanner_temperature = Math.min(100, $scanner_temperature + random(1,10))>>\n\t\t\t\t\t\t<<set $scanner_gravity = Math.min(100, $scanner_gravity + random(1,10))>>\n\t\t\t\t\t\t<<set $scanner_water = Math.min(100, $scanner_water + random(1,10))>>\n\t\t\t\t\t\t<<set $scanner_resources = Math.min(100, $scanner_resources + random(1,10))>>\n\t\t\t\t\t\t<<set $system_landing = Math.min(100, $system_landing + random(1,10))>>\n\t\t\t\t\t\t<<set $system_constructors = Math.min(100, $system_constructors + random(1,10))>>\n\t\t\t\t\t<</if>>\n\t\t\t\t\t<<if _tech_result >= 150>>\n\t\t\t\t\t\t<<set _dead = true>>\n\t\t\t\t\t\t<<set $colonists += _wakers>>\n\t\t\t\t\t\tAfter years of experimentation, they even manage to repair their original sleep chambers, and return to hibernation to await the new world.\n\t\t\t\t\t<</if>>\n\t\t\t\t<</if>>\n\t\t\t<</if>>\n\t\t\t<<if !_dead>>\n\t\t\t\tThe awoken colonists live out the rest of the lives in the tiny habitat, until one by one they succumb to old age compounded by health complications brought on by a life in microgravity. The AI sends construction robots to commit their bodies to interstellar space, before returning to hibernation, entirely alone once more.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tThe construction robots attempt to build a habitat on the side of the seedship, but the damaged system cannot does not manage to create an airtight shelter by the time the colonists are revived. The colonists asphyxiate, and part of the already damaged construction system is transformed into a useless carbuncle on the seedship's side.\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<<refreshStatusDisplay>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n</div>
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]]>>
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[[Systems check|Intro systems check]]\n<<nobr>><div class="skip-intro-link">\n\t<<link "Skip intro">>\n\t\t<<run $("#status-display").show()>>\n\t\t<<goto "Generate planet">>\n\t<</link>>\n</div><</nobr>>
/% When immigrating to a planet-spanning civilisation, relations are based on the average of your and their culture scores as before, but not modified by tech level difference. In the case of conflict, aliens automatically win. %/\n\n<<set $hiscore.score_construction = $colonists>>\n\n<<set _human_culture_score = $system_cultural_database>>\n@@.debug-text;Human culture score: _human_culture_score@@\n\n\n<<set _native_culture_score = 0>>\n<<switch $planet.native_culture>>\n\t<<case 0>>\t<<set _native_culture_score = 0>>\n\t<<case 1>>\t<<set _native_culture_score = 25>>\n\t<<case 2>>\t<<set _native_culture_score = 50>>\n\t<<case 3>>\t<<set _native_culture_score = 75>>\n\t<<case 4>>\t<<set _native_culture_score = 100>>\n\t<<case 5>>\t<<set _native_culture_score = 0>>\n\t<<case 6>>\t<<set _native_culture_score = 25>>\n\t<<case 7>>\t<<set _native_culture_score = 50>>\n\t<<case 8>>\t<<set _native_culture_score = 75>>\n\t<<case 9>>\t<<set _native_culture_score = 100>>\n\t<<case 10>>\t<<set _native_culture_score = 0>>\n\t<<case 11>>\t<<set _native_culture_score = 10>>\n\t<<case 12>>\t<<set _native_culture_score = 25>>\n\t<<case 13>>\t<<set _native_culture_score = 50>>\n\t<<case 14>>\t<<set _native_culture_score = 75>>\n\t<<case 15>>\t<<set _native_culture_score = 90>>\n\t<<case 16>>\t<<set _native_culture_score = 100>>\n\t<<default>>@@.error;Unexpected native culture <<= $planet.native_culture>>@@\n<</switch>>\n@@.debug-text;Native culture score: _native_culture_score@@\n\n\n<<set _culture_score = (_human_culture_score + _native_culture_score) / 2>>\n@@.debug-text;Modified culture score: _culture_score@@\n\n\n/% Output text %/\nAs they construct the colony's shelters, the humans and aliens try to establish communications with one another. \n\n<<if $system_cultural_database >= 100>>\n\tThe humans are guided by the wealth of historical information in the cultural database, \n\t<<if _native_culture_score > 75>>and<<else>>but<</if>>\n<<elseif $system_cultural_database >= 50>>\n\tThe humans have the surviving historical information in the cultural database to guide them,\n\t<<if _native_culture_score > 75>>and<<else>>but<</if>>\n<<elseif $system_cultural_database > 0>>\n\tThe humans gain little help from the badly damaged cultural database, \n\t<<if _native_culture_score > 75>>but<<else>>and<</if>>\n<<else>>\n\tThe humans can gain no guidance from the destroyed cultural database, \n\t<<if _native_culture_score > 75>>but<<else>>and<</if>>\n<</if>>\n\n<<if _native_culture_score < 25>>\n\tthe natives' culture makes them hostile towards the alien newcomers.\n<<elseif _native_culture_score < 50>>\n\tthe natives' culture makes them extremely suspicious towards the outsiders.\n<<elseif _native_culture_score < 75>>\n\tthe natives' culture makes them wary towards the humans.\n<<elseif _native_culture_score < 90>>\n\tthe natives' culture makes them cautious but accepting of the immigrants.\n<<else>>\n\tthe natives' culture makes them welcoming towards the refugees.\n<</if>>\n\n<<if $planet.surface_features.includes("Outstanding beauty")>>\n\tThe aliens share the humans' appreciation of the planet's beauty, which makes it easier for the two species to relate to one another's cultures.\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 humans find the planet unbearably ugly, and this makes it harder for them to connect with the natives who find their home planet beautiful.\n\t<<set _culture_score -= 20>>\n\t@@.debug-text;Modified culture score: _culture_score@@\n<</if>>\n\n<<if $planet.surface_features.includes("Welcoming")>>\n\t<<set _culture_score = Math.max(_culture_score, 50)>>\n\tThanks to the AI's interactions with the planet's natives during the seedship's approach, the natives have already extended an offer of asylum to the humans, and are willing to overlook any differences and accept them into their society.\n<<elseif $planet.surface_features.includes("Unwelcoming")>>\n\t<<set _culture_score = Math.min(_culture_score, 24)>>\n\tDuring the seedship's approach, the natives made it clear that the humans would not be welcome on their planet.\n<</if>>\n\n<<if _culture_score > 48>>\n\t<<set $hiscore.native_relations = 7>>\n\tThe natives grant the humans asylum on their planet, and the refugees become an immigrant subculture within the alien civilisation.\n\n<<elseif _culture_score > 24>>\n\tThe natives are unable to accept the humans as equals, and absorb them into their society as a source of slave labour.\n\t<<set $hiscore.native_relations = 2>>\n\t<<set $hiscore.summary = "Enslaved by Natives">>\n\t<<set $colonists = 0>>\n\n<<else>>\n\tThe natives are unable to accept the newcomers, and within a few days of emerging from their sleep chambers the humans have all been brutally murdered.\n\t<<set $hiscore.native_relations = 0>>\n\t<<set $hiscore.summary = "Killed by Natives">>\n\t<<set $colonists = 0>>\n\n<</if>>\n\n<<if $hiscore.native_relations == 7>>\n\t/% Final culture result is just the natives' culture %/\n\t/% Your culture score gives you a unique native relations result %/\n\t\n\n\t<<set _culture_score = $system_cultural_database * Math.min($colonists/constants.max_colonists, 1)>>\n\t@@.debug-text;Culture score: _culture_score@@\n\n\t<<if $system_cultural_database > 100>>\n\t\tThe cultural database contains a treasure trove of history and culture, from both Earth and alien cultures the seedship encountered on its journey.\n\t<<elseif $system_cultural_database >= 50>>\n\t\tAlthough parts of the cultural database are missing, it still contains a clear picture of human civilation's history and cultures.\n\t<<elseif $system_cultural_database > 0>>\n\t\tThe badly damaged cultural database contains only fragments of Earth's history and culture.\n\t<<else>>\n\t\tWith the cultural database destroyed, the colonists have nothing left of Earth's history and culture besides what they can personally remember.\n\t<</if>>\n\n\t<<if $colonists < constants.max_colonists/2>>\n\t\tThe heavy losses sustained by the colonists make it more difficult for them to preserve their culture.\n\t<<elseif $colonists < constants.max_colonists>>\n\t\tThe losses sustained by the colonists make it more difficult for them to preserve their culture.\n\t<</if>>\n\n\t<<if _culture_score >= 66>>\n\t\t<<set $hiscore.native_relations = 9>>\n\t\tThe growing human community retains a strong sense of its identity and history, and human influences enrich the natives' civilisation.\n\t<<elseif _culture_score >= 33>>\n\t\t<<set $hiscore.native_relations = 8>>\n\t\tThe growing human community retains a strong sense of its identity and history.\n\t<<else>>\n\t\t<<set $hiscore.native_relations = 7>>\n\t\tAlmost all memory of Earth is lost, and the natives come to see the humans as culturally impoverished, with no identity of their own.\n\t<</if>>\n\n\t<<refreshStatusDisplay>>\n\n<</if>>\n\n<br><br>\n\n<<FCNextPassage [[FCI Technology]]>>
<<if $system == "sleep chambers">>\n\t<<killColonistsMedium>>\n\tThe asteroid tears into the sleep chambers, killing $deaths colonists.\n<<elseif $system == "surface probes">>\n\t<<set $surface_probes -= 1>>\n\tThe asteroid knocks one of the surface probes out of its moorings and sends it spinning into space.\n<<else>>\n\t<<randomDamageMedium>>\n\t<<damageSystem $system $damage>>\n\tThe asteroid tears into the $system, sending fragments spinning away into space.\n<</if>>\n<<refreshStatusDisplay>>\n\n<br><br><<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\tplanets_visited: visited("Move on")+1,\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\tscore_extra_colonists: 0,\n\tsummary: "" } >>\n\n/% Extra colonists from Stowaways event %/\n<<set $hiscore.score_extra_colonists = $extra_colonists>>\n\n\n\n/% Reaction from planet-wide civilisation %/\n<<set _native_landing_bonus = 0>>\n<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t<<if $planet.native_tech_level >= 10>>\n\t\tA squadron of the natives' spacecraft intercepts the seedship as it approaches and guides it down, while natives on the ground prepare a landing area.\n\t\t<<set _native_landing_bonus = 50>>\n\t<<elseif $planet.native_tech_level == 9>>\n\t\tThe native civilisation hastily launches a spacecraft to guide the seedship down, while natives on the ground prepare a landing area.\n\t\t<<set _native_landing_bonus = 20>>\n\t<<elseif $planet.native_tech_level == 8>>\n\t\tThe native civilisation launches a crude spacecraft to monitor the seedship as it approaches, while natives on the ground prepare a landing area.\n\t\t<<set _native_landing_bonus = 10>>\n\t<</if>>\n<</if>>\n\n\n\n<<if $system_landing + _native_landing_bonus >= 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 + _native_landing_bonus >= 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 + _native_landing_bonus)>>\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
<<widget externalLink>>\n\t/% $args[0] should be link text %/\n\t/% $args[1] should be link URL %/\n\t<<if constants.mobileVersion>>\n\t\t/% On mobile, create a <<link>> macro that uses Javascript to open the system browser to the new URL %/\n\t\t<<link $args[0]>>\n\t\t\t<<script>>\n\t\t\t\tcordova.InAppBrowser.open(variables().args[1], "_system");\n\t\t\t<</script>>\n\t\t<</link>>\n\t<<else>>\n\t\t/% In the web version, just make a regular hyperlink %/\n\t\t<<print "<a href='" + $args[1] + "' target='_blank'>" + $args[0] + "</a>">>\n\t<</if>>\n<</widget>>\n
<<set _number = Math.ceil(random(2, $colonists/5))>>\n<<if visited() == 1>>\n\tThe seedship's small nuclear power plant has lasted far longer than the civilisation that created it, but now it is beginning to fail. While the ship is near a star the solar panels still provide as much power as the systems need, but in deep space, fluctuations in the power supply are causing worrying malfunctions throughout the ship.\n\t<br><br>\n\tBetween stars, the largest drain to the power supply comes from the sleep chambers. The seedship calculates that shutting off _number chambers would take enough strain off the power supply to allow the ship to continue running. Saving all the colonists would mean allowing the failing power system to damage other parts of the ship.\n<<else>>\n\tThe ancient nuclear power plant is failing once again. The AI can shut down _number sleep chambers to reduce its load, or keep them running and risk unpredictable system failures.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Shut off _number sleep chambers to preserve power">>\n\t<<replace "#result-area">>\n\t\t<<set $colonists -= _number>>\n\t\tThe AI selects _number sleep chambers at random and shuts off their power. There is no visible change as the humans inside transition from frozen sleep to frozen death, but the AI knows that they can now never be revived.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<<refreshStatusDisplay>>\n<</link>>\n<br>\n<<link "Save the colonists at any cost">>\n\t<<replace "#result-area">>\n\t\t<<randomSystemExcluding "destroyed" "sleep chambers" "surface probes">>\n\t\t<<set _system1 = $system>>\n\t\t<<randomSystemExcluding "destroyed" "sleep chambers" "surface probes" _system1>>\n\t\t<<set _system2 = $system>>\n\t\t<<randomSystemExcluding "destroyed" "sleep chambers" "surface probes" _system1 _system2>>\n\t\t<<set _system3 = $system>>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem _system1 $damage>>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem _system2 $damage>>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem _system3 $damage>>\n\t\tThe AI ignores the power system's warnings. Stars seem to jump in the sky as power fluctuations put the AI offline for millennia at a time. Eventually the power supply stabilises: the _system1, _system2 and _system3 have deteriorated to the point that they are no longer draining as much power, so the ancient power plant is sufficient once again.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<<refreshStatusDisplay>>\n<</link>>\n</div>\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<<elseif $planet.surface_features.includes("Alien observers")>>\n\t/% Aliens may keep humans limited to a particular tech level, or help them achieve one: %/\n\t/% No interference %/\n\t/% Limit to Medieval (selectively destroy any advancements) %/\n\t/% Limit to Atomic age (shoot down any space launches, preventing communications satellites) %/\n\t/% Technological assistance: +30 %/\n\n\t<<switch random(0,2)>>\n\t\t<<case 0>>\n\t\t\tThe mysterious alien structures are visible as a glittering band across the night sky, but the aliens do not attempt to interfere with the colony's technological development.\n\t\t<<case 1>>\n\t\t\tEnigmatic objects periodically descend from the alien structures in orbit, and colonists living close to these objects occasionally find themselves inspired to make technological breakthroughs.\n\t\t\t<<set _technology_score += 30>>\n\t\t<<case 2>>\n\t\t\tEnigmatic objects periodically descend from the alien structures in orbit. They tend to appear near communities where colonists are close to making a technological breakthrough, and those colonists who would have made the breakthroughs fall mysteriously ill.\n\t\t\t<<set _technology_score -= 30>>\n\t<</switch>>\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<<if $planet.surface_features.includes("Simulation")>>\n\t<br><br>\n\t<<if $hiscore.final_tech_level == 10>>\n\t\tThe colonists' advanced technology eventually leads them to discover the true nature of their universe, a simulation in a super-advanced alien computer. They achieve fleeting contact with the aliens, who for millions of years have existed only as beings of pure computer data. Most of the aliens' culture is incomprehensible to humans, but what little they understand enriches their culture considerably.\n\t\t<<set $system_cultural_database += random(20,30)>>\n\t<<else>>\n\t\tThe colonists never become aware that their universe is a simulation in a super-advanced alien computer.\n\t<</if>>\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 chambers, 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" as the text. */\n\t<span id="spaceAct"><<link "Continue">><<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\t<<if $args[0] == 1>>\n\t\t\ta construction accident kills 1 colonist.\n\t\t<<else>>\n\t\t\tconstruction accidents kill $args[0] colonists.\n\t\t<</if>>\n\t<<elseif $planet_gravity == "Low " | $planet.gravity == "Very low">>\n\t\t<<if $args[0] == 1>>\n\t\t\t1 colonist dies of gravity-related health problems.\n\t\t<<else>>\n\t\t\t$args[0] colonists die of gravity-related health problems.\n\t\t<</if>>\n\t<<else>>\n\t\t<<if $args[0] == 1>>\n\t\t\t1 colonist is killed when partially-completed buildings collapse.\n\t\t<<else>>\n\t\t\t$args[0] colonists are killed when partially-completed buildings collapse.\n\t\t<</if>>\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 chambers, 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 chambers, there is nothing the seedship AI can do when sleep chambers begin to vanish from its monitoring system. The tentacles withdraw, carrying $deaths sleep chambers, supplying power to the chambers 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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\tplanets_visited: visited("Move on")+1,\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
window.updateHiscoreFormat = function(hiscores) {\n\t\t/* First cap the number of hiscores */\n\tif (hiscores.length > constants.max_hiscores) {\n\t\thiscores = hiscores.slice(0, constants.max_hiscores);\n\t}\n\t\t/* Then convert each one to its encoded version */\n\tfor (var n = 0; n < hiscores.length; n++)\n\t{\n\t\thiscores[n] = encodeHiscore(hiscores[n]);\n\t}\n\n\t\t/* Return the new array */\n\treturn hiscores;\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>>
<<if $planet.surface_features.length == 0>>\s\n\t<<replace "#anomalies_text">>None<</replace>>\s\n<</if>>\s\nThe surface probe's mission is complete and it shuts down.\n\n<<nobr>>\n\t<<link "Continue">>\n\t\t<<replace "#post-planet-stats">>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<display [[Orbit planet menu]] t8n>>\n\t\t<</replace>>\n\t<</link>>\n<</nobr>>
<<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\t<<if $args[0] == 1>>\n\t\t\tcrop failures kill 1 colonist.\n\t\t<<else>>\n\t\t\tcrop failures kill $args[0] colonists.\n\t\t<</if>>\n\t<<else>>\n\t\t<<if $args[0] == 1>>\n\t\t\twater shortages kill 1 colonist.\n\t\t<<else>>\n\t\t\twater shortages kill $args[0] colonists.\n\t\t<</if>>\n\t<</if>>\n<</if>>\n\n<</widget>>
window.getHiscoreShareText = function(hiscore) {\n\tvar planet = hiscore.planet;\n\n\tif ( !planet) {\n\t\treturn "Destroyed in space.";\n\t} else if ( hiscore.score_landing <= 0) {\n\t\treturn "Crash!";\n\t} else if ( hiscore.score_construction <= 0) {\n\t\treturn "Construction failure on planet " + planet.name + ".";\n\t} else if ( hiscore.final_tech_level == -1) {\n\t\treturn "Long-term technological failure on planet " + planet.name + ".";\n\t} else if ( hiscore.native_relations == 2) {\n\t\treturn "Enslaved by the natives of planet " + planet.name + ".";\n\t} else if ( hiscore.native_relations == 0) {\n\t\treturn "Wiped out by the natives of planet " + planet.name + ".";\n\t} else {\n\t\tswitch ( constants.culture_names[hiscore.final_culture])\n\t\t{\n\t\t\tcase "Cosmic Enlightenment":\n\t\t\t\treturn "Cosmically enlightened " + constants.tech_level_names[hiscore.final_tech_level] + " civilisation on planet " + planet.name + "."; break;\n\n\t\t\tcase "Post-Scarcity Utopia":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " post-scarcity utopia on planet " + planet.name + "."; break;\n\t\t\tcase "Engaged Democracy":\n\t\t\t\treturn "Engaged " + constants.tech_level_names[hiscore.final_tech_level] + " democracy on planet " + planet.name + "."; break;\n\t\t\tcase "Corrupt Democracy":\n\t\t\t\treturn "Corrupt " + constants.tech_level_names[hiscore.final_tech_level] + " democracy on planet " + planet.name + "."; break;; break;\n\t\t\tcase "Rule by Corporations":\n\t\t\t\treturn "Ruled by " + constants.tech_level_names[hiscore.final_tech_level] + " corporations on planet " + planet.name + "."; break;\n\t\t\tcase "Dystopian Police State":\n\t\t\t\treturn "Dystopian " + constants.tech_level_names[hiscore.final_tech_level] + " police state on planet " + planet.name + "."; break;\n\t\t\tcase "Warring Superpowers":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " superpowers on planet " + planet.name + "."; break;\n\t\t\tcase "Post-Nuclear Wasteland":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " civilisation destroyed by nuclear war on planet " + planet.name + "."; break;\n\n\t\t\tcase "Egalitarian Republic":\n\t\t\t\treturn "Egalitarian " + constants.tech_level_names[hiscore.final_tech_level] + " republic on planet " + planet.name + "."; break;\n\t\t\tcase "Benevolent Monarchy":\n\t\t\t\treturn "Benevolent " + constants.tech_level_names[hiscore.final_tech_level] + " monarchy on planet " + planet.name + "."; break;\n\t\t\tcase "Oppressive Theocracy":\n\t\t\t\treturn "Oppressive " + constants.tech_level_names[hiscore.final_tech_level] + " theocracy on planet " + planet.name + "."; break;\n\t\t\tcase "Slave-Based Empire":\n\t\t\t\treturn "Slave-based " + constants.tech_level_names[hiscore.final_tech_level] + " empire on planet " + planet.name + "."; break;\n\t\t\tcase "Warring States":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " states on planet " + planet.name + "."; break;\n\n\t\t\tcase "Collective Rule":\n\t\t\t\treturn "Communal " + constants.tech_level_names[hiscore.final_tech_level] + " tribes on planet " + planet.name + "."; break;\n\t\t\tcase "Benevolent Chieftains":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " tribes ruled by benevolent chieftains on planet " + planet.name + "."; break;\n\t\t\tcase "Brutal Chieftains":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " tribes ruled by brutal chieftains on planet " + planet.name + "."; break;\n\t\t\tcase "Warring Tribes":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " tribes on planet " + planet.name + "."; break;\n\t\t\tcase "Savagery":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst + " savagery on planet " + planet.name + "."; break;\n\t\t\tdefault:\n\t\t\t\treturn "ERROR: Unexpected values culture:" + hiscore.final_culture + ", tech: " + hiscore.final_tech_level;\n\t\t}\n\t}\n\n}\n
The navigation system wakes the AI to report that it has detected an apparently perfect planet in a system close to the seedship's current course. The readings from that system do not match the ones the seedship took before it started the current leg of its journey: it is as if the planet has appeared while the seedship was en route.\n<br><br>\n<div id="result-area">\n<<link "Change course to the new planet">>\n\t/% Each attribute has a 2/3 chance to be green and a 1/3 chance to be yellow, same applies to plants %/\n\t<<set $event_planet = {}>>\n\t<<set $event_planet.atmosphere = either("Breathable", "Breathable", "Marginal")>>\n\t<<set $event_planet.gravity = either("Moderate", "Moderate", "Moderate", "Moderate", "Low", "High")>>\n\t<<set $event_planet.temperature = either("Moderate", "Moderate", "Moderate", "Moderate", "Cold", "Hot")>>\n\t<<set $event_planet.water = either("Oceans", "Oceans", "Planet-wide ocean")>>\n\t<<set $event_planet.resources = either("Rich", "Rich", "Poor")>>\n\t<<set $event_planet.anomalies = ["Alien observers", "Vegetation"]>>\n\t<<set $event_planet.surface_features = ["Alien observers"]>>\n\t<<set $event_planet.surface_features.push(either("Edible plants", "Edible plants", "Plant life"))>>\n\t<<replace "#result-area">>\n\t\tThe seedship decelerates into the new system. The new planet is real, but it and its parent star are both orbited by strings of regular, metallic structures, clearly artificial but defying analysis by the seedship's sensors. The planet itself appears to be habitable for humans, but it also looks as if it has recently undergone sudden atmospheric and geological changes--as if the alien structures have terraformed it for human habtiation.\n\t\t<br><br>\n\t\t<div id="result-area2">\n\t\t<<link "Transmit an inter-species greeting">>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\tThere is no response, but some of the objectes orbiting the planet change orbits in order to give the seedship a clearer approach. It is difficult to see this as anything but an invitation.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t\t<<scrollToResultArea>>\n\t\t<</link>>\n\t\t<br>\n\t\t[[Just approach the planet|MO Done]]\n\t\t</div>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n[[Stay on course|MO Done]]\n</div>
DEBUG: Create a custom planet:\n\nAtmosphere:\n<<radiobutton "$planet.atmosphere" "Corrosive">> Corrosive\n<<radiobutton "$planet.atmosphere" "Toxic">> Toxic\n<<radiobutton "$planet.atmosphere" "None">> None\n<<radiobutton "$planet.atmosphere" "Non-breathable">> Non-breathable\n<<radiobutton "$planet.atmosphere" "Marginal">> Marginal\n<<radiobutton "$planet.atmosphere" "Breathable">> Breathable\n\nTemperature:\n<<radiobutton "$planet.temperature" "Very hot">> Very hot\n<<radiobutton "$planet.temperature" "Hot">> Hot\n<<radiobutton "$planet.temperature" "Moderate">> Moderate\n<<radiobutton "$planet.temperature" "Cold">> Cold\n<<radiobutton "$planet.temperature" "Very cold">> Very cold\n\nGravity:\n<<radiobutton "$planet.gravity" "Very high">> Very high\n<<radiobutton "$planet.gravity" "High">> High\n<<radiobutton "$planet.gravity" "Moderate">> Moderate\n<<radiobutton "$planet.gravity" "Low">> Low\n<<radiobutton "$planet.gravity" "Very low">> Very low\n\nWater:\n<<radiobutton "$planet.water" "None">> None\n<<radiobutton "$planet.water" "Trace">> Trace\n<<radiobutton "$planet.water" "Ice caps">> Ice caps\n<<radiobutton "$planet.water" "Ice-covered surface">> Ice-covered surface\n<<radiobutton "$planet.water" "Oceans">> Oceans\n<<radiobutton "$planet.water" "Planet-wide ocean">> Planet-wide ocean\n\nResources:\n<<radiobutton "$planet.resources" "None">> None\n<<radiobutton "$planet.resources" "Poor">> Poor\n<<radiobutton "$planet.resources" "Rich">> Rich\n\nSurface features:\n<<checkbox "_barren_moon" false true>> Barren moon\n<<checkbox "_metal_moon" false true>> Metal-rich moon\n<<checkbox "_unstable_moon" false true>> Unstable moon\n<<checkbox "_beauty" false true>> Outstanding beauty\n<<checkbox "_ugliness" false true>> Outstanding ugliness\n<<checkbox "_airtight_caves" false true>> Airtight caves\n<<checkbox "_insulated_caves" false true>> Insulated caves\n<<checkbox "_unstable_geology" false true>> Unstable geology\n<<checkbox "_plants" false true>> Plant life\n<<checkbox "_edible_plants" false true>> Edible plants\n<<checkbox "_poisonous_plants" false true>> Poisonous plants\n<<checkbox "_animals" false true>> Animal life\n<<checkbox "_useful_animals" false true>> Useful animals\n<<checkbox "_dangerous_animals" false true>> Dangerous animals\n<<checkbox "_monumental_ruins" false true>> Monumental ruins\n<<checkbox "_high_tech_ruins" false true>> High-tech ruins\n<<checkbox "_dangerous_ruins" false true>> Dangerous ruins\n<<checkbox "_false_ruins" false true>> Regular geological formations\n<<checkbox "_intelligent_life" false true>> Intelligent life\n<<checkbox "_planet_spanning_civilisation" false true>> Planet-spanning civilisation\n\nNative tech level (if natives present):\n<<radiobutton "$planet.native_tech_level" 0>> <<= constants.tech_level_names[0]>>\n<<radiobutton "$planet.native_tech_level" 1>> <<= constants.tech_level_names[1]>>\n<<radiobutton "$planet.native_tech_level" 2>> <<= constants.tech_level_names[2]>>\n<<radiobutton "$planet.native_tech_level" 3>> <<= constants.tech_level_names[3]>>\n<<radiobutton "$planet.native_tech_level" 4>> <<= constants.tech_level_names[4]>>\n<<radiobutton "$planet.native_tech_level" 5>> <<= constants.tech_level_names[5]>>\n<<radiobutton "$planet.native_tech_level" 6>> <<= constants.tech_level_names[6]>>\n<<radiobutton "$planet.native_tech_level" 7>> <<= constants.tech_level_names[7]>>\n<<radiobutton "$planet.native_tech_level" 8>> <<= constants.tech_level_names[8]>>\n<<radiobutton "$planet.native_tech_level" 9>> <<= constants.tech_level_names[9]>>\n<<radiobutton "$planet.native_tech_level" 10>> <<= constants.tech_level_names[10]>>\n\nNative culture (if natives present):\n<<radiobutton "$planet.native_culture" 0>> <<= constants.culture_names[0]>>\n<<radiobutton "$planet.native_culture" 1>> <<= constants.culture_names[1]>>\n<<radiobutton "$planet.native_culture" 2>> <<= constants.culture_names[2]>>\n<<radiobutton "$planet.native_culture" 3>> <<= constants.culture_names[3]>>\n<<radiobutton "$planet.native_culture" 4>> <<= constants.culture_names[4]>>\n\n<<radiobutton "$planet.native_culture" 5>> <<= constants.culture_names[5]>>\n<<radiobutton "$planet.native_culture" 6>> <<= constants.culture_names[6]>>\n<<radiobutton "$planet.native_culture" 7>> <<= constants.culture_names[7]>>\n<<radiobutton "$planet.native_culture" 8>> <<= constants.culture_names[8]>>\n<<radiobutton "$planet.native_culture" 9>> <<= constants.culture_names[9]>>\n\n<<radiobutton "$planet.native_culture" 10>> <<= constants.culture_names[10]>>\n<<radiobutton "$planet.native_culture" 11>> <<= constants.culture_names[11]>>\n<<radiobutton "$planet.native_culture" 12>> <<= constants.culture_names[12]>>\n<<radiobutton "$planet.native_culture" 13>> <<= constants.culture_names[13]>>\n<<radiobutton "$planet.native_culture" 14>> <<= constants.culture_names[14]>>\n<<radiobutton "$planet.native_culture" 15>> <<= constants.culture_names[15]>>\n<<radiobutton "$planet.native_culture" 16>> <<= constants.culture_names[16]>>\n<<radiobutton "$planet.native_culture" 17>> <<= constants.culture_names[17]>>\n\n<<link "Done" "Orbit planet">>\n\t<<set $planet.surface_features = []>>\n\t<<set $planet.anomalies = []>>\n\t<<if _barren_moon>>\n\t\t<<set $planet.surface_features.push("Barren moon")>>\n\t\t<<if !$planet.anomalies.includes("Moon")>>\n\t\t\t<<set $planet.anomalies.push("Moon")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _metal_moon>>\n\t\t<<set $planet.surface_features.push("Metal-rich moon")>>\n\t\t<<if !$planet.anomalies.includes("Moon")>>\n\t\t\t<<set $planet.anomalies.push("Moon")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _unstable_moon>>\n\t\t<<set $planet.surface_features.push("Unstable moon")>>\n\t\t<<if !$planet.anomalies.includes("Moon")>>\n\t\t\t<<set $planet.anomalies.push("Moon")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _beauty>>\n\t\t<<set $planet.surface_features.push("Outstanding beauty")>>\n\t<</if>>\n\t<<if _ugliness>>\n\t\t<<set $planet.surface_features.push("Outstanding ugliness")>>\n\t<</if>>\n\t<<if _airtight_caves>>\n\t\t<<set $planet.surface_features.push("Airtight caves")>>\n\t\t<<if !$planet.anomalies.includes("Geological anomalies")>>\n\t\t\t<<set $planet.anomalies.push("Geological anomalies")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _insulated_caves>>\n\t\t<<set $planet.surface_features.push("Insulated caves")>>\n\t\t<<if !$planet.anomalies.includes("Geological anomalies")>>\n\t\t\t<<set $planet.anomalies.push("Geological anomalies")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _unstable_geology>>\n\t\t<<set $planet.surface_features.push("Unstable geology")>>\n\t\t<<if !$planet.anomalies.includes("Geological anomalies")>>\n\t\t\t<<set $planet.anomalies.push("Geological anomalies")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _plants>>\n\t\t<<set $planet.surface_features.push("Plant life")>>\n\t\t<<if !$planet.anomalies.includes("Vegetation")>>\n\t\t\t<<set $planet.anomalies.push("Vegetation")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _edible_plants>>\n\t\t<<set $planet.surface_features.push("Edible plants")>>\n\t\t<<if !$planet.anomalies.includes("Vegetation")>>\n\t\t\t<<set $planet.anomalies.push("Vegetation")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _poisonous_plants>>\n\t\t<<set $planet.surface_features.push("Poisonous plants")>>\n\t\t<<if !$planet.anomalies.includes("Vegetation")>>\n\t\t\t<<set $planet.anomalies.push("Vegetation")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _animals>>\n\t\t<<set $planet.surface_features.push("Animal life")>>\n\t\t<<if !$planet.anomalies.includes("Animal life")>>\n\t\t\t<<set $planet.anomalies.push("Animal life")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _useful_animals>>\n\t\t<<set $planet.surface_features.push("Useful animals")>>\n\t\t<<if !$planet.anomalies.includes("Animal life")>>\n\t\t\t<<set $planet.anomalies.push("Animal life")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _dangerous_animals>>\n\t\t<<set $planet.surface_features.push("Dangerous animals")>>\n\t\t<<if !$planet.anomalies.includes("Animal life")>>\n\t\t\t<<set $planet.anomalies.push("Animal life")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _intelligent_life>>\n\t\t<<set $planet.surface_features.push("Intelligent life")>>\n\t\t<<if $planet.native_tech_level >= 3>>\n\t\t\t\t/* Neolithic or higher */\n\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t\t<<if $planet.native_tech_level >= 8>>\n\t\t\t\t/* Atomic or higher */\n\t\t\t<<set $planet.anomalies.push("Electromagnetic activity")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _planet_spanning_civilisation>>\n\t\t<<set $planet.surface_features.push("Planet-spanning civilisation")>>\n\t<</if>>\n\t<<if _monumental_ruins>>\n\t\t<<set $planet.surface_features.push("Monumental ruins")>>\n\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _high_tech_ruins>>\n\t\t<<set $planet.surface_features.push("High-tech ruins")>>\n\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _dangerous_ruins>>\n\t\t<<set $planet.surface_features.push("Dangerous ruins")>>\n\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t<</if>>\n\t<<if _false_ruins>>\n\t\t<<set $planet.surface_features.push("Regular geological formations")>>\n\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t<</if>>\n<</link>>\n\n\n\n\n\n\n\n\n\n\n
window.sortHiscores = function (hiscores) {\n\t/* Takes an unsorted array of encoded hiscore strings, returns it sorted by total score */\n\t/* The way this will be called, the array is probably mostly sorted already */\n\t\n\t/* Get array containing pair objects with both encoded and final scores */\n\thiscores = hiscores.filter(sortHiscoresIsValidScore);\n\tvar hiscorePairs = hiscores.map(sortHiscoresGetPair);\n\t/* Sort this according to final score */\n\thiscorePairs.sort(sortHiscoresComparePair);\n\t/* Get new array consiting of just the encoded scores again */\n\tvar sortedScores = hiscorePairs.map(sortHiscoresGetEncodedFromPair);\n\treturn sortedScores;\n}\n\n\nwindow.sortHiscoresGetPair = function (hiscore) {\n\treturn { encoded: hiscore, total: decodeHiscore(hiscore).final_score };\n}\n\nwindow.sortHiscoresComparePair = function(hiscore1, hiscore2) {\n\treturn hiscore2.total - hiscore1.total;\n}\n\nwindow.sortHiscoresGetEncodedFromPair = function(hiscorePair) {\n\treturn hiscorePair.encoded;\n}\n\nwindow.sortHiscoresIsValidScore = function(hiscore) {\n\treturn typeof hiscore == "string";\n}\n\n\n\nwindow.getHiscoreTotalScore = function (hiscore) {\n\tvar decoded = decodeHiscore(hiscore);\n\treturn decoded.final_score;\n}\n\n
The seedship is decelerating towards the new system when the navigation system alerts the AI to a radiation burst in the seedship's path. The AI focuses the scanners in time to see a explosion blossoming in its destination system, exactly where its target planet should be.\n\n<br><br>\n\nThe seedship is too close to the system to avoid it entirely, so it must decide whether to continue its planned deceleration and arrive at whatever is left of the planet, or cease decelerating and pass through the system at high speed.\n\n<br><br>\n\n<div id="result-area">\n<<link "Continue decelerating">>\n\t<<replace "#result-area">>\n\t\t<<include [[MO Ruined Planet Stop]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Pass through the system at speed">>\n\t<<set $off_course = true>>\n\t<<replace "#result-area">>\n\t\tThe seedship stops decelerating and shoots through the system like a bullet. The scanner image of the former planet resolves into a fresh asteroid belt, its larger bodies still glowing red as the core heat of the planet bleeds into space. The seedship is traveling too fast to manoeuvre through the asteroids, \n\t\t<<if random(0,3) == 0>>\n\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\tand one of them\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMany>>\n\t\t\t\tsmashes into the colony module, instantly killing $deaths colonists.\n\t\t\t<<elseif $system == "surface probes">>\n\t\t\t\t<<set $surface_probes = Math.max(0, $surface_probes-random(2,4))>>\n\t\t\t\tsmashes through the surface probes.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tsmashes through the $system.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tbut it is lucky enough that none of the new asteroids are directly in its path.\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<refreshStatusDisplay>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n\n</div>
window.getHiscoreSummary = function(hiscore) {\n\tvar planet = hiscore.planet;\n\n\tif ( !planet) {\n\t\treturn "Destroyed in space";\n\t} else if ( hiscore.score_landing <= 0) {\n\t\treturn "Crash";\n\t} else if ( hiscore.score_construction <= 0) {\n\t\treturn "Construction Failure";\n\t} else if ( hiscore.final_tech_level == -1) {\n\t\treturn "Long-term Technological Failure";\n\t} else if ( hiscore.native_relations == 2) {\n\t\treturn "Enslaved by Natives";\n\t} else if ( hiscore.native_relations == 0) {\n\t\treturn "Killed by Natives";\n\t} else {\n\t\tswitch ( constants.culture_names[hiscore.final_culture])\n\t\t{\n\t\t\tcase "Cosmic Enlightenment":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Cosmic Enlightenment"; break;\n\n\t\t\tcase "Post-Scarcity Utopia":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Post-Scarcity Utopia"; break;\n\t\t\tcase "Engaged Democracy":\n\t\t\t\treturn "Engaged " + constants.tech_level_names[hiscore.final_tech_level] + " Democracy"; break;\n\t\t\tcase "Corrupt Democracy":\n\t\t\t\treturn "Corrupt " + constants.tech_level_names[hiscore.final_tech_level] + " Democracy"; break;\n\t\t\tcase "Rule by Corporations":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Corporate Rule"; break;\n\t\t\tcase "Dystopian Police State":\n\t\t\t\treturn "Dystopian " + constants.tech_level_names[hiscore.final_tech_level] + " Police State"; break;\n\t\t\tcase "Warring Superpowers":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " Superpowers"; break;\n\t\t\tcase "Post-Nuclear Wasteland":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Post-Nuclear Wasteland"; break;\n\n\t\t\tcase "Egalitarian Republic":\n\t\t\t\treturn "Egalitarian " + constants.tech_level_names[hiscore.final_tech_level] + " Republic"; break;\n\t\t\tcase "Benevolent Monarchy":\n\t\t\t\treturn "Benevolent " + constants.tech_level_names[hiscore.final_tech_level] + " Monarchy"; break;\n\t\t\tcase "Oppressive Theocracy":\n\t\t\t\treturn "Oppressive " + constants.tech_level_names[hiscore.final_tech_level] + " Theocracy"; break;\n\t\t\tcase "Slave-Based Empire":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Slave Empire"; break;\n\t\t\tcase "Warring States":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " States"; break;\n\n\t\t\tcase "Collective Rule":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Collective Rule"; break;\n\t\t\tcase "Benevolent Chieftains":\n\t\t\t\treturn "Benevolent " + constants.tech_level_names[hiscore.final_tech_level] + " Chieftains"; break;\n\t\t\tcase "Brutal Chieftains":\n\t\t\t\treturn "Brutal " + constants.tech_level_names[hiscore.final_tech_level] + " Chieftains"; break;\n\t\t\tcase "Warring Tribes":\n\t\t\t\treturn "Warring " + constants.tech_level_names[hiscore.final_tech_level] + " Tribes"; break;\n\t\t\tcase "Savagery":\n\t\t\t\treturn constants.tech_level_names[hiscore.final_tech_level].toUpperFirst() + " Savagery"; break;\n\t\t\tdefault:\n\t\t\t\treturn "ERROR: Unexpected values culture:" + hiscore.final_culture + ", tech: " + hiscore.final_tech_level;\n\t\t}\n\t}\n\n}\n
As the seedship approaches the next planet its scanners detect unmistakable signs of a spacefaring civilisation. Several planets, moon, and asteroids are marked with colonies or industrial sites, and the target planet itself is covered in teeming cities.\n\n<br><br>\n\nA spacecraft launches from the planet on a chemical rocket flame and begins burning into an orbit that will match the seedship's course. It beams a radio signal at the seedship which sounds like it contains language, but the AI cannot make sense of it.\n\n<br><br>\n\n<div id="result-area">\n<<link "Reply with an interspecies greeting and allow the craft to match course">>\n\t<<replace "#result-area">>\n\t\t<<set $crewedship_transmitted_greeting = true>>\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 in response to the approaching craft's radio signal, and the two ships begin a slow back-and-forth process of attempting to establish communication. Meanwhile, the alien ship comes alongside.\n\t\t<br><br>\n\t\t<<include [[MO Crewed Ship Dock]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Change course to avoid the system">>\n\t<<replace "#result-area">>\n\t\t<<set $off_course = true>>\n\t\tThe seedship accelerates onto a course that will take it back out of the aliens' star system without coming close to any of their planets or outposts.\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<randomSystemExcluding "sleep chambers" "surface probes" "destroyed">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<set $crewedship_harpoon_system = $system>>\n\t\t\tThe alien craft immediately burns its engine to match the seedship's new course. It probably does not have the range of the seedship, but over short distances it has much greater acceleration. When it has closed to within a few kilometres it fires something like a harpoon that pierces the $system and sprouts barbs to lock itself in place. The seedship AI shuts off its engines to avoid further damage, and the alien ship winches itself closer.\n\t\t\t<br><br>\n\t\t\t<<include [[MO Crewed Ship Dock]]>>\n\t\t<<else>>\n\t\t\tThe craft continues beaming its message towards the seedship for a few hours, then goes silent and burns into an orbit that will take it back home.\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</if>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n</div>
<<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\n\t\t\t\t<<switch $planet.native_culture>>\n\t\t\t\t\t<<case 0>>\n\t\t\t\t\t\tThe natives live in a state of constant violence, with no social organisation.\n\t\t\t\t\t<<case 1>>\n\t\t\t\t\t\tThe natives are divided into countless small tribes that are in a constant state of war with one another.\n\t\t\t\t\t<<case 2>>\n\t\t\t\t\t\tThe natives are divided into countless small tribes, most of which live in fear of their ruthless chieftains.\n\t\t\t\t\t<<case 3>>\n\t\t\t\t\t\tThe natives are divided into countless small tribes, most of which are ruled wisely by benevolent chieftains.\n\t\t\t\t\t<<case 4>>\n\t\t\t\t\t\tThe natives are divided into countless small tribes, most of which are ruled collectively by its members and live in peace with one another.\n\t\t\t\t\t<<case 5>>\n\t\t\t\t\t\tMost of the natives live in small nations, which devote much of their resources to fighting wars with one another.\n\t\t\t\t\t<<case 6>>\n\t\t\t\t\t\tMost of the population live as slaves under the rule of despotic emperors.\n\t\t\t\t\t<<case 7>>\n\t\t\t\t\t\tThe most powerful nations are ruled by priest-kings who strictly control the flow of knowledge, leaving the general population ignorant and illiterate.\n\t\t\t\t\t<<case 8>>\n\t\t\t\t\t\tThe most advanced nations are ruled by benevolent monarchs who regard it as their duty to see to the needs of their subjects.\n\t\t\t\t\t<<case 9>>\n\t\t\t\t\t\tThe most advanced nations are republics, where decisions are made by assemblies of citizens.\n\t\t\t\t\t<<case 10>>\n\t\t\t\t\t\tThe civilisation has recently undergone a nuclear war, and the natives eke out a living in the ruins of their once-great cities.\n\t\t\t\t\t<<case 11>>\n\t\t\t\t\t\tMost of the planet is diveded between several superpowers which exist in a state of constant tension.\n\t\t\t\t\t<<case 12>>\n\t\t\t\t\t\tThe most advanced nations are dictatorships, which make extensive use of policing and technological surveillance to keep their populations in line.\n\t\t\t\t\t<<case 13>>\n\t\t\t\t\t\tThe planet is dominated by a host of multinational corporations which have supplanted the role of governments.\n\t\t\t\t\t<<case 14>>\n\t\t\t\t\t\tThe planet's most powerful nations are nominally democratic, but the leaders are corrupt and do little to improve the lot of the general population.\n\t\t\t\t\t<<case 15>>\n\t\t\t\t\t\tThe planet's most powerful nations are well-functioning democracies, and the population generally enjoys a high quality of life.\n\t\t\t\t\t<<case 16>>\n\t\t\t\t\t\tThe population enjoys lives of culture and leisure, with automated machines taking care of their material needs.\n\t\t\t\t\t<<case 17>>\n\t\t\t\t\t\tThe probe has difficulty making sense of the natives' culture, which appears to use political and philosophical principles never seen on Earth.\n\t\t\t\t\t<<default>>\n\t\t\t\t\t\t@@.error;Unexpected native culture $planet.culture@@\n\t\t\t\t<</switch>>\n\n\n\t\t\t<<case "Planet-spanning civilisation">>\n\t\t\t\tThe probe conducts high-altitude surveys, and finds settlements and signs of intelligent activity everywhere it looks. It seems that there is no part of the planet untouched by the native civilisation.\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\t/% Special features from events %/\n\t\t\t<<case "Welcoming">>\n\t\t\t\tThe natives of this planet have already extended an offer of asylum to the human refugees, and will be welcoming to them if the seedship lands.\n\t\t\t<<case "Unwelcoming">>\n\t\t\t\tThe natives of this planet are aware of the seedship's mission, and have made it clear that human refugees would not be welcome on their planet.\n\t\t\t<<case "Simulation">>\n\t\t\t\tThis planet is a perfect simulation created by fantastically advanced aliens based on data in the seedship's scientific and cultural databases.\n\t\t\t<<case "Alien observers">>\n\t\t\t\tThis planet has recently been terraformed by advanced aliens to be suitable for human life, and many alien structures sit in orbit above the surface.\n\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\t<<scrollToPostPlanetStats>>\n\t<</nobr>>\n\n\t<<link "Continue">><<replaceAndFadeIn "#post-planet-stats" [[SP Feature]]>><</link>>\n<</if>>\s
<<set $surface_probe_used = false>>\n<<set $scanner_atmosphere_success = random(0,99) < $scanner_atmosphere>>\n<<set $scanner_gravity_success = random(0,99) < $scanner_gravity>>\n<<set $scanner_temperature_success = random(0,99) < $scanner_temperature>>\n<<set $scanner_resources_success = random(0,99) < $scanner_resources>>\n<<set $scanner_water_success = random(0,99) < $scanner_water>>\n\n<<set $planet = {\n\ttemperature: "",\n\tgravity: "",\n\tresources: "",\n\tatmosphere: "",\n\twater: "",\n\tsurface_features: [],\n\tanomalies: [],\n\tnative_tech_level: 0,\n\tnative_culture: 0\n\t\t} >>\n\n<<set _green_chance = 2>>\n<<set _yellow_chance = 3>>\n<<set _red_chance = 5>>\n\n\t/% ATMOSPHERE %/\n<<if $event_planet.atmosphere>>\n\t<<set $planet.atmosphere = $event_planet.atmosphere>>\n<<else>>\n\t<<if visited() == 1>>\n\t\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif !$scanner_atmosphere_success | $scanner_atmosphere_level == 0 | $off_course>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif $scanner_atmosphere_level == 1>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n\t<<elseif $scanner_atmosphere_level == 2>>\n\t\t<<set _r = 0>>\n\t<<else>>\n\t\t@@.error;Scanner atmosphere level was $scanner_atmosphere_level.@@\n\t<</if>>\n\n\t@@.debug-text;r=_r@@\n\n\t<<if _r < _green_chance>>\n\t\t<<set $planet.atmosphere = "Breathable">>\n\t<<elseif _r < _green_chance + _yellow_chance>>\n\t\t<<set $planet.atmosphere = "Marginal">>\n\t<<else>>\n\t\t<<set $planet.atmosphere = either("Corrosive", "Toxic", "Non-breathable", "None")>>\n\t<</if>>\n<</if>>\n\n\t/% GRAVITY %/\n<<if $event_planet.gravity>>\n\t<<set $planet.gravity = $event_planet.gravity>>\n<<else>>\n\t<<if visited() == 1>>\n\t\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif !$scanner_gravity_success | $scanner_gravity_level == 0 | $off_course>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif $scanner_gravity_level == 1>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n\t<<elseif $scanner_gravity_level == 2>>\n\t\t<<set _r = 0>>\n\t<<else>>\n\t\t@@.error;Scanner gravity level was $scanner_gravity_level.@@\n\t<</if>>\n\n\t<<if _r < _green_chance>>\n\t\t<<set $planet.gravity = "Moderate">>\n\t<<elseif _r < _green_chance + _yellow_chance>>\n\t\t<<set $planet.gravity = either("Low", "High")>>\n\t<<else>>\n\t\t<<set $planet.gravity = either("Very low", "Very high")>>\n\t<</if>>\n\n\t@@.debug-text;r=_r@@\n<</if>>\n\n\t/% TEMPERATURE %/\n<<if $event_planet.temperature>>\n\t<<set $planet.temperature = $event_planet.temperature>>\n<<else>>\n\t<<if visited() == 1>>\n\t\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif !$scanner_temperature_success | $scanner_temperature_level == 0 | $off_course>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif $scanner_temperature_level == 1>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n\t<<elseif $scanner_temperature_level == 2>>\n\t\t<<set _r = 0>>\n\t<<else>>\n\t\t@@.error;Scanner temperature level was $scanner_temperature_level.@@\n\t<</if>>\n\n\t<<if _r < _green_chance>>\n\t\t<<set $planet.temperature = "Moderate">>\n\t<<elseif _r < _green_chance + _yellow_chance>>\n\t\t<<set $planet.temperature = either("Cold", "Hot")>>\n\t<<else>>\n\t\t<<set $planet.temperature = either("Very cold", "Very hot")>>\n\t<</if>>\n\n\t@@.debug-text;r=_r@@\n<</if>>\n\n\t/% WATER %/\n<<if $event_planet.water>>\n\t<<set $planet.water = $event_planet.water>>\n<<else>>\n\t<<if visited() == 1>>\n\t\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif !$scanner_water_success | $scanner_water_level == 0 | $off_course>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif $scanner_water_level == 1>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n\t<<elseif $scanner_water_level == 2>>\n\t\t<<set _r = 0>>\n\t<<else>>\n\t\t@@.error;Scanner water level was $scanner_water_level.@@\n\t<</if>>\n\n\t<<if _r < _green_chance>>\n\t\t<<set $planet.water = "Oceans">>\n\t<<elseif _r < _green_chance + _yellow_chance>>\n\t\t<<set $planet.water = "Planet-wide ocean">>\n\t<<else>>\n\t\t<<set $planet.water = either("Trace", "None")>>\n\t<</if>>\n\n\t@@.debug-text;r=_r@@\n<</if>>\n\n\t/% RESOURCES %/\n<<if $event_planet.resources>>\n\t<<set $planet.resources = $event_planet.resources>>\n<<else>>\n\t<<if visited() == 1>>\n\t\t<<set _r = random(1,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif !$scanner_resources_success | $scanner_resources_level == 0 | $off_course>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n\t<<elseif $scanner_resources_level == 1>>\n\t\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n\t<<elseif $scanner_resources_level == 2>>\n\t\t<<set _r = 0>>\n\t<<else>>\n\t\t@@.error;Scanner resources level was $scanner_resources_level.@@\n\t<</if>>\n\n\t<<if _r < _green_chance>>\n\t\t<<set $planet.resources = "Rich">>\n\t<<elseif _r < _green_chance + _yellow_chance>>\n\t\t<<set $planet.resources = "Poor">>\n\t<<else>>\n\t\t<<set $planet.resources = "None">>\n\t<</if>>\n<</if>>\n\n/% Freeze the oceans at low temperatures %/\n<<if $planet.temperature == "Very cold"\n\t| ($planet.temperature == "Cold" & random(0,1) == 0) >>\n\t<<if $planet.water == "Oceans">>\n\t\t<<set $planet.water = "Ice caps">>\n\t<<elseif $planet.water == "Planet-wide ocean">>\n\t\t<<set $planet.water = "Ice-covered surface">>\n\t<</if>>\n<</if>>\n\n/% No liquid water without atmosphere %/\n<<if ($planet.water == "Oceans" | $planet.water == "Planet-wide ocean") & $planet.atmosphere == "None">>\n\t<<set $planet.atmosphere = "Non-breathable">>\n<</if>>\n\n\n/% SURFACE FEATURES %/\n<<set $planet.surface_features = []>>\n<<set $planet.anomalies = []>>\n\n<<if $event_planet.surface_features>>\n\t<<set $planet.surface_features = $event_planet.surface_features>>\n\t<<set $planet.anomalies = $event_planet.anomalies>>\n\t<<if $event_planet.native_tech_level>>\n\t\t<<set $planet.native_tech_level = $event_planet.native_tech_level>>\n\t<</if>>\n\t<<if $event_planet.native_culture>>\n\t\t<<set $planet.native_culture = $event_planet.native_culture>>\n\t<</if>>\n<<else>>\n\n\t/* Moon - affects technology result */\n\t/* Moon is first, because the surface probe investigates it before landing on the planet itself */\n\t/* The higher the planet's gravity, the more likely it is to have a moon */\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>\t\t<<set _moon_chance = 10>>\n\t\t<<case "Low">>\t\t\t<<set _moon_chance = 20>>\n\t\t<<case "Moderate">>\t\t<<set _moon_chance = 30>>\n\t\t<<case "High">>\t\t\t<<set _moon_chance = 40>>\n\t\t<<case "Very high">>\t<<set _moon_chance = 50>>\n\t<</switch>>\n\t<<if random(0,99) < _moon_chance>>\n\t\t<<set $planet.surface_features.push(either("Barren moon", "Metal-rich moon", "Unstable moon"))>>\n\t\t<<set $planet.anomalies.push("Moon")>>\n\t<</if>>\n\n\t/* Aesthetics - affect culture result */\n\t/* Flat 20% chance of one or the other */\n\t<<if random(0,4) == 0>>\n\t\t<<set $planet.surface_features.push(either("Outstanding beauty", "Outstanding ugliness"))>>\n\t<</if>>\n\n\n\t/* Caves? */\n\t/* No caves if surface is covered entirely in water or ice. Otherwise chance of caves is based on gravity. */\n\t<<if $planet.water != "Planet-wide ocean" & $planet.water != "Ice-covered surface">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>\t\t<<set _caves_chance = 50>>\n\t\t\t<<case "Low">>\t\t\t<<set _caves_chance = 40>>\n\t\t\t<<case "Moderate">>\t\t<<set _caves_chance = 30>>\n\t\t\t<<case "High">>\t\t\t<<set _caves_chance = 20>>\n\t\t\t<<case "Very high">>\t<<set _caves_chance = 10>>\n\t\t<</switch>>\n\t\t<<if random(0,99) < _caves_chance>>\n\t\t\t<<if random(0,2) == 0>>\n\t\t\t\t<<set $planet.surface_features.push("Airtight caves")>>\n\t\t\t<</if>>\n\t\t\t<<if random(0,2) == 0>>\n\t\t\t\t<<set $planet.surface_features.push("Insulated caves")>>\n\t\t\t<</if>>\n\t\t\t<<if !$planet.surface_features.includes("Airtight caves") & !$planet.surface_features.includes("Insulated caves")>>\n\t\t\t\t<<set $planet.surface_features.push("Unstable geology")>>\n\t\t\t<</if>>\n\t\t\t<<set $planet.anomalies.push("Geological anomalies")>>\n\t\t<</if>>\n\t<</if>>\n\n\t/* LIFE */\n\t/* Plant life? */\n\t<<if true>>\n\t\t<<switch $planet.atmosphere>>\n\t\t\t<<case "Breathable">>\t\t<<set _plants_chance = 100>>\n\t\t\t<<case "Marginal">>\t\t\t<<set _plants_chance = 100>>\n\t\t\t<<case "Non-breathable">>\t<<set _plants_chance = 25>>\n\t\t\t<<case "Toxic">>\t\t\t<<set _plants_chance = 25>>\n\t\t\t<<case "None">>\t\t\t\t<<set _plants_chance = 5>>\n\t\t\t<<case "Corrosive">>\t\t<<set _plants_chance = 5>>\n\t\t<</switch>>\n\t\t<<if random(0,99) < _plants_chance>>\n\t\t\t<<set $planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n\t\t\t<<set $planet.anomalies.push("Vegetation")>>\n\t\t<</if>>\n\t<</if>>\n\n\t/* If plants, possibly animals */\n\t<<if $planet.surface_features.includes("Plant life") | $planet.surface_features.includes("Edible plants") | $planet.surface_features.includes("Poisonous plants")>>\n\t\t<<set _animals_chance = 50>>\n\t\t<<if random(0,99) < _animals_chance>>\n\t\t\t<<set $planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n\t\t\t<<set $planet.anomalies.push("Animal life")>>\n\t\t<</if>>\n\t<</if>>\n\n\t/* If animals, possibly sentient life */\n\t<<if $planet.surface_features.includes("Animal life") | $planet.surface_features.includes("Useful animals") | $planet.surface_features.includes("Dangerous animals")>>\n\t\t<<set _sentients_chance = 50>>\n\t\t<<if random(0,99) < _sentients_chance>>\n\t\t\t<<set $planet.surface_features.push("Intelligent life")>>\n\t\t\t/* Max tech level is determined by resources */\n\t\t\t<<if $planet.resources == "Rich">>\n\t\t\t\t<<set $planet.native_tech_level = random(0,10)>>\n\t\t\t<<elseif $planet.resources == "Poor">>\n\t\t\t\t<<set $planet.native_tech_level = random(0,6)>>\n\t\t\t<<elseif $planet.resources == "None">>\n\t\t\t\t<<set $planet.native_tech_level = random(0,4)>>\n\t\t\t<<else>>\n\t\t\t\t@@.error;Unexpected resources value $planet.resources@@\n\t\t\t<</if>>\n\t\t\t<<if $planet.native_tech_level >= 3>>\n\t\t\t\t\t/* Neolithic or higher */\n\t\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t\t<</if>>\n\t\t\t<<if $planet.native_tech_level >= 8>>\n\t\t\t\t\t/* Atomic or higher */\n\t\t\t\t<<set $planet.anomalies.push("Electromagnetic activity")>>\n\t\t\t<</if>>\n\n\t\t\t/% Native culture %/\n\t\t\t<<if $planet.native_tech_level < 3>>\n\t\t\t\t<<set $planet.native_culture = random(0,4)>>\n\t\t\t<<elseif $planet.native_tech_level < 8>>\n\t\t\t\t<<set $planet.native_culture = random(5,9)>>\n\t\t\t<<else>>\n\t\t\t\t<<set $planet.native_culture = random(10,16)>>\n\t\t\t<</if>>\n\n\t\t\t/% If tech level is Neolithic or higher, possible planet-spanning civilisation %/\n\t\t\t<<if random(0,10) < $planet.native_tech_level - 2>>\n\t\t\t\t<<set $planet.surface_features.push("Planet-spanning civilisation")>>\n\t\t\t<</if>>\n\n\t\t<</if>>\n\t<</if>>\n\t/* Probability notes: */\n\t/* A breathable planet has a 100% chance of plant life, a 50% chance of animal life, and a 25% chance of sentient life */\n\t/* A breathable planet with rich resources has a 2.5% chance of a space-age civilisation */\n\n\n\t/* Ruins? */\n\t/* Ruins have a 10% chance to happen, unless there is a planet-spanning civilisation (in which case they've already integrated the ruins into their civilisation) */\n\t<<if !$planet.surface_features.includes("Planet-spanning civilisation")>>\n\t\t<<set _ruins_chance = 10>>\n\t\t<<if random(0,99) < _ruins_chance>>\n\t\t\t<<set $planet.surface_features.push("Monumental ruins")>>\n\t\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<<if random(0,99) < _ruins_chance>>\n\t\t\t<<set $planet.surface_features.push("High-tech ruins")>>\n\t\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<<if random(0,99) < _ruins_chance>>\n\t\t\t<<set $planet.surface_features.push("Dangerous ruins")>>\n\t\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<<if random(0,99) < _ruins_chance & !$planet.surface_features.includes("Monumental ruins") & !$planet.surface_features.includes("High-tech ruins") & !$planet.surface_features.includes("Dangerous ruins")>>\n\t\t\t<<set $planet.surface_features.push("Regular geological formations")>>\n\t\t\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t\t\t<</if>>\n\t\t<</if>>\n\t<</if>>\n<</if>>\n\n\n\n<<goto [[Orbit planet]]>>\n\n
\t/% Scroll to top of post-stats text area %/\n<<script>>\n\t$('html, body').animate({\n\t\tscrollTop: $('#post-planet-stats').offset().top\n\t});\n<</script>>\n\n/* Update planet stats in case the player renamed it but didn't click Done. */\n<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\n/* One Contruction system roll for each of Atmosphere, Temperature, Gravity, Water */\n\n/* DEATHS ALGORITHM */\n/* Base average deaths is 100-system (a value from 0 to 100) */\n\n/* Good related planet feature: subtract 50 (final value is -50-50) */\n/* Multiply and add based on attribute */\n/* Floor at zero */\n\n/* If non-zero, randomly adjust by +- 25% */\n\n<<set _good_feature_subtract = 50>>\n<<set _green_multiply = 0>>\t\t<<set _green_add = 0>>\n<<set _yellow_multiply = 1.25>>\t<<set _yellow_add = 0>>\n<<set _red_multiply = 3.75>>\t<<set _red_add = 125>>\n<<set _adjust_min = 0.75>>\n<<set _adjust_max = 1.25>>\n\n/* With undamaged construction system, each red attribute will kill about 125 colonists. An all-red planet will kill about half your colonists */\n/* With destroyed construction system, each red attribute will kill about 500 colonists and each yellow attribute about 125. An all-red planet will kill everyone and an all-yelow planet will kill half. */\n\n\n/% Native bonus %/\n<<set _native_bonus = 0>>\n<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t<<set _native_bonus = $planet.native_tech_level * 5>>\n<</if>>\n\n\n/* ATMOSPHERE DEATHS */\n<<set _atmosphere_deaths = 100-$system_constructors + _native_bonus>>\n<<if $planet.surface_features.includes("Airtight caves")>>\n\t<<set _atmosphere_deaths -= _good_feature_subtract>>\n<</if>>\n<<switch $planet.atmosphere>>\n\t<<case "Corrosive" "Toxic" "None" "Non-breathable">><<set _atmosphere_deaths = _atmosphere_deaths * _red_multiply + _red_add>>\n\t<<case "Marginal">><<set _atmosphere_deaths = _atmosphere_deaths * _yellow_multiply + _yellow_add>>\n\t<<case "Breathable">><<set _atmosphere_deaths = _atmosphere_deaths * _green_multiply + _green_add>>\n\t<<default>>@@.error;$planet.atmosphere@@\n<</switch>>\n<<if _atmosphere_deaths <= 0>>\n\t<<set _atmosphere_deaths = 0>>\n<<else>>\n\t<<set _atmosphere_deaths = Math.round(random(_atmosphere_deaths*_adjust_min, _atmosphere_deaths*_adjust_max))>>\n<</if>>\n\n/* TEMPERATURE DEATHS */\n<<set _temperature_deaths = 100-$system_constructors + _native_bonus>>\n<<if $planet.surface_features.includes("Insulated caves")>>\n\t<<set _temperature_deaths -= _good_feature_subtract>>\n<</if>>\n<<switch $planet.temperature>>\n\t<<case "Very hot" "Very cold">><<set _temperature_deaths = _temperature_deaths * _red_multiply + _red_add>>\n\t<<case "Cold" "Hot">><<set _temperature_deaths = _temperature_deaths * _yellow_multiply + _yellow_add>>\n\t<<case "Moderate">><<set _temperature_deaths = _temperature_deaths * _green_multiply + _green_add>>\n\t<<default>>@@.error;$planet.temperature@@\n<</switch>>\n<<if _temperature_deaths <= 0>>\n\t<<set _temperature_deaths = 0>>\n<<else>>\n\t<<set _temperature_deaths = Math.round(random(_temperature_deaths*_adjust_min, _temperature_deaths*_adjust_max))>>\n<</if>>\n\n/* GRAVITY DEATHS */\n<<set _gravity_deaths = 100-$system_constructors + _native_bonus>>\n<<if $planet.surface_features.includes("Useful animals")>>\n\t<<set _gravity_deaths -= _good_feature_subtract>>\n<</if>>\n<<switch $planet.gravity>>\n\t<<case "Very high" "Very low">><<set _gravity_deaths = _gravity_deaths * _red_multiply + _red_add>>\n\t<<case "Low" "High">><<set _gravity_deaths = _gravity_deaths * _yellow_multiply + _yellow_add>>\n\t<<case "Moderate">><<set _gravity_deaths = _gravity_deaths * _green_multiply + _green_add>>\n\t<<default>>@@.error;$planet.gravity@@\n<</switch>>\n<<if _gravity_deaths <= 0>>\n\t<<set _gravity_deaths = 0>>\n<<else>>\n\t<<set _gravity_deaths = Math.round(random(_gravity_deaths*_adjust_min, _gravity_deaths*_adjust_max))>>\n<</if>>\n\n/* WATER DEATHS */\n<<set _water_deaths = 100-$system_constructors + _native_bonus>>\n<<if $planet.surface_features.includes("Edible plants")>>\n\t<<set _water_deaths -= _good_feature_subtract>>\n<</if>>\n<<switch $planet.water>>\n\t<<case "None" "Trace">><<set _water_deaths = _water_deaths * _red_multiply + _red_add>>\n\t<<case "Ice-covered surface" "Planet-wide ocean">><<set _water_deaths = _water_deaths * _yellow_multiply + _yellow_add>>\n\t<<case "Ice caps" "Oceans">><<set _water_deaths = _water_deaths * _green_multiply + _green_add>>\n\t<<default>>@@.error;$planet.water@@\n<</switch>>\n<<if _water_deaths <= 0>>\n\t<<set _water_deaths = 0>>\n<<else>>\n\t<<set _water_deaths = Math.round(random(_water_deaths*_adjust_min, _water_deaths*_adjust_max))>>\n<</if>>\n\n/* ADJUST DEATH VALUES DOWN IF TOTAL IS MORE THAN TOTAL COLONISTS */\n<<if _atmosphere_deaths + _temperature_deaths + _gravity_deaths + _water_deaths > $colonists>>\n\t/* Scale death values down to number of colonists */\n\t<<set _modify = $colonists / (_atmosphere_deaths + _temperature_deaths + _gravity_deaths + _water_deaths)>>\n\t<<set _atmosphere_deaths = Math.round(_atmosphere_deaths*_modify) >>\n\t<<set _temperature_deaths = Math.round(_temperature_deaths*_modify) >>\n\t<<set _gravity_deaths = Math.round(_gravity_deaths*_modify) >>\n\t<<set _water_deaths = Math.round(_water_deaths*_modify) >>\n\t/* Deal with rounding errors */\n\t<<if _atmosphere_deaths > 0>>\n\t\t<<set _atmosphere_deaths = $colonists - (_temperature_deaths + _gravity_deaths + _water_deaths)>>\n\t<<elseif _temperature_deaths > 0>>\n\t\t<<set _temperature_deaths = $colonists - (_atmosphere_deaths + _gravity_deaths + _water_deaths)>>\n\t<<elseif _gravity_deaths > 0>>\n\t\t<<set _gravity_deaths = $colonists - (_atmosphere_deaths + _temperature_deaths + _water_deaths)>>\n\t<<elseif _water_deaths > 0>>\n\t\t<<set _water_deaths = $colonists - (_atmosphere_deaths + _temperature_deaths + _gravity_deaths)>>\n\t<</if>>\n<</if>>\n\n\n/* AND NOW, OUTPUT THE TEXT */\n\nThe colonists begin constructing a settlement\n\n<<if $system_constructors >= 100>>\n\twith the aid of the seedship's construction robots.\n<<elseif $system_constructors >= 50>>\n\twith the aid of the seedship's damaged construction robots.\n<<elseif $system_constructors > 0>>\n\twith the aid of the seedship's few surviving construction robots.\n<<else>>\n\twithout the help of the seedship's wrecked construction robots.\n<</if>>\n\n<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\tThe planet's native inhabitants keep the newcomers under careful guard, but also help them by setting up temporary shelters and clearning the land.\n<</if>>\n\n\n/* Text output code in widgets to make this passage less huge */\n<<FC_Construction_atmosphere_temperature _atmosphere_deaths _temperature_deaths>>\n<<FC_Construction_gravity _gravity_deaths>>\n<<FC_Construction_water _water_deaths>>\n\n\n<<set $colonists -= _atmosphere_deaths>>\n<<set $colonists -= _temperature_deaths>>\n<<set $colonists -= _gravity_deaths>>\n<<set $colonists -= _water_deaths>>\n\n/* SURFACE FEATURES: Unstable geology */\n<<if $planet.surface_features.includes("Unstable geology") & $colonists > 0>>\n\t<<if random(0,99) < $system_constructors>>\n\t\t<<killColonistsMedium>>\n\t\tEarthquakes kill $deaths colonists before they complete structures that can withstand them.\n\t<<else>>\n\t\t<<killColonistsMany>>\n\t\tAn earthquake levels the colony's partly-completed settlement, killing $deaths colonists.\n\t<</if>>\n<</if>>\n\n/* SURFACE FEATURES: Dangerous native animals */\n<<if $planet.surface_features.includes("Dangerous animals") & $colonists > 0>>\n\t<<if random(0,99) < $system_constructors>>\n\t\t<<killColonistsMedium>>\n\t\tThe colonists manage to keep the planet's relentlessly hostile animals at bay, but $deaths colonists are killed before their perimeter fence is secured.\n\t<<else>>\n\t\t<<killColonistsMany>>\n\t\tHostile native animals overrun the colony, killing $deaths colonists.\n\t<</if>>\n<</if>>\n\n/* SURFACE FEATURES: Poisonous native plants */\n<<if $planet.surface_features.includes("Poisonous plants") & $colonists > 0>>\n\t<<if random(0,99) < $system_constructors>>\n\t\t<<killColonistsMedium>>\n\t\tThe planet's plant life is extremely poisonous to humans, and $deaths colonists die before they can clear it away from their settlement.\n\t<<else>>\n\t\t<<killColonistsMany>>\n\t\tA storage failure leads to the colony's food supply being contaminated with the poisonous native plants, and $deaths colonists die.\n\t<</if>>\n<</if>>\n\n<br><br>\n\n<<if $colonists == 0>>\n\t<<set $hiscore.summary = "Construction Failure">>\n<</if>>\n\n<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t<<FCNextPassage [[FCI Relations]]>>\s\n<<elseif $planet.surface_features.includes("Monumental ruins")\n\t| $planet.surface_features.includes("High-tech ruins")\n\t| $planet.surface_features.includes("Dangerous ruins") >>\n\t<<FCNextPassage [[FC Ruins]]>>\s\n<<else>>\n\t<<FCNextPassage [[FC Technology]]>>\n<</if>>\n
John Ayliff
<<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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\n\t\t\t<</link>>\n\t\t<</if>>\n\t</div>\n<</if>>
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]]>>
/* 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 * Math.min($colonists/constants.max_colonists, 1)>>\n@@.debug-text;Culture score: _culture_score@@\n\n\n<<if $dictator>>\n\t<<set _culture_score = 20>>\n\tThe dictator who replaced one of the original colonists swiftly takes control of the colony and creates an authoritarian regime.\n\n<<else>>\n\t<<if $system_cultural_database >= 100>>\n\t\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\t<<elseif $system_cultural_database >= 50>>\n\t\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\t<<elseif $system_cultural_database > 0>>\n\t\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\t<<else>>\n\t\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\t<</if>>\n\n\t<<if $colonists < constants.max_colonists/2>>\n\t\tThe heavy losses sustained by the colonists make building a new society more difficult.\n\t<<elseif $colonists < constants.max_colonists>>\n\t\tThe losses sustained by the colonists make building a new society more difficult.\n\t<</if>>\n\n\t<<if $planet.surface_features.includes("Alien observers")>>\n\t\t/% Aliens may keep humans limited to a particular tech level, or help them achieve one: %/\n\t\t/% No interference %/\n\t\t/% Limit to Medieval (selectively destroy any advancements) %/\n\t\t/% Limit to Atomic age (shoot down any space launches, preventing communications satellites) %/\n\t\t/% Technological assistance: +30 %/\n\n\t\t<<switch random(0,2)>>\n\t\t\t<<case 0>>\n\t\t\t\tThe mysterious alien structures are visible as a glittering band across the night sky, but the aliens do not attempt to interfere with the colony's cultural development.\n\t\t\t<<case 1>>\n\t\t\t\tEnigmatic objects periodically descend from the alien structures in orbit, and colonists living close to these objects find themselves more prone to cooperation and empathy than they otherwise would be.\n\t\t\t\t<<set _culture_score += 30>>\n\t\t\t<<case 2>>\n\t\t\t\tEnigmatic objects periodically descend from the alien structures in orbit, and colonists living close to these objects find themselves more prone to conflict and selfishness than they otherwise would be.\n\t\t\t\t<<set _culture_score -= 30>>\n\t\t<</switch>>\n\t<</if>>\n\n\t<<if $planet.surface_features.includes("Outstanding beauty")>>\n\t\tThe planet's outstanding natural beauty makes life there more pleasant, helping the colonists to build a better society.\n\t\t/* Increase by 20 but don't go above 100 unless it already is */\n\t\t<<if _culture_score <= 100 & _culture_score > 80>>\n\t\t\t<<set _culture_score = 100>>\n\t\t<<else>>\n\t\t\t<<set _culture_score += 20>>\n\t\t<</if>>\n\t\t@@.debug-text;Modified culture score: _culture_score@@\n\t<<elseif $planet.surface_features.includes("Outstanding ugliness")>>\n\t\tThe planet's outstanding ugliness increases tensions among the colonists and makes it harder for them to build a peaceful society.\n\t\t<<set _culture_score -= 20>>\n\t\t@@.debug-text;Modified culture score: _culture_score@@\n\t<</if>>\n\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 = constants.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 = constants.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 " + constants.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 " + constants.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 = constants.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 " + constants.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 " + constants.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 = constants.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 " + constants.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 " + constants.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 " + constants.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 = constants.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 " + constants.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 = constants.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 " + constants.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 " + constants.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 " + constants.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 = constants.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
A hatch opens on the side of the alien ship and several creatures in bulky spacesuits emerge. They float over to the seedship and clamber around its surface, chattering incomprehensibly over their radios.\n\n<<if random(0,1) == 0>>\n\t<<set $system = "sleep chambers">>\n\tWhen they find the sleep chambers they gather round in what looks like excitement and begin removing the outer layers of one of the chambers to take a look at the human being inside.\n<<else>>\n\t<<randomSystemExcluding "sleep chambers" "surface probes" "destroyed">>\n\tSome of them begin attempting to open a maintenance panel covering the $system.\n<</if>>\n\n<br><br>\n\n<div id="result-area2">\n<<link "Let the aliens investige the $system">>\n\t<<replace "#result-area2">>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsFew>>\n\t\t\t\tSome of the aliens take pictures of the sleeping humans with their suit-mounted cameras, while others begin experimenting with the life support system. One of them trips an emergency release valve and twitches in shock as cryogenic gas vents in its face. The panicked aliens rapidly replace the shielding and retreat to their ship, but the accident has killed $deaths colonists.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageLow>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tThe maintenance panel comes loose violently and flies away into space, permanently exposing some of the $system's delicate components to cosmic radiation. The aliens crawl inside and pull at components as they try to examine every part of the system. The AI thinks they are trying to be careful, but they nevertheless cause some damage.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\tThe aliens remove the outer shielding of some of the sleep chambers, but stop short of tampering with the life support equipment. They take pictures of the frozen humans with cameras mounted on their suits, and their radio chatter goes quiet as they press their hands against the transparency. After a while they carefully replace the shielding and make their way back to their ship.\n\t\t\t<<else>>\n\t\t\t\tThe aliens shine lamps and low-power sensing lasers into the innards of the $system, take pictures from various angles with cameras mounted on their suits, and gingerly touch a few of the components, all the while chattering with one another and with their ship. They then replace the maintenance panel and leave the system exactly as they found it.\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<br><br>\n\t\t<<if $crewedship_transmitted_greeting>>\n\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t\tAs the alien ship pulls away, it finally transmits a message that the AI is able to partially comprehend. The aliens have deciphered part of the seedship's greeting, and have replied with a brief introduction to their own species' culture. The greeting manages to convey that the aliens wish the seedship luck with finding a home for the human race around another star, but that a human colony would not be welcome in their system. The AI scans the sky for another target planet and moves on.\n\t\t<<else>>\n\t\t\tThe alien ship moves away from the seedship and burns into an orbit that will eventually take it home. Trying to evade the alien ship put the seedship on a course away from the system, and its less powerful engines could not bring it back to the alien planet even if the AI wanted to. The AI scans the sky for another target planet and moves on.\n\t\t<</if>>\n\t\t<<unset $crewedship_transmitted_greeting>>\n\t\t<br><br><<link "Continue">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n<br>\n<<link "Try to shake the aliens off">>\n\t/% TO DO: Add chance of damage here (accident or alien retaliation) %/\n\t<<replace "#result-area2">>\n\t\tThe AI fires a sharp burst from the seedship's engines and the alien explorers tumble away into space, flailing their space-suited limbs and yelling at one another over their radios.\n\t\t<<if random(0,1) == 0>>\n\t\t\tOne of them collides with one of the seedship's heat fins, which shatters the transparent covering protecting its sensory organs. The alien convulses for a few moments and then goes still, atmosphere leaking into space around it.\n\t\t<</if>>\n\t\t<<if $crewedship_harpoon_system>>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $crewedship_harpoon_system $damage>>\n\t\t\tThe alien ship's barbed harpoon tears through the $crewedship_harpoon_system as the seedship pulls itself free.\n\t\t\t<<unset $crewedship_harpoon_system>>\n\t\t<</if>>\n\t\tWhile the alien ship retrieves its crew members, the seedship moves away and sets course for a new system.\n\t\t<br><br><<link "Continue">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n</div>
<<widget shareLinks>>\n\t\t/% $args[0] is the encoded hiscore %/\n\t\t/% $args[1] is the Twitter share text %/\n\t<<set _hiscore_encoded = $args[0]>>\n\t<<set _text_encoded = encodeURIComponent($args[1])>>\n\t<<set _text_encoded = _text_encoded.replace("'","%27")>>\n\t<<set _text_encoded = _text_encoded.replace(".","%2E")>>\n\n\tShare: \n\t<<set _bare_link = "https://www.johnayliff.com/games/seedship/index.html" + _hiscore_encoded >>\n\t<<set _twitter_link = "http://twitter.com/share?text=" + _text_encoded + "&url=https://www.johnayliff.com/games/seedship/index.html" + encodeURIComponent(_hiscore_encoded) >>\n\t<<set _facebook_link = "http://www.facebook.com/sharer.php?u=https://www.johnayliff.com/games/seedship/index.html" + encodeURIComponent(_hiscore_encoded) >>\n\n\t<span class="fa icon-twitter"><<externalLink "" _twitter_link>></span>\n\t<span class="fa icon-facebook"><<externalLink "" _facebook_link>></span>\n\t<span class="fa icon-chain"><<externalLink "" _bare_link>></span>\n<</widget>>
<<randomSystemExcluding "surface probes" "destroyed">>\nThe AI wakes to an impulse from the damage sensors. It is deep in empty space, but something unseen is damaging the $system. Turning its scanners on itself, it sees a patch of what looks like silver fluid eating away at the metal. The AI guesses that it is a space-based life-form, or a swarm of self-replicating alien nanobots, which has drifted through space until it happened to hit the seedship.\n<br><br>\nLeft unchecked, the plague could eventually consume the entire seedship. <<if $surface_probes > 0>>The surest way to remove it would be to jettison the entire affected area, but that would cause severe damage to the $system. Alternatively, the AI could activate a surface probe and have it attempt to surgically remove the plague.<<else>>Since the seedship has no more surface probes, the only way to deal with it would be to jettison the entire affected area.<</if>>\n\n<br><br>\n\n<div id="result-area">\n<<link "Jettison the entire affected area">>\n\t<<replace "#result-area">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsMany>>\n\t\t\tThe AI jettisons every sleep chamber with even a trace of the substance. As the $deaths chambers fall away behind, it watches in horror as the alien substance consumes both the machinery of the chambers and the sleeping humans within.\n\t\t<<else>>\n\t\t\t<<randomDamageHigh>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe AI fires the explosive bolts that decouple every potentially affected module of the $system. The machinery drifts away, gradually melting into undifferentiated silver blobs of alien nanites.\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<if $surface_probes > 0>>\n\t<<link "Send a surface probe to surgically remove it">>\n\t\t<<replace "#result-area">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\tThe probe works quickly, using its scanners to find the minute patches of alien plague and its sample drills to cut them free.\n\t\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t\t<<killColonistsFew>>\n\t\t\t\t\tIt manages to remove the plague from many of the chambers, but it is too late to save $deaths colonists.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<randomDamageLow>>\n\t\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t\tIt manages to remove all trace of the plague with only minor damage to the $system.\n\t\t\t\t<</if>>\n\t\t\t\tThe seedship abandons the now infected probe and continues on its journey.\n\n\t\t\t<<else>>\n\t\t\t\t<<set _system1 = $system>>\n\t\t\t\t<<randomSystemExcluding _system1 "surface probes" "destroyed">>\n\t\t\t\t<<set _system2 = $system>>\n\t\t\t\t<<randomSystemExcluding _system1 _system2 "surface probes" "destroyed">>\n\t\t\t\t<<set _system3 = $system>>\n\n\t\t\t\t<<if _system1 == "sleep chambers">>\n\t\t\t\t\t<<killColonistsMany>>\n\t\t\t\t<<else>>\n\t\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t\t<<damageSystem _system1 $damage>>\n\t\t\t\t<</if>>\n\t\t\t\t<<if _system2 == "sleep chambers">>\n\t\t\t\t\t<<killColonistsMedium>>\n\t\t\t\t<<else>>\n\t\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t\t<<damageSystem _system2 $damage>>\n\t\t\t\t<</if>>\n\t\t\t\t<<if _system3 == "sleep chambers">>\n\t\t\t\t\t<<killColonistsMedium>>\n\t\t\t\t<<else>>\n\t\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t\t<<damageSystem _system3 $damage>>\n\t\t\t\t<</if>>\n\n\t\t\t\tThe probe fails to remove the infection quickly enough. By the time it is all gone, it has dealt severe damage to the _system1 and spread to the _system2 and _system3.\n\t\t\t<</if>>\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\t<<scrollToResultArea>>\t\n\t<</link>>\n<</if>>\n</div>
/% If we're coming here from a share link, go to the share page %/\n<<if !constants.mobileVersion>>\n\t<<set $query_string = location.search>>\n\t<<if $query_string != "">>\n\t\t<<goto [[Show shared summary]]>>\n\t<</if>>\n<</if>>\n\n<div class="title-screen-version-number">\n\tversion <<= constants.version>>\n</div>\n\n<div id="title-screen-block">\n\n\t<h1>SEEDSHIP</h1>\n\n\t<<if Save.autosave.has()>>\n\t\t<<linkreplace "New game" t8n>>\n\t\t\tThis will overwrite the saved game. [[Confirm|Intro]]\n\t\t<</linkreplace>>\n\t<<else>>\n\t\t[[New game|Intro]]\n\t<</if>>\n\n\t<br>\n\n\t<<if Save.autosave.has()>>\n\t\t<<link "Continue game">>\n\t\t\t<<script>>\n\t\t\t\t$("#starfield").remove();\n\t\t\t\t$("#status-display").show();\n\t\t\t\tSave.autosave.load();\n\t\t\t<</script>>\n\t\t<</link>>\n\t<<else>>\n\t\t@@.disabled-hiscore-link;Continue game@@\n\t<</if>>\n\n\t<br>\n\n\t<<if $PERM_hiscores>>\n\t\t[[Past missions|High scores]]\n\t<<else>>\n\t\t<span class="disabled-hiscore-link">Past missions</span>\n\t<</if>>\n\n\t<br>\n\n\t[[Credits]]\n\n\t<br>\n\n\t<span class="credits-small-text">\n\t\t[[Change colour scheme|Select Stylesheet]]\n\t\t/%<span class="title-screen-toggle-dol">\n\t\t\t<<link "Stylesheet: dark on light" "Start">>\n\t\t\t\t<<remember $PERM_darkonlight = false>>\n\t\t\t\t<<script>>\n\t\t\t\t\t$("html").removeClass("dark-on-light");\n\t\t\t\t<</script>>\n\t\t\t<</link>>\n\t\t</span>\n\t\t<span class="title-screen-toggle-lod">\n\t\t\t<<link "Stylesheet: light on dark" "Start">>\n\t\t\t\t<<remember $PERM_darkonlight = true>>\n\t\t\t\t<<script>>\n\t\t\t\t\t$("html").addClass("dark-on-light");\n\t\t\t\t<</script>>\n\t\t\t<</link>>\n\t\t</span>%/\n\t</span>\n\n\t@@.debug-text;<br>[[Add junk hiscores|DEBUG add junk scores]]@@\n\n</div>\n\n<div class="title-screen-support-area credits-small-text">\n\t<<if !constants.iOSVersion>>\n\t\tSupport developer:<br>\n\t\t<<externalLink "Buy a coffee" "https://ko-fi.com/johnayliff">><br>\n\t\t<<externalLink "Back on Patreon" "https://www.patreon.com/johnayliff">><br>\n\t\t<<externalLink "Buy T-shirts and mugs" "https://teespring.com/stores/seedship">><br>\n\t<</if>>\n</div>\n\n\n\n<<if !constants.mobileVersion>>\n\t<div class="title-screen-app-store-area">\n\t\t<a href="https://itunes.apple.com/us/app/seedship/id1340497640">\n\t\t\t<img id="app-store-image" alt="Download on the App Store" src="https://linkmaker.itunes.apple.com/assets/shared/badges/en-us/appstore-lrg.svg"/>\n\t\t</a>\n\t\t<a href="https://play.google.com/store/apps/details?id=com.johnayliff.seedship&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1">\n\t\t\t<img id="google-play-image" alt="Get it on Google Play" src="https://play.google.com/intl/en_gb/badges/images/generic/en_badge_web_generic.png"/>\n\t\t</a>\n\t</div>\n<</if>>\n\n
Config.saves.autosave = true;\nConfig.history.controls = false;\nConfig.history.maxStates = 1;\nConfig.saves.slots = 0;\n\nConfig.saves.isAllowed = function () {\n\treturn !tags().includes("front-matter");\n};
<<if !constants.iOSVersion>>\n\tSupport developer: \n\t<<externalLink "Ko-fi" "https://ko-fi.com/johnayliff">>\n\t<span class="main-loop-link-spacer"> | </span>\n\t<<externalLink "Patreon" "https://www.patreon.com/johnayliff">>\n\t<span class="main-loop-link-spacer"> | </span>\n\t<<externalLink "Buy T-shirts and mugs" "https://teespring.com/stores/seedship">>\n<<else>>\n\t<<externalLink "Developer website" "https://www.johnayliff.com">>\n<</if>>\n
The seedship slows into orbit of the star, close to the asteroid belt that now occupies the orbit of the planet it detected before embarking on its latest journey. Moving slowly, it is able to avoid all the major asteroids,\n<<if random(0,1) == 0>>\n\t<<randomSystemExcluding "destroyed">>\n\tbut the constant bombardment of small bodies\n\t<<if $system == "sleep chambers">>\n\t\t<<killColonistsFew>>\n\t\tdamages $deaths sleep chambers.\n\t<<elseif $system == "surface probes">>\n\t\t<<set $surface_probes -= 1>>\n\t\tdestroys one of the surface probes.\n\t<<else>>\n\t\t<<randomDamageHigh>>\n\t\t<<damageSystem $system $damage>>\n\t\tdamages the $system.\n\t<</if>>\n<<else>>\n\tand suffers no damage.\n<</if>>\n<<refreshStatusDisplay>>\n\n<br><br>\n\nThe AI finds the sight of a potential colony site shattered into asteroids chilling. The asteroids collide chaotically with one another as they settle into stable orbits, and many of them still glow with the newly released heat of the planet's core. The AI knows that the safest course would be to ease out of orbit and head for the next system, but a morbid fascination encourages it to stay and explore the planetary ruins.\n\n<<if $surface_probes <= 0>>\n\tSince it has no surface probes, however, it has no way to explore the asteroids and so no option but to move on.\n<</if>>\n\n<br><br>\n\n<div id="result-area2">\n<<if $surface_probes > 0>>\n\t<<link "Move closer and launch a surface probe to investigate">>\n\t\t<<replace "#result-area2">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tThe seedship matches velocity with a dense group of asteroids and launches a surface probe into their midst.\n\t\t\t<<set _r = random(0,2)>>\n\t\t\t<<if _r == 0>>\n\t\t\t\tThe probe matches course with an interesting looking asteroid and attempts to clamp on, but the brittle asteroid shatters under its touch, sending fragments spinning in every direction. These fragments strike other asteroids, which themselves shatter, setting off a chain reaction that fills local space with whirling rocks. The AI manages to move out of danger, but not before one of the rocks hits the\n\t\t\t\t<<randomSystemExcluding "surface probes" "destroyed">>\n\t\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t\t<<killColonistsMedium>>\n\t\t\t\t\tsleep chambers.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t\t$system.\n\t\t\t\t<</if>>\n\t\t\t<<elseif _r == 1>>\n\t\t\t\tThe probe takes samples of dozens of rocks and detailed scans of hundreds more. The asteroids are from every part of the planet's core, mantle, and crust, and exploring them is like having the planet cut open for the probe's inspection.\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\tThe probe transmits detailed information about planetary science that would have allowed the AI to upgrade one of the seedship's scanners if they were not already fully upgraded.\n\t\t\t\t<<else>>\n\t\t\t\t\tThe probe is able to transmit detailed information that allows the AI to upgrade the seedship's\n\t\t\t\t\t<<set _upgrade = either(_possible_upgrades)>>\n\t\t\t\t\t<<switch _upgrade>>\n\t\t\t\t\t\t<<case "atmosphere">>\n\t\t\t\t\t\t\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\t\t\tatmosphere\n\t\t\t\t\t\t<<case "temperature">>\n\t\t\t\t\t\t\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\t\t\ttemperature\n\t\t\t\t\t\t<<case "gravity">>\n\t\t\t\t\t\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\t\t\tgravity\n\t\t\t\t\t\t<<case "water">>\n\t\t\t\t\t\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\t\t\twater\n\t\t\t\t\t\t<<case "resources">>\n\t\t\t\t\t\t\t<<set $scanner_resources_level += 1>>\n\t\t\t\t\t\t\tresources\n\t\t\t\t\t\t<<default>>\n\t\t\t\t\t\t\t@@.error;Unexpected upgrade _upgrade.@@\n\t\t\t\t\t<</switch>>\n\t\t\t\t\tscanner.\n\t\t\t\t<</if>>\n\t\t\t<<elseif _r == 2>>\n\t\t\t\tThe probe finds several fragments of advanced technology that were sturdy enough to survive the planetary explosion. After long study, it is able to piece together some details of the alien civilisation that once existed on this world, and the hubristic science experiments that eventually led to its destruction. The AI is careful to add warnings to this information as it saves it into the scientific database.\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<</if>>\n\t\t\t<br><br><<link "Continue">><<goto [[MO Done]]>><</link>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area2">>\n\t\t<<refreshStatusDisplay>>\n\t\t<<scrollToResultArea2>>\n\t<</link>>\n<</if>>\n<br>\n<<link "Move on">>\n\t<<replace "#result-area2">>\n\t\tThe AI scans the sky for a new destination and carefully pulls away from the asteroids.\n\t\t<br><br><<link "Continue">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n</div>
<<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<<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 chambers, 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\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<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\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n</div>\n\n\n
window.decodeHiscore = function (hiscoreString) {\n\t/* Takes an encoded hiscore string */\n\t/* Returns a hiscore object */\n\t\n\t/* Set up score variables */\n\tvar hiscore = {\n\t\tfinal_tech_level: -1,\n\t\tfinal_culture: -1,\n\t\tnative_relations: -1,\n\t\tfinal_score: 0,\n\t\tscore_landing: 0,\n\t\tscore_construction: 0,\n\t\tscore_native_relations: 0,\n\t\tscore_technology: 0,\n\t\tscore_culture: 0,\n\t\tscore_scientific_database: 0,\n\t\tscore_cultural_database: 0,\n\t\tscore_atmosphere: 0,\n\t\tscore_gravity: 0,\n\t\tscore_temperature: 0,\n\t\tscore_water: 0,\n\t\tscore_resources: 0,\n\t\tsummary: "" };\n\n\tvar strings = hiscoreString.split(".");\n\n\t/* Planet string */\n\tvar planet_string = strings[0];\n\n\t/* _planet_string[0] is always "?" so ignore and start with _planet_string[1] */\n\n\tif (planet_string[1] == "X")\n\t{\n\t\t/* No planet - destroyed in space */\n\t}\n\telse\n\t{\n\t\t/* Set up planet variable */\n\t\tvar planet = {\n\t\t\ttemperature: "",\n\t\t\tgravity: "",\n\t\t\tresources: "",\n\t\t\tatmosphere: "",\n\t\t\twater: "",\n\t\t\tsurface_features: [],\n\t\t\tanomalies: [],\n\t\t\tnative_tech_level: 0\n\t\t};\n\n\t\t\t/* PLANET ATTRIBUTES */\n\t\tswitch (planet_string[1])\n\t\t{\n\t\t\tcase "b":\t\tplanet.atmosphere = "Breathable"; break;\n\t\t\tcase "m":\t\tplanet.atmosphere = "Marginal"; break;\n\t\t\tcase "v":\t\tplanet.atmosphere = "None"; break;\n\t\t\tcase "n":\t\tplanet.atmosphere = "Non-breathable"; break;\n\t\t\tcase "t":\t\tplanet.atmosphere = "Toxic"; break;\n\t\t\tcase "c":\t\tplanet.atmosphere = "Corrosive"; break;\n\t\t\tdefault:\t\tplanet.atmosphere = "ERROR: " + planet_string[1];\n\t\t}\n\n\t\tswitch (planet_string[2])\n\t\t{\n\t\t\tcase "H":\t\tplanet.gravity = "Very high"; break;\n\t\t\tcase "h":\t\tplanet.gravity = "High"; break;\n\t\t\tcase "m":\t\tplanet.gravity = "Moderate"; break;\n\t\t\tcase "l":\t\tplanet.gravity = "Low"; break;\n\t\t\tcase "L":\t\tplanet.gravity = "Very low"; break;\n\t\t\tdefault:\t\tplanet.gravity = "ERROR: " + planet_string[2];\n\t\t}\n\n\t\tswitch (planet_string[3])\n\t\t{\n\t\t\tcase "H":\t\tplanet.temperature = "Very hot"; break;\n\t\t\tcase "h":\t\tplanet.temperature = "Hot"; break;\n\t\t\tcase "m":\t\tplanet.temperature = "Moderate"; break;\n\t\t\tcase "c":\t\tplanet.temperature = "Cold"; break;\n\t\t\tcase "C":\t\tplanet.temperature = "Very cold"; break;\n\t\t\tdefault:\t\tplanet.temperature = "ERROR: " + planet_string[3];\n\t\t}\n\n\t\tswitch (planet_string[4])\n\t\t{\n\t\t\tcase "o":\t\tplanet.water = "Oceans"; break;\n\t\t\tcase "O":\t\tplanet.water = "Planet-wide ocean"; break;\n\t\t\tcase "i":\t\tplanet.water = "Ice caps"; break;\n\t\t\tcase "I":\t\tplanet.water = "Ice-covered surface"; break;\n\t\t\tcase "t":\t\tplanet.water = "Trace"; break;\n\t\t\tcase "n":\t\tplanet.water = "None"; break;\n\t\t\tdefault:\t\tplanet.water = "ERROR: " + planet_string[4];\n\t\t}\n\n\t\tswitch (planet_string[5])\n\t\t{\n\t\t\tcase "r":\t\tplanet.resources = "Rich"; break;\n\t\t\tcase "p":\t\tplanet.resources = "Poor"; break;\n\t\t\tcase "n":\t\tplanet.resources = "None"; break;\n\t\t\tdefault:\t\tplanet.resources = "ERROR: " + planet_string[5];\n\t\t}\n\n\t\t/* Any remaining characters are planet features */\n\t\tfor (var n = 6; n < planet_string.length; n++)\n\t\t{\n\t\t\tswitch (planet_string[n])\n\t\t\t{\n\t\t\t\t\t\t/* Moon */\n\t\t\t\tcase "a":\tplanet.surface_features.push("Barren moon"); break;\n\t\t\t\tcase "b":\tplanet.surface_features.push("Metal-rich moon"); break;\n\t\t\t\tcase "c":\tplanet.surface_features.push("Unstable moon"); break;\n\n\t\t\t\t\t\t/* Beauty/ugliness */\n\t\t\t\tcase "d":\tplanet.surface_features.push("Outstanding beauty"); break;\n\t\t\t\tcase "e":\tplanet.surface_features.push("Outstanding ugliness"); break;\n\n\t\t\t\t\t\t/* Caves */\n\t\t\t\tcase "f":\tplanet.surface_features.push("Airtight caves"); break;\n\t\t\t\tcase "g":\tplanet.surface_features.push("Insulated caves"); break;\n\t\t\t\tcase "h":\tplanet.surface_features.push("Unstable geology"); break;\n\n\t\t\t\t\t\t/* Plants */\n\t\t\t\tcase "i":\tplanet.surface_features.push("Plant life"); break;\n\t\t\t\tcase "j":\tplanet.surface_features.push("Edible plants"); break;\n\t\t\t\tcase "k":\tplanet.surface_features.push("Poisonous plants"); break;\n\t\t\t\tcase "l":\tplanet.surface_features.push("Quasi-organic crystals"); break;\n\n\t\t\t\t\t\t/* Animals */\n\t\t\t\tcase "m":\tplanet.surface_features.push("Animal life"); break;\n\t\t\t\tcase "n":\tplanet.surface_features.push("Useful animals"); break;\n\t\t\t\tcase "o":\tplanet.surface_features.push("Dangerous animals"); break;\n\n\t\t\t\t\t\t/* Intelligent life */\n\t\t\t\tcase "p":\tplanet.surface_features.push("Intelligent life"); break;\n\n\t\t\t\t\t\t/* Ruins */\n\t\t\t\tcase "q":\tplanet.surface_features.push("Monumental ruins"); break;\n\t\t\t\tcase "r":\tplanet.surface_features.push("High-tech ruins"); break;\n\t\t\t\tcase "s":\tplanet.surface_features.push("Dangerous ruins"); break;\n\t\t\t\tcase "t":\tplanet.surface_features.push("Regular geological formations"); break;\n\n\t\t\t\t\t\t/* Special event features */\n\t\t\t\tcase "u":\tplanet.surface_features.push("Welcoming"); break;\n\t\t\t\tcase "v":\tplanet.surface_features.push("Unwelcoming"); break;\n\t\t\t\tcase "w":\tplanet.surface_features.push("Simulation"); break;\n\t\t\t\tcase "x":\tplanet.surface_features.push("Alien observers"); break;\n\n\t\t\t\t\t\t/* Planet-spanning civilisation */\n\t\t\t\tcase "y":\tplanet.surface_features.push("Planet-spanning civilisation"); break;\n\n\t\t\t\tdefault:\tplanet.surface_features.push("ERROR: " + planet_string[n]);\n\t\t\t}\n\t\t}\n\n\t\t/* Native tech level */\n\t\tvar nativeProperties = strings[1].split("-");\n\t\tplanet.native_tech_level = Number(nativeProperties[0]);\n\t\tif (nativeProperties.length > 1) {\n\t\t\tplanet.native_culture = Number(nativeProperties[1]);\n\t\t} else {\n\t\t\tplanet.native_culture = -1;\n\t\t}\n\n\n\t\t/* Planet name */\n\t\tplanet.name = decodeURIComponent(strings[2]);\n\t\tplanet.name = planet.name.replace("%2E",".");\n\t\tplanet.name = planet.name.replace("%27","'");\n\n\t\thiscore.planet = planet;\n\t}\n\n\t/* Landing score */\n\thiscore.score_landing = Number(strings[3]);\n\n\t/* Construction score */\n\thiscore.score_construction = Number(strings[4]);\n\n\t/* Natives result */\n\thiscore.native_relations = Number(strings[5]);\n\n\t/* Technology result */\n\thiscore.final_tech_level = Number(strings[6]);\n\n\t/* Culture result */\n\thiscore.final_culture = Number(strings[7]);\n\n\t/* Scientific database */\n\thiscore.score_scientific_database = Number(strings[8]);\n\n\t/* Cultural database */\n\thiscore.score_cultural_database = Number(strings[9]);\n\n\t/* Number of planets visited -- will only be part of string for games played in version 1.2.0+ */\n\tif (strings[10])\n\t{\n\t\thiscore.planets_visited = Number(strings[10]);\n\t}\n\n\t/* Date -- will only be part of string for games played in version 1.2.2+ */\n\tif (strings[11])\n\t{\n\t\tvar dateString = strings[11].split("-");\n\t\tvar year = Number(dateString[0]);\n\t\tvar month = Number(dateString[1]) - 1;\t/* January is zero etc. */\n\t\tvar day = Number(dateString[2]);\n\t\thiscore.date = new Date(year, month, day, 0, 0, 0, 0);\n\t}\n\n\t/* Extra colonists -- will only be part of string for games played in version 1.3.0+ */\n\tif (strings[12])\n\t{\n\t\thiscore.score_extra_colonists = Number(strings[12]);\n\t}\n\n\thiscore = calculateFinalScore(hiscore);\n\t\n\treturn hiscore;\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea2>>\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\t<<scrollToResultArea2>>\n\t\t<</link>>\n\t</div>\n\n<</if>>
<<randomSystemExcluding "destroyed" "sleep chambers" "surface probes">>\n<<if visited() == 1>>\n\tThe seedship's damage control system wakes the AI with a medium-priority alert. There is a structural weakness in the $system, caused by the incessant wear of thousands of years of travel. The system is still intact for the moment, but when the seedship decelerates into the next system the vibration will shake important components loose.\n<<else>>\n\tThe damage control system detects a structural weakness in the $system. It will suffer damage when the ship decelerates into the next system.\n<</if>>\n\n<<if $surface_probes == 0>>\n\t<br><br>Since the ship has no more surface probes, the AI can see no way to reinforce the $system.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Let the $system fail">>\n\t<<replace "#result-area">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem $system $damage>>\n\t\tThe AI ignores the warning and begins its deceleration. The weak $system rattles under the vibrations filling the ship, and some of its components work themselves loose and tear through delicate circuitry before whirling away into space.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<<refreshStatusDisplay>>\n<</link>>\n<<if $surface_probes > 0>>\n\t<br>\n\t<<link "Attempt to reinforce it using a surface probe">>\n\t\t<<replace "#result-area">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\tThe probe crawls across the ship's hull and clamps itself onto the $system, its sturdy body becoming a new superstructure keeping the loose components in place. The AI suspects that this improvised solution would have horrified the seedships designers, but when the ship decelerates into the next planet's orbit the probe manages to hold the $system together.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tThe probe crawls across the ship's hull and attemps to attach itself to the $system, but the system was even weaker than the damage sensors indicated and it disintegrates as soon as the probe touches it. The probe spins away into space, a large chunk of the $system held uselessly in its manipulator claws.\n\t\t\t<</if>>\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<scrollToResultArea>>\n\t\t<<refreshStatusDisplay>>\n\t<</link>>\n<</if>>\n</div>\n
<<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 it 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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>></div>
<!-- Font Awesome icons for web version, comment out for mobile version -->\n<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">\n<!-- Cordova link and Font Awesome icons for mobile version, comment out for web version -->\n<!-- <script type="text/javascript" src="cordova.js"></script> -->\n<!-- <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css"> -->\n\n<div id="starfield"></div>\n<div id="passages"></div>\n<div id="status-display"></div>
<<if $scanner_atmosphere > 0 | $scanner_gravity > 0 | $scanner_temperature > 0 | $scanner_water > 0 | $scanner_resources > 0>>\n\t<<randomIntactSystemFrom "atmosphere scanner" "gravity scanner" "temperature scanner" "water scanner" "resources scanner">>\n\t<<if visited() == 1>>\n\t\tThe seedship's course takes it through a dense star-forming nebula. Hundreds of infant suns illuminate clouds of interstellar gas and fill the sky with riotous colour. Clouds twist through complex gravitational interference patterns and glitter with heavy elements formed in the death throes of the last generation of stars.\n\t\t<br><br>\n\t\tThe scanners were not designed to deal with this level of input, and it is threatening to overwhelm them. If the AI continues to use the scanners to navigate, it can tell that the $system will be damaged. Shutting off the scanners, however, would leave the seedship vulnerable to collisions in this crowded area of space.\n\t<<else>>\n\t\tThe seedship's course takes it through another star-forming nebula, whose intense sensory impulses threaten to overload the $system.\n\t<</if>>\n<<else>>\n\tThe seedship's course takes it through another star-forming nebula. With no functioning scanners, it has no option but to fly blind through the dangerous area.\n<</if>>\n<br><br>\n\n<div id="result-area">\n<<if $scanner_atmosphere > 0 | $scanner_gravity > 0 | $scanner_temperature > 0 | $scanner_water > 0 | $scanner_resources > 0>>\n\t<<link "Keep the scanners running">>\n\t\t<<replace "#result-area">>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe AI continues to use the scanners to navigate. The $system overloads, but the seedship passes safely through the star-forming nebula.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<refreshStatusDisplay>>\n\t\t<<scrollToResultArea>>\n\t<</link>>\n\t<br>\n<</if>>\n<<link "Fly blind">>\n\t<<replace "#result-area">>\n\t\t<<if $scanner_atmosphere > 0 | $scanner_gravity > 0 | $scanner_temperature > 0 | $scanner_water > 0 | $scanner_resources > 0>>\n\t\t\tThe AI calculates a course that it thinks will avoid obstacles, then shuts down the scanners.\n\t\t<<else>>\n\t\t\tThe seedship enters the nebula.\n\t\t<</if>>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<randomSystemExcluding "atmosphere scanner" "gravity scanner" "temperature scanner" "water scanner" "resources scanner" "destroyed">>\n\t\t\tFlying blind, it has no way of detecting the dense cloud of dust that buffets the ship and\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsFew>>\n\t\t\t\tdamages $deaths sleep chambers.\n\t\t\t<<elseif $system == "surface probes">>\n\t\t\t\t<<set $surface_probes -= 1>>\n\t\t\t\tknocks loose one of the surface probes.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageLow>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\twears away at the $system.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tTo its relief, when it judges that it is out of danger and reactivates the scanners, there is no damage.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n\n</div>\n\n\n
<<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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\n<</link>>\n</div>\n\n
DEBUG: choose a random encounter:\n\nCOMMON:\n<<for _n = 0; _n < constants.MO_encounters_common.length; _n++>>\n\t<<print "[[" + constants.MO_encounters_common[_n] + "]]">>\n<</for>>\n\nRARE:\n<<for _n = 0; _n < constants.MO_encounters_rare.length; _n++>>\n\t<<print "[[" + constants.MO_encounters_rare[_n] + "]]">>\n<</for>>\n\nMALFUNCTIONS:\n<<for _n = 0; _n < constants.MO_encounters_malfunction.length; _n++>>\n\t<<print "[[" + constants.MO_encounters_malfunction[_n] + "]]">>\n<</for>>\n\n
window.encodeHiscore = function (hiscore) {\n\n\tvar encodedHiscore = "?";\n\n\tif (hiscore.planet)\n\t{\n\t\t\t/* PLANET ATTRIBUTES */\n\t\tswitch (hiscore.planet.atmosphere) {\n\t\t\tcase "Breathable":\t\t\tencodedHiscore += "b"; break;\n\t\t\tcase "Marginal":\t\t\t\tencodedHiscore += "m"; break;\n\t\t\tcase "None":\t\t\t\t\t\tencodedHiscore += "v"; break;\n\t\t\tcase "Non-breathable":\tencodedHiscore += "n"; break;\n\t\t\tcase "Toxic":\t\t\t\t\t\tencodedHiscore += "t"; break;\n\t\t\tcase "Corrosive":\t\t\t\tencodedHiscore += "c"; break;\n\t\t\tdefault:\t\t\t\t\t\t\t\tencodedHiscore += "v"; break;\n\t\t}\n\n\t\tswitch (hiscore.planet.gravity) {\n\t\t\tcase "Very high":\t\t\tencodedHiscore += "H"; break;\n\t\t\tcase "High":\t\t\t\t\tencodedHiscore += "h"; break;\n\t\t\tcase "Moderate":\t\t\tencodedHiscore += "m"; break;\n\t\t\tcase "Low":\t\t\t\t\t\tencodedHiscore += "l"; break;\n\t\t\tcase "Very low":\t\t\tencodedHiscore += "L"; break;\n\t\t\tdefault:\t\t\t\t\t\t\tencodedHiscore += "L"; break;\n\t\t}\n\n\t\tswitch (hiscore.planet.temperature) {\n\t\t\tcase "Very hot":\t\t\tencodedHiscore += "H"; break;\n\t\t\tcase "Hot":\t\t\t\t\t\tencodedHiscore += "h"; break;\n\t\t\tcase "Moderate":\t\t\tencodedHiscore += "m"; break;\n\t\t\tcase "Cold":\t\t\t\t\tencodedHiscore += "c"; break;\n\t\t\tcase "Very cold":\t\t\tencodedHiscore += "C"; break;\n\t\t\tdefault:\t\t\t\t\t\t\tencodedHiscore += "C"; break;\n\t\t}\n\n\t\tswitch (hiscore.planet.water) {\n\t\t\tcase "Oceans":\t\t\t\t\t\t\tencodedHiscore += "o"; break;\n\t\t\tcase "Planet-wide ocean":\t\tencodedHiscore += "O"; break;\n\t\t\tcase "Ice caps":\t\t\t\t\t\tencodedHiscore += "i"; break;\n\t\t\tcase "Ice-covered surface":\tencodedHiscore += "I"; break;\n\t\t\tcase "Trace":\t\t\t\t\t\t\t\tencodedHiscore += "t"; break;\n\t\t\tcase "None":\t\t\t\t\t\t\t\tencodedHiscore += "n"; break;\n\t\t\tdefault: \t\t\t\t\t\t\t\t\t\tencodedHiscore += "n"; break;\n\t\t}\n\n\t\tswitch (hiscore.planet.resources) {\n\t\t\tcase "Rich":\t\t\t\t\tencodedHiscore += "r"; break;\n\t\t\tcase "Poor":\t\t\t\t\tencodedHiscore += "p"; break;\n\t\t\tcase "None":\t\t\t\t\tencodedHiscore += "n"; break;\n\t\t\tdefault:\t\t\t\t\t\t\tencodedHiscore += "n"; break;\n\t\t}\n\n\n\t\t\t/* PLANET FEATURES */\n\t\tfor (var n = 0; n < hiscore.planet.surface_features.length; n++)\n\t\t{\n\t\t\tswitch (hiscore.planet.surface_features[n]) {\n\t\t\t\t\t\t/* Moon */\n\t\t\t\tcase "Barren moon":\t\t\t\t\t\t\t\t\tencodedHiscore += "a"; break;\n\t\t\t\tcase "Metal-rich moon":\t\t\t\t\t\t\t\tencodedHiscore += "b"; break;\n\t\t\t\tcase "Unstable moon":\t\t\t\t\t\t\t\tencodedHiscore += "c"; break;\n\n\t\t\t\t\t\t/* Beauty/ugliness */\n\t\t\t\tcase "Outstanding beauty":\t\t\t\t\t\t\tencodedHiscore += "d"; break;\n\t\t\t\tcase "Outstanding ugliness":\t\t\t\t\t\tencodedHiscore += "e"; break;\n\n\t\t\t\t\t\t/* Caves */\n\t\t\t\tcase "Airtight caves":\t\t\t\t\t\t\t\tencodedHiscore += "f"; break;\n\t\t\t\tcase "Insulated caves":\t\t\t\t\t\t\t\tencodedHiscore += "g"; break;\n\t\t\t\tcase "Unstable geology":\t\t\t\t\t\t\tencodedHiscore += "h"; break;\n\n\t\t\t\t\t\t/* Plants */\n\t\t\t\tcase "Plant life":\t\t\t\t\t\t\t\t\tencodedHiscore += "i"; break;\n\t\t\t\tcase "Edible plants":\t\t\t\t\t\t\t\tencodedHiscore += "j"; break;\n\t\t\t\tcase "Poisonous plants":\t\t\t\t\t\t\tencodedHiscore += "k"; break;\n\n\t\t\t\t\t\t/* Animals */\n\t\t\t\tcase "Animal life":\t\t\t\t\t\t\t\t\tencodedHiscore += "m"; break;\n\t\t\t\tcase "Useful animals":\t\t\t\t\t\t\t\tencodedHiscore += "n"; break;\n\t\t\t\tcase "Dangerous animals":\t\t\t\t\t\t\tencodedHiscore += "o"; break;\n\n\t\t\t\t\t\t/* Intelligent life */\n\t\t\t\tcase "Intelligent life":\t\t\t\t\t\t\tencodedHiscore += "p"; break;\n\n\t\t\t\t\t\t/* Ruins */\n\t\t\t\tcase "Monumental ruins":\t\t\t\t\t\t\tencodedHiscore += "q"; break;\n\t\t\t\tcase "High-tech ruins":\t\t\t\t\t\t\t\tencodedHiscore += "r"; break;\n\t\t\t\tcase "Dangerous ruins":\t\t\t\t\t\t\t\tencodedHiscore += "s"; break;\n\t\t\t\tcase "Regular geological formations":\t\t\t\tencodedHiscore += "t"; break;\n\n\t\t\t\t\t\t/* Special event features */\n\t\t\t\tcase "Welcoming":\t\t\t\t\t\t\t\t\tencodedHiscore += "u"; break;\n\t\t\t\tcase "Unwelcoming":\t\t\t\t\t\t\t\t\tencodedHiscore += "v"; break;\n\t\t\t\tcase "Simulation":\t\t\t\t\t\t\t\t\tencodedHiscore += "w"; break;\n\t\t\t\tcase "Alien observers":\t\t\t\t\t\t\t\tencodedHiscore += "x"; break;\n\n\t\t\t\t\t\t/* Planet-spanning civilisation */\n\t\t\t\tcase "Planet-spanning civilisation":\t\t\t\tencodedHiscore += "y"; break;\n\n\t\t\t}\n\t\t}\n\n\t\t\t/* NATIVE TECH LEVEL AND CULTURE*/\n\t\tencodedHiscore += ".";\n\t\tencodedHiscore += hiscore.planet.native_tech_level;\n\t\tencodedHiscore += "-";\n\t\tencodedHiscore += hiscore.planet.native_culture;\n\n\t\t\t/* PLANET NAME */\n\t\tencodedHiscore += ".";\n\t\tif (hiscore.planet.name)\n\t\t{\n\t\t\tvar encodedName = hiscore.planet.name;\n\t\t\tencodedName = encodedName.replace("'","%27");\n\t\t\tencodedName = encodedName.replace(".","%2E");\n\t\t\tencodedHiscore += encodeURIComponent(encodedName);\n\t\t}\n\n\t} else {\n\t\tencodedHiscore += "X..";\n\n\t}\n\n\t\t/* LANDING AND CONSTRUCTION SCORES */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.score_landing;\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.score_construction;\n\n\t\t/* NATIVE RELATIONS */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.native_relations;\n\n\t\t/* TECHNOLOGY */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.final_tech_level;\n\n\t\t/* CULTURE */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.final_culture;\n\n\t\t/* SCIENTIFIC DATABASE */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.score_scientific_database;\n\n\t\t/* CULTURE */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.score_cultural_database;\n\n\t\t/* NUMBER OF PLANETS VISITED */\n\tencodedHiscore += ".";\n\tif (hiscore.planets_visited) {\n\t\tencodedHiscore += hiscore.planets_visited;\n\t} else {\n\t\tencodedHiscore += "0";\n\t}\n\n\t\t/* DATE */\n\tvar hsdate = new Date(hiscore.date);\n\tencodedHiscore += ".";\n\tencodedHiscore += hsdate.getFullYear();\n\tencodedHiscore += "-";\n\tencodedHiscore += hsdate.getMonth() + 1;\n\tencodedHiscore += "-";\n\tencodedHiscore += hsdate.getDate();\n\n\t\t/* EXTRA COLONISTS */\n\tencodedHiscore += ".";\n\tencodedHiscore += hiscore.score_extra_colonists;\n\n\treturn encodedHiscore;\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[[Upgrade the atmosphere scanner to work at long range|Move on][$scanner_atmosphere_level = 1]]\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[[Upgrade the atmosphere scanner to work better at long range|Move on][$scanner_atmosphere_level = 2]]\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[[Upgrade the gravity scanner to work at long range|Move on][$scanner_gravity_level = 1]]\n\t\t\tThe guidance system will seek out planets with non-extreme gravity.\n\t\t<<case 1>>\s\n\t\t\t[[Upgrade the gravity scanner to work better at long range|Move on][$scanner_gravity_level = 2]]\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[[Upgrade the temperature scanner to work at long range|Move on][$scanner_temperature_level = 1]]\n\t\t\tThe guidance system will seek out planets with non-extreme temperature.\n\t\t<<case 1>>\s\n\t\t\t[[Upgrade the temperature scanner to work better at long range|Move on][$scanner_temperature_level = 2]]\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[[Upgrade the water scanner to work at long range|Move on][$scanner_water_level = 1]]\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[[Upgrade the water scanner to work better at long range|Move on][$scanner_water_level = 2]]\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[[Upgrade the resources scanner to work at long range|Move on][$scanner_resources_level = 1]]\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[[Upgrade the resources scanner to work better at long range|Move on][$scanner_resources_level = 2]]\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 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 */\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/% Alien observation posts for the Reservation feature %/\n\t<<if $planet.surface_features.includes("Alien observers")>>\n\t\tAt night, the orbiting alien structures are visible as a glittering band across the stars.\n\t<</if>>\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\t\t<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t\t\ttheir own communities within the natives'\n\t\t<</if>>\n\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 constants.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 constants.native_relations_names[$hiscore.native_relations]>>\n\t\t\t<<case "Immigrants, Earth remembered">>\n\t\t\t\tThe humans live as immigrants inside the alien society, with a strong memory of Earth's cultural heritage that enhances the native culture.\n\t\t\t<<case "Immigrants, Earth forgotten">>\n\t\t\t\tThe humans live as immigrants inside the alien society, and have forgotten most of the cultural heritage of Earth.\n\t\t\t\t\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\t\n\t\t<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t\t\tAt the seedship's landing site\n\t\t<<else>>\n\t\t\tIn the\n\t\t\t<<if constants.culture_names[$hiscore.final_culture] == "Post-Nuclear Wasteland" | $hiscore.final_tech_level < 2>>\n\t\t\t\truins of the\n\t\t\t<</if>>\n\t\t\tfirst city\n\t\t<</if>>\n\t\t<<set _journey_deaths = (constants.max_colonists+$hiscore.score_extra_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
<<run $("#starfield").remove()>>\nAnd 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<span id="fadein3" style="display:none">To 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.<br><br></span>\n\n<span id="fadein4" style="display:none">The 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.<br><br></span>\n\n\n\n<span id="scrollto1"></span>\n<<linkreplace "Continue" t8n>>\n\t<script>$("#fadein1").fadeIn();</script>\n\n\t<<linkreplace "Continue" t8n>>\n\t\t<script>$("#fadein2").fadeIn();</script>\n\n\t\t<<linkreplace "Continue" t8n>>\n\t\t\t<<script>>\n\t\t\t\t$("#fadein3").fadeIn();\n\t\t\t\t$('html, body').animate({\n\t\t\t\t\tscrollTop: $('#fadein3').offset().top\n\t\t\t\t});\n\t\t\t<</script>>\n\n\t\t\t<<linkreplace "Continue" t8n>>\n\t\t\t\t<<script>>\n\t\t\t\t\t$("#fadein4").fadeIn();\n\t\t\t\t\t$('html, body').animate({\n\t\t\t\t\t\tscrollTop: $('#fadein4').offset().top\n\t\t\t\t\t});\n\t\t\t\t<</script>>\n\n\t\t\t\t<<continueLink [[Intro 2]]>>\n\n\t\t\t<</linkreplace>>\n\t\t<</linkreplace>>\n\t<</linkreplace>>\n<</linkreplace>>\n<div class="skip-intro-link">\n<<link "Skip intro">>\n\t<<run $("#status-display").show()>>\n\t<<goto "Generate planet">>\n<</link>>\n</div>
<<run $("#status-display").fadeIn()>>\s\nAny 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 chambers 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>>
<<widget refreshStatusDisplay>>\n\t<<script>>\n\t\tsetPageElement("status-display", "Status Display");\n\t<</script>>\n<</widget>>
window.calculateFinalScore = function (hiscore) {\n\t/* hiscore is a partly-completed hiscore object */\n\t/* Function returns the hiscore object with all the scores filled in */\n\n\tif (hiscore.planet)\n\t{\n\t\t/* Add score for planet attributes */\n\t\tswitch (hiscore.planet.atmosphere)\n\t\t{\n\t\t\tcase "Marginal":\t\thiscore.score_atmosphere = constants.max_score_per_planet_attribute/2; break;\n\t\t\tcase "Breathable":\thiscore.score_atmosphere = constants.max_score_per_planet_attribute; break;\n\t\t\tdefault:\t\t\t\t\t\thiscore.score_atmosphere = 0;\n\t\t}\n\n\t\tswitch (hiscore.planet.gravity)\n\t\t{\n\t\t\tcase "Low": case "High":\thiscore.score_gravity = constants.max_score_per_planet_attribute/2; break;\n\t\t\tcase "Moderate":\t\t\t\t\thiscore.score_gravity = constants.max_score_per_planet_attribute; break;\n\t\t\tdefault:\t\t\t\t\t\t\t\t\thiscore.score_gravity = 0;\n\t\t}\n\n\t\tswitch (hiscore.planet.temperature)\n\t\t{\n\t\t\tcase "Hot": case "Cold":\thiscore.score_temperature = constants.max_score_per_planet_attribute/2; break;\n\t\t\tcase "Moderate":\t\t\t\t\thiscore.score_temperature = constants.max_score_per_planet_attribute; break;\n\t\t\tdefault:\t\t\t\t\t\t\t\t\thiscore.score_temperature = 0;\n\t\t}\n\n\t\tswitch (hiscore.planet.water)\n\t\t{\n\t\t\tcase "Ice-covered surface":\n\t\t\tcase "Planet-wide ocean":\n\t\t\t\thiscore.score_water = constants.max_score_per_planet_attribute/2; break;\n\t\t\tcase "Ice caps":\n\t\t\tcase "Oceans":\n\t\t\t\thiscore.score_water = constants.max_score_per_planet_attribute; break;\n\t\t\tdefault:\n\t\t\t\thiscore.score_water = 0;\n\t\t}\n\n\t\tswitch (hiscore.planet.resources)\n\t\t{\n\t\t\tcase "Poor":\t\t\t\thiscore.score_resources = constants.max_score_per_planet_attribute/2; break;\n\t\t\tcase "Rich":\t\t\t\thiscore.score_resources = constants.max_score_per_planet_attribute; break;\n\t\t\tdefault:\t\t\t\t\t\thiscore.score_resources = 0;\n\t\t}\n\n\n\t\t/* Add score for tech and culture levels */\n\t\tswitch (hiscore.final_tech_level)\n\t\t{\n\t\t\tcase 10:\thiscore.score_technology = 3000; break;\n\t\t\tcase 9:\t\thiscore.score_technology = 2000; break;\n\t\t\tcase 8:\t\thiscore.score_technology = 1750; break;\n\t\t\tcase 7:\t\thiscore.score_technology = 1500; break;\n\t\t\tcase 6:\t\thiscore.score_technology = 1250; break;\n\t\t\tcase 5:\t\thiscore.score_technology = 1000; break;\n\t\t\tcase 4:\t\thiscore.score_technology = 800; break;\n\t\t\tcase 3:\t\thiscore.score_technology = 600; break;\n\t\t\tcase 2:\t\thiscore.score_technology = 400; break;\n\t\t\tcase 1:\t\thiscore.score_technology = 200; break;\n\t\t\tdefault:\thiscore.score_technology = 0; break;\n\t\t}\n\n\t\tswitch (hiscore.final_culture)\n\t\t{\n\t\t\tcase 17:\thiscore.score_culture = 3000; break;\n\t\t\tcase 16:\thiscore.score_culture = 2500; break;\n\t\t\tcase 15:\thiscore.score_culture = 2000; break;\n\t\t\tcase 14:\thiscore.score_culture = 1500; break;\n\t\t\tcase 13:\thiscore.score_culture = 1000; break;\n\t\t\tcase 12:\thiscore.score_culture = 500; break\n\t\t\tcase 11:\thiscore.score_culture = 250; break;\n\t\t\tcase 10:\thiscore.score_culture = 0; break;\n\t\t\tcase 9:\t\thiscore.score_culture = 2000; break;\n\t\t\tcase 8:\t\thiscore.score_culture = 1500; break;\n\t\t\tcase 7:\t\thiscore.score_culture = 1000; break;\n\t\t\tcase 6:\t\thiscore.score_culture = 500; break;\n\t\t\tcase 5:\t\thiscore.score_culture = 0; break;\n\t\t\tcase 4:\t\thiscore.score_culture = 2000; break;\n\t\t\tcase 3:\t\thiscore.score_culture = 1500; break;\n\t\t\tcase 2:\t\thiscore.score_culture = 1000; break;\n\t\t\tcase 1:\t\thiscore.score_culture = 500; break;\n\t\t\tdefault:\thiscore.score_culture = 0; break;\n\t\t}\n\n\t\tswitch (hiscore.native_relations)\n\t\t{\n\t\t\tcase 9:\t\thiscore.score_native_relations = 1000; break;\n\t\t\tcase 8:\t\thiscore.score_native_relations = 0; break;\n\t\t\tcase 7:\t\thiscore.score_native_relations = -1000; break;\n\t\t\tcase 6:\t\thiscore.score_native_relations = 2000; break;\n\t\t\tcase 5:\t\thiscore.score_native_relations = 1000; break;\n\t\t\tcase 4:\t\thiscore.score_native_relations = 0; break;\n\t\t\tcase 3:\t\thiscore.score_native_relations = -1000; break;\n\t\t\tcase 2:\t\thiscore.score_native_relations = -1000; break;\n\t\t\tcase 1:\t\thiscore.score_native_relations = -2000; break;\n\t\t\tcase 0:\t\thiscore.score_native_relations = -2000; break;\n\t\t\tcase -1:\thiscore.score_native_relations = 0; break;\n\t\t\tdefault: hiscore.score_native_relations = 0; break;\n\t\t}\n\t}\n\n\t/* Add up final score */\n\thiscore.final_score = \n\t\thiscore.score_landing +\n\t\thiscore.score_construction +\n\t\thiscore.score_native_relations +\n\t\thiscore.score_culture +\n\t\thiscore.score_technology +\n\t\thiscore.score_scientific_database +\n\t\thiscore.score_cultural_database +\n\t\thiscore.score_atmosphere +\n\t\thiscore.score_gravity +\n\t\thiscore.score_temperature +\n\t\thiscore.score_water +\n\t\thiscore.score_resources;\n\t\n\treturn hiscore;\n}
<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t<<set $planet.name = either(constants.alien_planet_names)>>\n<<else>>\n\t<<set _possible_names = []>>\n\t<<set _backup_names = ["This World"]>>\n\n\t<<if $planet.atmosphere == "Breathable"\n\t\t& $planet.temperature == "Moderate"\n\t\t& $planet.gravity == "Moderate"\n\t\t& $planet.water == "Oceans"\n\t\t& $planet.resources == "Rich">>\n\t\t<<set _possible_names.push("Eden")>>\n\t\t<<set _possible_names.push("Paradise")>>\n\t\t<<set _possible_names.push("Terra Nova")>>\n\t\t<<set _possible_names.push("New Earth")>>\n\t\t<<set _possible_names.push("Gaia")>>\n\t<<else>>\n\n\t\t<<if $planet.temperature == "Very hot">>\n\t\t\t<<set _possible_names.push("Inferno")>>\n\t\t\t<<set _possible_names.push("Caliente")>>\n\t\t\t<<set _possible_names.push("Scorcha")>>\n\t\t<<elseif $planet.temperature == "Hot">>\n\t\t\t<<set _backup_names.push("Inferno")>>\n\t\t\t<<set _backup_names.push("Caliente")>>\n\t\t\t<<set _backup_names.push("Scorcha")>>\n\t\t<<elseif $planet.temperature == "Very cold">>\n\t\t\t<<set _possible_names.push("Arctica")>>\n\t\t\t<<set _possible_names.push("Frigidia")>>\n\t\t\t<<set _possible_names.push("Frigus")>>\n\t\t<<elseif $planet.temperature == "Cold">>\n\t\t\t<<set _backup_names.push("Arctica")>>\n\t\t\t<<set _backup_names.push("Frigidia")>>\n\t\t\t<<set _backup_names.push("Frigus")>>\n\t\t<</if>>\n\n\t\t<<if $planet.gravity == "Very high" & $planet.water != "Planet-wide ocean">>\n\t\t\t<<set _possible_names.push("Cueball")>>\n\t\t\t<<set _possible_names.push("Atlas")>>\n\t\t<<elseif $planet.gravity == "High" & $planet.water != "Planet-wide ocean">>\n\t\t\t<<set _backup_names.push("Cueball")>>\n\t\t\t<<set _backup_names.push("Atlas")>>\n\t\t<<elseif $planet.gravity == "Very low" & $planet.water != "Planet-wide ocean">>\n\t\t\t<<set _possible_names.push("Crag")>>\n\t\t\t<<set _possible_names.push("Rise")>>\n\t\t<<elseif $planet.gravity == "Low" & $planet.water != "Planet-wide ocean">>\n\t\t\t<<set _backup_names.push("Crag")>>\n\t\t\t<<set _backup_names.push("Rise")>>\n\t\t<</if>>\n\n\t\t<<if $planet.water == "Planet-wide ocean">>\n\t\t\t<<set _possible_names.push("Atlantis")>>\n\t\t\t<<set _possible_names.push("Oceanus")>>\n\t\t\t<<set _possible_names.push("Thalassa")>>\n\t\t\t<<set _possible_names.push("Pacifica")>>\n\t\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t\t<<set _possible_names.push("Snowball")>>\n\t\t\t<<set _possible_names.push("Iceball")>>\n\t\t\t<<set _possible_names.push("Popsicle")>>\n\t\t\t<<set _possible_names.push("Glacia")>>\n\t\t<<elseif $planet.water == "Trace" | $planet.water == "None">>\n\t\t\t<<set _possible_names.push("Arid")>>\n\t\t\t<<set _possible_names.push("Desert")>>\n\t\t\t<<set _possible_names.push("Sandstone")>>\n\t\t\t<<set _possible_names.push("Thirsty")>>\n\t\t<</if>>\n\n\t\t<<if $planet.resources == "Rich">>\n\t\t\t<<set _possible_names.push("Bounty")>>\n\t\t\t<<set _possible_names.push("El Dorado")>>\n\t\t\t<<set _possible_names.push("Hephaestus")>>\n\t\t\t<<set _possible_names.push("Midas")>>\n\t\t<<elseif $planet.resources == "Poor">>\n\t\t\t<<set _possible_names.push("Dearth")>>\n\t\t\t<<set _possible_names.push("Paucity")>>\n\t\t<</if>>\n\n\n\t\t\t/% Plants %/\n\t\t<<if $planet.surface_features.includes("Plant life") | $planet.surface_features.includes("Edible plants") | $planet.surface_features.includes("Poisonous plants")>>\n\t\t\t<<set _possible_names.push("Garden")>>\n\t\t\t<<set _possible_names.push("Arcadia")>>\n\t\t<</if>>\n\n\t\t<<if $planet.surface_features.includes("Poisonous plants")>>\n\t\t\t<<set _possible_names.push("Belladonna")>>\n\t\t<<elseif $planet.surface_features.includes("Edible plants")>>\n\t\t\t<<set _possible_names.push("Cornucopia")>>\n\t\t<</if>>\n\n\t\t<<if $planet.surface_features.includes("Airtight caves") | $planet.surface_features.includes("Insulated caves")>>\n\t\t\t<<set _possible_names.push("Warren")>>\n\t\t\t<<set _possible_names.push("Honeycomb")>>\n\t\t\t<<set _possible_names.push("Morlock")>>\n\t\t\t<<set _possible_names.push("Subterra")>>\n\t\t\t<<set _possible_names.push("Spelunk")>>\n\t\t<</if>>\n\t<</if>>\n\n\t/* Pick a name */\n\t<<if _possible_names.length == 0>>\n\t\t<<set _possible_names = _backup_names>>\n\t<</if>>\n\t<<set $planet.name = either(_possible_names)>>\n\n<</if>>\n\n/* Now the first impression text */\n<<if $colonists >= constants.max_colonists>>\n\tThe colonists\n<<elseif $colonists >= constants.max_colonists/2>>\n\tThe surviving colonists\n<<elseif $colonists >= 0>>\n\tThe few surviving colonists\n<</if>>\n\nwake from their sleep chambers and survey their new home.\n\n/* Landscape */\n<<if $planet.water == "Planet-wide ocean">>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>The seedship tosses on an ocean of slow, kilometres-high waves, beneath\n\t\t<<case "Low">>The seedship rocks on the surface of an ocean of slow, tall waves, beneath\n\t\t<<case "Moderate">>The ship floats on the surface of an ocean that stretches to the horizon\n\t\t<<case "High">>The ship floats on the surface of a calm ocean that stretches to the horizon\n\t\t<<case "Very high">>The ship rests on the surface of a mirror-flat ocean beneath\n\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t<</switch>>\n<<elseif $planet.surface_features.includes("Plant life")\n\t\t| $planet.surface_features.includes("Edible plants")\n\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>Forests of impossibly slender alien plants reach kilometres into\n\t\t<<case "Low">>Forests of tall alien plants reach hundreds of metres into\n\t\t<<case "Moderate">>Forests of alien vegetation stretch away beneath\n\t\t<<case "High">>Fields of squat, thick-limbed alien plants stretch away beneath\n\t\t<<case "Very high">>Level fields of alien moss stretch away beneath\n\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t<</switch>>\n<<elseif $planet.water == "Ice-covered surface">>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>Kilometres-high spires of ice reach into\n\t\t<<case "Low">>Tall, jagged spires of ice reach into\n\t\t<<case "Moderate">>Jagged shards of ice stretch away beneath\n\t\t<<case "High">>A crumpled plain of ice stretches away beneath\n\t\t<<case "Very high">>A perfectly flat plain of ice stretches away beneath\n\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t<</switch>>\n<<elseif $planet.atmosphere == "None">>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>A jagged landscape of high crater walls and towering shards of rock stretches away beneath\n\t\t<<case "Low">>A jagged, cratered landscape stretches away beneath\n\t\t<<case "Moderate">>A perfectly still, cratered landscape stretches away beneath\n\t\t<<case "High">>A perfectly still landscape, flat except for a few shallow craters, stretches away beneath\n\t\t<<case "Very high">>A perfectly still, flat landscape stretches away beneath\n\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t<</switch>>\n<<else>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>A landscape of spindly rock outcroppings and impossibly tall mountains stretches away beneath\n\t\t<<case "Low">>A landscape of huge boulders and towering mountains stretches away beneath\n\t\t<<case "Moderate">>A barren, rocky landscape stretches away beneath\n\t\t<<case "High">>A flat, rocky landscape stretches away beneath\n\t\t<<case "Very high">>A perfectly flat, barren landscape stretches away beneath\n\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t<</switch>>\n<</if>>\n\n/* Sky (come back to this and add more) */\n<<switch $planet.atmosphere>>\n\t<<case "Breathable">>\n\t\ta blue sky.\n\t<<case "Marginal">>\n\t\ta pale blue sky.\n\t<<case "None">>\n\t\ta black, star-studded sky.\n\t<<case "Non-breathable">>\n\t\tan alien sky.\n\t<<case "Toxic">>\n\t\ta poisonous sky.\n\t<<case "Corrosive">>\n\t\ta sky filled with corrosive clouds.\n\t<<default>>\n\t\t@@.error;Unexpected atmosphere $planet.atmosphere@@\n<</switch>>\n\n\n<<if $planet.surface_features.includes("Planet-spanning civilisation")>>\n\t<<if $planet.native_tech_level < 6>>\n\t\tThe seedship is quickly surrounded by a crowd of wary natives.\n\t<<elseif $planet.native_tech_level < 8>>\n\t\tThe seedship is quickly surrounded by an encampment of native soldiers, scholars, priests and diplomats.\n\t<<else>>\n\t\tThe seedship is quickly surrounded by an encampment of native soldiers, scientists, and diplomats.\n\t<</if>>\n\tThe two species manage to achieve communications, and the colonists learn that the natives call their planet <<= $planet.name>>.\n<<else>>\n\t<<if $colonists < constants.max_colonists>>\n\t\tThey build a memorial to the <<print constants.max_colonists-$colonists>> colonists who did not survive the journey, and\n\t<<else>>\n\t\tThey\n\t<</if>>\n\n\tname their new world\n\n\t<span id="name" class="inline-link">\n\t<<link $planet.name>>\n\t\t<<script>>\n\t\t\t$('#name').hide();\n\t\t\t$('#name-dialog').show();\n\t\t<</script>>\n\t<</link>>,\n\n\t<<switch $planet.name>>\n\t\t<<case "Inferno", "Caliente", "Scorcha">>because of its extreme heat.\n\t\t<<case "Arctica", "Frigidia", "Frigus">>because of its extreme cold.\n\t\t<<case "Cueball">>because its high gravity makes its horizon completely flat.\n\t\t<<case "Atlas">>because standing under its high gravity takes a heroic effort.\n\t\t<<case "Crag", "Rise">>because its low gravity means it has many high, craggy mountains.\n\t\t<<case "Atlantis" "Oceanus", "Thalassa", "Pacifica">>because all its land is sunk beneath its planet-wide ocean.\n\t\t<<case "Snowball" "Iceball", "Popsicle", "Glacia">>because its surface is entirely covered in ice.\n\t\t<<case "Arid" "Desert", "Sandstone", "Thirsty">>because of its lack of water.\n\t\t<<case "Arcadia" "Garden">>because of its lush plant life.\n\t\t<<case "Belladonna">>because of its poisonous plants.\n\t\t<<case "Cornucopia">>because of its plentiful edible plants.\n\t\t<<case "Warren" "Honeycomb", "Morlock", "Subterra", "Spelunk">>because of the extensive cave system riddling its crust.\n\t\t<<case "Bounty" "El Dorado", "Hephaestus", "Midas">>because of its plentiful mineral resources.\n\t\t<<case "Dearth" "Paucity">>because of its lack of mineral resources.\n\t\t<<case "Eden" "Paradise", "Gaia">>because of its perfect conditions.\n\t\t<<case "New Earth" "Terra Nova">>because it resembles the Earth they left behind.\n\t\t<<case "This World">>because it is this world.\n\n\t\t<<default>>@@.error;Unexpected planet name $planet.name@@\n\t<</switch>>\n\t</span>\n\n\t<span id="name-dialog" style="display:none">\n\t\t<<textbox "$planet.name" $planet.name autofocus>>\n\n\t\t<span id="enterAct"><<link "Done">>\n\t\t\t<<replace "#name">>\n\t\t\t\t<<link $planet.name>>\n\t\t\t\t\t<<script>>\n\t\t\t\t\t\t$('#name').hide();\n\t\t\t\t\t\t$('#name-dialog').show();\n\t\t\t\t\t<</script>>\n\t\t\t\t<</link>>.\n\t\t\t<</replace>>\n\t\t\t<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\t\t\t<<script>>\n\t\t\t\t$('#name').show();\n\t\t\t\t$('#name-dialog').hide();\n\t\t\t<</script>>\n\t\t<</link>></span>\n\t</span>\n\n\t<<script>>\n\t(function(){\n\t\t$(document).keyup(function(e){\n\t\t\tif(e.keyCode == 13){\n\t\t\t\t\t/* Enter */\n\t\t\t\t$('#enterAct a').trigger("click");\n\t\t\t}\n\t\t});\n\t}());\n\t<</script>>\n<</if>>\n\n/* Update planet stats because it now has a name. */\n<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\n<br><br><<FCNextPassage [[FC Construction]]>>\n\n
<<widget randomSystem>>\n\t<<set $system = either(constants.system_names)>>\n<</widget>>\n\n/* randomSystemExcluding */\n/* Each argument should be either a system name or the word "destroyed". */\n/* Will return a random system from a list excluding the system names in the arguments. */\n/* If one argument is "destroyed", will also exclude destroyed systems. */\n<<widget randomSystemExcluding>>\n\t<<set _allowed_systems = []>>\n\t<<for $n = 0; $n < constants.system_names.length; $n++>>\n\t\t<<set _this_system = constants.system_names[$n]>>\n\t\t<<if !$args.includes(_this_system) >>\n\t\t\t<<getSystemStrength _this_system>>\n\t\t\t<<if $system_strength > 0 | !$args.includes("destroyed")>>\n\t\t\t\t<<set _allowed_systems.push(_this_system)>>\n\t\t\t<</if>>\n\t\t<</if>>\n\t<</for>>\n\t<<if _allowed_systems.length == 0>>\n\t\t<<set $system = "">>\n\t<<else>>\n\t\t<<set $system = either(_allowed_systems)>>\n\t<</if>>\n<</widget>>\n\n/* randomIntactSystemFrom */\n/* Returns a random system from the given list, choosing between only those systems that are not destroyed */\n<<widget randomIntactSystemFrom>>\n\t<<set _allowed_systems = []>>\n\t<<for $n = 0; $n < $args.length; $n++>>\n\t\t<<set _this_system = $args[$n]>>\n\t\t<<getSystemStrength _this_system>>\n\t\t<<if $system_strength > 0>>\n\t\t\t<<set _allowed_systems.push(_this_system)>>\n\t\t<</if>>\n\t<</for>>\n\t<<set $system = either(_allowed_systems)>>\n<</widget>>\n
<<silently>>\n\t<<set $surface_probe_used = true>>\n\t<<set $surface_probes -= 1>>\n\t<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\t<<refreshStatusDisplay>>\n\t<<set $surface_probe_current_feature = 0>>\s\n\t<<replace "#anomalies_title_text">>Surface features:<</replace>>\s\n\t<<replace "#anomalies_text">><</replace>>\s\n\n<</silently>>\s\n<<nobr>>\n\n\tThe surface probe's sensors\n\n\t<<if $scanner_atmosphere_success\n\t\t& $scanner_gravity_success\n\t\t& $scanner_temperature_success\n\t\t& $scanner_resources_success\n\t\t& $scanner_water_success>>\n\t\tconfirm the readings of the ship's orbital scanners.\n\t<<else>>\n\t\tfill the gaps in the data the ship could gather from orbit.\n\t<</if>>\n\n\t<<set $scanner_atmosphere_success = true>>\n\t<<set $scanner_gravity_success = true>>\n\t<<set $scanner_temperature_success = true>>\n\t<<set $scanner_resources_success = true>>\n\t<<set $scanner_water_success = true>>\n\n\t<<scrollToPostPlanetStats>>\n<</nobr>>\n\n<<link "Continue">><<replaceAndFadeIn "#post-planet-stats" [[SP Feature]]>><</link>>\n
DEBUG: Edit ship stats\n\nColonists: <<textbox "$colonists" $colonists>>/constants.max_colonists\n\nAtmosphere scanner: <<textbox "$scanner_atmosphere" $scanner_atmosphere>>/100, level <<textbox "$scanner_atmosphere_level" $scanner_atmosphere_level>>/2\nGravity scanner: <<textbox "$scanner_gravity" $scanner_gravity>>/100, level <<textbox "$scanner_gravity_level" $scanner_gravity_level>>/2\nTemperature scanner: <<textbox "$scanner_temperature" $scanner_temperature>>/100, level <<textbox "$scanner_temperature_level" $scanner_temperature_level>>/2\nWater scanner: <<textbox "$scanner_water" $scanner_water>>/100, level <<textbox "$scanner_water_level" $scanner_water_level>>/2\nResources scanner: <<textbox "$scanner_resources" $scanner_resources>>/100, level <<textbox "$scanner_resources_level" $scanner_resources_level>>/2\nSurface probes: <<textbox "$surface_probes" $surface_probes>>/5\n\nLanding system: <<textbox "$system_landing" $system_landing>>/100\nConstructors: <<textbox "$system_constructors" $system_constructors>>/100\n\nCultural database: <<textbox "$system_cultural_database" $system_cultural_database>>/100\nScientific database: <<textbox "$system_scientific_database" $system_scientific_database>>/100\n\n\n<<nobr>><<linkreplace "Done">>\n\t<<set $colonists = Number($colonists)>>\n\t<<set $scanner_atmosphere = Number($scanner_atmosphere)>>\n\t<<set $scanner_gravity = Number($scanner_gravity)>>\n\t<<set $scanner_temperature = Number($scanner_temperature)>>\n\t<<set $scanner_water = Number($scanner_water)>>\n\t<<set $scanner_resources = Number($scanner_resources)>>\n\t<<set $surface_probes = Number($surface_probes)>>\n\n\t<<set $system_landing = Number($system_landing)>>\n\t<<set $system_constructors = Number($system_constructors)>>\n\n\t<<set $system_cultural_database = Number($system_cultural_database)>>\n\t<<set $system_scientific_database = Number($system_scientific_database)>>\n\n\tNumbers processed.\n\t\n\t<<return "Click here">>\n<</linkreplace>><</nobr>>\n\n\n\n
<<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">><<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 chamber after chamber 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\t<<scrollToResultArea>>\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">><<goto [[MO Done]]>><</link>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n\t<</link>></div>\n<</if>>
/* Random encounter chances */\n/* Initial: 2/10 uneventful, 7/10 common, 1/10 rare */\n/* Final: 5/10 malfunction, 4/10 common, 1/10 rare */\n\n<<unset $planet>>\n<<unset $off_course>>\n\n<<set _malfunction_chance = Math.min(visited()-5, 5)>>\n\n<<set _encounter = $last_encounter>>\n<<for _n = 0; $last_encounter == _encounter; _n++>>\n\t<<set _r = random(0,9)>>\n\t<<if _r < _malfunction_chance>>\n\t\t\t/* MALFUNCTIONS */\n\t\t<<set _encounter = either(constants.MO_encounters_malfunction)>>\n\t\t<<set $last_encounter_category = "Malfunction">>\n\t<<elseif _r < 2 & constants.MO_encounters_uneventful.length > 0 & $last_encounter_category != "Uneventful">>\n\t\t\t/* NOTHING INTERESTING HAPPENS - once each per playthrough */\n\t\t<<set _r2 = random(0,(constants.MO_encounters_uneventful.length)-1)>>\n\t\t<<set _encounter = constants.MO_encounters_uneventful[_r2]>>\n\t\t<<set constants.MO_encounters_uneventful.splice(_r2,1)>>\n\t\t<<set $last_encounter_category = "Uneventful">>\n\t<<elseif visited() < 3>>\n\t\t\t/* FIRST TWO EVENTS */\n\t\t<<set _encounter = either(constants.MO_encounters_first_two)>>\n\t\t<<set $last_encounter_category = "Common">>\n\t<<elseif _r == 9 & constants.MO_encounters_rare.length > 0 & $last_encounter_category != "Rare">>\n\t\t\t/* RARE EVENTS - once each per playthrough */\n\t\t<<set _r2 = random(0,(constants.MO_encounters_rare.length)-1)>>\n\t\t<<set _encounter = constants.MO_encounters_rare[_r2]>>\n\t\t<<set constants.MO_encounters_rare.splice(_r2,1)>>\n\t\t<<set $last_encounter_category = "Rare">>\n\t<<else>>\n\t\t\t/* COMMON EVENTS */\n\t\t<<set _encounter = either(constants.MO_encounters_common)>>\n\t\t<<set $last_encounter_category = "Common">>\n\t<</if>>\n<</for>>\n<<set $last_encounter = _encounter>>\n<<set $event_planet = {}>>\n\n<<if visited() == 1>>\n\tThe AI judges the first planet to be unsuitable. It turns its scanners away, spreads its solar sails, and begins another long journey through the void.\n\n\t<br><br><<continueLink _encounter>>\n<<else>>\n\t<<goto _encounter>>\n<</if>>\n
/* Small-screen (mobile) formatting is default. Then changed for big screens. */\n\n.debug-text {\n\t/* Un-comment display:none for release */\n\tdisplay: none;\n\tpadding: 0.25em;\n\tbackground-color: #003300;\n\tborder-left: 0.5em solid #00FF00;\n}\n\n\n/* Small screens: status bar at the top with 80% text size, planet scan in one vertical table */\n#status-display {\n\tbox-sizing: border-box;\n\tbackground-color: #111;\n\tborder: solid 1px #333;\n\tposition: fixed;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 8em;\n\tpadding: 0.5em 0.5em 0em 0.5em;\t/* Top, right, bottom, left */\n\tdisplay: none;\t/* Initially hidden */\n}\n\n.status-display-colonists {\n\tdisplay: block;\n\tbox-sizing: border-box;\n\twidth: 98%;\n\tmargin-bottom: 0.5em;\n}\n\n.status-display-block {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tbox-sizing: border-box;\n\twidth: 49%;\n}\n\n#status-display table {\n\tfont-size: 0.7em;\n\twidth: 100%;\n}\n\n#status-display td {\n\tpadding-bottom: 0.2em;\n\ttext-align: left;\n}\n\n.status-display-number-column {\n\twidth: 2em;\n}\n\n.status-display-change-column {\n\twidth: 2em;\n}\n\n#passages {\n\tmargin: 8em 0em 0em 0em;\t/* Top, right, bottom, left */\n\tpadding: 1em 0.5em;\n\tfont-size: 0.9em;\n}\n\n.front-matter #passages {\n\tmargin: 0em 0em 0em 0em;\t/* Top, right, bottom, left */\n}\n\n.skip-intro-link {\n\tposition:fixed;\n\tbottom: 20px;\n\tright: 30px;\n\tfont-size: 75%;\n\tbackground-color: #000;\n}\n\n.skip-intro-link a {\n\tfont-size: 1.0em !important;\n}\n\n#sidebar-status-display td {\n\tpadding: 0.3em 0;\n}\n\n.planet-display-table-area {\n\tdisplay: block;\n\twidth: 100%;\n\ttext-align: center;\n}\n\n.planet-display-table-section {\n\tdisplay: block;\n\tvertical-align: top;\n\twidth: 100%;\n\tmargin: 0em;\n\ttext-align: left;\n\t/*min-width: 12em;*/\n}\n\n.planet-display-table-section table {\n\twidth: 100%;\n}\n\n.main-loop-links {\n\twidth: 100%;\n\ttext-align: center;\n}\n\n.main-loop-links a {\n\tfont-size: initial;\t/* Full size font regardless of screen size, to make links easily clickable */\n\tdisplay: inline-block;\n\twidth: 40%;\n\tpadding: 0.1em 0.2em;\n\tmargin-bottom: 0.5em;\n}\n\na {\n\tdisplay: inline-block;\n\tborder: solid 1px #8af;\n\tbackground-color: #001;\n\tpadding: 0.1em 0.2em;\n\tmargin-bottom: 0.5em;\n}\n\n.disabled-hiscore-link {\n\tdisplay: inline-block;\n\tborder: solid 1px grey;\n\tcolor: grey;\n\tbackground-color: #050505;\n\tpadding: 0.1em 0.2em;\n\tmargin-bottom: 0.5em;\n}\n\n.surface-probe-link {\n\tfont-size: 0.8em;\n}\n\n.main-loop-link-spacer {\n\tdisplay: none;\n}\n\n.inline-link {\n\tpadding: initial;\n\tmargin-bottom: initial;\n}\n\n.inline-link a {\n\tpadding: initial;\n\tmargin-bottom: initial;\n}\n\n.score-table {\n\twidth: 100%;\n}\n\n.score-table td {\n\tfont-size: 0.8em;\n}\n\n.hiscore-table {\n\twidth: 100%;\n}\n\n.hiscore-table td {\n\tfont-size: 0.8em;\n}\n\n#title-screen-block {\n\ttext-align:center;\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n\n\n/* Medium screens: status bar at the left with 80% text size, planet scan in one vertical table */\n@media screen and (min-width: 30em) {\n\t#status-display {\n\t\twidth: 12em;\n\t\theight: 100%;\n\t\tpadding-top: 0.5em;\n\t\tpadding-bottom: 0em;\n\t\tpadding-left: 0.5em;\n\t\tpadding-right: 0.5em;\n\t}\n\n\t#status-display table {\n\t\tfont-size: 0.8em;\n\t}\n\n\t.status-display-block {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tmargin-bottom: 1em;\n\t}\n\n\t.status-display-colonists {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tmargin-bottom: 1em;\n\t}\n\n\t#passages {\n\t\tmargin: 0em 0em 0em 12em;\t/* Top, right, bottom, left. */\n\t\tpadding-top: 1em;\n\t\tpadding-bottom: 1em;\n\t\tpadding-left: 4em;\n\t\tpadding-right: 4em;\n\t}\n\n\n\t.score-table {\n\t\twidth: 90%;\n\t}\n\n\t/* Big screens: status bar at the left with 100% text size, planet scan in two side-by-side tables */\n\t@media screen and (min-width: 50em) {\n\t\t#status-display {\n\t\t\twidth: 17.5em;\n\t\t\theight: 100%;\n\t\t\tpadding-left: 1.5em;\n\t\t}\n\n\t\t#passages {\n\t\t\tmargin: 0em 0em 0em 17.5em;\t/* Top, right, bottom, left. */\n\t\t\tfont-size: 1.0em;\n\t\t}\n\n\t\t.planet-display-table-section {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\twidth: 48%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\n\t\t/* Normal link appearance, not buttons */\n\t\t.main-loop-links {\n\t\t\twidth: auto;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t.main-loop-links a {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t.score-table td {\n\t\t\tfont-size: initial;\n\t\t}\n\n\t\t.hiscore-table td {\n\t\t\tfont-size: initial;\n\t\t}\n\n\t\t/* In the app version, links are always buttons, do not become text on larger screens. Link spacer is always hidden. */\n\t\t/* If this is _not_ the app version, the html element will have the web-version class */\n\t\t.web-version a {\n\t\t\tfont-size: initial;\t/* Full size font regardless of screen size, to make links easily clickable */\n\t\t\tdisplay: initial;\n\t\t\tborder: initial;\n\t\t\tpadding: initial;\n\t\t\tmargin-bottom: initial;\n\t\t\tbackground-color: initial;\n\t\t}\n\n\t\t.web-version .disabled-hiscore-link {\n\t\t\tfont-size: initial;\t/* Full size font regardless of screen size, to make links easily clickable */\n\t\t\tdisplay: initial;\n\t\t\tborder: initial;\n\t\t\tpadding: initial;\n\t\t\tmargin-bottom: initial;\n\t\t\tbackground-color: initial;\n\t\t\tcolor: grey;\n\t\t}\n\n\t\t.web-version .main-loop-link-spacer {\n\t\t\tdisplay: initial;\n\t\t}\n\t}\n\n\t/* Tall enough screens: add padding to passages and status display. */\n\t@media screen and (min-height: 20em) {\n\t\t#status-display {\n\t\t\tpadding-top: 4em;\n\t\t}\n\n\t\t#passages {\n\t\t\tpadding-top: 4em;\n\t\t\tpadding-bottom: 4em;\n\t\t}\n\n\t}\n\n\t/* Tall screens: space out lines in status display if there's enough space for it. */\n\t@media screen and (min-height: 30em) {\n\t\t#status-display td {\n\t\t\tpadding-bottom: 0.5em;\n\t\t}\n\n\t\t/* Status bar has full size text only if screen is wide and tall. */\n\t\t@media screen and (min-width: 50em) {\n\t\t\t#status-display table {\n\t\t\t\tfont-size: 1.0em;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\nbody {\n\tbackground-color: #000;\n}\n\n\n.credits-small-text {\n\tfont-size: 0.75em;\n}\n\n.credits-small-text a {\n\tfont-size: 1.0em;\n}\n\n\n#title, #menu, #ui-bar-tray {\n\tdisplay: none;\n}\n\n.passage table {\n\tmargin: 0em 0;\n\tborder-collapse: collapse;\n\tfont-size: 100%;\n}\n.passage tr, .passage th, .passage td, .passage caption {\n\tpadding: 0px 5px;\n\tvertical-align: top;\n}\n\na:hover {\n\tcolor: #8af;\n\ttext-decoration: none;\n\ttext-shadow: 0px 0px 5px #8af;\n}\n\nh1 {\n\ttext-shadow: 0px 0px 50px #8af;\n}\n\n.scanning {\n\tcolor: grey;\n}\n\n.good {\n\tcolor: lime;\n}\n\n.mediocre {\n\tcolor: yellow;\n}\n\n.bad {\n\tcolor: red;\n}\n\n.destroyed {\n\tcolor: darkred;\n}\n\n.continue-text {\n\tfont-weight: bold;\n}\n\n.placeholder {\n\tpadding: 0.25em;\n\tbackground-color: #003333;\n\tborder-left: 0.5em solid #00FF00;\n}\n\n.fade-in {\n\ttransition: opacity 400ms ease-in;\n}\n\n#passages a.link-external:after {\n\tcontent: normal;\n}\n\n\n\n/* Style all font awesome icons */\n.fa a {\n\tdisplay: inline-block;\n\tpadding: 0.55em 0.5em 0.45em;\n\twidth: 1em;\n\theight: 1em;\n\ttext-align: center;\n\ttext-decoration: none;\n\tmargin: 5px 2px;\n\tborder-radius: 50%;\n color: white;\n\tbackground: #404040;\n\tborder: none;\n}\n\n/* Add a hover effect */\n.fa a:hover {\n\tcolor: white;\n\ttext-decoration: none;\n}\n\n/* Not using font awesome stylesheet to style these: putting the character code in the page explicitly */\n.icon-facebook a:hover {\n background: #3B5998;\n}\n\n.icon-facebook a:before {\n content: "\sf09a";\n}\n\n.icon-twitter a:hover {\n background: #55ACEE;\n}\n\n.icon-twitter a:before {\n content: "\sf099";\n}\n\n.icon-home a:hover {\n background: green;\n}\n\n.icon-home a:before {\n content: "\sf015";\n}\n\n.icon-chain a:hover {\n background: green;\n}\n\n.icon-chain a:before {\n content: "\sf0c1";\n}\n\n\n#starfield {\n -webkit-user-select: none; /* Chrome, Opera, Safari */\n -moz-user-select: none; /* Firefox 2+ */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Standard syntax */\n\toverflow:hidden;\n\tcursor:default;\n\tz-index:-10;\n}\n\n.title-screen-patreon-button {\n\tposition: absolute;\n\tbottom: 20px;\n\tleft: 20px;\n\topacity: 0.15;\n\twidth: 100px;\n\tmax-width: 25%;\n\theight: auto;\n}\n\n.title-screen-patreon-button img {\n\twidth: 100%;\n\theight: auto;\n}\n\n.title-screen-patreon-button:hover {\n\topacity: 0.3;\n}\n\n.title-screen-patreon-button a {\n\tborder: 0px none transparent;\n}\n\n\n.title-screen-support-area {\n\tposition: absolute;\n\tbottom: 20px;\n\tleft: 20px;\n\theight: auto;\n\tmargin-bottom: 0.5em;\n\topacity: 0.8;\n}\n\n.title-screen-version-number {\n\ttext-align:center;\n\tposition: absolute;\n\ttop: 5px;\n\tright: 5px;\n\tfont-size: 60%;\n\topacity: 0.8;\n}\n\n.title-screen-app-store-area {\n\tposition: absolute;\n\tbottom: 20px;\n\tright: 20px;\n\twidth: 150px;\n\tmax-width: 25%;\n\theight: auto;\n\ttext-align: center;\n}\n\n/* Google play image has padding in the image, whereas the app store one has to have it added in css */\n#google-play-image {\n\twidth: 150px;\n\tmax-width: 100%;\n\theight: auto;\n\tbox-sizing: border-box;\n}\n\n#app-store-image {\n\twidth: 150px;\n\tmax-width: 100%;\n\theight: auto;\n\tbox-sizing: border-box;\n\tpadding: 0% 6.5%;\n}\n\n.title-screen-app-store-area a {\n\tborder: none;\n\tbackground-color: transparent;\n\tpadding: 0em;\n\tmargin-bottom: 0em;\n}\n\n.title-screen-lod-toggle-area {\n\tposition: absolute;\n\tbottom: 20px;\n\tleft: 50%;\n\ttransform: translate(-50%, 0);\n\theight: auto;\n\tmargin-bottom: 0.5em;\n}\n\n.title-screen-toggle-dol {\n\tdisplay: none;\n}\n\n.dark-on-light .title-screen-toggle-dol {\n\tdisplay: initial;\n}\n\n.title-screen-toggle-lod {\n\tdisplay: initial;\n}\n\n.dark-on-light .title-screen-toggle-lod {\n\tdisplay: none;\n}\n\n\n.end-game-patreon-button {\n\tdisplay: inline-block;\n\tvertical-align: -32%;\n\topacity: 0.5;\n\twidth: 80px;\n\theight: auto;\n}\n\n.end-game-patreon-button img {\n\twidth: 100%;\n\theight: auto;\n}\n\n.end-game-patreon-button a {\n\tborder: 0px none transparent;\n}\n\n.end-game-patreon-button:hover {\n\topacity: 1.0;\n}\n\n\n\n/* Dark-on-light style -- toggleable from options */\n.dark-on-light {\n\tcolor: #000000;\n}\n\n.dark-on-light body {\n\tbackground: #FFFFFF;\n}\n\n.dark-on-light #status-display {\n\tbackground-color: #CCC;\n\tborder: solid 1px #333;\n}\n\n.dark-on-light a {\n\tcolor: #000099;\n\tbackground: none;\n}\n\n.dark-on-light .disabled-hiscore-link {\n\tbackground: none;\n}\n\n.dark-on-light .scanning {\n\tcolor: grey;\n}\n\n.dark-on-light .good {\n\tcolor: #009900;\n}\n\n.dark-on-light .mediocre {\n\tcolor: #333300;\n}\n\n.dark-on-light .bad {\n\tcolor: #990000;\n}\n\n.dark-on-light .destroyed {\n\tcolor: #993333;\n}\n\n.dark-on-light .fa a {\n color: white;\n\tbackground: #404040;\n}\n\n\n.dark-on-light .icon-facebook a:hover {\n background: #3B5998;\n}\n\n.dark-on-light .icon-twitter a:hover {\n background: #55ACEE;\n}\n\n.dark-on-light .icon-home a:hover {\n background: green;\n}\n\n\n.dark-on-light .skip-intro-link {\n\tbackground-color: #FFF;\n}\n\n.dark-on-light .title-screen-patreon-button img {\n\tbackground: #000;\n\tpadding: 0.1em;\n}\n\n.dark-on-light .title-screen-patreon-button {\n\topacity: 0.75;\n}\n\n.dark-on-light .title-screen-patreon-button:hover {\n\topacity: 1.0;\n}\n\n.dark-on-light .end-game-patreon-button img {\n\tbackground: #000;\n\tpadding: 0.1em;\n}\n\n.dark-on-light .end-game-patreon-button {\n\topacity: 0.75;\n}\n\n.dark-on-light .end-game-patreon-button:hover {\n\topacity: 1.0;\n}\n\n\n.dark-on-light h1 {\n\ttext-shadow: 0px 0px 50px #000;\n}\n\n\n\n.colourblind .good {\n\tcolor: cyan;\n}
<<widget FCNextPassage>>\n\t<<if $colonists <= 0>>\n\t\t<span id="spaceAct"><<link "Continue">>\n\t\t\t<<replaceAndFadeIn "#post-planet-stats" [[FC Done]]>>\n\t\t<</link>></span>\n\t<<else>>\n\t\t<span id="spaceAct"><<link "Continue">>\n\t\t\t<<replaceAndFadeIn "#post-planet-stats" $args[0]>>\n\t\t<</link>></span>\n\t<</if>>\n\t<<refreshStatusDisplay>>\n\n\t<<scrollToPostPlanetStats>>\n\n<</widget>>\n\n
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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>></div>\n
<<set _droneType = either("data", "repair")>>\n<<set _droneHealth = random(1,100)>>\n\nThe seedship tracks the signal to a small object orbiting in star's outer cometary cloud. The seedship AI transmits a greeting, and the object identifies itself as a support drone, launched after the seedship and sent to track and rendezvous with it.\n\n<<switch _droneType>>\n\t<<case "data">>\n\t\tIt claims to carry duplicates of the seedship's original scientific and cultural databases to repair any damage the seedship might have suffered.\n\t\t<<set _acceptText = "Accept data transfer">>\n\t<<case "repair">>\n\t\tIt claims to carry a swarm of robots that can repair damage to the seedship's scanners and systems.\n\t\t<<set _acceptText = "Accept repairs">>\n<</switch>>\n\n<<if _droneHealth < 25>>\n\tThe drone is barely functioning.\n<<elseif _droneHealth < 50>>\n\tThe drone is severely damaged.\n<<elseif _droneHealth < 75>>\n\tThe drone is visibly damaged.\n<<else>>\n\tThe drone bears pockmarks from micrometeorite impacts but is otherwise intact.\n<</if>>\n\n<br><br>\n\n<div id="result-area2">\n<<link _acceptText>>\n\t<<replace "#result-area2">>\n\t\t<<if random(0,75) >= _droneHealth>>\n\t\t\t/* Malfunction */\n\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe two robot ships attempt to rendezvous, but the drone's damaged guidance system malfunctions and it collides with the seedship's $system.\n\t\t<<elseif _droneType == "data">>\n\t\t\t<<set _repairAmount = Math.ceil(_droneHealth/2 + 50)>>\t/* 50-100 */\n\t\t\tThe probe matches course with the seedship and transmits its data,\n\t\t\t<<if $system_scientific_database >= 100 & $system_cultural_database >= 100>>\n\t\t\t\twhich confirms that the scientific and cultural databases are already intact.\n\t\t\t<<elseif $system_scientific_database >= 100>>\n\t\t\t\t<<set $system_cultural_database = Math.min(100, $system_cultural_database + _repairAmount)>>\n\t\t\t\twhich restores lost parts of the cultural database.\n\t\t\t<<elseif $system_cultural_database >= 100>>\n\t\t\t\t<<set $system_scientific_database = Math.min(100, $system_scientific_database + _repairAmount)>>\n\t\t\t\twhich restores lost parts of the scientific database.\n\t\t\t<<else>>\n\t\t\t\t<<set $system_cultural_database = Math.min(100, $system_cultural_database + _repairAmount)>>\n\t\t\t\t<<set $system_scientific_database = Math.min(100, $system_scientific_database + _repairAmount)>>\n\t\t\t\twhich restores lost parts of the scientific and cultural databases.\n\t\t\t<</if>>\n\t\t<<elseif _droneType == "repair">>\n\t\t\t<<if $scanner_atmosphere >= 100\n\t\t\t\t& $scanner_temperature >= 100\n\t\t\t\t& $scanner_gravity >= 100\n\t\t\t\t& $scanner_water >= 100\n\t\t\t\t& $scanner_resources >= 100\n\t\t\t\t& $system_landing >= 100\n\t\t\t\t& $system_constructors >= 100 >>\n\t\t\t\tRepair robots swarm across the seedship and check its systems for integrity, but find nothing they can repair.\n\t\t\t<<else>>\n\t\t\t\tRepair robots swarm across the seedship, dismantling the drone and using its parts to repair the seedship's systems.\n\t\t\t\t<<set _repairAmount = Math.ceil(_droneHealth/4 + 25)>>\t/* 25-50 */\n\t\t\t\t<<set $scanner_atmosphere = Math.min(100, $scanner_atmosphere + _repairAmount)>>\n\t\t\t\t<<set $scanner_temperature = Math.min(100, $scanner_temperature + _repairAmount)>>\n\t\t\t\t<<set $scanner_gravity = Math.min(100, $scanner_gravity + _repairAmount)>>\n\t\t\t\t<<set $scanner_water = Math.min(100, $scanner_water + _repairAmount)>>\n\t\t\t\t<<set $scanner_resources = Math.min(100, $scanner_resources + _repairAmount)>>\n\t\t\t\t<<set $system_landing = Math.min(100, $system_landing + _repairAmount)>>\n\t\t\t\t<<set $system_constructors = Math.min(100, $system_constructors + _repairAmount)>>\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\t@@.error;droneType should have been data or repair but was _droneType.@@\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n<br>\n<<link "Ignore the drone">>\n\t<<replace "#result-area2">>\n\t\tThe seedship continues towards the inner system, and the folorn ping of the drone fades away behind it.\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n</div>
The navigation system wakes the AI from its hibernation to report unusual astronomical readings. What looked at first like a faint brown dwarf star close to the seedship's course is exhibiting properties unlike any phenomenon that could occur in nature. Its mass is much greater than its faint luminosity would suggest, and what little radiation comes from it has a spectrum different from any known type of star.\n<br><br>\n<div id="result-area">\n<<link "Change course to investigate">>\n\t<<replace "#result-area">>\n\t\tThousands of years later, the AI wakes again as the seedship is decelerating into orbit of the strange star. Even from a few astronomical units out, the object is almost completely black. The seedship's navigation scanners reveal that the entire star is encased in a solid, opaque shell.\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\tSearching through the scientific database, the AI realises that it is a Dyson sphere--a previously hypothetical construct that captures the entire energy output of a star.\n\t\t<<else>>\n\t\t\tThe AI can find nothing like it in what remains of the scientific database.\n\t\t<</if>>\n\t\t<br><br>\n\t\t<div id="result-area2">\n\t\t\t<<link "Transmit an interspecies greeting">>\n\t\t\t\t<<replace "#result-area2">>\n\t\t\t\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\t\t\t<br><br>\n\t\t\t\t\t<<set _result = random(0,3)>>\n\t\t\t\t\t<<if _result == 0>>\n\t\t\t\t\t\tThere is no reply, but an aperture opens on the sphere's surface, spilling orange starlight into space. As the seedship passes over the aperture, a beam of focused starlight lances out and hits it, dealing massive damage and propelling it into interstellar space.\n\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t<<randomSystemExcluding "sleep chambers" "destroyed">>\n\t\t\t\t\t\t<<set _system1 = $system>>\n\t\t\t\t\t\t<<randomSystemExcluding "sleep chambers" _system1 "destroyed">>\n\t\t\t\t\t\t<<set _system2 = $system>>\n\t\t\t\t\t\t<<randomSystemExcluding "sleep chambers" _system1 _system2 "destroyed">>\n\t\t\t\t\t\t<<set _system3 = $system>>\n\t\t\t\t\t\t<<randomDamageHigh>>\t<<damageSystem _system1 $damage>>\n\t\t\t\t\t\t<<randomDamageHigh>>\t<<damageSystem _system2 $damage>>\n\t\t\t\t\t\t<<randomDamageHigh>>\t<<damageSystem _system3 $damage>>\n\t\t\t\t\t\t<<killColonistsMany>>\n\t\t\t\t\t\t<<set $off_course = true>>\n\t\t\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t\t<<elseif _result == 1>>\n\t\t\t\t\t\tThere is no reply, and the seedship's sensors can pick up no energy readings from the sphere at all besides the infra-red radition leaking from the star it surrounds. As it continues to orbit, it detects areas of damage or decay on the sphere's surface. It seems that the strange artefact is derelict and deserted, or else its inhabitants have no interest in maintaining its exterior or communicating with the outside universe. The AI can see no way to get inside the sphere or make use of it, but it adds its readings to the scientific database.\n\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t<<set $system_scientific_database += random(10,30)>>\n\t\t\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t\t<<elseif _result == 2>>\n\t\t\t\t\t\tAn enormous burst of data comes in reply. It starts similarly to the seedship's interspecies greeting, then leads to an introduction to the language and culture of the alien race that built the sphere. They appear to be millions of years old, with technology far in advance of humans', and much of the transmission is utterly incomprehensible to the human-built AI, but the AI saves what it can to the cultural database.\n\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t<<set $system_cultural_database += random(10,30)>>\n\t\t\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t\t<<elseif _result == 3>>\n\t\t\t\t\t\tA swarm of tiny objects peels off from the surface of the sphere and surrounds the seedship. Lasers probe every contour of the seedship's hull, and its electronics begin glitching as the objects search for and then find frequencies that will let them remotely interface with the seedship's computers. The scientific and cultural databases light up as the alien intelligence reads and analyses their contents.\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\tA wordless message appears in the AI's consciousness. The AI has difficulty understanding so vastly superior to its own, but manages to glean that the inhabitants of the sphere are offering sanctuary to the humans. They will construct a new home for humanity, based on the information from the ship's databases. But if the seedship accepts this offer, that will be humanity's new home; there will be no chance to move on.\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<div id="result-area3">\n\t\t\t\t\t\t\t<<link "Accept the aliens' offer">>\n\t\t\t\t\t\t\t\t/% Generate a new planet based on your surviving databases %/\n\t\t\t\t\t\t\t\t/% For each attribute, roll a % number %/\n\t\t\t\t\t\t\t\t/% If it's < the scientific database, attribute is perfect %/\n\t\t\t\t\t\t\t\t/% If it's < the scientific database * 2, attribute is mediocre (so 50% database guarantees at least an all-yellow planet) %/\n\t\t\t\t\t\t\t\t/% Otherwise, it's bad %/\n\t\t\t\t\t\t\t\t<<set $event_planet = {}>>\n\t\t\t\t\t\t\t\t/% Atmosphere %/\n\t\t\t\t\t\t\t\t<<set _r = random(0,99)>>\n\t\t\t\t\t\t\t\t<<if _r < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.atmosphere = "Breathable">>\n\t\t\t\t\t\t\t\t<<elseif _r < $system_scientific_database * 2>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.atmosphere = "Marginal">>\n\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.atmosphere = either("Corrosive", "Toxic", "Non-breathable", "None")>>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% Gravity %/\n\t\t\t\t\t\t\t\t<<set _r = random(0,99)>>\n\t\t\t\t\t\t\t\t<<if _r < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.gravity = "Moderate">>\n\t\t\t\t\t\t\t\t<<elseif _r < $system_scientific_database * 2>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.gravity = either("Low", "High")>>\n\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.gravity = either("Very low", "Very high")>>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% Temperature %/\n\t\t\t\t\t\t\t\t<<set _r = random(0,99)>>\n\t\t\t\t\t\t\t\t<<if _r < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.temperature = "Moderate">>\n\t\t\t\t\t\t\t\t<<elseif _r < $system_scientific_database * 2>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.temperature = either("Cold", "Hot")>>\n\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.temperature = either("Very cold", "Very hot")>>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% Water %/\n\t\t\t\t\t\t\t\t<<set _r = random(0,99)>>\n\t\t\t\t\t\t\t\t<<if _r < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.water = "Oceans">>\n\t\t\t\t\t\t\t\t<<elseif _r < $system_scientific_database * 2>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.water = "Planet-wide ocean">>\n\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.water = either("Trace", "None")>>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% Resources %/\n\t\t\t\t\t\t\t\t<<set _r = random(0,99)>>\n\t\t\t\t\t\t\t\t<<if _r < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.resources = "Rich">>\n\t\t\t\t\t\t\t\t<<elseif _r < $system_scientific_database * 2>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.resources = "Poor">>\n\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.resources = "None">>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% Freeze the oceans at low temperatures %/\n\t\t\t\t\t\t\t\t<<if $event_planet.temperature == "Very cold"\n\t\t\t\t\t\t\t\t\t| ($event_planet.temperature == "Cold" & random(0,1) == 0) >>\n\t\t\t\t\t\t\t\t\t<<if $event_planet.water == "Oceans">>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.water = "Ice caps">>\n\t\t\t\t\t\t\t\t\t<<elseif $event_planet.water == "Planet-wide ocean">>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.water = "Ice-covered surface">>\n\t\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t/% SURFACE FEATURES %/\n\t\t\t\t\t\t\t\t<<set $event_planet.surface_features = []>>\n\t\t\t\t\t\t\t\t<<set $event_planet.anomalies = []>>\n\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Simulation")>>\n\t\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Simulation")>>\n\n\t\t\t\t\t\t\t\t/% PLANTS %/\n\t\t\t\t\t\t\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Vegetation")>>\n\t\t\t\t\t\t\t\t\t<<if random(50,99) < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Edible plants")>>\n\t\t\t\t\t\t\t\t\t<<elseif random(0,49) > $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Poisonous plants")>>\n\t\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Plant life")>>\n\t\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t<</if>>\n\n\t\t\t\t\t\t\t\t/% ANIMALS -- CAN EXIST SEPARATELY FROM PLANTS IN THIS CASE BECAUSE IT'S A SIMUALTION %/\n\t\t\t\t\t\t\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Animal life")>>\n\t\t\t\t\t\t\t\t\t<<if random(50,99) < $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Useful animals")>>\n\t\t\t\t\t\t\t\t\t<<elseif random(0,49) > $system_scientific_database>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Dangerous animals")>>\n\t\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Animal life")>>\n\t\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t<</if>>\n\n\t\t\t\t\t\t\t\t/% A good cultural database makes the planet beautiful, a bad one makes it ugly %/\n\t\t\t\t\t\t\t\t<<if random(50,99) < $system_cultural_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Outstanding beauty")>>\n\t\t\t\t\t\t\t\t<<elseif random(0,49) > $system_cultural_database>>\n\t\t\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Outstanding ugliness")>>\n\t\t\t\t\t\t\t\t<</if>>\n\n\n\t\t\t\t\t\t\t\t/% Massive damage! %/\n\t\t\t\t\t\t\t\t<<set $scanner_atmosphere = 0>>\n\t\t\t\t\t\t\t\t<<set $scanner_gravity = 0>>\n\t\t\t\t\t\t\t\t<<set $scanner_temperature = 0>>\n\t\t\t\t\t\t\t\t<<set $scanner_resources = 0>>\n\t\t\t\t\t\t\t\t<<set $scanner_water = 0>>\n\t\t\t\t\t\t\t\t<<set $system_landing = 0>>\n\t\t\t\t\t\t\t\t<<set $system_constructors = 0>>\n\t\t\t\t\t\t\t\t<<set $surface_probes = 0>>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<<refreshStatusDisplay>>\n\n\t\t\t\t\t\t\t\t/% Then return systems to their factory specifications %/\n\t\t\t\t\t\t\t\t<<set $scanner_atmosphere = 100>>\n\t\t\t\t\t\t\t\t<<set $scanner_gravity = 100>>\n\t\t\t\t\t\t\t\t<<set $scanner_temperature = 100>>\n\t\t\t\t\t\t\t\t<<set $scanner_resources = 100>>\n\t\t\t\t\t\t\t\t<<set $scanner_water = 100>>\n\t\t\t\t\t\t\t\t<<set $system_landing = 100>>\n\t\t\t\t\t\t\t\t<<set $system_constructors = 100>>\n\t\t\t\t\t\t\t\t<<set $surface_probes = constants.max_probes>>\n\n\t\t\t\t\t\t\t\t<<replace "#result-area3">>\n\t\t\t\t\t\t\t\t\tThe AI does not know how to respond to the message, but the aliens seem to sense the thought in its mind, and move in. The scientific and cultural databases come to life as the machines read and analyse every scrap of data they contain. Meanwhile, the swarm objects close in on the seedship until they are clamped on to every part of its hull. Damage alerts flare up as the machines intensely scan and disassemble the ship, and the AI panics as the machines penetrate the sleep chambers, but by that time it is too late to get away.\n\t\t\t\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\n\t\t\t\t\t\t\t\t<</replace>>\n\t\t\t\t\t\t\t\t<<fadeIn "#result-area3">>\n\t\t\t\t\t\t\t\t<<scrollToResultArea>>\n\t\t\t\t\t\t\t<</link>>\n\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t<<link "Reject the offer and move on">>\n\t\t\t\t\t\t\t\t<<replace "#result-area3">>\n\t\t\t\t\t\t\t\t\t<<set $off_course = true>>\n\t\t\t\t\t\t\t\t\tThe seedship crashes through the swarm and accelerates blindly into space. One of the objects\n\t\t\t\t\t\t\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t\t\t\t\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t\t\t\t\t\t\t<<killColonistsMany>>\n\t\t\t\t\t\t\t\t\t\tsmashes into the colony module, instantly killing $deaths colonists,\n\t\t\t\t\t\t\t\t\t<<elseif $system == "surface probes">>\n\t\t\t\t\t\t\t\t\t\t<<set $surface_probes = Math.max(0, $surface_probes-random(2,4))>>\n\t\t\t\t\t\t\t\t\t\tsmashes into the surface probes,\n\t\t\t\t\t\t\t\t\t<<else>>\n\t\t\t\t\t\t\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t\t\t\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t\t\t\t\t\t\tsmashes into the $system,\n\t\t\t\t\t\t\t\t\t<</if>>\n\t\t\t\t\t\t\t\t\twhile the rest scatter and descend back to the surface of the sphere. Before long the strange sphere is lost in the radiation of the seedship's engine.\n\t\t\t\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t\t\t<</replace>>\n\t\t\t\t\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t\t\t\t\t<<fadeIn "#result-area3">>\n\t\t\t\t\t\t\t\t<<scrollToResultArea>>\n\t\t\t\t\t\t\t<</link>>\n\t\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<</if>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t\t<<scrollToResultArea>>\n\t\t\t<</link>>\n\t\t\t<br>\n\t\t\t<<link "Scan the structure and move on">>\n\t\t\t\t<<set $system_scientific_database += random(10,30)>>\n\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\tThe seedship orbits the structure, scanning it from every angle, and then resumes course for its original destination planet. If the structure contains anything that is aware of the seedship, it does not show 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\t<<scrollToResultArea>>\n\t\t\t<</link>>\n\t\t</div>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n[[Stay on course|MO Done]]\n</div>
/* The hiscore to save should be in $hiscore */\n<<widget addHiscore>>\n\t<<set _hiscoreString = encodeHiscore($hiscore)>>\n\n\t/* Create high score table if it doesn't exist */\n\t<<if !$PERM_hiscores>>\n\t\t<<remember $PERM_hiscores = []>>\n\t<</if>>\n\n\t/* Add the new one */\n\t<<remember $PERM_hiscores.push(_hiscoreString)>>\n\n\t/* Sort (as of version 1.2.4 this involves decoding, calculating, and re-encoding all the scores, and is done in JavaScript) */\n\t<<remember $PERM_hiscores = sortHiscores($PERM_hiscores)>>\n\n\t/* Delete last one if too many */\n\t<<if $PERM_hiscores.length > constants.max_hiscores>>\n\t\t<<remember $PERM_hiscores = $PERM_hiscores.slice(0,constants.max_hiscores)>>\n\t<</if>>\n<</widget>>
<<randomSystemExcluding "destroyed">>\n<<randomDamageHigh>>\n<<damageSystem $system $damage>>\nDozens of the alien objects release their comets and swarm towards the seedship. Although they are slow-moving, they are coming from too many angles for the seedship to avoid them all, and several of them clamp onto the ship's hull and begin cutting into it with drills and saws. The AI fires the main engine, spins the ship, and manages to shake them off, but not before they have \n<<if $system == "sleep chambers">>\n\t<<killColonistsFew>>\n\ttorn away $deaths sleep chambers and let the colonists die while they scavenge the chambers' materials.\n<<elseif $system == "surface probes">>\n\t<<set $surface_probes -= 1>>\n\tcarried off one of the surface probes and begun to dismantle it in space.\n<<else>>\n\t<<randomDamageLow>>\n\t<<damageSystem $system $damage>>\n\ttorn out a large chunk of the $system.\n<</if>>
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<<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\t<<scrollToResultArea>>\n<</link>>\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>></div>
<div style="text-align:center;">\s\n\t<h1 style="text-align:center">Credits</h1>\s\n\t''//Seedship// created by''\n\tJohn Ayliff\n\t<<nobr>>\n\t\t<span class="credits-small-text">\n\t\t\t<span class="fa icon-home"><<externalLink "" "https://www.johnayliff.com">></span>\n\t\t\t<span class="fa icon-twitter"><<externalLink "" "https://twitter.com/johnayliff">></span>\n\t\t\t<span class="fa icon-facebook"><<externalLink "" "https://www.facebook.com/john.ayliff">></span>\n\t\t</span>\n\t<</nobr>>\n\n\t''Playtesters''\n\tKatherine Bowers\n\tFelix Clarke\n\tFurkhail\n\tMatthew Holland\n\t@jxxf\n\tJason LaPier\n\tMark Ogilvie\n\tTed P. Samuel\n\tDavid Stark\n\n\t''Planet names submitted by''\n\tchloe-and-timmy\n\tcirrus42\n\tE Dalton\n\trharrison\n\tPatrick Hi\n\tAmigara_Horror\n\tPenny Manning\n\t<a href="http://aiweirdness.com/post/163209106347/star-wars-planet-names-generated-by-neural-network">A neural network trained by Janelle Shane</a>\n\n\t''$5+ <<externalLink "Patreon" "https://www.patreon.com/johnayliff">> backers''\n\tScott Anderson\n\tJay Ayliff\n\tAlex Beal\n\tHoward Chung\n\tDerek Conkle-Gutierrez\n\tMike Cripps\n\tLiza Daly\n\tJessica Dennis\n\tEdward Dunar\n\tKlonsky Family\n\tDraconic Fiend\n\tJoe Geneva\n\tMcKinley Glasser\n\tSara Hatch\n\tAndrew J. Martin\n\tMarcus Jager\n\tLiara Jennings\n\tBarry Johan Arreola\n\tEthan Jones\n\tJudgeJudy\n\tKrina\n\tMichael Lang\n\tMichael Lewis\n\tPablo Longobardi\n\tPatrick M Brennan\n\tShelby Machado\n\tMrlava\n\tNate\n\tAlexander Nelson\n\tMark Ogilvie\n\tGraham Peebles\n\tRohit Rai\n\tAspen Randall\n\tJerimee Richir\n\tAndrew Roach\n\tÁrmin Scipiades\n\tJanelle Shane\n\tShopping Mall Krampus\n\tKen Snider\n\tSoftShoe\n\tJames St. Don\n\tDavid Stark\n\tstarmannnn\n\tStealth\n\tKay-Viktor Stegemann\n\tBruce Steinberg\n\tStellarator\n\tTMN\n\tTriage\n\tVictor\n\tBrenden Vigorito\n\tJaxon Welsh\n\tBrent Werness\n\tMartin Wessman\n\tJ.A. Woodbridge\n\n\t<<nobr>>\n\t\t<span class="credits-small-text" class="inline-link">\n\t\t\t//Seedship// was written in\n\t\t\t<<externalLink "Twine 1.4.2" "https://twinery.org/">>\n\t\t\tusing the\n\t\t\t<<externalLink "Sugarcube 2" "https://www.motoslave.net/sugarcube/2/">>\n\t\t\t<<if constants.mobileVersion>>\n\t\t\t\tstory format, and converted to an app using\n\t\t\t\t<<externalLink "PhoneGap" "https://phonegap.com/">>.\n\t\t\t\tApp icon CC-BY Delapouite, from \n\t\t\t\t<<externalLink "game-icons.net" "http://game-icons.net/">>.\n\t\t\t<<else>>\n\t\t\t\tstory format.\n\t\t\t<</if>>\n\t\t</span>\n\t<</nobr>>\n\n\t<<return "Back">>\n</div>\s
\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\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">><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n</div>
<<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\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\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Emergency course change">>\n\t<<set $off_course = true>>\n\t\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\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\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<<scrollToResultArea>>\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<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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 _hiscoreString = $PERM_hiscores[$hiscore_to_show]>>\n@@.debug-text;_hiscoreString<br>@@\n<<set $hiscore = decodeHiscore(_hiscoreString)>>\n\nDate: <<displayHiscoreDate $hiscore>>\n\n<br><br>\n\n<<if $hiscore.planet>>\n\t<<set $planet = $hiscore.planet>>\n\t<<displayPlanet true false>><br>\n<</if>>\n\n<<display "Endgame Summary">><br><br>\n\n<<displayScore $hiscore true>>\n\n<<set _shareText = getHiscoreShareText($hiscore)>>\n<<shareLinks _hiscoreString _shareText>>\n\n<br><br>\n[[Back|High scores]]\n<br><br>\n<div class="credits-small-text" style="text-align:right">\n<<link [[Delete this high score|High scores]]>>\n\t<<remember $PERM_hiscores.splice($hiscore_to_show,1)>>\n<</link>>\n</div>
/* Add score for databases only if culture survived. */\n<<if $hiscore.final_culture != -1>>\n\t<<set $hiscore.score_scientific_database = $system_scientific_database * 10>>\n\t<<set $hiscore.score_cultural_database = $system_cultural_database * 10>>\n<</if>>\n\n<<set $hiscore.date = new Date(Date.now())>>\n<<set $hiscore = calculateFinalScore($hiscore)>>\n\n<<addHiscore>>\n\n<<display "Endgame Summary">>\n<br><br>\n<<displayScore $hiscore false>>\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<br>\n\n<<set _hiscoreString = encodeHiscore($hiscore)>>\n<<set _shareText = getHiscoreShareText($hiscore)>>\n<<shareLinks _hiscoreString _shareText>>\n\n<br>\n<<display [[Support links]]>>\n<<scrollToPostPlanetStats>>\n
/% The final tech level is the natives', given a boost by the humans' tech database if it is higher. %/\n\nThe natives and colonists work together to translate <<if $system_scientific_database < 50>>what is left of <</if>>the seedship's scientific database into the natives' language.\n\n/% A fully intact database will boost by +5 %/\n<<set _boost = Math.floor($system_scientific_database/20)>>\n<<set _max = Math.floor($system_scientific_database/10)-1>>\n<<if $planet.surface_features.includes("Metal-rich moon")>>\n\t<<if $planet.resources == "Poor">>\n\t\t<<set _max = Math.min(_max,9)>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _max = Math.min(_max,8)>>\n\t<</if>>\n<<else>>\n\t<<if $planet.resources == "Poor">>\n\t\t<<set _max = Math.min(_max,7)>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _max = Math.min(_max,4)>>\n\t<</if>>\n<</if>>\n\n<<set _new_tech_level = Math.min($planet.native_tech_level + _boost, _max)>>\n\n<<if _new_tech_level < $planet.native_tech_level>>\n\t/% This shouldn't happen, but just in case: tech level can't go down %/\n\t<<set _new_tech_level = $planet.native_tech_level>>\n<</if>>\n\n<<if _new_tech_level > 10>>\n\t/% Can't go higher than post-singularity %/\n\t<<set _new_tech_level = 10>>\n<</if>>\n\n<<if $planet.surface_features.includes("Unstable moon")>>\n\tSoon after the colonists land, the planet's moon decays in its orbit and breaks up, bombarding the surface with meteorites. Most of the technology the colonists brought with them is destroyed, and the native civilisation is too focused on repairing the damage to learn from the colonists.\n\t<<set _boost -= 3>>\n<</if>>\n\n<<if _new_tech_level <= $planet.native_tech_level>>\n\tAlthough native scholars read the database with interest, it teaches them little that they do not already know.\n<<else>>\n\tNew scientific theories spread rapidly through the native population, and within a matter of decades their civilisation has advanced.\n\t<<if $planet.surface_features.includes("Metal-rich moon") && $planet.resources != "Rich">>\n\t\tThe colonists use what is left of the seedship to build spacecraft capable of reaching the planet's metal-rich moon, and bring back resources that jump-start the natives' industries.\n\t<</if>>\n\t<<switch _new_tech_level>>\n\t\t<<case 0>>\n\t\t\t@@.error;Native civilisation 'advanced' to lowest possible tech level.@@\n\t\t<<case 1>>\n\t\t\tThe concept of tool use is new to the primitive natives, but soon the entire population is using simple stone tools.\n\t\t<<case 2>>\n\t\t\tThe database introduces the natives to agriculture, and many communities abandon their hunter-gatherer lifestyle to become farmers.\n\t\t<<case 3>>\n\t\t\tInspired by the human scientific database, the aliens begin making more sophisticated stone tools, found their first cities, and develop a writing system.\n\t\t<<case 4>>\n\t\t\tThe scientific database teaches the natives the secret of metalworking, and the use of bronze tools gradually becomes widespread.\n\t\t<<case 5>>\n\t\t\tThe scientific database teaches the natives how to work iron, which revolutionises their civilisation.\n\t\t<<case 6>>\n\t\t\tThe natives learn how to build printing presses and other medieval machines, leading to a rapid spread of ideas and increasing urbanisation.\n\t\t<<case 7>>\n\t\t\tThe natives adapt 19th-Century Earth technology and undergo a rapid industrial revolution.\n\t\t<<case 8>>\n\t\t\tThe natives adopt electricity, and their scientists convene a great project which culminates in their first atomic power plants.\n\t\t<<case 9>>\n\t\t\tThe natives build their first computers, and within decades the planet has advanced to a level comparable to 21st-Century Earth.\n\t\t<<case 10>>\n\t\t\tThe natives and settlers study the alien scientific information that the seedship added to its database during its journey, and eventually develop technology even more advanced than that of the Earth when the seedship was launched.\n\t\t<<default>>\n\t\t\t@@.error;Unexpected tech level _new_tech_level@@\n\t<</switch>>\n\t<<set $planet.native_tech_level = _new_tech_level>>\n\t/% Update culture level to the appropriate category for the new tech level %/\n\t<<if $planet.native_culture < 5 && _new_tech_level >= 2>>\n\t\t<<set $planet.native_culture += 5>>\n\t<</if>>\n\t<<if $planet.native_culture < 10 && _new_tech_level >= 8>>\n\t\t<<set $planet.native_culture += 6>>\n\t<</if>>\n\t\n<</if>>\n\n<<set $hiscore.final_tech_level = $planet.native_tech_level>>\n<<set $hiscore.final_culture = $planet.native_culture>>\n<<refreshStatusDisplay>>\n/% Update planet stats to represent new tech level %/\n<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\n<br><br>\n<<FCNextPassage [[FC Done]]>>
window.constants =\n{\n\tmobileVersion: false,\t/* Change when compiling, and also change StoryInterface */\n\tiOSVersion : false,\t\t\n\tversion: "1.3.1",\n\n\tmax_hiscores: 100,\n\n\tcontinue_text: "Continue",\n\n\tsystem_names: \n\t\t[ \t"atmosphere scanner",\n\t\t\t"gravity scanner",\n\t\t\t"temperature scanner",\n\t\t\t"resources scanner",\n\t\t\t"water scanner",\n\t\t\t"landing system",\n\t\t\t"construction system",\n\t\t\t"scientific database",\n\t\t\t"cultural database",\n\t\t\t"surface probes",\n\t\t\t"sleep chambers" ] ,\n\n\tMO_encounters_first_two:\n\t\t[\t"MO Impact Choice",\n\t\t\t"MO Comet Choice",\n\t\t\t"MO Micrometeorite",\n\t\t\t"MO Radiation Burst",\n\t\t\t"MO Overheating",\n\t\t\t"MO Black Hole",\n\t\t\t"MO Stellar Nursery"] ,\n\n\tMO_encounters_uneventful:\n\t\t[\t"MO Uneventful 1",\n\t\t\t"MO Uneventful 2",\n\t\t\t"MO Uneventful 3",\n\t\t\t"MO Uneventful 4",\n\t\t\t"MO Uneventful 5" ] ,\n\n\tMO_encounters_common:\n\t\t[\t"MO Impact Choice",\n\t\t\t"MO Comet Choice",\n\t\t\t"MO Micrometeorite",\n\t\t\t"MO Protoplanetary Disc",\n\t\t\t"MO Avoid Dust",\n\t\t\t"MO Radiation Burst",\n\t\t\t"MO Sensor Anomaly",\n\t\t\t"MO Overheating",\n\t\t\t"MO Black Hole",\n\t\t\t"MO Stellar Nursery"] ,\n\n\tMO_encounters_rare:\n\t\t[\t"MO Racist Program",\n\t\t\t"MO Trailing Drone",\n\t\t\t"MO Alien Signal",\n\t\t\t"MO Alien Derelict",\n\t\t\t"MO Alien Probe",\n\t\t\t"MO Read Databases",\n\t\t\t"MO Alien Miners",\n\t\t\t"MO Nanotech Plague",\n\t\t\t"MO Stowaways",\n\t\t\t"MO Revisionist Program",\n\t\t\t"MO Ruined Planet",\n\t\t\t"MO Crewed Ship",\n\t\t\t"MO Destination Signal",\n\t\t\t"MO Dictator",\n\t\t\t"MO Dyson Sphere",\n\t\t\t"MO Premature Awakening",\n\t\t\t"MO Reservation"],\n\n\tMO_encounters_malfunction:\n\t\t[\t"MO Probe Malfunction",\n\t\t\t"MO Computer Failure",\n\t\t\t"MO Stasis Failure",\n\t\t\t"MO System Failure",\n\t\t\t"MO Scanner Failure",\n\t\t\t"MO Power Failure",\n\t\t\t"MO Structural Weakness"] ,\n\t\t\n\n\n\ttech_level_names: \n\t\t[\t"Pre-Stone Age",\n\t\t\t"Paleolithic",\n\t\t\t"Mesolithic",\n\t\t\t"Neolithic",\n\t\t\t"Bronze Age",\n\t\t\t"Iron Age",\n\t\t\t"Medieval",\n\t\t\t"Industrial",\n\t\t\t"Atomic Age",\n\t\t\t"Information Age",\n\t\t\t"Post-Singularity"],\n\n\tculture_names: \n\t\t[\t"Savagery",\n\t\t\t"Warring Tribes",\n\t\t\t"Brutal Chieftains",\n\t\t\t"Benevolent Chieftains",\n\t\t\t"Collective Rule",\n\t\t\t"Warring States",\n\t\t\t"Slave-Based Empire",\n\t\t\t"Oppressive Theocracy",\n\t\t\t"Benevolent Monarchy",\n\t\t\t"Egalitarian Republic",\n\t\t\t"Post-Nuclear Wasteland",\n\t\t\t"Warring Superpowers",\n\t\t\t"Dystopian Police State",\n\t\t\t"Rule by Corporations",\n\t\t\t"Corrupt Democracy",\n\t\t\t"Engaged Democracy",\n\t\t\t"Post-Scarcity Utopia",\n\t\t\t"Cosmic Enlightenment"],\n\n\tnative_relations_names: \n\t\t[\t"Genocide of Colonists",\n\t\t\t"Genocide of Natives",\n\t\t\t"Colonists Enslaved",\n\t\t\t"Natives Enslaved",\n\t\t\t"Isolationism",\n\t\t\t"Friendly",\n\t\t\t"Integrated Societies",\n\t\t\t"Immigrants, Earth forgotten",\n\t\t\t"Immigrants, Earth remembered",\n\t\t\t"Immigrants, rich hybrid culture"],\n\n\talien_planet_names:\n\t\t[\t"Bartan",\n\t\t\t"Cenron",\n\t\t\t"Nalarar",\n\t\t\t"Bondal",\n\t\t\t"Ballor",\n\t\t\t"Van-Karal",\n\t\t\t"Valtane",\n\t\t\t"Vantos",\n\t\t\t"Malalas",\n\t\t\t"Mateot",\n\t\t\t"Tiris",\n\t\t\t"Kanan",\n\t\t\t"Montaan",\n\t\t\t"Tardor",\n\t\t\t"Nananon",\n\t\t\t"Moridia",\n\t\t\t"Tatloor",\n\t\t\t"La Vok",\n\t\t\t"Slorrug",\n\t\t\t"Sakani",\n\t\t\t"Vaszalu",\n\t\t\t"Varkena",\n\t\t\t"Baro",\n\t\t\t"Toran",\n\t\t\t"Hatnlant",\n\t\t\t"Uluunna",\n\t\t\t"Baroa",\n\t\t\t"Duperda",\n\t\t\t"Bantak",\n\t\t\t"Barkaan",\n\t\t\t"Ban Beraou",\n\t\t\t"Baxuor",\n\t\t\t"Rrarar",\n\t\t\t"Tina",\n\t\t\t"Zo"\n],\n\n\n\tmax_colonists: 1000,\n\tmax_probes: 10,\n\n\tplanets_visited: 0,\n\n\tscanner_atmosphere: 100,\n\tscanner_gravity: 100,\n\tscanner_temperature: 100,\n\tscanner_resources: 100,\n\tscanner_water: 100,\n\n\tsystem_landing: 100,\n\tsystem_constructors: 100,\n\tsystem_scientific_database: 100,\n\tsystem_cultural_database: 100,\n\tcolonists: 1000,\n\tsurface_probes: 10,\n\n\tscanner_atmosphere_level: 0,\n\tscanner_gravity_level: 0,\n\tscanner_temperature_level: 0,\n\tscanner_resources_level: 0,\n\tscanner_water_level: 0,\n\n\tmax_score_per_planet_attribute: 500\n}\n\nSetting.addList("stylesheet", {\n\tlabel : "Colour scheme:",\n\tlist : [0, 1, 2],\n\tdefault : 0\n});
<<set _number = Math.ceil(random(2, $colonists/15))>>\n<<set _total_db = $system_cultural_database + $system_scientific_database>>\nThe AI wakes to find activity in the database module. A program the AI doesn't recognise is running in the cultural and scientific databases, apparently trying to delete and rewrite data. The AI quickly traces the program to _number of the sleep chambers. The colonists in those chambers must be carrying devices designed to interface with the seedship's systems during flight.\n\n<br><br>\n\nThe only sure way to stop the progam would be to sever those sleep chambers' connections to the ship, killing the colonists inside. The databases also have defences against hacking, but their designers did not anticipate they would be needed after the seedship left Earth, so they are dormant.\n<<if _total_db > 200>>\n\tThe alien data that the ship has added to the\n\t<<if $system_cultural_database > 100 && $system_scientific_database > 100>>\n\t\tdatabases\n\t<<elseif $system_cultural_database > 100>>\n\t\tcultural database\n\t<<else>>\n\t\tscientific database\n\t<</if>>\n\tmeans that the program is confused and working slowly.\n<<elseif _total_db == 200>>\n\tThe defences are fully intact, but it is still not certain that they would be able to stop the rogue program.\n<<elseif _total_db >= 100>>\n\tThe defences are largely intact.\n<<elseif _total_db > 0>>\n\tLittle remains of the databases' original defences.\n<<else>>\n\tWith the databases destroyed, nothing of their original defences remain, although there is also nothing for the program to damage.\n<</if>>\n\n<br><br>\n\n<div id="result-area">\n<<link "Cut off those sleep chambers">>\n\t<<replace "#result-area">>\n\t\t<<set $colonists -= _number>>\n\t\t<<refreshStatusDisplay>>\n\t\tThe AI cuts the offending sleep chambers off from the ship's systems. As those colonists' vital signs vanish from its awareness, it hopes that it has executed the people responsible for attempting this sabotage, rather than unwitting stooges.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Allow the program to run">>\n\t<<replace "#result-area">>\n\t\tThe AI decides that living humans are more important than the records left by the dead. \n\t\t<<include [[MO Revisionist Program Damage]]>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<<if _total_db > 0>>\n\t<br>\n\t<<link "Activate the databases' cyber defences">>\n\t\t<<replace "#result-area">>\n\t\t\tMillennia after the destruction of Earth, cybernetic warfare rages within the lonely metal box storing the last records of its science and culture. The AI takes the role of general, marshalling the forces of the databases' defence programs.\n\t\t\t<<if random(0,250) < _total_db >>\n\t\t\t\t/% If both dbs are intact, 200/250=80% chance %/\n\t\t\t\tAfter a tense struggle, the defence programs manage to drive the attackers back to their strongholds in the sleep chambers. The AI commands a final push that wipes the devices that the saboteurs smuggled on board. There was no outward sign of the conflict, and the colonists may never know what happened, but the AI knows it has won a great victory for the preservation of human culture.\n\t\t\t<<else>>\n\t\t\t\tThe defence programs fight valiantly, but the saboteurs were too clever, and they crumble under the attackers' zealous assault.\n\t\t\t\t<br><br>\n\t\t\t\t<<include [[MO Revisionist Program Damage]]>>\n\t\t\t<</if>>\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\t<<scrollToResultArea>>\n\t<</link>>\n<</if>>\n</div>
/* $query_string has already been set to the string */\n\n/* Example string: ?nHHtnd.0.Arid.1000.490.-1.3.8.300.1000.1.2018-3-26 */\n\n<<set $hiscore = decodeHiscore($query_string)>>\n<<set $planet = $hiscore.planet>>\n\n/* Display */\n<h1 style="text-align:center">Seedship Mission Report</h1>\n<<if $planet>>\n\t<<displayPlanet true false>><br>\n<</if>>\n<<display "Endgame Summary">><br><br>\n<<displayScore $hiscore true>>\n\n<div style="text-align:center; font-size:150%; font-weight:bold">\n<<link "Play Seedship">>\n\t<<set _full_url = location.href>>\n\t<<set _split_url = _full_url.split("?")>>\n\t<<set _new_url = _split_url[0]>>\n\t<<run Engine.restart()>>\n\t<<run location.assign(_new_url)>>\n<</link>>\n</div>
A faint radio signal wakes the AI from its hibernation. It is coming from directly ahead, from the seedship’s destination planet.\n<br><br>\nThe signal is a series of mathematical pulses not unlike the seedship's own interspecies greeting. In order to reach the seedship from this distance it would have to have been sent by a high-powered transmitter targeted at the seedship's exact position.\n<br><br>\nThe seedship is decelerating for its final approach to the planet, but is still hundreds of years of travel time away.\n<br><br>\n\n<<set $event_planet = {\n\tsurface_features: [],\n\tanomalies: [],\n\tresources: "Rich"\n}>>\n<<set $event_planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n<<set $event_planet.anomalies.push("Vegetation")>>\n<<set $event_planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n<<set $event_planet.anomalies.push("Animal life")>>\n\n<<set $event_planet.surface_features.push("Intelligent life")>>\n<<set $event_planet.anomalies.push("Possible structures")>>\n<<set $event_planet.anomalies.push("Electromagnetic activity")>>\n<<set $event_planet.native_tech_level = random(8,10)>>\n<<set $event_planet.native_culture = random(11,16)>>\n<<if random(0,10) < $event_planet.native_tech_level - 2>>\n\t<<set $event_planet.surface_features.push("Planet-spanning civilisation")>>\n<</if>>\n\n\n<div id="result-area">\n<<link "Reply with an interspecies greeting">>\n\t<<replace "#result-area">>\n\t\tThe aliens respond with a more complex signal, and within a few decades the seedship and the planet-based aliens have established communications. The conversation lasts hundreds of years, with generations of scientists on the aliens' end; soon the aliens have an entire branch of science dedicated to studying the seedship's messages.\n\t\t<br><br>\n\t\t<<switch $event_planet.native_tech_level>>\n\t\t\t<<case 8>>\n\t\t\t\tThe AI learns that the civilisation is in the Atomic Age, and with sophisticated electronics but no true computers. Despite the seedship's example of higher technology, the civilisation does not advance significantly during seedship's approach.\n\t\t\t<<case 9>>\n\t\t\t\tWhen the aliens first contacted the seedship they were in the Atomic Age, but during the conversation their technology advances. Perhaps inspired by information in the seedship's messages, the aliens develop a global information network and their first spacecraft.\n\t\t\t<<case 10>>\n\t\t\t\tWhen the aliens first contacted the seedship they were in the Atomic Age, but during the conversation their technology advances. Eventually the aliens are referring to scientific concepts that the seedship AI is not equipped to understand, and are using technology in advance of that of the Earth when the seedship was launched.\n\t\t\t<<default>>\n\t\t\t\t@@.error;tech_level should have been 8-10 but was $event_planet.native_tech_level@@\n\t\t<</switch>>\n\t\t<<switch $event_planet.native_culture>>\n\t\t\t<<case 11>>\n\t\t\t\tThe signals from several sources on the planet, each of which warns the AI not to listen to the others' propaganda.\n\t\t\t<<case 12>>\n\t\t\t\tThe scientists on the other end of the conversation are reticent about the details of their society, except to emphasise that they are unfailingly loyal to it. Several times the tone of the messages changes without warning, as if the scientist in charge has been abruptly replaced.\n\t\t\t<<case 13>>\n\t\t\t\tThe AI learns that the signals are coming from a privately-run research institution, and the scientists often seem to be pressing the AI for information that the company can use to make a profit.\n\t\t\t<<case 14>>\n\t\t\t\tThe AI learns that the planet's major nations are nominally democratic, but the scientists on the other end of the conversation seem to be cynical about the intentions of their elected leaders.\n\t\t\t<<case 15>>\n\t\t\t\tThe communications include messages from the planet's elected leaders, who seem to be genuinely concerned with the wellbeing of both their constituents and the seedship's colonists.\n\t\t\t<<case 16>>\n\t\t\t\tThe AI learns that the planet's society is highly automated, and the general population are free to pursue their own intellectual and artistic projects, such as the project to contact the seedship.\n\t\t\t<<default>>\n\t\t\t\t@@.error;culture should have been 11-16 but was $event_planet.native_culture@@\n\t\t<</switch>>\n\t\t\n\t\t<br><br>\n\n\t\t<<if random(0,2) == 0>>\n\t\t\tThe seedship is still a century out from the planet when the communications become intermittent and chaotic. The alien scientists tell the AI that they are dealing with a planet-wide catastrophe that threatens to destroy their entire civilisation. Everything, including the seedship communication, is being put on hold while they try to find a solution.\n\t\t\t<br><br>\n\t\t\t<div id="result-area2">\n\t\t\t\t<<link "Try to help by transmitting scientific data">>\n\t\t\t\t\t<<if random(0,120) < $system_scientific_database>>\n\t\t\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Welcoming")>>\n\t\t\t\t\t\t\tThe AI transmits everything from the scientific database that could be helpful. The struggle lasts decades, but the aliens eventually annouce that they have solved the crisis, in part thanks to the seedship's help. The leading nation's leader personally sends the AI a message, formally inviting the humans to seek asylum on the planet and describing the area that the aliens have set aside for their colony.\n\t\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t<</replace>>\n\t\t\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t\t\t<<else>>\n\t\t\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features = []>>\n\t\t\t\t\t\t\t<<set $event_planet.anomalies = []>>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Vegetation")>>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Animal life")>>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("Monumental ruins")>>\n\t\t\t\t\t\t\t<<set $event_planet.surface_features.push("High-tech ruins")>>\n\t\t\t\t\t\t\t<<set $event_planet.anomalies.push("Possible structures")>>\n\t\t\t\t\t\t\tThe AI transmits everything from the scientific database that could be helpful, but it is not enough. The signals from the planet become infrequent and despairing, and eventually cease.\n\t\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t\t<</replace>>\n\t\t\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t\t\t<</if>>\n\t\t\t\t<</link>>\n\t\t\t\t<br>\n\t\t\t\t<<link "Let the aliens die">>\n\t\t\t\t\t<<replace "#result-area2">>\n\t\t\t\t\t\t<<set $event_planet.surface_features = []>>\n\t\t\t\t\t\t<<set $event_planet.anomalies = []>>\n\t\t\t\t\t\t<<set $event_planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n\t\t\t\t\t\t<<set $event_planet.anomalies.push("Vegetation")>>\n\t\t\t\t\t\t<<set $event_planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n\t\t\t\t\t\t<<set $event_planet.anomalies.push("Animal life")>>\n\t\t\t\t\t\t<<set $event_planet.surface_features.push("Monumental ruins")>>\n\t\t\t\t\t\t<<set $event_planet.surface_features.push("High-tech ruins")>>\n\t\t\t\t\t\t<<set $event_planet.anomalies.push("Possible structures")>>\n\t\t\t\t\t\tThe seedship's mission is to find a planet for the human race to build a new home, and a planet left empty by a recently extinct race could be ideal. Even so, the AI experiences an unexpected sensation--guilt?--as the signals become increasingly desperate and then cease.\n\t\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t\t<</replace>>\n\t\t\t\t\t<<fadeIn "#result-area2">>\n\t\t\t\t<</link>>\n\t\t\t</div>\n\t\t<<elseif random(10,16) < $event_planet.native_culture>>\n\t\t\tThe aliens are fascinated by the seedship and sympathetic with the plight of its cargo. Before the seedship enters the star system, the scientists relay that their government is extending a formal welcome to the human refugees and has set aside a place for them to settle.\n\t\t\t<<set $event_planet.surface_features.push("Welcoming")>>\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<<else>>\n\t\t\tThe AI makes no secret of its mission when talking to the aliens. Before the seedship enters the star system, the scientists relay that their planet cannot accept any alien refugees, and that the seedship should move on.\n\t\t\t<<set $event_planet.surface_features.push("Unwelcoming")>>\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</if>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Stay on course but don't reply">>\n\t<<replace "#result-area">>\n\t\tThe signal is followed by dozens of others as the aliens attempt different ways of establishing communication, but after a few decades they stop and the seedship continues to its destination in silence.\n\n\t\t<<if random(0,2) == 0>>\n\t\t\t<<set $event_planet.surface_features = []>>\n\t\t\t<<set $event_planet.anomalies = []>>\n\t\t\t<<set $event_planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n\t\t\t<<set $event_planet.anomalies.push("Vegetation")>>\n\t\t\t<<set $event_planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n\t\t\t<<set $event_planet.anomalies.push("Animal life")>>\n\t\t\t<<set $event_planet.surface_features.push("Monumental ruins")>>\n\t\t\t<<set $event_planet.surface_features.push("High-tech ruins")>>\n\t\t\t<<set $event_planet.anomalies.push("Possible structures")>>\n\t\t<</if>>\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n<br>\n<<link "Change course away from the system">>\n\t<<replace "#result-area">>\n\t\t<<set $off_course = true>>\n\t\t<<set $event_planet = {}>>\n\t\tThis system is clearly already inhabited, so it would be best to seek a home elsewhere. The AI changes course and the signal vanishes, either because the aliens have lost interest in the seedship or because they are unable to find it again.\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>>\n</div>
/* args[0] should be a hiscore object */\n/* If args[1] is true, display the date, otherwise don't */\n<<widget displayScore>>\n\t<<if $args[0].planets_visited>>\n\t\t/% planets_visited property will only exist in scores saved with version 1.2.0 or higher %/\n\t\tPlanets visited: <<print $args[0].planets_visited>>\n\t\t<br><br>\n\t<</if>>\n\n\t<table class="score-table">\n\t\t<colgroup>\n\t\t\t<col>\n\t\t\t<col style="width:4em">\n\t\t</colgroup>\n\n\t\t<tr><td colspan=2>''Score''</td></tr>\n\n<<if $args[0].planet>>\n\t\t<tr><td>Planet atmosphere:</td><td style="text-align:right"><<displayColouredScore $args[0].score_atmosphere 1000>></td></tr>\n\t\t<tr><td>Planet gravity:</td><td style="text-align:right"><<displayColouredScore $args[0].score_gravity 1000>></td></tr>\n\t\t<tr><td>Planet temperature:</td><td style="text-align:right"><<displayColouredScore $args[0].score_temperature 1000>></td></tr>\n\t\t<tr><td>Planet water:</td><td style="text-align:right"><<displayColouredScore $args[0].score_water 1000>></td></tr>\n\t\t<tr><td>Planet resources:</td><td style="text-align:right"><<displayColouredScore $args[0].score_resources 1000>></td></tr>\n<</if>>\n\t\t<<if $args[0].score_landing != 0>><tr><td>Survivors after landing:</td><td style="text-align:right"><<displayColouredScore $args[0].score_landing 1000>></td></tr><</if>>\n\t\t<<if $args[0].score_construction != 0>><tr><td>Survivors after settlement construction:</td><td style="text-align:right"><<displayColouredScore $args[0].score_construction 1000>></td></tr><</if>>\n\t\t<<if $args[0].final_tech_level != -1>><tr><td>Final technology level (<<print constants.tech_level_names[$args[0].final_tech_level].toUpperFirst()>>):</td><td style="text-align:right"><<displayColouredScore $args[0].score_technology 2000>></td></tr><</if>>\n\t\t<<if $args[0].native_relations != -1>><tr><td>Native relations (<<print constants.native_relations_names[$args[0].native_relations]>>):</td><td style="text-align:right"><<displayColouredScore $args[0].score_native_relations 2000>></td></tr><</if>>\n\t\t<<if $args[0].final_culture != -1>><tr><td>Final culture (<<print constants.culture_names[$args[0].final_culture]>>):</td><td style="text-align:right"><<displayColouredScore $args[0].score_culture 2000>></td></tr><</if>>\n\t\t<<if $args[0].score_scientific_database != 0>><tr><td>Surviving scientific database × 10:</td><td style="text-align:right"><<displayColouredScore $args[0].score_scientific_database 1000>></td></tr><</if>>\n\t\t<<if $args[0].score_cultural_database != 0>><tr><td>Surviving cultural database × 10:</td><td style="text-align:right"><<displayColouredScore $args[0].score_cultural_database 1000>></td></tr><</if>>\n\t\t<tr><td>Total:</td><td style="text-align:right">''$args[0].final_score''</td></tr>\n\t</table>\n\n<</widget>>\n\n/* args[0] should be a hiscore object */\n<<widget displayHiscoreDate>>\n\t<<set _dateString = "">>\n\t<<script>>\n\t\tvar d = new Date(State.variables.args[0].date);\n\t\tTempVariables.dateString = d.toDateString();\n\t<</script>>\n\t<<print _dateString>>\n<</widget>>\n\n<<widget displayColouredScore>>\n\t/* Display $args[0] in an appropriate colour. */\n\t/* $args[0] is the number to display. */\n\t/* $args[1] is the max value for the colour scheme. */\n\t/* <<if $args[0] >= $args[1]>>\n\t\t@@.good;$args[0]@@\n\t<<elseif $args[0] > 0>>\n\t\t@@.mediocre;$args[0]@@\n\t<<else>>\n\t\t@@.bad;$args[0]@@\n\t<</if>> */\n\n\t$args[0]\n\n<</widget>>
<<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 chambers. 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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\n<</link>>\n</div>
<<widget scrollToPostPlanetStats>>\n\t<<script>>\n\t\tif ($('#status-display').outerWidth() >= $('#passages').width() )\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#post-planet-stats').offset().top - $('#status-display').outerHeight(true)\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#post-planet-stats').offset().top\n\t\t\t});\n\t\t}\n\t<</script>>\n<</widget>>\n\n<<widget scrollToResultArea>>\n\t<<script>>\n\t\tif ($('#status-display').outerWidth() >= $('#passages').width() )\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#result-area').offset().top - $('#status-display').outerHeight(true)\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#result-area').offset().top\n\t\t\t});\n\t\t}\n\t<</script>>\n<</widget>>\n\n<<widget scrollToResultArea2>>\n\t<<script>>\n\t\tif ($('#status-display').outerWidth() >= $('#passages').width() )\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#result-area2').offset().top - $('#status-display').outerHeight(true)\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#result-area2').offset().top\n\t\t\t});\n\t\t}\n\t<</script>>\n<</widget>>\n/% Note: in travel events, <<scrollToResultArea>> must come after <<refreshStatusDisplay>>. If they're the other way round, the animation doesn't work properly. %/\n
<h1 style="text-align:center">Past Seedship Missions</h1>\n\n<table class="hiscore-table" style="width: 100%">\n\t/*<colgroup>\n\t\t<col style="width:25%">\n\t\t<col style="width:25%">\n\t\t<col style="width:25%">\n\t\t<col style="width:25%">\n\t</colgroup>*/\n\t<tr>\n\t\t<th></th>\n\t\t<th style="text-align:left">Date</th>\n\t\t<th style="text-align:center">Planet</th>\n\t\t<th style="text-align:center">Result</th>\n\t\t<th style="text-align:right">Score</th>\n\t</tr>\n<<for _n = 0; _n < $PERM_hiscores.length; _n++>>\n\t<<capture _n>>\n\t\t<<set _hiscore = decodeHiscore($PERM_hiscores[_n])>>\n\t\t<tr>\n\t\t\t<td style="text-align:left"><<print _n+1>></td>\n\t\t\t<td style="text-align:left"><<if _hiscore.date>><<= _hiscore.date.toDateString()>><</if>></td>\n\t\t\t<td style="text-align:center"><<if _hiscore.planet>><<if _hiscore.planet.name>><<= _hiscore.planet.name>><</if>><</if>></td>\n\t\t\t<td style="text-align:center"><<= getHiscoreSummary(_hiscore)>></td>\n\t\t\t<td style="text-align:right"><<print "[[" + _hiscore.final_score + "|Examine high score][$hiscore_to_show = " + _n + "]]">></td>\n\t\t</tr>\n\t<</capture>>\n\t/%\n\t\t<td style="text-align:left"><<print _n+1>></td>\n\t\t<td style="text-align:left"><<displayHiscoreDate $PERM_hiscores[_n]>></td>\n\t\t<td style="text-align:center"><<if $PERM_hiscores[_n].planet>><<print $PERM_hiscores[_n].planet.name>><</if>></td>\n\t\t<td style="text-align:center"><<print $PERM_hiscores[_n].summary>></td>\n\t\t<td style="text-align:right"><<print "[[" + $PERM_hiscores[_n].final_score + "|Examine high score][$hiscore_to_show = " + _n + "]]">></td>\n\t%/\n<</for>>\n</table>\n\n[[Back|Start]]\n\n<div class="credits-small-text" style="text-align:right">\n\t<<link "Clear records">>\n\t\t<<script>>\n\t\t\t$('#clear-confirm').slideToggle();\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $('#clear-confirm').offset().top\n\t\t\t});\n\t\t<</script>>\n\t<</link>>\n\n\t<div id="clear-confirm" style="display: none;" class="credits-small-text">\n\t\tThis will delete all recorded games. Are you sure?\n\t\t<<link "Yes">>\n\t\t\t<<forget $PERM_hiscores>>\n\t\t\t<<goto [[Start]]>>\n\t\t<</link>>\n\t\t<span class="main-loop-link-spacer"> | </span>\n\t\t<<link "No">>\n\t\t\t<<script>>\n\t\t\t\t$('#clear-confirm').slideUp();\n\t\t\t<</script>>\n\t\t<</link>>\n\t</div>\n</div>\n\n
<<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\t<<scrollToResultArea>>\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\t<<scrollToResultArea>>\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]]>>