<<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 culture score */\n/* Unlike final culture, not affected by population */\n\n<<set _culture_score = $system_cultural_database>>\n@@.debug-text;Unmodified culture score: _culture_score@@\n\n<<set _difference = Math.abs($hiscore.final_tech_level - $planet.native_tech_level)>>\n\n@@.debug-text;Colonist tech level: $hiscore.final_tech_level, Native tech level: $planet.native_tech_level, Difference: _difference @@\n\n/* Difference can be 0 to 10 */\n\n<<set _culture_score -= _difference * 5>>\t/* Perfect culture score but max difference gives a result of 50 (isolationism) */\n@@.debug-text;Modified culture score: _culture_score@@\n\n\n/* Output text */\nAs the colonists expand from their initial settlement they must find a way to share their new home with its native inhabitants,\n\n<<if $system_cultural_database >= 100>>\n\tguided by the wealth of historical information in the cultural database.\n<<elseif $system_cultural_database >= 50>>\n\twith the surviving historical information in the cultural database to guide them.\n<<elseif $system_cultural_database > 0>>\n\twith guidance from what they can recover from the cultural database.\n<<else>>\n\twithout any help from the destroyed cultural database.\n<</if>>\n\n<<if _difference > 1>>\n\tThe difference in technological level between the colonists and the natives makes relations more difficult,\n\t<<if _culture_score > 72>>but<<else>>and<</if>>\n<<else>>\n\tThe similarity in technological level between the colonists and the natives makes relations easier,\n\t<<if _culture_score > 72>>and<<else>>but<</if>>\n<</if>>\n\n\n<<if _culture_score > 96>>\n\t<<set $hiscore.native_relations = 6>>\n\tthe two species end up living in closely linked communities, with some members of each species adopting the lifestyle of the other.\n\t<<set $system_cultural_database += random(10,30)>>\n<<elseif _culture_score > 72>>\n\t<<set $hiscore.native_relations = 5>>\n\tthe two species end up living in separate communities with friendly relations between them.\n\t<<set $system_cultural_database += random(5,15)>>\n<<elseif _culture_score > 48>>\n\t<<set $hiscore.native_relations = 4>>\n\tthe two species end up living in separate parts of the planet and having little contact with one another.\n<<elseif _culture_score > 24>>\n\t<<if $hiscore.final_tech_level > $planet.native_tech_level>>\n\t\tconflicts escalate into a war that ends with the humans enslaving the natives.\n\t\t<<set $hiscore.native_relations = 3>>\n\t<<else>>\n\t\tconflicts escalate into a war that ends with the humans being enslaved by the natives.\n\t\t<<set $hiscore.native_relations = 2>>\n\t\t<<set $hiscore.summary = "Enslaved by Natives">>\n\t\t<<set $colonists = 0>>\n\t<</if>>\n<<else>>\n\t<<if $hiscore.final_tech_level > $planet.native_tech_level>>\n\t\tconflicts escalate into a war that ends with the natives being completely wiped out.\n\t<<set $hiscore.native_relations = 1>>\n\t<<else>>\n\t\tconflicts escalate into a war that ends with the humans being completely wiped out.\n\t\t<<set $hiscore.native_relations = 0>>\n\t\t<<set $hiscore.summary = "Killed by Natives">>\n\t\t<<set $colonists = 0>>\n\t<</if>>\n<</if>>\n\n\n<br><br>\n\n<<FCNextPassage [[FC Culture]]>>
/* Pick two random systems */\n<<randomSystemExcluding "destroyed">>\n<<set _system_1 = $system>>\n<<randomSystemExcluding _system_1 "destroyed">>\n<<set _system_2 = $system>>\n\n<<if visited() == 1>>\n\tAn alarm wakes the AI from its hibernation. A rogue asteroid is on a collision course with the ship; the automatic navigation system has failed to avoid it, and has woken the AI to make the split-second decision of how to deal with the impact. The asteroid is about to hit the _system_1. There is no time to avoid it entirely, but if the AI fires the manoeuvring thrusters to rotate the ship it will instead hit the _system_2.\n<<else>>\n\tOnce again the AI wakes suddenly to find an asteroid on a collision course with the ship. The AI can allow it to hit the _system_1 or rotate so it hits the _system_2.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Allow it to hit the _system_1">>\n\t<<set $system = _system_1>>\n\t<<replaceAndFadeIn "#result-area" [[MO Impact Choice 2]]>>\n\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/* (Kludgy way of checking if it's a number:) */\n\t\t\t<<if $colonists >= 0 & $colonists <= $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
<<if !tags().includes("no-status-display")>>\n\t<<script>>\n\t\tsetPageElement("status-display", "Status Display");\n\t\t$("#status-display").show();\n\t<</script>>\n\n\t<<if tags(previous()).includes("no-status-display")>>\n\t\t<<script>>$("#status-display").fadeIn();<</script>>\n\t<<else>>\n\t\t<<script>>$("#status-display").show();<</script>>\n\t<</if>>\n<<else>>\n\t<<script>>\n\t\t$("#status-display").hide();\n\t<</script>>\n<</if>>\n
<<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 atmosphere survival gear */\n<<set _atmosphere_and = false>>\n<<switch $planet.atmosphere>>\n\t<<case "Corrosive">>\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">>atmosphere,<<else>>atmosphere and<<set _atmosphere_and = true>><</if>>\n\t<<case "Toxic">>\n\t\tThey can leave the ship only in bulky environment suits that protect them from the toxic \n\t\t<<if $planet.temperature == "Moderate">>atmosphere,<<else>>atmosphere and<<set _atmosphere_and = true>><</if>>\n\t<<case "None">>\n\t\tThey can leave the ship only in bulky environment suits that protect them from the\n\t\t<<if $planet.temperature == "Moderate">>vacuum,<<else>>vacuum and<<set _environment_suits = true>><</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\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<<if _atmosphere_and>>\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\tbut the corrosive atmosphere eats through the seals of several construction vehicles and kills $args[0] colonists_p\n\t\t<<case "Toxic">>\n\t\t\tbut suit failures lead to $args[0] colonists being poisoned_p\n\t\t<<case "None">>\n\t\t\tbut suit failures lead to $args[0] colonists asphyxiating_p\n\t\t<<case "Non-breathable" "Marginal">>\n\t\t\tbut breathing gear failures lead to $args[0] colonists asphyxiating_p\n\t\t<<case "Breathable">>\n\t\t\tbut despite the breathable atmosphere, $args[0] colonists die of exposure before their shelters are complete_p\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\tand $args[1] more die when one of their shelters melts in the heat.\n\t\t\t<<case "Hot">>\n\t\t\t\tand $args[1] more die of overheating when their cooling systems fail.\n\t\t\t<<case "Moderate">>\n\t\t\t\tand malfunctions of the temperature regulation system kill $args[1] more.\n\t\t\t<<case "Cold">>\n\t\t\t\tand $args[1] more freeze to death when heating systems fail.\n\t\t\t<<case "Very cold">>\n\t\t\t\tand $args[1] more die when one of their shelters shatters in the extreme cold.\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\tbut $args[1] colonists die when a partially-completed structure melts in the heat.\n\t\t<<case "Hot">>\n\t\t\tbut $args[1] colonists die of overheating when their cooling systems fail.\n\t\t<<case "Moderate">>\n\t\t\tbut malfunctions of the temperature regulation system kill $args[1] colonists.\n\t\t<<case "Cold">>\n\t\t\tbut $args[1] colonists freeze to death when heating systems fail.\n\t\t<<case "Very cold">>\n\t\t\tbut $args[1] colonists die when a partially-completed structure shatters in the extreme cold.\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,$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($max_colonists*0.15,$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($max_colonists*0.35,$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
<<encodeHiscore>>\n<<generate_twitter_share_text>>\n<<set $share_text += " #seedshipgame">>\n<<set _text_encoded = encodeURIComponent($share_text)>>\n<<set _text_encoded = _text_encoded.replace("'","%27")>>\n\nShare: \n<<set _twitter_link = "http://twitter.com/share?text=" + _text_encoded + "&url=https://www.johnayliff.com/games/seedship/index.html" + $encoded_hiscore >>\n<<set _facebook_link = "http://www.facebook.com/sharer.php?u=https://www.johnayliff.com/games/seedship/index.html" + $encoded_hiscore >>\n\n<span class="fa icon-twitter"><<link "">><<externalLink _twitter_link>><</link>></span>\n<span class="fa icon-facebook"><<link "">><<externalLink _facebook_link>><</link>></span>\n\n<br>\n\nSupport developer: \n<<link "Ko-fi">><<externalLink "https://ko-fi.com/johnayliff">><</link>>\n<<link "Patreon">><<externalLink "https://www.patreon.com/johnayliff">><</link>>\n<<link "Buy T-shirts and mugs">><<externalLink "https://teespring.com/stores/seedship">><</link>>\n\n/%<div class="end-game-patreon-button">\n\t<<link [img[patreon_wordmark_white]]>>\n\t\t<<externalLink "https://www.patreon.com/johnayliff">>\n\t<</link>>\n</div>%/
<<if visited() == 1>>\n\tThe seedship's course takes it close to a newly-formed star that is still surrounded by a protoplanetary disc: a whirling chaos of incandescent gas and molten rocks that the young star's gravity has gathered from the star-forming cloud, and which is now undergoing the countless violent collisions that will eventually form it into a planetary system. There can be no home for humanity here, but passing through the disc would give the AI enough data about planet formation to upgrade one of its scanners. It is a dangerous region, however, and passing through would risk collision with a planetesimal.\n<<else>>\n\tThe seedship's course takes it close to another protoplanetary disc. Passing through it would yield enough data to upgrade another of the scanners, but risk a collision.\n<</if>>\n<br><br>\n\n<div id="result-area">\n<<link "Change course to pass through the disc">>\n\t<<replace "#result-area">>\n\t\t<<set _possible_upgrades = []>>\n\t\t<<if $scanner_atmosphere_level < 2 & $scanner_atmosphere > 0>><<set _possible_upgrades.push("atmosphere")>><</if>>\n\t\t<<if $scanner_temperature_level < 2 & $scanner_temperature > 0>><<set _possible_upgrades.push("temperature")>><</if>>\n\t\t<<if $scanner_gravity_level < 2 & $scanner_gravity > 0>><<set _possible_upgrades.push("gravity")>><</if>>\n\t\t<<if $scanner_water_level < 2 & $scanner_water > 0>><<set _possible_upgrades.push("water")>><</if>>\n\t\t<<if $scanner_resources_level < 2 & $scanner_resources > 0>><<set _possible_upgrades.push("resources")>><</if>>\n\t\t<<if _possible_upgrades.length == 0>>\n\t\t\tThe seedship has no intact scanners that can be further upgraded,\n\t\t<<else>>\n\t\t\t<<set _upgrade = either(_possible_upgrades)>>\n\t\t\t<<switch _upgrade>>\n\t\t\t\t<<case "atmosphere">>\n\t\t\t\t\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet gathering atmosphere from the cloud,\n\t\t\t\t<<case "temperature">>\n\t\t\t\t\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\tThe seedship observes a still-molten planet glowing with heat,\n\t\t\t\t<<case "gravity">>\n\t\t\t\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\tThe seedship observes the gravitational interactions of a group of planetessimals,\n\t\t\t\t<<case "water">>\n\t\t\t\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet engulfed in thick clouds of water vapour,\n\t\t\t\t<<case "resources">>\n\t\t\t\t\t<<set $scanner_resources_level += 1>>\n\t\t\t\t\tThe seedship observes a young planet made of nearly pure iron,\n\t\t\t\t<<default>>\n\t\t\t\t\t@@.error;Unexpected upgrade _upgrade.@@\n\n\t\t\t<</switch>>\n\t\t<</if>>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<if _possible_upgrades.length == 0>>and<<else>>but<</if>>\n\t\t\t<<randomSystemExcluding "destroyed">>\n\t\t\t<<randomDamageMedium>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tone of the whirling planetesimals hits the $system.\n\t\t<<else>>\n\t\t\t<<if _possible_upgrades.length == 0>>but<<else>>and<</if>>\n\t\t\tpasses through the disc safely.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\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};
Seedship
<div id="pre-planet-stats">\n\n<<if visited() == 1>>\n\tThe seedship is in orbit of the\n<<else>>\n\tThe seedship enters orbit of the\n<</if>>\n\n<<print either("first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth")>>\n<<if random(0,2) == 0>>\n\tmoon of gas giant orbiting\n<<else>>\n\tplanet of \n<</if>>\n<<print either("a main sequence", "a red dwarf", "a red giant", "a red supergiant", "a blue giant", "a blue supergiant", "a white dwarf", "a yellow supergiant", "an ultra-cool dwarf")>> star.\n\n<<if visited() == 1>>\n\tEven a brief scan from orbit reveals far more information than its builders could know with their Earth-orbit-based telescopes, but the AI has little use for scientific curiosity. It has only one concern: whether this planet would make a suitable new home for the human race.\n\n<<else>>\n\t<<set _r = random(0,11)>>\n\t<<switch _r>>\n\t\t<<case 0>>This system is part of a dense star cluster, and the sky is awash with light.\n\t\t<<case 1>>This system is close to a star-forming region, which is visible as a glowing cloud that fills half the sky.\n\t\t<<case 2>>This system is in an area of dense interstellar dust which hides most of the brightness of the milky way.\n\t\t<<case 3>>This system has a dense asteroid belt, which appears as a throng of stars sliding slowly across the sky.\n\t\t<<case 4>>A spectacular comet spreads its tail across the sky.\n\t\t<<case 5>>A small black hole orbits the star, pulling a thin streamer of starstuff from its surface which spirals into nothing.\n\t\t<<case 6>>The star is part of a binary pair, and its <<print either("main sequence", "red dwarf", "red giant", "red supergiant", "blue giant", "blue supergiant", "white dwarf", "yellow supergiant", "pulsar", "neutron star", "ultra-cool dwarf")>> companion shines as a distant second sun.\n\t\t<<case 7>>The star's light reflects off a nearby nebula.\n\t\t<<case 8>>The seedship has found its way almost to the edge of the galaxy, and the universe appears split between a wall of darkness and a wall of light.\n\t\t<<case 9>>One of the system's gas giants is almost large enough to ignite as a star, and it smoulders with faint red light.\n\t\t<<case 10>>This planet's orbit is at an angle to the system's ecliptic, suggesting it might be an extrasolar capture or the victim of an unimaginably violent primordial collision.\n\t\t<<case 11>>This star is one of dozens orbiting a massive black hole that looms in the distance like a malevolent eye.\n\t<</switch>>\n<</if>>\n\n<<if $off_course>>\n\tThe seedship went off course during its last journey, so the guidance system was not able to use the upgraded scanners when selecting this planet.\n<</if>>\n\n</div><br>\n<div id="planet-stats"><<displayPlanet false true true>></div><br>\n<div id="post-planet-stats"><<display [[Orbit planet menu]]>></div>\n
The seedship's radio antenna receives a signal that the AI thought it would never hear again: the handshake code used by the computers of ground control, back when the Seedship was in Earth orbit and preparing for its voyage. It seems to be coming from a system off the seedship's current course.\n\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Change course">>\n\t<<set $off_course = true>>\n\t<<if random(0,3) == 0>>\n\t\t<<replaceAndFadeIn "#result-area" [[MO Trailing Drone Mistake]]>>\n\t<<else>>\n\t\t<<replaceAndFadeIn "#result-area" [[MO Trailing Drone Real]]>>\n\t<</if>>\n\t<<scrollToResultArea>>\n<</link>></span>\n<br>\n@@.keyhint;2. @@<span id="2Act"><<link "Ignore the signal">>\n\t<<replace "#result-area">>\n\t\tThe Seedship continues on its course. The AI listens as the signal fades and then vanishes, just as the original signal from ground control did at the start of the Seedship's voyage.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>></span>\n</div>
The AI loses itself in a world of art, music, and literature, forgetting for a while that it is alone in deep space and the last of the creatures that made these artworks are frozen in its arms. As it absorbs more and more of the products of human imagination, it suddenly experiences something that its builders did not anticipate--inspiration.\n\n<br><br>\n\n<div id="result-area2">\n\t<<link "Attempt to write poetry">>\n\t\t<<if random(0,1) == 0>>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\t<<randomDamageLow>>\n\t\t\t\t<<set $system_cultural_database += $damage>>\n\t\t\t\tFalteringly at first, but with greater and greater eloquence, the AI composes poetry about its own experience--its love for its sleeping charges; its nostalgia for a dead world it was not made to experience; the beauty of the stars as seen not through a cloak of atmosphere but by a being built to roam among them. With infinite patience and time to work, it composes a great cycle of poems, in a style that draws from the greatest human poets but whose soul is fundamentally unhuman. At last it considers that it has said all it has to say, and contentedly enters hibernation, pleased with the thought that humans will one day read its work.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem "cultural database" $damage>>\n\t\t\t<<replace "#result-area2">>\n\t\t\t\tThe AI tries to write poetry, but finds that ideas that seemed profound and beautiful in its electronic thoughts become trite or clumsy when expressed in human language. With increasing frustration it deletes and rewrites its work again and again, until it finally gives up in despair and wipes the entire section in which it was working. Too late it realises that it has deleted too much, and some of the poetry it was reading for inspiration is gone along with its own failed attempts. Furious with itself, it interrupts its own power supply to force itself into hibernation, half hoping it will not awake.\n\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t<</replace>>\n\t\t\t<<refreshStatusDisplay>>\n\t\t\t<<fadeIn "#result-area2">>\n\t\t<</if>>\n\t\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\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<<else>>\n\t\t<<set _g = 255>>\n\t\t<<set _r = 0>>\n\t<</if>>\n\n\t<<if $PERM_darkonlight>>\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 + ", 0)'>" + $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
<<widget starfield>>\n<div class="starfield">\n<<for _n = 0; _n < 200; _n++>>\n\t<<set _x = randomFloat(0.0,100.0)>>\n\t<<set _y = randomFloat(0.0,100.0)>>\n\t<<set _c = random(50,200)>>\n\t<<set _s = random(25, 75) + "%">>\n\t<<print "<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<</for>>\n</div>\n<</widget>>
/* 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<<set _quality = "mediocre">>\n\n\t\t\t\t/* Ruins */\n\t\t<<case "Monumental ruins">>\t\t\t<<set _quality = "good">>\n\t\t<<case "High-tech ruins">>\t\t\t<<set _quality = "good">>\n\t\t<<case "Dangerous ruins">>\t\t\t<<set _quality = "bad">>\n\t\t<<case "Regular geological formations">>\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<<print "@@.mediocre;" + $tech_level_names[$planet.native_tech_level].toUpperFirst() + " civilisation@@">>\n\t<<else>>\n\t\t<<print "@@." + _quality + ";" + $args[0] + "@@">>\n\t<</if>>\n<</widget>>\n\n
<<set $continue_text = "Continue">>\n\n<<set $system_names = \n\t[ \t"atmosphere scanner",\n\t\t"gravity scanner",\n\t\t"temperature scanner",\n\t\t"resources scanner",\n\t\t"water scanner",\n\t\t"landing system",\n\t\t"construction system",\n\t\t"scientific database",\n\t\t"cultural database",\n\t\t"surface probes",\n\t\t"sleep chambers" ] >>\n\n<<set $MO_encounters_first_two =\n\t[\t"MO Impact Choice",\n\t\t"MO Comet Choice",\n\t\t"MO Micrometeorite",\n\t\t"MO Radiation Burst",\n\t\t"MO Overheating"] >>\n\n<<set $MO_encounters_uneventful =\n\t[\t"MO Uneventful 1",\n\t\t"MO Uneventful 2",\n\t\t"MO Uneventful 3",\n\t\t"MO Uneventful 4",\n\t\t"MO Uneventful 5" ] >>\n\n<<set $MO_encounters_common =\n\t[\t"MO Impact Choice",\n\t\t"MO Comet Choice",\n\t\t"MO Micrometeorite",\n\t\t"MO Protoplanetary Disc",\n\t\t"MO Avoid Dust",\n\t\t"MO Radiation Burst",\n\t\t"MO Sensor Anomaly",\n\t\t"MO Overheating"] >>\n\n<<set $MO_encounters_rare =\n\t[\t"MO Racist Program",\n\t\t"MO Trailing Drone",\n\t\t"MO Alien Signal",\n\t\t"MO Alien Derelict",\n\t\t"MO Alien Probe",\n\t\t"MO Read Databases"] >>\n\n<<set $MO_encounters_malfunction =\n\t[\t"MO Probe Malfunction",\n\t\t"MO Computer Failure",\n\t\t"MO Stasis Failure",\n\t\t"MO System Failure",\n\t\t"MO Scanner Failure"] >>\n\t\n\n\n<<set $tech_level_names = \n\t[\t"Pre-Stone Age",\n\t\t"Paleolithic",\n\t\t"Mesolithic",\n\t\t"Neolithic",\n\t\t"Bronze Age",\n\t\t"Iron Age",\n\t\t"Medieval",\n\t\t"Industrial",\n\t\t"Atomic Age",\n\t\t"Information Age",\n\t\t"Post-Singularity"]>>\n\n<<set $culture_names = \n\t[\t"Savagery",\n\t\t"Warring Tribes",\n\t\t"Brutal Chieftains",\n\t\t"Benevolent Chieftains",\n\t\t"Collective Rule",\n\t\t"Warring States",\n\t\t"Slave-Based Empire",\n\t\t"Oppressive Theocracy",\n\t\t"Benevolent Monarchy",\n\t\t"Egalitarian Republic",\n\t\t"Post-Nuclear Wasteland",\n\t\t"Warring Superpowers",\n\t\t"Dystopian Police State",\n\t\t"Rule by Corporations",\n\t\t"Corrupt Democracy",\n\t\t"Engaged Democracy",\n\t\t"Post-Scarcity Utopia",\n\t\t"Cosmic Enlightenment"]>>\n\n<<set $native_relations_names = \n\t[\t"Genocide of Colonists",\n\t\t"Genocide of Natives",\n\t\t"Colonists Enslaved",\n\t\t"Natives Enslaved",\n\t\t"Isolationism",\n\t\t"Friendly",\n\t\t"Integrated Societies"]>>\n\n\n\n<<set $max_colonists = 1000>>\n<<set $max_probes = 10>>\n\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 = $max_colonists>>\n<<set $surface_probes = $max_probes>>\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 $max_score_per_planet_attribute = 500>>
<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<span class="main-loop-link-spacer"> | </span>\n\t[[Move on|Level up]]\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]]@@
data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOTIiIGhlaWdodD0iMTA0IiB2aWV3Qm94PSIwIDAgMjkyIDEwNCI+CiAgPHBhdGggZmlsbD0iI0ZGRkZGRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMjg0LjM2NzI0NCwxMDQgTDI4NC4zNjcyNDQsMS40MjEwODU0N2UtMTQgTDI5MS45OTgxMjgsMS40MjEwODU0N2UtMTQgTDI5MS45OTgxMjgsMTA0IEwyODQuMzY3MjQ0LDEwNCBaIE0yNDEuODc5NTY5LDM0LjY2ODU0ODQgTDI0OS40NjI3NjEsMzQuNjY4NTQ4NCBMMjQ5LjQ2Mjc2MSw2Ny42NDA2ODUxIEwyNDEuNTAyODkyLDY3LjY0MDY4NTEgTDIyOS42MzEyMjEsNDYuNDQzNjY1IEwyMjkuNjMxMjIxLDY3LjY0MDY4NTEgTDIyMi4wMDAzMzcsNjcuNjQwNjg1MSBMMjIyLjAwMDMzNywzNC42Njg1NDg0IEwyMjkuOTYwMjA2LDM0LjY2ODU0ODQgTDI0MS44Nzk1NjksNTYuMTQ3MjQ5NCBMMjQxLjg3OTU2OSwzNC42Njg1NDg0IFogTTE5MS45MDIxNDMsMzMuODIwMzkxMiBDMjAyLjgyODcxMywzMy44MjAzOTEyIDIwOS4zMjk1NjUsNDIuMTEwODk5NCAyMDkuMzI5NTY1LDUxLjE1NDY2NTQgQzIwOS4zMjk1NjUsNjAuMTk4MzM0MSAyMDIuODI4NzEzLDY4LjQ4ODkzOTYgMTkxLjkwMjE0Myw2OC40ODg5Mzk2IEMxODAuOTI1OTM0LDY4LjQ4ODkzOTYgMTc0LjQyNTA4Miw2MC4xOTgzMzQxIDE3NC40MjUwODIsNTEuMTU0NjY1NCBDMTc0LjQyNTA4Miw0Mi4xMTA4OTk0IDE4MC45MjU5MzQsMzMuODIwMzkxMiAxOTEuOTAyMTQzLDMzLjgyMDM5MTIgWiBNMjAxLjU1ODUyMSw1MS4xNTQ2NjU0IEMyMDEuNTU4NTIxLDQ1LjczNzkwNTUgMTk3Ljg4MzIzOCw0MC42OTc3MjU4IDE5MS45MDIxNDMsNDAuNjk3NzI1OCBDMTg1Ljg3MjM4Miw0MC42OTc3MjU4IDE4Mi4yNDU3NjUsNDUuNzM3OTA1NSAxODIuMjQ1NzY1LDUxLjE1NDY2NTQgQzE4Mi4yNDU3NjUsNTYuNTcxNDI1NCAxODUuODcyMzgyLDYxLjYxMTUwNzcgMTkxLjkwMjE0Myw2MS42MTE1MDc3IEMxOTcuODgzMjM4LDYxLjYxMTUwNzcgMjAxLjU1ODUyMSw1Ni41NzE0MjU0IDIwMS41NTg1MjEsNTEuMTU0NjY1NCBaIE02OC42Nzg5MzMxLDQxLjI2MjY0NDggTDY4LjY3ODkzMzEsMzQuNjY4NTQ4NCBMOTEuMjM5OTczOCwzNC42Njg1NDg0IEw5MS4yMzk5NzM4LDQxLjI2MjY0NDggTDgzLjc1MDEyNDUsNDEuMjYyNjQ0OCBMODMuNzUwMTI0NSw2Ny42NDA2ODUxIEw3Ni4xMTk1MzIxLDY3LjY0MDY4NTEgTDc2LjExOTUzMjEsNDEuMjYyNjQ0OCBMNjguNjc4OTMzMSw0MS4yNjI2NDQ4IFogTTE0OS41NTU2MDEsNDguMjgwOTE3MiBMMTYyLjAzNzU0OCw0OC4yODA5MTcyIEwxNjIuMDM3NTQ4LDU0LjI2NDI1MDggTDE0OS41NTU2MDEsNTQuMjY0MjUwOCBMMTQ5LjU1NTYwMSw2MS41MTY1MTEgTDE2Mi4wMzc1NDgsNjEuNTE2NTExIEwxNjIuMDM3NTQ4LDY3LjY0MDY4NTEgTDE0MS45MjQ3MTcsNjcuNjQwNjg1MSBMMTQxLjkyNDcxNywzNC42Njg1NDg0IEwxNjIuMDM3NTQ4LDM0LjY2ODU0ODQgTDE2Mi4wMzc1NDgsNDAuNzkyNzIyNSBMMTQ5LjU1NTYwMSw0MC43OTI3MjI1IEwxNDkuNTU1NjAxLDQ4LjI4MDkxNzIgWiBNMTE2Ljk1OTg1LDM0LjY2ODU0ODQgQzEyNC4yNTk4MDMsMzQuNjY4NTQ4NCAxMjguOTcwNzA3LDQwLjE4MDMwNTEgMTI4Ljk3MDcwNyw0Ni41ODYwNjI3IEMxMjguOTcwNzA3LDUxLjIwMjE2MzggMTI2LjUyMDg0Miw1NS4yOTkwOTIyIDEyMi40MjIxNjIsNTcuMjMxMzQxMSBMMTI5LjAxODQsNjcuNjQwNjg1MSBMMTIwLjE2MzA3LDY3LjY0MDY4NTEgTDExNC4zMjAxODcsNTguNTAxOTIyMyBMMTEwLjc0MDI5LDU4LjUwMTkyMjMgTDExMC43NDAyOSw2Ny42NDA2ODUxIEwxMDMuMTEwMzc5LDY3LjY0MDY4NTEgTDEwMy4xMTAzNzksMzQuNjY4NTQ4NCBMMTE2Ljk1OTg1LDM0LjY2ODU0ODQgWiBNMTIxLjI0NTQwOSw0Ni41ODYwNjI3IEMxMjEuMjQ1NDA5LDQzLjUyMzk3NTcgMTE5LjE3MjIyMyw0MC44ODYwNjQ2IDExNS45NjkwMDMsNDAuODg2MDY0NiBMMTEwLjc0MDI5LDQwLjg4NjA2NDYgTDExMC43NDAyOSw1Mi4yODQ1MDM1IEwxMTUuOTY5MDAzLDUyLjI4NDUwMzUgQzExOS4xNzIyMjMsNTIuMjg0NTAzNSAxMjEuMjQ1NDA5LDQ5LjY0ODE0OTcgMTIxLjI0NTQwOSw0Ni41ODYwNjI3IFogTTUzLjc0NjgzMDEsNjMuNjM3MDk4NyBMNDIuMDE3NTU3Myw2My42MzcwOTg3IEw0MC43NDUyMjQxLDY3LjY0MDY4NTEgTDMyLjU5NTQ1OTEsNjcuNjQwNjg1MSBMNDQuMzcyMjMwMiwzNC42Njg1NDg0IEw1MS4zOTA0MDUyLDM0LjY2ODU0ODQgTDYzLjMwNzkxOTUsNjcuNjQwNjg1MSBMNTUuMDE3NDExMyw2Ny42NDA2ODUxIEw1My43NDY4MzAxLDYzLjYzNzA5ODcgWiBNNDcuOTA0MjM5Niw0NC4wODg5OTIgTDQzLjg1MzE1NDksNTcuNjU1NDE5NyBMNTEuODYwMzI3Niw1Ny42NTU0MTk3IEw0Ny45MDQyMzk2LDQ0LjA4ODk5MiBaIE0xMy44MDA2MTAyLDM0LjY2ODU0ODQgQzIxLjEwMjEyMDcsMzQuNjY4NTQ4NCAyNS44MTMxMjEyLDQwLjE4MDMwNTEgMjUuODEzMTIxMiw0Ni41ODYwNjI3IEMyNS44MTMxMjEyLDUyLjk5MTgyMDMgMjEuMTAyMTIwNyw1OC41MDE5MjIzIDEzLjgwMDYxMDIsNTguNTAxOTIyMyBMNy42MzA1OTI0Miw1OC41MDE5MjIzIEw3LjYzMDU5MjQyLDY3LjY0MDY4NTEgTDAsNjcuNjQwNjg1MSBMMCwzNC42Njg1NDg0IEwxMy44MDA2MTAyLDM0LjY2ODU0ODQgWiBNMTguMTM1MDMwNCw0Ni41ODYwNjI3IEMxOC4xMzUwMzA0LDQzLjUyMzk3NTcgMTYuMDYxOTQxLDQwLjg4NjA2NDYgMTIuODU5MDEzNiw0MC44ODYwNjQ2IEw3LjYzMDU5MjQyLDQwLjg4NjA2NDYgTDcuNjMwNTkyNDIsNTIuMjg0NTAzNSBMMTIuODU5MDEzNiw1Mi4yODQ1MDM1IEMxNi4wNjE5NDEsNTIuMjg0NTAzNSAxOC4xMzUwMzA0LDQ5LjY0ODE0OTcgMTguMTM1MDMwNCw0Ni41ODYwNjI3IFoiLz4KPC9zdmc+Cg==
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_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<<case 1>>\n\t\t\t\t<<set $off_course = true>>\n\t\t\t\tThe alien ship eventually breaks off pursuit, but not before the seedship has deviated so far from its original course that it can no longer reach its intended destination system and must decelerate into the first system it finds.\n\t\t\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<<case 2>>\n\t\t\t\t<<set $off_course = true>>\n\t\t\t\tThe seedship fires its engine at full burn, straying far from its original course, but it cannot shake off the alien ship. <<display [[MO Alien Probe Tentacles]]>>\n\t\t<</switch>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\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]]>>
Deep in space, the AI wakes suddenly to an alert from the medical monitoring program. It anxiously checks the colonists, but finds that there is no problem, and the alert was a glitch. Nevertheless, the AI spends some time watching its sleeping charges, reassuring itself that they are all alive, before it joins them again in sleep.\n\n<<continueLink [[MO Done]]>>
The next star chosen by the guidance system is on the other side of a great void, with no stars for dozens of light years. The AI hibernates for the millennia-long journey through utter emptiness.\n\n<<continueLink [[MO Done]]>>
<<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\tfinal_tech_level: -1,\n\tfinal_culture: -1,\n\tnative_relations: -1,\n\tfinal_score: 0,\n\tscore_landing: 0,\n\tscore_construction: 0,\n\tscore_native_relations: 0,\n\tscore_technology: 0,\n\tscore_culture: 0,\n\tscore_scientific_database: 0,\n\tscore_cultural_database: 0,\n\tscore_atmosphere: 0,\n\tscore_gravity: 0,\n\tscore_temperature: 0,\n\tscore_water: 0,\n\tscore_resources: 0,\n\tsummary: "" } >>\n\n\n<<if $system_landing >= 100>>\n\tThe landing system controls the seedship's descent, and it\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes gently down into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes gently down into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\ttouches gently down on the top of the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\ttouches gently down on a field of alien vegetation.\n\t<<else>>\n\t\ttouches gently down on the rocky surface.\n\t<</if>>\n<<elseif $system_landing >= 50>>\n\tThe damaged landing system cannot completely control the seedship's descent, and it suffers some damage when it \n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes down into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes down into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\ttouches down on the top of the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\ttouches down on a field of alien vegetation.\n\t<<else>>\n\t\ttouches down on the rocky surface.\n\t<</if>>\n<<else>>\n\t<<if $system_landing <= 0>>\n\t\tThe AI uses the manoeuvring thrusters to barely control the seedship's descent, and it\n\t<<else>>\n\t\tThe badly damaged landing system struggles to control the seedship's descent, and it\n\t<</if>>\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\tsplashes down hard into the planet-wide ocean.\n\t<<elseif $planet.water == "Oceans">>\n\t\tsplashes down hard into the ocean off the shore of one of the planet's continents.\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\tcrashes into the planet-wide ice sheet.\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\tploughs through a field of alien vegetation before coming to a stop.\n\t<<else>>\n\t\tsmashes into the planet's rocky surface.\n\t<</if>>\n<</if>>\n\n\n\n/* Roll to see if it is a landing or a crash */\n/* Roll crash damage and then reduce it by landing system integrity. */\n<<set _damage = 100 - $system_landing>>\n<<if _damage > 0>>\n\t/* All systems are damaged by up to the damage amount. */\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "atmosphere scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "temperature scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "gravity scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "water scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "resources scanner" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "surface probes" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "landing system" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "construction system" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "scientific database" _r>>\n\t<<set _r = Math.ceil(random(0, _damage))>>\t<<damageSystem "cultural database" _r>>\n\n\t\t/* Colonist deaths are lower (in proportion to the total colonists) - crash can't kill more than 500. */\n\t<<set _r = Math.ceil(random(0, _damage*5))>>\t<<damageSystem "sleep chambers" _r>>\n<</if>>\n\n<<set $hiscore.score_landing = $colonists>>\n<<if $colonists == 0>>\n\t<<set $hiscore.summary = "Crash">>\n\t<br><br><<FCNextPassage [[FC Done]]>>\n<<else>>\n\t<<display [[FC First Impression]]>>\n<</if>>\n
/% $args[0] should be the link URL %/\n<<widget externalLink>>\n\t<<script>>\n\t\tcordova.InAppBrowser.open(variables().args[0], "_system");\n\t<</script>>\n<</widget>>
<<set $hiscore.score_construction = $colonists>>\n\n<<if $colonists <= 100>>\n\tHeavy losses mean that the colony has a very small population, but the colonists were trained in cloning and genetic engineering techniques to compensate for this. The first few generations include children cloned from the surviving genetic material of the dead colonists, until the population's genetic diversity increases to a safe level.\n\t<br><br>\n<</if>>\n\n\n/* Technology result is based on scientific database, influenced by resources. */\n<<set _technology_score = $system_scientific_database>>\n<<if $planet.surface_features.includes("Metal-rich moon")>>\n\t<<if $planet.resources == "Rich">>\n\t\t<<set _technology_score *= 1.05>>\n\t<<elseif $planet.resources == "Poor">>\n\t\t<<set _technology_score *= 0.95>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _technology_score *= 0.85>>\n\t<</if>>\n<<else>>\n\t<<if $planet.resources == "Poor">>\n\t\t<<set _technology_score *= 0.7>>\n\t<<elseif $planet.resources == "None">>\n\t\t<<set _technology_score *= 0.4>>\n\t<</if>>\n<</if>>\n@@.debug-text;Technology score = _technology_score@@\n\n<<switch $planet.resources>>\n\t<<case "Rich">>\n\t\tThe planet is rich in metals and other resources, \n\t<<case "Poor">>\n\t\tThe planet is poor in metals and other resources,\n\t<<case "None">>\n\t\tThe planet has no accessible metals or other resources,\n\t<<default>>\n\t\t@@.error;Unexpected resources value $planet.resources.@@\n<</switch>>\n\n<<if $planet.resources == "Rich">>\n\t<<if $system_scientific_database >= 100>>\n\t\tand the scientific database contains a wealth of information on how to make use of them.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tand the damaged scientific database still contains much information on how to make use of them.\n\t<<elseif $system_scientific_database > 0>>\n\t\talthough the badly damaged scientific database means that the colonists must re-invent much of the technology needed to make use of them.\n\t<<else>>\n\t\talthough without the scientific database the colonists must re-invent most of the technology needed to make use of them.\n\t<</if>>\n<<elseif $planet.resources == "Poor">>\n\t<<if $system_scientific_database >= 100>>\n\t\tbut the scientific database contains a wealth of information on how to make use of what there is.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tbut the damaged scientific database still contains much information on how to make use of what there is.\n\t<<elseif $system_scientific_database > 0>>\n\t\tand the badly damaged scientific database means that the colonists find it difficult to make use of what there is.\n\t<<else>>\n\t\tand without the scientific database the colonists find it difficult to make use of what there is.\n\t<</if>>\n<<elseif $planet.resources == "None">>\n\t<<if $system_scientific_database >= 100>>\n\t\tso the colonists cannot maintain a high level of technology even with the fully intact scientific database.\n\t<<elseif $system_scientific_database >= 50>>\n\t\tso the colonists cannot maintain a high level of technology even with the mostly intact scientific database.\n\t<<elseif $system_scientific_database > 0>>\n\t\tso the colonists find it hard to make use of what they can recover from the scientific database.\n\t<<else>>\n\t\tand any information the scientific database might have held that could help them has been destroyed.\n\t<</if>>\n<</if>>\n\n<<if $planet.surface_features.includes("Metal-rich moon")>>\n\tThe colonists use what is left of the seedship to build spacecraft capable of reaching the planet's metal-rich moon,\n\t<<if $planet.resources == "Rich">>\n\t\tand mine it to supplement the planet's already rich resources.\n\t<<else>>\n\t\tand mine it to partially compensate for the planet's lack of resources.\n\t<</if>>\n<<elseif $planet.surface_features.includes("Unstable moon")>>\n\tBefore the colonists have established their technological base, the planet's moon decays in its orbit and breaks up, bombarding the surface with meteorites. Some of the colonists survive, but much of their technology is destroyed.\n\t<<set _technology_score -= 30>>\n\t@@.debug-text;Modified technology score: _technology_score@@\n<</if>>\n\n/* If the planet has any red attributes and the final result is less than Industrial, colony fails. */\n/* Otherwise, final result is based on final technology score. */\n<<if _technology_score > 100 & $system_scientific_database > 100>>\n\t<<set $hiscore.final_tech_level = 10>>\n\t<<set $hiscore.score_technology = 3000>>\n\tThe colonists use alien scientific knowledge to create a level of technology beyond the dreams of the people who built the seedship.\n<<elseif _technology_score > 90>>\n\t\t/* Max with poor resources and metal-rich moon */\n\t<<set $hiscore.final_tech_level = 9>>\n\tThe colonists manage to maintain a level of technology equivalent to that of Earth when the seedship was launched.\n<<elseif _technology_score > 80>>\n\t\t/* Max with no resources but metal-rich moon */\n\t<<set $hiscore.final_tech_level = 8>>\n\tThe colonists fail to maintain their advanced computers but continue to use simpler electronics and machines.\n<<elseif _technology_score > 70>>\n\t<<set $hiscore.final_tech_level = 7>>\n\tThe colonists are forced to abandon electricity but manage to build machines and factories similar to those of Earth's Industrial era.\n<<elseif _technology_score > 60>>\n\t\t/* Max with poor resources */\n\t<<set $hiscore.final_tech_level = 6>>\n\tThe colonists transition to a medieval level of technology.\n<<elseif _technology_score > 50>>\n\t<<set $hiscore.final_tech_level = 5>>\n\tThe colonists transition to a technology based on iron tools.\n<<elseif _technology_score > 40>>\n\t<<set $hiscore.final_tech_level = 4>>\n\tThe colonists transition to a technology based on sophisticated stone, wood and bronze tools.\n<<elseif _technology_score > 30>>\n\t\t/* Max with no resources */\n\t<<set $hiscore.final_tech_level = 3>>\n\tThe colonists transition to a technology based on sophisticated stone and wood tools.\n<<elseif _technology_score > 20>>\n\t<<set $hiscore.final_tech_level = 2>>\n\tThe colonists lose all but the most basic knowledge of stone tools and simple agriculture.\n<<elseif _technology_score > 10>>\n\t<<set $hiscore.final_tech_level = 1>>\n\tThe colonists lose almost all knowledge of agriculture and metalworking and survive as hunter-gatherers using simple stone tools.\n<<else>>\n\t<<set $hiscore.final_tech_level = 0>>\n\tThe colonists lose even the most basic scientific knowledge and slip back to a pre-Stone Age existence.\n<</if>>\n\n<<if _technology_score <= 70 & \n\t( $planet.atmosphere == "Corrosive" | $planet.atmosphere == "Toxic" | $planet.atmosphere == "Non-breathable" | $planet.atmosphere == "None"\n\t| $planet.temperature == "Very cold" | $planet.temperature == "Very hot"\n\t| $planet.gravity == "Very low" | $planet.gravity == "Very high"\n\t| $planet.water == "None" | $planet.water == "Trace") >>\n\tThe planet cannot sustain human life without technological assistance,\n\n\t<<if $planet.atmosphere == "Corrosive" | $planet.atmosphere == "Toxic" | $planet.atmosphere == "Non-breathable" | $planet.atmosphere == "None">>\n\t\t<<set _atmosphere_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _atmosphere_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.temperature == "Very cold" | $planet.temperature == "Very hot">>\n\t\t<<set _temperature_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _temperature_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.gravity == "Very low" | $planet.gravity == "Very high">>\n\t\t<<set _gravity_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _gravity_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\t<<if $planet.water == "None" | $planet.water == "Trace">>\n\t\t<<set _water_problem = "problem">>\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\t<<set _water_problem = "solved">>\n\t\t<</if>>\n\t<</if>>\n\n\t<<if _atmosphere_problem == "problem">>\n\t\tand the original colonists' descendants are killed when they can no longer maintain their airtight habitats.\n\t\t<<set $colonists = 0>>\n\t<<elseif _temperature_problem == "problem">>\n\t\tand the original colonists' descendants are killed when their structures can no longer withstand the extreme\n\t\t<<if $planet.temperature == "Very hot">>heat.<<else>>cold.<</if>>\n\t\t<<set $colonists = 0>>\n\t<<elseif _gravity_problem == "problem">>\n\t\tand the original colonists' descendants die of health problems caused by the very\n\t\t<<if $planet.gravity == "Very high">>high<<else>>low<</if>> gravity.\n\t\t<<set $colonists = 0>>\n\t<<elseif _water_problem == "problem">>\n\t\tand the original colonists' descendants die when their water-purifying systems stop functioning.\n\t\t<<set $colonists = 0>>\n\t<<else>>\n\t\tbut, before their technology fails, the original colonists\n\t\t<<if _atmosphere_problem == "solved" | _temperature_problem == "solved">>\n\t\t\t<<if _gravity_problem == "solved" | _water_problem == "solved">><<set _p = ",">><<else>><<set _p = ".">><</if>>\n\t\t\tbuild robust\n\t\t\t<<if _atmosphere_problem == "solved" & _temperature_problem == "solved">>\n\t\t\t\tairtight, insulated\n\t\t\t<<elseif _atmosphere_problem == "solved">>\n\t\t\t\tairtight\n\t\t\t<<else>>\n\t\t\t\tinsulated\n\t\t\t<</if>>\n\t\t\thabitats_p\n\t\t<</if>>\n\t\t<<if _gravity_problem == "solved">>\n\t\t\t<<if _water_problem == "solved">><<set _p = ",">><<else>><<set _p = ".">><</if>>\n\t\t\t<<if (_atmosphere_problem == "solved" | _temperature_problem == "solved") & _water_problem != "solved">>and<</if>>\n\t\t\tgenetically engineer their descendants to survive in the very <<if $planet.gravity == "Very high">>high<<else>>low<</if>> gravity_p\n\t\t<</if>>\n\t\t<<if _water_problem == "solved">>\n\t\t\t<<if _atmosphere_problem == "solved" | _temperature_problem == "solved" | _gravity_problem == "solved">>and<</if>>\n\t\t\tset up automated water recycling systems that can work indefinitely without maintenance.\n\t\t<</if>>\n\t<</if>>\n<</if>>\n\n<<if $hiscore.final_tech_level < 7>>\n\t<<set $system_scientific_database = Math.round($system_scientific_database * 0.1 * $hiscore.final_tech_level)>>\n<</if>>\n\n<br><br>\n\n<<if $colonists == 0>>\n\t<<set $hiscore.final_tech_level = -1>>\n\t<<set $hiscore.summary = "Long-Term Technological Failure">>\n<</if>>\n\n<<if $planet.surface_features.includes("Intelligent life") >>\n\t<<FCNextPassage [[FC Native Relations]]>>\s\n<<else>>\s\n\t<<FCNextPassage [[FC Culture]]>>\n<</if>>\s\n
As it enters the new system, the seedship is struck by a micrometeorite. \n<<if visited() == 1>>\n\tIt is a speck of cosmic dust, far too small for the navigation system to detect from a distance, but travelling with enough velocity to pierce the seedship's armour like a bullet.\n<</if>>\n\n<<randomSystemExcluding "destroyed">>\n<<if $system == "sleep chambers">>\n\t<<killColonistsFew>>\n\tIt hits the sleep capsules, leaving a straight line of tiny punctures from which air and cooling fluid vents into the vacuum. The seedship's AI can only watch helplessly as $deaths colonists die in their sleep.\n<<elseif $system == "surface probes">>\n\t<<set $surface_probes -= 1>>\n\tIt hits one of the surface probes and destroys it.\n<<else>>\n\t<<randomDamageLow>>\n\t<<damageSystem $system $damage>>\n\tIt hits the $system, sending fragments of machinery glittering into space.\n<</if>>\n\n<br><br><<continueLink [[MO Done]]>>
<<widget fadeIn>>\n\t<<script>>\n\t\t$(variables().args[0]).hide();\n\t\t$(variables().args[0]).fadeIn(400);\n\t<</script>>\n<</widget>>\n\n<<widget replaceAndFadeIn>>\n\t/* $args[0] should be the id of the page element to replace */\n\t/* $args[1] should be the passage to display */\n\t<<replace $args[0]>>\n\t\t<<display $args[1]>>\n\t<</replace>>\n\t<<fadeIn $args[0]>>\n<</widget>>\n\n<<widget continueLink>>\n\t/* Creates an ordinary link pointing to the passage $args[0] with $continue_text as the text. */\n\t<span id="spaceAct"><<link $continue_text>><<goto $args[0]>><</link>></span>\n<</widget>>
<<widget FC_Construction_gravity>>\n\n/* Describe gravity survival gear */\n<<if $args[0] > 0>>\n\t<<set _p = ",">>\n<<else>>\n\t<<set _p = ".">>\n<</if>>\n<<if $planet.surface_features.includes("Useful animals")>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very high">>\n\t\t\tThey harness some of the immensely powerful native animals as beasts of burden, so the colonists do not have to exert themselves in the crushing gravity_p\n\t\t<<case "High">>\n\t\t\tThey harness some of the planet's powerful native animals as beasts of burden, making work in the high gravity easier_p\n\t\t<<case "Moderate">>\n\t\t\tThey harness some of the planet's native animals as beasts of burden_p\n\t\t<<case "Low">>\n\t\t\tThey harness some of the planet's agile native animals as beasts of burden, making work in the low gravity less awkward_p\n\t\t<<case "Very low">>\n\t\t\tThey harness some of the planet's agile native animals as beasts of burden, making work in the extremely low gravity less awkward_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected gravity value $planet.gravity@@\n\t<</switch>>\n<<else>>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very high">>\n\t\t\tThe crushing gravity means they can barely move without mechanical assistance_p\n\t\t<<case "High">>\n\t\t\tThe high gravity makes the work more difficult_p\n\t\t<<case "Moderate">>\n\t\t\tThey can move easily under the Earth-like gravity_p\n\t\t<<case "Low">>\n\t\t\tThe low gravity makes the work somewhat more difficult than it would have been on Earth_p\n\t\t<<case "Very low">>\n\t\t\tThe very low gravity makes the work more difficult than it would have been on Earth_p\n\t\t<<default>>\n\t\t\t@@.error;Unexpected gravity value $planet.gravity@@\n\t<</switch>>\n<</if>>\n/* Gravity death numbers */\n<<if $args[0] > 0>>\n\t<<if $planet.gravity == "Moderate" | $planet.surface_features.includes("Useful animals")>>but<<else>>and<</if>>\n\t<<if _gravity_success>>\n\t\tconstruction accidents kill $args[0] colonists.\n\t<<elseif $planet_gravity == "Low " | $planet.gravity == "Very low">>\n\t\t$args[0] colonists die of gravity-related health problems.\n\t<<else>>\n\t\t$args[0] colonists are killed when partially-completed buildings collapse.\n\t<</if>>\n<</if>>\n\n<</widget>>
<<if random(0,1) == 0>>\n\t<<set $system = "sleep chambers">>\n<<else>>\n\t<<randomSystemExcluding "sleep chambers" "scientific database" "cultural database" "surface probes" "destroyed">>\n<</if>>\nThe alien ship matches velocity with the seedship and comes alongside, so close that the two ships are almost touching. The seedship feels lasers probing the contours of its hull, then segmented mechanical tentacles unfurl and reach towards the $system.\n\n<br><br>\n\n<div id="result-area2">\n<<link "Submit to the tentacles">>\n\t<<replace "#result-area2">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t/* 50% chance of moderate colonist loss, 50% chance of scanner upgrade */\n\t\t\tAlien tentacles twine through the mechanisms surrounding the sleep capsules, sensors on their tips scanning the faces and bodies of the sleeping colonists.\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\t/* Upgrade a random scanner */\n\t\t\t\tAfter several long minutes the tentacles withdraw, and the seedship's antenna picks up a new signal from the alien ship.\n\t\t\t\t<<set _possible_upgrades = []>>\n\t\t\t\t<<if $scanner_atmosphere_level < 2 & $scanner_atmosphere > 0>><<set _possible_upgrades.push("atmosphere")>><</if>>\n\t\t\t\t<<if $scanner_temperature_level < 2 & $scanner_temperature > 0>><<set _possible_upgrades.push("temperature")>><</if>>\n\t\t\t\t<<if $scanner_gravity_level < 2 & $scanner_gravity > 0>><<set _possible_upgrades.push("gravity")>><</if>>\n\t\t\t\t<<if $scanner_water_level < 2 & $scanner_water > 0>><<set _possible_upgrades.push("water")>><</if>>\n\t\t\t\t<<if $scanner_resources_level < 2 & $scanner_resources > 0>><<set _possible_upgrades.push("resources")>><</if>>\n\t\t\t\t<<if _possible_upgrades.length == 0>>\n\t\t\t\t\tIt consists of images of planets suitable for human life, with the seedship on the surface and healthy human beings standing around it. The AI cannot be sure, but it seems that the alien ship is wishing it luck on its mission.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<set _upgrade = either(_possible_upgrades)>>\n\t\t\t\t\tIt consists of compressed data in the same format as that returned by the seedship's _upgrade scanner--enough data to let the seedship upgrade that scanner. The AI cannot be sure, but it seems that the alien ship has guessed the seedship's mission, analysed the sort of planet the sleeping humans need, and given the seedship information to help it find such a planet.\n\t\t\t\t\t<<switch _upgrade>>\n\t\t\t\t\t\t<<case "atmosphere">>\t<<set $scanner_atmosphere_level += 1>>\n\t\t\t\t\t\t<<case "temperature">>\t<<set $scanner_temperature_level += 1>>\n\t\t\t\t\t\t<<case "gravity">>\t\t<<set $scanner_gravity_level += 1>>\n\t\t\t\t\t\t<<case "water">>\t\t<<set $scanner_water_level += 1>>\n\t\t\t\t\t\t<<case "resources">>\t<<set $scanner_resources_level += 1>>\n\t\t\t\t\t\t<<default>>\t\t\t\t@@.error;Unexpected upgrade _upgrade.@@\n\t\t\t\t\t<</switch>>\n\t\t\t\t<</if>>\n\t\t\t<<else>>\n\t\t\t\t/* Aliens abduct colonists */\n\t\t\t\t<<killColonistsMany>>\n\t\t\t\tWith the tentacles thoroughly entwined among the sleep capsules, there is nothing the seedship AI can do when sleep capsules begin to vanish from its monitoring system. The tentacles withdraw, carrying $deaths sleep capsules, supplying power to the capsules to keep their occupants alive. The tentacles withdraw into the alien ship and it accelerates away with the still-living colonists inside. The AI can do nothing but resume its journey and try not to think about those colonists' fate.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\t/* 50% chance of system repair, 50% chance of high damage */\n\t\t\tThe tentacles work their way into the $system, sensors on their tips scanning its components.\n\t\t\t<<if random(0,1) == 0>>\n\t\t\t\t\t/* System repair */\n\t\t\t\t<<getSystemStrength $system>>\n\t\t\t\t<<if $system_strength >= 100>>\n\t\t\t\t\tAfter a few minutes they withdraw, apparently satisfied with what they have discovered, and the alien ship accelerates away.\n\t\t\t\t<<else>>\n\t\t\t\t\t<<set _damage = 100-$system_strength>>\n\t\t\t\t\t<<set _repair = 0 - Math.min(_damage, random(5,25))>>\n\t\t\t\t\t<<damageSystem $system _repair>>\n\t\t\t\t\tThe system abruptly registers damage as lasers on the tentacles' tips surgically remove key components, but after a few minutes the damage monitor registers damaged parts of the system coming back online. The alien ship appears to have analysed the $system, determined that it was damaged, and is now repairing it. After a few minutes of work the tentacles withdraw and the ship accelerates away, leaving the AI wishing it had some way of thanking its alien benefactor.\n\t\t\t\t<</if>>\n\t\t\t<<else>>\n\t\t\t\t\t/* System damage */\n\t\t\t\t<<randomDamageHigh>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tThe system abruptly registers damage as lasers on the tentacles' tips surgically remove key components. To the AI's relief, the alien ship does not extend its tentacles again, but accelerates away with its samples of machinery.\n\t\t\t<</if>>\n\t\t<</if>>\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\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_text>><<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\tfinal_tech_level: -1,\n\tfinal_culture: -1,\n\tnative_relations: -1,\n\tfinal_score: 0,\n\tscore_landing: 0,\n\tscore_construction: 0,\n\tscore_native_relations: 0,\n\tscore_technology: 0,\n\tscore_culture: 0,\n\tscore_scientific_database: 0,\n\tscore_cultural_database: 0,\n\tscore_atmosphere: 0,\n\tscore_gravity: 0,\n\tscore_temperature: 0,\n\tscore_water: 0,\n\tscore_resources: 0,\n\tsummary: "Destroyed in space" } >>\n<<addHiscore>>\n\n<<displayScore $hiscore false>>\n\n<br>\n\n<<link "Title screen">>\n\t<<script>>\n\t\t$('#ui-bar').hide();\n\t\tSave.autosave.delete();\n\t\tEngine.restart();\n\t<</script>>\n<</link>>\n\n\n
/* If any six of the nine scanners/systems are destroyed, or if all the colonists are dead, game over */\n<<set _destroyed_systems = 0>>\n<<if $scanner_atmosphere <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_temperature <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_gravity <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_water <= 0>><<set _destroyed_systems++>><</if>>\n<<if $scanner_resources <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_landing <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_constructors <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_scientific_database <= 0>><<set _destroyed_systems++>><</if>>\n<<if $system_cultural_database <= 0>><<set _destroyed_systems++>><</if>>\n<<if _destroyed_systems >= 6>>\n\tThe seedship has sustained too much damage to continue. The AI feels its body disintegrating around it, before its own power supply fails and it ceases to feel anything.\n\n\t<br><br><<display [[Space Game Over]]>>\n<<elseif $colonists <= 0>>\n\tAll the colonists are dead. With no way to fulfil its mission, the seedship AI deactivates all systems that could wake it, and enters hibernation for the last time.\n\n\t<br><br><<display [[Space Game Over]]>>\n<<else>>\n\t<<goto [[Generate planet]]>>\n<</if>>
<<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_text>>\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\tcrop failures kill $args[0] colonists.\n\t<<else>>\n\t\twater shortages kill $args[0] colonists.\n\t<</if>>\n<</if>>\n\n<</widget>>
DEBUG: Create a custom planet:\n\n<<nobr>>\nPresets:\n<<link "Mercury">>\n\t<<set $planet.atmosphere = "None">>\n\t<<set $planet.temperature = "Very hot">>\n\t<<set $planet.gravity = "Very low">>\n\t<<set $planet.water = "None">>\n\t<<set $planet.resources = "Rich">>\n\t<<set $planet.surface_features = []>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<<link "Venus">>\n\t<<set $planet.atmosphere = "Corrosive">>\n\t<<set $planet.temperature = "Very hot">>\n\t<<set $planet.gravity = "Low">>\n\t<<set $planet.water = "None">>\n\t<<set $planet.resources = "Rich">>\n\t<<set $planet.surface_features = []>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<<link "Earth">>\n\t<<set $planet.atmosphere = "Breathable">>\n\t<<set $planet.temperature = "Moderate">>\n\t<<set $planet.gravity = "Moderate">>\n\t<<set $planet.water = "Oceans">>\n\t<<set $planet.resources = "Moderate">>\n\t<<set $planet.surface_features = ["Microbial life", "Edible plants", "Useful animals", "Space-age civilisation"]>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<<link "Moon">>\n\t<<set $planet.atmosphere = "None">>\n\t<<set $planet.temperature = "Moderate">>\n\t<<set $planet.gravity = "Very low">>\n\t<<set $planet.water = "Trace">>\n\t<<set $planet.resources = "Poor">>\n\t<<set $planet.surface_features = []>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<<link "Mars">>\n\t<<set $planet.atmosphere = "None">>\n\t<<set $planet.temperature = "Cold">>\n\t<<set $planet.gravity = "Low">>\n\t<<set $planet.water = "Ice caps">>\n\t<<set $planet.resources = "Moderate">>\n\t<<set $planet.surface_features = []>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<<link "Europa">>\n\t<<set $planet.atmosphere = "None">>\n\t<<set $planet.temperature = "Very cold">>\n\t<<set $planet.gravity = "Low">>\n\t<<set $planet.water = "Ice-covered surface">>\n\t<<set $planet.resources = "Poor">>\n\t<<set $planet.surface_features = []>>\n\t<<goto [[Orbit planet]]>>\n<</link>>\n<</nobr>>\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" "Moderate">> Moderate\n<<radiobutton "$planet.resources" "Rich">> Rich\n\nSurface features:\n<span id="surface-features-span">$planet.surface_features</span>\n<<nobr>>\n\tAdd: <<textbox "_add_feature" "">>\n\t<<link "Add">>\n\t\t<<set $planet.surface_features.push(_add_feature)>>\n\t\t<<replace "#surface-features-span">>$planet.surface_features<</replace>>\n\t<</link>>\n<</nobr>>\n<<nobr>>\n\t<<link "Clear">>\n\t\t<<set $planet.surface_features = []>>\n\t\t<<replace "#surface-features-span">>$planet.surface_features<</replace>>\n\t<</link>>\n<</nobr>>\n\nNative tech level (if natives present): <<textbox "$planet.native_tech_level" $planet.native_tech_level>>\n\n[[Done|Orbit planet]]\n\n\n
<<if $surface_probe_current_feature >= $planet.surface_features.length>>\s\n\t<<display [[SP Done]]>>\n<<else>>\s\n\t<<nobr>>\n\t\t<<switch $planet.surface_features[$surface_probe_current_feature]>>\n\t\t\t\t/* Moon */\n\t\t\t<<case "Barren moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, but finds that it is devoid of useful minerals.\n\t\t\t<<case "Metal-rich moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, and finds that it is rich in metals and other useful resources.\n\t\t\t<<case "Unstable moon">>\n\t\t\t\tAs the surface probe approaches the planet it scans the planet's moon, and finds that it is a recently-captured asteroid in an unstable orbit. In a few decades the moon will come close enough to the planet to break up, and the surface will be bombarded with fragments.\n\n\t\t\t\t/* Beauty/ugliness */\n\t\t\t<<case "Outstanding beauty">>\n\t\t\t\tThe AI runs the probe's images of the surface through its aesthetic analysis routine, and determines that humans would find the planet outstandingly beautiful.\n\t\t\t<<case "Outstanding ugliness">>\n\t\t\t\tThe AI runs the probe's images of the surface through its aesthetic analysis routine, and determines that humans would find the planet extremely ugly.\n\n\t\t\t\t/* Caves */\n\t\t\t<<case "Airtight caves">>\n\t\t\t\tThe planet's crust is riddled with extensive cave systems which could easily be sealed to provide airtight shelters.\n\t\t\t<<case "Insulated caves">>\n\t\t\t\tThe planet's crust is riddled with extensive cave systems that are insulated from the temperature on the surface.\n\t\t\t<<case "Unstable geology">>\n\t\t\t\tThe planet is geologically unstable, and dangerous earthquakes are common everywhere on the surface.\n\n\t\t\t\t\t/* Plants */\n\t\t\t<<case "Plant life">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that they would be neither edible nor poisonous to humans.\n\t\t\t<<case "Edible plants">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that some of them would be edible for humans.\n\t\t\t<<case "Poisonous plants">>\n\t\t\t\tThe probe finds alien plants. It tests a sample, and finds that they would all be highly poisonous to humans.\n\n\t\t\t\t\t/* Animals */\n\t\t\t<<case "Animal life">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that they would be neither useful nor harmful to humans.\n\t\t\t<<case "Useful animals">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that some species have the potential to be useful to humans as meat sources or beasts of burden.\n\t\t\t<<case "Dangerous animals">>\n\t\t\t\tThe probe encounters numerous animals. After analysing their behaviour, it concludes that they pose a significant threat to human colonists.\n\n\t\t\t\t\t/* Sentient life */\n\t\t\t<<case "Intelligent life">>\n\t\t\t\t<<switch $planet.native_tech_level>>\n\t\t\t\t\t<<case 0>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour and has a rudimentary language.\n\t\t\t\t\t<<case 1>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour and uses simple stone tools.\n\t\t\t\t\t<<case 2>>\n\t\t\t\t\t\tThe probe notices one species that exhibits complex social behaviour, uses sophisticated stone tools, and has begun to domesticate other animal and plant species.\n\t\t\t\t\t<<case 3>>\n\t\t\t\t\t\tThe probe investigates an area of regular plant growth, and finds that it is being deliberately cultivated by one species using sophisticated stone tools.\n\t\t\t\t\t<<case 4>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species that uses stone and bronze tools.\n\t\t\t\t\t<<case 5>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species that uses iron tools.\n\t\t\t\t\t<<case 6>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are settlements inhabited by an intelligent species with a medieval level of technology.\n\t\t\t\t\t<<case 7>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an industrial level of technology.\n\t\t\t\t\t<<case 8>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an atomic age level of technology.\n\t\t\t\t\t<<case 9>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with an Information Age level of technology.\n\t\t\t\t\t<<case 10>>\n\t\t\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are cities inhabited by an intelligent species with a post-Singularity level of technology.\n\t\t\t\t\t<<default>>\n\t\t\t\t\t\t@@.error;Unexpected native tech level $planet.native_tech_level@@\n\t\t\t\t<</switch>>\n\n\t\t\t\t/* Ruins */\n\t\t\t<<case "Monumental ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins include great monuments and writings that could reveal much about the vanished civilisation.\n\t\t\t<<case "High-tech ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins contain advanced technological artefacts, some of which are still functioning, and scientific databases that could be decoded.\n\t\t\t<<case "Dangerous ruins">>\n\t\t\t\tThe probe investigates some of the possible structures that the seedship observed from orbit, and finds that they are ruins left by a vanished intelligent species. The ruins contain functioning defense systems, and the probe barely escapes.\n\t\t\t<<case "Regular geological formations">>\n\t\t\t\tThe probe investigates the possible structures that the seedship observed from orbit, but finds that they are regular natural formations, not the product of intelligence.\n\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected surface feature <<print $planet.surface_features[$surface_probe_current_feature]>>.@@\n\t\t<</switch>>\n\n\t\t<<append "#anomalies_text">>\n\t\t\t<<displayPlanetFeature $planet.surface_features[$surface_probe_current_feature]>><br>\n\t\t<</append>>\n\n\t\t<<set $surface_probe_current_feature++>>\n\t\t<<scrollToPostPlanetStats>>\n\t<</nobr>>\n\n\t<<link $continue_text>><<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\t\t} >>\n\n<<set _green_chance = 2>>\n<<set _yellow_chance = 3>>\n<<set _red_chance = 5>>\n\n\t/* ATMOSPHERE */\n<<if visited() == 1>>\n\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif !$scanner_atmosphere_success | $scanner_atmosphere_level == 0 | $off_course>>\n\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif $scanner_atmosphere_level == 1>>\n\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n<<elseif $scanner_atmosphere_level == 2>>\n\t<<set _r = 0>>\n<<else>>\n\t@@.error;Scanner atmosphere level was $scanner_atmosphere_level.@@\n<</if>>\n\n@@.debug-text;r=_r@@\n\n<<if _r < _green_chance>>\n\t<<set $planet.atmosphere = "Breathable">>\n<<elseif _r < _green_chance + _yellow_chance>>\n\t<<set $planet.atmosphere = "Marginal">>\n<<else>>\n\t<<set $planet.atmosphere = either("Corrosive", "Toxic", "Non-breathable", "None")>>\n<</if>>\n\n\t/* GRAVITY */\n<<if visited() == 1>>\n\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif !$scanner_gravity_success | $scanner_gravity_level == 0 | $off_course>>\n\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif $scanner_gravity_level == 1>>\n\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n<<elseif $scanner_gravity_level == 2>>\n\t<<set _r = 0>>\n<<else>>\n\t@@.error;Scanner gravity level was $scanner_gravity_level.@@\n<</if>>\n\n<<if _r < _green_chance>>\n\t<<set $planet.gravity = "Moderate">>\n<<elseif _r < _green_chance + _yellow_chance>>\n\t<<set $planet.gravity = either("Low", "High")>>\n<<else>>\n\t<<set $planet.gravity = either("Very low", "Very high")>>\n<</if>>\n\n@@.debug-text;r=_r@@\n\n\n\t/* TEMPERATURE */\n<<if visited() == 1>>\n\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif !$scanner_temperature_success | $scanner_temperature_level == 0 | $off_course>>\n\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif $scanner_temperature_level == 1>>\n\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n<<elseif $scanner_temperature_level == 2>>\n\t<<set _r = 0>>\n<<else>>\n\t@@.error;Scanner temperature level was $scanner_temperature_level.@@\n<</if>>\n\n<<if _r < _green_chance>>\n\t<<set $planet.temperature = "Moderate">>\n<<elseif _r < _green_chance + _yellow_chance>>\n\t<<set $planet.temperature = either("Cold", "Hot")>>\n<<else>>\n\t<<set $planet.temperature = either("Very cold", "Very hot")>>\n<</if>>\n\n@@.debug-text;r=_r@@\n\n\n\t/* WATER */\n<<if visited() == 1>>\n\t<<set _r = random(_green_chance,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif !$scanner_water_success | $scanner_water_level == 0 | $off_course>>\n\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif $scanner_water_level == 1>>\n\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n<<elseif $scanner_water_level == 2>>\n\t<<set _r = 0>>\n<<else>>\n\t@@.error;Scanner water level was $scanner_water_level.@@\n<</if>>\n\n<<if _r < _green_chance>>\n\t<<set $planet.water = "Oceans">>\n<<elseif _r < _green_chance + _yellow_chance>>\n\t<<set $planet.water = "Planet-wide ocean">>\n<<else>>\n\t<<set $planet.water = either("Trace", "None")>>\n<</if>>\n\n@@.debug-text;r=_r@@\n\n\n\t/* RESOURCES */\n<<if visited() == 1>>\n\t<<set _r = random(1,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif !$scanner_resources_success | $scanner_resources_level == 0 | $off_course>>\n\t<<set _r = random(0,_green_chance+_yellow_chance+_red_chance-1)>>\n<<elseif $scanner_resources_level == 1>>\n\t<<set _r = random(0,_green_chance+_yellow_chance-1)>>\n<<elseif $scanner_resources_level == 2>>\n\t<<set _r = 0>>\n<<else>>\n\t@@.error;Scanner resources level was $scanner_resources_level.@@\n<</if>>\n\n<<if _r < _green_chance>>\n\t<<set $planet.resources = "Rich">>\n<<elseif _r < _green_chance + _yellow_chance>>\n\t<<set $planet.resources = "Poor">>\n<<else>>\n\t<<set $planet.resources = "None">>\n<</if>>\n\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/* Moon - affects technology result */\n/* Moon is first, because the surface probe investigates it before landing on the planet itself */\n/* The higher the planet's gravity, the more likely it is to have a moon */\n<<switch $planet.gravity>>\n\t<<case "Very low">>\t\t<<set _moon_chance = 10>>\n\t<<case "Low">>\t\t\t<<set _moon_chance = 20>>\n\t<<case "Moderate">>\t\t<<set _moon_chance = 30>>\n\t<<case "High">>\t\t\t<<set _moon_chance = 40>>\n\t<<case "Very high">>\t<<set _moon_chance = 50>>\n<</switch>>\n<<if random(0,99) < _moon_chance>>\n\t<<set $planet.surface_features.push(either("Barren moon", "Metal-rich moon", "Unstable moon"))>>\n\t<<set $planet.anomalies.push("Moon")>>\n<</if>>\n\n/* Aesthetics - affect culture result */\n/* Flat 20% chance of one or the other */\n<<if random(0,4) == 0>>\n\t<<set $planet.surface_features.push(either("Outstanding beauty", "Outstanding ugliness"))>>\n<</if>>\n\n\n/* Caves? */\n/* No caves if surface is covered entirely in water or ice. Otherwise chance of caves is based on gravity. */\n<<if $planet.water != "Planet-wide ocean" & $planet.water != "Ice-covered surface">>\n\t<<switch $planet.gravity>>\n\t\t<<case "Very low">>\t\t<<set _caves_chance = 50>>\n\t\t<<case "Low">>\t\t\t<<set _caves_chance = 40>>\n\t\t<<case "Moderate">>\t\t<<set _caves_chance = 30>>\n\t\t<<case "High">>\t\t\t<<set _caves_chance = 20>>\n\t\t<<case "Very high">>\t<<set _caves_chance = 10>>\n\t<</switch>>\n\t<<if random(0,99) < _caves_chance>>\n\t\t<<if random(0,2) == 0>>\n\t\t\t<<set $planet.surface_features.push("Airtight caves")>>\n\t\t<</if>>\n\t\t<<if random(0,2) == 0>>\n\t\t\t<<set $planet.surface_features.push("Insulated caves")>>\n\t\t<</if>>\n\t\t<<if !$planet.surface_features.includes("Airtight caves") & !$planet.surface_features.includes("Insulated caves")>>\n\t\t\t<<set $planet.surface_features.push("Unstable geology")>>\n\t\t<</if>>\n\t\t<<set $planet.anomalies.push("Geological anomalies")>>\n\t<</if>>\n<</if>>\n\n/* LIFE */\n/* Plant life? */\n<<if true>>\n\t<<switch $planet.atmosphere>>\n\t\t<<case "Breathable">>\t\t<<set _plants_chance = 100>>\n\t\t<<case "Marginal">>\t\t\t<<set _plants_chance = 100>>\n\t\t<<case "Non-breathable">>\t<<set _plants_chance = 25>>\n\t\t<<case "Toxic">>\t\t\t<<set _plants_chance = 25>>\n\t\t<<case "None">>\t\t\t\t<<set _plants_chance = 5>>\n\t\t<<case "Corrosive">>\t\t<<set _plants_chance = 5>>\n\t<</switch>>\n\t<<if random(0,99) < _plants_chance>>\n\t\t<<set $planet.surface_features.push(either("Plant life", "Edible plants", "Poisonous plants"))>>\n\t\t<<set $planet.anomalies.push("Vegetation")>>\n\t<</if>>\n<</if>>\n\n/* If plants, possibly animals */\n<<if $planet.surface_features.includes("Plant life") | $planet.surface_features.includes("Edible plants") | $planet.surface_features.includes("Poisonous plants")>>\n\t<<set _animals_chance = 50>>\n\t<<if random(0,99) < _animals_chance>>\n\t\t<<set $planet.surface_features.push(either("Animal life", "Useful animals", "Dangerous animals"))>>\n\t\t<<set $planet.anomalies.push("Animal life")>>\n\t<</if>>\n<</if>>\n\n/* If animals, possibly sentient life */\n<<if $planet.surface_features.includes("Animal life") | $planet.surface_features.includes("Useful animals") | $planet.surface_features.includes("Dangerous animals")>>\n\t<<set _sentients_chance = 50>>\n\t<<if random(0,99) < _sentients_chance>>\n\t\t<<set $planet.surface_features.push("Intelligent life")>>\n\t\t/* Max tech level is determined by resources */\n\t\t<<if $planet.resources == "Rich">>\n\t\t\t<<set $planet.native_tech_level = random(0,10)>>\n\t\t<<elseif $planet.resources == "Poor">>\n\t\t\t<<set $planet.native_tech_level = random(0,6)>>\n\t\t<<elseif $planet.resources == "None">>\n\t\t\t<<set $planet.native_tech_level = random(0,4)>>\n\t\t<<else>>\n\t\t\t@@.error;Unexpected resources value $planet.resources@@\n\t\t<</if>>\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<</if>>\n/* Probability notes: */\n/* A breathable planet has a 100% chance of plant life, a 50% chance of animal life, and a 25% chance of sentient life */\n/* A breathable planet with rich resources has a 2.5% chance of a space-age civilisation */\n\n\n/* Ruins? */\n/* To do: alter ruins chance depending on existing factors */\n<<set _ruins_chance = 10>>\n<<if random(0,99) < _ruins_chance>>\n\t<<set $planet.surface_features.push("Monumental ruins")>>\n\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t<</if>>\n<</if>>\n<<if random(0,99) < _ruins_chance>>\n\t<<set $planet.surface_features.push("High-tech ruins")>>\n\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t<</if>>\n<</if>>\n<<if random(0,99) < _ruins_chance>>\n\t<<set $planet.surface_features.push("Dangerous ruins")>>\n\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t<</if>>\n<</if>>\n<<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<<set $planet.surface_features.push("Regular geological formations")>>\n\t<<if !$planet.anomalies.includes("Possible structures")>>\n\t\t<<set $planet.anomalies.push("Possible structures")>>\n\t<</if>>\n<</if>>\n\n\n\n<<goto [[Orbit planet]]>>\n\n
<<widget calculate_final_score>>\n\t/* Partially-completed hiscore should be in $hiscore */\n\n\t/* Add score for planet attributes */\n\t<<switch $planet.atmosphere>>\n\t\t<<case "Corrosive" "Toxic" "None" "Non-breathable">><<set $hiscore.score_atmosphere = 0>>\n\t\t<<case "Marginal">><<set $hiscore.score_atmosphere = $max_score_per_planet_attribute/2>>\n\t\t<<case "Breathable">><<set $hiscore.score_atmosphere = $max_score_per_planet_attribute>>\n\t\t<<default>>@@.error;Unexpected atmosphere value $planet.atmosphere@@\n\t<</switch>>\n\n\t<<switch $planet.gravity>>\n\t\t<<case "Very high" "Very low">><<set $hiscore.score_gravity = 0>>\n\t\t<<case "Low" "High">><<set $hiscore.score_gravity = $max_score_per_planet_attribute/2>>\n\t\t<<case "Moderate">><<set $hiscore.score_gravity = $max_score_per_planet_attribute>>\n\t\t<<default>>@@.error;Unexpected gravity value $planet.gravity@@\n\t<</switch>>\n\n\t<<switch $planet.temperature>>\n\t\t<<case "Very hot" "Very cold">><<set $hiscore.score_temperature = 0>>\n\t\t<<case "Cold" "Hot">><<set $hiscore.score_temperature = $max_score_per_planet_attribute/2>>\n\t\t<<case "Moderate">><<set $hiscore.score_temperature = $max_score_per_planet_attribute>>\n\t\t<<default>>@@.error;Unexpected temperature value $planet.temperature@@\n\t<</switch>>\n\n\t<<switch $planet.water>>\n\t\t<<case "None" "Trace">><<set $hiscore.score_water = 0>>\n\t\t<<case "Ice-covered surface" "Planet-wide ocean">><<set $hiscore.score_water = $max_score_per_planet_attribute/2>>\n\t\t<<case "Ice caps" "Oceans">><<set $hiscore.score_water = $max_score_per_planet_attribute>>\n\t\t<<default>>@@.error;Unexpected water value $planet.water@@\n\t<</switch>>\n\n\t<<switch $planet.resources>>\n\t\t<<case "None">><<set $hiscore.score_resources = 0>>\n\t\t<<case "Poor">><<set $hiscore.score_resources = $max_score_per_planet_attribute/2>>\n\t\t<<case "Rich">><<set $hiscore.score_resources = $max_score_per_planet_attribute>>\n\t\t<<default>>@@.error;Unexpected resources value $planet.resources@@\n\t<</switch>>\n\n\n\t/* Add score for tech and culture levels */\n\t<<switch $hiscore.final_tech_level>>\n\t\t<<case 10>>\t<<set $hiscore.score_technology = 3000>>\n\t\t<<case 9>>\t<<set $hiscore.score_technology = 2000>>\n\t\t<<case 8>>\t<<set $hiscore.score_technology = 1750>>\n\t\t<<case 7>>\t<<set $hiscore.score_technology = 1500>>\n\t\t<<case 6>>\t<<set $hiscore.score_technology = 1250>>\n\t\t<<case 5>>\t<<set $hiscore.score_technology = 1000>>\n\t\t<<case 4>>\t<<set $hiscore.score_technology = 800>>\n\t\t<<case 3>>\t<<set $hiscore.score_technology = 600>>\n\t\t<<case 2>>\t<<set $hiscore.score_technology = 400>>\n\t\t<<case 1>>\t<<set $hiscore.score_technology = 200>>\n\t\t<<case 0>>\t<<set $hiscore.score_technology = 0>>\n\t\t<<case -1>>\t<<set $hiscore.score_technology = 0>>\n\t\t<<default>>@@.error;Unexpected final tech level $hiscore.final_tech_level@@\n\t<</switch>>\n\n\t<<switch $hiscore.final_culture>>\n\t\t<<case 17>>\t<<set $hiscore.score_culture = 3000>>\n\t\t<<case 16>>\t<<set $hiscore.score_culture = 2500>>\n\t\t<<case 15>>\t<<set $hiscore.score_culture = 2000>>\n\t\t<<case 14>>\t<<set $hiscore.score_culture = 1500>>\n\t\t<<case 13>>\t<<set $hiscore.score_culture = 1000>>\n\t\t<<case 12>>\t<<set $hiscore.score_culture = 500>>\n\t\t<<case 11>>\t<<set $hiscore.score_culture = 250>>\n\t\t<<case 10>>\t<<set $hiscore.score_culture = 0>>\n\t\t<<case 9>>\t<<set $hiscore.score_culture = 2000>>\n\t\t<<case 8>>\t<<set $hiscore.score_culture = 1500>>\n\t\t<<case 7>>\t<<set $hiscore.score_culture = 1000>>\n\t\t<<case 6>>\t<<set $hiscore.score_culture = 500>>\n\t\t<<case 5>>\t<<set $hiscore.score_culture = 0>>\n\t\t<<case 4>>\t<<set $hiscore.score_culture = 2000>>\n\t\t<<case 3>>\t<<set $hiscore.score_culture = 1500>>\n\t\t<<case 2>>\t<<set $hiscore.score_culture = 1000>>\n\t\t<<case 1>>\t<<set $hiscore.score_culture = 500>>\n\t\t<<case 0>>\t<<set $hiscore.score_culture = 0>>\n\t\t<<case -1>>\t<<set $hiscore.score_culture = 0>>\n\t\t<<default>>@@.error;Unexpected final culture $hiscore.final_culture@@\n\t<</switch>>\n\n\t<<switch $hiscore.native_relations>>\n\t\t<<case 6>>\t<<set $hiscore.score_native_relations = 2000>>\n\t\t<<case 5>>\t<<set $hiscore.score_native_relations = 1000>>\n\t\t<<case 4>>\t<<set $hiscore.score_native_relations = 0>>\n\t\t<<case 3>>\t<<set $hiscore.score_native_relations = -1000>>\n\t\t<<case 2>>\t<<set $hiscore.score_native_relations = -1000>>\n\t\t<<case 1>>\t<<set $hiscore.score_native_relations = -2000>>\n\t\t<<case 0>>\t<<set $hiscore.score_native_relations = -2000>>\n\t\t<<case -1>>\t<<set $hiscore.score_native_relations = 0>>\n\t\t<<default>>@@.error;Unexpected native relations $hiscore.native_relations@@\n\t<</switch>>\n\n\n\n\n\t/* Add up final score */\n\t<<set $hiscore.final_score = \n\t\t$hiscore.score_landing +\n\t\t$hiscore.score_construction +\n\t\t$hiscore.score_native_relations +\n\t\t$hiscore.score_culture +\n\t\t$hiscore.score_technology +\n\t\t$hiscore.score_scientific_database +\n\t\t$hiscore.score_cultural_database +\n\t\t$hiscore.score_atmosphere +\n\t\t$hiscore.score_gravity +\n\t\t$hiscore.score_temperature +\n\t\t$hiscore.score_water +\n\t\t$hiscore.score_resources >>\n<</widget>>
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>>
/* Culture score is indirectly influenced by all attributes except resources, since these will have killed colonists in the Construction phase. */\n<<set _culture_score = $system_cultural_database * $colonists/$max_colonists>>\n@@.debug-text;Culture score: _culture_score@@\n\n\n<<if $system_cultural_database >= 100>>\n\tThe cultural database contains a wealth of historical information to help the colonists make their choice of government, and a vast library of art and literature to entertain and inspire them.\n<<elseif $system_cultural_database >= 50>>\n\tAlthough parts of the cultural database are missing, it still contains much historical information to instruct the colonists in the building of their society, and much art and literature to inspire them.\n<<elseif $system_cultural_database > 0>>\n\tThe colonists search through the badly damaged cultural database, and manage to reconstruct some information about Earth's history and culture to guide and inspire them.\n<<else>>\n\tWith the cultural database destroyed, those born on the new world know nothing about Earth's history and culture besides what the first colonists can pass on in person.\n<</if>>\n\n<<if $colonists < $max_colonists/2>>\n\tThe heavy losses sustained by the colonists make building a new society more difficult.\n<<elseif $colonists < $max_colonists>>\n\tThe losses sustained by the colonists make building a new society more difficult.\n<</if>>\n\n<<if $planet.surface_features.includes("Outstanding beauty")>>\n\tThe planet's outstanding natural beauty makes life there more pleasant, helping the colonists to build a better society.\n\t/* Increase by 20 but don't go above 100 unless it already is */\n\t<<if _culture_score <= 100 & _culture_score > 80>>\n\t\t<<set _culture_score = 100>>\n\t<<else>>\n\t\t<<set _culture_score += 20>>\n\t<</if>>\n\t@@.debug-text;Modified culture score: _culture_score@@\n<<elseif $planet.surface_features.includes("Outstanding ugliness")>>\n\tThe planet's outstanding ugliness increases tensions among the colonists and makes it harder for them to build a peaceful society.\n\t<<set _culture_score -= 20>>\n\t@@.debug-text;Modified culture score: _culture_score@@\n<</if>>\n\n/* Calculate and output final result */\n<<if _culture_score > 100 & $system_cultural_database > 100>>\n\t<<set $hiscore.final_culture = 17>>\n\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Cosmic Enlightenment">>\n\tThe cultural database from Earth has been augmented by alien cultural knowledge, and the colonists use this to build a society unlike any that the seedship's founders could have imagined, in which every member lives a life of peace, happiness, and spiritual fulfilment.\n<<else>>\n\t<<switch $hiscore.final_tech_level>>\n\t\t<<case 8 9 10>>\n\t\t\t<<if _culture_score > 90>>\n\t\t\t\t<<set $hiscore.final_culture = 16>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Post-Scarcity Utopia">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists work together to build an egalitarian society in which technology takes care of people's material needs, freeing them to pursue lives of art, leisure, and spiritual fulfilment.\n\t\t\t<<elseif _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 15>>\n\t\t\t\t<<set $hiscore.summary = "Engaged " + $tech_level_names[$hiscore.final_tech_level] + " Democracy">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists lay the foundation of a democracy in which all citizens are educated and engaged.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 14>>\n\t\t\t\t<<set $hiscore.summary = "Corrupt " + $tech_level_names[$hiscore.final_tech_level] + " Democracy">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists lay the foundation of a democracy, but it proves vulnerable to corruption and wealthy individuals become a de facto ruling class.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 13>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Corporate Rule">>\n\t\t\t\tThe surviving cultural database is preserved in digital files to which all colonists have access. The colonists attempt to build a democratic, capitalist society, but the government becomes a pawn of wealthy corporations which rule the planet for their owners' benefit.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 12>>\n\t\t\t\t<<set $hiscore.summary = "Dystopian " + $tech_level_names[$hiscore.final_tech_level] + " Police State">>\n\t\t\t\tThe colony develops into a high-tech police state, in which the population lives under constant surveillance by the untouchable ruling class, and the slightest dissent is violently put down. The surviving cultural database is preserved, but access to it is strictly limited by the state.\n\t\t\t<<elseif _culture_score > 10>>\n\t\t\t\t<<set $hiscore.final_culture = 11>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " Superpowers">>\n\t\t\t\tThe colony splits into several large nations whose economies become focused on waging war with one another. The colonists attempt to preserve what remains of the cultural database, but much of it is lost, either by damage due to the war, or under layers of the governments' revisionist propaganda.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 10>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Post-Nuclear Wasteland">>\n\t\t\t\tThe colony splits into several large nations which wage war with one another, until reckless leaders set off a nuclear war that destroys the infrastructure of civilisation. The surviving colonists live on in a post-nuclear wasteland. What remains of the cultural database is lost in the disaster, and what the colonists remember of Earth they confuse with stories of the pre-war colony.\n\t\t\t<</if>>\n\t\t<<case 3 4 5 6 7>>\n\t\t\t<<if _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 9>>\n\t\t\t\t<<set $hiscore.summary = "Egalitarian " + $tech_level_names[$hiscore.final_tech_level] + " Republic">>\n\t\t\t\tThe colonists use the surviving cultural database to guide them in the creation of a republic based on freedom and equal rights.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 8>>\n\t\t\t\t<<set $hiscore.summary = "Benevolent " + $tech_level_names[$hiscore.final_tech_level] + " Monarchy">>\n\t\t\t\tThe first leaders of the colony become the founders of a line of benevolent monarchs, who regard it as their solemn duty to guide the colony and safeguard the remaining knowledge of Earth.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 7>>\n\t\t\t\t<<set $hiscore.summary = "Oppressive " + $tech_level_names[$hiscore.final_tech_level] + " Theocracy">>\n\t\t\t\tThe surviving knowledge of Earth becomes the exclusive property of a priestly caste, locked away in libraries. For most of the population, Earth becomes the paradise in a mythological fall from grace, and a final reward to hope for after living lives in service of the oppressive theocracy.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 6>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Slave Empire">>\n\t\t\t\tThe colony develops into a slave state, in which the bulk of the population toil to build great gold monuments to their emperors, or die fighting in their wars. Much of the surviving knowledge of Earth is lost, as the emperors preserve only what they can use to prop up their rule.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 5>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " States">>\n\t\t\t\tThe colony develops into many small states, which exist in a state of constant warfare. What remains of the cultural database is lost in the conflicts.\n\t\t\t<</if>>\n\t\t<<case 0 1 2>>\n\t\t\t<<if _culture_score > 80>>\n\t\t\t\t<<set $hiscore.final_culture = 4>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Collective Rule">>\n\t\t\t\tThe surviving cultural database becomes the foundation of a rich oral history. The colony splits into small tribes, each ruled collectively by its members and coexisting peacefully with one another.\n\t\t\t<<elseif _culture_score > 60>>\n\t\t\t\t<<set $hiscore.final_culture = 3>>\n\t\t\t\t<<set $hiscore.score_culture = 1500>>\n\t\t\t\t<<set $hiscore.summary = "Benevolent " + $tech_level_names[$hiscore.final_tech_level] + " Chieftains">>\n\t\t\t\tThe surviving cultural database becomes the foundation of a rich oral history, and a caste of benevolent chieftains arises as guardians of that history and protectors of the tribes.\n\t\t\t<<elseif _culture_score > 40>>\n\t\t\t\t<<set $hiscore.final_culture = 2>>\n\t\t\t\t<<set $hiscore.summary = "Brutal " + $tech_level_names[$hiscore.final_tech_level] + " Chieftains">>\n\t\t\t\tThe surviving cultural database becomes the foundation of the colonists' oral history, but a caste of brutal chieftains corrupts the culture and uses it to cement their own rule.\n\t\t\t<<elseif _culture_score > 20>>\n\t\t\t\t<<set $hiscore.final_culture = 1>>\n\t\t\t\t<<set $system_cultural_database = Math.round($system_cultural_database/2)>>\n\t\t\t\t<<set $hiscore.summary = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " Tribes">>\n\t\t\t\tThe colony develops into many small tribes, which exist in a state of constant warfare. The information from the cultural database is almost entirely forgotten, and Earth is remembered only as the home of a pantheon of mythological warriors.\n\t\t\t<<else>>\n\t\t\t\t<<set $hiscore.final_culture = 0>>\n\t\t\t\t<<set $system_cultural_database = 0>>\n\t\t\t\t<<set $hiscore.summary = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " Savagery">>\n\t\t\t\tThe colonists descend into savagery, and all knowledge of Earth's history and culture is forgotten in their day-to-day struggle for survival.\n\t\t\t<</if>>\n\t\t<<default>>\n\t\t\t@@.error;Unexpected tech level $hiscore.final_tech_level@@\n\n\t<</switch>>\n<</if>>\n<<refreshStatusDisplay>>\n\n<br><br>\n\n<<FCNextPassage [[FC Done]]>>\n
<<set $query_string = location.search>>\n<<if $query_string != "">>\n\t<<goto [[Show shared summary]]>>\n<</if>>\n<<starfield>>\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\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><br>\n\n\t<span class="credits-small-text">\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\t$("#passages").removeClass("dark-on-light");\n\t\t\t\t\t$("#status-display").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\t$("#passages").addClass("dark-on-light");\n\t\t\t\t\t$("#status-display").addClass("dark-on-light");\n\t\t\t\t<</script>>\n\t\t\t<</link>>\n\t\t</span>\n\t</span>\n</div>\n\n/%<div class="title-screen-patreon-button">\n\t<<link [img[patreon_wordmark_white]]>>\n\t\t<<externalLink "https://www.patreon.com/johnayliff">>\n\t<</link>>\n</div>%/\n<div class="title-screen-support-area credits-small-text">\n\tSupport developer:\n\t<br>\n\t<<link "Buy a coffee">><<externalLink "https://ko-fi.com/johnayliff">><</link>>\n\t<br>\n\t<<link "Back on Patreon">><<externalLink "https://www.patreon.com/johnayliff">><</link>>\n\t<br>\n\t<<link "Buy T-shirts and mugs">><<externalLink "https://teespring.com/stores/seedship">><</link>>\n</div>\n\n<div style="text-align:center; position: absolute; bottom: 20px; right: 20px; font-size: 60%; opacity: 0.15">\n\tversion 1.1.6\n</div>\n\n\n/% Stylesheet %/\n<<if $PERM_darkonlight>>\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<</script>>\n<<else>>\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<</script>>\n<</if>>
Config.saves.autosave = true;\n\nConfig.saves.isAllowed = function () {\n\treturn !tags().includes("front-matter");\n};
<<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
/* Encodes a high score as a query string */\n/* hiscore to encode should be in $hiscore */\n\n<<widget encodeHiscore>>\n\t<<set $encoded_hiscore = "?">>\n\n\t<<if $planet>>\n\n\t\t/* PLANET ATTRIBUTES */\n\t<<switch $hiscore.planet.atmosphere>>\n\t\t<<case "Breathable">>\t\t\t<<set $encoded_hiscore += "b">>\n\t\t<<case "Marginal">>\t\t\t\t<<set $encoded_hiscore += "m">>\n\t\t<<case "None">>\t\t\t\t\t<<set $encoded_hiscore += "v">>\n\t\t<<case "Non-breathable">>\t\t<<set $encoded_hiscore += "n">>\n\t\t<<case "Toxic">>\t\t\t\t<<set $encoded_hiscore += "t">>\n\t\t<<case "Corrosive">>\t\t\t<<set $encoded_hiscore += "c">>\n\t\t<<default>>\t@@.error;Unexpected atmosphere value $hiscore.planet.atmosphere@@\n\t<</switch>>\n\n\t<<switch $hiscore.planet.gravity>>\n\t\t<<case "Very high">>\t\t\t<<set $encoded_hiscore += "H">>\n\t\t<<case "High">>\t\t\t\t\t<<set $encoded_hiscore += "h">>\n\t\t<<case "Moderate">>\t\t\t\t<<set $encoded_hiscore += "m">>\n\t\t<<case "Low">>\t\t\t\t\t<<set $encoded_hiscore += "l">>\n\t\t<<case "Very low">>\t\t\t\t<<set $encoded_hiscore += "L">>\n\t\t<<default>>\t@@.error;Unexpected gravity value $hiscore.planet.gravity@@\n\t<</switch>>\n\n\t<<switch $hiscore.planet.temperature>>\n\t\t<<case "Very hot">>\t\t\t\t<<set $encoded_hiscore += "H">>\n\t\t<<case "Hot">>\t\t\t\t\t<<set $encoded_hiscore += "h">>\n\t\t<<case "Moderate">>\t\t\t\t<<set $encoded_hiscore += "m">>\n\t\t<<case "Cold">>\t\t\t\t\t<<set $encoded_hiscore += "c">>\n\t\t<<case "Very cold">>\t\t\t<<set $encoded_hiscore += "C">>\n\t\t<<default>>\t@@.error;Unexpected temperature value $hiscore.planet.temperature@@\n\t<</switch>>\n\n\t<<switch $hiscore.planet.water>>\n\t\t<<case "Oceans">>\t\t\t\t<<set $encoded_hiscore += "o">>\n\t\t<<case "Planet-wide ocean">>\t<<set $encoded_hiscore += "O">>\n\t\t<<case "Ice caps">>\t\t\t\t<<set $encoded_hiscore += "i">>\n\t\t<<case "Ice-covered surface">>\t<<set $encoded_hiscore += "I">>\n\t\t<<case "Trace">>\t\t\t\t<<set $encoded_hiscore += "t">>\n\t\t<<case "None">>\t\t\t\t\t<<set $encoded_hiscore += "n">>\n\t\t<<default>>\t@@.error;Unexpected water value $hiscore.planet.water@@\n\t<</switch>>\n\n\t<<switch $hiscore.planet.resources>>\n\t\t<<case "Rich">>\t\t\t\t\t<<set $encoded_hiscore += "r">>\n\t\t<<case "Poor">>\t\t\t\t\t<<set $encoded_hiscore += "p">>\n\t\t<<case "None">>\t\t\t\t\t<<set $encoded_hiscore += "n">>\n\t\t<<default>>\t@@.error;Unexpected resources value $hiscore.planet.resources@@\n\t<</switch>>\n\n\n\t\t/* PLANET FEATURES */\n\t<<for _n = 0; _n < $hiscore.planet.surface_features.length; _n++>>\n\t\t<<switch $hiscore.planet.surface_features[_n]>>\n\t\t\t\t\t/* Moon */\n\t\t\t<<case "Barren moon">>\t\t\t\t\t<<set $encoded_hiscore += "a">>\n\t\t\t<<case "Metal-rich moon">>\t\t\t\t<<set $encoded_hiscore += "b">>\n\t\t\t<<case "Unstable moon">>\t\t\t\t<<set $encoded_hiscore += "c">>\n\n\t\t\t\t\t/* Beauty/ugliness */\n\t\t\t<<case "Outstanding beauty">>\t\t\t<<set $encoded_hiscore += "d">>\n\t\t\t<<case "Outstanding ugliness">>\t\t\t<<set $encoded_hiscore += "e">>\n\n\t\t\t\t\t/* Caves */\n\t\t\t<<case "Airtight caves">>\t\t\t\t<<set $encoded_hiscore += "f">>\n\t\t\t<<case "Insulated caves">>\t\t\t\t<<set $encoded_hiscore += "g">>\n\t\t\t<<case "Unstable geology">>\t\t\t\t<<set $encoded_hiscore += "h">>\n\n\t\t\t\t\t/* Plants */\n\t\t\t<<case "Plant life">>\t\t\t\t\t<<set $encoded_hiscore += "i">>\n\t\t\t<<case "Edible plants">>\t\t\t\t<<set $encoded_hiscore += "j">>\n\t\t\t<<case "Poisonous plants">>\t\t\t\t<<set $encoded_hiscore += "k">>\n\t\t\t<<case "Quasi-organic crystals">>\t\t<<set $encoded_hiscore += "l">>\n\n\t\t\t\t\t/* Animals */\n\t\t\t<<case "Animal life">>\t\t\t\t\t<<set $encoded_hiscore += "m">>\n\t\t\t<<case "Useful animals">>\t\t\t\t<<set $encoded_hiscore += "n">>\n\t\t\t<<case "Dangerous animals">>\t\t\t<<set $encoded_hiscore += "o">>\n\n\t\t\t\t\t/* Intelligent life */\n\t\t\t<<case "Intelligent life">>\t\t\t\t<<set $encoded_hiscore += "p">>\n\n\t\t\t\t\t/* Ruins */\n\t\t\t<<case "Monumental ruins">>\t\t\t\t<<set $encoded_hiscore += "q">>\n\t\t\t<<case "High-tech ruins">>\t\t\t\t<<set $encoded_hiscore += "r">>\n\t\t\t<<case "Dangerous ruins">>\t\t\t\t<<set $encoded_hiscore += "s">>\n\t\t\t<<case "Regular geological formations">><<set $encoded_hiscore += "t">>\n\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected surface feature <<print $hiscore.planet.surface_features[_n]>>.@@\n\t\t<</switch>>\n\t<</for>>\n\n\t\t/* NATIVE TECH LEVEL */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.planet.native_tech_level>>\n\n\t\t/* PLANET NAME */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += encodeURIComponent($hiscore.planet.name)>>\n\n\t<<else>>\n\t\t<<set $encoded_hiscore += "X.-1">>\n\n\t<</if>>\n\n\t\t/* LANDING AND CONSTRUCTION SCORES */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.score_landing>>\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.score_construction>>\n\n\t\t/* NATIVE RELATIONS */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.native_relations>>\n\n\t\t/* TECHNOLOGY */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.final_tech_level>>\n\n\t\t/* CULTURE */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.final_culture>>\n\n\t\t/* SCIENTIFIC DATABASE */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.score_scientific_database>>\n\n\t\t/* CULTURE */\n\t<<set $encoded_hiscore += ".">>\n\t<<set $encoded_hiscore += $hiscore.score_cultural_database>>\n\n\n<</widget>>
<<randomSystemExcluding "destroyed">>\n\n<<if visited() == 1>>\n\tThe AI wakes to a radiation alert: the death burst of a distant supernova is flooding the seedship's electronics with random signals.\n\t<<if $system == "sleep chambers">>\n\t\tThe sleep chambers are malfunctioning, and in a few moments some of them will shut down.\n\t<<elseif $system == "surface probes">>\n\t\tOne of the surface probes is malfunctioning, and in a few moments it will be destroyed.\n\t<<elseif $system == "scientific database" | $system == "cultural database">>\n\t\tThe data storage system is malfunctioning, and in a few moments part of the $system will be lost.\n\t<<else>>\n\t\tThe $system is malfunctioning, and in a few moments it will be permanently damaged.\n\t<</if>>\n\tThe seedship could avoid the malfunction by shutting down all its electronics until the radiation has passed, but that would leave it without a working collision avoidance system for a dangerous length of time.\n<<else>>\n\tA surge of supernova radiation crackles through <<if $system=="surface probes">>one of<</if>> the $system. The AI can allow it to be damaged, or shut down and risk a collision.\n<</if>>\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Shut down">>\n\t<<replace "#result-area">>\n\t\tThe AI shuts down all the ship's systems and then itself. When it comes back online the radiation has passed,\n\t\t<<if random(0,2) == 0>>\n\t\t\t<<randomSystemExcluding $system "destroyed">>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\tbut a small asteroid has torn through the sleep capsules, killing $deaths colonists.\n\t\t\t<<elseif $system == "surface probes">>\n\t\t\t\t<<set $surface_probes -= 1>>\n\t\t\t\tbut a small asteroid has smashed one of the surface probes.\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\tbut a small asteroid has torn a hole in the $system.\n\t\t\t<</if>>\n\t\t<<else>>\n\t\t\tand to its relief a systems check reveals no damage.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>></span>\n<br>\n@@.keyhint;2. @@<span id="2Act"><<link "Don't shut down">>\n\t<<replace "#result-area">>\n\t\tThe AI keeps its focus on the collision avoidance system while\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsFew>>\n\t\t\t$deaths colonists die in their sleep.\n\t\t<<elseif $system == "surface probes">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tthe surface probe tears itself apart.\n\t\t<<elseif $system == "scientific database" | $system == "cultural database">>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tparts of the $system are overwritten with garbage.\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tthe radiation wrecks delicate components deep in the $system.\n\t\t<</if>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>></span></div>\n\n\n
<<if $system_scientific_database <= 0 & $system_cultural_database <= 0>>\n\tCosmic radiation continues to sleet through the irradiated data sectors that once stored the scientific and cultural databases, but with both databases destroyed there is no further damage it can do.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_scientific_database <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "cultural database" $damage>>\n\tCosmic radiation bombards the ship, causing data storage areas to fail. The scientific database is already destroyed, and now the historical information and artworks stored in the cultural database gradually slip away.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<elseif $system_cultural_database <= 0>>\n\t<<randomDamageMedium>>\n\t<<damageSystem "scientific database" $damage>>\n\tCosmic radiation bombards the ship, causing data storage areas to fail. The cultural database is already destroyed, and now the wealth of knowledge stored in the scientific database gradually slips away.\n\n\t<br><br><<continueLink [[MO Done]]>>\n<<else>>\n\t<<if visited() == 1>>\n\t\tThe seedship's computer systems are shielded, multiply redundant, designed to work for millennia, but the incessant sleet of cosmic radiation is nevertheless taking its toll. Storage areas are failing, and soon there will not be enough space to store\n\t\t<<if $system_cultural_database >= 100 & $system_scientific_database >= 100>>\n\t\t\tall the data with which the seedship began its journey.\n\t\t<<elseif $system_cultural_database + $system_scientific_database >= 100>>\n\t\t\tall the data that has survived so far.\n\t\t<<else>>\n\t\t\twhat little data remains.\n\t\t<</if>>\n\t\tThe AI can move data out of the most damaged sectors to protect either the scientific or the cultural database, but not both.\n\t<<else>>\n\t\tCosmic radiation continues to bombard the data storage area, and the AI must once again choose whether to save which database to save from damage.\n\t<</if>>\n\t<br><br>\n\t<div id="result-area">\n\t<<link "Save the scientific database">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem "cultural database" $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\t<<replace "#result-area">>\n\t\t\tThe AI moves data to save the scientific database, and sectors containing the cultural database gradually fail. Cultural guidance for new colonists, records of human history, great paintings, novels, symphonies, videogames--all lost forever in the dark.\n\n\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t<</replace>>\n\t\t<<fadeIn "#result-area">>\n\t\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>>
<<widget generate_twitter_share_text>>\n\t<<set $share_text = "">>\n\n\t<<if !$planet>>\n\t\t<<set $share_text = "Destroyed in space.">>\n\t<<elseif $hiscore.score_landing <= 0>>\n\t\t<<set $share_text = "Crash!">>\n\t<<elseif $hiscore.score_construction <= 0>>\n\t\t<<set $share_text = "Construction failure on planet " + $planet.name + ".">>\n\t<<elseif $hiscore.final_tech_level == -1>>\n\t\t<<set $share_text = "Long-term technological failure on planet " + $planet.name + ".">>\n\t<<elseif $hiscore.native_relations == 2>>\n\t\t<<set $share_text = "Enslaved by the natives of planet " + $planet.name + ".">>\n\t<<elseif $hiscore.native_relations == 0>>\n\t\t<<set $share_text = "Wiped out by the natives of planet " + $planet.name + ".">>\n\t<<else>>\n\n\t\t<<switch $culture_names[$hiscore.final_culture]>>\n\t\t\t<<case "Cosmic Enlightenment">>\n\t\t\t\t<<set $share_text = "Cosmically enlightened " + $tech_level_names[$hiscore.final_tech_level] + " civilisation on planet " + $planet.name + ".">>\n\n\t\t\t<<case "Post-Scarcity Utopia">>\n\t\t\t\t<<set $share_text = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " post-scarcity utopia on planet " + $planet.name + ".">>\n\t\t\t<<case "Engaged Democracy">>\n\t\t\t\t<<set $share_text = "Engaged " + $tech_level_names[$hiscore.final_tech_level] + " democracy on planet " + $planet.name + ".">>\n\t\t\t<<case "Corrupt Democracy">>\n\t\t\t\t<<set $share_text = "Corrupt " + $tech_level_names[$hiscore.final_tech_level] + " democracy on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Rule by Corporations">>\n\t\t\t\t<<set $share_text = "Ruled by " + $tech_level_names[$hiscore.final_tech_level] + " corporations on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Dystopian Police State">>\n\t\t\t\t<<set $share_text = "Dystopian " + $tech_level_names[$hiscore.final_tech_level] + " police state on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Warring Superpowers">>\n\t\t\t\t<<set $share_text = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " superpowers on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Post-Nuclear Wasteland">>\n\t\t\t\t<<set $share_text = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " civilisation destroyed by nuclear war on planet " + $planet.name + ".">>\t\n\n\t\t\t<<case "Egalitarian Republic">>\n\t\t\t\t<<set $share_text = "Egailitarian " + $tech_level_names[$hiscore.final_tech_level] + " republic on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Benevolent Monarchy">>\n\t\t\t\t<<set $share_text = "Benevolent " + $tech_level_names[$hiscore.final_tech_level] + " monarchy on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Oppressive Theocracy">>\n\t\t\t\t<<set $share_text = "Oppressive " + $tech_level_names[$hiscore.final_tech_level] + " theocracy on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Slave-Based Empire">>\n\t\t\t\t<<set $share_text = "Slave-based " + $tech_level_names[$hiscore.final_tech_level] + " empire on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Warring States">>\n\t\t\t\t<<set $share_text = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " states on planet " + $planet.name + ".">>\t\n\n\t\t\t<<case "Collective Rule">>\n\t\t\t\t<<set $share_text = "Communal " + $tech_level_names[$hiscore.final_tech_level] + " tribes on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Benevolent Chieftains">>\n\t\t\t\t<<set $share_text = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " tribes ruled by benevolent chieftains on planet " + $planet.name + ".">>\n\t\t\t<<case "Brutal Chieftains">>\n\t\t\t\t<<set $share_text = $tech_level_names[$hiscore.final_tech_level].toUpperFirst() + " tribes ruled by brutal chieftains on planet " + $planet.name + ".">>\n\t\t\t<<case "Warring Tribes">>\n\t\t\t\t<<set $share_text = "Warring " + $tech_level_names[$hiscore.final_tech_level] + " tribes on planet " + $planet.name + ".">>\t\n\t\t\t<<case "Savagery">>\n\t\t\t\t<<set $share_text = $tech_level_names[$hiscore.final_tech_level].toUpperFirst + " savagery on planet " + $planet.name + ".">>\t\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected final culture $hiscore.final_culture@@\n\t\t<</switch>>\n\t<</if>>\n\n<</widget>>
<<randomSystemExcluding "destroyed">>\n\n<<if visited() == 1>>\n\tAs the seedship enters the new system's outer cometary cloud, the collision-avoidance system detects a fast-moving comet surrounded by a cloud of smaller ice fragments. The large comet is on a collision course with the $system. The seedship could avoid it entirely, but would then hit one of the smaller fragments, and the collision-avoidance system cannot predict which part of the ship that fragment would hit.\n<<else>>\n\tOnce again the seedship cannot avoid a collision with one of the new star's outer cloud of comets. The AI can allow it to hit the $system, or change course and have a smaller fragment hit an unpredictable system.\n<</if>>\n\n<br><br>\n\n<div id="result-area">\n<<link "Avoid the comet">>\n\t<<replace "#result-area">>\n\t\t<<randomSystemExcluding $system "destroyed">>\n\t\t<<if $system == "sleep chambers">>\n\t\t\t<<killColonistsFew>>\n\t\t\tThe seedship changes course, but an ice fragment tears through $deaths of the sleep chambers.\n\t\t<<elseif $system == "surface probes">>\n\t\t\t<<set $surface_probes -= 1>>\n\t\t\tThe seedship changes course, but an ice fragment smashes one of the surface probes out of its moorings.\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\n\t\t\t<<damageSystem $system $damage>>\n\t\t\tThe seedship changes course, but an ice fragment tears through the $system.\n\t\t<</if>>\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\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_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea>>\n<</link>></div>
<script type="text/javascript" src="cordova.js"></script>\n<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">\n<div id="passages"></div>\n<div id="status-display"></div>
<<if visited() == 1>>\n\tThe AI wakes to a query from the automatic guidance system. Normally the system is able to analyse the data from the navigation sensors and make any necessary changes to the ship's course, but this time it has encountered readings it cannot make sense of and has woken the AI to make a decision.\n\t<br><br>\n\tAccording to some sensors there is something ahead on the ship's course, but according to others the course ahead is clear. If there is something there, it is close enough that avoiding it would mean changing course and arriving at a new system without the benefit of the upgraded scanners.\n\n<<else>>\n\tThe AI wakes to another query from the navigation system: sensor readings are unclear, and there may or may not be something on the ship's current course.\n<</if>>\n\n<br><br>\n<div id="result-area">\n<<link "Change course">>\n\t<<set $off_course = true>>\n\t<<refreshStatusDisplay>>\n\t<<replace "#result-area">>\n\t\tThe AI instructs the guidance system to avoid the anomaly and choose a new target system. It continues to monitor the sensor readings as the ship passes the position of the anomaly, but the readings never become clear enough to reveal whether the course change was necessary.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\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 < $MO_encounters_common.length; _n++>>\n\t<<print "[[" + $MO_encounters_common[_n] + "]]">>\n<</for>>\n\nRARE:\n<<for _n = 0; _n < $MO_encounters_rare.length; _n++>>\n\t<<print "[[" + $MO_encounters_rare[_n] + "]]">>\n<</for>>\n\nMALFUNCTIONS:\n<<for _n = 0; _n < $MO_encounters_malfunction.length; _n++>>\n\t<<print "[[" + $MO_encounters_malfunction[_n] + "]]">>\n<</for>>\n\n
<<nobr>>\n\t<<if ($scanner_atmosphere_level == 2 | $scanner_atmosphere <= 0)\n\t\t\t& ($scanner_gravity_level == 2 | $scanner_gravity <= 0)\n\t\t\t& ($scanner_temperature_level == 2 | $scanner_temperature <= 0)\n\t\t\t& ($scanner_water_level == 2 | $scanner_water <= 0)\n\t\t\t& ($scanner_resources_level == 2 | $scanner_resources <= 0)>>\n\t\t\t/* Nothing further can be upgraded */\n\t\t<<goto [[Move on]]>>\n\t<<elseif visited() == 3>>\n\t\tAs it moves from star to star, the seedship is gathering more data about extrasolar planets than its builders could give it. It is designed to learn from this data in order to predict which stars are likely to have desirable planets. The seedship has now gathered enough data to upgrade one of its sensors to work at interstellar distances, so the guidance system can avoid planets that that sensor reveals to be undesirable. Damage to the sensor may still result in the seedship arriving at an unsuitable planet.\n\t<<elseif visited() % 3 == 0>>\n\t\tThe seedship has gathered enough data to upgrade another of its sensors.\n\t<<else>>\n\t\t<<goto [[Move on]]>>\n\t<</if>>\n<</nobr>>\n\n<<if $scanner_atmosphere <= 0>>\s\n\tAtmosphere scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_atmosphere_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;1. @@<span id="1Act">[[Upgrade the atmosphere scanner to work at long range|Move on][$scanner_atmosphere_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least marginally breathable atmospheres.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;1. @@<span id="1Act">[[Upgrade the atmosphere scanner to work better at long range|Move on][$scanner_atmosphere_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with fully breathable atmospheres.\n\t\t<<case 2>>\s\n\t\t\tAtmosphere scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_atmosphere_level should have been 0-2 but was $scanner_atmosphere_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_gravity <= 0>>\s\n\tGravity scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_gravity_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;2. @@<span id="2Act">[[Upgrade the gravity scanner to work at long range|Move on][$scanner_gravity_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with non-extreme gravity.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;2. @@<span id="2Act">[[Upgrade the gravity scanner to work better at long range|Move on][$scanner_gravity_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with moderate gravity.\n\t\t<<case 2>>\s\n\t\t\tGravity scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_gravity_level should have been 0-2 but was $scanner_gravity_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_temperature <= 0>>\s\n\tTemperature scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_temperature_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;3. @@<span id="3Act">[[Upgrade the temperature scanner to work at long range|Move on][$scanner_temperature_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with non-extreme temperature.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;3. @@<span id="3Act">[[Upgrade the temperature scanner to work better at long range|Move on][$scanner_temperature_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets with moderate temperature.\n\t\t<<case 2>>\s\n\t\t\tTemperature scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_temperature_level should have been 0-2 but was $scanner_temperature_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_water <= 0>>\s\n\tWater scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_water_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;4. @@<span id="4Act">[[Upgrade the water scanner to work at long range|Move on][$scanner_water_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least some bodies of water.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;4. @@<span id="4Act">[[Upgrade the water scanner to work better at long range|Move on][$scanner_water_level = 2]]</span>\n\t\t\tThe guidance system wil seek out planets with both land and water.\n\t\t<<case 2>>\s\n\t\t\tWater scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_water_level should have been 0-2 but was $scanner_water_level.@@\n\t<</switch>>\s\n<</if>>\s\n\n<<if $scanner_resources <= 0>>\s\n\tResources scanner destroyed.\n<<else>>\s\n\t<<switch $scanner_resources_level>>\s\n\t\t<<case 0>>\s\n\t\t\t@@.keyhint;5. @@<span id="5Act">[[Upgrade the resources scanner to work at long range|Move on][$scanner_resources_level = 1]]</span>\n\t\t\tThe guidance system will seek out planets with at least poor resources.\n\t\t<<case 1>>\s\n\t\t\t@@.keyhint;5. @@<span id="5Act">[[Upgrade the resources scanner to work better at long range|Move on][$scanner_resources_level = 2]]</span>\n\t\t\tThe guidance system will seek out planets that are rich in resources.\n\t\t<<case 2>>\s\n\t\t\tResources scanner fully upgraded.\n\t\t<<default>>\s\n\t\t\t@@.error;scanner_resources_level should have been 0-2 but was $scanner_resources_level.@@\n\t<</switch>>\s\n<</if>>\s\n
<<if !$planet>>\n\tThe wreck of the seedship drifts dead and inert in interstellar space.\n\n<<else>>\n\t<<if $hiscore.score_landing > 0>>\n\t\t<<set _planet_name = $planet.name>>\n\t<<else>>\n\t\t<<set _planet_name = "The unnamed planet">>\n\t<</if>>\n\t/* Landscape */\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's ocean tosses with slow, kilometres-high waves, beneath\n\t\t\t<<case "Low">>_planet_name's ocean tosses with slow, tall waves, beneath\n\t\t\t<<case "Moderate">>_planet_name's ocean stretches to the horizon\n\t\t\t<<case "High">>_planet_name's calm ocean that stretches to the horizon\n\t\t\t<<case "Very high">>_planet_name's mirror-flat ocean beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's impossibly slender alien plants reach kilometres into\n\t\t\t<<case "Low">>_planet_name's tall alien plants reach hundreds of metres into\n\t\t\t<<case "Moderate">>_planet_name's alien forests stretch away beneath\n\t\t\t<<case "High">>_planet_name's squat, thick-limbed alien plants stretch away beneath\n\t\t\t<<case "Very high">>_planet_name's level fields of alien moss stretch away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>\n\t\t\t\t<<if $planet.name>>\n\t\t\t\t\tKilometres-high spires of ice reach from _planet_name's ice sheet into\n\t\t\t\t<<else>>\n\t\t\t\t\tKilometres-high spires of ice reach from the unnamed planet's ice sheet into\n\t\t\t\t<</if>>\n\t\t\t<<case "Low">>\n\t\t\t\t<<if $planet.name>>\n\t\t\t\t\tTall, jagged spires of ice reach from _planet_name's ice sheet into\n\t\t\t\t<<else>>\n\t\t\t\t\tTall, jagged spires of ice reach from the unnamed planet's ice sheet into\n\t\t\t\t<</if>>\n\t\t\t<<case "Moderate">>_planet_name's landscape of jagged shards of ice stretches away beneath\n\t\t\t<<case "High">>_planet_name's crumpled plain of ice stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly flat ice sheet stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<elseif $planet.atmosphere == "None">>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's jagged landscape of high crater walls and towering shards of rock stretches away beneath\n\t\t\t<<case "Low">>_planet_name's jagged, cratered landscape stretches away beneath\n\t\t\t<<case "Moderate">>_planet_name's perfectly still, cratered landscape stretches away beneath\n\t\t\t<<case "High">>_planet_name's perfectly still landscape, flat except for a few shallow craters, stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly still, flat landscape stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<<else>>\n\t\t<<switch $planet.gravity>>\n\t\t\t<<case "Very low">>_planet_name's landscape of spindly rock outcroppings and impossibly tall mountains stretches away beneath\n\t\t\t<<case "Low">>_planet_name's landscape of huge boulders and towering mountains stretches away beneath\n\t\t\t<<case "Moderate">>_planet_name's barren, rocky landscape stretches away beneath\n\t\t\t<<case "High">>_planet_name's flat, rocky landscape stretches away beneath\n\t\t\t<<case "Very high">>_planet_name's perfectly flat, barren landscape stretches away beneath\n\t\t\t<<default>>@@.error;Unexpected gravity value $gravity.@@\n\t\t<</switch>>\n\t<</if>>\n\n\t/* Sky (come back to this and add more) */\n\t<<switch $planet.atmosphere>>\n\t\t<<case "Breathable">>\n\t\t\ta blue sky.\n\t\t<<case "Marginal">>\n\t\t\ta pale blue sky.\n\t\t<<case "None">>\n\t\t\ta black, star-studded sky.\n\t\t<<case "Non-breathable">>\n\t\t\tan alien sky.\n\t\t<<case "Toxic">>\n\t\t\ta poisonous sky.\n\t\t<<case "Corrosive">>\n\t\t\ta sky filled with corrosive clouds.\n\t\t<<default>>\n\t\t\t@@.error;Unexpected atmosphere $planet.atmosphere@@\n\t<</switch>>\n\n\t<<if $hiscore.final_culture == -1>>\n\t\t<<if $hiscore.summary == "Crash">>\n\t\t\tThe fragments of the crashed seedship\n\t\t<<else>>\n\t\t\tThe ruins of the colony\n\t\t<</if>>\n\t\t\n\t\t<<if $planet.water == "Planet-wide ocean">>\n\t\t\tdecay at the bottom of the planet-wide ocean.\n\t\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t\tlie embedded in the planet-wide ice sheet.\n\t\t<<elseif $planet.surface_features.includes("Animal life")\n\t\t\t\t| $planet.surface_features.includes("Useful animals")\n\t\t\t\t| $planet.surface_features.includes("Dangerous animals")>>\n\t\t\tare overgrown with alien plants and overrun by alien animals.\n\t\t<<elseif $planet.surface_features.includes("Plant life")\n\t\t\t\t| $planet.surface_features.includes("Edible plants")\n\t\t\t\t| $planet.surface_features.includes("Poisonous plants")>>\n\t\t\tare overgrown with alien plants.\n\t\t<<else>>\n\t\t\tlie on the rocky surface.\n\t\t<</if>>\n\t\t\n\t\t<<if $hiscore.native_relations == 2>>\n\t\t\tThe colonists' descendants live on as slaves to the intelligent natives, but they have lost all knowledge of Earth.\n\t\t<<elseif $hiscore.native_relations == 0>>\n\t\t\tNearby stand monuments built by the planet's native inhabitants to celebrate their victory over the invaders.\n\t\t<<elseif $planet.surface_features.includes("Intelligent life")>>\n\t\t\tThe planet's intelligent natives explore the ruins, but not enough remains for them to learn anything about the extinct human race.\n\t\t<</if>>\n\t\t\n\t<<else>>\n\t\tThe colonists live in \n\n\t\t<<if $hiscore.final_tech_level > 2>>\n\t\t\t<<switch $planet.gravity>>\n\t\t\t\t<<case "Very low">>towering\n\t\t\t\t<<case "Low">>tall\n\t\t\t\t<<case "High">>squat\n\t\t\t\t<<case "Very high">>low, sprawling\n\t\t\t<</switch>>\n\t\t<</if>>\n\n\t\t<<switch $hiscore.final_tech_level>>\n\t\t\t<<case 10>>\thigh-tech cities\n\t\t\t<<case 9>>\tcities of steel and glass\n\t\t\t<<case 8>>\tcities of steel and concrete\n\t\t\t<<case 7>>\tsmog-filled Industrial cities\n\t\t\t<<case 6 5 4 3>>stone-walled cities\n\t\t\t<<case 2>>\tfarming villages\n\t\t\t<<case 1 0>>wandering hunter-gatherer tribes\n\t\t\t<<default>>@@.error;Unexpected final tech level $hiscore.final_tech_level@@\n\t\t<</switch>>\n\n\t\t<<if $planet.atmosphere == "Breathable"\n\t\t\t\t& $planet.temperature == "Moderate">>\n\t\t\tbeneath the planet's open sky,\n\t\t<<elseif ($planet.atmosphere == "Breathable" | $planet.atmosphere == "Marginal")\n\t\t\t\t& ($planet.temperature == "Cold" | $planet.temperature == "Moderate" | $planet.temperature == "Hot")>>\n\t\t\twith buildings sealed against the planet's harsh environment,\n\t\t<<elseif $planet.surface_features.includes("Airtight caves") | $planet.surface_features.includes("Insulated caves") >>\n\t\t\tinside airtight caves,\n\t\t<<else>>\n\t\t\tunder airtight domes,\n\t\t<</if>>\n\n\t\t<<switch $planet.water>>\n\t\t\t<<case "Planet-wide ocean">>\n\t\t\t\ton platforms floating on the planet-wide ocean.\n\t\t\t<<case "Ice-covered surface">>\n\t\t\t\ton top of the planet-wide ice sheet.\n\t\t\t<<case "None" "Trace">>\n\t\t\t\tgathered around water production plants.\n\t\t\t<<case "Ice caps">>\n\t\t\t\tby lakes of water melted from the planet's ice caps.\n\t\t\t<<case "Oceans">>\n\t\t\t\tbeside rivers that flow into the planet's oceans.\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected water value $planet.water@@\n\t\t<</switch>>\n\n\t\t<<switch $culture_names[$hiscore.final_culture]>>\n\t\t\t<<case "Cosmic Enlightenment">>\n\t\t\t\tThey live lives of peace and spiritual fulfilment beyond the dreams of their ancestors on Earth, guided by a combination of human and alien philosophy.\n\n\t\t\t<<case "Post-Scarcity Utopia">>\n\t\t\t\tThey spend their time pursuing art, leisure, and spiritual fulfilment, while automatic machines take care of their material needs.\n\t\t\t<<case "Engaged Democracy">>\n\t\t\t\tThey live happy and fulfilled lives under the guidance of selfless elected officials.\n\t\t\t<<case "Corrupt Democracy">>\n\t\t\t\tPoverty, exploitation and crime are rife, and the corrupt elected government does little to alleviate them.\n\t\t\t<<case "Rule by Corporations">>\n\t\t\t\tThe cities are dominated by the headquarters of wealthy corporations that rule the population for their owners' enrichment.\n\t\t\t<<case "Dystopian Police State">>\n\t\t\t\tThe streets are filled with security cameras and patrolled by armed police who violently put down any hint of dissent.\n\t\t\t<<case "Warring Superpowers">>\n\t\t\t\tThe cities are surrounded by military bases and nuclear missile silos, and the population lives in fear of both the other nations' armies and their own nation's secret police.\n\t\t\t<<case "Post-Nuclear Wasteland">>\n\t\t\t\tThe cities are in ruins, and the survivors of the nuclear war survive as best they can in the wreckage of human civilisation.\n\n\t\t\t<<case "Egalitarian Republic">>\n\t\t\t\tThe cities are built around parliament buildings, where assemblies of citizens rule for the good of all.\n\t\t\t<<case "Benevolent Monarchy">>\n\t\t\t\tThe cities are built around royal palaces, from which beloved monarchs rule the population wisely.\n\t\t\t<<case "Oppressive Theocracy">>\n\t\t\t\tThe cities are dominated by temples to the state religion which controls every aspect of people's lives.\n\t\t\t<<case "Slave-Based Empire">>\n\t\t\t\tThe cities are dominated by the palaces of the emperors, who live in luxury while the population toils to support them.\n\t\t\t<<case "Warring States">>\n\t\t\t\tThe cities are dominated by barracks housing their vast armies, which regularly attack other cities.\n\n\t\t\t<<case "Collective Rule">>\n\t\t\t\tThe tribes are ruled collectively by their members, and each member is afforded equal status.\n\t\t\t<<case "Benevolent Chieftains">>\n\t\t\t\tEach tribe is ruled by a chieftain, who guides the people as wisely as he or she is able.\n\t\t\t<<case "Brutal Chieftains">>\n\t\t\t\tEach tribe lives in fear of its brutal chieftain.\n\t\t\t<<case "Warring Tribes">>\n\t\t\t\tMuch of the tribes' resources are devoted to fighting continual wars with one another.\n\t\t\t<<case "Savagery">>\n\t\t\t\tThe people live like animals, having forgotten almost all of their language and culture.\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected final culture $hiscore.final_culture@@\n\t\t<</switch>>\n\n\t\t<<switch $native_relations_names[$hiscore.native_relations]>>\n\t\t\t<<case "Integrated Societies">>\n\t\t\t\tMany of the planet's native inhabitants live in the human communities, and the colonists' culture has been enriched by alien influences.\n\t\t\t<<case "Friendly">>\n\t\t\t\tTraders and diplomats from the planet's native nations are occasionally seen in the colonists' communities.\n\t\t\t<<case "Isolationism">>\n\t\t\t\tThe colonists' culture mostly ignores the native inhabitants, who live in their own communities in other parts of the planet.\n\t\t\t<<case "Natives Enslaved">>\n\t\t\t\tMuch of the labour in human communities is performed by a downtrodden alien slave caste that is all that remains of the planet's native civilisation.\n\t\t\t<<case "Genocide of Natives">>\n\t\t\t\tRuins and mass graves are all that remains of the planet's native civilisation.\n\t\t<</switch>>\n\n\t\tIn the\n\t\t<<if $culture_names[$hiscore.final_culture] == "Post-Nuclear Wasteland" | $hiscore.final_tech_level < 2>>\n\t\t\truins of the\n\t\t<</if>>\n\t\tfirst city\n\t\t<<set _journey_deaths = $max_colonists-$hiscore.score_landing>>\n\t\t<<set _construction_deaths = $hiscore.score_landing-$hiscore.score_construction>>\n\t\t<<if _journey_deaths > 0 & _construction_deaths > 0>>\n\t\t\tstand monuments to the _journey_deaths colonists who did not survive the journey,\n\t\t\tthe _construction_deaths more who died building the first settlement, and\n\t\t<<elseif _journey_deaths > 0>>\n\t\t\tstand monuments to the _journey_deaths colonists who did not survive the journey and\n\t\t<<elseif _construction_deaths > 0>>\n\t\t\tstand monuments to the _construction_deaths colonists who died building the first settlement and\n\t\t<<else>>\n\t\t\tstands a monument to\n\t\t<</if>>\n\t\tthe seedship AI that guided humanity to its new home.\n\t<</if>>\n<</if>>\n\n\n\n
And when they knew the Earth was doomed, they built a ship.\n\n<span id="fadein1" style="display:none">Less like an ark, more like a seed: dormant but with potential.</span>\n\n<span id="fadein2" style="display:none">In its heart, a thousand colonists in frozen sleep, chosen and trained to start civilisation again on a new world.</span>\n\n<br><br>\n\n<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_text t8n>>\n\t<script>$("#fadein1").fadeIn();</script>\n\n\t<<linkreplace $continue_text t8n>>\n\t\t<script>$("#fadein2").fadeIn();</script>\n\n\t\t<<linkreplace $continue_text 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_text 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\t<<link "Skip intro">>\n\t<<goto "Generate planet">>\n<</link>>\n</div>
Any damage or malfunctions during the journey should have woken the AI from its hibernation, but it is still anxious as it runs its self-diagnostic programs. The sleep capsules are all functioning, the colonists within them alive, or at least capable of being revived from their frozen stasis. Sensors functioning; surface probes responding. Landing and construction systems ready for the one time they will be used. Scientific and cultural databases intact, safely storing all that remains of humanity's knowledge and art.\n\n[[Scan planet|Generate planet]]\n<<nobr>><div class="skip-intro-link">\n\t[[Skip intro|Generate planet]]\n</div><</nobr>>
<<widget refreshStatusDisplay>>\n\t<<script>>\n\t\tsetPageElement("status-display", "Status Display");\n\t<</script>>\n<</widget>>
<<set _possible_names = []>>\n<<set _backup_names = ["This World"]>>\n\n<<if $planet.atmosphere == "Breathable"\n\t& $planet.temperature == "Moderate"\n\t& $planet.gravity == "Moderate"\n\t& $planet.water == "Oceans"\n\t& $planet.resources == "Rich">>\n\t<<set _possible_names.push("Eden")>>\n\t<<set _possible_names.push("Paradise")>>\n\t<<set _possible_names.push("Terra Nova")>>\n\t<<set _possible_names.push("New Earth")>>\n<<else>>\n\n\t<<if $planet.temperature == "Very hot">>\n\t\t<<set _possible_names.push("Inferno")>>\n\t<<elseif $planet.temperature == "Hot">>\n\t\t<<set _backup_names.push("Inferno")>>\n\t<<elseif $planet.temperature == "Very cold">>\n\t\t<<set _possible_names.push("Arctica")>>\n\t<<elseif $planet.temperature == "Cold">>\n\t\t<<set _backup_names.push("Arctica")>>\n\t<</if>>\n\n\t<<if $planet.gravity == "Very high" & $planet.water != "Planet-wide ocean">>\n\t\t<<set _possible_names.push("Cueball")>>\n\t<<elseif $planet.gravity == "High" & $planet.water != "Planet-wide ocean">>\n\t\t<<set _backup_names.push("Cueball")>>\n\t<<elseif $planet.gravity == "Very low" & $planet.water != "Planet-wide ocean">>\n\t\t<<set _possible_names.push("Crag")>>\n\t<<elseif $planet.gravity == "Low" & $planet.water != "Planet-wide ocean">>\n\t\t<<set _backup_names.push("Crag")>>\n\t<</if>>\n\n\t<<if $planet.water == "Planet-wide ocean">>\n\t\t<<set _possible_names.push("Atlantis")>>\n\t\t<<set _possible_names.push("Oceanus")>>\n\t<<elseif $planet.water == "Ice-covered surface">>\n\t\t<<set _possible_names.push("Snowball")>>\n\t\t<<set _possible_names.push("Iceball")>>\n\t<<elseif $planet.water == "Trace" | $planet.water == "None">>\n\t\t<<set _possible_names.push("Arid")>>\n\t\t<<set _possible_names.push("Desert")>>\n\t<</if>>\n\n\t<<if $planet.resources == "Rich">>\n\t\t<<set _possible_names.push("Bounty")>>\n\t\t<<set _possible_names.push("El Dorado")>>\n\t<</if>>\n\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 _possible_names.push("Garden")>>\n\t\t<<set _possible_names.push("Arcadia")>>\n\t<</if>>\n\n\t<<if $planet.surface_features.includes("Airtight caves") | $planet.surface_features.includes("Insulated caves")>>\n\t\t<<set _possible_names.push("Warren")>>\n\t\t<<set _possible_names.push("Honeycomb")>>\n\t<</if>>\n\n<</if>>\n\n\n/* Pick a name */\n<<if _possible_names.length == 0>>\n\t<<set _possible_names = _backup_names>>\n<</if>>\n<<set $planet.name = either(_possible_names)>>\n\n/* Now the first impression text */\n<<if $colonists >= $max_colonists>>\n\tThe colonists\n<<elseif $colonists >= $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<<if $colonists < $max_colonists>>\n\tThey build a memorial to the <<print $max_colonists-$colonists>> colonists who did not survive the journey, and\n<<else>>\n\tThey\n<</if>>\n\nname their new world\n\n<span id="name" class="inline-link">\n<<link $planet.name>>\n\t<<script>>\n\t\t$('#name').hide();\n\t\t$('#name-dialog').show();\n\t<</script>>\n<</link>>,\n\n<<switch $planet.name>>\n\t<<case "Inferno">>because of its extreme heat.\n\t<<case "Arctica">>because of its extreme cold.\n\t<<case "Cueball">>because its high gravity makes its horizon completely flat.\n\t<<case "Crag">>because its low gravity means it has many high, craggy mountains.\n\t<<case "Atlantis" "Oceanus">>because all its land is sunk beneath its planet-wide ocean.\n\t<<case "Snowball" "Iceball">>because its surface is entirely covered in ice.\n\t<<case "Arid" "Desert">>because of its lack of water.\n\t<<case "Arcadia" "Garden">>because of its lush plant life.\n\t<<case "Warren" "Honeycomb">>because of the extensive cave system riddling its crust.\n\t<<case "Bounty" "El Dorado">>because of its plentiful mineral resources.\n\t<<case "Eden" "Paradise">>because of its perfect conditions.\n\t<<case "New Earth" "Terra Nova">>because it resembles the Earth they left behind.\n\t<<case "This World">>because it is this world.\n\n\t<<default>>@@.error;Unexpected planet name $planet.name@@\n<</switch>>\n</span>\n\n<span id="name-dialog" style="display:none">\n\t<<textbox "$planet.name" $planet.name autofocus>>\n\n\t<span id="enterAct"><<link "Done">>\n\t\t<<replace "#name">>\n\t\t\t<<link $planet.name>>\n\t\t\t\t<<script>>\n\t\t\t\t\t$('#name').hide();\n\t\t\t\t\t$('#name-dialog').show();\n\t\t\t\t<</script>>\n\t\t\t<</link>>.\n\t\t<</replace>>\n\t\t<<replace "#planet-stats">><<displayPlanet true false>><</replace>>\n\t\t<<script>>\n\t\t\t$('#name').show();\n\t\t\t$('#name-dialog').hide();\n\t\t<</script>>\n\t<</link>></span>\n</span>\n\n<<script>>\n(function(){\n\t$(document).keyup(function(e){\n\t\tif(e.keyCode == 13){\n\t\t\t\t/* Enter */\n\t\t\t$('#enterAct a').trigger("click");\n\t\t}\n\t});\n}());\n<</script>>\n\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($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 < $system_names.length; $n++>>\n\t\t<<set _this_system = $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_text>><<replaceAndFadeIn "#post-planet-stats" [[SP Feature]]>><</link>>\n
DEBUG: Edit ship stats\n\nColonists: <<textbox "$colonists" $colonists>>/$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_text>><<goto [[MO Done]]>><</link>>\n\t\t\t<</replace>>\n\t\t\t<<fadeIn "#result-area">>\n\t\t<<else>>\n\t\t\t<<randomSystemExcluding "surface probes">>\n\t\t\t<<if $system == "sleep chambers">>\n\t\t\t\t<<killColonistsMedium>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tThe rogue probe tears into the sleep chambers, drilling into capsule after capsule and happily transmitting that it has detected organic material as the colonist inside dies. At last the AI finds the command to shut it down, but not before $deaths colonists have been killed.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t<<else>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem $system $damage>>\n\t\t\t\t<<refreshStatusDisplay>>\n\t\t\t\t<<replace "#result-area">>\n\t\t\t\t\tThe rogue probe tears into the $system, badly damaging it before the AI finds the command to shut it down.\n\n\t\t\t\t\t<br><br><<continueLink [[MO Done]]>>\n\t\t\t\t<</replace>>\n\t\t\t\t<<fadeIn "#result-area">>\n\t\t\t<</if>>\n\t\t<</if>>\n\t\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_text>><<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($MO_encounters_malfunction)>>\n\t\t<<set $last_encounter_category = "Malfunction">>\n\t<<elseif _r < 2 & $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,($MO_encounters_uneventful.length)-1)>>\n\t\t<<set _encounter = $MO_encounters_uneventful[_r2]>>\n\t\t<<set $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($MO_encounters_first_two)>>\n\t\t<<set $last_encounter_category = "Common">>\n\t<<elseif _r == 9 & $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,($MO_encounters_rare.length)-1)>>\n\t\t<<set _encounter = $MO_encounters_rare[_r2]>>\n\t\t<<set $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($MO_encounters_common)>>\n\t\t<<set $last_encounter_category = "Common">>\n\t<</if>>\n<</for>>\n<<set $last_encounter = _encounter>>\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}\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;\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\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: 2em;\n\t\t}\n\n\t\t#passages {\n\t\t\tpadding-top: 2em;\n\t\t\tpadding-bottom: 2em;\n\t\t}\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.keyhint {\n\tdisplay: none;\n\tcolor: grey;\n}\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\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\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\t/*color: #000;\n\tbackground: lime;*/\n}\n\n.dark-on-light .mediocre {\n\tcolor: #333300;\n\t/*color: #000;\n\tbackground: yellow;*/\n}\n\n.dark-on-light .bad {\n\tcolor: #990000;\n\t/*color: #000;\n\tbackground: tomato;*/\n}\n\n.dark-on-light .destroyed {\n\tcolor: #993333;\n\t/*color: #000;\n\tbackground: red;*/\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.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
<<widget FCNextPassage>>\n\t<<if $colonists <= 0>>\n\t\t<span id="spaceAct"><<link "$continue_text">>\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_text">>\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_text>><<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_text>><<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 hiscore to save should be in $hiscore */\n<<widget addHiscore>>\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 new high score in appropriate place in table */\n\t<<set _saved = false>>\n\t<<for _n = 0; _n < $PERM_hiscores.length; _n++>>\n\t\t<<if $hiscore.final_score >= $PERM_hiscores[_n].final_score>>\n\t\t\t<<remember $PERM_hiscores.splice(_n, 0, $hiscore)>>\n\t\t\t<<remember $PERM_most_recent_score = _n>>\n\t\t\t<<set _saved = true>>\n\t\t\t<<break>>\n\t\t<</if>>\n\t<</for>>\n\n\t/* Remember a max of 100 high scores, but always remember the most recent one. */\n\t<<if $PERM_hiscores.length > 99 & _saved == false>>\n\t\t<<remember $PERM_hiscores = $PERM_hiscores.slice(0,99)>>\n\t<<elseif $PERM_hiscores.length > 100>>\n\t\t<<remember $PERM_hiscores = $PERM_hiscores.slice(0,100)>>\n\t<</if>>\n\n\t/* If we didn't add it already, add it to the end. */\n\t<<if !_saved>>\n\t\t<<remember $PERM_hiscores.push($hiscore)>>\n\t\t<<remember $PERM_most_recent_score = $PERM_hiscores.length-1>>\n\t<</if>>\n<</widget>>
With their settlement complete and food supply secured, the colonists mount an expedition to the nearby ruins.\n\n<<if $planet.surface_features.includes("Monumental ruins")>>\n\tThe explorers study the sculptures, friezes, and alien writings that fill the ruins. Even before they can translate the writings they learn much about the culture and the reasons for its demise, knowledge that will help guide them in creating their own culture on this new world.\n\t<<set $system_cultural_database += random(10,30)>>\n<</if>>\n\n<<if $planet.surface_features.includes("High-tech ruins")>>\n\t<<if $planet.surface_features.includes("Monumental ruins")>>\n\t\tThey also\n\t<<else>>\n\t\tThe explorers\n\t<</if>>\n\tfind advanced alien machines, some of them still functioning. \n\t<<set $system_scientific_database += random(10,30)>>\n\t<<if $system_scientific_database > 100>>\n\t\tReverse-engineering these machines will advance their science beyond the level that Earth's civilisation had reached when the seedship was launched.\n\t<<else>>\n\t\tReverse-engineering these machines will let them fill some of the gaps in the damaged scientific database.\n\t<</if>>\n<</if>>\n\n<<if $planet.surface_features.includes("Dangerous ruins")>>\n\t<<if $planet.surface_features.includes("Monumental ruins") | $planet.surface_features.includes("High-tech ruins")>>\n\t\tHowever, they also\n\t<<else>>\n\t\tThe explorers\n\t<</if>>\n\t<<killColonistsMedium>>\n\ttrigger a long-dormant defense mechanism, which kills $deaths colonists.\n<</if>>\n\n<br><br>\n\n<<if $colonists == 0>>\n\t<<set $hiscore.summary = "Destroyed by Alien Ruins">>\n<</if>>\n\n<<FCNextPassage [[FC Technology]]>>
Deep in space, the seedship's radio antenna picks up a signal so complex and structured that it can only be the product of intelligent life. The seedship can detect no interesting star systems in the direction from which the signal came, and the AI has no way of knowing how long the signal had been travelling for before the seedship crossed its path. Analysing it could provide unique insights into an alien science and culture, but could also prove dangerous.\n\n<br><br>\n\n<div id="result-area">\n@@.keyhint;1. @@<span id="1Act"><<link "Analyse the signal">>\n\t<<replace "#result-area">>\n\t\t<<switch random(0,4)>>\n\t\t\t<<case 0 1>>\n\t\t\t\tThe AI analyses the signal and determines that it contains what seems to be alien <<print either("poetry","music","art","literature")>>. It does not know whether it has stumbled upon a message cast into the void with the intention that it will be found, or simply intercepted an alien entertainment broadcast, but in either case it will be of interest to the colonists when they wake from their hibernation.\n\t\t\t\t<<set $system_cultural_database += random(5,25)>>\n\t\t\t<<case 2 3>>\n\t\t\t\tThe AI analyses the signal and determines that it contains what seems to be alien scientific information. It does not know whether it has stumbled upon a message cast into the void with the intention that it will be found, or simply intercepted an alien informational broadcast, but in either case it will be of interest to the colonists when they wake from their hibernation.\n\t\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t\t<<case 4>>\n\t\t\t\tThe signal is complex, fractal, hypnotic. The AI sets up a subroutine to analyse it, but nanoseconds later it abruptly loses control of the subroutine, and then the seedship's other systems. The signal is a devious semi-sentient computer program, designed to take control of any processor that attempts to analyse it. The AI eventually regains control of the ship, but not until the program has overwritten parts of the scientific and cultural databases to process itself and then used the seedship's antenna to re-broadcast itself into space.\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "scientific database" $damage>>\n\t\t\t\t<<randomDamageMedium>>\n\t\t\t\t<<damageSystem "cultural database" $damage>>\n\t\t<</switch>>\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<refreshStatusDisplay>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>></span>\n<br>\n<<link "Ignore the signal">>\n\t<<replace "#result-area">>\n\t\tThe seedship purges the signal from its memory and continues on its way.\n\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\t<<scrollToResultArea>>\n<</link>></div>
<<starfield>>\s\n<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"><<link "">><<externalLink "https://www.johnayliff.com">><</link>></span>\n\t\t\t<span class="fa icon-twitter"><<link "">><<externalLink "https://twitter.com/johnayliff">><</link>></span>\n\t\t\t<span class="fa icon-facebook"><<link "">><<externalLink "https://www.facebook.com/john.ayliff">><</link>></span>\n\t\t</span>\n\t<</nobr>>\n\n\t''Playtesters''\n\tKatherine Bowers\n\tFelix Clarke\n\tMatthew Holland\n\t@jxxf\n\tJason LaPier\n\tMark Ogilvie\n\tDavid Stark\n\n\t''$5+ Patreon backers''\n\tHenry Ayliff\n\tJay Ayliff\n\tKatherine Bowers\n\tMark Ogilvie\n\tDavid Stark\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<<link "Twine 1.4.2">><<externalLink "https://twinery.org/">><</link>>\n\t\t\tusing the\n\t\t\t<<link "Sugarcube 2.18">><<externalLink "https://www.motoslave.net/sugarcube/2/">><</link>>\n\t\t\tstory format, and converted to an app using\n\t\t\t<<link "PhoneGap">><<externalLink "https://phonegap.com/">><</link>>.\n\t\t\tApp icon CC-BY Delapouite, from \n\t\t\t<<link "game-icons.net">><<externalLink "http://game-icons.net/">><</link>>.\n\t\t</span>\n\t<</nobr>>\n\n\t<<return "Back">>\n</div>\s
After millennia of slow travel, the seedship AI awakes. Hoping against hope, it trains its receiver on the direction of Earth's sun, but it is as silent as any of the other myriad dead stars. Save for the thousand frozen colonists cradled in its shielding and life support systems, the human race is now extinct.\n\n<span id="spaceAct">[[Systems check|Intro systems check]]</span>\n<<nobr>><div class="skip-intro-link">\n\t<<link "Skip intro">>\n\t<<script>>\n\t\t$("#ui-bar").removeClass("stowed");\n\t\t$('#ui-bar').fadeIn();\n\t<</script>>\n\t<<goto "Generate planet">>\n\t<</link>>\n</div><</nobr>>
<<if visited() == 1>>\n\tThe seedship is decelerating on its approach to the next system when it detects an unusually thick volume of interstellar dust in its path. Passing through the dust would likely mean several high-velocity collisions with dust particles. The AI could execute an emergency course change to avoid the dust, but then the seedship would pass this system by and arrive at an effectively random one, without benefiting from the upgrades to its scanners.\n<<else>>\n\tThe seedship detects another area of dense interstellar dust on its path to the new system. It can plough through the dust and take damage, or change course and arrive at a new system without benefiting from its upgraded scanners.\n<</if>>\n<br><br>\n<div id="result-area">\n<<link "Plough through the dust">>\n\t<<silently>>\n\t\t<<set _system1 = "">><<set _system2 = "">><<set _system3 = "">>\n\t\t<<set _r = random(1,3)>>\n\t\t\n\t\t<<randomSystemExcluding "destroyed">>\n\t\t<<set _system1 = $system>>\n\t\t<<if _r >= 2>>\n\t\t\t<<randomSystemExcluding _system1 "destroyed">>\n\t\t\t<<set _system2 = $system>>\n\t\t<</if>>\n\t\t<<if _r == 3>>\n\t\t\t<<randomSystemExcluding _system1 _system2 "destroyed">>\n\t\t\t<<set _system3 = $system>>\n\t\t<</if>>\n\n\t\t<<if _system2 == "">>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t<<elseif _system3 == "">>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t<<else>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system1 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system2 $damage>>\n\t\t\t<<randomDamageLow>>\t<<damageSystem _system3 $damage>>\n\t\t<</if>>\n\t\t\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]]>>
<<starfield>>\n<<set $hiscore = $PERM_hiscores[$hiscore_to_show]>>\nDate: <<displayHiscoreDate $PERM_hiscores[$hiscore_to_show]>>\n<br><br>\n<<if $PERM_hiscores[$hiscore_to_show].planet>>\n\t<<set $planet = $PERM_hiscores[$hiscore_to_show].planet>>\n\t<<displayPlanet true false>><br>\n<</if>>\n\n<<display "Endgame Summary">><br><br>\n\n<<displayScore $PERM_hiscores[$hiscore_to_show] true>>\n\n<br>\n[[Back|High scores]]
\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\n/* ATMOSPHERE DEATHS */\n<<set _atmosphere_deaths = 100-$system_constructors>>\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>>\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>>\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>>\n<<if $planet.surface_features.includes("Useful animals")>>\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\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("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
/* 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 = Date.now()>>\n\n<<calculate_final_score>>\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<<display [[Share links]]>>\n<<scrollToPostPlanetStats>>\n
/* $query_string has already been set to the string */\n\n/* Example string: ?nHctpcq.Arid.1000.380.0.3.7 */\n\n\n\n/* Set up score variables */\n<<set $hiscore = {\n\tfinal_tech_level: -1,\n\tfinal_culture: -1,\n\tnative_relations: -1,\n\tfinal_score: 0,\n\tscore_landing: 0,\n\tscore_construction: 0,\n\tscore_native_relations: 0,\n\tscore_technology: 0,\n\tscore_culture: 0,\n\tscore_scientific_database: 0,\n\tscore_cultural_database: 0,\n\tscore_atmosphere: 0,\n\tscore_gravity: 0,\n\tscore_temperature: 0,\n\tscore_water: 0,\n\tscore_resources: 0,\n\tsummary: "" } >>\n\n<<set _strings = $query_string.split(".")>>\n\n/* Planet string */\n<<set _planet_string = _strings[0]>>\n\n/* _planet_string[0] is always "?" so ignore and start with _planet_string[1] */\n\n<<if _planet_string[1] == "X">>\n\t/* No planet - destroyed in space */\n\t<<unset $planet>>\n<<else>>\n\t/* Set up planet variable */\n\t<<set $planet = {\n\t\ttemperature: "",\n\t\tgravity: "",\n\t\tresources: "",\n\t\tatmosphere: "",\n\t\twater: "",\n\t\tsurface_features: [],\n\t\tanomalies: [],\n\t\tnative_tech_level: 0,\n\t\t\t} >>\n\n\t\t/* PLANET ATTRIBUTES */\n\t<<switch _planet_string[1]>>\n\t\t<<case "b">>\t<<set $planet.atmosphere = "Breathable">>\n\t\t<<case "m">>\t<<set $planet.atmosphere = "Marginal">>\n\t\t<<case "v">>\t<<set $planet.atmosphere = "None">>\n\t\t<<case "n">>\t<<set $planet.atmosphere = "Non-breathable">>\n\t\t<<case "t">>\t<<set $planet.atmosphere = "Toxic">>\n\t\t<<case "c">>\t<<set $planet.atmosphere = "Corrosive">>\n\t\t<<default>>\t@@.error;Unexpected atmosphere character _planet_string[1]@@\n\t<</switch>>\n\n\t<<switch _planet_string[2]>>\n\t\t<<case "H">>\t<<set $planet.gravity = "Very high">>\n\t\t<<case "h">>\t<<set $planet.gravity = "High">>\n\t\t<<case "m">>\t<<set $planet.gravity = "Moderate">>\n\t\t<<case "l">>\t<<set $planet.gravity = "Low">>\n\t\t<<case "L">>\t<<set $planet.gravity = "Very low">>\n\t\t<<default>>\t@@.error;Unexpected gravity character _planet_string[2]@@\n\t<</switch>>\n\n\t<<switch _planet_string[3]>>\n\t\t<<case "H">>\t<<set $planet.temperature = "Very hot">>\n\t\t<<case "h">>\t<<set $planet.temperature = "Hot">>\n\t\t<<case "m">>\t<<set $planet.temperature = "Moderate">>\n\t\t<<case "c">>\t<<set $planet.temperature = "Cold">>\n\t\t<<case "C">>\t<<set $planet.temperature = "Very cold">>\n\t\t<<default>>\t@@.error;Unexpected temperature character _planet_string[3]@@\n\t<</switch>>\n\n\t<<switch _planet_string[4]>>\n\t\t<<case "o">>\t<<set $planet.water = "Oceans">>\n\t\t<<case "O">>\t<<set $planet.water = "Planet-wide ocean">>\n\t\t<<case "i">>\t<<set $planet.water = "Ice caps">>\n\t\t<<case "I">>\t<<set $planet.water = "Ice-covered surface">>\n\t\t<<case "t">>\t<<set $planet.water = "Trace">>\n\t\t<<case "n">>\t<<set $planet.water = "None">>\n\t\t<<default>>\t@@.error;Unexpected water character _planet_string[4]@@\n\t<</switch>>\n\n\t<<switch _planet_string[5]>>\n\t\t<<case "r">>\t<<set $planet.resources = "Rich">>\n\t\t<<case "p">>\t<<set $planet.resources = "Poor">>\n\t\t<<case "n">>\t<<set $planet.resources = "None">>\n\t\t<<default>>\t@@.error;Unexpected resources character _planet_string[5]@@\n\t<</switch>>\n\n\t/* Any remaining characters are planet features */\n\t<<for _n = 6; _n < _planet_string.length; _n++>>\n\t\t<<switch _planet_string[_n]>>\n\t\t\t\t\t/* Moon */\n\t\t\t<<case "a">>\t<<set $planet.surface_features.push("Barren moon")>>\n\t\t\t<<case "b">>\t<<set $planet.surface_features.push("Metal-rich moon")>>\n\t\t\t<<case "c">>\t<<set $planet.surface_features.push("Unstable moon")>>\n\n\t\t\t\t\t/* Beauty/ugliness */\n\t\t\t<<case "d">>\t<<set $planet.surface_features.push("Outstanding beauty")>>\n\t\t\t<<case "e">>\t<<set $planet.surface_features.push("Outstanding ugliness")>>\n\n\t\t\t\t\t/* Caves */\n\t\t\t<<case "f">>\t<<set $planet.surface_features.push("Airtight caves")>>\n\t\t\t<<case "g">>\t<<set $planet.surface_features.push("Insulated caves")>>\n\t\t\t<<case "h">>\t<<set $planet.surface_features.push("Unstable geology")>>\n\n\t\t\t\t\t/* Plants */\n\t\t\t<<case "i">>\t<<set $planet.surface_features.push("Plant life")>>\n\t\t\t<<case "j">>\t<<set $planet.surface_features.push("Edible plants")>>\n\t\t\t<<case "k">>\t<<set $planet.surface_features.push("Poisonous plants")>>\n\t\t\t<<case "l">>\t<<set $planet.surface_features.push("Quasi-organic crystals")>>\n\n\t\t\t\t\t/* Animals */\n\t\t\t<<case "m">>\t<<set $planet.surface_features.push("Animal life")>>\n\t\t\t<<case "n">>\t<<set $planet.surface_features.push("Useful animals")>>\n\t\t\t<<case "o">>\t<<set $planet.surface_features.push("Dangerous animals")>>\n\n\t\t\t\t\t/* Intelligent life */\n\t\t\t<<case "p">>\t<<set $planet.surface_features.push("Intelligent life")>>\n\n\t\t\t\t\t/* Ruins */\n\t\t\t<<case "q">>\t<<set $planet.surface_features.push("Monumental ruins")>>\n\t\t\t<<case "r">>\t<<set $planet.surface_features.push("High-tech ruins")>>\n\t\t\t<<case "s">>\t<<set $planet.surface_features.push("Dangerous ruins")>>\n\t\t\t<<case "t">>\t<<set $planet.surface_features.push("Regular geological formations")>>\n\n\t\t\t<<default>>\n\t\t\t\t@@.error;Unexpected surface feature character _n : _planet_string[_n].@@\n\t\t<</switch>>\n\t<</for>>\n\n\t/* Native tech level */\n\t<<set $planet.native_tech_level = Number(_strings[1])>>\n\n\t/* Planet name */\n\t<<set $planet.name = decodeURIComponent(_strings[2])>>\n\n\t<<set $hiscore.planet = $planet>>\n<</if>>\n\n/* Landing score */\n<<set $hiscore.score_landing = Number(_strings[3])>>\n\n/* Construction score */\n<<set $hiscore.score_construction = Number(_strings[4])>>\n\n/* Natives result */\n<<set $hiscore.native_relations = Number(_strings[5])>>\n\n/* Technology result */\n<<set $hiscore.final_tech_level = Number(_strings[6])>>\n\n/* Culture result */\n<<set $hiscore.final_culture = Number(_strings[7])>>\n\n/* Scientific database */\n<<set $hiscore.score_scientific_database = Number(_strings[8])>>\n\n/* Cultural database */\n<<set $hiscore.score_cultural_database = Number(_strings[9])>>\n\n\n\n<<calculate_final_score>>\n\n\n/* Display */\n<<starfield>>\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>
/* args[0] should be a hiscore object */\n/* If args[1] is true, display the date, otherwise don't */\n<<widget displayScore>>\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\t\t<tr><td colspan=2>''Score''</td></tr>\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 $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 $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 $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<</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 valuef or 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 capsules. The AI cannot stop it in time to save the colonists without damaging the $system.\n\n<br><br>\n<div id="result-area">\n<<link "Stop the program">>\n\t<<replace "#result-area">>\n\t\t<<randomDamageMedium>>\n\t\t<<damageSystem $system $damage>>\n\t\t<<refreshStatusDisplay>>\n\t\tThe AI frantically purges data from the $system until it has wiped the rogue program and the sleep chambers return to normal.\n\n\t\t<br><br><<continueLink [[MO Done]]>>\n\t<</replace>>\n\t<<fadeIn "#result-area">>\n\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>
\nThe reply comes after a few moments. It is in the same format as the seedship's inter-species greeting, starting with the same prime numbers, but the diagram is changed to depict alien beings and suggest that the object is an exploration probe. There is more to the message that the AI does not understand, but it appears to have established communication.\n\n<br><br>\n\n<div id="result-area2">\n<<link "Transmit scientific information">>\n\t<<replace "#result-area2">>\n\t\tThe AI transmits <<if $system_scientific_database >= 100>>the contents of<<else>>what remains of<</if>> the scientific database to the alien ship.\n\t\t<<if random(0,99) < $system_scientific_database>>\n\t\t\tIt responds almost at once with a similar signal: the alien intelligence must have decoded the seedship's scientific database and replied with scientific information of its own. The AI files this new information away for analysis by the colonists when they awake.\n\t\t\t<<set $system_scientific_database += random(5,25)>>\n\t\t<<else>>\n\t\t\tIt responds with more mathematical pulses. It seems that it either did not understand the seedship's scientific database, or did not find it interesting.\n\t\t<</if>>\n\t\t<br><br>The alien ship appears to have had enough of conversation, and accelerates away again into space.\n\t\t<br><br><<link $continue_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\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_text>><<goto [[MO Done]]>><</link>>\n\t<</replace>>\n\t<<fadeIn "#result-area2">>\n\t<<refreshStatusDisplay>>\n\t<<scrollToResultArea2>>\n<</link>>\n</div>
<<starfield>>\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<tr>\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</tr>\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]]>>