From 96b5ead5178e1a01171b4124415d8cb665ffced3 Mon Sep 17 00:00:00 2001 From: Peter Motschmann Date: Tue, 6 Aug 2024 23:32:45 -0400 Subject: [PATCH] 1.3.13b --- evolve/main.js | 56 +++++++++++++++++++++++----------------------- src/vars.js | 2 +- src/wiki/change.js | 10 +++++++++ wiki/wiki.js | 52 +++++++++++++++++++++--------------------- 4 files changed, 65 insertions(+), 55 deletions(-) diff --git a/evolve/main.js b/evolve/main.js index 3d044aae9..33658687a 100644 --- a/evolve/main.js +++ b/evolve/main.js @@ -1,4 +1,4 @@ -(()=>{var Se=window.localStorage,e={seed:1,warseed:1,resource:{},evolution:{},tech:{},city:{},space:{},interstellar:{},portal:{},tauceti:{},civic:{},race:{},genes:{},blood:{},stats:{start:Date.now(),days:0,tdays:0},event:{t:200,l:!1},m_event:{t:499,l:!1}},Je={},v={c:{},p:{}},Ht={},k={},U={},bt={},we={},pa={},xt=0,Kl=0,Nl=0,Xa={t:0};function Uc(r){xt=r}function xn(r){Kl=r}function kn(r){Nl=r}var mr={},Ca={},rr={view:"all"},Oa=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];Math.rand=function(r,a){return Math.floor(Math.random()*(a-r))+r};e.seed=2;e.warseed=2;function J(r,a,i){a=a||1,r=r||0,e[i?"warseed":"seed"]=(e[i?"warseed":"seed"]*9301+49297)%233280;let s=e[i?"warseed":"seed"]/233280;return r+s*(a-r)}{let r=Se.getItem("evolved")||!1;if(r){let a=JSON.parse(LZString.decompressFromUTF16(r));a?e=a:Hc()}else Hc()}e.version||(e.version="0.2.0");be(e.version)<2060&&Object.keys(e.resource).forEach(function(r){e.resource[r].crates&&(e.resource[r].crates=Math.ceil(e.resource[r].crates/5)),e.resource[r].containers&&(e.resource[r].containers=Math.ceil(e.resource[r].containers/5))});if(be(e.version)<2062&&e.civic.taxes!==void 0)switch(Number(e.civic.taxes.tax_rate)){case 0:e.civic.taxes.tax_rate=0;break;case 1:e.civic.taxes.tax_rate=10;break;case 2:e.civic.taxes.tax_rate=20;break;case 3:e.civic.taxes.tax_rate=30;break;case 4:e.civic.taxes.tax_rate=40;break;case 5:e.civic.taxes.tax_rate=50;break}be(e.version)===2062&&e.civic.taxes!==void 0&&e.civic.taxes.tax_rate==2&&(e.civic.taxes.tax_rate=20);be(e.version)<2065&&e.race!==void 0&&e.race.species==="sporgar"&&(delete e.race.crafty,delete e.race.hydrophilic,e.race.infectious=1,e.race.parasite=1,!e.tech.military&&e.tech.primitive&&e.tech.primitive>=3&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0}));be(e.version)<3002&&e.space&&(e.tech.space&&e.tech.space>=4&&(e.space.living_quarters||(e.space.living_quarters={count:0,on:0}),e.space.garage||(e.space.garage={count:0}),e.space.red_mine||(e.space.red_mine={count:0,on:0}),e.space.fabrication||(e.space.fabrication={count:0,on:0}),e.space.laboratory||(e.space.laboratory={count:0,on:0})),e.tech.space&&e.tech.space>=3&&(e.space.iridium_mine||(e.space.iridium_mine={count:0,on:0}),e.space.helium_mine||(e.space.helium_mine={count:0,on:0})),e.tech.hell&&(e.space.geothermal||(e.space.geothermal={count:0,on:0})));be(e.version)<3004&&e.settings&&e.settings.space&&e.settings.space.belt&&(e.space.space_station={count:0,on:0,support:0,s_max:0});be(e.version)<4001&&e.city&&e.city.factory&&!e.city.factory.Nano&&(e.city.factory.Nano=0);be(e.version)<4003&&e.stats.achieve&&Object.keys(e.stats.achieve).forEach(function(r){e.stats.achieve[r]=1});be(e.version)<4010&&e.stats.achieve&&e.stats.achieve.doomed&&(e.stats.portals=1);be(e.version)<4028&&e.stats.achieve&&e.stats.achieve.genus_demonic&&(e.stats.achieve.biome_hellscape=e.stats.achieve.genus_demonic);if(be(e.version)<4029&&e.race.mutation&&e.race.mutation>0){e.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let r=0;r=3&&(e.tech.wind_plant=1,e.tech.hunting=2);let r=["Human","Humano","Elf","Elfo","Orc","Cath","Wolven","Centaur","Centauro","Kobold","Goblin","Gnome","Ogre","Ogro","Cyclops","Ciclope","Troll","Tortoisan","Gecko","Slitheryn","Arraak","Pterodacti","Dracnid","Ent","Cacti","Sporgar","Shroomi","Mantis","Scorpid","Antid","Sharkin","Octigoran","Balorg","Imp"];for(let a=0;a0){let r=1;e.race.no_trade&&r++,e.race.no_craft&&r++,e.race.no_crispr&&r++,e.race.weak_mastery&&r++,e.stats.achieve.cross={l:r,a:r}}be(e.version)<7e3&&(e.civic.govern||(e.civic.govern={type:"oligarchy",rev:0,fr:0}));if(be(e.version)<7004&&e.queue&&e.queue.queue)for(let r=0;r"u"&&(e.civic.foreign.gov0.anx=!1),typeof e.civic.foreign.gov1.anx>"u"&&(e.civic.foreign.gov1.anx=!1),typeof e.civic.foreign.gov2.anx>"u"&&(e.civic.foreign.gov2.anx=!1),typeof e.civic.foreign.gov0.buy>"u"&&(e.civic.foreign.gov0.buy=!1),typeof e.civic.foreign.gov1.buy>"u"&&(e.civic.foreign.gov1.buy=!1),typeof e.civic.foreign.gov2.buy>"u"&&(e.civic.foreign.gov2.buy=!1));be(e.version)<8e3&&e.settings&&e.settings.hasOwnProperty("tLabels")&&delete e.settings.tLabels;be(e.version)<8003&&e.stats.harmony&&e.stats.harmony>0&&(e.stats.harmony=parseFloat(e.stats.harmony.toFixed(2)),e.race.Harmony.count=parseFloat(e.race.Harmony.count.toFixed(2)));be(e.version)<8017&&e.city.garrison&&(e.city.garrison.on=e.city.garrison.count);be(e.version)<9e3&&e.settings&&e.settings.showCity&&(e.settings.showCiv=e.settings.showCity);be(e.version)<9005&&e.race.hasOwnProperty("terrifying")&&e.tech.hasOwnProperty("gambling")&&!e.space.hasOwnProperty("spc_casino")&&(e.space.spc_casino={count:0,on:0});be(e.version)<9009&&e.genes.hasOwnProperty("ancients")&&e.genes.ancients>=3&&(e.genes.ancients===4?e.genes.ancients=5:e.race.Plasmid.count+=300);be(e.version)<9010&&(["species","gods","old_gods"].forEach(r=>{e.race[r]==="orge"&&(e.race[r]="ogre")}),e.stats.hasOwnProperty("achieve")&&e.stats.achieve.hasOwnProperty("extinct_orge")&&(e.stats.achieve.extinct_ogre=e.stats.achieve.extinct_orge,delete e.stats.achieve.extinct_orge),e.resource.hasOwnProperty("orge")&&(e.resource.ogre=e.resource.orge,delete e.resource.orge),e.city&&e.city.factory&&!e.city.factory.Furs&&(e.city.factory.Furs=0));be(e.version)<9014&&(["seraph","unicorn","custom"].forEach(r=>{e.race.species===r&&(r==="custom"&&e.hasOwnProperty("custom")&&e.custom.race0.genus==="angelic"||r!=="custom")&&(e.race.holy=1)}),e.hasOwnProperty("arpa")&&e.arpa.hasOwnProperty("sequence")&&(e.arpa.sequence.labs=0));be(e.version)<1e5&&(delete e.city.lumber,delete e.city.stone,e.stats.dark=0,e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.city.hasOwnProperty("smelter")&&(e.city.smelter.hasOwnProperty("Star")||(e.city.smelter.Star=0),e.city.smelter.hasOwnProperty("StarCap")||(e.city.smelter.StarCap=0),e.city.smelter.hasOwnProperty("Inferno")||(e.city.smelter.Inferno=0)),e.hasOwnProperty("warseed")||(e.warseed=e.seed+1,Math.war=e.hasOwnProperty("warseed")?e.warseed:e.seed),e.portal.hasOwnProperty("bireme")&&(e.portal.bireme.crew=0,e.portal.bireme.mil=0),e.portal.hasOwnProperty("transport")&&(e.portal.transport.crew=0,e.portal.transport.mil=0,e.portal.transport.cargo||(e.portal.transport.cargo={used:0,max:0,Crystal:0,Lumber:0,Stone:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0})),e.hasOwnProperty("settings")&&e.settings.portal&&e.settings.portal.spire&&!e.portal.hasOwnProperty("purifier")&&(e.settings.portal.spire=!1),e.portal.hasOwnProperty("mechbay")&&!Array.isArray(e.portal.mechbay.mechs)&&(e.portal.mechbay.mechs=[]),e.portal.transport&&e.portal.transport.count>=1&&!e.tech.hell_spire&&(e.tech.hell_spire=1,e.settings.portal.spire=!0,e.settings.showCargo=!0,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0}),e.tech.hasOwnProperty("waygate")&&!e.portal.hasOwnProperty("waygate")&&delete e.tech.waygate,e.hasOwnProperty("blood")||(e.blood={}));be(e.version)<100013&&e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("showPowerGrid")&&e.hasOwnProperty("race")&&e.race.infiltrator&&e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2&&(e.settings.showPowerGrid=!0);if(be(e.version)<100014&&(e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.race.casting&&e.race.evil&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0),e.queue&&e.queue.queue))for(let r=0;r=2,events:!0,major_events:!0,minor_events:!0,achievements:e.stats.achieve&&Object.keys(e.stats.achieve).length>0||e.stats.feat&&Object.keys(e.stats.feat).length>0,hell:e.settings.showPortal||e.stats.blackhole||e.stats.ascend||e.stats.descend}),e.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach(function(r){e.tech.hasOwnProperty(r)&&(e.race.inflation+=e.tech[r]*10)}));be(e.version)<101012&&e.civic.garrison&&(e.civic.garrison.rate=0);if(be(e.version)<101014&&(e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("msgFilters")&&Object.keys(e.settings.msgFilters).forEach(function(r){e.settings.msgFilters[r]={unlocked:!!e.settings.msgFilters[r],vis:!!e.settings.msgFilters[r],max:60,save:3}}),e.hasOwnProperty("lastMsg")&&e.lastMsg)){let r={};Oa.forEach(function(a){r[a]=[]}),e.lastMsg.forEach(function(a){a.t?a.t.forEach(function(i){r[i].push({m:a.m,c:a.c})}):r.all.push({m:a.m,c:a.c})}),e.lastMsg=r}be(e.version)<=101014&&!e.revision&&e.race.cataclysm&&e.race.universe&&e.race.universe==="magic"&&e.tech.magic&&e.tech.magic>=2&&(e.space.pylon={count:0});be(e.version)<101015&&e.hasOwnProperty("special")&&e.special.hasOwnProperty("trick")&&(e.special.trick[2020]=JSON.parse(JSON.stringify(e.special.trick)),delete e.special.trick.trick1,delete e.special.trick.trick2,delete e.special.trick.trick3,delete e.special.trick.trick4,delete e.special.trick.trick5,delete e.special.trick.trick6,delete e.special.trick.trick7,delete e.special.trick.trick8,delete e.special.trick.trick9,delete e.special.trick.trick10,delete e.special.trick.trick11,delete e.special.trick.trick12);be(e.version)<102e3&&(e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("fortress")&&!e.portal.fortress.hasOwnProperty("nocrew")&&(e.portal.fortress.nocrew=!1),e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("Iridium")&&(e.city.smelter.Iridium=0),e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("mechbay")&&!e.portal.mechbay.hasOwnProperty("active")&&(e.portal.mechbay.active=0,e.portal.mechbay.scouts=0));be(e.version)<102001&&(e.race.blood_thirst&&e.race.blood_thirst>3&&(e.race.blood_thirst=1),e.race.rainbow&&e.race.rainbow>3&&(e.race.rainbow=1));be(e.version)<102005&&!e.stats.cores&&e.race.hasOwnProperty("AICore")&&(e.stats.cores=e.race.AICore.count);be(e.version)<102006&&e.race.artifical&&(e.race.calm&&(e.resource.hasOwnProperty("Zen")&&(e.resource.Zen.display=!0),e.city.meditation={count:0}),e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}));be(e.version)<102007&&e.stats.hasOwnProperty("achieve")&&delete e.stats.achieve.extinct_sludge;be(e.version)<102012&&(e.city.hasOwnProperty("ptrait")&&(e.city.ptrait=e.city.ptrait==="none"?[]:[e.city.ptrait]),e.tech.hell_ruins&&e.tech.hell_ruins>=3&&(e.tech.hell_vault=1));if(be(e.version)<102015){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r in e.race.governor.tasks)e.race.governor.tasks[r]==="asssemble"&&(e.race.governor.tasks[r]="assemble");e.settings&&e.settings.hasOwnProperty("restoreCheck")&&delete e.settings.restoreCheck}be(e.version)<102017&&(e.portal.hasOwnProperty("fortress")&&(e.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}},period:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}}},graphID:0,graphs:{}}),e.tech.hasOwnProperty("genetics")&&e.tech.genetics>1&&e.hasOwnProperty("arpa")&&(e.arpa.hasOwnProperty("sequence")||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),e.arpa.sequence.boost||(e.arpa.sequence.boost=!1),e.arpa.sequence.auto||(e.arpa.sequence.auto=!1),e.arpa.sequence.labs||(e.arpa.sequence.labs=0)));if(be(e.version)<102021&&e.hasOwnProperty("custom")&&!e.custom.hasOwnProperty("race0")){let r=e.race.hasOwnProperty("species")?e.race.species:"protoplasm";e.galaxy.hasOwnProperty("alien1")&&e.galaxy.alien1.id==="custom"&&(e.galaxy.alien1.id=r==="human"?"elven":"human"),e.galaxy.hasOwnProperty("alien2")&&e.galaxy.alien2.id==="custom"&&(e.galaxy.alien2.id=r==="orc"||e.galaxy.alien1.id==="orc"?"cath":"orc")}be(e.version)<103e3&&(e.hasOwnProperty("tauceti")||(e.tauceti={}),e.race.species==="protoplasm"&&(e.evolution.hasOwnProperty("sexual_reproduction")&&(e.tech.evo=e.evolution.sexual_reproduction.count>0?2:1,delete e.evolution.sexual_reproduction),[["phagocytosis",{evo:3,evo_animal:1}],["chloroplasts",{evo:3,evo_plant:1}],["chitin",{evo:3,evo_fungi:1}],["exterminate",{evo:7,evo_synthetic:2}],["multicellular",{evo:4}],["spores",{evo:5}],["poikilohydric",{evo:5}],["bilateral_symmetry",{evo:5,evo_insectoid:1,evo_mammals:1,evo_eggshell:1,evo_aquatic:1,evo_fey:1,evo_sand:1,evo_heat:1,evo_polar:1}],["bryophyte",{evo:7}],["athropods",{evo:7,evo_insectoid:2}],["mammals",{evo:6,evo_humanoid:1,evo_giant:1,evo_small:1,evo_animalism:1,evo_demonic:1,evo_angelic:1}],["humanoid",{evo:7,evo_humanoid:2}],["gigantism",{evo:7,evo_giant:2}],["dwarfism",{evo:7,evo_small:2}],["animalism",{evo:7,evo_animalism:2}],["carnivore",{evo_animalism:3,evo_carnivore:2}],["herbivore",{evo_animalism:3,evo_herbivore:2}],["omnivore",{evo_animalism:3,evo_omnivore:2}],["celestial",{evo:7,evo_angelic:2}],["demonic",{evo:7,evo_demonic:2}],["aquatic",{evo:7,evo_aquatic:2}],["fey",{evo:7,evo_fey:2}],["heat",{evo:7,evo_heat:2}],["polar",{evo:7,evo_polar:2}],["sand",{evo:7,evo_sand:2}],["eggshell",{evo:6,evo_eggshell:2}],["endothermic",{evo:7,evo_avian:2}],["ectothermic",{evo:7,evo_reptilian:2}],["bunker",{evo_challenge:1}]].forEach(function(r){if(e.evolution.hasOwnProperty(r[0])&&e.evolution[r[0]].count>0)for(let[a,i]of Object.entries(r[1]))e.tech[a]=i;delete e.evolution[r[0]]}),e.evolution.mloaded=1,e.evolution.gmloaded=1));be(e.version)<103001&&(e.hasOwnProperty("prestige")||(e.prestige={}),e.race.Plasmid&&e.race.Plasmid.hasOwnProperty("anti")&&(e.prestige.AntiPlasmid={count:e.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach(function(r){e.race.hasOwnProperty(r)&&(e.prestige[r]={count:e.race[r].count},delete e.race[r])}),["Artifact","Blood_Stone"].forEach(function(r){e.resource.hasOwnProperty(r)&&(e.prestige[r]={count:e.resource[r].amount},delete e.resource[r])}),!e.stats.hasOwnProperty("synth")&&e.race.hasOwnProperty("srace")&&(e.stats.synth={},e.stats.synth[e.race.srace]=!0),e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("config")&&e.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach(function(r){e.race.governor.config.trash.hasOwnProperty(r)&&typeof e.race.governor.config.trash[r]=="number"&&(e.race.governor.config.trash[r]={v:e.race.governor.config.trash[r],s:!0})}));be(e.version)<103002&&e.portal.hasOwnProperty("observe")&&e.portal.observe.hasOwnProperty("stats")&&(e.portal.observe.stats.period.gems.surveyors=0,e.portal.observe.stats.total.gems.surveyors=0);be(e.version)<103011&&e.city.hasOwnProperty("slave_pen")&&e.city.slave_pen.hasOwnProperty("slaves")&&(e.resource.Slave.amount=e.city.slave_pen.slaves,delete e.city.slave_pen.slaves);be(e.version)<103014&&(e.race.cataclysm&&(e.civic.craftsman.display=!0),e.race.lone_survivor&&(e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0||e.tauceti.womling_station&&e.tauceti.womling_station.count>0)&&(e.civic.craftsman.display=!0));e.version="1.3.13";e.revision="a";delete e.beta;e.hasOwnProperty("prestige")||(e.prestige={});["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(r){e.prestige.hasOwnProperty(r)||(e.prestige[r]={count:0})});e.hasOwnProperty("power")||(e.power=[]);e.hasOwnProperty("support")||(e.support={});["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach(function(r){e.support.hasOwnProperty(r)||(e.support[r]=[])});e.civic.cement_worker&&e.civic.cement_worker.impact===.25&&(e.civic.cement_worker.impact=.4);e.settings||(e.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"});e.settings.space||(e.settings.space={});e.settings.space.hasOwnProperty("home")||(e.settings.space.home=!0);Wc(!1);e.settings.icon||(e.settings.icon="star");e.settings.showResources||(e.settings.showResources=e.settings.showMarket);e.settings.showStorage||(e.city.warehouse||e.city.storage_yard?e.settings.showStorage=!0:e.settings.showStorage=!1);e.settings.hasOwnProperty("touch")||(e.settings.touch=!1);e.settings.hasOwnProperty("lowPowerBalance")||(e.settings.lowPowerBalance=!1);e.queue||(e.queue={display:!1,queue:[]});e.r_queue||(e.r_queue={display:!1,queue:[]});e.queue.rename||(e.queue.rename=!1);e.queue.max||(e.queue.max=0);e.r_queue.max||(e.r_queue.max=0);e.queue.pause||(e.queue.pause=!1);e.r_queue.pause||(e.r_queue.pause=!1);e.lastMsg||(e.lastMsg={});e.settings.msgFilters||(e.settings.msgFilters={});["all","progress","events","major_events","minor_events"].forEach(function(r){e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!0,vis:!0,max:60,save:3})});Oa.forEach(function(r){e.lastMsg[r]||(e.lastMsg[r]=[]),e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!1,vis:!1,max:60,save:3})});e.settings.msgQueueHeight||(e.settings.msgQueueHeight=$("#msgQueue").outerHeight(),e.settings.buildQueueHeight=$("#buildQueue").outerHeight());e.space||(e.space={});e.starDock||(e.starDock={});e.interstellar||(e.interstellar={});e.galaxy||(e.galaxy={});e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Bolognium&&(e.interstellar.mass_ejector.Bolognium=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Vitreloy&&(e.interstellar.mass_ejector.Vitreloy=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Orichalcum&&(e.interstellar.mass_ejector.Orichalcum=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Nanoweave&&(e.interstellar.mass_ejector.Nanoweave=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Scarletite&&(e.interstellar.mass_ejector.Scarletite=0);e.hasOwnProperty("pillars")||(e.pillars={});e.settings.space.alpha||(e.settings.space.alpha=!1,e.settings.space.proxima=!1,e.settings.space.nebula=!1,e.settings.space.neutron=!1,e.settings.space.blackhole=!1);e.settings.showAchieve||(e.settings.showAchieve=!1);e.settings.locale||(e.settings.locale="en-US");typeof e.settings.pause>"u"&&(e.settings.pause=!1);typeof e.settings.mKeys>"u"&&(e.settings.mKeys=!0);typeof e.settings.keyMap>"u"&&(e.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"});typeof e.settings.keyMap.showCiv>"u"&&(e.settings.keyMap.showCiv="1",e.settings.keyMap.showCivic="2",e.settings.keyMap.showResearch="3",e.settings.keyMap.showResources="4",e.settings.keyMap.showGenetics="5",e.settings.keyMap.showAchieve="6",e.settings.keyMap.settings="7");delete e.settings.keyMap.d;typeof e.settings.qAny>"u"&&(e.settings.qAny=!1);typeof e.settings.sPackOn>"u"&&(e.settings.sPackOn=!0);typeof e.settings.qAny_res>"u"&&(e.settings.qAny_res=!1);typeof e.settings.sPackMsg>"u"&&(e.settings.sPackMsg=!1);typeof e.settings.expose>"u"&&(e.settings.expose=!1);typeof e.settings.alwaysPower>"u"&&(e.settings.alwaysPower=!1);typeof e.settings.tabLoad>"u"&&(e.settings.tabLoad=!1);typeof e.settings.boring>"u"&&(e.settings.boring=!1);e.settings.hasOwnProperty("mtorder")||(e.settings.mtorder=[]);function qn(){["reset","plasmid","antiplasmid","universes","phage","starved","tstarved","died","tdied","sac","tsac","know","tknow","portals","dkills","attacks","cfood","tfood","cstone","tstone","clumber","tlumber","mad","bioseed","cataclysm","blackhole","ascend","descend","terraform","aiappoc","matrix","retire","eden","geck","dark","harmony","blood","cores","artifact","cattle","tcattle","murders","tmurders","psykill","tpsykill"].forEach(function(r){e.stats.hasOwnProperty(r)||(e.stats[r]=0)}),e.stats.achieve||(e.stats.achieve={}),e.stats.feat||(e.stats.feat={}),e.stats.hasOwnProperty("womling")||(e.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),e.stats.spire||(e.stats.spire={}),e.stats.synth||(e.stats.synth={}),e.stats.hasOwnProperty("banana")||(e.stats.banana={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}}),e.stats.hasOwnProperty("endless_hunger")||(e.stats.endless_hunger={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}})}qn();e.race.seeded||(e.race.seeded=!1);e.race.deterioration||(e.race.deterioration=0);e.race.gene_fortify||(e.race.gene_fortify=0);e.race.old_gods||(e.race.old_gods="none");e.race.universe||(e.race.universe="standard");e.genes.minor||(e.genes.minor={});e.race.minor||(e.race.minor={});e.hasOwnProperty("govern")||(e.govern={governor:{},candidate:[],policy:{}});e.settings.hasOwnProperty("showMil")||(e.settings.showMil=!0);e.settings.hasOwnProperty("showPowerGrid")||(e.settings.showPowerGrid=!!(e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2));e.settings.affix||(e.settings.affix="si");e.special||(e.special={});e.special.gift||(e.special.gift={});e.special.hasOwnProperty("egg")||(e.special.egg={});e.special.hasOwnProperty("trick")||(e.special.trick={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,trick8:!1,trick9:!1,trick10:!1,trick11:!1,trick12:!1});e.civic.govern||(e.civic.govern={type:"oligarchy",rev:2e3,fr:0});e.civic.govern.fr=0;e.hasOwnProperty("custom")||(e.custom={});e.custom.hasOwnProperty("planet")&&e.custom.planet.hasOwnProperty("biome")&&delete e.custom.planet;e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("cap")&&(e.city.smelter.cap=0);e.civic.homeless||(e.civic.homeless=0);e.civic.foreign||(e.civic.foreign={gov0:{unrest:0,hstl:100,mil:100,eco:75,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:0,mil:150,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:50,mil:250,eco:150,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}});typeof e.civic.foreign.gov0.trn>"u"&&(e.civic.foreign.gov0.trn=0,e.civic.foreign.gov1.trn=0,e.civic.foreign.gov2.trn=0,e.civic.foreign.gov0.sab=0,e.civic.foreign.gov1.sab=0,e.civic.foreign.gov2.sab=0,e.civic.foreign.gov0.act="none",e.civic.foreign.gov1.act="none",e.civic.foreign.gov2.act="none");typeof e.civic.foreign.gov0.name<"u"&&e.civic.foreign.gov0.name.s1==="evo_organism_title"&&(e.civic.foreign.gov0.name.s1="Northern");typeof e.civic.foreign.gov1.name<"u"&&e.civic.foreign.gov1.name.s1==="evo_organism_title"&&(e.civic.foreign.gov1.name.s1="Southern");typeof e.civic.foreign.gov2.name<"u"&&e.civic.foreign.gov2.name.s1==="evo_organism_title"&&(e.civic.foreign.gov2.name.s1="Divine");if(!e.race.evil&&e.race.immoral&&e.race!==void 0&&e.race.species!=="wendigo")delete e.race.immoral;else if(e.race!==void 0&&e.race.species==="wendigo"){let r=new Date;e.settings.hasOwnProperty("boring")&&!e.settings.boring&&r.getMonth()===11&&r.getDate()>=17&&(e.race.immoral=3)}if(e.hasOwnProperty("special")&&e.special.hasOwnProperty("gift")){let r=new Date(e.stats.start),a=new Date;Object.keys(e.special.gift).forEach(function(i){let s=Number(i.substring(1,5));(s=1?e.civic.d_job="farmer":e.civic.d_job="unemployed");e.settings.animated=!0;e.settings.disableReset=!1;e.arpa&&e.arpa.launch_facility&&e.arpa.launch_facility.rank>0&&!e.tech.space&&(e.tech.space=1);function Hc(){e.race={species:"protoplasm",gods:"none",old_gods:"none",seeded:!1},e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.new=!0}var kr={x10:!1,x25:!1,x100:!1,q:!1};function fe(){let r=1;return e.settings.mKeys&&(kr.x10&&(r*=10),kr.x25&&(r*=25),kr.x100&&(r*=100)),r}function be(r){let a=r.split(".",3);return a[0]*=1e5,a[1]*=1e3,Number(a[0])+Number(a[1])+Number(a[2])}function Ti(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let r=$("#buildQueue").detach();r.addClass("right"),r.removeClass("has-text-info");let a=$("#msgQueue").detach();a.addClass("right"),a.removeClass("has-text-info"),a.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(r),$("#queueColumn").append(a),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let r=$("#buildQueue").detach();r.removeClass("right"),r.addClass("has-text-info");let a=$("#msgQueue").detach();a.removeClass("right"),a.addClass("has-text-info"),a.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(r),$("#sideQueue").append(a),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var Ya={si:["K","M","G","T","P","E","Z","Y"],sci:["e3","e6","e9","e12","e15","e18","e21","e24"],sln:["K","M","B","t","q","Q","s","S"]};function Ee(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=Ya[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=Ya[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=Ya[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=Ya[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=Ya[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=Ya[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=Ya[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=Ya[e.settings.affix][7],s=i?+(r/1e24).toFixed(1):Math.floor(r/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+n}$(window).resize(function(){Ti()});function ss(r,a){var i=document.createElement("div"),s="speak-"+Date.now();i.setAttribute("id",s),i.setAttribute("aria-live",a||"polite"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout(function(){document.getElementById(s).innerHTML=r},100),window.setTimeout(function(){document.body.removeChild(document.getElementById(s))},1e3)}window.soft_reset=function(a){try{a=a&&a==="replicator"?"replicator":"soft",gtag("event","reset",{end:a})}catch{}a||Kr();let i=e.race.hasOwnProperty("srace")?e.race.srace:!1,s=e.race.hasOwnProperty("geck")?e.race.geck:0;e.race.hasOwnProperty("gecked")&&(s+=e.race.gecked,e.stats.geck-=e.race.gecked);let n={species:"protoplasm",universe:e.race.universe,seeded:e.race.seeded,probes:e.race.probes,seed:e.race.seed,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:e.race.hasOwnProperty("rejuvenated")?e.race.rejuvenated:!1};s>0&&(n.geck=s),i&&(n.srace=i),e.race.bigbang&&(n.bigbang=!0),e.race.gods&&(n.gods=e.race.gods),e.race.old_gods&&(n.old_gods=e.race.old_gods),e.race.rapid_mutation&&e.race.rapid_mutation>0&&(n.rapid_mutation=e.race.rapid_mutation),e.race.ancient_ruins&&e.race.ancient_ruins>0&&(n.ancient_ruins=e.race.ancient_ruins),e.race.bigbang&&(n.universe="bigbang"),e.race.hasOwnProperty("corruption")&&(n.corruption=e.race.corruption),e.race=n;let c=e.city.calendar.orbit,l=e.city.biome,o=e.city.ptrait,d=e.city.geology;e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:l,ptrait:o,geology:d},e.tech.theology&&e.tech.theology>=1?e.tech={theology:1}:e.tech={},Mn(),e.new=!0,e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.stats.current=Date.now(),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()};var Pe={w:!1,s:!1,mt:250},Ka={};function Kr(){Oa.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Wc(r){let a={base:["showCiv","showCity","showIndustry","showPowerGrid","showMechLab","showShipYard","showResearch","showCivic","showMil","showResources","showMarket","showStorage","showGenetics","showSpace","showDeep","showGalactic","showPortal","showOuter","showTau","showEjector","showCargo","showAlchemy","showGovernor","arpa","showPsychic"],space:["moon","red","hell","sun","gas","gas_moon","belt","dwarf","alpha","proxima","nebula","neutron","blackhole","sirius","stargate","gateway","gorddon","alien1","alien2","chthonian","titan","enceladus","triton","eris","kuiper"],portal:["fortress","badlands","pit","ruins","gate","lake","spire"],tau:["home","red","roid","gas","gas2","star"]};Object.keys(a).forEach(function(i){i==="base"?a[i].forEach(function(s){(!e.settings.hasOwnProperty(s)||r)&&(e.settings[s]=!1)}):(e.settings.hasOwnProperty(i)||(e.settings[i]={}),a[i].forEach(function(s){(!e.settings[i].hasOwnProperty(s)||r)&&(e.settings[i][s]=!1)}))}),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach(function(i){(!e.settings.hasOwnProperty(i)||r)&&(e.settings[i]=0)})}function Mn(){Pe.w&&Pe.w.terminate(),e.queue={display:!1,queue:[]},e.r_queue={display:!1,queue:[]},e.space={},e.interstellar={},e.galaxy={},e.portal={},e.starDock={},e.tauceti={},e.civic={new:0},e.civic.foreign={gov0:{unrest:0,hstl:Math.floor(J(80,100)),mil:Math.floor(J(75,125)),eco:Math.floor(J(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(J(0,20)),mil:Math.floor(J(125,175)),eco:Math.floor(J(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(J(40,60)),mil:Math.floor(J(200,300)),eco:Math.floor(J(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},e.genes.blood||(e.prestige.Blood_Stone.count=0),e.resource={},e.evolution={},e.event={t:100,l:!1},e.m_event={t:499,l:!1},e.stats.days=0,e.stats.know=0,e.stats.starved=0,e.stats.died=0,e.stats.attacks=0,e.stats.dkills=0,e.stats.cfood=0,e.stats.cstone=0,e.stats.clumber=0,e.stats.sac=0,e.stats.cattle=0,e.stats.murders=0,e.settings.at=0,e.settings.showEvolve=!0,e.settings.space.home=!0,Wc(!0),e.settings.disableReset=!1,e.settings.pause=!1,e.arpa={},delete e.race.hrt,e.genes.queue&&(e.tech.queue=1,e.queue.display=!0)}window.reset=function(){try{gtag("event","reset",{end:"hard"})}catch{}localStorage.removeItem("evolved"),e=null,Pe.w&&Pe.w.terminate(),window.location.reload()};var Pn;Dl(e.settings.locale);function t(r,a){let i=Pn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Pn)),r;if(a)if(a instanceof Array){for(let c=0;c{a=s}),r!="en-US"){let s;try{$.getJSON(`strings/strings.${r}.json`,c=>{s=c})}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error(`string.${r}.json has extra keys.`)}let i=Se.getItem("string_pack")||!1;if(i&&e.settings.sPackOn){let s;try{s=JSON.parse(LZString.decompressFromUTF16(i))}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),Pn=a}var ns={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Portugu\xEAs (BR)","de-DE":"Deutsch","it-IT":"Italiano","ru-RU":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","cs-CZ":"\u010Ce\u0161tina","pl-PL":"Polski","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","ko-KR":"\uD55C\uAD6D\uC5B4","im-PL":"Igpay-Atinlay"};var Na={soldier:{name:t("governor_soldier"),desc:t("governor_soldier_desc"),title:[t("governor_soldier_t1"),t("governor_soldier_t2"),t("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:t("governor_criminal"),desc:t("governor_criminal_desc"),title:[t("governor_criminal_t1"),t("governor_criminal_t2"),{m:t("governor_criminal_t3m"),f:t("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:t("governor_entrepreneur"),desc:t("governor_entrepreneur_desc"),title:[t("governor_entrepreneur_t1"),t("governor_entrepreneur_t2"),{m:t("governor_entrepreneur_t3m"),f:t("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:t("governor_educator"),desc:t("governor_educator_desc"),title:[t("governor_educator_t1"),t("governor_educator_t2"),t("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:t("governor_spiritual"),desc:t("governor_spiritual_desc"),title:[t("governor_spiritual_t1"),t("governor_spiritual_t2"),t("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:t("governor_bluecollar"),desc:t("governor_bluecollar_desc"),title:[{m:t("governor_bluecollar_t1m"),f:t("governor_bluecollar_t1f")},t("governor_bluecollar_t2"),{m:t("governor_bluecollar_t3m"),f:t("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:t("governor_noble"),desc:t("governor_noble_desc"),title:[{m:t("governor_noble_t1m"),f:t("governor_noble_t1f")},{m:t("governor_noble_t2m"),f:t("governor_noble_t2f")},{m:t("governor_noble_t3m"),f:t("governor_noble_t3f")},{m:t("governor_noble_t4m"),f:t("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:t("governor_media"),desc:t("governor_media_desc"),title:[t("governor_media_t1"),{m:t("governor_media_t2m"),f:t("governor_media_t2f")},t("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:t("governor_sports"),desc:t("governor_sports_desc"),title:[t("governor_sports_t1"),t("governor_sports_t2"),t("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:t("governor_bureaucrat"),desc:t("governor_bureaucrat_desc"),title:[t("governor_bureaucrat_t1"),{m:t("governor_bureaucrat_t2m"),f:t("governor_bureaucrat_t2f")},t("governor_bureaucrat_t3")],traits:{organizer:1}}},cs={tactician:{name:t("gov_trait_tactician"),effect(){return t("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars(){return[25]}},militant:{name:t("gov_trait_militant"),effect(){return t("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[25,10]}},noquestions:{name:t("gov_trait_noquestions"),effect(){return t("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars(){return[.005]}},racketeer:{name:t("gov_trait_racketeer"),effect(){return t("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[20,35]}},dealmaker:{name:t("gov_trait_dealmaker"),effect(){return t("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars(){return[125]}},risktaker:{name:t("gov_trait_risktaker"),effect(){return t("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars(){return[12]}},teacher:{name:t("gov_trait_teacher"),effect(){return t("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars(){return[6]}},theorist:{name:t("gov_trait_theorist"),effect(){return t("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,4]}},inspirational:{name:t("gov_trait_inspirational"),effect(){return t("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars(){return[20]}},pious:{name:t("gov_trait_pious"),effect(){let r=$(this)[0].vars()[1],a=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1;return r=(e.civic.govern.type==="corpocracy"?r*2:r)*a,t("gov_trait_pious_effect",[$(this)[0].vars()[0],r])},vars(){return[10,5]}},pragmatist:{name:t("gov_trait_pragmatist"),effect(){return t("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,2]}},dirty_jobs:{name:t("gov_trait_dirty_jobs"),effect(){return t("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[.015,1,10]}},extravagant:{name:t("gov_trait_extravagant"),effect(){return t("gov_trait_extravagant_effect",[$(this)[0].vars()[0],St("large",!0),$(this)[0].vars()[1],N($(this)[0].vars()[2]+5)])},vars(){return[10,1.25,1]}},aristocrat:{name:t("gov_trait_aristocrat"),effect(){return t("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[50,20,10]}},gaslighter:{name:t("gov_trait_gaslighter"),effect(){return t("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],dr(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[1,1,.5]}},muckraker:{name:t("gov_trait_muckraker"),effect(){return t("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[8,12,3]}},athleticism:{name:t("gov_trait_athleticism"),effect(){return t("gov_trait_athleticism_effect",[$(this)[0].vars()[0],N($(this)[0].vars()[1]),$(this)[0].vars()[2],dr()])},vars(){return[1.5,2,4]}},nopain:{name:t("gov_trait_nopain"),effect(){return t("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,10]}},organizer:{name:t("gov_trait_organizer"),effect(){return t("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars(){return[e.genes.governor&&e.genes.governor>=2?2:1]}}},Qc={humanoid:["Sanders","Smith","Geddon","Burgundy","Cristo","Crunch","Berg","Morros","Bower","Maximus"],carnivore:["Instinct","Prowl","Paws","Fluffy","Snarl","Claws","Fang","Stalker","Pounce","Sniff"],herbivore:["Sense","Grazer","Paws","Fluffy","Fern","Claws","Fang","Grass","Stampy","Sniff"],omnivore:["Pelt","Munchy","Paws","Fluffy","Snarl","Claws","Fang","Skavers","Pounce","Sniff"],small:["Bahgins","Banks","Shorty","Parte","Underfoot","Shrimp","Finkle","Littlefoot","Cub","Runt"],giant:["Slender","Titan","Colossus","Bean","Tower","Cloud","Bigfoot","Mountain","Crusher","Megaton"],reptilian:["Scale","Chimera","Ecto","Bask","Forks","Croc","Slither","Sunny","Coldfoot","Webtoe"],avian:["Sparrow","Soar","Shiney","Raven","Squaks","Eddy","Breeze","Flap","Kettle","Flock"],insectoid:["Compound","Centi","Hiver","Buzz","Carpace","Swarm","Devour","Carpi","Chitter","Burrow"],plant:["Grover","Blossom","Leaf","Sapper","Stem","Seed","Sprout","Greensly","Root","Fruit"],fungi:["Detritus","Psychedelic","Cap","Rotface","Patch","Spore","Infecto","Filament","Symbiote","Shade"],aquatic:["Seawolf","Finsley","Inko","Sucker","McBoatFace","Wave","Riptide","Shell","Coral","Pearl"],fey:["Whisper","Prank","Mischief","Flutter","Nature","Dirt","Story","Booker","Tales","Spirit"],heat:["Ash","Magnus","Pumice","Vulcano","Sweat","Flame","Lava","Ember","Smoke","Tinder","Spark"],polar:["Frosty","Snowball","Flake","Chiller","Frost","Cooler","Icecube","Arctic","Tundra","Avalanche"],sand:["Dune","Oasis","Sarlac","Spice","Quick","Grain","Spike","Storm","Glass","Castle"],demonic:["Yekun","Kesabel","Gadreel","Penemue","Abaddon","Azazyel","Leviathan","Samyaza","Kasyade","Typhon"],angelic:["Lightbringer","Illuminous","Sparks","Chrub","Halo","Star","Pompous","Radiant","Fluffy","Fabio"],synthetic:["HK47","D2R2","Bishop","Wally","Number5","Sunny","Data","Beta","Dot","Motoko"],eldritch:["Tentacle","Faceless","Horror","Darkness","Void","Dreamer","Mindflayer","Whisper","Paranoia","Empty"]};function Vc(r){let a=[],i=F[e.race.species].type,s=Object.keys(Na),n=JSON.parse(JSON.stringify(Qc[i]));r=r||s.length;for(let c=0;c=2&&(r.push(r.length),ge("organizer",0)&&r.push(r.length)),ge("organizer",0)&&r.push(r.length),r.forEach(function(a){_a[e.race.governor.tasks[`t${a}`]]&&_a[e.race.governor.tasks[`t${a}`]].req()&&_a[e.race.governor.tasks[`t${a}`]].task()})}}function Ot(){!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0)||e.genes.governor&&e.tech.governor&&(le($("#r_govern1")),e.race.hasOwnProperty("governor")&&!e.race.governor.hasOwnProperty("candidates")?Gl():Rl())}function zs(){Object.keys(e.civic.foreign).forEach(function(r){let a=$(`#spyopConfig${r}`)[0];if(a){let i=Sortable.get(a);i&&i.destroy()}})}function Bl(r){let a=$(`#spyopConfig${r}`)[0];a&&Sortable.create(a,{onEnd(i){let s=e.race.governor.config.spyop[r];s.splice(i.newDraggableIndex,0,s.splice(i.oldDraggableIndex,1)[0]),e.race.governor.config.spyop[r]=s,Ot()}})}function Gl(){zs();let r=$('
');$("#r_govern1").append(r);let a=$('
');r.append(a);let i=$("
");i.append($(`
${t("governor_office",[e.race.governor.g.n])}
`)),i.append($(`
${t("governor_background")}: ${Na[e.race.governor.g.bg].name}
`)),a.append(i),a.append($(`
${t("governor_fire")}
`));let s=[0,1,2];e.genes.governor&&e.genes.governor>=2&&(s.push(s.length),ge("organizer",0)&&s.push(s.length)),ge("organizer",0)&&s.push(s.length),s.forEach(function(c){let l=`{{ 'none' | label }}`;Object.keys(_a).forEach(function(o){_a[o].req()&&(l+=`{{ '${o}' | label }}`)}),r.append(`
${t("gov_task",[c+1])} +(()=>{var Se=window.localStorage,e={seed:1,warseed:1,resource:{},evolution:{},tech:{},city:{},space:{},interstellar:{},portal:{},tauceti:{},civic:{},race:{},genes:{},blood:{},stats:{start:Date.now(),days:0,tdays:0},event:{t:200,l:!1},m_event:{t:499,l:!1}},Je={},v={c:{},p:{}},Ht={},k={},U={},bt={},we={},pa={},xt=0,Kl=0,Nl=0,Xa={t:0};function Uc(r){xt=r}function xn(r){Kl=r}function kn(r){Nl=r}var mr={},Ca={},rr={view:"all"},Oa=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];Math.rand=function(r,a){return Math.floor(Math.random()*(a-r))+r};e.seed=2;e.warseed=2;function J(r,a,i){a=a||1,r=r||0,e[i?"warseed":"seed"]=(e[i?"warseed":"seed"]*9301+49297)%233280;let s=e[i?"warseed":"seed"]/233280;return r+s*(a-r)}{let r=Se.getItem("evolved")||!1;if(r){let a=JSON.parse(LZString.decompressFromUTF16(r));a?e=a:Hc()}else Hc()}e.version||(e.version="0.2.0");be(e.version)<2060&&Object.keys(e.resource).forEach(function(r){e.resource[r].crates&&(e.resource[r].crates=Math.ceil(e.resource[r].crates/5)),e.resource[r].containers&&(e.resource[r].containers=Math.ceil(e.resource[r].containers/5))});if(be(e.version)<2062&&e.civic.taxes!==void 0)switch(Number(e.civic.taxes.tax_rate)){case 0:e.civic.taxes.tax_rate=0;break;case 1:e.civic.taxes.tax_rate=10;break;case 2:e.civic.taxes.tax_rate=20;break;case 3:e.civic.taxes.tax_rate=30;break;case 4:e.civic.taxes.tax_rate=40;break;case 5:e.civic.taxes.tax_rate=50;break}be(e.version)===2062&&e.civic.taxes!==void 0&&e.civic.taxes.tax_rate==2&&(e.civic.taxes.tax_rate=20);be(e.version)<2065&&e.race!==void 0&&e.race.species==="sporgar"&&(delete e.race.crafty,delete e.race.hydrophilic,e.race.infectious=1,e.race.parasite=1,!e.tech.military&&e.tech.primitive&&e.tech.primitive>=3&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0}));be(e.version)<3002&&e.space&&(e.tech.space&&e.tech.space>=4&&(e.space.living_quarters||(e.space.living_quarters={count:0,on:0}),e.space.garage||(e.space.garage={count:0}),e.space.red_mine||(e.space.red_mine={count:0,on:0}),e.space.fabrication||(e.space.fabrication={count:0,on:0}),e.space.laboratory||(e.space.laboratory={count:0,on:0})),e.tech.space&&e.tech.space>=3&&(e.space.iridium_mine||(e.space.iridium_mine={count:0,on:0}),e.space.helium_mine||(e.space.helium_mine={count:0,on:0})),e.tech.hell&&(e.space.geothermal||(e.space.geothermal={count:0,on:0})));be(e.version)<3004&&e.settings&&e.settings.space&&e.settings.space.belt&&(e.space.space_station={count:0,on:0,support:0,s_max:0});be(e.version)<4001&&e.city&&e.city.factory&&!e.city.factory.Nano&&(e.city.factory.Nano=0);be(e.version)<4003&&e.stats.achieve&&Object.keys(e.stats.achieve).forEach(function(r){e.stats.achieve[r]=1});be(e.version)<4010&&e.stats.achieve&&e.stats.achieve.doomed&&(e.stats.portals=1);be(e.version)<4028&&e.stats.achieve&&e.stats.achieve.genus_demonic&&(e.stats.achieve.biome_hellscape=e.stats.achieve.genus_demonic);if(be(e.version)<4029&&e.race.mutation&&e.race.mutation>0){e.resource.Genes={name:"Genes",display:!0,value:0,amount:0,crates:0,diff:0,delta:0,max:-2,rate:0};for(let r=0;r=3&&(e.tech.wind_plant=1,e.tech.hunting=2);let r=["Human","Humano","Elf","Elfo","Orc","Cath","Wolven","Centaur","Centauro","Kobold","Goblin","Gnome","Ogre","Ogro","Cyclops","Ciclope","Troll","Tortoisan","Gecko","Slitheryn","Arraak","Pterodacti","Dracnid","Ent","Cacti","Sporgar","Shroomi","Mantis","Scorpid","Antid","Sharkin","Octigoran","Balorg","Imp"];for(let a=0;a0){let r=1;e.race.no_trade&&r++,e.race.no_craft&&r++,e.race.no_crispr&&r++,e.race.weak_mastery&&r++,e.stats.achieve.cross={l:r,a:r}}be(e.version)<7e3&&(e.civic.govern||(e.civic.govern={type:"oligarchy",rev:0,fr:0}));if(be(e.version)<7004&&e.queue&&e.queue.queue)for(let r=0;r"u"&&(e.civic.foreign.gov0.anx=!1),typeof e.civic.foreign.gov1.anx>"u"&&(e.civic.foreign.gov1.anx=!1),typeof e.civic.foreign.gov2.anx>"u"&&(e.civic.foreign.gov2.anx=!1),typeof e.civic.foreign.gov0.buy>"u"&&(e.civic.foreign.gov0.buy=!1),typeof e.civic.foreign.gov1.buy>"u"&&(e.civic.foreign.gov1.buy=!1),typeof e.civic.foreign.gov2.buy>"u"&&(e.civic.foreign.gov2.buy=!1));be(e.version)<8e3&&e.settings&&e.settings.hasOwnProperty("tLabels")&&delete e.settings.tLabels;be(e.version)<8003&&e.stats.harmony&&e.stats.harmony>0&&(e.stats.harmony=parseFloat(e.stats.harmony.toFixed(2)),e.race.Harmony.count=parseFloat(e.race.Harmony.count.toFixed(2)));be(e.version)<8017&&e.city.garrison&&(e.city.garrison.on=e.city.garrison.count);be(e.version)<9e3&&e.settings&&e.settings.showCity&&(e.settings.showCiv=e.settings.showCity);be(e.version)<9005&&e.race.hasOwnProperty("terrifying")&&e.tech.hasOwnProperty("gambling")&&!e.space.hasOwnProperty("spc_casino")&&(e.space.spc_casino={count:0,on:0});be(e.version)<9009&&e.genes.hasOwnProperty("ancients")&&e.genes.ancients>=3&&(e.genes.ancients===4?e.genes.ancients=5:e.race.Plasmid.count+=300);be(e.version)<9010&&(["species","gods","old_gods"].forEach(r=>{e.race[r]==="orge"&&(e.race[r]="ogre")}),e.stats.hasOwnProperty("achieve")&&e.stats.achieve.hasOwnProperty("extinct_orge")&&(e.stats.achieve.extinct_ogre=e.stats.achieve.extinct_orge,delete e.stats.achieve.extinct_orge),e.resource.hasOwnProperty("orge")&&(e.resource.ogre=e.resource.orge,delete e.resource.orge),e.city&&e.city.factory&&!e.city.factory.Furs&&(e.city.factory.Furs=0));be(e.version)<9014&&(["seraph","unicorn","custom"].forEach(r=>{e.race.species===r&&(r==="custom"&&e.hasOwnProperty("custom")&&e.custom.race0.genus==="angelic"||r!=="custom")&&(e.race.holy=1)}),e.hasOwnProperty("arpa")&&e.arpa.hasOwnProperty("sequence")&&(e.arpa.sequence.labs=0));be(e.version)<1e5&&(delete e.city.lumber,delete e.city.stone,e.stats.dark=0,e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.city.hasOwnProperty("smelter")&&(e.city.smelter.hasOwnProperty("Star")||(e.city.smelter.Star=0),e.city.smelter.hasOwnProperty("StarCap")||(e.city.smelter.StarCap=0),e.city.smelter.hasOwnProperty("Inferno")||(e.city.smelter.Inferno=0)),e.hasOwnProperty("warseed")||(e.warseed=e.seed+1,Math.war=e.hasOwnProperty("warseed")?e.warseed:e.seed),e.portal.hasOwnProperty("bireme")&&(e.portal.bireme.crew=0,e.portal.bireme.mil=0),e.portal.hasOwnProperty("transport")&&(e.portal.transport.crew=0,e.portal.transport.mil=0,e.portal.transport.cargo||(e.portal.transport.cargo={used:0,max:0,Crystal:0,Lumber:0,Stone:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0})),e.hasOwnProperty("settings")&&e.settings.portal&&e.settings.portal.spire&&!e.portal.hasOwnProperty("purifier")&&(e.settings.portal.spire=!1),e.portal.hasOwnProperty("mechbay")&&!Array.isArray(e.portal.mechbay.mechs)&&(e.portal.mechbay.mechs=[]),e.portal.transport&&e.portal.transport.count>=1&&!e.tech.hell_spire&&(e.tech.hell_spire=1,e.settings.portal.spire=!0,e.settings.showCargo=!0,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0}),e.tech.hasOwnProperty("waygate")&&!e.portal.hasOwnProperty("waygate")&&delete e.tech.waygate,e.hasOwnProperty("blood")||(e.blood={}));be(e.version)<100013&&e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("showPowerGrid")&&e.hasOwnProperty("race")&&e.race.infiltrator&&e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2&&(e.settings.showPowerGrid=!0);if(be(e.version)<100014&&(e.race.Dark&&(e.stats.dark=e.race.Dark.count),e.race.casting&&e.race.evil&&(e.race.casting.total-=e.race.casting.lumberjack,e.race.casting.lumberjack=0),e.queue&&e.queue.queue))for(let r=0;r=2,events:!0,major_events:!0,minor_events:!0,achievements:e.stats.achieve&&Object.keys(e.stats.achieve).length>0||e.stats.feat&&Object.keys(e.stats.feat).length>0,hell:e.settings.showPortal||e.stats.blackhole||e.stats.ascend||e.stats.descend}),e.race.hasOwnProperty("inflation")&&["supercollider","stock_exchange","launch_facility","monuments","railway","roid_eject","nexus","syphon"].forEach(function(r){e.tech.hasOwnProperty(r)&&(e.race.inflation+=e.tech[r]*10)}));be(e.version)<101012&&e.civic.garrison&&(e.civic.garrison.rate=0);if(be(e.version)<101014&&(e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("msgFilters")&&Object.keys(e.settings.msgFilters).forEach(function(r){e.settings.msgFilters[r]={unlocked:!!e.settings.msgFilters[r],vis:!!e.settings.msgFilters[r],max:60,save:3}}),e.hasOwnProperty("lastMsg")&&e.lastMsg)){let r={};Oa.forEach(function(a){r[a]=[]}),e.lastMsg.forEach(function(a){a.t?a.t.forEach(function(i){r[i].push({m:a.m,c:a.c})}):r.all.push({m:a.m,c:a.c})}),e.lastMsg=r}be(e.version)<=101014&&!e.revision&&e.race.cataclysm&&e.race.universe&&e.race.universe==="magic"&&e.tech.magic&&e.tech.magic>=2&&(e.space.pylon={count:0});be(e.version)<101015&&e.hasOwnProperty("special")&&e.special.hasOwnProperty("trick")&&(e.special.trick[2020]=JSON.parse(JSON.stringify(e.special.trick)),delete e.special.trick.trick1,delete e.special.trick.trick2,delete e.special.trick.trick3,delete e.special.trick.trick4,delete e.special.trick.trick5,delete e.special.trick.trick6,delete e.special.trick.trick7,delete e.special.trick.trick8,delete e.special.trick.trick9,delete e.special.trick.trick10,delete e.special.trick.trick11,delete e.special.trick.trick12);be(e.version)<102e3&&(e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("fortress")&&!e.portal.fortress.hasOwnProperty("nocrew")&&(e.portal.fortress.nocrew=!1),e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("Iridium")&&(e.city.smelter.Iridium=0),e.hasOwnProperty("portal")&&e.portal.hasOwnProperty("mechbay")&&!e.portal.mechbay.hasOwnProperty("active")&&(e.portal.mechbay.active=0,e.portal.mechbay.scouts=0));be(e.version)<102001&&(e.race.blood_thirst&&e.race.blood_thirst>3&&(e.race.blood_thirst=1),e.race.rainbow&&e.race.rainbow>3&&(e.race.rainbow=1));be(e.version)<102005&&!e.stats.cores&&e.race.hasOwnProperty("AICore")&&(e.stats.cores=e.race.AICore.count);be(e.version)<102006&&e.race.artifical&&(e.race.calm&&(e.resource.hasOwnProperty("Zen")&&(e.resource.Zen.display=!0),e.city.meditation={count:0}),e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}));be(e.version)<102007&&e.stats.hasOwnProperty("achieve")&&delete e.stats.achieve.extinct_sludge;be(e.version)<102012&&(e.city.hasOwnProperty("ptrait")&&(e.city.ptrait=e.city.ptrait==="none"?[]:[e.city.ptrait]),e.tech.hell_ruins&&e.tech.hell_ruins>=3&&(e.tech.hell_vault=1));if(be(e.version)<102015){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r in e.race.governor.tasks)e.race.governor.tasks[r]==="asssemble"&&(e.race.governor.tasks[r]="assemble");e.settings&&e.settings.hasOwnProperty("restoreCheck")&&delete e.settings.restoreCheck}be(e.version)<102017&&(e.portal.hasOwnProperty("fortress")&&(e.portal.observe={settings:{expanded:!1,average:!1,hyperSlow:!1,display:"game_days",dropKills:!0,dropGems:!0},stats:{total:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}},period:{start:{year:e.city.calendar.year,day:e.city.calendar.day},days:0,wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0}}},graphID:0,graphs:{}}),e.tech.hasOwnProperty("genetics")&&e.tech.genetics>1&&e.hasOwnProperty("arpa")&&(e.arpa.hasOwnProperty("sequence")||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!1}),e.arpa.sequence.boost||(e.arpa.sequence.boost=!1),e.arpa.sequence.auto||(e.arpa.sequence.auto=!1),e.arpa.sequence.labs||(e.arpa.sequence.labs=0)));if(be(e.version)<102021&&e.hasOwnProperty("custom")&&!e.custom.hasOwnProperty("race0")){let r=e.race.hasOwnProperty("species")?e.race.species:"protoplasm";e.galaxy.hasOwnProperty("alien1")&&e.galaxy.alien1.id==="custom"&&(e.galaxy.alien1.id=r==="human"?"elven":"human"),e.galaxy.hasOwnProperty("alien2")&&e.galaxy.alien2.id==="custom"&&(e.galaxy.alien2.id=r==="orc"||e.galaxy.alien1.id==="orc"?"cath":"orc")}be(e.version)<103e3&&(e.hasOwnProperty("tauceti")||(e.tauceti={}),e.race.species==="protoplasm"&&(e.evolution.hasOwnProperty("sexual_reproduction")&&(e.tech.evo=e.evolution.sexual_reproduction.count>0?2:1,delete e.evolution.sexual_reproduction),[["phagocytosis",{evo:3,evo_animal:1}],["chloroplasts",{evo:3,evo_plant:1}],["chitin",{evo:3,evo_fungi:1}],["exterminate",{evo:7,evo_synthetic:2}],["multicellular",{evo:4}],["spores",{evo:5}],["poikilohydric",{evo:5}],["bilateral_symmetry",{evo:5,evo_insectoid:1,evo_mammals:1,evo_eggshell:1,evo_aquatic:1,evo_fey:1,evo_sand:1,evo_heat:1,evo_polar:1}],["bryophyte",{evo:7}],["athropods",{evo:7,evo_insectoid:2}],["mammals",{evo:6,evo_humanoid:1,evo_giant:1,evo_small:1,evo_animalism:1,evo_demonic:1,evo_angelic:1}],["humanoid",{evo:7,evo_humanoid:2}],["gigantism",{evo:7,evo_giant:2}],["dwarfism",{evo:7,evo_small:2}],["animalism",{evo:7,evo_animalism:2}],["carnivore",{evo_animalism:3,evo_carnivore:2}],["herbivore",{evo_animalism:3,evo_herbivore:2}],["omnivore",{evo_animalism:3,evo_omnivore:2}],["celestial",{evo:7,evo_angelic:2}],["demonic",{evo:7,evo_demonic:2}],["aquatic",{evo:7,evo_aquatic:2}],["fey",{evo:7,evo_fey:2}],["heat",{evo:7,evo_heat:2}],["polar",{evo:7,evo_polar:2}],["sand",{evo:7,evo_sand:2}],["eggshell",{evo:6,evo_eggshell:2}],["endothermic",{evo:7,evo_avian:2}],["ectothermic",{evo:7,evo_reptilian:2}],["bunker",{evo_challenge:1}]].forEach(function(r){if(e.evolution.hasOwnProperty(r[0])&&e.evolution[r[0]].count>0)for(let[a,i]of Object.entries(r[1]))e.tech[a]=i;delete e.evolution[r[0]]}),e.evolution.mloaded=1,e.evolution.gmloaded=1));be(e.version)<103001&&(e.hasOwnProperty("prestige")||(e.prestige={}),e.race.Plasmid&&e.race.Plasmid.hasOwnProperty("anti")&&(e.prestige.AntiPlasmid={count:e.race.Plasmid.anti}),["Plasmid","Phage","AICore","Dark","Harmony"].forEach(function(r){e.race.hasOwnProperty(r)&&(e.prestige[r]={count:e.race[r].count},delete e.race[r])}),["Artifact","Blood_Stone"].forEach(function(r){e.resource.hasOwnProperty(r)&&(e.prestige[r]={count:e.resource[r].amount},delete e.resource[r])}),!e.stats.hasOwnProperty("synth")&&e.race.hasOwnProperty("srace")&&(e.stats.synth={},e.stats.synth[e.race.srace]=!0),e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("config")&&e.race.governor.config.hasOwnProperty("trash")&&["Infernite","Elerium","Copper","Iron"].forEach(function(r){e.race.governor.config.trash.hasOwnProperty(r)&&typeof e.race.governor.config.trash[r]=="number"&&(e.race.governor.config.trash[r]={v:e.race.governor.config.trash[r],s:!0})}));be(e.version)<103002&&e.portal.hasOwnProperty("observe")&&e.portal.observe.hasOwnProperty("stats")&&(e.portal.observe.stats.period.gems.surveyors=0,e.portal.observe.stats.total.gems.surveyors=0);be(e.version)<103011&&e.city.hasOwnProperty("slave_pen")&&e.city.slave_pen.hasOwnProperty("slaves")&&(e.resource.Slave.amount=e.city.slave_pen.slaves,delete e.city.slave_pen.slaves);be(e.version)<103014&&(e.race.cataclysm&&!e.race.start_cataclysm&&(e.civic.craftsman.display=!0),e.race.lone_survivor&&(e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0||e.tauceti.womling_station&&e.tauceti.womling_station.count>0)&&(e.civic.craftsman.display=!0));e.version="1.3.13";e.revision="b";delete e.beta;e.hasOwnProperty("prestige")||(e.prestige={});["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(r){e.prestige.hasOwnProperty(r)||(e.prestige[r]={count:0})});e.hasOwnProperty("power")||(e.power=[]);e.hasOwnProperty("support")||(e.support={});["moon","red","belt","alpha","nebula","gateway","alien2","lake","spire","titan","enceladus","eris","tau_home","tau_red","tau_roid"].forEach(function(r){e.support.hasOwnProperty(r)||(e.support[r]=[])});e.civic.cement_worker&&e.civic.cement_worker.impact===.25&&(e.civic.cement_worker.impact=.4);e.settings||(e.settings={showEvolve:!0,showAchieve:!1,animated:!0,disableReset:!1,font:"standard",q_merge:"merge_nearby",cLabels:!0,theme:"gruvboxDark",locale:"en-US",icon:"star"});e.settings.space||(e.settings.space={});e.settings.space.hasOwnProperty("home")||(e.settings.space.home=!0);Wc(!1);e.settings.icon||(e.settings.icon="star");e.settings.showResources||(e.settings.showResources=e.settings.showMarket);e.settings.showStorage||(e.city.warehouse||e.city.storage_yard?e.settings.showStorage=!0:e.settings.showStorage=!1);e.settings.hasOwnProperty("touch")||(e.settings.touch=!1);e.settings.hasOwnProperty("lowPowerBalance")||(e.settings.lowPowerBalance=!1);e.queue||(e.queue={display:!1,queue:[]});e.r_queue||(e.r_queue={display:!1,queue:[]});e.queue.rename||(e.queue.rename=!1);e.queue.max||(e.queue.max=0);e.r_queue.max||(e.r_queue.max=0);e.queue.pause||(e.queue.pause=!1);e.r_queue.pause||(e.r_queue.pause=!1);e.lastMsg||(e.lastMsg={});e.settings.msgFilters||(e.settings.msgFilters={});["all","progress","events","major_events","minor_events"].forEach(function(r){e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!0,vis:!0,max:60,save:3})});Oa.forEach(function(r){e.lastMsg[r]||(e.lastMsg[r]=[]),e.settings.msgFilters[r]||(e.settings.msgFilters[r]={unlocked:!1,vis:!1,max:60,save:3})});e.settings.msgQueueHeight||(e.settings.msgQueueHeight=$("#msgQueue").outerHeight(),e.settings.buildQueueHeight=$("#buildQueue").outerHeight());e.space||(e.space={});e.starDock||(e.starDock={});e.interstellar||(e.interstellar={});e.galaxy||(e.galaxy={});e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Bolognium&&(e.interstellar.mass_ejector.Bolognium=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Vitreloy&&(e.interstellar.mass_ejector.Vitreloy=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Orichalcum&&(e.interstellar.mass_ejector.Orichalcum=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Nanoweave&&(e.interstellar.mass_ejector.Nanoweave=0);e.interstellar.mass_ejector&&!e.interstellar.mass_ejector.Scarletite&&(e.interstellar.mass_ejector.Scarletite=0);e.hasOwnProperty("pillars")||(e.pillars={});e.settings.space.alpha||(e.settings.space.alpha=!1,e.settings.space.proxima=!1,e.settings.space.nebula=!1,e.settings.space.neutron=!1,e.settings.space.blackhole=!1);e.settings.showAchieve||(e.settings.showAchieve=!1);e.settings.locale||(e.settings.locale="en-US");typeof e.settings.pause>"u"&&(e.settings.pause=!1);typeof e.settings.mKeys>"u"&&(e.settings.mKeys=!0);typeof e.settings.keyMap>"u"&&(e.settings.keyMap={x10:"Control",x25:"Shift",x100:"Alt",q:"q"});typeof e.settings.keyMap.showCiv>"u"&&(e.settings.keyMap.showCiv="1",e.settings.keyMap.showCivic="2",e.settings.keyMap.showResearch="3",e.settings.keyMap.showResources="4",e.settings.keyMap.showGenetics="5",e.settings.keyMap.showAchieve="6",e.settings.keyMap.settings="7");delete e.settings.keyMap.d;typeof e.settings.qAny>"u"&&(e.settings.qAny=!1);typeof e.settings.sPackOn>"u"&&(e.settings.sPackOn=!0);typeof e.settings.qAny_res>"u"&&(e.settings.qAny_res=!1);typeof e.settings.sPackMsg>"u"&&(e.settings.sPackMsg=!1);typeof e.settings.expose>"u"&&(e.settings.expose=!1);typeof e.settings.alwaysPower>"u"&&(e.settings.alwaysPower=!1);typeof e.settings.tabLoad>"u"&&(e.settings.tabLoad=!1);typeof e.settings.boring>"u"&&(e.settings.boring=!1);e.settings.hasOwnProperty("mtorder")||(e.settings.mtorder=[]);function qn(){["reset","plasmid","antiplasmid","universes","phage","starved","tstarved","died","tdied","sac","tsac","know","tknow","portals","dkills","attacks","cfood","tfood","cstone","tstone","clumber","tlumber","mad","bioseed","cataclysm","blackhole","ascend","descend","terraform","aiappoc","matrix","retire","eden","geck","dark","harmony","blood","cores","artifact","cattle","tcattle","murders","tmurders","psykill","tpsykill"].forEach(function(r){e.stats.hasOwnProperty(r)||(e.stats[r]=0)}),e.stats.achieve||(e.stats.achieve={}),e.stats.feat||(e.stats.feat={}),e.stats.hasOwnProperty("womling")||(e.stats.womling={god:{l:0},lord:{l:0},friend:{l:0}}),e.stats.spire||(e.stats.spire={}),e.stats.synth||(e.stats.synth={}),e.stats.hasOwnProperty("banana")||(e.stats.banana={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}}),e.stats.hasOwnProperty("endless_hunger")||(e.stats.endless_hunger={b1:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b2:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b3:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b4:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1},b5:{l:!1,h:!1,a:!1,e:!1,m:!1,mg:!1}})}qn();e.race.seeded||(e.race.seeded=!1);e.race.deterioration||(e.race.deterioration=0);e.race.gene_fortify||(e.race.gene_fortify=0);e.race.old_gods||(e.race.old_gods="none");e.race.universe||(e.race.universe="standard");e.genes.minor||(e.genes.minor={});e.race.minor||(e.race.minor={});e.hasOwnProperty("govern")||(e.govern={governor:{},candidate:[],policy:{}});e.settings.hasOwnProperty("showMil")||(e.settings.showMil=!0);e.settings.hasOwnProperty("showPowerGrid")||(e.settings.showPowerGrid=!!(e.hasOwnProperty("tech")&&e.tech.hasOwnProperty("high_tech")&&e.tech.high_tech>=2));e.settings.affix||(e.settings.affix="si");e.special||(e.special={});e.special.gift||(e.special.gift={});e.special.hasOwnProperty("egg")||(e.special.egg={});e.special.hasOwnProperty("trick")||(e.special.trick={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,trick8:!1,trick9:!1,trick10:!1,trick11:!1,trick12:!1});e.civic.govern||(e.civic.govern={type:"oligarchy",rev:2e3,fr:0});e.civic.govern.fr=0;e.hasOwnProperty("custom")||(e.custom={});e.custom.hasOwnProperty("planet")&&e.custom.planet.hasOwnProperty("biome")&&delete e.custom.planet;e.city.hasOwnProperty("smelter")&&!e.city.smelter.hasOwnProperty("cap")&&(e.city.smelter.cap=0);e.civic.homeless||(e.civic.homeless=0);e.civic.foreign||(e.civic.foreign={gov0:{unrest:0,hstl:100,mil:100,eco:75,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:0,mil:150,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:50,mil:250,eco:150,spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}});typeof e.civic.foreign.gov0.trn>"u"&&(e.civic.foreign.gov0.trn=0,e.civic.foreign.gov1.trn=0,e.civic.foreign.gov2.trn=0,e.civic.foreign.gov0.sab=0,e.civic.foreign.gov1.sab=0,e.civic.foreign.gov2.sab=0,e.civic.foreign.gov0.act="none",e.civic.foreign.gov1.act="none",e.civic.foreign.gov2.act="none");typeof e.civic.foreign.gov0.name<"u"&&e.civic.foreign.gov0.name.s1==="evo_organism_title"&&(e.civic.foreign.gov0.name.s1="Northern");typeof e.civic.foreign.gov1.name<"u"&&e.civic.foreign.gov1.name.s1==="evo_organism_title"&&(e.civic.foreign.gov1.name.s1="Southern");typeof e.civic.foreign.gov2.name<"u"&&e.civic.foreign.gov2.name.s1==="evo_organism_title"&&(e.civic.foreign.gov2.name.s1="Divine");if(!e.race.evil&&e.race.immoral&&e.race!==void 0&&e.race.species!=="wendigo")delete e.race.immoral;else if(e.race!==void 0&&e.race.species==="wendigo"){let r=new Date;e.settings.hasOwnProperty("boring")&&!e.settings.boring&&r.getMonth()===11&&r.getDate()>=17&&(e.race.immoral=3)}if(e.hasOwnProperty("special")&&e.special.hasOwnProperty("gift")){let r=new Date(e.stats.start),a=new Date;Object.keys(e.special.gift).forEach(function(i){let s=Number(i.substring(1,5));(s=1?e.civic.d_job="farmer":e.civic.d_job="unemployed");e.settings.animated=!0;e.settings.disableReset=!1;e.arpa&&e.arpa.launch_facility&&e.arpa.launch_facility.rank>0&&!e.tech.space&&(e.tech.space=1);function Hc(){e.race={species:"protoplasm",gods:"none",old_gods:"none",seeded:!1},e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.new=!0}var kr={x10:!1,x25:!1,x100:!1,q:!1};function fe(){let r=1;return e.settings.mKeys&&(kr.x10&&(r*=10),kr.x25&&(r*=25),kr.x100&&(r*=100)),r}function be(r){let a=r.split(".",3);return a[0]*=1e5,a[1]*=1e3,Number(a[0])+Number(a[1])+Number(a[2])}function Ti(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let r=$("#buildQueue").detach();r.addClass("right"),r.removeClass("has-text-info");let a=$("#msgQueue").detach();a.addClass("right"),a.removeClass("has-text-info"),a.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(r),$("#queueColumn").append(a),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let r=$("#buildQueue").detach();r.removeClass("right"),r.addClass("has-text-info");let a=$("#msgQueue").detach();a.removeClass("right"),a.addClass("has-text-info"),a.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(r),$("#sideQueue").append(a),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var Ya={si:["K","M","G","T","P","E","Z","Y"],sci:["e3","e6","e9","e12","e15","e18","e21","e24"],sln:["K","M","B","t","q","Q","s","S"]};function Ee(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=Ya[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=Ya[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=Ya[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=Ya[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=Ya[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=Ya[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=Ya[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=Ya[e.settings.affix][7],s=i?+(r/1e24).toFixed(1):Math.floor(r/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+n}$(window).resize(function(){Ti()});function ss(r,a){var i=document.createElement("div"),s="speak-"+Date.now();i.setAttribute("id",s),i.setAttribute("aria-live",a||"polite"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout(function(){document.getElementById(s).innerHTML=r},100),window.setTimeout(function(){document.body.removeChild(document.getElementById(s))},1e3)}window.soft_reset=function(a){try{a=a&&a==="replicator"?"replicator":"soft",gtag("event","reset",{end:a})}catch{}a||Kr();let i=e.race.hasOwnProperty("srace")?e.race.srace:!1,s=e.race.hasOwnProperty("geck")?e.race.geck:0;e.race.hasOwnProperty("gecked")&&(s+=e.race.gecked,e.stats.geck-=e.race.gecked);let n={species:"protoplasm",universe:e.race.universe,seeded:e.race.seeded,probes:e.race.probes,seed:e.race.seed,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:e.race.hasOwnProperty("rejuvenated")?e.race.rejuvenated:!1};s>0&&(n.geck=s),i&&(n.srace=i),e.race.bigbang&&(n.bigbang=!0),e.race.gods&&(n.gods=e.race.gods),e.race.old_gods&&(n.old_gods=e.race.old_gods),e.race.rapid_mutation&&e.race.rapid_mutation>0&&(n.rapid_mutation=e.race.rapid_mutation),e.race.ancient_ruins&&e.race.ancient_ruins>0&&(n.ancient_ruins=e.race.ancient_ruins),e.race.bigbang&&(n.universe="bigbang"),e.race.hasOwnProperty("corruption")&&(n.corruption=e.race.corruption),e.race=n;let c=e.city.calendar.orbit,l=e.city.biome,o=e.city.ptrait,d=e.city.geology;e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:l,ptrait:o,geology:d},e.tech.theology&&e.tech.theology>=1?e.tech={theology:1}:e.tech={},Mn(),e.new=!0,e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.stats.current=Date.now(),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()};var Pe={w:!1,s:!1,mt:250},Ka={};function Kr(){Oa.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Wc(r){let a={base:["showCiv","showCity","showIndustry","showPowerGrid","showMechLab","showShipYard","showResearch","showCivic","showMil","showResources","showMarket","showStorage","showGenetics","showSpace","showDeep","showGalactic","showPortal","showOuter","showTau","showEjector","showCargo","showAlchemy","showGovernor","arpa","showPsychic"],space:["moon","red","hell","sun","gas","gas_moon","belt","dwarf","alpha","proxima","nebula","neutron","blackhole","sirius","stargate","gateway","gorddon","alien1","alien2","chthonian","titan","enceladus","triton","eris","kuiper"],portal:["fortress","badlands","pit","ruins","gate","lake","spire"],tau:["home","red","roid","gas","gas2","star"]};Object.keys(a).forEach(function(i){i==="base"?a[i].forEach(function(s){(!e.settings.hasOwnProperty(s)||r)&&(e.settings[s]=!1)}):(e.settings.hasOwnProperty(i)||(e.settings[i]={}),a[i].forEach(function(s){(!e.settings[i].hasOwnProperty(s)||r)&&(e.settings[i][s]=!1)}))}),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach(function(i){(!e.settings.hasOwnProperty(i)||r)&&(e.settings[i]=0)})}function Mn(){Pe.w&&Pe.w.terminate(),e.queue={display:!1,queue:[]},e.r_queue={display:!1,queue:[]},e.space={},e.interstellar={},e.galaxy={},e.portal={},e.starDock={},e.tauceti={},e.civic={new:0},e.civic.foreign={gov0:{unrest:0,hstl:Math.floor(J(80,100)),mil:Math.floor(J(75,125)),eco:Math.floor(J(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(J(0,20)),mil:Math.floor(J(125,175)),eco:Math.floor(J(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(J(40,60)),mil:Math.floor(J(200,300)),eco:Math.floor(J(130,170)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1}},e.genes.blood||(e.prestige.Blood_Stone.count=0),e.resource={},e.evolution={},e.event={t:100,l:!1},e.m_event={t:499,l:!1},e.stats.days=0,e.stats.know=0,e.stats.starved=0,e.stats.died=0,e.stats.attacks=0,e.stats.dkills=0,e.stats.cfood=0,e.stats.cstone=0,e.stats.clumber=0,e.stats.sac=0,e.stats.cattle=0,e.stats.murders=0,e.settings.at=0,e.settings.showEvolve=!0,e.settings.space.home=!0,Wc(!0),e.settings.disableReset=!1,e.settings.pause=!1,e.arpa={},delete e.race.hrt,e.genes.queue&&(e.tech.queue=1,e.queue.display=!0)}window.reset=function(){try{gtag("event","reset",{end:"hard"})}catch{}localStorage.removeItem("evolved"),e=null,Pe.w&&Pe.w.terminate(),window.location.reload()};var Pn;Dl(e.settings.locale);function t(r,a){let i=Pn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Pn)),r;if(a)if(a instanceof Array){for(let c=0;c{a=s}),r!="en-US"){let s;try{$.getJSON(`strings/strings.${r}.json`,c=>{s=c})}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error(`string.${r}.json has extra keys.`)}let i=Se.getItem("string_pack")||!1;if(i&&e.settings.sPackOn){let s;try{s=JSON.parse(LZString.decompressFromUTF16(i))}catch(c){console.error(c,c.stack)}let n=a.length;s&&Object.assign(a,s),a.length!=n&&e.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),Pn=a}var ns={"en-US":"English (US)","es-ES":"Spanish (ESP)","pt-BR":"Portugu\xEAs (BR)","de-DE":"Deutsch","it-IT":"Italiano","ru-RU":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","cs-CZ":"\u010Ce\u0161tina","pl-PL":"Polski","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","ko-KR":"\uD55C\uAD6D\uC5B4","im-PL":"Igpay-Atinlay"};var Na={soldier:{name:t("governor_soldier"),desc:t("governor_soldier_desc"),title:[t("governor_soldier_t1"),t("governor_soldier_t2"),t("governor_soldier_t3")],traits:{tactician:1,militant:1}},criminal:{name:t("governor_criminal"),desc:t("governor_criminal_desc"),title:[t("governor_criminal_t1"),t("governor_criminal_t2"),{m:t("governor_criminal_t3m"),f:t("governor_criminal_t3f")}],traits:{noquestions:1,racketeer:1}},entrepreneur:{name:t("governor_entrepreneur"),desc:t("governor_entrepreneur_desc"),title:[t("governor_entrepreneur_t1"),t("governor_entrepreneur_t2"),{m:t("governor_entrepreneur_t3m"),f:t("governor_entrepreneur_t3f")}],traits:{dealmaker:1,risktaker:1}},educator:{name:t("governor_educator"),desc:t("governor_educator_desc"),title:[t("governor_educator_t1"),t("governor_educator_t2"),t("governor_educator_t3")],traits:{teacher:1,theorist:1}},spiritual:{name:t("governor_spiritual"),desc:t("governor_spiritual_desc"),title:[t("governor_spiritual_t1"),t("governor_spiritual_t2"),t("governor_spiritual_t3")],traits:{inspirational:1,pious:1}},bluecollar:{name:t("governor_bluecollar"),desc:t("governor_bluecollar_desc"),title:[{m:t("governor_bluecollar_t1m"),f:t("governor_bluecollar_t1f")},t("governor_bluecollar_t2"),{m:t("governor_bluecollar_t3m"),f:t("governor_bluecollar_t3f")}],traits:{pragmatist:1,dirty_jobs:1}},noble:{name:t("governor_noble"),desc:t("governor_noble_desc"),title:[{m:t("governor_noble_t1m"),f:t("governor_noble_t1f")},{m:t("governor_noble_t2m"),f:t("governor_noble_t2f")},{m:t("governor_noble_t3m"),f:t("governor_noble_t3f")},{m:t("governor_noble_t4m"),f:t("governor_noble_t4f")}],traits:{extravagant:1,aristocrat:1}},media:{name:t("governor_media"),desc:t("governor_media_desc"),title:[t("governor_media_t1"),{m:t("governor_media_t2m"),f:t("governor_media_t2f")},t("governor_media_t3")],traits:{gaslighter:1,muckraker:1}},sports:{name:t("governor_sports"),desc:t("governor_sports_desc"),title:[t("governor_sports_t1"),t("governor_sports_t2"),t("governor_sports_t3")],traits:{athleticism:1,nopain:1}},bureaucrat:{name:t("governor_bureaucrat"),desc:t("governor_bureaucrat_desc"),title:[t("governor_bureaucrat_t1"),{m:t("governor_bureaucrat_t2m"),f:t("governor_bureaucrat_t2f")},t("governor_bureaucrat_t3")],traits:{organizer:1}}},cs={tactician:{name:t("gov_trait_tactician"),effect(){return t("gov_trait_tactician_effect",[$(this)[0].vars()[0]])},vars(){return[25]}},militant:{name:t("gov_trait_militant"),effect(){return t("gov_trait_militant_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[25,10]}},noquestions:{name:t("gov_trait_noquestions"),effect(){return t("gov_trait_noquestions_effect",[$(this)[0].vars()[0]])},vars(){return[.005]}},racketeer:{name:t("gov_trait_racketeer"),effect(){return t("gov_trait_racketeer_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[20,35]}},dealmaker:{name:t("gov_trait_dealmaker"),effect(){return t("gov_trait_dealmaker_effect",[$(this)[0].vars()[0]])},vars(){return[125]}},risktaker:{name:t("gov_trait_risktaker"),effect(){return t("gov_trait_risktaker_effect",[$(this)[0].vars()[0]])},vars(){return[12]}},teacher:{name:t("gov_trait_teacher"),effect(){return t("gov_trait_teacher_effect",[$(this)[0].vars()[0]])},vars(){return[6]}},theorist:{name:t("gov_trait_theorist"),effect(){return t("gov_trait_theorist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,4]}},inspirational:{name:t("gov_trait_inspirational"),effect(){return t("gov_trait_inspirational_effect",[$(this)[0].vars()[0]])},vars(){return[20]}},pious:{name:t("gov_trait_pious"),effect(){let r=$(this)[0].vars()[1],a=e.tech.monument&&e.tech.monument>=3&&k.s_gate?3:1;return r=(e.civic.govern.type==="corpocracy"?r*2:r)*a,t("gov_trait_pious_effect",[$(this)[0].vars()[0],r])},vars(){return[10,5]}},pragmatist:{name:t("gov_trait_pragmatist"),effect(){return t("gov_trait_pragmatist_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,2]}},dirty_jobs:{name:t("gov_trait_dirty_jobs"),effect(){return t("gov_trait_dirty_jobs_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[.015,1,10]}},extravagant:{name:t("gov_trait_extravagant"),effect(){return t("gov_trait_extravagant_effect",[$(this)[0].vars()[0],St("large",!0),$(this)[0].vars()[1],N($(this)[0].vars()[2]+5)])},vars(){return[10,1.25,1]}},aristocrat:{name:t("gov_trait_aristocrat"),effect(){return t("gov_trait_aristocrat_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[50,20,10]}},gaslighter:{name:t("gov_trait_gaslighter"),effect(){return t("gov_trait_gaslighter_effect",[$(this)[0].vars()[0],dr(),$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[1,1,.5]}},muckraker:{name:t("gov_trait_muckraker"),effect(){return t("gov_trait_muckraker_effect",[$(this)[0].vars()[1],$(this)[0].vars()[2]])},vars(){return[8,12,3]}},athleticism:{name:t("gov_trait_athleticism"),effect(){return t("gov_trait_athleticism_effect",[$(this)[0].vars()[0],N($(this)[0].vars()[1]),$(this)[0].vars()[2],dr()])},vars(){return[1.5,2,4]}},nopain:{name:t("gov_trait_nopain"),effect(){return t("gov_trait_nopain_effect",[$(this)[0].vars()[0],$(this)[0].vars()[1]])},vars(){return[50,10]}},organizer:{name:t("gov_trait_organizer"),effect(){return t("gov_trait_organizer_effect",[$(this)[0].vars()[0]])},vars(){return[e.genes.governor&&e.genes.governor>=2?2:1]}}},Qc={humanoid:["Sanders","Smith","Geddon","Burgundy","Cristo","Crunch","Berg","Morros","Bower","Maximus"],carnivore:["Instinct","Prowl","Paws","Fluffy","Snarl","Claws","Fang","Stalker","Pounce","Sniff"],herbivore:["Sense","Grazer","Paws","Fluffy","Fern","Claws","Fang","Grass","Stampy","Sniff"],omnivore:["Pelt","Munchy","Paws","Fluffy","Snarl","Claws","Fang","Skavers","Pounce","Sniff"],small:["Bahgins","Banks","Shorty","Parte","Underfoot","Shrimp","Finkle","Littlefoot","Cub","Runt"],giant:["Slender","Titan","Colossus","Bean","Tower","Cloud","Bigfoot","Mountain","Crusher","Megaton"],reptilian:["Scale","Chimera","Ecto","Bask","Forks","Croc","Slither","Sunny","Coldfoot","Webtoe"],avian:["Sparrow","Soar","Shiney","Raven","Squaks","Eddy","Breeze","Flap","Kettle","Flock"],insectoid:["Compound","Centi","Hiver","Buzz","Carpace","Swarm","Devour","Carpi","Chitter","Burrow"],plant:["Grover","Blossom","Leaf","Sapper","Stem","Seed","Sprout","Greensly","Root","Fruit"],fungi:["Detritus","Psychedelic","Cap","Rotface","Patch","Spore","Infecto","Filament","Symbiote","Shade"],aquatic:["Seawolf","Finsley","Inko","Sucker","McBoatFace","Wave","Riptide","Shell","Coral","Pearl"],fey:["Whisper","Prank","Mischief","Flutter","Nature","Dirt","Story","Booker","Tales","Spirit"],heat:["Ash","Magnus","Pumice","Vulcano","Sweat","Flame","Lava","Ember","Smoke","Tinder","Spark"],polar:["Frosty","Snowball","Flake","Chiller","Frost","Cooler","Icecube","Arctic","Tundra","Avalanche"],sand:["Dune","Oasis","Sarlac","Spice","Quick","Grain","Spike","Storm","Glass","Castle"],demonic:["Yekun","Kesabel","Gadreel","Penemue","Abaddon","Azazyel","Leviathan","Samyaza","Kasyade","Typhon"],angelic:["Lightbringer","Illuminous","Sparks","Chrub","Halo","Star","Pompous","Radiant","Fluffy","Fabio"],synthetic:["HK47","D2R2","Bishop","Wally","Number5","Sunny","Data","Beta","Dot","Motoko"],eldritch:["Tentacle","Faceless","Horror","Darkness","Void","Dreamer","Mindflayer","Whisper","Paranoia","Empty"]};function Vc(r){let a=[],i=A[e.race.species].type,s=Object.keys(Na),n=JSON.parse(JSON.stringify(Qc[i]));r=r||s.length;for(let c=0;c=2&&(r.push(r.length),ge("organizer",0)&&r.push(r.length)),ge("organizer",0)&&r.push(r.length),r.forEach(function(a){_a[e.race.governor.tasks[`t${a}`]]&&_a[e.race.governor.tasks[`t${a}`]].req()&&_a[e.race.governor.tasks[`t${a}`]].task()})}}function Ot(){!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0)||e.genes.governor&&e.tech.governor&&(le($("#r_govern1")),e.race.hasOwnProperty("governor")&&!e.race.governor.hasOwnProperty("candidates")?Gl():Rl())}function zs(){Object.keys(e.civic.foreign).forEach(function(r){let a=$(`#spyopConfig${r}`)[0];if(a){let i=Sortable.get(a);i&&i.destroy()}})}function Bl(r){let a=$(`#spyopConfig${r}`)[0];a&&Sortable.create(a,{onEnd(i){let s=e.race.governor.config.spyop[r];s.splice(i.newDraggableIndex,0,s.splice(i.oldDraggableIndex,1)[0]),e.race.governor.config.spyop[r]=s,Ot()}})}function Gl(){zs();let r=$('
');$("#r_govern1").append(r);let a=$('
');r.append(a);let i=$("
");i.append($(`
${t("governor_office",[e.race.governor.g.n])}
`)),i.append($(`
${t("governor_background")}: ${Na[e.race.governor.g.bg].name}
`)),a.append(i),a.append($(`
${t("governor_fire")}
`));let s=[0,1,2];e.genes.governor&&e.genes.governor>=2&&(s.push(s.length),ge("organizer",0)&&s.push(s.length)),ge("organizer",0)&&s.push(s.length),s.forEach(function(c){let l=`{{ 'none' | label }}`;Object.keys(_a).forEach(function(o){_a[o].req()&&(l+=`{{ '${o}' | label }}`)}),r.append(`
${t("gov_task",[c+1])}
`))}D({el:"#candidates",data:e.race.governor,methods:{appoint(a){if(e.genes.governor&&e.tech.governor){let i=e.race.governor.candidates[a];e.race.governor.g=i,delete e.race.governor.candidates,e.race.governor.tasks={t0:"none",t1:"none",t2:"none",t3:"none",t4:"none",t5:"none"},Qr(!1,["city-amphitheatre","city-apartment"]),zr(),ra(),Ot(),wt("governor",{appoint:e.race.governor.g.bg})}}}}),e.race.governor.candidates.forEach(function(a){pe(`candidates-${a.bg}`,function(){let i="";return Object.keys(Na[a.bg].traits).forEach(function(s){i+=(cs[s].hasOwnProperty("effect")?cs[s].effect():"")+" "}),i},{elm:`#candidates .${a.bg} .bg`})})}function ge(r,a){return e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("g")&&Na[e.race.governor.g.bg].traits[r]?cs[r].vars()[a]:!1}function qr(r){if(e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks)for(let a=0;a=40&&(r+=.5),e.civic.govern.type==="oligarchy"&&e.civic.taxes.tax_rate>=20&&(r-=.5);let a=vr("tax_cap",!1);if(e.city.morale.current<100&&e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?45:25))for(;e.city.morale.current<100&&e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?45:25);)vr("adj_tax","sub");else e.city.morale.potential>=e.city.morale.cap+r&&e.civic.taxes.tax_ratee.race.governor.config.tax.min&&vr("adj_tax","sub")}}},storage:{name:t("gov_task_storage"),req(){return!!(Sa("storage_yard")&&e.tech.container&&e.resource.Crates.display)},task(){if($(this)[0].req()){if(e.resource.Crates.amounti+a){let s=Math.floor((e.resource[r].amount-i)/a);Cn("crate",s)}}if(Sa("warehouse")&&e.resource.Containers.display&&e.resource.Containers.amounta+r){let i=Math.floor((e.resource.Steel.amount-a)/r);Cn("container",i)}}}}},bal_storage:{name:t("gov_task_bal_storage"),req(){return!!(Sa("storage_yard")&&e.tech.container&&e.resource.Crates.display)},task(){if($(this)[0].req()){let r=e.resource.Crates.amount,a=r,i=e.resource.Containers.amount,s=i,n=0,c=Object.keys(e.resource).slice().reverse();c.forEach(function(_){e.resource[_].display&&e.resource[_].stackable?(r+=e.resource[_].crates,i+=e.resource[_].containers,n++):(e.resource[_].crates=0,e.resource[_].containers=0)});let l=Math.floor(r/n),o=Math.floor(i/n),d={Food:{m:.1,cap:100},Coal:{m:.25}};e.race.artifical&&delete d.Food,Object.keys(e.race.governor.config.bal_storage).forEach(function(_){let m=Number(e.race.governor.config.bal_storage[_]);_==="Coal"?d[_]={m:.125*m}:_==="Food"?d[_]={m:.05*m,cap:50*m}:e.resource[_]&&(d[_]={m})}),Object.keys(d).forEach(function(_){if(e.resource[_].display)if(d[_].hasOwnProperty("cap")){n--;{let m=Math.floor(l*d[_].m);d[_].hasOwnProperty("cap")&&m>d[_].cap&&(m=d[_].cap),e.resource[_].crates=m,r-=m}if(e.resource.Containers.display){let m=Math.floor(o*d[_].m);d[_].hasOwnProperty("cap")&&m>d[_].cap&&(m=d[_].cap),e.resource[_].containers=m,i-=m}}else n+=d[_].m-1}),l=n!==0?Math.floor(r/n):0,o=n!==0?Math.floor(i/n):0,r-=Math.floor(l*n),i-=Math.floor(o*n),c.forEach(function(_){if(!(d[_]&&d[_].hasOwnProperty("cap"))&&!(e.race.artifical&&_==="Food")&&e.resource[_].display&&e.resource[_].stackable){let m=d[_]?d[_].m:1,w=Math.floor(l>0?l*m:0);if(e.resource[_].crates=w,e.resource.Containers.display){let M=Math.floor(o>0?o*m:0);e.resource[_].containers=M}if(r>0&&m>=1){let M=Math.ceil(m/2);r0&&m>=1){let M=Math.ceil(m/2);i0&&(r>0||i>0);)h--,c.forEach(function(_){d[_]&&d[_].hasOwnProperty("cap")||e.race.artifical&&_==="Food"||e.resource[_].display&&e.resource[_].stackable&&(r>0&&(e.resource[_].crates++,r--),i>0&&(e.resource[_].containers++,i--))});e.resource.Crates.amount=r,e.resource.Containers.amount=i,n&&(e.resource.Crates.max-=a,e.resource.Containers.max-=s)}}},assemble:{name:t("gov_task_assemble"),req(){return!!(e.race.artifical&&(!e.tech.focus_cure||e.tech.focus_cure<7))},task(){$(this)[0].req()&&e.resource[e.race.species].max>e.resource[e.race.species].amount&&O.city.assembly.action()}},clone:{name:t("gov_task_clone"),req(){return!!e.tech.cloning},task(){$(this)[0].req()&&e.resource[e.race.species].max>e.resource[e.race.species].amount&&O.tauceti.tau_home.cloning_facility.action()}},merc:{name:t("gov_task_merc"),req(){return!!(Sa("garrison")&&e.tech.mercs)},task(){if($(this)[0].req()){let r=e.resource.Money.max*(e.race.governor.config.merc.reserve/100);for(;e.civic.garrison.max>e.civic.garrison.workers+e.race.governor.config.merc.buffer&&e.resource.Money.amount>=vr("m_cost")&&(e.resource.Money.amount+e.resource.Money.diff>=r||e.resource.Money.diff>=vr("m_cost"));)vr("m_buy")}}},spy:{name:t("gov_task_spy"),req(){return e.tech.isolation?!1:e.race.truepath&&e.tech.spy?!0:!!(e.tech.spy&&!e.tech.world_control&&!e.race.cataclysm)},task(){if($(this)[0].req()){let r=e.resource.Money.max*(e.race.governor.config.spy.reserve/100),a=e.race.truepath&&e.tech.rival?4:3,i=e.tech.world_control?3:0;for(let s=i;s=n&&(e.resource.Money.diff>=n||e.resource.Money.amount+e.resource.Money.diff>=r)&&vr("t_spy",s)}}}},spyop:{name:t("gov_task_spyop"),req(){return e.tech.isolation?!1:e.race.truepath&&e.tech.spy&&e.tech.spy>=2?!0:!!(e.tech.spy&&e.tech.spy>=2&&!e.tech.world_control&&!e.race.cataclysm)},task(){if($(this)[0].req()){let r=e.race.truepath&&e.tech.rival?[0,1,2,3]:[0,1,2];e.tech.world_control&&(r=[3]),r.forEach(function(a){e.civic.foreign[`gov${a}`].sab===0&&e.civic.foreign[`gov${a}`].spy>0&&!e.civic.foreign[`gov${a}`].anx&&!e.civic.foreign[`gov${a}`].buy&&!e.civic.foreign[`gov${a}`].occ&&e.race.governor.config.spyop[`gov${a}`].every(function(i){switch(i){case"influence":if(e.civic.foreign[`gov${a}`].hstl>0&&e.civic.foreign[`gov${a}`].spy>1)return vr("s_influence",a),!1;break;case"sabotage":if(e.civic.foreign[`gov${a}`].mil>50)return vr("s_sabotage",a),!1;break;case"incite":if(e.civic.foreign[`gov${a}`].unrest<100&&e.civic.foreign[`gov${a}`].spy>2&&a<3)return vr("s_incite",a),!1;break}return!0})})}}},slave:{name:t("gov_task_slave"),req(){return!!(!e.race.orbit_decayed&&Sa("slave_market")&&e.race.slaver&&e.city.slave_pen)},task(){let r=e.resource.Money.max*(e.race.governor.config.slave.reserve/100),a=25e3;e.race.inflation&&(a*=1+e.race.inflation/100);let i=ge("extravagant",0);i&&(a*=1+i/100),$(this)[0].req()&&e.resource.Money.amount>=a&&(e.resource.Money.diff>=a||e.resource.Money.amount+e.resource.Money.diff>=r)&&e.city.slave_pen.count*4>e.resource.Slave.amount&&O.city.slave_market.action()}},sacrifice:{name:t("gov_task_sacrifice"),req(){return!!(Sa("s_alter")&&e.city.hasOwnProperty("s_alter")&&e.city.s_alter.count>=1)},task(){$(this)[0].req()&&e.resource[e.race.species].amount===e.resource[e.race.species].max&&(!e.race.kindling_kindred&&!e.race.smoldering&&e.city.s_alter.harvest<=1e4||e.city.s_alter.mind<=1e4||e.city.s_alter.mine<=1e4||e.city.s_alter.rage<=1e4||e.city.s_alter.regen<=1e4)&&O.city.s_alter.action()}},horseshoe:{name(){return t(`city_${Wr(!0)}`,[Wr(!1)])},req(){return!!e.race.hooved},task(){let r=O.city.horseshoe.cost;if($(this)[0].req()&&Tt(r)){r=jr(O.city.horseshoe);let a="Copper",i=10;Object.keys(r).forEach(function(s){r[s]()>0&&(a=s,i=r[s]())}),e.resource[a].amount>i&&(e.resource[a].diff>=i||e.resource[a].amount+e.resource[a].diff>=e.resource[a].max)&&O.city.horseshoe.action()}}},trash:{name:t("gov_task_trash"),req(){return!!(e.interstellar.mass_ejector&&e.interstellar.mass_ejector.count>=1)},task(){let r=function(i){return e.race.universe==="magic"?Mt[i]:["Elerium","Infernite"].includes(i)?Mt[i]*10:Mt[i]},a=k.mass_ejector*1e3;Object.keys(Mt).sort((i,s)=>r(i)0&&(n=0),e.race.governor.config.trash[i]||e.interstellar.mass_ejector.hasOwnProperty(i)&&e.resource[i].display&&e.resource[i].max>0&&e.interstellar.mass_ejector[i]+e.resource[i].diff>0&&e.resource[i].amount+s-n>=e.resource[i].max*.999-1){let c=e.resource[i].amount+s-n>=e.resource[i].max*.999-1||e.race.governor.config.trash[i]&&!e.race.governor.config.trash[i].s?Math.floor(e.interstellar.mass_ejector[i]+e.resource[i].diff):0;e.race.governor.config.trash[i]&&c=e.resource[i].max*.999-1?c:c-Math.abs(e.race.governor.config.trash[i].v)),c>a&&(c=a),c<0&&(c=0),e.race.artifical&&i==="Food"&&(c=0),e.interstellar.mass_ejector[i]=c,a-=c}else e.interstellar.mass_ejector[i]=0}),e.interstellar.mass_ejector.total=k.mass_ejector*1e3-a}},mech:{name:t("gov_task_mech"),req(){return!!(e.stats.achieve.hasOwnProperty("corrupted")&&e.stats.achieve.corrupted.l>0&&Jc("prtl_spire","mechbay")&&e.portal.hasOwnProperty("mechbay"))},task(){if($(this)[0].req()){let r="large",a=ha(r,!1),i=a.c,s=a.s,n=Da(r),c={type:{}};["small","medium","large","titan","collector"].forEach(function(o){c.type[o]=0,c[o]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach(function(d){c[o].chassis[d]=0}),["plasma","laser","kinetic","shotgun","missile","flame","sonic","tesla"].map(d=>({sort:Math.random(),value:d})).sort((d,h)=>d.sort-h.sort).map(d=>d.value).forEach(function(d){c[o].weapon[d]=0}),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach(function(d){c[o].equip[d]=0})}),e.portal.mechbay.mechs.forEach(function(o){c.type[o.size]++,c[o.size].chassis[o.chassis]++,o.hardpoint.forEach(function(d){c[o.size].weapon[d]++}),o.equip.forEach(function(d){c[o.size].equip[d]++})}),c.type.large>=6&&c.type.small<12||c.type.large>=12&&c.type.titan>=2&&c.type.small<24?(r="small",a=ha(r,!1),i=a.c,s=a.s,n=Da(r)):c.type.large>=6&&c.type.medium<12?(r="medium",a=ha(r,!1),i=a.c,s=a.s,n=Da(r)):c.type.large>=12&&c.type.titan<2&&(a=ha("titan",!1),a.c<=e.portal.purifier.sup_max&&(r="titan",i=a.c,s=a.s,n=Da(r)));let l=e.portal.mechbay.max-e.portal.mechbay.bay;if(l=3){if(e.queue.queue.some(o=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(o.id)))return;for(let o=0;oe.portal.purifier.sup_max&&(_=e.portal.purifier.sup_max),_>=i&&e.resource.Soul_Gem.amount+h>=s){if(e.resource.Soul_Gem.amount+=h,e.resource.Soul_Gem.amount-=s,e.portal.purifier.supply=_,e.portal.purifier.supply-=i,e.portal.mechbay.mechs[o].infernal=!0,d.size==="small"&&d.equip.length===0)e.portal.mechbay.mechs[o].equip.push("special");else if(d.size==="medium"&&d.equip.length===1||d.size==="large"&&d.equip.length===2||d.size==="titan"&&d.equip.length<5){let m="???";Object.keys(c[r].equip).forEach(function(w){(m==="???"||c[r].equip[w]=i&&l>=n&&e.resource.Soul_Gem.amount>=s){let o=99,d="hover";Object.keys(c[r].chassis).forEach(function(M){c[r].chassis[M]0){let s=e.city.power<0?Math.abs(e.city.power)+i:i-e.city.power;e.race.replicator.pow-=s,e.race.replicator.pow<0&&(e.race.replicator.pow=0)}else e.city.power>i&&e.race.replicator.powa&&(e.race.replicator.pow=a)):e.race.replicator.pow>a&&(e.race.replicator.pow=a);e.race.replicator.pow=Math.floor(e.race.replicator.pow)}let r=!1;for(let a=0;e.race.governor.config.replicate.res.que&&ae.resource[i].display),e.race.governor.config.replicate.res.neg&&e.resource[a[0]].diff<0&&(e.resource[a[0]].amount<=e.resource[a[0]].max*.95||e.resource[a[0]].max===-1))e.race.replicator.res=a[0];else if(e.resource[e.race.replicator.res].max!==-1&&e.race.governor.config.replicate.res.cap&&e.resource[e.race.replicator.res].amount>=e.resource[e.race.replicator.res].max){let i=a.filter(s=>e.resource[s].max>0);for(let s=0;se.resource[n].max===-1);s.length>0&&(e.race.replicator.res=s[0])}}}}}};function Sn(){switch(e.city.calendar.moon){case 0:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-1"):$("#moon").removeClass("wi-moon-waning-crescent-6"),$("#moon").addClass("wi-moon-new");break;case 1:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-2"):$("#moon").removeClass("wi-moon-new"),$("#moon").addClass("wi-moon-waxing-crescent-1");break;case 2:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-3"):$("#moon").removeClass("wi-moon-waxing-crescent-1"),$("#moon").addClass("wi-moon-waxing-crescent-2");break;case 3:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-4"):$("#moon").removeClass("wi-moon-waxing-crescent-2"),$("#moon").addClass("wi-moon-waxing-crescent-3");break;case 4:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-5"):$("#moon").removeClass("wi-moon-waxing-crescent-3"),$("#moon").addClass("wi-moon-waxing-crescent-4");break;case 5:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-6"):$("#moon").removeClass("wi-moon-waxing-crescent-4"),$("#moon").addClass("wi-moon-waxing-crescent-5");break;case 6:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-first-quarter"):$("#moon").removeClass("wi-moon-waxing-crescent-5"),$("#moon").addClass("wi-moon-waxing-crescent-6");break;case 7:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-crescent-6"),$("#moon").addClass("wi-moon-first-quarter");break;case 8:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-2"):$("#moon").removeClass("wi-moon-first-quarter"),$("#moon").addClass("wi-moon-waxing-gibbous-1");break;case 9:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-3"):$("#moon").removeClass("wi-moon-waxing-gibbous-1"),$("#moon").addClass("wi-moon-waxing-gibbous-2");break;case 10:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-4"):$("#moon").removeClass("wi-moon-waxing-gibbous-2"),$("#moon").addClass("wi-moon-waxing-gibbous-3");break;case 11:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-5"):$("#moon").removeClass("wi-moon-waxing-gibbous-3"),$("#moon").addClass("wi-moon-waxing-gibbous-4");break;case 12:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-6"):$("#moon").removeClass("wi-moon-waxing-gibbous-4"),$("#moon").addClass("wi-moon-waxing-gibbous-5");break;case 13:le($("#moon")),e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-full"):$("#moon").removeClass("wi-moon-waxing-gibbous-5"),$("#moon").addClass("wi-moon-waxing-gibbous-6");break;case 14:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-gibbous-6");let a=jt(2);a.length>0?$("#moon").append(a):$("#moon").addClass("wi-moon-full");break;case 15:le($("#moon")),e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-2"):$("#moon").removeClass("wi-moon-full"),$("#moon").addClass("wi-moon-waning-gibbous-1");break;case 16:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-3"):$("#moon").removeClass("wi-moon-waning-gibbous-1"),$("#moon").addClass("wi-moon-waning-gibbous-2");break;case 17:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-4"):$("#moon").removeClass("wi-moon-waning-gibbous-2"),$("#moon").addClass("wi-moon-waning-gibbous-3");break;case 18:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-5"):$("#moon").removeClass("wi-moon-waning-gibbous-3"),$("#moon").addClass("wi-moon-waning-gibbous-4");break;case 19:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-6"):$("#moon").removeClass("wi-moon-waning-gibbous-4"),$("#moon").addClass("wi-moon-waning-gibbous-5");break;case 20:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-third-quarter"):$("#moon").removeClass("wi-moon-waning-gibbous-5"),$("#moon").addClass("wi-moon-waning-gibbous-6");break;case 21:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-1"):$("#moon").removeClass("wi-moon-waning-gibbous-6"),$("#moon").addClass("wi-moon-third-quarter");break;case 22:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-2"):$("#moon").removeClass("wi-moon-third-quarter"),$("#moon").addClass("wi-moon-waning-crescent-1");break;case 23:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-3"):$("#moon").removeClass("wi-moon-waning-crescent-1"),$("#moon").addClass("wi-moon-waning-crescent-2");break;case 24:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-4"):$("#moon").removeClass("wi-moon-waning-crescent-2"),$("#moon").addClass("wi-moon-waning-crescent-3");break;case 25:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-5"):$("#moon").removeClass("wi-moon-waning-crescent-3"),$("#moon").addClass("wi-moon-waning-crescent-4");break;case 26:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-6"):$("#moon").removeClass("wi-moon-waning-crescent-4"),$("#moon").addClass("wi-moon-waning-crescent-5");break;case 27:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-new"):$("#moon").removeClass("wi-moon-waning-crescent-5"),$("#moon").addClass("wi-moon-waning-crescent-6");break}$("#temp").removeClass("wi-thermometer"),$("#temp").removeClass("wi-thermometer-exterior"),e.city.calendar.temp===0?$("#temp").addClass("wi-thermometer-exterior"):e.city.calendar.temp===2&&$("#temp").addClass("wi-thermometer"),$("#weather").removeClass("wi-day-sunny"),$("#weather").removeClass("wi-day-windy"),$("#weather").removeClass("wi-cloud"),$("#weather").removeClass("wi-cloudy-gusts"),$("#weather").removeClass("wi-rain"),$("#weather").removeClass("wi-storm-showers"),$("#weather").removeClass("wi-snow"),$("#weather").removeClass("wi-snow-wind");let r;e.city.calendar.weather===0?e.city.calendar.temp===0?r=e.city.calendar.wind===0?"wi-snow":"wi-snow-wind":r=e.city.calendar.wind===0?"wi-rain":"wi-storm-showers":e.city.calendar.weather===1?r=e.city.calendar.wind===0?"wi-cloud":"wi-cloudy-gusts":e.city.calendar.weather===2&&(r=e.city.calendar.wind===0?"wi-day-sunny":"wi-day-windy"),$("#weather").addClass(r)}function gi(r){switch(r){case"moon":return Hl();case"weather":return Ul();case"temp":return Wl();case"sign":return Ql();case"astrology":return Zl()}}function Hl(){if(e.race.orbit_decayed)return t("moon0");if(e.city.calendar.moon===0)return t("moon1");if(e.city.calendar.moon>0&&e.city.calendar.moon<7)return t("moon2");if(e.city.calendar.moon===7)return t("moon3");if(e.city.calendar.moon>7&&e.city.calendar.moon<14)return t("moon4");if(e.city.calendar.moon===14)return t("moon5");if(e.city.calendar.moon>14&&e.city.calendar.moon<21)return t("moon6");if(e.city.calendar.moon===21)return t("moon7");if(e.city.calendar.moon>21)return t("moon8")}function Ul(){switch(e.city.calendar.weather){case 0:return e.city.calendar.temp===0?e.city.calendar.wind===1?t("snowstorm"):t("snow"):e.city.calendar.wind===1?t("thunderstorm"):t("rain");case 1:return e.city.calendar.wind===1?t("cloudy_windy"):t("cloudy");case 2:return e.city.calendar.wind===1?t("sunny_windy"):t("sunny")}}function Wl(){switch(e.city.calendar.temp){case 0:return t("cold");case 1:return t("moderate");case 2:return t("hot")}}function Zt(r){switch(r){case"aries":return[10];case"taurus":return[2];case"gemini":return[20];case"cancer":return[5];case"leo":return[4];case"virgo":return[15];case"libra":return[25];case"scorpio":return[12,1];case"sagittarius":return[5];case"capricorn":return[10];case"aquarius":return[20];case"pisces":return[49,25]}}function ma(){let r=new Date;return r.getMonth()===0&&r.getDate()>=20||r.getMonth()===1&&r.getDate()<=18?"aquarius":r.getMonth()===1&&r.getDate()>=19||r.getMonth()===2&&r.getDate()<=20?"pisces":r.getMonth()===2&&r.getDate()>=21||r.getMonth()===3&&r.getDate()<=19?"aries":r.getMonth()===3&&r.getDate()>=20||r.getMonth()===4&&r.getDate()<=20?"taurus":r.getMonth()===4&&r.getDate()>=21||r.getMonth()===5&&r.getDate()<=21?"gemini":r.getMonth()===5&&r.getDate()>=22||r.getMonth()===6&&r.getDate()<=22?"cancer":r.getMonth()===6&&r.getDate()>=23||r.getMonth()===7&&r.getDate()<=22?"leo":r.getMonth()===7&&r.getDate()>=23||r.getMonth()===8&&r.getDate()<=22?"virgo":r.getMonth()===8&&r.getDate()>=23||r.getMonth()===9&&r.getDate()<=22?"libra":r.getMonth()===9&&r.getDate()>=23||r.getMonth()===10&&r.getDate()<=22?"scorpio":r.getMonth()===10&&r.getDate()>=23||r.getMonth()===11&&r.getDate()<=21?"sagittarius":r.getMonth()===11&&r.getDate()>=22||r.getMonth()===0&&r.getDate()<=19?"capricorn":"time itself is broken"}function Ql(){let r=ma(),a=`
${t("sign_description",[t(`sign_${r}`),t(`sign_${r}_desc`)])}
`;return a+=`
${Vl(r)}
`,a}function Vl(r){return r==="pisces"||r==="cancer"?t(`sign_${r}_effect`):t(`sign_${r}_effect`,[Zt(r)[0]])}function Zl(){let r=ma();return t(`sign_${r}_symbol`)}function Yc(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"mad"});let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ot("mad");e.stats.mad++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),ie("apocalypse"),ie("squished",!0),ie(`extinct_${r}`),e.civic.govern.type==="anarchy"&&ie("anarchist"),e.city.biome==="hellscape"&&F[e.race.species].type!=="demonic"&&De("take_no_advice"),e.race.truepath&&ie("ashanddust"),Tr();let o=e.race.hasOwnProperty("srace")?e.race.srace:!1,d=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,rapid_mutation:1,ancient_ruins:1,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),o&&(e.race.srace=o),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function Xc(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"bioseed"});let r=e.race.species,a=e.race.gods,i=F[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=ot("bioseed");e.stats.bioseed++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),ie("seeder"),ie(`biome_${n}`),c.forEach(function(M){Re.hasOwnProperty(M)&&ie(`atmo_${M}`)}),ie(`genus_${i}`),e.race.gravity_well&&ie("escape_velocity"),e.race.truepath&&ie("exodus"),c.includes("dense")&&e.race.universe==="heavy"&&ie("double_density"),e.race.junker&&e.race.species==="junker"&&De("organ_harvester"),e.city.biome==="hellscape"&&F[e.race.species].type!=="demonic"&&De("ill_advised"),typeof e.tech.world_control>"u"&&ie("cult_of_personality"),e.race.cataclysm&&ie("iron_will",!1,5),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross");let o=0,d=0;switch(Object.keys(e.city.geology).forEach(function(M){e.city.geology[M]>0?o++:e.city.geology[M]<0&&d++}),o>=4&&ie("miners_dream"),d>=3&&De("rocky_road"),e.race.steelen&&e.race.steelen>=1&&ie("steelen"),e.race.universe){case"micro":e.race.small||e.race.compact?ie("macro",!0):ie("marble",!0);break;default:break}Tr();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,_=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,m=e.starDock.probes.count+1,w=e.starDock.hasOwnProperty("geck")?e.starDock.geck.count:0;e.stats.achieve.explorer&&(m+=e.stats.achieve.explorer.l),e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!0,probes:m,geck:w,seed:Math.floor(J(1e4)),ascended:!1},_>0&&(e.race.corruption=_),h&&(e.race.srace=h),aa({orbit:s,biome:n,ptrait:c,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function eo(){if(e.city.ptrait.includes("unstable")&&e.tech.quaked){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),wt("reset",{end:"cataclysm"}),Kr();let r=ot("cataclysm");e.stats.cataclysm++,Vr(),e.prestige.Phage.count+=r.phage,e.stats.phage+=r.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=r.plasmid,e.stats.antiplasmid+=r.plasmid):(e.prestige.Plasmid.count+=r.plasmid,e.stats.plasmid+=r.plasmid),ie("squished",!0),ie(`extinct_${e.race.species}`),e.city.biome==="hellscape"&&F[e.race.species].type!=="demonic"&&De("take_no_advice"),Tr(),ie("shaken"),e.race.cataclysm&&ie("failed_history");let a=e.race.hasOwnProperty("srace")?e.race.srace:!1,i=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:e.race.species,gods:e.race.gods,old_gods:e.race.old_gods,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},i>0&&(e.race.corruption=i),a&&(e.race.srace=a),aa({orbit:e.city.calendar.orbit,biome:e.city.biome,ptrait:e.city.ptrait,geology:e.city.geology}),e.race.universe==="antimatter"?e.race.weak_mastery=1:e.race.no_plasmid=1;let s=["crispr","trade","craft"];for(let n=0;n1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(J(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),aa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function ro(){if(e.tech.syphon>=80&&e.race.universe==="magic"){e.tech.syphon=79,e.arpa.syphon.rank=79,e.arpa.syphon.complete=99,e.queue.queue=[],e.stats.current=Date.now(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"vacuum"}),ie(`extinct_${e.race.species}`),ie("pw_apocalypse"),e.space.hasOwnProperty("spaceport")&&e.space.spaceport.count===0&&ie("red_dead"),!e.race.modified&&e.race.species==="balorg"&&ie("pass"),e.race.junker&&e.race.species==="junker"&&De("the_misery"),e.race.decay&&ie("dissipated"),e.race.steelen&&De("steelem");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=ot("vacuum");Tr(),e.stats.blackhole++,Vr(),e.prestige.Phage.count+=c.phage,e.stats.phage+=c.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=c.plasmid,e.stats.antiplasmid+=c.plasmid):(e.prestige.Plasmid.count+=c.plasmid,e.stats.plasmid+=c.plasmid),e.prestige.Dark.count=+(e.prestige.Dark.count+c.dark).toFixed(3),e.stats.dark=+(e.stats.dark+c.dark).toFixed(3),e.stats.universes++;let l=e.race.hasOwnProperty("srace")?e.race.srace:!1,o=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(J(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),aa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function ao(){Kr(),wt("reset",{end:"ascend"});let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ot("ascend");e.stats.ascend++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),e.prestige.Harmony.count=parseFloat((e.prestige.Harmony.count+l.harmony).toFixed(2)),e.stats.harmony=parseFloat((e.stats.harmony+l.harmony).toFixed(2)),n.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let o=0;Object.keys(e.city.geology).forEach(function(_){e.city.geology[_]>0&&o++}),o>=4&&ie("miners_dream"),(!e.galaxy.hasOwnProperty("dreadnought")||e.galaxy.dreadnought.count===0)&&ie("dreaded"),!e.race.modified&&(e.race.species==="synth"||e.race.species==="nano")&&e.race.emfield&&De("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Tr();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),Object.keys(c).forEach(function(_){c[_]+=.02}),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Ts(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"descension"}),ie("squished",!0),ie(`extinct_${e.race.species}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("nightmare"):ie("corrupted"),F[e.race.species].type==="angelic"&&De("twisted"),e.race.junker&&e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.cataclysm&&De("finish_line"),e.race.ooze&&e.race.species==="sludge"&&De("slime_lord"),e.race.fasting&&e.stats.starved<=0&&De("immortal");let r=ot("descend");e.prestige.Artifact.count+=r.artifact,e.stats.artifact+=r.artifact;let a=it();e.stats.spire.hasOwnProperty(a)&&(e.stats.spire[a].hasOwnProperty("lord")?e.stats.spire[a].lord++:e.stats.spire[a].lord=1,e.tech.dl_reset?e.stats.spire[a].dlstr=0:e.stats.spire[a].hasOwnProperty("dlstr")?e.stats.spire[a].dlstr++:e.stats.spire[a].dlstr=1);let i=e.race.species,s=e.race.gods,n=e.city.calendar.orbit,c=e.city.biome,l=e.city.ptrait,o=e.city.geology;e.stats.descend++,Vr(),Tr();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1;e.race={species:"protoplasm",gods:i,old_gods:s,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d&&(e.race.srace=d),aa({orbit:n,biome:c,ptrait:l,geology:o}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function io(r){Kr(),wt("reset",{end:"terraform"});let a=e.race.species,i=e.race.gods,s=e.city.calendar.orbit,n=r.biome,c=r.traitlist,l=r.geology,o=ot("terraform");e.stats.terraform++,Vr(),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Harmony.count=parseFloat((e.prestige.Harmony.count+o.harmony).toFixed(2)),e.stats.harmony=parseFloat((e.stats.harmony+o.harmony).toFixed(2)),c.forEach(function(m){Re.hasOwnProperty(m)&&ie(`atmo_${m}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let d=0;Object.keys(e.city.geology).forEach(function(m){e.city.geology[m]>0&&d++}),d>=4&&ie("miners_dream"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Tr();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,_=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:i,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},_>0&&(e.race.corruption=_),h&&(e.race.srace=h),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function so(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"ai apocalypse"}),ie(`extinct_${e.race.species}`),ie("obsolete"),ie("squished",!0),e.race.junker&&e.race.species==="junker"&&De("the_misery");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ot("ai");Tr(),e.stats.aiappoc++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let o=F[r].type!=="synthetic"?r:e.race.hasOwnProperty("srace")?e.race.srace:r;e.stats.synth[o]=!0;let d=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,srace:o,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function no(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"matrix"});let r=e.race.species,a=e.race.gods,i=F[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ot("matrix");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("bluepill"),jn(),Tr(),e.stats.matrix++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function co(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"retired"});let r=e.race.species,a=e.race.gods,i=F[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ot("retired");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("retired"),jn(),Tr(),e.stats.retire++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oo(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"eden"});let r=e.race.species,a=e.race.gods,i=F[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ot("eden");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("adam_eve"),jn(),Tr(),e.stats.eden++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function aa(r){e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:r.orbit},biome:r.biome,ptrait:r.ptrait},r.geology&&(e.city.geology=r.geology),e.tech={theology:1},Mn(),e.new=!0,e.seed=Math.rand(0,1e4)}function jn(){let r=it();e.race.womling_friend?(r!=="m"&&e.stats.womling.friend.l++,r!=="l"&&(e.stats.womling.friend.hasOwnProperty(r)||(e.stats.womling.friend[r]=0),e.stats.womling.friend[r]++)):e.race.womling_lord?(r!=="m"&&e.stats.womling.lord.l++,r!=="l"&&(e.stats.womling.lord.hasOwnProperty(r)||(e.stats.womling.lord[r]=0),e.stats.womling.lord[r]++)):e.race.womling_god&&(r!=="m"&&e.stats.womling.god.l++,r!=="l"&&(e.stats.womling.god.hasOwnProperty(r)||(e.stats.womling.god[r]=0),e.stats.womling.god[r]++)),e.stats.womling.friend.l>0&&e.stats.womling.lord.l>0&&e.stats.womling.god.l>0&&ie("overlord",r==="m",Jt(),"l"),e.stats.womling.friend[r]>0&&e.stats.womling.lord[r]>0&&e.stats.womling.god[r]>0&&ie("overlord",r==="m",Jt(),r)}function Ii(r){if(e.civic.taxes||(e.civic.taxes={tax_rate:20,display:!1}),!r&&!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0))){var a=$('
'),i=$(` + `)})}})}{e.race.governor.config.hasOwnProperty("tax")||(e.race.governor.config.tax={min:20});let c=$(`
${t("gov_task_tax")}
`);n.append(c);let l=$('
');c.append(l),l.append($(`${t("gov_task_tax_min")}`))}{e.race.governor.config.hasOwnProperty("slave")||(e.race.governor.config.slave={reserve:100});let c=$(`
${t("gov_task_slave")}
`);n.append(c);let l=$('
');c.append(l),l.append($(`${t("gov_task_merc_reserve")}`))}{e.race.governor.config.hasOwnProperty("trash")||(e.race.governor.config.trash={}),["Infernite","Elerium","Copper","Iron"].forEach(function(o){(!e.race.governor.config.trash.hasOwnProperty(o)||typeof e.race.governor.config.trash[o]!="object"||e.race.governor.config.trash[o]===null)&&(e.race.governor.config.trash[o]={v:0,s:!0})});let c=$(`
${t("gov_task_trash")}
`);n.append(c);let l=$('
');c.append(l),Object.keys(e.race.governor.config.trash).forEach(function(o){l.append($(`
`))})}{e.race.governor.config.hasOwnProperty("replicate")||(e.race.governor.config.replicate={}),e.race.governor.config.replicate.hasOwnProperty("pow")||(e.race.governor.config.replicate.pow={on:!1,cap:1e4,buffer:0}),e.race.governor.config.replicate.hasOwnProperty("res")||(e.race.governor.config.replicate.res={que:!0,neg:!0,cap:!0});let c=$(`
${t("gov_task_replicate")}
`);n.append(c);let l=$('
');c.append(l),l.append($(`
${t("gov_task_replicate_auto")}
`)),l.append($(`${t("gov_task_replicate_pmax")}`)),l.append($(`${t("gov_task_replicate_buff")}`));let o=$('
');c.append(o),o.append($(`
${t("gov_task_replicate_que")}
`)),o.append($(`
${t("gov_task_replicate_neg")}
`)),o.append($(`
${t("gov_task_replicate_cap")}
`))}D({el:"#govOffice",data:{t:e.race.governor.tasks,c:e.race.governor.config,r:e.resource},methods:{setTask(c,l){e.race.governor.tasks[`t${l}`]=c,wt("govtask",{task:c}),D({el:"#race"},"update")},showTask(c){return Object.values(e.race.governor.tasks).includes(c)},activeTask(c){let l=[];return e.race.hasOwnProperty("governor")&&Object.keys(e.race.governor.tasks).forEach(function(o){e.race.governor.tasks[o]!=="none"&&l.push(e.race.governor.tasks[o])}),!l.includes(c)},showStrRes(c){return e.resource[c].display},bStrEx(){return e.race.governor.config.bal_storage.adv?"m":""},fire(){let l=(10+(e.race.governor.hasOwnProperty("f")?e.race.governor.f:0))**2-50,o=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[o].count>=l&&(e.prestige[o].count-=l,e.race.governor.candidates=Vc(10),e.race.governor.hasOwnProperty("f")?e.race.governor.f++:e.race.governor.f=1,delete e.race.governor.g,delete e.race.governor.tasks,Qr(!1,["city-amphitheatre","city-apartment"]),zr(),ra(),Ot())},fireText(){let l=(10+(e.race.governor.hasOwnProperty("f")?e.race.governor.f:0))**2-50;return`
${t("governor_fire")}
${l} ${t(e.race.universe==="antimatter"?"resource_AntiPlasmid_plural_name":"resource_Plasmid_plural_name")}
`},trashStrat(c){e.race.governor.config.trash[c].s=!e.race.governor.config.trash[c].s},trashLabel(c){return t(e.race.governor.config.trash[c].s?"gov_task_trash_max":"gov_task_trash_min",[e.resource[c].name])}},filters:{label(c){return _a[c]?typeof _a[c].name=="string"?_a[c].name:_a[c].name():t(`gov_task_${c}`)}}}),pe("govOffice",function(){let c="";return Object.keys(Na[e.race.governor.g.bg].traits).forEach(function(l){c+=(cs[l].hasOwnProperty("effect")?cs[l].effect():"")+" "}),c},{elm:"#govOffice .bg"}),Object.keys(e.civic.foreign).forEach(function(c){Bl(c)})}function Rl(){let r=$('
');$("#r_govern1").append(r),(!e.race.hasOwnProperty("governor")||!e.race.governor.hasOwnProperty("candidates"))&&(e.race.governor={candidates:Vc(10)}),r.append($(`
${t("governor_candidate")}${t("governor_background")}
`));for(let a=0;a${i.t} ${i.n}${Na[i.bg].name}
`))}D({el:"#candidates",data:e.race.governor,methods:{appoint(a){if(e.genes.governor&&e.tech.governor){let i=e.race.governor.candidates[a];e.race.governor.g=i,delete e.race.governor.candidates,e.race.governor.tasks={t0:"none",t1:"none",t2:"none",t3:"none",t4:"none",t5:"none"},Qr(!1,["city-amphitheatre","city-apartment"]),zr(),ra(),Ot(),wt("governor",{appoint:e.race.governor.g.bg})}}}}),e.race.governor.candidates.forEach(function(a){pe(`candidates-${a.bg}`,function(){let i="";return Object.keys(Na[a.bg].traits).forEach(function(s){i+=(cs[s].hasOwnProperty("effect")?cs[s].effect():"")+" "}),i},{elm:`#candidates .${a.bg} .bg`})})}function ge(r,a){return e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("g")&&Na[e.race.governor.g.bg].traits[r]?cs[r].vars()[a]:!1}function qr(r){if(e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks)for(let a=0;a=40&&(r+=.5),e.civic.govern.type==="oligarchy"&&e.civic.taxes.tax_rate>=20&&(r-=.5);let a=vr("tax_cap",!1);if(e.city.morale.current<100&&e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?45:25))for(;e.city.morale.current<100&&e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?45:25);)vr("adj_tax","sub");else e.city.morale.potential>=e.city.morale.cap+r&&e.civic.taxes.tax_ratee.race.governor.config.tax.min&&vr("adj_tax","sub")}}},storage:{name:t("gov_task_storage"),req(){return!!(Sa("storage_yard")&&e.tech.container&&e.resource.Crates.display)},task(){if($(this)[0].req()){if(e.resource.Crates.amounti+a){let s=Math.floor((e.resource[r].amount-i)/a);Cn("crate",s)}}if(Sa("warehouse")&&e.resource.Containers.display&&e.resource.Containers.amounta+r){let i=Math.floor((e.resource.Steel.amount-a)/r);Cn("container",i)}}}}},bal_storage:{name:t("gov_task_bal_storage"),req(){return!!(Sa("storage_yard")&&e.tech.container&&e.resource.Crates.display)},task(){if($(this)[0].req()){let r=e.resource.Crates.amount,a=r,i=e.resource.Containers.amount,s=i,n=0,c=Object.keys(e.resource).slice().reverse();c.forEach(function(_){e.resource[_].display&&e.resource[_].stackable?(r+=e.resource[_].crates,i+=e.resource[_].containers,n++):(e.resource[_].crates=0,e.resource[_].containers=0)});let l=Math.floor(r/n),o=Math.floor(i/n),d={Food:{m:.1,cap:100},Coal:{m:.25}};e.race.artifical&&delete d.Food,Object.keys(e.race.governor.config.bal_storage).forEach(function(_){let m=Number(e.race.governor.config.bal_storage[_]);_==="Coal"?d[_]={m:.125*m}:_==="Food"?d[_]={m:.05*m,cap:50*m}:e.resource[_]&&(d[_]={m})}),Object.keys(d).forEach(function(_){if(e.resource[_].display)if(d[_].hasOwnProperty("cap")){n--;{let m=Math.floor(l*d[_].m);d[_].hasOwnProperty("cap")&&m>d[_].cap&&(m=d[_].cap),e.resource[_].crates=m,r-=m}if(e.resource.Containers.display){let m=Math.floor(o*d[_].m);d[_].hasOwnProperty("cap")&&m>d[_].cap&&(m=d[_].cap),e.resource[_].containers=m,i-=m}}else n+=d[_].m-1}),l=n!==0?Math.floor(r/n):0,o=n!==0?Math.floor(i/n):0,r-=Math.floor(l*n),i-=Math.floor(o*n),c.forEach(function(_){if(!(d[_]&&d[_].hasOwnProperty("cap"))&&!(e.race.artifical&&_==="Food")&&e.resource[_].display&&e.resource[_].stackable){let m=d[_]?d[_].m:1,w=Math.floor(l>0?l*m:0);if(e.resource[_].crates=w,e.resource.Containers.display){let M=Math.floor(o>0?o*m:0);e.resource[_].containers=M}if(r>0&&m>=1){let M=Math.ceil(m/2);r0&&m>=1){let M=Math.ceil(m/2);i0&&(r>0||i>0);)h--,c.forEach(function(_){d[_]&&d[_].hasOwnProperty("cap")||e.race.artifical&&_==="Food"||e.resource[_].display&&e.resource[_].stackable&&(r>0&&(e.resource[_].crates++,r--),i>0&&(e.resource[_].containers++,i--))});e.resource.Crates.amount=r,e.resource.Containers.amount=i,n&&(e.resource.Crates.max-=a,e.resource.Containers.max-=s)}}},assemble:{name:t("gov_task_assemble"),req(){return!!(e.race.artifical&&(!e.tech.focus_cure||e.tech.focus_cure<7))},task(){$(this)[0].req()&&e.resource[e.race.species].max>e.resource[e.race.species].amount&&O.city.assembly.action()}},clone:{name:t("gov_task_clone"),req(){return!!e.tech.cloning},task(){$(this)[0].req()&&e.resource[e.race.species].max>e.resource[e.race.species].amount&&O.tauceti.tau_home.cloning_facility.action()}},merc:{name:t("gov_task_merc"),req(){return!!(Sa("garrison")&&e.tech.mercs)},task(){if($(this)[0].req()){let r=e.resource.Money.max*(e.race.governor.config.merc.reserve/100);for(;e.civic.garrison.max>e.civic.garrison.workers+e.race.governor.config.merc.buffer&&e.resource.Money.amount>=vr("m_cost")&&(e.resource.Money.amount+e.resource.Money.diff>=r||e.resource.Money.diff>=vr("m_cost"));)vr("m_buy")}}},spy:{name:t("gov_task_spy"),req(){return e.tech.isolation?!1:e.race.truepath&&e.tech.spy?!0:!!(e.tech.spy&&!e.tech.world_control&&!e.race.cataclysm)},task(){if($(this)[0].req()){let r=e.resource.Money.max*(e.race.governor.config.spy.reserve/100),a=e.race.truepath&&e.tech.rival?4:3,i=e.tech.world_control?3:0;for(let s=i;s=n&&(e.resource.Money.diff>=n||e.resource.Money.amount+e.resource.Money.diff>=r)&&vr("t_spy",s)}}}},spyop:{name:t("gov_task_spyop"),req(){return e.tech.isolation?!1:e.race.truepath&&e.tech.spy&&e.tech.spy>=2?!0:!!(e.tech.spy&&e.tech.spy>=2&&!e.tech.world_control&&!e.race.cataclysm)},task(){if($(this)[0].req()){let r=e.race.truepath&&e.tech.rival?[0,1,2,3]:[0,1,2];e.tech.world_control&&(r=[3]),r.forEach(function(a){e.civic.foreign[`gov${a}`].sab===0&&e.civic.foreign[`gov${a}`].spy>0&&!e.civic.foreign[`gov${a}`].anx&&!e.civic.foreign[`gov${a}`].buy&&!e.civic.foreign[`gov${a}`].occ&&e.race.governor.config.spyop[`gov${a}`].every(function(i){switch(i){case"influence":if(e.civic.foreign[`gov${a}`].hstl>0&&e.civic.foreign[`gov${a}`].spy>1)return vr("s_influence",a),!1;break;case"sabotage":if(e.civic.foreign[`gov${a}`].mil>50)return vr("s_sabotage",a),!1;break;case"incite":if(e.civic.foreign[`gov${a}`].unrest<100&&e.civic.foreign[`gov${a}`].spy>2&&a<3)return vr("s_incite",a),!1;break}return!0})})}}},slave:{name:t("gov_task_slave"),req(){return!!(!e.race.orbit_decayed&&Sa("slave_market")&&e.race.slaver&&e.city.slave_pen)},task(){let r=e.resource.Money.max*(e.race.governor.config.slave.reserve/100),a=25e3;e.race.inflation&&(a*=1+e.race.inflation/100);let i=ge("extravagant",0);i&&(a*=1+i/100),$(this)[0].req()&&e.resource.Money.amount>=a&&(e.resource.Money.diff>=a||e.resource.Money.amount+e.resource.Money.diff>=r)&&e.city.slave_pen.count*4>e.resource.Slave.amount&&O.city.slave_market.action()}},sacrifice:{name:t("gov_task_sacrifice"),req(){return!!(Sa("s_alter")&&e.city.hasOwnProperty("s_alter")&&e.city.s_alter.count>=1)},task(){$(this)[0].req()&&e.resource[e.race.species].amount===e.resource[e.race.species].max&&(!e.race.kindling_kindred&&!e.race.smoldering&&e.city.s_alter.harvest<=1e4||e.city.s_alter.mind<=1e4||e.city.s_alter.mine<=1e4||e.city.s_alter.rage<=1e4||e.city.s_alter.regen<=1e4)&&O.city.s_alter.action()}},horseshoe:{name(){return t(`city_${Wr(!0)}`,[Wr(!1)])},req(){return!!e.race.hooved},task(){let r=O.city.horseshoe.cost;if($(this)[0].req()&&Tt(r)){r=jr(O.city.horseshoe);let a="Copper",i=10;Object.keys(r).forEach(function(s){r[s]()>0&&(a=s,i=r[s]())}),e.resource[a].amount>i&&(e.resource[a].diff>=i||e.resource[a].amount+e.resource[a].diff>=e.resource[a].max)&&O.city.horseshoe.action()}}},trash:{name:t("gov_task_trash"),req(){return!!(e.interstellar.mass_ejector&&e.interstellar.mass_ejector.count>=1)},task(){let r=function(i){return e.race.universe==="magic"?Mt[i]:["Elerium","Infernite"].includes(i)?Mt[i]*10:Mt[i]},a=k.mass_ejector*1e3;Object.keys(Mt).sort((i,s)=>r(i)0&&(n=0),e.race.governor.config.trash[i]||e.interstellar.mass_ejector.hasOwnProperty(i)&&e.resource[i].display&&e.resource[i].max>0&&e.interstellar.mass_ejector[i]+e.resource[i].diff>0&&e.resource[i].amount+s-n>=e.resource[i].max*.999-1){let c=e.resource[i].amount+s-n>=e.resource[i].max*.999-1||e.race.governor.config.trash[i]&&!e.race.governor.config.trash[i].s?Math.floor(e.interstellar.mass_ejector[i]+e.resource[i].diff):0;e.race.governor.config.trash[i]&&c=e.resource[i].max*.999-1?c:c-Math.abs(e.race.governor.config.trash[i].v)),c>a&&(c=a),c<0&&(c=0),e.race.artifical&&i==="Food"&&(c=0),e.interstellar.mass_ejector[i]=c,a-=c}else e.interstellar.mass_ejector[i]=0}),e.interstellar.mass_ejector.total=k.mass_ejector*1e3-a}},mech:{name:t("gov_task_mech"),req(){return!!(e.stats.achieve.hasOwnProperty("corrupted")&&e.stats.achieve.corrupted.l>0&&Jc("prtl_spire","mechbay")&&e.portal.hasOwnProperty("mechbay"))},task(){if($(this)[0].req()){let r="large",a=ha(r,!1),i=a.c,s=a.s,n=Da(r),c={type:{}};["small","medium","large","titan","collector"].forEach(function(o){c.type[o]=0,c[o]={chassis:{},weapon:{},equip:{}},["hover","spider","wheel","tread","biped","quad"].forEach(function(d){c[o].chassis[d]=0}),["plasma","laser","kinetic","shotgun","missile","flame","sonic","tesla"].map(d=>({sort:Math.random(),value:d})).sort((d,h)=>d.sort-h.sort).map(d=>d.value).forEach(function(d){c[o].weapon[d]=0}),["shields","flare","seals","grapple","sonar","ablative","radiator","infrared","coolant","stabilizer"].forEach(function(d){c[o].equip[d]=0})}),e.portal.mechbay.mechs.forEach(function(o){c.type[o.size]++,c[o.size].chassis[o.chassis]++,o.hardpoint.forEach(function(d){c[o.size].weapon[d]++}),o.equip.forEach(function(d){c[o.size].equip[d]++})}),c.type.large>=6&&c.type.small<12||c.type.large>=12&&c.type.titan>=2&&c.type.small<24?(r="small",a=ha(r,!1),i=a.c,s=a.s,n=Da(r)):c.type.large>=6&&c.type.medium<12?(r="medium",a=ha(r,!1),i=a.c,s=a.s,n=Da(r)):c.type.large>=12&&c.type.titan<2&&(a=ha("titan",!1),a.c<=e.portal.purifier.sup_max&&(r="titan",i=a.c,s=a.s,n=Da(r)));let l=e.portal.mechbay.max-e.portal.mechbay.bay;if(l=3){if(e.queue.queue.some(o=>["portal-purifier","portal-port","portal-base_camp","portal-mechbay","portal-waygate"].includes(o.id)))return;for(let o=0;oe.portal.purifier.sup_max&&(_=e.portal.purifier.sup_max),_>=i&&e.resource.Soul_Gem.amount+h>=s){if(e.resource.Soul_Gem.amount+=h,e.resource.Soul_Gem.amount-=s,e.portal.purifier.supply=_,e.portal.purifier.supply-=i,e.portal.mechbay.mechs[o].infernal=!0,d.size==="small"&&d.equip.length===0)e.portal.mechbay.mechs[o].equip.push("special");else if(d.size==="medium"&&d.equip.length===1||d.size==="large"&&d.equip.length===2||d.size==="titan"&&d.equip.length<5){let m="???";Object.keys(c[r].equip).forEach(function(w){(m==="???"||c[r].equip[w]=i&&l>=n&&e.resource.Soul_Gem.amount>=s){let o=99,d="hover";Object.keys(c[r].chassis).forEach(function(M){c[r].chassis[M]0){let s=e.city.power<0?Math.abs(e.city.power)+i:i-e.city.power;e.race.replicator.pow-=s,e.race.replicator.pow<0&&(e.race.replicator.pow=0)}else e.city.power>i&&e.race.replicator.powa&&(e.race.replicator.pow=a)):e.race.replicator.pow>a&&(e.race.replicator.pow=a);e.race.replicator.pow=Math.floor(e.race.replicator.pow)}let r=!1;for(let a=0;e.race.governor.config.replicate.res.que&&ae.resource[i]&&e.resource[i].display),e.race.governor.config.replicate.res.neg&&a[0]&&e.resource[a[0]].diff<0&&(e.resource[a[0]].amount<=e.resource[a[0]].max*.95||e.resource[a[0]].max===-1))e.race.replicator.res=a[0];else if(e.resource[e.race.replicator.res].max!==-1&&e.race.governor.config.replicate.res.cap&&e.resource[e.race.replicator.res].amount>=e.resource[e.race.replicator.res].max){let i=a.filter(s=>e.resource[s].max>0);for(let s=0;se.resource[n].max===-1);s.length>0&&(e.race.replicator.res=s[0])}}}}}};function Sn(){switch(e.city.calendar.moon){case 0:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-1"):$("#moon").removeClass("wi-moon-waning-crescent-6"),$("#moon").addClass("wi-moon-new");break;case 1:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-2"):$("#moon").removeClass("wi-moon-new"),$("#moon").addClass("wi-moon-waxing-crescent-1");break;case 2:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-3"):$("#moon").removeClass("wi-moon-waxing-crescent-1"),$("#moon").addClass("wi-moon-waxing-crescent-2");break;case 3:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-4"):$("#moon").removeClass("wi-moon-waxing-crescent-2"),$("#moon").addClass("wi-moon-waxing-crescent-3");break;case 4:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-5"):$("#moon").removeClass("wi-moon-waxing-crescent-3"),$("#moon").addClass("wi-moon-waxing-crescent-4");break;case 5:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-crescent-6"):$("#moon").removeClass("wi-moon-waxing-crescent-4"),$("#moon").addClass("wi-moon-waxing-crescent-5");break;case 6:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-first-quarter"):$("#moon").removeClass("wi-moon-waxing-crescent-5"),$("#moon").addClass("wi-moon-waxing-crescent-6");break;case 7:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-crescent-6"),$("#moon").addClass("wi-moon-first-quarter");break;case 8:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-2"):$("#moon").removeClass("wi-moon-first-quarter"),$("#moon").addClass("wi-moon-waxing-gibbous-1");break;case 9:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-3"):$("#moon").removeClass("wi-moon-waxing-gibbous-1"),$("#moon").addClass("wi-moon-waxing-gibbous-2");break;case 10:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-4"):$("#moon").removeClass("wi-moon-waxing-gibbous-2"),$("#moon").addClass("wi-moon-waxing-gibbous-3");break;case 11:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-5"):$("#moon").removeClass("wi-moon-waxing-gibbous-3"),$("#moon").addClass("wi-moon-waxing-gibbous-4");break;case 12:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waxing-gibbous-6"):$("#moon").removeClass("wi-moon-waxing-gibbous-4"),$("#moon").addClass("wi-moon-waxing-gibbous-5");break;case 13:le($("#moon")),e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-full"):$("#moon").removeClass("wi-moon-waxing-gibbous-5"),$("#moon").addClass("wi-moon-waxing-gibbous-6");break;case 14:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-1"):$("#moon").removeClass("wi-moon-waxing-gibbous-6");let a=jt(2);a.length>0?$("#moon").append(a):$("#moon").addClass("wi-moon-full");break;case 15:le($("#moon")),e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-2"):$("#moon").removeClass("wi-moon-full"),$("#moon").addClass("wi-moon-waning-gibbous-1");break;case 16:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-3"):$("#moon").removeClass("wi-moon-waning-gibbous-1"),$("#moon").addClass("wi-moon-waning-gibbous-2");break;case 17:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-4"):$("#moon").removeClass("wi-moon-waning-gibbous-2"),$("#moon").addClass("wi-moon-waning-gibbous-3");break;case 18:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-5"):$("#moon").removeClass("wi-moon-waning-gibbous-3"),$("#moon").addClass("wi-moon-waning-gibbous-4");break;case 19:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-gibbous-6"):$("#moon").removeClass("wi-moon-waning-gibbous-4"),$("#moon").addClass("wi-moon-waning-gibbous-5");break;case 20:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-third-quarter"):$("#moon").removeClass("wi-moon-waning-gibbous-5"),$("#moon").addClass("wi-moon-waning-gibbous-6");break;case 21:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-1"):$("#moon").removeClass("wi-moon-waning-gibbous-6"),$("#moon").addClass("wi-moon-third-quarter");break;case 22:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-2"):$("#moon").removeClass("wi-moon-third-quarter"),$("#moon").addClass("wi-moon-waning-crescent-1");break;case 23:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-3"):$("#moon").removeClass("wi-moon-waning-crescent-1"),$("#moon").addClass("wi-moon-waning-crescent-2");break;case 24:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-4"):$("#moon").removeClass("wi-moon-waning-crescent-2"),$("#moon").addClass("wi-moon-waning-crescent-3");break;case 25:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-5"):$("#moon").removeClass("wi-moon-waning-crescent-3"),$("#moon").addClass("wi-moon-waning-crescent-4");break;case 26:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-waning-crescent-6"):$("#moon").removeClass("wi-moon-waning-crescent-4"),$("#moon").addClass("wi-moon-waning-crescent-5");break;case 27:e.city.ptrait.includes("retrograde")?$("#moon").removeClass("wi-moon-new"):$("#moon").removeClass("wi-moon-waning-crescent-5"),$("#moon").addClass("wi-moon-waning-crescent-6");break}$("#temp").removeClass("wi-thermometer"),$("#temp").removeClass("wi-thermometer-exterior"),e.city.calendar.temp===0?$("#temp").addClass("wi-thermometer-exterior"):e.city.calendar.temp===2&&$("#temp").addClass("wi-thermometer"),$("#weather").removeClass("wi-day-sunny"),$("#weather").removeClass("wi-day-windy"),$("#weather").removeClass("wi-cloud"),$("#weather").removeClass("wi-cloudy-gusts"),$("#weather").removeClass("wi-rain"),$("#weather").removeClass("wi-storm-showers"),$("#weather").removeClass("wi-snow"),$("#weather").removeClass("wi-snow-wind");let r;e.city.calendar.weather===0?e.city.calendar.temp===0?r=e.city.calendar.wind===0?"wi-snow":"wi-snow-wind":r=e.city.calendar.wind===0?"wi-rain":"wi-storm-showers":e.city.calendar.weather===1?r=e.city.calendar.wind===0?"wi-cloud":"wi-cloudy-gusts":e.city.calendar.weather===2&&(r=e.city.calendar.wind===0?"wi-day-sunny":"wi-day-windy"),$("#weather").addClass(r)}function gi(r){switch(r){case"moon":return Hl();case"weather":return Ul();case"temp":return Wl();case"sign":return Ql();case"astrology":return Zl()}}function Hl(){if(e.race.orbit_decayed)return t("moon0");if(e.city.calendar.moon===0)return t("moon1");if(e.city.calendar.moon>0&&e.city.calendar.moon<7)return t("moon2");if(e.city.calendar.moon===7)return t("moon3");if(e.city.calendar.moon>7&&e.city.calendar.moon<14)return t("moon4");if(e.city.calendar.moon===14)return t("moon5");if(e.city.calendar.moon>14&&e.city.calendar.moon<21)return t("moon6");if(e.city.calendar.moon===21)return t("moon7");if(e.city.calendar.moon>21)return t("moon8")}function Ul(){switch(e.city.calendar.weather){case 0:return e.city.calendar.temp===0?e.city.calendar.wind===1?t("snowstorm"):t("snow"):e.city.calendar.wind===1?t("thunderstorm"):t("rain");case 1:return e.city.calendar.wind===1?t("cloudy_windy"):t("cloudy");case 2:return e.city.calendar.wind===1?t("sunny_windy"):t("sunny")}}function Wl(){switch(e.city.calendar.temp){case 0:return t("cold");case 1:return t("moderate");case 2:return t("hot")}}function Zt(r){switch(r){case"aries":return[10];case"taurus":return[2];case"gemini":return[20];case"cancer":return[5];case"leo":return[4];case"virgo":return[15];case"libra":return[25];case"scorpio":return[12,1];case"sagittarius":return[5];case"capricorn":return[10];case"aquarius":return[20];case"pisces":return[49,25]}}function ma(){let r=new Date;return r.getMonth()===0&&r.getDate()>=20||r.getMonth()===1&&r.getDate()<=18?"aquarius":r.getMonth()===1&&r.getDate()>=19||r.getMonth()===2&&r.getDate()<=20?"pisces":r.getMonth()===2&&r.getDate()>=21||r.getMonth()===3&&r.getDate()<=19?"aries":r.getMonth()===3&&r.getDate()>=20||r.getMonth()===4&&r.getDate()<=20?"taurus":r.getMonth()===4&&r.getDate()>=21||r.getMonth()===5&&r.getDate()<=21?"gemini":r.getMonth()===5&&r.getDate()>=22||r.getMonth()===6&&r.getDate()<=22?"cancer":r.getMonth()===6&&r.getDate()>=23||r.getMonth()===7&&r.getDate()<=22?"leo":r.getMonth()===7&&r.getDate()>=23||r.getMonth()===8&&r.getDate()<=22?"virgo":r.getMonth()===8&&r.getDate()>=23||r.getMonth()===9&&r.getDate()<=22?"libra":r.getMonth()===9&&r.getDate()>=23||r.getMonth()===10&&r.getDate()<=22?"scorpio":r.getMonth()===10&&r.getDate()>=23||r.getMonth()===11&&r.getDate()<=21?"sagittarius":r.getMonth()===11&&r.getDate()>=22||r.getMonth()===0&&r.getDate()<=19?"capricorn":"time itself is broken"}function Ql(){let r=ma(),a=`
${t("sign_description",[t(`sign_${r}`),t(`sign_${r}_desc`)])}
`;return a+=`
${Vl(r)}
`,a}function Vl(r){return r==="pisces"||r==="cancer"?t(`sign_${r}_effect`):t(`sign_${r}_effect`,[Zt(r)[0]])}function Zl(){let r=ma();return t(`sign_${r}_symbol`)}function Yc(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"mad"});let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ct("mad");e.stats.mad++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),ie("apocalypse"),ie("squished",!0),ie(`extinct_${r}`),e.civic.govern.type==="anarchy"&&ie("anarchist"),e.city.biome==="hellscape"&&A[e.race.species].type!=="demonic"&&De("take_no_advice"),e.race.truepath&&ie("ashanddust"),Tr();let o=e.race.hasOwnProperty("srace")?e.race.srace:!1,d=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,rapid_mutation:1,ancient_ruins:1,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),o&&(e.race.srace=o),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function Xc(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"bioseed"});let r=e.race.species,a=e.race.gods,i=A[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=ct("bioseed");e.stats.bioseed++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),ie("seeder"),ie(`biome_${n}`),c.forEach(function(M){Re.hasOwnProperty(M)&&ie(`atmo_${M}`)}),ie(`genus_${i}`),e.race.gravity_well&&ie("escape_velocity"),e.race.truepath&&ie("exodus"),c.includes("dense")&&e.race.universe==="heavy"&&ie("double_density"),e.race.junker&&e.race.species==="junker"&&De("organ_harvester"),e.city.biome==="hellscape"&&A[e.race.species].type!=="demonic"&&De("ill_advised"),typeof e.tech.world_control>"u"&&ie("cult_of_personality"),e.race.cataclysm&&ie("iron_will",!1,5),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross");let o=0,d=0;switch(Object.keys(e.city.geology).forEach(function(M){e.city.geology[M]>0?o++:e.city.geology[M]<0&&d++}),o>=4&&ie("miners_dream"),d>=3&&De("rocky_road"),e.race.steelen&&e.race.steelen>=1&&ie("steelen"),e.race.universe){case"micro":e.race.small||e.race.compact?ie("macro",!0):ie("marble",!0);break;default:break}Tr();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,_=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,m=e.starDock.probes.count+1,w=e.starDock.hasOwnProperty("geck")?e.starDock.geck.count:0;e.stats.achieve.explorer&&(m+=e.stats.achieve.explorer.l),e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!0,probes:m,geck:w,seed:Math.floor(J(1e4)),ascended:!1},_>0&&(e.race.corruption=_),h&&(e.race.srace=h),aa({orbit:s,biome:n,ptrait:c,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function eo(){if(e.city.ptrait.includes("unstable")&&e.tech.quaked){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),wt("reset",{end:"cataclysm"}),Kr();let r=ct("cataclysm");e.stats.cataclysm++,Vr(),e.prestige.Phage.count+=r.phage,e.stats.phage+=r.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=r.plasmid,e.stats.antiplasmid+=r.plasmid):(e.prestige.Plasmid.count+=r.plasmid,e.stats.plasmid+=r.plasmid),ie("squished",!0),ie(`extinct_${e.race.species}`),e.city.biome==="hellscape"&&A[e.race.species].type!=="demonic"&&De("take_no_advice"),Tr(),ie("shaken"),e.race.cataclysm&&ie("failed_history");let a=e.race.hasOwnProperty("srace")?e.race.srace:!1,i=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:e.race.species,gods:e.race.gods,old_gods:e.race.old_gods,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},i>0&&(e.race.corruption=i),a&&(e.race.srace=a),aa({orbit:e.city.calendar.orbit,biome:e.city.biome,ptrait:e.city.ptrait,geology:e.city.geology}),e.race.universe==="antimatter"?e.race.weak_mastery=1:e.race.no_plasmid=1;let s=["crispr","trade","craft"];for(let n=0;n1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(J(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),aa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function ro(){if(e.tech.syphon>=80&&e.race.universe==="magic"){e.tech.syphon=79,e.arpa.syphon.rank=79,e.arpa.syphon.complete=99,e.queue.queue=[],e.stats.current=Date.now(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"vacuum"}),ie(`extinct_${e.race.species}`),ie("pw_apocalypse"),e.space.hasOwnProperty("spaceport")&&e.space.spaceport.count===0&&ie("red_dead"),!e.race.modified&&e.race.species==="balorg"&&ie("pass"),e.race.junker&&e.race.species==="junker"&&De("the_misery"),e.race.decay&&ie("dissipated"),e.race.steelen&&De("steelem");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=ct("vacuum");Tr(),e.stats.blackhole++,Vr(),e.prestige.Phage.count+=c.phage,e.stats.phage+=c.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=c.plasmid,e.stats.antiplasmid+=c.plasmid):(e.prestige.Plasmid.count+=c.plasmid,e.stats.plasmid+=c.plasmid),e.prestige.Dark.count=+(e.prestige.Dark.count+c.dark).toFixed(3),e.stats.dark=+(e.stats.dark+c.dark).toFixed(3),e.stats.universes++;let l=e.race.hasOwnProperty("srace")?e.race.srace:!1,o=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(J(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),aa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function ao(){Kr(),wt("reset",{end:"ascend"});let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ct("ascend");e.stats.ascend++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),e.prestige.Harmony.count=parseFloat((e.prestige.Harmony.count+l.harmony).toFixed(2)),e.stats.harmony=parseFloat((e.stats.harmony+l.harmony).toFixed(2)),n.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let o=0;Object.keys(e.city.geology).forEach(function(_){e.city.geology[_]>0&&o++}),o>=4&&ie("miners_dream"),(!e.galaxy.hasOwnProperty("dreadnought")||e.galaxy.dreadnought.count===0)&&ie("dreaded"),!e.race.modified&&(e.race.species==="synth"||e.race.species==="nano")&&e.race.emfield&&De("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Tr();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),Object.keys(c).forEach(function(_){c[_]+=.02}),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Ts(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"descension"}),ie("squished",!0),ie(`extinct_${e.race.species}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("nightmare"):ie("corrupted"),A[e.race.species].type==="angelic"&&De("twisted"),e.race.junker&&e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.cataclysm&&De("finish_line"),e.race.ooze&&e.race.species==="sludge"&&De("slime_lord"),e.race.fasting&&e.stats.starved<=0&&De("immortal");let r=ct("descend");e.prestige.Artifact.count+=r.artifact,e.stats.artifact+=r.artifact;let a=ot();e.stats.spire.hasOwnProperty(a)&&(e.stats.spire[a].hasOwnProperty("lord")?e.stats.spire[a].lord++:e.stats.spire[a].lord=1,e.tech.dl_reset?e.stats.spire[a].dlstr=0:e.stats.spire[a].hasOwnProperty("dlstr")?e.stats.spire[a].dlstr++:e.stats.spire[a].dlstr=1);let i=e.race.species,s=e.race.gods,n=e.city.calendar.orbit,c=e.city.biome,l=e.city.ptrait,o=e.city.geology;e.stats.descend++,Vr(),Tr();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1;e.race={species:"protoplasm",gods:i,old_gods:s,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d&&(e.race.srace=d),aa({orbit:n,biome:c,ptrait:l,geology:o}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function io(r){Kr(),wt("reset",{end:"terraform"});let a=e.race.species,i=e.race.gods,s=e.city.calendar.orbit,n=r.biome,c=r.traitlist,l=r.geology,o=ct("terraform");e.stats.terraform++,Vr(),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Harmony.count=parseFloat((e.prestige.Harmony.count+o.harmony).toFixed(2)),e.stats.harmony=parseFloat((e.stats.harmony+o.harmony).toFixed(2)),c.forEach(function(m){Re.hasOwnProperty(m)&&ie(`atmo_${m}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let d=0;Object.keys(e.city.geology).forEach(function(m){e.city.geology[m]>0&&d++}),d>=4&&ie("miners_dream"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Tr();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,_=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:i,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},_>0&&(e.race.corruption=_),h&&(e.race.srace=h),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function so(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"ai apocalypse"}),ie(`extinct_${e.race.species}`),ie("obsolete"),ie("squished",!0),e.race.junker&&e.race.species==="junker"&&De("the_misery");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,l=ct("ai");Tr(),e.stats.aiappoc++,Vr(),e.prestige.Phage.count+=l.phage,e.stats.phage+=l.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=l.plasmid,e.stats.antiplasmid+=l.plasmid):(e.prestige.Plasmid.count+=l.plasmid,e.stats.plasmid+=l.plasmid),e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let o=A[r].type!=="synthetic"?r:e.race.hasOwnProperty("srace")?e.race.srace:r;e.stats.synth[o]=!0;let d=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,srace:o,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),aa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function no(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"matrix"});let r=e.race.species,a=e.race.gods,i=A[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ct("matrix");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("bluepill"),jn(),Tr(),e.stats.matrix++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function co(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"retired"});let r=e.race.species,a=e.race.gods,i=A[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ct("retired");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("retired"),jn(),Tr(),e.stats.retire++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oo(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Kr(),wt("reset",{end:"eden"});let r=e.race.species,a=e.race.gods,i=A[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=ct("eden");ie(`biome_${n}`),c.forEach(function(_){Re.hasOwnProperty(_)&&ie(`atmo_${_}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("adam_eve"),jn(),Tr(),e.stats.eden++,Vr(),e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o.plasmid,e.stats.antiplasmid+=o.plasmid):(e.prestige.Plasmid.count+=o.plasmid,e.stats.plasmid+=o.plasmid),e.prestige.Phage.count+=o.phage,e.stats.phage+=o.phage,e.prestige.AICore.count+=o.cores,e.stats.cores+=o.cores;let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:r,old_gods:a,universe:e.race.universe,seeded:!1,seed:Math.floor(J(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),aa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function aa(r){e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:r.orbit},biome:r.biome,ptrait:r.ptrait},r.geology&&(e.city.geology=r.geology),e.tech={theology:1},Mn(),e.new=!0,e.seed=Math.rand(0,1e4)}function jn(){let r=ot();e.race.womling_friend?(r!=="m"&&e.stats.womling.friend.l++,r!=="l"&&(e.stats.womling.friend.hasOwnProperty(r)||(e.stats.womling.friend[r]=0),e.stats.womling.friend[r]++)):e.race.womling_lord?(r!=="m"&&e.stats.womling.lord.l++,r!=="l"&&(e.stats.womling.lord.hasOwnProperty(r)||(e.stats.womling.lord[r]=0),e.stats.womling.lord[r]++)):e.race.womling_god&&(r!=="m"&&e.stats.womling.god.l++,r!=="l"&&(e.stats.womling.god.hasOwnProperty(r)||(e.stats.womling.god[r]=0),e.stats.womling.god[r]++)),e.stats.womling.friend.l>0&&e.stats.womling.lord.l>0&&e.stats.womling.god.l>0&&ie("overlord",r==="m",Jt(),"l"),e.stats.womling.friend[r]>0&&e.stats.womling.lord[r]>0&&e.stats.womling.god[r]>0&&ie("overlord",r==="m",Jt(),r)}function Ii(r){if(e.civic.taxes||(e.civic.taxes={tax_rate:20,display:!1}),!r&&!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==0))){var a=$('
'),i=$(` - `);a.append(i),$("#r_civics").append(a),D({el:"#government .govTabs2",data:{t:e.civic.taxes,s:e.settings},methods:{vis(){return!!e.tech.govern}}}),Jl($("#r_govern0")),eu($("#r_govern0"));var s=$('
');$("#r_govern0").append(s),Ot()}}function ls(){if(us(),!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==3))){var r=$('
');$("#military").append(r),$("#military").append($('
')),ia(r,!0),tu()}}function us(){e.civic.garrison||(e.civic.garrison={display:!1,disabled:!1,rate:0,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0}),e.civic.garrison.mercs||(e.civic.garrison.mercs=!1),e.civic.garrison.fatigue||(e.civic.garrison.fatigue=0),e.civic.garrison.protest||(e.civic.garrison.protest=0),e.civic.garrison.m_use||(e.civic.garrison.m_use=0),e.civic.garrison.crew||(e.civic.garrison.crew=0),e.civic.mad||(e.civic.mad={display:!1,armed:!0})}function ds(r){if(e.race.truepath){if(e.civic.foreign[`gov${r}`].hstl<10)return 1+(10-e.civic.foreign[`gov${r}`].hstl)/40;if(e.civic.foreign[`gov${r}`].hstl>60)return 1-(-60+e.civic.foreign[`gov${r}`].hstl)/160}return 1}function ut(r){if(typeof e.civic.foreign[`gov${r}`].name>"u"){let a=ga();e.civic.foreign[`gov${r}`].name={s0:a.s0,s1:a.s1}}return t(`civics_gov${e.civic.foreign[`gov${r}`].name.s0}`,[e.civic.foreign[`gov${r}`].name.s1])}var ho=function(){return{anarchy:t("govern_anarchy_effect"),autocracy:t("govern_autocracy_effect",$e.autocracy()),democracy:t("govern_democracy_effect",$e.democracy()),oligarchy:e.tech.high_tech&&e.tech.high_tech>=12?t("govern_oligarchy_effect_alt",[$e.oligarchy()[1]]):t("govern_oligarchy_effect",[$e.oligarchy()[0],$e.oligarchy()[1]]),theocracy:t("govern_theocracy_effect",$e.theocracy()),theocracy_alt:t("govern_theocracy_effect_alt",$e.theocracy()),republic:t("govern_republic_effect",$e.republic()),socialist:t("govern_socialist_effect",$e.socialist()),corpocracy:t("govern_corpocracy_effect",$e.corpocracy()),technocracy:e.tech.high_tech&&e.tech.high_tech>=16?t("govern_technocracy_effect_alt",[$e.technocracy()[0],$e.technocracy()[2]]):t("govern_technocracy_effect",$e.technocracy()),federation:t("govern_federation_effect",[$e.federation()[0],$e.federation()[1]]),federation_alt:t("govern_federation_effect_alt",[25,$e.federation()[2],$e.federation()[1]]),magocracy:t("govern_magocracy_effect",$e.magocracy())}},$e={autocracy(){let r=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?10:18:25,a=ge("organizer",0)?40:35;return[r,a]},democracy(){let r=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?30:25:20,a=ge("organizer",0)?1:5;return[r,a]},oligarchy(){let r=e.tech.high_tech&&e.tech.high_tech>=12?0:e.tech.high_tech&&e.tech.high_tech>=2?2:5,a=ge("organizer",0)?25:20;return[r,a]},theocracy(){let r=12,a=ge("organizer",0)?10:25,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?25:40:50;return[r,a,i]},republic(){let r=ge("organizer",0)?30:25,a=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:30:20;return[r,a]},socialist(){let r=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:42:35,a=ge("organizer",0)?12:10,i=10,s=ge("organizer",0)?10:20;return[r,a,i,s]},corpocracy(){let r=ge("organizer",0)?220:200,a=ge("organizer",0)?175:150,i=ge("organizer",0)?110:100,s=e.tech.high_tech&&e.tech.high_tech>=12?5:10,n=e.tech.high_tech&&e.tech.high_tech>=16?40:30;return[r,a,i,s,n]},technocracy(){let r=8,a=e.tech.high_tech&&e.tech.high_tech>=16?0:e.tech.high_tech&&e.tech.high_tech>=12?1:2,i=ge("organizer",0)?18:10;return[r,a,i]},federation(){let r=3,a=ge("organizer",0)?12:10,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:36:32;return[r,a,i]},magocracy(){let r=ge("organizer",0)?30:25,a=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:40:25;return[r,a]}};function Jl(r){var a=$('
');r.append(a);var i=$(`
${t("civics_government_type")} {{ type | govern }}
`);a.append(i);var s=$("
");a.append(s);var n=$('');s.append(n);var c={template:''};D({el:"#govType",data:e.civic.govern,filters:{govern(l){return t(`govern_${l}`)},set(l){return l==="anarchy"?t("civics_set_gov"):t("civics_revolution")}},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var l=setInterval(function(){$("#modalBox").length>0&&(clearInterval(l),Yl())},50)},startrev(){e.civic.govern.fr=e.civic.govern.rev,e.civic.govern.rev=0},force(){return e.civic.govern.rev>0?t("civics_force_rev_desc"):t("civics_force_rev_desc2")},vis(){return!!e.tech.govern}}}),pe("govLabel",function(){let l=e.tech.unify&&e.tech.unify>=2&&e.civic.govern.type==="federation"?"federation_alt":e.civic.govern.type;return l==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(l="theocracy_alt"),$(`
${fo(e.civic.govern.type)}
${ho()[l]}
`)}),pe("govTypeChange",function(){return e.civic.govern.rev>0?t("civics_change_desc",[e.civic.govern.rev]):t("civics_change_desc2")},{elm:"#govType .change"})}function fo(r){return e.race.witch_hunter&&r==="magocracy"?t("witch_hunter_magocracy"):t(`govern_${r}_desc`)}function Yl(){$("#modalBox").append($(`

${t("civics_government_type")}

`));let r=jt(6,10);r.length>0&&$("#modalBoxTitle").append(r);let a=ar(6,14,!1);a.length>0&&$("#modalBoxTitle").append(a);var i=$('
');$("#modalBox").append(i),e.tech.govern&&(e.civic.govern.type!=="autocracy"&&i.append($(``)),e.civic.govern.type!=="democracy"&&i.append($(``)),e.civic.govern.type!=="oligarchy"&&i.append($(``)),e.tech.gov_theo&&e.civic.govern.type!=="theocracy"&&i.append($(``)),e.tech.govern>=2&&e.civic.govern.type!=="republic"&&i.append($(``)),e.tech.gov_soc&&e.civic.govern.type!=="socialist"&&i.append($(``)),e.tech.gov_corp&&e.civic.govern.type!=="corpocracy"&&i.append($(``)),e.tech.govern>=3&&e.civic.govern.type!=="technocracy"&&i.append($(``)),e.tech.gov_fed&&e.civic.govern.type!=="federation"&&i.append($(``)),e.tech.gov_mage&&e.civic.govern.type!=="magocracy"&&i.append($(``))),D({el:"#govModal",data:e.civic.govern,methods:{setGov(s){if(e.civic.govern.rev===0){let n=e.genes.governor&&e.civic.govern.type==="anarchy";e.civic.govern.type=s;let c=1e3;e.tech.high_tech&&(c+=250,e.tech.high_tech>=3&&(c+=250),e.tech.high_tech>=6&&(c+=250)),e.tech.space_explore&&e.tech.space_explore>=3&&(c+=250),e.race.unorganized&&(c=Math.round(c*(1+b.unorganized.vars()[0]/100))),e.stats.achieve.anarchist&&(c=Math.round(c*(1-e.stats.achieve.anarchist.l/10))),e.race.lawless&&(c=Math.round(c*((100-b.lawless.vars()[0])/100)));let l=ve("tuskin");l>0&&(c=Math.round(c*((100-b.lawless.vars(1)[0]*l)/100)));let o=ge("aristocrat",0);o&&(c=Math.round(c*(1-o/100))),e.civic.govern.rev=c+e.civic.govern.fr,n&&ue(),D({el:"#govModal"},"destroy"),$(".modal-background").click(),Ie()}}}}),pe("GovPop",function(s){let n=$(s.this).data("gov"),c=e.tech.unify&&e.tech.unify>=2&&n==="federation"?"federation_alt":n;return c==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(c="theocracy_alt"),$(`
${fo(n)}
${ho()[c]}
`)},{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}function ps(){if($("#foreign").length===0&&!e.race.cataclysm&&(!e.tech.world_control||e.race.truepath)&&!e.tech.isolation){let a=$('
');a.append($(`

${t("civics_foreign")}

`)),$("#r_govern0").append(a);var r={template:''};let i=e.race.truepath?5:3;for(let n=0;n{{ '${n}' | gov }} - ${t("civics_garrison_occupy")} - ${t("civics_garrison_annex")} - ${t("civics_garrison_purchase")}
`);a.append(c);let l=$("
");l.append($(``)),l.append($(``)),l.append($(``)),c.append(l),c.append($(`
${t("civics_gov_mil_rate")}: {{ f${n}.mil | military(${n}) }} ({{ f${n}.mil }})
`)),c.append($(`
${t("civics_gov_relations")}: {{ f${n}.hstl | relation }} ({{ f${n}.hstl | hate }})
`)),c.append($(`
${t("civics_gov_eco_rate")}: {{ f${n}.eco | eco(${n}) }} ({{ f${n}.eco }})
`)),c.append($(`
${t("civics_gov_unrest")}: {{ f${n}.unrest | discontent(${n}) }} ({{ f${n}.unrest | turmoil }})
`))}let s={f0:e.civic.foreign.gov0,f1:e.civic.foreign.gov1,f2:e.civic.foreign.gov2,t:e.tech};e.race.truepath&&(s.f3=e.civic.foreign.gov3,s.f4=e.civic.foreign.gov4),D({el:"#foreign",data:s,filters:{military(n,c){return e.civic.foreign[`gov${c}`].spy>=1?n<50?t("civics_gov_v_weak"):n<75?t("civics_gov_weak"):n>300?t("civics_gov_superpower"):n>200?t("civics_gov_v_strong"):n>160?t("civics_gov_strong"):n>125?t("civics_gov_above_average"):t("civics_gov_average"):"???"},relation(n){return n>80?t("civics_gov_hated"):n>60?t("civics_gov_hostile"):n>40?t("civics_gov_poor"):n>25?t("civics_gov_neutral"):n>10?t("civics_gov_liked"):t("civics_gov_good")},eco(n,c){return e.civic.foreign[`gov${c}`].spy>=2?n<60?t("civics_gov_weak"):n<80?t("civics_gov_recession"):n>120?t("civics_gov_strong"):t("civics_gov_average"):"???"},discontent(n,c){return e.civic.foreign[`gov${c}`].spy>=3?n<=0?t("civics_gov_none"):n<30?t("civics_gov_low"):n<60?t("civics_gov_medium"):n<90?t("civics_gov_high"):t("civics_gov_extreme"):"???"},gov(n){return ut(n)},sab(n){return n==="none"?"":t(`civics_spy_${n}`)},hate(n){return`${100-n}%`},turmoil(n){return`${n}%`}},methods:{campaign(n){vo(n)},battleAssessment(n){return zn(n)},trigModal(n){this.$buefy.modal.open({parent:this,component:r});var c=setInterval(function(){$("#modalBox").length>0&&(clearInterval(c),Xl(n))},50)},spy_disabled(n){return e.civic.foreign[`gov${n}`].trn>0||Es(n)>e.resource.Money.amount},spy(n){mo(n)},spyDesc(n){return lo(n)},espDesc(){return uo()},vis(){return!!(e.civic.garrison.display&&(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation)},gvis(n){return e.tech.isolation?!1:n<=2?!e.tech.world_control:n===3?!!e.tech.rival:!1}}});for(let n=0;n{{ label() }}"},{elm:`#gov${n} .attack`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return zn(n)}}})},out:function(c){D({el:c.id},"destroy")}}),pe(`gov${n}ts`,function(){return"{{ label() }}"},{elm:`#gov${n} .tspy`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return lo(n)}}})},out:function(c){D({el:c.id},"destroy")}}),pe(`gov${n}s`,function(){return uo()},{elm:`#gov${n} .sspy`});e.race.truepath&&pe("garRivaldesc1",function(){return t("civics_gov_tp_rival",[ut(3),F[e.race.species].home])},{elm:"#gov3 > span"})}}function lo(r){if(e.civic.foreign[`gov${r}`].trn>0)return t("civics_progress");let a=Ee(Es(r));return t("civics_gov_spy_desc",[a])}function uo(){return t("civics_gov_esp_desc")}function Es(r){let a=Math.round(e.civic.foreign[`gov${r}`].mil/2+e.civic.foreign[`gov${r}`].hstl/2-e.civic.foreign[`gov${r}`].unrest)+10;return a<50&&(a=50),e.race.infiltrator&&(a/=3),ma()==="scorpio"&&(a*=1-Zt("scorpio")[0]/100),Math.round(a**(e.civic.foreign[`gov${r}`].spy+1))+500}function mo(r){if(e.tech.spy&&e.civic.foreign[`gov${r}`].trn===0){let a=Es(r);if(e.resource.Money.amount>=a){e.resource.Money.amount-=a;let i=300;e.tech.spy>=3&&e.city.boot_camp&&(i-=(e.race.orbit_decayed&&e.space.space_barracks?e.space.space_barracks.on:e.city.boot_camp.count)*10,i<10&&(i=10)),e.race.infiltrator&&(i=Math.round(i/2)),e.civic.foreign[`gov${r}`].trn=i}}}function po(r){let a=e.civic.foreign[`gov${r}`].eco*15384;return a*=1+e.civic.foreign[`gov${r}`].hstl*1.6/100,a*=1-e.civic.foreign[`gov${r}`].unrest*.25/100,+a.toFixed(0)}function _r(r){return r?e.tech.world_control||e.civic.foreign[r].occ||e.civic.foreign[r].anx||e.civic.foreign[r].buy:e.civic.foreign.gov0.occ||e.civic.foreign.gov1.occ||e.civic.foreign.gov2.occ||e.civic.foreign.gov0.anx||e.civic.foreign.gov1.anx||e.civic.foreign.gov2.anx||e.civic.foreign.gov0.buy||e.civic.foreign.gov1.buy||e.civic.foreign.gov2.buy}function Ei(r,a){switch(r){case"influence":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?200:300;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="influence"}break;case"sabotage":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?400:600;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="sabotage"}break;case"incite":{if(a>=3)break;if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?600:900;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="incite"}}break}}function Xl(r){$("#modalBox").append($(`

${t("civics_espionage_actions")}

`));var a=$('
');$("#modalBox").append(a),e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&(a.append($(``)),a.append($(``)),r<3&&a.append($(``)),r<3&&e.civic.foreign[`gov${r}`].hstl<=50&&e.civic.foreign[`gov${r}`].unrest>=50&&a.append($(``)),r<3&&e.civic.foreign[`gov${r}`].spy>=3&&a.append($(``))),D({el:"#espModal",data:e.civic.foreign[`gov${r}`],methods:{influence(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("influence",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie())},sabotage(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("sabotage",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),Ie())},incite(i){i>=3||e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("incite",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie())},annex(i){if(!(i>=3)&&e.civic.foreign[`gov${r}`].hstl<=50&&e.civic.foreign[`gov${r}`].unrest>=50&&e.city.morale.current>=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest&&e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&e.civic.foreign[`gov${i}`].sab===0){let s=e.tech.spy>=4?150:300;e.race.befuddle&&(s=Math.round(s*(1-b.befuddle.vars()[0]/100)));let n=ve("dryad");n>0&&(s=Math.round(s*(1-b.befuddle.vars(1)[0]/100*n))),e.civic.foreign[`gov${i}`].sab=s,e.civic.foreign[`gov${i}`].act="annex",D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie()}},purchase(i){if(i>=3)return;let s=po(i);if(s<=e.resource.Money.amount&&e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=3&&e.civic.foreign[`gov${i}`].sab===0){e.resource.Money.amount-=s;let n=e.tech.spy>=4?150:300;e.race.befuddle&&(n=Math.round(n*(1-b.befuddle.vars()[0]/100)));let c=ve("dryad");c>0&&(n=Math.round(n*(1-b.befuddle.vars(1)[0]/100*c))),e.civic.foreign[`gov${i}`].sab=n,e.civic.foreign[`gov${i}`].act="purchase",D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie()}}}}),pe("GovLabel",function(i){let s=$(i.this).data("esp"),n="";if(s==="purchase"){let l=po(r).toLocaleString();n=t(`civics_spy_${s}_desc`,[ut(r),l])}else if(s==="annex")if(e.city.morale.current>=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest)n=t(`civics_spy_${s}_desc`,[ut(r)]);else{let l=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest;n=t(`civics_spy_${s}_goal`,[ut(r),l])}else n=t(`civics_spy_${s}_desc`,[ut(r)]);let c="";return(s==="influence"&&e.civic.foreign[`gov${r}`].hstl===0||s==="sabotage"&&e.civic.foreign[`gov${r}`].spy>=2&&e.civic.foreign[`gov${r}`].mil===50||s==="incite"&&e.civic.foreign[`gov${r}`].spy>=4&&e.civic.foreign[`gov${r}`].unrest===100)&&(c=`
${t("civics_spy_warning")}
`),$(`${c}
${n}
`)},{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}function An(r){let a=!!(e.tech.currency&&e.tech.currency>=5);if(r)return(a||e.race.terrifying)&&!e.race.noble?0:e.race.noble?b.noble.vars()[0]:10;{let i=30;e.race.noble?i=b.noble.vars()[1]:(a||e.race.terrifying)&&(i+=20),e.civic.govern.type==="oligarchy"&&(i+=$e.oligarchy()[1]);let s=ge("aristocrat",1);return s&&(i+=s),i}}function Fn(r,a){switch(r){case"add":{let i=a||fe(),s=An(!1);e.race.noble?(e.civic.taxes.tax_rate+=i,e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?b.noble.vars()[1]+20:b.noble.vars()[1])&&(e.civic.taxes.tax_rate=e.civic.govern.type==="oligarchy"?b.noble.vars()[1]+20:b.noble.vars()[1])):e.civic.taxes.tax_rates&&(e.civic.taxes.tax_rate=s))}break;case"sub":{let i=a||fe(),s=An(!0);e.civic.taxes.tax_rate>s&&(e.civic.taxes.tax_rate-=i,e.civic.taxes.tax_rate
');r.append(a);var i=$(`

${t("civics_tax_rates")}

`);a.append(i);var s=$(''),n=$('«'),c=$('»');a.append(n),a.append(s),a.append(c),D({el:"#tax_rates",data:e.civic.taxes,filters:{tax_level(l){let o=jt(11,14),d=ar(2,14,!1);return o.length>0&&(l===0&&!e.race.noble||l===10&&e.race.noble)?o:l===13&&d.length>0?d:`${l}%`}},methods:{add(){Fn("add")},sub(){Fn("sub")}}}),pe("taxRateLabel",function(){return t("civics_tax_rates_desc")},{classes:"has-background-light has-text-dark"})}function vr(r,a){switch(r){case"m_cost":return _s();case"m_buy":return go(1);case"s_cost":return Es(a);case"t_spy":return mo(a);case"adj_tax":return Fn(a,1);case"tax_cap":return An(a);case"s_influence":return Ei("influence",a);case"s_sabotage":return Ei("sabotage",a);case"s_incite":return Ei("incite",a)}}function _s(){let r=Math.round(1.24**e.civic.garrison.workers*75)-50;r>25e3&&(r=25e3),e.civic.garrison.m_use>0&&(r*=1.1**e.civic.garrison.m_use),e.race.brute&&(r*=1-b.brute.vars()[0]/100);let a=ve("orc");return a>0&&(r*=1-b.brute.vars(1)[0]/100*a),e.race.inflation&&(r*=1+e.race.inflation/500),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),Math.round(r)}function go(r){if(e.tech.mercs){let a=r||fe(),i=!0;for(;i&&a>0;){let s=_s();e.civic.garrison.workers=s?(e.resource.Money.amount-=s,e.civic.garrison.workers++,e.civic.garrison.m_use++):i=!1,a--}}}function ia(r,a){le(r),e.tech.world_control&&!e.race.truepath?r.append($(`

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }}
`)):r.append($(`

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
`));var i=$('
');r.append(i);var s=$('
');i.append(s);let n=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");if(e.tech.isolation||(s.append($(`
${n} / {{ g.max | s_max }}
`)),s.append($(`
${t("civics_garrison_crew")} {{ g.crew }}
`)),s.append($(`
${t("civics_garrison_wounded")}
`)),i.append($(`
`))),a){let j="";e.tech.isolation&&(j=jt(8,12)),r.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${j} {{ g.progress }}%
`))}var c=$('
');r.append(c);var l=$('
');if(c.append(l),(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation){var o=$(`
${t("civics_garrison_campaign")}
`);l.append(o);var d=$('{{ g.tactic | tactics }}'),h=$('«'),_=$('»');o.append(h),o.append(d),o.append(_);var m=$(`
${t("civics_garrison_battalion")}
`);l.append(m);var w=$('{{ g.raid }}'),M=$('«'),A=$('»');m.append(M),m.append(w),m.append(A),a&&(e.race.truepath&&e.tech.rival&&c.append($(`
${ut(3)}
`)),e.tech.world_control||(c.append($(`
${ut(0)}
`)),c.append($(`
${ut(1)}
`)),c.append($(`
${ut(2)}
`))))}let x={g:e.civic.garrison,g0:e.civic.foreign.gov0,g1:e.civic.foreign.gov1,g2:e.civic.foreign.gov2};if(e.race.truepath&&(x.g3=e.civic.foreign.gov3,x.g4=e.civic.foreign.gov4),D({el:a?"#garrison":"#c_garrison",data:x,methods:{hire(){go()},campaign(j){vo(j)},next(){e.civic.garrison.tactic<4&&e.civic.garrison.tactic++},last(){e.civic.garrison.tactic>0&&e.civic.garrison.tactic--},aNext(){let j=fe();e.civic.garrison.raidWe()&&(e.civic.garrison.raid=We()))},aLast(){let j=fe();e.civic.garrison.raid>0&&(e.civic.garrison.raid-=j,e.civic.garrison.raid<0&&(e.civic.garrison.raid=0))},vis(){return e.civic.garrison.display},rvis(){return!!(e.tech.rival&&!e.tech.isolation)}},filters:{tactics(j){switch(j){case 0:return t("civics_garrison_tactic_ambush");case 1:return t("civics_garrison_tactic_raid");case 2:return t("civics_garrison_tactic_pillage");case 3:return t("civics_garrison_tactic_assault");case 4:return t("civics_garrison_tactic_siege")}},rating(j){return+mt(j,"army").toFixed(1)},hell(j){return We()},stationed(j){let B=We(),S=e.race.cataclysm?13:31,Q=B===S&&!a?ar(2,14,!0):!1;return B===S&&Q.length>0?Q:B},s_max(j){return We(!0)},wounded(j){let B=jt(8,12);return a&&j===0&&B.length>0?B:Ve("fool",2021)?We()-j:j},trainTime(j,B){return j===0?At(-1):At((100-B)/(j*4))}}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach(function(j){pe(a?`garrison${j}`:`cGarrison${j}`,function(){return"{{ label() }}"},{elm:`${a?"#garrison":"#c_garrison"} .${j}`,in:function(B){D({el:`#${B.id} > span`,data:{test:"val"},methods:{label(){switch(j){case"tactic":switch(e.civic.garrison.tactic){case 0:return t("civics_garrison_tactic_ambush_desc");case 1:return t("civics_garrison_tactic_raid_desc");case 2:return t("civics_garrison_tactic_pillage_desc");case 3:return t("civics_garrison_tactic_assault_desc");case 4:return t("civics_garrison_tactic_siege_desc",[N(e.civic.govern.type==="federation"?15:20)])}case"bat":return t("civics_garrison_army_label");case"soldier":return Tn();case"crew":return t("civics_garrison_crew_desc");case"wounded":return t("civics_garrison_wounded_desc");case"hmerc":{let S=Math.round(_s()).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[S])}case"defenseRating":return t("civics_garrison_defensive_rate");case"offenseRating":return t("civics_garrison_offensive_rate")}}}})},out:function(B){D({el:B.id},"destroy")}})}),a){let j=e.race.truepath?4:3;for(let B=0;B{{ label() }}"},{elm:`#garrison .gov${B} button`,in:function(S){D({el:`#${S.id} > span`,data:{test:"val"},methods:{label(){return zn(B)}}})},out:function(S){D({el:S.id},"destroy")}});e.race.truepath&&!e.tech.isolation&&pe("garRivaldesc2",function(){return t("civics_gov_tp_rival",[ut(3),F[e.race.species].home])},{elm:"#garrison .gov3 > div"})}}function Tn(){let r=mt(We(),"hunting"),a=[];if((!e.race.herbivore||e.race.carnivore)&&!e.race.artifical){let c=+(r/3).toFixed(2);a.push(c,e.resource.Food.name)}let i=+(r/10).toFixed(2);if(a.push(i,e.resource.Furs.name),e.race.evil&&!e.race.kindling_kindred&&!e.race.smoldering){let c=+(r/(e.race.soul_eater?3:5)).toFixed(2);a.push(c,e.resource.Lumber.name)}let s="civics_garrison_soldier_loot"+a.length/2,n=e.race.evil&&e.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc";return t(n)+t(s,a)}function zn(r){if(e.civic.foreign[`gov${r}`].occ)return t("civics_garrison_deoccupy_desc");if(e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)return t("civics_garrison_secede_desc");if(e.civic.garrison.tactic<=1&&e.civic.foreign[`gov${r}`].spy<1||e.civic.garrison.tactic>=2&&e.civic.garrison.tactic<=3&&e.civic.foreign[`gov${r}`].spy<2||e.civic.garrison.tactic===4&&e.civic.foreign[`gov${r}`].spy<3)return t("civics_garrison_no_spy");let a=mt(e.civic.garrison.raid,"army"),i=0;switch(e.civic.garrison.tactic){case 0:i=5;break;case 1:i=27.5;break;case 2:i=62.5;break;case 3:i=125;break;case 4:i=300;break}return i*=e.civic.foreign[`gov${r}`].mil/100,e.race.banana&&(i*=2),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[0]),Ve("fool",2021)&&(i/=1.25),aWe()?e.civic.garrison.raid=We():e.civic.garrison.raid<0&&(e.civic.garrison.raid=0),e.civic.garrison.raid===0){I(t("civics_garrison_campaign_no_soldier"),"warning",!1,["combat"]);return}e.stats.attacks++;let a=e.race.claws?20:16,i=e.race.puny?3:5,s=Math.floor(J(i,a,!0))/10,n=mt(e.civic.garrison.raid,"army")*s,c=0;switch(e.civic.garrison.tactic){case 0:c=J(0,10,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(0,2,!0));break;case 1:c=J(5,50,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(0,3,!0));break;case 2:c=J(25,100,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(1,5,!0));break;case 3:c=J(50,200,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(4,12,!0));break;case 4:c=J(100,500,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(10,25,!0));break}c=Math.floor(c*e.civic.foreign[`gov${r}`].mil/100),e.race.banana&&(c*=2),e.city.biome==="swamp"&&(c*=qe.swamp.vars()[0]),e.race.mistrustful&&(e.civic.foreign[`gov${r}`].hstl+=b.mistrustful.vars()[0]),e.civic.foreign[`gov${r}`].hstl>100&&(e.civic.foreign[`gov${r}`].hstl=100),e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.ceil(c/5),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let l=0;if(e.civic.garrison.raid>e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded&&(l=e.civic.garrison.raid-(e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded)),e.civic.garrison.fatigue++,n>c){let o=Math.floor(e.civic.garrison.raid/(5-e.civic.garrison.tactic));o+=l,e.city.ptrait.includes("rage")&&(o+=Re.rage.vars()[2]),o<1&&(o=1),o>os()&&(o=os());let d=Math.floor(J(0,o,!0));e.race.frail&&(d+=b.frail.vars()[0]);let h=0;if(e.race.scales&&(h+=b.scales.vars()[0]),e.tech.armor&&(h+=e.tech.armor),e.race.high_pop&&(h+=Math.floor(J(0,h*b.high_pop.vars()[0],!0))),e.race.armored){let Y=b.armored.vars()[0]/100;h+=Math.floor(d*Y)}let _=ve("tortoisan");if(_>0){let Y=b.armored.vars(1)[0]/100*_;h+=Math.floor(d*Y)}if(e.civic.garrison.raid>l&&(d-=h),d<0&&(d=0),d>e.civic.garrison.raid&&(d=e.civic.garrison.raid),e.race.instinct){let Y=Math.floor(d*(b.instinct.vars()[1]/100));d-=Y,l+=Y}e.civic.garrison.workers-=d,e.stats.died+=d,e.civic.garrison.protest+=d,d>l?(e.civic.garrison.wounded-=l,l=0):(e.civic.garrison.wounded-=d,l-=d),e.civic.garrison.wounded+=Math.floor(J(l,e.civic.garrison.raid-d,!0));let m={Money:0,Food:0,Lumber:0,Stone:0,Copper:0,Iron:0,Aluminium:0,Coal:0,Cement:0,Steel:0,Titanium:0,Crystal:0,Chrysotile:0,Furs:0,Iridium:0,Alloy:0,Polymer:0,Oil:0},w=r===3&&e.race.truepath?["Food","Lumber","Stone","Copper","Iron"]:["Food","Lumber","Stone"],M=r===3&&e.race.truepath?["Aluminium","Coal","Cement","Steel","Furs"]:["Copper","Iron","Aluminium","Coal"],A=r===3&&e.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];e.race.artifical&&w.shift(),e.race.smoldering&&w.push("Chrysotile"),e.race.terrifying&&r!==3&&A.push("Titanium"),e.tech.magic&&A.push("Crystal");let x=["Money"];switch(e.civic.garrison.tactic){case 0:{let Y=["Money"].concat(w,M);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))]),e.resource.Steel.amount<25&&e.tech.smelting&&e.tech.smelting===1&&Math.floor(J(0,20,!0))===0&&x.push("Steel")}break;case 1:{let Y=["Money"].concat(w,M,A);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 2:{let Y=["Money"].concat(w,M,A),Ge=M.concat(A);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),x.push(Ge[Math.floor(J(0,Ge.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 3:{let Y=["Money"].concat(w,M,A);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(A[Math.floor(J(0,A.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 4:{let Y=["Money"].concat(w,M,A);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(A[Math.floor(J(0,A.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break}let j=e.race.terrifying&&r!==3?b.terrifying.vars()[0]:12,B=e.race.terrifying&&r!==3?b.terrifying.vars()[1]:32;x.forEach(function(Y){switch(Y){case"Money":m[Y]+=Math.floor(J(100,375,!0));break;case"Food":m[Y]+=Math.floor(J(40,175,!0));break;case"Lumber":case"Stone":m[Y]+=Math.floor(J(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":m[Y]+=Math.floor(J(35,125,!0));break;case"Coal":case"Cement":m[Y]+=Math.floor(J(25,100,!0));break;case"Steel":case"Chrysotile":m[Y]+=Math.floor(J(20,65,!0));break;case"Titanium":m[Y]+=Math.floor(J(j,B,!0));break;case"Crystal":m[Y]+=Math.floor(J(1,5,!0));break;case"Oil":m[Y]+=Math.floor(J(20,50,!0));break;case"Iridium":m[Y]+=Math.floor(J(2,30,!0));break;case"Alloy":case"Polymer":m[Y]+=Math.floor(J(5,38,!0));break}});let S=t("civics_garrison_gained");e.resource.Money.display&&m.Money>0&&(m.Money=_o(m.Money,r),S=S+t("civics_garrison_quant_money",[m.Money]),L("Money",m.Money)),w.concat(M,A).forEach(function(Y){m[Y]>0&&(e.resource[Y].display||Y==="Steel"||Y==="Titanium")&&(m[Y]=_o(m[Y],r),S=S+t("civics_garrison_quant_res",[m[Y],e.resource[Y].name]),L(Y,m[Y]),(Y==="Steel"||Y==="Titanium")&&(e.resource[Y].display=!0))}),S=S.slice(0,-2),S=S+".",I(S,"warning",!1,["combat"]);let V=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[0]),!0));break;case 1:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[1]),!0));break;case 2:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[2]),!0));break}e.civic.garrison.workers+=V}if(V>0?I(t("civics_garrison_victorious_revive",[d,V]),"success",!1,["combat"]):I(t("civics_garrison_victorious",[d]),"success",!1,["combat"]),e.race.slaver&&e.city.slave_pen){let Y=e.city.slave_pen.count*4;if(Y>e.resource.Slave.amount){let Ge=Math.floor(J(0,e.civic.garrison.tactic+2,!0));Ge+e.resource.Slave.amount>Y&&(Ge=Y-e.resource.Slave.amount),Ge>0&&(e.resource.Slave.amount+=Ge,I(t("civics_garrison_capture",[Ge]),"success",!1,["combat"]))}}if(e.race.infectious){let Y=0;switch(e.civic.garrison.tactic){case 0:Y=Math.floor(J(0,b.infectious.vars()[0],!0));break;case 1:Y=Math.floor(J(0,b.infectious.vars()[1],!0));break;case 2:Y=Math.floor(J(0,b.infectious.vars()[2],!0));break;case 3:Y=Math.floor(J(0,b.infectious.vars()[3],!0));break;case 4:Y=Math.floor(J(0,b.infectious.vars()[4],!0));break}e.resource[e.race.species].amount+Y>e.resource[e.race.species].max&&(Y=e.resource[e.race.species].max-e.resource[e.race.species].amount),Y>0&&(e.resource[e.race.species].amount+=Y,e.civic.d_job!=="unemployed"&&(e.civic[e.civic.d_job].workers+=Y),Y===1?I(t("civics_garrison_soldier_infected"),"special",!1,["combat"]):I(t("civics_garrison_soldiers_infected",[Y]),"special",!1,["combat"]))}let ce=N(e.civic.govern.type==="federation"?15:20);if(r<=2&&e.civic.garrison.tactic===4&&e.civic.garrison.workers>=ce){let Y=!e.tech.gov_fed&&!_r();if(e.civic.garrison.workers-=ce,e.civic.foreign[`gov${r}`].occ=!0,e.civic.foreign[`gov${r}`].sab=0,e.civic.foreign[`gov${r}`].act="none",Y&&ue(),e.race.banana){let Ge=it();e.stats.banana.b1[Ge]=!0,Ge!=="m"&&Ge!=="l"&&(e.stats.banana.b1.l=!0)}}}else{let o=e.civic.garrison.raid;o+=l,e.civic.garrison.tactic===0&&(o=Math.floor(o/2)),e.city.ptrait.includes("rage")&&(o+=Re.rage.vars()[2]),o<1&&(o=1),o>os()&&(o=os());let d=Math.floor(J(1,o,!0));e.race.frail&&(d+=e.civic.garrison.tactic+b.frail.vars()[1]);let h=0;if(e.race.scales&&(h+=b.scales.vars()[1]),e.tech.armor&&(h+=e.tech.armor),e.race.high_pop&&(h+=Math.floor(J(0,Math.floor(h*b.high_pop.vars()[0]/2),!0))),e.race.armored){let w=b.armored.vars()[0]/100;h+=Math.floor(d*w)}let _=ve("tortoisan");if(_>0){let w=b.armored.vars(1)[0]/100*_;h+=Math.floor(d*w)}if(e.civic.garrison.raid>l&&(d-=h),e.race.instinct){let w=Math.floor(d*(b.instinct.vars()[1]/100));d-=w,l+=w}d<1&&(d=1),d>e.civic.garrison.raid&&(d=e.civic.garrison.raid),e.civic.garrison.workers-=d,e.stats.died+=d,e.civic.garrison.protest+=d,d>l?(e.civic.garrison.wounded-=l,l=0):(e.civic.garrison.wounded-=d,l-=d),e.civic.garrison.wounded+=1+Math.floor(J(l,e.civic.garrison.raid-d,!0));let m=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[3]),!0));break;case 1:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[4]),!0));break;case 2:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[5]),!0));break}e.civic.garrison.workers+=m}m>0?I(t("civics_garrison_defeat_revive",[d,m]),"danger",!1,["combat"]):I(t("civics_garrison_defeat",[d]),"danger",!1,["combat"])}e.civic.garrison.wounded>e.civic.garrison.workers-e.civic.garrison.crew?e.civic.garrison.wounded=e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.wounded<0&&(e.civic.garrison.wounded=0)}function os(){let r=0,a=e.civic.garrison.raid;switch(e.civic.garrison.tactic){case 0:r=5;break;case 1:r=10;break;case 2:r=25;break;case 3:r=50;break;case 4:r=999;break}return e.race.high_pop&&(r=N(r)),a>r&&(a=r),a}function _o(r,a){let i=os();e.race.high_pop&&(i=i/N(1));let s=r*Math.log(i+1);switch(e.race.invertebrate&&(s*=1-b.invertebrate.vars()[0]/100),e.race.universe==="evil"&&(s*=ft("evil")),e.race.gravity_well&&(s*=1-.75*ft("heavy")),e.civic.garrison.tactic){case 1:s*=4;break;case 2:s*=30;break;case 3:s*=100;break;case 4:s*=400;break}return e.race.banana&&(s*=.5),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[1]),Math.floor(s*e.civic.foreign[`gov${a}`].eco/100)}function ti(){let r=e.tech.military?e.tech.military>=5?e.tech.military-1:e.tech.military:1;if(e.tech.military&&e.tech.military>1){r-=e.tech.military>=11?2:1,e.race.sniper&&(r*=1+b.sniper.vars()[0]/100*r);let a=ve("centaur");a>0&&(r*=1+b.sniper.vars(1)[0]/100*r*a),r+=e.tech.military>=11?2:1}return r}function mt(r,a,i){if(!e.civic.hasOwnProperty("garrison"))return 1;let s=0;typeof i=="number"?s=i:r>e.civic.garrison.workers-e.civic.garrison.wounded&&(s=r-(e.civic.garrison.workers-e.civic.garrison.wounded));let n=ti(),c=ve("rhinotaur"),l=r-s/2;if(e.race.rage||c>0){let d=e.race.rage?s*b.rage.vars()[1]/100:0,h=c>0?s*b.rage.vars(1)[1]/100*c:0;l=r+d+h}let o=e.tech.military?l*n:l;if(a==="army"||a==="hellArmy"){e.race.rage&&(o*=1+b.rage.vars()[0]/100*(e.civic.garrison.wounded||0)),c>0&&(o*=1+b.rage.vars(1)[0]/100*c*(e.civic.garrison.wounded||0)),e.race.puny&&(o*=1-b.puny.vars()[0]/100),e.race.claws&&(o*=1+b.claws.vars()[0]/100);let d=ve("scorpid");d>0&&(o*=1+b.claws.vars(1)[0]/100*d),e.race.chameleon&&(o*=1+b.chameleon.vars()[0]/100),e.race.cautious&&e.city.calendar.weather===0&&(o*=1-b.cautious.vars()[0]/100),e.race.apex_predator&&(o*=1+b.apex_predator.vars()[0]/100);let h=ve("sharkin");h>0&&(o*=1+b.apex_predator.vars(1)[0]/100*h),e.race.swift&&(o*=1+b.swift.vars()[0]/100),e.race.fiery&&(o*=1+b.fiery.vars()[0]/100);let _=ve("balorg");_>0&&(o*=1+b.fiery.vars(1)[0]/100*_),e.race.sticky&&(o*=1+b.sticky.vars()[1]/100);let m=ve("pinguicula");m>0&&(o*=1+b.sticky.vars(1)[1]/100*m),e.race.pathetic&&(o*=1-b.pathetic.vars()[0]/100),e.race.tactical&&(o*=1+b.tactical.vars()[0]*e.race.tactical/100),e.tech.fanaticism&&e.tech.fanaticism>=4&&(o*=1+e.city.temple.count*.01),e.race.holy&&a==="hellArmy"&&(o*=1+b.holy.vars()[0]/100);let w=ve("unicorn");w>0&&a==="hellArmy"&&(o*=1+b.holy.vars(1)[0]/100*w),e.race.banana&&a==="hellArmy"&&(o*=.8),ma()==="aries"&&(o*=1+Zt("aries")[0]/100);let M=ge("tactician",0);if(M&&(o*=1+M/100),e.city.ptrait.includes("rage")&&(o*=Re.rage.vars()[0]),e.race.parasite&&(r===1?o+=2:r>1&&(o+=4)),e.tech.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("assaultTime")){let A=0;if(e.race.psychicPowers.assaultTime>0&&(A+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let x=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;A+=+(b.psychic.vars()[3]/5e4*x*e.race.psychicPowers.channel.assault).toFixed(3)}o*=1+A}}return a==="hunting"&&e.race.unfathomable&&(o*=.66),e.race.rejuvenated&&(o*=1.05),e.civic.govern.type==="autocracy"&&(o*=1+$e.autocracy()[1]/100),o=Math.floor(o),o*$t(r,a)}function We(r,a){if(!e.civic.garrison)return 0;let i=r?"max":"workers",s=e.portal.fortress?e.portal.fortress.garrison:0,n=e.space.fob&&!a?e.space.fob.troops:0;return e.civic.garrison[i]-e.civic.garrison.crew-s-n}function tu(){if(e.race.sludge)return!1;if($("#mad").length===0){let i=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");var r=$('
');$("#military").append(r);var a=$('
');r.append(a),a.append($(`
${t("civics_mad_reset_desc",[i])}
`));let s=!!(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt));a.append($(`
`)),a.append($(`
`)),e.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),D({el:"#mad",data:e.civic.mad,methods:{launch(){if(!e.civic.mad.armed&&!e.race.cataclysm){$("body").addClass("nuke");let n=$('
');$("body").append(n),setTimeout(function(){n.addClass("burn")},500),setTimeout(function(){n.addClass("b")},600),setTimeout(function(){Yc()},4e3)}},arm(){e.civic.mad.armed?($("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),e.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(t(s?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),e.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach(function(n){pe(`mad${n}`,function(){return"{{ label() }}"},{elm:`#mad .${n}`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){switch(n){case"mdarm":return e.tech.world_control&&!e.race.truepath?t("civics_mad_missiles_world_control_desc"):t(s?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let l=ot("mad"),o=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return t("civics_mad_missiles_warning",[l.plasmid,o])}}}}})},out:function(c){D({el:`#${c.id} > span`},"destroy")}})})}}function xe(r){return e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r}function Xe(r){if(e.race.gravity_well&&e.race.teamster&&e.race.teamster>0){let a=En(),i=e.civic.teamster.workers>a?a:e.civic.teamster.workers;r*=i/a}return r}function T(r,a){switch(r){case"transmitter":return 2.5;case"oil_well":{let i=e.tech.oil>=4?.48:.4;e.tech.oil>=7?i*=2:e.tech.oil>=5&&(i*=e.tech.oil>=6?1.75:1.25),e.city.geology.Oil&&(i*=e.city.geology.Oil+1),e.city.biome==="desert"?i*=qe.desert.vars()[1]:e.city.biome==="tundra"?i*=qe.tundra.vars()[1]:e.city.biome==="taiga"&&(i*=qe.taiga.vars()[2]);let s=ge("dirty_jobs",2);return s&&(i*=1+s/100),i}case"iridium_mine":switch(a){case"iridium":{let i=.035;e.city.geology.Iridium&&(i*=e.city.geology.Iridium+1);let s=i,n=ds(3);return{b:s,g:n-1,f:s*n}}case"coal":return .55}case"helium_mine":{let i=.18,s=ds(3);return{b:i,g:s-1,f:i*s}}case"red_mine":switch(a){case"copper":{let i=xe(.25),s=ds(3);return{b:i,g:s-1,f:i*s}}case"titanium":{let i=xe(.02),s=ds(3);return{b:i,g:s-1,f:i*s}}case"stone":return xe(.75);case"asbestos":return xe(1.25);case"aluminium":return xe(.066)}case"biodome":switch(a){case"food":return xe(.25);case"cat_food":return 2;case"lumber":return xe(1.5)}case"gas_mining":return e.tech.helium?.65:.5;case"outpost":{let i={b:.025,d:0,n:0};if(e.tech.drone){let s=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?.12:.06;i.d=e.space.drone.count*s,i.n=i.b*(1+i.d)}else i.n=i.b;return a?i:i.n}case"oil_extractor":{let i=e.tech.oil>=4?.48:.4;return e.tech.oil>=7?i*=2:e.tech.oil>=5&&(i*=e.tech.oil>=6?1.75:1.25),i}case"elerium_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?.009:.0075:.005;case"iridium_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?.1:.08:.055;case"iron_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?4:3:2;case"g_factory":if(e.race.truepath){if(e.tech.isolation)return 1.8;{let s=.05*(k.ai_colonist?e.civic.titan_colonist.workers+N(k.ai_colonist):e.civic.titan_colonist.workers);return e.race.high_pop&&(s=xe(s)),s}}else return .6;case"harvester":switch(a){case"helium":return .85;case"deuterium":return .15}case"elerium_prospector":return .014;case"neutron_miner":return .055;case"bolognium_ship":return .008;case"excavator":return .2;case"vitreloy_plant":{let i=.18;return e.civic.govern.type==="corpocracy"&&(i*=e.tech.high_tech&&e.tech.high_tech>=16?1.4:1.3),e.civic.govern.type==="socialist"&&(i*=1.1),i}case"infernite_mine":return .5*Nr("gate").supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return xe(.02)*(e.space.titan_mine?e.space.titan_mine.ratio:50)/100;case"aluminium":return xe(.12)*(100-(e.space.titan_mine?e.space.titan_mine.ratio:50))/100}case"lander":return e.space.crashed_ship.count===100?.005:0;case"orichalcum_mine":return .08;case"uranium_mine":return .025;case"neutronium_mine":return .04;case"elerium_mine":return .009;case"shock_trooper":return e.space.digsite.count===100?.0018:0;case"tank":return e.space.digsite.count===100?.0018:0;case"mining_pit":{let i=0;switch(a){case"materials":{i=e.tech.isolation?.12:.09;break}case"bolognium":{i=e.tech.isolation?.0288:.0216;break}case"stone":{i=e.tech.isolation?.8:.6;break}case"adamantite":{i=e.tech.isolation?.448:.336;break}case"copper":{i=.58;break}case"coal":{i=.13;break}case"iron":{i=.74;break}case"aluminium":{i=.88;break}case"chrysotile":{i=1.44;break}}e.race.tough&&(i*=1+b.tough.vars()[0]/100);let s=ve("ogre");return s>0&&(i*=1+b.tough.vars(1)[0]/100*s),e.tech.tau_pit_mining&&(i*=1.18),i}case"tau_farm":switch(a){case"food":return e.tech.isolation?15:9;case"lumber":return e.tech.isolation?12:5.5;case"water":return .35}case"womling_mine":{let i=1;switch(e.tech.womling_mining&&(i+=e.tech.womling_mining*.15),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&(i*=1.1),e.tech.womling_gene&&(i*=1.25),a){case"unobtainium":return .0305*i;case"uranium":return .047*i;case"titanium":return .616*i;case"copper":return 1.191*i;case"iron":return 1.377*i;case"aluminium":return 1.544*i;case"neutronium":return .382*i;case"iridium":return .535*i}}case"refueling_station":return e.tech.isolation?18.5:9.35;case"ore_refinery":return e.tech.tau_ore_mining?40:25;case"whaling_station":return 12;case"mining_ship":{if(e.tauceti.patrol_ship){let i=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(i=tt("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),(e.tech.tau_ore_mining&&e.tech.tau_ore_mining>=2?12:10)*i}return 0}case"mining_ship_ore":switch(a){case"iron":return e.tech.isolation?2.22:1.85;case"aluminium":return e.tech.isolation?2.22:1.85;case"iridium":return e.tech.isolation?.42:.35;case"neutronium":return e.tech.isolation?.42:.35;case"orichalcum":return e.tech.isolation?.3:.25;case"elerium":return e.tech.isolation?.024:.02}case"whaling_ship":{if(e.tauceti.patrol_ship){let i=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(i=tt("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),8*i}return 0}case"whaling_ship_oil":return e.tech.isolation?.78:.42;case"alien_outpost":return .01;case"psychic_boost":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.boost.r===a&&e.race.psychicPowers.hasOwnProperty("boostTime")){let i=0;if(e.race.psychicPowers.boostTime>0&&(i+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;i+=+(b.psychic.vars()[3]/5e4*s*e.race.psychicPowers.channel.boost).toFixed(3)}return 1+i}return 1}case"psychic_cash":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("cash")){let i=0;if(e.race.psychicPowers.cash>0&&(i+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;i+=+(b.psychic.vars()[3]/5e4*s*e.race.psychicPowers.channel.cash).toFixed(3)}return 1+i}return 1}}}function Ue(r){switch(r){case"Physics":xo();break;case"Genetics":Ga();break;case"Monument":return $o();case"PhysicsTech":return gt;case"GeneTech":return yo;case"BloodTech":return ru;case"Crispr":ko();break;case"Blood":Nn();break}}var gt={lhc:{title(){return Ve("fool",2022)?t("arpa_projects_railway_title"):t("arpa_projects_lhc_title")},desc(){return Ve("fool",2022)?t("arpa_projects_railway_desc"):t("arpa_projects_lhc_desc")},reqs:{high_tech:6},grant:"supercollider",effect(r){if(Ve("fool",2022)&&!r)return gt.railway.effect(!0);let a=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?e.race.cataclysm?20:8:e.race.cataclysm?10:4;return e.tech.storage>=6?e.tech.particles&&e.tech.particles>=4?e.race.cataclysm?t("arpa_projects_lhc_cataclysm3",[a]):t("arpa_projects_lhc_effect3",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm2",[a]):t("arpa_projects_lhc_effect2",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm1",[a]):e.tech.isolation?t("arpa_projects_lhc_iso1",[a,t("tech_infectious_disease_lab_alt")]):t("arpa_projects_lhc_effect1",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()])},cost:{Money(r,a){return Ze("lhc",r,25e5,1.05,a)},Knowledge(r,a){return Ze("lhc",r,5e5,1.05,a)},Copper(r,a){return Ze("lhc",r,125e3,1.05,a)},Cement(r,a){return Ze("lhc",r,25e4,1.05,a)},Aluminium(r,a){return Ze("lhc",r,35e4,1.05,a)},Titanium(r,a){return Ze("lhc",r,5e4,1.05,a)},Polymer(r,a){return Ze("lhc",r,12e3,1.05,a)}}},stock_exchange:{title:t("arpa_projects_stock_exchange_title"),desc:t("arpa_projects_stock_exchange_desc"),reqs:{banking:9},grant:"stock_exchange",effect(){return e.tech.banking>=10?e.race.cataclysm?e.tech.gambling&&e.tech.gambling>=4?t("arpa_projects_stock_exchange_cataclysm2"):t("arpa_projects_stock_exchange_cataclysm1"):e.tech.gambling&&e.tech.gambling>=4?t("arpa_projects_stock_exchange_effect3"):t("arpa_projects_stock_exchange_effect2"):t("arpa_projects_stock_exchange_effect1")},cost:{Money(r,a){return Ze("stock_exchange",r,3e6,1.06,a)},Plywood(r,a){return Ze("stock_exchange",r,25e3,1.06,a)},Brick(r,a){return Ze("stock_exchange",r,2e4,1.06,a)},Wrought_Iron(r,a){return Ze("stock_exchange",r,1e4,1.06,a)}}},tp_depot:{title:t("galaxy_gateway_depot"),desc:t("arpa_projects_depot_desc"),reqs:{high_tech:6,storage:4},grant:"tp_depot",path:["truepath"],effect(){return t(e.tech.isolation?"arpa_projects_depot_effect_iso":"arpa_projects_depot_effect",[5,50])},cost:{Money(r,a){return Ze("tp_depot",r,18e5,1.08,a)},Stone(r,a){return Ze("tp_depot",r,75e4,1.08,a)},Iron(r,a){return Ze("tp_depot",r,25e4,1.08,a)},Alloy(r,a){return Ze("tp_depot",r,3e4,1.08,a)}}},launch_facility:{id:"arpalaunch_facility",title:t("arpa_projects_launch_facility_title"),desc:t("arpa_projects_launch_facility_desc"),reqs:{high_tech:7},condition(){return!(e.race.cataclysm||e.race.lone_survivor)},grant:"launch_facility",rank:1,queue_complete(){return e.tech.space>=1?0:1},effect(){return t("arpa_projects_launch_facility_effect1")},cost:{Money(r){return Ze("launch_facility",r,2e6,1.1)},Knowledge(r){return Ze("launch_facility",r,5e5,1.1)},Cement(r){return Ze("launch_facility",r,15e4,1.1)},Oil(r){return Ze("launch_facility",r,2e4,1.1)},Sheet_Metal(r){return Ze("launch_facility",r,15e3,1.1)},Alloy(r){return Ze("launch_facility",r,25e3,1.1)}}},monument:{title(r){if(r)return t("arpa_project_monument_title");switch(e.arpa.m_type){case"Obelisk":return t("arpa_project_monument_obelisk");case"Statue":return t("arpa_project_monument_statue");case"Sculpture":return t("arpa_project_monument_sculpture");case"Monolith":return t("arpa_project_monument_monolith");case"Pillar":return t("arpa_project_monument_pillar");case"Megalith":return t("arpa_project_monument_megalith")}},desc:t("arpa_projects_monument_desc"),reqs:{monument:1},grant:"monuments",effect(){let r=ge("gaslighter",2),a=r?2-r:2;return t("arpa_projects_monument_effect1",[a])},cost:{Stone(r,a){return Li("Stone",r,a)},Aluminium(r,a){return Li("Aluminium",r,a)},Cement(r,a){return Li("Cement",r,a)},Steel(r,a){return Li("Steel",r,a)},Lumber(r,a){return Li("Lumber",r,a)},Crystal(r,a){return Li("Crystal",r,a)}}},railway:{title(){return Ve("fool",2022)?t("arpa_projects_lhc_title"):t("arpa_projects_railway_title")},desc(){return Ve("fool",2022)?t("arpa_projects_lhc_desc"):t("arpa_projects_railway_desc")},reqs:{high_tech:6,trade:3},grant:"railway",effect(r){if(Ve("fool",2022)&&!r)return gt.lhc.effect(!0);let a=e.stats.achieve.banana&&e.stats.achieve.banana.l>=2?1:0,i=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?3:2;return e.race.cataclysm||e.race.orbit_decayed?(a+=e.space.gps?Math.floor(e.space.gps.count/3):0,t("arpa_projects_railway_cataclysm1",[a,i,3,1])):(a+=e.city.storage_yard?Math.floor(e.city.storage_yard.count/6):0,t("arpa_projects_railway_effect1",[a,i,6,1]))},cost:{Money(r,a){return Ze("railway",r,25e5,1.08,a)},Lumber(r,a){return Ze("railway",r,75e4,1.08,a)},Iron(r,a){return Ze("railway",r,3e5,1.08,a)},Steel(r,a){return Ze("railway",r,45e4,1.08,a)}}},roid_eject:{title(){return t("arpa_projects_roid_eject_title",[In()])},desc(){return t(e.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[In()])},reqs:{blackhole:6,gateway:3},grant:"roid_eject",effect(){let r=0,a=0;return e.tech.roid_eject&&(r+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12),a=.225*(e.tech.roid_eject+1)*(1+(e.tech.roid_eject+1)/12)-r),`
${t("arpa_projects_roid_eject_effect1")}
${t("arpa_projects_roid_eject_effect2",[+r.toFixed(3),+a.toFixed(3),In()])}
`},cost:{Money(r,a){return Ze("roid_eject",r,1875e4,1.075,a)},Deuterium(r,a){return Ze("roid_eject",r,375e3,1.075,a)},Bolognium(r,a){return Ze("roid_eject",r,15e3,1.075,a)}}},nexus:{title:t("arpa_projects_nexus_title"),desc:t("arpa_projects_nexus_desc"),reqs:{magic:5},grant:"nexus",effect(){return e.tech.roguemagic&&e.tech.roguemagic>=7?`
${t("arpa_projects_nexus_effect1",[5])}
${t("witch_hunter_nexus",[8])}
`:t("arpa_projects_nexus_effect1",[5])},cost:{Money(r,a){return Ze("nexus",r,5e6,1.12,a)},Crystal(r,a){return Ze("nexus",r,6e4,1.12,a)},Iridium(r,a){return Ze("nexus",r,35e3,1.12,a)}}},syphon:{title:t("arpa_syphon_title"),desc(){let r="";return e.tech.syphon&&e.tech.syphon>=0?r=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn2")}
`:r=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn1")}
`,e.race.witch_hunter&&(r+=`
${t("witch_hunter_suspicion")}
`),r},reqs:{veil:2},grant:"syphon",effect(){let r=+(.3333333333333333*ft("magic")).toFixed(3);if(e.tech.syphon&&e.tech.syphon>=60){let a=ot("vacuum"),i=t("resource_Plasmid_plural_name");return`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect4")}
${t("arpa_syphon_effect_reward",[a.plasmid,a.phage,a.dark,i,80])}
`}else return e.tech.syphon&&e.tech.syphon>=40?`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect3")}
`:e.tech.syphon&&e.tech.syphon>=20?`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect2")}
`:`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect1")}
`},cost:{Money(r,a){return Ze("syphon",r,75e5,1.025,a)},Mana(r,a){return Ze("syphon",r,5e3,1.025,a)},Crystal(r,a){return Ze("syphon",r,1e5,1.025,a)},Infernite(r,a){return Ze("syphon",r,1e4,1.025,a)}}}};function In(){return!e.tech.roid_eject||e.tech.roid_eject<=10?t("arpa_projects_roid_eject_asteroid"):e.tech.roid_eject<=25?t("arpa_projects_roid_eject_moon"):e.tech.roid_eject<=40?t("arpa_projects_roid_eject_dwarf"):e.tech.roid_eject<=60?t("arpa_projects_roid_eject_planet"):t("arpa_projects_roid_eject_remnant")}var yo={genetic_memory:{id:"genes-genetic_memory",title:t("arpa_genepool_genetic_memory_title"),desc:t("arpa_genepool_genetic_memory_desc"),reqs:{},grant:["creep",1],cost:{Plasmid(){return 25}},action(){return!!Ne("genetic_memory")}},animus:{id:"genes-animus",title:t("arpa_genepool_animus_title"),desc:t("arpa_genepool_animus_desc"),reqs:{creep:1},grant:["creep",2],cost:{Plasmid(){return 75}},action(){return!!Ne("animus")}},divine_remembrance:{id:"genes-divine_remembrance",title:t("arpa_genepool_divine_remembrance_title"),desc:t("arpa_genepool_divine_remembrance_desc"),reqs:{creep:2},grant:["creep",3],cost:{Plasmid(){return 225}},action(){return!!Ne("divine_remembrance")}},divine_proportion:{id:"genes-divine_proportion",title:t("arpa_genepool_divine_proportion_title"),desc:t("arpa_genepool_divine_proportion_desc"),reqs:{creep:3},grant:["creep",4],cost:{Plasmid(){return 618}},action(){return!!Ne("divine_proportion")}},genetic_repository:{id:"genes-genetic_repository",title:t("arpa_genepool_genetic_repository_title"),desc:t("arpa_genepool_genetic_repository_desc"),reqs:{creep:4},grant:["creep",5],cost:{Plasmid(){return 999}},action(){return!!Ne("genetic_repository")}},spatial_reasoning:{id:"genes-spatial_reasoning",title:t("arpa_genepool_spatial_reasoning_title"),desc:t("arpa_genepool_spatial_reasoning_desc"),reqs:{},grant:["store",1],cost:{Plasmid(){return 50}},action(){return!!Ne("spatial_reasoning")}},spatial_superiority:{id:"genes-spatial_superiority",title:t("arpa_genepool_spatial_superiority_title"),desc:t("arpa_genepool_spatial_superiority_desc"),reqs:{store:1},grant:["store",2],cost:{Plasmid(){return 125}},action(){return!!Ne("spatial_superiority")}},spatial_supremacy:{id:"genes-spatial_supremacy",title:t("arpa_genepool_spatial_supremacy_title"),desc:t("arpa_genepool_spatial_supremacy_desc"),reqs:{store:2},grant:["store",3],cost:{Plasmid(){return 325}},action(){return!!Ne("spatial_supremacy")}},dimensional_warping:{id:"genes-dimensional_warping",title:t("arpa_genepool_dimensional_warping_title"),desc:t("arpa_genepool_dimensional_warping_desc"),reqs:{store:3},grant:["store",4],cost:{Plasmid(){return 500}},action(){return!!Ne("dimensional_warping")}},enhanced_muscle_fiber:{id:"genes-enhanced_muscle_fiber",title:t("arpa_genepool_enhanced_muscle_fiber_title"),desc:t("arpa_genepool_enhanced_muscle_fiber_desc"),reqs:{},grant:["enhance",1],cost:{Plasmid(){return 25}},action(){return!!Ne("enhanced_muscle_fiber")}},morphogenesis:{id:"genes-morphogenesis",title:t("arpa_genepool_morphogenesis_title"),desc:t("arpa_genepool_morphogenesis_desc"),reqs:{},grant:["evolve",1],cost:{Plasmid(){return 10}},action(){return!!Ne("morphogenesis")}},recombination:{id:"genes-recombination",title:t("arpa_genepool_recombination_title"),desc:t("arpa_genepool_recombination_desc"),reqs:{evolve:1},grant:["evolve",2],cost:{Plasmid(){return 35}},action(){return!!Ne("recombination")}},homologous_recombination:{id:"genes-homologous_recombination",title:t("arpa_genepool_homologous_recombination_title"),desc:t("arpa_genepool_homologous_recombination_desc"),reqs:{evolve:2},grant:["evolve",3],cost:{Plasmid(){return 70}},action(){return!!Ne("homologous_recombination")}},genetic_reshuffling:{id:"genes-genetic_reshuffling",title:t("arpa_genepool_genetic_reshuffling_title"),desc:t("arpa_genepool_genetic_reshuffling_desc"),reqs:{evolve:3},grant:["evolve",4],cost:{Plasmid(){return 175}},action(){return!!Ne("genetic_reshuffling")}},recombinant_dna:{id:"genes-recombinant_dna",title:t("arpa_genepool_recombinant_dna_title"),desc:t("arpa_genepool_recombinant_dna_desc"),reqs:{evolve:4},grant:["evolve",5],cost:{Plasmid(){return 440}},action(){return!!Ne("recombinant_dna")}},chimeric_dna:{id:"genes-chimeric_dna",title:t("arpa_genepool_chimeric_dna_title"),desc:t("arpa_genepool_chimeric_dna_desc"),reqs:{evolve:5},grant:["evolve",6],cost:{Plasmid(){return 1100}},action(){return!!Ne("chimeric_dna")}},molecular_cloning:{id:"genes-molecular_cloning",title:t("arpa_genepool_molecular_cloning_title"),desc:t("arpa_genepool_molecular_cloning_desc"),reqs:{evolve:6},grant:["evolve",7],cost:{Plasmid(){return 2750}},action(){return!!Ne("molecular_cloning")}},transgenes:{id:"genes-transgenes",title:t("arpa_genepool_transgenes_title"),desc:t("arpa_genepool_transgenes_desc"),reqs:{evolve:7},grant:["evolve",8],cost:{Plasmid(){return 6875}},action(){return!!Ne("transgenes")}},synthesis:{id:"genes-synthesis",title:t("arpa_genepool_synthesis_title"),desc:t("arpa_genepool_synthesis_desc",[2,10]),reqs:{evolve:1},grant:["synthesis",1],cost:{Plasmid(){return 25}},action(){return!!Ne("synthesis")}},karyokinesis:{id:"genes-karyokinesis",title:t("arpa_genepool_karyokinesis_title"),desc:t("arpa_genepool_synthesis_desc",[3,25]),reqs:{synthesis:1},grant:["synthesis",2],cost:{Plasmid(){return 40}},action(){return!!Ne("karyokinesis")}},cytokinesis:{id:"genes-cytokinesis",title:t("arpa_genepool_cytokinesis_title"),desc:t("arpa_genepool_synthesis_desc",[4,50]),reqs:{synthesis:2},grant:["synthesis",3],cost:{Plasmid(){return 55}},action(){return!!Ne("cytokinesis")}},mitosis:{id:"genes-mitosis",title:t("arpa_genepool_mitosis_title"),desc:t("arpa_genepool_mitosis_desc",[3]),reqs:{synthesis:3,evolve:2},grant:["plasma",1],cost:{Plasmid(){return 90}},action(){return!!Ne("mitosis")}},metaphase:{id:"genes-metaphase",title:t("arpa_genepool_metaphase_title"),desc:t("arpa_genepool_mitosis_desc",[5]),reqs:{plasma:1},grant:["plasma",2],cost:{Plasmid(){return 165}},action(){return!!Ne("metaphase")}},mutation:{id:"genes-mutation",title:t("arpa_genepool_mutation_title"),desc:t("arpa_genepool_mutation_desc"),reqs:{synthesis:3,creep:5},grant:["mutation",1],cost:{Plasmid(){return 1250}},action(){return Ne("mutation")?(e.genes.mutation=1,Ga(),!0):!1}},transformation:{id:"genes-transformation",title:t("arpa_genepool_transformation_title"),desc:t("arpa_genepool_transformation_desc"),reqs:{mutation:1},grant:["mutation",2],cost:{Plasmid(){return 1500}},action(){return Ne("transformation")?(e.genes.mutation=2,Ga(),!0):!1}},metamorphosis:{id:"genes-metamorphosis",title:t("arpa_genepool_metamorphosis_title"),desc:t("arpa_genepool_metamorphosis_desc"),reqs:{mutation:2},grant:["mutation",3],cost:{Plasmid(){return 1750}},action(){return Ne("metamorphosis")?(e.genes.mutation=3,Ga(),!0):!1}},replication:{id:"genes-replication",title:t("arpa_genepool_replication_title"),desc:t("arpa_genepool_replication_desc"),reqs:{evolve:1},grant:["birth",1],cost:{Plasmid(){return 65}},action(){return!!Ne("replication")}},artificer:{id:"genes-artificer",title:t("arpa_genepool_artificer_title"),desc:t("arpa_genepool_artificer_desc"),reqs:{evolve:1},grant:["crafty",1],cost:{Plasmid(){return 45}},action(){return!!Ne("artificer")}},detail_oriented:{id:"genes-detail_oriented",title:t("arpa_genepool_detail_oriented_title"),desc:t("arpa_genepool_crafting_desc",["50"]),reqs:{crafty:1},grant:["crafty",2],cost:{Plasmid(){return 90}},action(){return!!Ne("detail_oriented")}},rigorous:{id:"genes-rigorous",title:t("arpa_genepool_rigorous_title"),desc:t("arpa_genepool_crafting_desc",["100"]),reqs:{crafty:2},grant:["crafty",3],cost:{Plasmid(){return 135}},action(){return!!Ne("rigorous")}},geographer:{id:"genes-geographer",title:t("arpa_genepool_geographer_title"),desc:t("arpa_genepool_geographer_desc"),reqs:{store:1},grant:["queue",1],cost:{Plasmid(){return 75}},action(){return!!Ne("geographer")}},architect:{id:"genes-architect",title:t("arpa_genepool_architect_title"),desc:t("arpa_genepool_architect_desc"),reqs:{queue:1},grant:["queue",2],cost:{Plasmid(){return 160}},action(){return!!Ne("architect")},post(){zr(),ra()}},precognition:{id:"genes-precognition",title:t("arpa_genepool_precognition_title"),desc:t("arpa_genepool_precognition_desc"),reqs:{queue:2},grant:["queue",3],condition(){return e.stats.aiappoc>0},cost:{Plasmid(){return 3500},Phage(){return 100},AICore(){return 1}},action(){return!!Ne("precognition")}},governance:{id:"genes-governance",title:t("arpa_genepool_governance_title"),desc:t("arpa_genepool_governance_desc"),reqs:{queue:2},grant:["governor",1],cost:{Plasmid(){return 300},Phage(){return 25}},action(){return!!Ne("governance")}},civil_service:{id:"genes-civil_service",title:t("arpa_genepool_civil_service_title"),desc:t("arpa_genepool_civil_service_desc"),reqs:{governor:1},grant:["governor",2],cost:{Plasmid(){return 1e3},Harmony(){return 1}},action(){return!!Ne("civil_service")},post(){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r=0;r<6;r++)e.race.governor.tasks.hasOwnProperty(`t${r}`)||(e.race.governor.tasks[`t${r}`]="none");Ot()}},hardened_genes:{id:"genes-hardened_genes",title:t("arpa_genepool_hardened_genes_title"),desc:t("arpa_genepool_hardened_genes_desc"),reqs:{},grant:["challenge",1],cost:{Plasmid(){return 5}},action(){return!!Ne("hardened_genes")}},unlocked:{id:"genes-unlocked",title:t("arpa_genepool_unlocked_title"),desc:t("arpa_genepool_unlocked_desc"),reqs:{challenge:1},grant:["challenge",2],cost:{Plasmid(){return 50}},action(){return!!Ne("unlocked")},post(){Nt(!0)}},universal:{id:"genes-universal",title:t("arpa_genepool_universal_title"),desc:t("arpa_genepool_universal_desc"),reqs:{challenge:2},grant:["challenge",3],condition(){return e.race.universe!=="standard"},cost:{Plasmid(){return 400}},action(){return!!Ne("universal")},post(){Nt(!0)}},standard:{id:"genes-standard",title:t("arpa_genepool_standard_title"),desc:t("arpa_genepool_standard_desc"),reqs:{challenge:3},grant:["challenge",4],condition(){return e.race.universe!=="standard"},cost:{Plasmid(){return 2500}},action(){return!!Ne("standard")},post(){Nt(!0)}},mastered:{id:"genes-mastered",title:t("arpa_genepool_mastered_title"),desc:t("arpa_genepool_mastered_desc"),reqs:{challenge:4},grant:["challenge",5],cost:{Plasmid(){return 4e3}},action(){return!!Ne("mastered")}},negotiator:{id:"genes-negotiator",title:t("arpa_genepool_negotiator_title"),desc:t("arpa_genepool_negotiator_desc"),reqs:{challenge:2},grant:["trader",1],cost:{Plasmid(){return 750}},action(){return Ne("negotiator")?(e.genes.trader=1,Ln(),!0):!1}},ancients:{id:"genes-ancients",title:t("arpa_genepool_ancients_title"),desc:t("arpa_genepool_ancients_desc"),reqs:{evolve:2},condition(){return!!e.genes.old_gods},grant:["ancients",1],cost:{Plasmid(){return 120}},action(){return Ne("ancients")?(e.genes.ancients=1,ue(),!0):!1}},faith:{id:"genes-faith",title:t("arpa_genepool_faith_title"),desc:t("arpa_genepool_faith_desc"),reqs:{ancients:1},grant:["ancients",2],cost:{Plasmid(){return 300}},action(){return Ne("faith")?(e.civic.priest.display=!0,!0):!1}},devotion:{id:"genes-devotion",title:t("arpa_genepool_devotion_title"),desc:t("arpa_genepool_devotion_desc"),reqs:{ancients:2},grant:["ancients",3],cost:{Plasmid(){return 600}},action(){return!!Ne("devotion")}},acolyte:{id:"genes-acolyte",title:t("arpa_genepool_acolyte_title"),desc:t("arpa_genepool_acolyte_desc"),reqs:{ancients:3},grant:["ancients",4],cost:{Plasmid(){return 1e3}},action(){return!!Ne("acolyte")}},conviction:{id:"genes-conviction",title:t("arpa_genepool_conviction_title"),desc:t("arpa_genepool_conviction_desc"),reqs:{ancients:4},grant:["ancients",5],cost:{Plasmid(){return 1500}},action(){return!!Ne("conviction")}},transcendence:{id:"genes-transcendence",title:t("arpa_genepool_transcendence_title"),desc:t("arpa_genepool_transcendence_desc"),reqs:{ancients:1,mutation:3},grant:["transcendence",1],cost:{Plasmid(){return 3e3}},action(){return Ne("transcendence")?(e.genes.transcendence=1,ue(),!0):!1}},bleeding_effect:{id:"genes-bleeding_effect",title:t("arpa_genepool_bleeding_effect_title"),desc:t("arpa_genepool_bleeding_effect_desc",[2.5]),reqs:{creep:2},grant:["bleed",1],condition(){return e.race.universe==="antimatter"},cost:{Plasmid(){return 100}},action(){return!!Ne("bleeding_effect")}},synchronicity:{id:"genes-synchronicity",title:t("arpa_genepool_synchronicity_title"),desc:t("arpa_genepool_synchronicity_desc",[25]),reqs:{bleed:1},grant:["bleed",2],cost:{Plasmid(){return 500}},action(){return!!Ne("synchronicity")}},astral_awareness:{id:"genes-astral_awareness",title:t("arpa_genepool_astral_awareness_title"),desc:t("arpa_genepool_astral_awareness_desc"),reqs:{bleed:2},grant:["bleed",3],cost:{Plasmid(){return 1e3}},action(){return!!Ne("astral_awareness")}},blood_remembrance:{id:"genes-blood_remembrance",title:t("arpa_genepool_blood_remembrance_title"),desc:t("arpa_genepool_blood_remembrance_desc"),reqs:{},grant:["blood",1],condition(){return e.prestige.Blood_Stone.count>=1},cost:{Plasmid(){return 1e3},Phage(){return 10}},action(){return!!Ne("blood_remembrance")}},blood_sacrifice:{id:"genes-blood_sacrifice",title:t("arpa_genepool_blood_sacrifice_title"),desc:t("arpa_genepool_blood_sacrifice_desc"),reqs:{blood:1},grant:["blood",2],cost:{Plasmid(){return 3e3},Phage(){return 100},Artifact(){return 1}},action(){return!!Ne("blood_sacrifice")}},essence_absorber:{id:"genes-essence_absorber",title:t("arpa_genepool_essence_absorber_title"),desc:t("arpa_genepool_essence_absorber_desc"),reqs:{blood:2},grant:["blood",3],cost:{Plasmid(){return 7500},Phage(){return 250},Artifact(){return 1}},action(){return!!Ne("essence_absorber")},post(){Nn()}}},ru={purify:{id:"blood-purify",title:t("arpa_blood_purify_title"),desc:t("arpa_blood_purify_desc"),reqs:{},grant:["spire",1],cost:{Blood_Stone(){return 10}},action(){return!!Mr($(this)[0].cost)}},chum:{id:"blood-chum",title:t("arpa_blood_chum_title"),desc:t("arpa_blood_chum_desc"),reqs:{spire:1},grant:["spire",2],cost:{Blood_Stone(){return 25}},action(){return!!Mr($(this)[0].cost)}},lust:{id:"blood-lust",title:t("arpa_blood_lust_title"),desc:t("arpa_blood_lust_desc"),reqs:{},grant:["lust","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.lust||0))*15+15},Artifact(r){return((r||0)+(e.blood.lust||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},illuminate:{id:"blood-illuminate",title:t("arpa_blood_illuminate_title"),desc:t("arpa_blood_illuminate_desc"),reqs:{},grant:["illuminate","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.illuminate||0))*12+12},Artifact(r){return((r||0)+(e.blood.illuminate||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},greed:{id:"blood-greed",title:t("arpa_blood_greed_title"),desc:t("arpa_blood_greed_desc"),reqs:{},grant:["greed","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.greed||0))*16+16},Artifact(r){return((r||0)+(e.blood.greed||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},hoarder:{id:"blood-hoarder",title:t("arpa_blood_hoarder_title"),desc:t("arpa_blood_hoarder_desc"),reqs:{},grant:["hoarder","*"],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(r){return((r||0)+(e.blood.hoarder||0))*14+14},Artifact(r){return((r||0)+(e.blood.hoarder||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},artisan:{id:"blood-artisan",title:t("arpa_blood_artisan_title"),desc:t("arpa_blood_artisan_desc"),reqs:{},grant:["artisan","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.artisan||0))*8+8},Artifact(r){return((r||0)+(e.blood.artisan||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},attract:{id:"blood-attract",title:t("arpa_blood_attract_title"),desc:t("arpa_blood_attract_desc"),reqs:{},grant:["attract","*"],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(r){return((r||0)+(e.blood.attract||0))*4+4},Artifact(r){return((r||0)+(e.blood.attract||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},wrath:{id:"blood-wrath",title:t("arpa_blood_wrath_title"),desc:t("arpa_blood_wrath_desc"),reqs:{},grant:["wrath","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.wrath||0))*2+2},Artifact(){return 1}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},prepared:{id:"blood-prepared",title:t("arpa_blood_prepared_title"),desc:t("arpa_blood_prepared_desc"),reqs:{},grant:["prepared",1],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 50}},action(){return!!Mr($(this)[0].cost)},post(){Ki()}},compact:{id:"blood-compact",title:t("arpa_blood_compact_title"),desc:t("arpa_blood_compact_desc"),reqs:{prepared:1},grant:["prepared",2],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 75}},action(){return!!Mr($(this)[0].cost)}},infernal:{id:"blood-infernal",title:t("arpa_blood_infernal_title"),desc:t("arpa_blood_infernal_desc"),reqs:{prepared:2},grant:["prepared",3],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 125},Artifact(){return 1}},action(){return!!Mr($(this)[0].cost)}},unbound:{id:"blood-unbound",title:t("arpa_blood_unbound_title"),desc:t("arpa_blood_unbound_desc"),reqs:{},grant:["unbound",1],cost:{Blood_Stone(){return 50}},action(){return!!Mr($(this)[0].cost)}},unbound_resistance:{id:"blood-unbound_resistance",title:t("arpa_blood_unbound_resistance_title"),desc:t("arpa_blood_unbound_resistance_desc"),reqs:{unbound:1},grant:["unbound",2],cost:{Blood_Stone(){return 100}},action(){return!!Mr($(this)[0].cost)}},shadow_war:{id:"blood-shadow_war",title:t("arpa_blood_shadow_war_title"),desc:t("arpa_blood_shadow_war_desc"),reqs:{unbound:2},grant:["unbound",3],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 250},Artifact(){return 2}},action(){return!!Mr($(this)[0].cost)}},unbound_immunity:{id:"blood-unbound_immunity",title:t("arpa_blood_unbound_immunity_title"),desc:t("arpa_blood_unbound_immunity_desc"),reqs:{unbound:3},grant:["unbound",4],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 500}},action(){return!!Mr($(this)[0].cost)}},blood_aware:{id:"blood-blood_aware",title:t("arpa_blood_blood_aware_title"),desc:t("arpa_blood_blood_aware_desc"),reqs:{},grant:["aware",1],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 10}},action(){return!!Mr($(this)[0].cost)}}};function Ne(r){let a=!0,i=yo[r].cost;return Object.keys(i).forEach(function(s){let n=s;s==="Plasmid"&&e.race.universe==="antimatter"&&(s="AntiPlasmid"),e.prestige[s].countNumber(e.resource[i].amount))return a=!1,!1}),a}function hs(r,a,i){return r=uu(r,a,i),jr({cost:r},a,i)}function uu(r,a,i){let s=ve("human");if(i&&i.creative||!i&&e.race.creative||!i&&s>0){var n={};return Object.keys(r).forEach(function(c){n[c]=function(){let l=r[c](a,i);return(i&&i.creative||!i&&e.race.creative)&&(l*=1-b.creative.vars()[1]/100),s>0&&(l*=1-b.creative.vars(1)[1]/100*s),l}}),n}return r}function Ze(r,a,i,s,n){var c=e.arpa[r]?e.arpa[r].rank:0;return(n&&n.creative||!n&&e.race.creative)&&r!=="syphon"&&(s-=b.creative.vars()[0]),a&&(c+=a),Math.round(s**c*i)}function xo(){if(e.tech.high_tech&&e.tech.high_tech>=6){let r=$("#arpaPhysics");le(r),Object.keys(gt).forEach(function(a){_u(r,a)})}}function Kn(){let r=$("#geneticMinor")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function du(){let r=$("#geneticMinor")[0];r&&Sortable.create(r,{onEnd(a){let i=e.settings.mtorder;i.splice(a.newDraggableIndex,0,i.splice(a.oldDraggableIndex,1)[0]),e.settings.mtorder=i,Ga()}})}function Ga(){let r=$("#arpaGenetics");if(Kn(),le(r),!e.settings.arpa.genetics)return!1;if(e.tech.genetics>1){let a=$('
');r.append(a);let i=e.tech.genetics>2?t("arpa_gene_mutation"):t("arpa_sequence_genome");e.race.artifical&&(i=e.tech.genetics>2?t("arpa_code_modification"):t("arpa_decompile_source"));let s=$(`
${i} - ${t("arpa_to_complete")}
`);a.append(s);let n=$(`{{ progress }}%`);a.append(n);let c=e.tech.genetics>2?t("arpa_mutate"):t("arpa_sequence");e.race.artifical&&(c=e.tech.genetics>2?t("arpa_modify"):t("arpa_decompile"));let l=$(``);if(a.append(l),e.tech.genetics>=5){let o=$(``);a.append(o)}if(e.tech.genetics>=6){let o=$(``);a.append(o)}if(e.tech.genetics>=7){let o=$(``);a.append(o)}e.arpa.sequence.on&&$("#arpaSequence button.seq").addClass("has-text-success"),e.arpa.sequence.boost&&$("#arpaSequence button.boost").addClass("has-text-success"),e.arpa.sequence.auto&&$("#arpaSequence button.auto").addClass("has-text-success"),D({el:"#arpaSequence",data:e.arpa.sequence,methods:{toggle(){e.arpa.sequence.on?(e.arpa.sequence.on=!1,$("#arpaSequence button.seq").removeClass("has-text-success")):(e.arpa.sequence.on=!0,$("#arpaSequence button.seq").addClass("has-text-success"))},booster(){e.arpa.sequence.boost?(e.arpa.sequence.boost=!1,$("#arpaSequence button.boost").removeClass("has-text-success")):(e.arpa.sequence.boost=!0,$("#arpaSequence button.boost").addClass("has-text-success"))},boostLabel(o){return t(e.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(o?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")},novo(){let o=fe();for(let d=0;d=2e5;d++)e.resource.Knowledge.amount-=2e5,e.resource.Genes.amount++},novoLabel(){return t(e.race.artifical?"arpa_novo_artifical_label":"arpa_novo_label",["200k"])},auto_seq(){e.arpa.sequence.auto?(e.arpa.sequence.auto=!1,$("#arpaSequence button.auto").removeClass("has-text-success")):(e.arpa.sequence.auto=!0,$("#arpaSequence button.auto").addClass("has-text-success"))},autoLabel(o){return t(e.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(o?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")}},filters:{timer(o){if(e.arpa.sequence.on&&e.arpa.sequence.labs>0)return e.arpa.sequence.boost?At(o/(e.arpa.sequence.labs*2)):At(o/e.arpa.sequence.labs);{let d=jt(14,12);return d.length>0?d:t("time_never")}}}}),pe("popArpaSeq",function(){return e.tech.genetics>2?e.race.artifical?t("arpa_modify_desc"):t("arpa_mutate_desc"):e.race.artifical?t("arpa_decompile_desc"):t("arpa_sequence_desc")},{elm:"#arpaSequence .seqlbl",classes:"has-background-light has-text-dark"})}if(e.tech.genetics>2){let a=$('
');$("#arpaGenetics").append(a);let i=$('
');a.append(i),e.tech.decay&&e.tech.decay>=2&&(e.settings.mtorder.includes("fortify")||e.settings.mtorder.push("fortify")),Object.keys(e.race).forEach(function(x){b[x]&&b[x].type==="minor"&&(e.settings.mtorder.includes(x)||e.settings.mtorder.push(x))}),e.genes.challenge&&e.genes.challenge>=5&&(e.settings.mtorder.includes("mastery")||e.settings.mtorder.push("mastery"));let s=!1,n=[];e.settings.mtorder.forEach(function(x){(b[x]&&b[x].type==="minor"||x==="mastery"||x==="fortify")&&(x!=="fortify"||e.tech.decay&&e.tech.decay>=2)&&(!["promiscuous","content","resilient","industrious","tactical","fibroblast"].includes(x)&&e.race.lone_survivor||!e.race.lone_survivor)&&(s=!0,pu(i,x),n.push(x))}),a.append(`
${t("arpa_race_genetic_traids",[tt("name")])}
`);let c=sa("name"),l=[],o=[],d=$('
');a.append(d);let h=Ke(e.race);Ve("fool",2023)&&(h.hooved=1),Object.keys(h).forEach(function(x){if(b[x]&&b[x].type!=="minor"&&b[x].type!=="special"&&x!=="evil"&&x!=="soul_eater"&&x!=="artifical"){let j=!1;if(e.race.ss_traits&&e.race.ss_traits.includes(x)||e.race.iTraits&&e.race.iTraits.hasOwnProperty(x)||e.race.species==="sludge"&&(x==="ooze"||e.race.modified)?j=!0:e.race.hasOwnProperty(x)||(j=!0),!j&&(b[x].type==="major"&&e.genes.mutation||b[x].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let B=$('
'),S=$(`${t("arpa_remove_button")}`);l.push(x),B.append(S),B.append($(`${c[x]?c[x]:b[x].name} (${t("arpa_genepool_rank",[h[x]])})`)),d.append(B)}else o.push(x),d.append(`
${c[x]?c[x]:b[x].name} (${t("arpa_genepool_rank",[h[x]])})
`)}});let _=[];if(e.genes.mutation&&e.genes.mutation>=3&&(e.race.species!=="sludge"||!e.race.modified)){a.append(`
${t("arpa_race_genetic_gain")}
`);let x=["dumb","smart"];Object.keys(F).forEach(function(B){B!=="junker"&&B!=="sludge"&&B!=="custom"&&F[B].type===F[e.race.species].type&&Object.keys(F[B].traits).forEach(function(S){if(!e.race[S]&&S!=="soul_eater"){let Q=x.indexOf(S);if(Q===-1)_.push(S);else{let V=!1;switch(Q%2){case 0:e.race[x[Q+1]]&&(V=!0);break;case 1:e.race[x[Q-1]]&&(V=!0);break}V||_.push(S)}}})});let j=$('
');a.append(j);for(let B=0;B<_.length;B++){let S=_[B],Q=$('
'),V=$(`${t("arpa_gain_button")}`);Q.append(V),Q.append($(`${c[S]?c[S]:b[S].name}`)),j.append(Q)}}s&&a.prepend(`
${t("arpa_race_genetic_minor_traits",[tt("name")])}
`);let m=function(x){let j=b[x].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1),t("arpa_remove",[sa("name",x),j,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},w=function(x){let j=b[x].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1),t("arpa_gain",[sa("name",x),j,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},M=function(x){let j=Ba(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),t("arpa_gene_buy",[sa("name",x),Ee(j),e.resource.Genes.name])},A=function(x){let j=Ba(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),t("arpa_phage_buy",[sa("name",x),Ee(j),t("resource_Phage_name")])};D({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(x){let j=0,B=fe(),S=!0,Q=!1;for(;j=V?(e.resource.Genes.amount-=V,e.race.minor[x]?e.race.minor[x]++:e.race.minor[x]=1,e.race[x]?e.race[x]++:e.race[x]=1,Q=!0):S=!1,j++}Q&&(x==="mastery"&&Nt(!0),Ga(),x==="persuasive"&&Ln())},phage(x){let j=0,B=fe(),S=!0,Q=!1;for(;j=V?(e.prestige.Phage.count-=V,e.genes.minor[x]?e.genes.minor[x]++:e.genes.minor[x]=1,e.race[x]?e.race[x]++:e.race[x]=1,Q=!0):S=!1,j++}Q&&(x==="mastery"&&Nt(!0),Ga(),x==="persuasive"&&Ln())},purge(x){if(e.race.species==="sludge"&&(e.race.modified||x==="ooze"))return;let j=b[x].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1);let B=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[B].count>=j){e.prestige[B].count-=j;let S=e.race[x];delete e.race[x],e.race.modified?e.race.modified++:e.race.modified=1,Ns(x,S),Ga(),ue(),Et();let Q=0;Object.keys(e.race).forEach(function(V){b[V]&&(b[V].type=="major"||b[V].type=="genus")&&V!=="evil"&&Q++}),Q===0&&De("blank_slate")}},gain(x){if(e.race.species==="sludge"&&e.race.modified)return;let j=b[x].val*5;e.race.species==="sludge"&&(j*=2),e.race.species==="custom"&&(j*=10),j<0&&(j*=-1);let B=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[B].count>=j&&(e.prestige[B].count-=j,e.race[x]=1,e.race.modified?e.race.modified++:e.race.modified=1,Ni(x),Ga(),ue(),Et())},geneCost(x){return M(x)},phageCost(x){return A(x)},traitEffect(x){return t(`trait_${x}_effect`)},removeCost(x){return m(x)},addCost(x){return w(x)},genePurchasable(x){let j=Ba(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),e.resource.Genes.amount>=j},phagePurchasable(x){let j=Ba(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),e.prestige.Phage.count>=j}}}),n.forEach(function(x){pe(`popGenetrait${x}`,function(){return M(x)},{elm:`#geneticBreakdown .t-${x} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&pe(`popGenetrait${x}`,function(){return A(x)},{elm:`#geneticBreakdown .t-${x} .pbuy`,classes:"has-background-light has-text-dark"}),pe(`popGenetrait${x}`,function(){return e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?`
${sa("desc",x)}
${t(`trait_${x}_effect`)}
`:sa("desc",x)},{elm:`#geneticBreakdown .t-${x} .name`,classes:"has-background-light has-text-dark"})}),l.forEach(function(x){pe(`popRemoveBkdwn${x}`,function(){return m(x)},{elm:`#geneticBreakdown .remove${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{wide:!0,classes:"w30"})}),o.forEach(function(x){let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{elm:`#geneticBreakdown .trait${x}`,wide:!0,classes:"w30"})}),_.forEach(function(x){pe(`popAddBkdwn${x}`,function(){return w(x)},{elm:`#geneticBreakdown .add${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{wide:!0,classes:"w30"})}),du()}}function pu(r,a){let i=$(`
`),s=$(`${e.resource.Genes.name} (${e.race.minor[a]||0})`);if(i.append(s),e.prestige.Phage.count>0){let c=$(`${t("resource_Phage_name")} (${e.genes.minor[a]||0})`);i.append(c)}let n=e.race[a]>1?`(${e.race[a]}) `:"";i.append(`${n}${sa("name",a)}`),r.append(i)}function ko(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(le($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),au())}function Nn(){e.tech.b_stone&&e.tech.b_stone>=2&&(le($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),iu())}function _u(r,a){if(cu(a)){if(e.arpa[a]||(e.arpa[a]={complete:0,rank:0}),gt[a].rank&&e.arpa[a].rank>=gt[a].rank)return;let i=$(`
`);r.append(i);let s=typeof gt[a].title=="string"?gt[a].title:gt[a].title(),n=$(`
${s}{{ rank | level }}
`);i.append(n);let c=$('
{{ complete }}%
');n.append(c);let l=$('
');i.append(l),l.append($(``)),l.append($(``)),l.append($(``)),l.append($(``)),l.append($(``)),D({el:`#arpa${a}`,data:e.arpa[a],methods:{queue(d){if(e.tech.queue){let _=fe();for(let m=0;m<_;m++){let w=`arpa${d}`,M=0,A=gt[d].queue_complete?gt[d].queue_complete():Number.MAX_SAFE_INTEGER;for(var h=0;h0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===w)e.queue.queue[e.queue.queue.length-1].q++;else{let x=typeof gt[d].title=="string"?gt[d].title:gt[d].title();e.queue.queue.push({id:w,action:"arpa",type:d,label:x,cna:!1,time:0,q:1,qs:1,t_max:0})}na()}else break}}},build(d,h){Is(d,h,!0)},srDesc(){return ss(typeof gt[a].desc=="string"?gt[a].desc:gt[a].desc())},srLevel(){return ss(gt[a].effect())},arpaProjectSRCosts(d,h){let _=d==="100"?100-e.arpa[h].complete:d;var m=`Construct ${_}%. Costs:`,w=hs(gt[h].cost);return Object.keys(w).forEach(function(M){var A=+(w[M]()*(_/100)).toFixed(0);if(A>0){var x=M==="Money"?"$":e.resource[M].name+": ",j=e.resource[M].amount>=A?"":` ${t("insufficient")} ${e.resource[M].name}.`;m=m+` ${x} ${Ee(A,2)}.${j}`}}),m}},filters:{remain(d){return 100-d},level(d){return t("arpa_level",[d])}}}),pe(`popArpa${a}`,function(){return gt[a].desc},{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),pe(`popArpa${a}`,function(){return gt[a].effect()},{elm:`#arpa${a} .head .rank`,classes:"has-background-light has-text-dark"});let o=[1,10,25,100];for(let d=0;d=100&&(e.arpa[r].rank++,e.arpa[r].complete=0,e.tech[gt[r].grant]=e.arpa[r].rank,n=!0,r==="monument"&&(e.arpa.m_type=$o(),$(`#arpa${r} .head .desc`).html(gt[r].title()),Qr(!1,["arpamonument"])),r==="roid_eject"&&($(`#arpa${r} .head .desc`).html(gt[r].title()),Qr(!1,["arparoid_eject"])),r==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,Ie("popArpalaunch_facility"),[1,10,25,100].forEach(function(l){Ie(`popArpalaunch_facility${l}`)}),s||Zr(["arpalaunch_facility"]),xo(),Pt(),I(t("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),e.race.inflation&&(e.race.inflation+=10),ue()));if(i){let c=[1,10,25,100],l=$("#popper"),o=l.data("id");for(let d=0;d
"),n=hs(gt[a].cost);let c=ei(gt[a],i/100,!1,!0);return Object.keys(n).forEach(function(l){var o=+(n[l]()*(i/100)).toFixed(0);if(o>0){var d=l==="Money"?"$":e.resource[l].name+": ",h=e.resource[l].amount>=o?"has-text-dark":l===c.r?"has-text-danger":"has-text-alert";s.append($(`
${d}${Ee(o,2)}
`))}}),s}function Ln(){Object.keys(e.resource).forEach(function(r){D({el:`#market-${r}`},"update")}),D({el:"#galaxyTrade"},"update")}var Hn={spc_titan:{info:{name(){return W().titan},desc(){return t("space_titan_info_desc",[W().titan,F[e.race.species].home])},support:"electrolysis",zone:"outer",syndicate(){return!!(e.tech.titan&&e.tech.titan>=3&&e.tech.enceladus&&e.tech.enceladus>=2)},syndicate_cap(){return e.tech.triton?e.tech.outer>=4?2e3:1e3:600}},titan_mission:{id:"space-titan_mission",title(){return t("space_mission_title",[W().titan])},desc(){return t("space_mission_desc",[W().titan])},reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete(){return e.tech.titan>=1?0:1},cost:{Helium_3(r,a){return+Fe(25e4,!1,a).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[W().titan])},action(){return u($(this)[0])?(I(t("space_titan_mission_action",[W().titan,F[e.race.species].home]),"info",!1,["progress"]),!0):!1}},titan_spaceport:{id:"space-titan_spaceport",title:t("space_red_spaceport_title"),desc:`
${t("space_red_spaceport_desc")}
${t("requires_power")}
`,reqs:{titan:1},path:["truepath"],cost:{Money(r){return f("titan_spaceport",r,25e5,1.32)},Lumber(r){return f("titan_spaceport",r,75e4,1.32)},Cement(r){return f("titan_spaceport",r,35e4,1.32)},Mythril(r){return f("titan_spaceport",r,1e4,1.32)}},effect(){let r=e.resource.Water.display?`
${t("plus_max_resource",[Ee(H(250)),e.resource.Water.name])}
`:"",a=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().enceladus])}
`:"",i=e.tech.titan&&e.tech.titan>=5?`
${t("space_titan_spaceport_storage",[25])}
`:"";return`${a}${r}${i}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 2},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.titan_spaceport.count++,re($(this)[0]),!0):!1},post(){e.tech.titan===1&&(e.tech.titan=2,ue())}},electrolysis:{id:"space-electrolysis",title:t("space_electrolysis_title"),desc(){return`
${t("space_electrolysis_title")}
${t("space_electrolysis_req",[e.resource.Water.name])}
`},reqs:{titan:3},path:["truepath"],cost:{Money(r){return f("electrolysis",r,1e6,1.25)},Copper(r){return f("electrolysis",r,185e3,1.25)},Steel(r){return f("electrolysis",r,22e4,1.25)},Polymer(r){return f("electrolysis",r,38e4,1.25)}},effect(){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&k.ai_core2?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return _e(8)},action(){return u($(this)[0])?(e.space.electrolysis.count++,re($(this)[0]),!0):!1},post(){e.tech.titan===3&&(e.tech.titan=4,ue())}},hydrogen_plant:{id:"space-hydrogen_plant",title:t("space_hydrogen_plant_title"),desc(){return`
${t("space_hydrogen_plant_title")}
${t("space_hydrogen_plant_req")}
`},reqs:{titan_power:1},path:["truepath"],cost:{Money(r){return f("hydrogen_plant",r,15e5,1.28)},Iridium(r){return f("hydrogen_plant",r,292e3,1.28)},Stanene(r){return f("hydrogen_plant",r,599e3,1.28)},Cement(r){return f("hydrogen_plant",r,18e4,1.28)}},effect(){return`${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("space_hydrogen_plant_effect",[1,t("space_electrolysis_title")])}`},support(){return 2},powered(){return dt(-22)},action(){return u($(this)[0])?(e.space.hydrogen_plant.count++,e.space.electrolysis.on>e.space.hydrogen_plant.on&&e.space.hydrogen_plant.on++,!0):!1}},titan_quarters:{id:"space-titan_quarters",title:t("interstellar_habitat_title"),desc(){return`
${t("interstellar_habitat_title")}
${t("space_habitat_req",[W().titan,e.resource.Food.name,e.resource.Water.name])}
`},reqs:{titan:4},path:["truepath"],cost:{Money(r){return f("titan_quarters",r,12e5,1.28)},Furs(r){return f("titan_quarters",r,85e3,1.28)},Plywood(r){return f("titan_quarters",r,1e5,1.28)},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=N(1);return`
${t("space_used_support",[W().titan])}
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().titan]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
${t("spend",[$(this)[0].support_fuel()[0].a,e.resource[$(this)[0].support_fuel()[0].r].name])}
${t("spend",[$(this)[0].support_fuel()[1].a,e.resource[$(this)[0].support_fuel()[1].r].name])}
`},s_type:"titan",support(){return-1},support_fuel(){return[{r:"Water",a:12},{r:"Food",a:500}]},powered(){return 0},action(){if(u($(this)[0])){if(e.space.titan_quarters.count++,e.civic.titan_colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.titan_colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.titan_colonist.workers+=a}return!0}return!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},titan_mine:{id:"space-titan_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[W().titan])}
`},reqs:{titan:4},condition(){return!!(e.space.titan_quarters&&e.space.titan_quarters.count>0)},path:["truepath"],cost:{Money(r){return f("titan_mine",r,475e3,1.28)},Lumber(r){return f("titan_mine",r,568e3,1.28)},Wrought_Iron(r){return f("titan_mine",r,25e4,1.28)}},effect(){let r=T("titan_mine","adamantite"),a=T("titan_mine","aluminium"),i=+r.toFixed(3),s=+a.toFixed(3);return`
${t("space_used_support",[W().titan])}
${t("space_red_mine_effect",[i,e.resource.Adamantite.name])}
${t("space_red_mine_effect",[s,e.resource.Aluminium.name])}
`},s_type:"titan",support(){return-1},powered(){return 0},special(){return!0},action(){return u($(this)[0])?(e.space.titan_mine.count++,e.resource.Adamantite.display=!0,re($(this)[0]),!0):!1}},storehouse:{id:"space-storehouse",title:t("space_storehouse_title"),desc:t("space_storehouse_title"),reqs:{titan:5},path:["truepath"],cost:{Money(r){return f("storehouse",r,175e3,1.28)},Lumber(r){return f("storehouse",r,1e5,1.28)},Aluminium(r){return f("storehouse",r,12e4,1.28)},Cement(r){return f("storehouse",r,45e3,1.28)}},wide:!0,res(){return["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite"]},heavy(r){return!!["Copper","Iron","Steel","Titanium","Iridium","Neutronium","Adamantite"].includes(r)},val(r){switch(r){case"Lumber":return 3e3;case"Stone":return 3e3;case"Chrysotile":return 3e3;case"Furs":return 1700;case"Copper":return 1520;case"Iron":return 1400;case"Aluminium":return 1280;case"Cement":return 1120;case"Coal":return 480;case"Steel":return 240;case"Titanium":return 160;case"Alloy":return 180;case"Polymer":return 150;case"Iridium":return 175;case"Nano_Tube":return 120;case"Neutronium":return 64;case"Adamantite":return 72;default:return 0}},effect(){let r='
',a=Aa("storehouse",!1),i=Aa("storehouse",!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s),c=Ee(+(H($(this)[0].val(s))*(n?i:a)).toFixed(0),1);r=r+`${t("plus_max_resource",[c,e.resource[s].name])}`}return r=r+"
",r},action(){if(u($(this)[0])){e.space.storehouse.count++;let r=Aa("storehouse",!1),a=Aa("storehouse",!0);for(let i of $(this)[0].res())if(e.resource[i].display){let s=$(this)[0].heavy(i);e.resource[i].max+=H($(this)[0].val(i))*(s?a:r)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:t("city_bank"),desc(){return t("city_bank_desc",[W().titan])},reqs:{titan:6},path:["truepath"],cost:{Money(r){return f("titan_bank",r,25e5,1.32)},Titanium(r){return f("titan_bank",r,38e4,1.32)},Neutronium(r){return f("titan_bank",r,5e3,1.32)}},effect(){let r=Fr()*2;return r=H(r),r=(+r.toFixed(0)).toLocaleString(),t("plus_max_resource",[`$${r}`,t("resource_Money_name")])},action(){return u($(this)[0])?(e.resource.Money.max+=H(1800),e.space.titan_bank.count++,!0):!1}},g_factory:{id:"space-g_factory",title:t("interstellar_g_factory_title"),desc(){return`
${t("interstellar_g_factory_title")}
${t("space_support",[W().titan])}
`},reqs:{graphene:1},path:["truepath"],cost:{Money(r){return f("g_factory",r,95e4,1.28)},Copper(r){return f("g_factory",r,165e3,1.28)},Stone(r){return f("g_factory",r,22e4,1.28)},Adamantite(r){return f("g_factory",r,12500,1.28)}},effect(){let r=.05;return e.race.high_pop&&(r=+xe(r).toFixed(3)),`
${t("space_used_support",[W().titan])}
${t("space_red_mine_effect",[r,e.resource.Graphene.name])}
${t("interstellar_g_factory_effect")}
`},s_type:"titan",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(e.space.g_factory.count++,e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.space.g_factory.Oil++:e.space.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},sam:{id:"space-sam",title:t("space_sam_title"),desc(){return`
${t("space_sam_desc")}
${t("requires_power")}
`},reqs:{titan:7},path:["truepath"],cost:{Money(r){return f("sam",r,25e5,1.28)},Steel(r){return f("sam",r,45e4,1.28)},Elerium(r){return f("sam",r,120,1.28)},Brick(r){return f("sam",r,16e4,1.28)}},effect(){return`
${t("galaxy_defense_platform_effect",[25])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(e.space.sam.count++,re($(this)[0]),!0):!1},post(){D({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[W().titan,e.resource.Cipher.name])}
`},reqs:{titan:8},path:["truepath"],cost:{Money(r){return f("decoder",r,125e5,1.275)},Elerium(r){return f("decoder",r,750,1.275)},Orichalcum(r){return f("decoder",r,33e4,1.275)},Quantium(r){return f("decoder",r,18e4,1.275)}},effect(){let r=$(this)[0].support_fuel().a,a=2500;e.race.high_pop&&(a=xe(a)),k.ai_core2&&(a*=1.25);let i=`
${t("space_used_support",[W().titan])}
`;return i+=`
${t("space_red_exotic_lab_effect1",[a])}
`,i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`},s_type:"titan",support(){return-1},powered(){return 0},support_fuel(){return{r:"Cipher",a:.06}},action(){return u($(this)[0])?(e.space.decoder.count++,re($(this)[0]),!0):!1}},ai_core:{id:"space-ai_core",title:t("space_ai_core"),desc(r){return!e.space.hasOwnProperty("ai_core")||e.space.ai_core.count<100||r?`
${t("space_ai_core")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("ai_core")&&e.space.ai_core.count>=100?`
${t("requires_power")}
`:""):`
${t("space_ai_core")}
`},reqs:{titan:9},path:["truepath"],condition(){return!(e.space.ai_core.count>=100)},queue_size:10,queue_complete(){return 100-e.space.ai_core.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e5:0},Cement(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?18e4:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e4:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?250:0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?125e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?5e4:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?1e5:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?750:0}},effect(r){let a=`
${t("space_ai_core_effect")}
`,i=(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}else return Hn.spc_titan.ai_core2.effect();return a},action(){return u($(this)[0])&&e.space.ai_core.count<100?(e.space.ai_core.count++,e.space.ai_core.count>=100&&(e.tech.titan_ai_core=1,e.space.ai_core2={count:1,on:0},e.city.power>=Hn.spc_titan.ai_core2.powered()&&e.space.ai_core2.on++,Pt(),ue()),!0):!1}},ai_core2:{id:"space-ai_core2",title:t("space_ai_core"),desc(){return`
${t("space_ai_core")}
${t("space_electrolysis_req",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{titan_ai_core:1},path:["truepath"],condition(){return!!(e.space.hasOwnProperty("ai_core")&&e.space.ai_core.count>=100)},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},p_fuel(){return{r:"Water",a:1e3}},effect(){let r=25,a=`
${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
`;if(a+=`
${t("interstellar_citadel_effect",[r])}
${t("space_ai_core_effect2",[r])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(a+=`
${t("space_ai_core_effect3",[50])}
`),a+=`
${t("space_electrolysis_use",[$(this)[0].p_fuel().a,e.resource[$(this)[0].p_fuel().r].name,$(this)[0].powered()])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=3){let i=+Vn().toFixed(1);a+=`
${t("space_ai_core_effect4",[i])}
`}return a},action(){return!1},flair(){return e.space.hasOwnProperty("ai_core2")&&e.space.ai_core2.on>=1?t("space_ai_core_flair"):t("space_ai_core_flair2")}},ai_colonist:{id:"space-ai_colonist",title:t("space_ai_colonist_title"),desc(){return`
${t("space_ai_colonist_title")}
${t("requires_power")}
`},reqs:{titan_ai_core:3},path:["truepath"],cost:{Money(r){return f("ai_colonist",r,112e6,1.35)},Alloy(r){return f("ai_colonist",r,75e4,1.35)},Elerium(r){return f("ai_colonist",r,500,1.35)},Nano_Tube(r){return f("ai_colonist",r,525e3,1.35)},Quantium(r){return f("ai_colonist",r,15e4,1.35)},Cipher(r){return f("ai_colonist",r,1e4,1.35)}},effect(){return`
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[N(1),W().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.ai_colonist.count++,re($(this)[0]),!0):!1},flair:t("tech_combat_droids_flair")}},spc_enceladus:{info:{name(){return W().enceladus},desc(){return t("space_enceladus_info_desc",[W().enceladus,F[e.race.species].home])},support:"titan_spaceport",zone:"outer",syndicate(){return!!(e.tech.titan&&e.tech.titan>=3&&e.tech.enceladus&&e.tech.enceladus>=2)},syndicate_cap(){return e.tech.triton?e.tech.outer>=4?1500:1e3:600}},enceladus_mission:{id:"space-enceladus_mission",title(){return t("space_mission_title",[W().enceladus])},desc(){return t("space_mission_desc",[W().enceladus])},reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete(){return e.tech.enceladus>=1?0:1},cost:{Helium_3(r,a){return+Fe(25e4,!1,a).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[W().enceladus])},action(){return u($(this)[0])?(I(t("space_enceladus_mission_action",[W().enceladus]),"info",!1,["progress"]),e.resource.Water.display=!0,!0):!1}},water_freighter:{id:"space-water_freighter",title:t("space_water_freighter_title"),desc(){return`
${t("space_water_freighter_title")}
${t("space_support",[W().enceladus])}
`},reqs:{enceladus:2},path:["truepath"],cost:{Money(r){return f("water_freighter",r,45e4,1.25)},Iron(r){return f("water_freighter",r,362e3,1.25)},Nano_Tube(r){return f("water_freighter",r,125e3,1.25)},Sheet_Metal(r){return f("water_freighter",r,75e3,1.25)}},effect(r){let a=+Fe(5,!0,r).toFixed(2),i=+T("water_freighter").toFixed(2);return`
${t("space_used_support",[W().enceladus])}
${t("produce",[i,e.resource.Water.name])}
${t("space_belt_station_effect3",[a])}
`},s_type:"enceladus",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.water_freighter.count++,re($(this)[0]),!0):!1}},zero_g_lab:{id:"space-zero_g_lab",title:t("tech_zero_g_lab"),desc(){return`
${t("tech_zero_g_lab")}
${t("requires_power_support",[W().enceladus])}
`},reqs:{enceladus:3},path:["truepath"],cost:{Money(r){return f("zero_g_lab",r,5e6,1.25)},Alloy(r){return f("zero_g_lab",r,125e3,1.25)},Graphene(r){return f("zero_g_lab",r,225e3,1.25)},Stanene(r){return f("zero_g_lab",r,6e5,1.25)}},effect(){let r=yt("spc_enceladus"),a=Math.round(1e4*r),i=`
${t("space_used_support",[W().enceladus])}
${t("city_max_knowledge",[a])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[N(1)])}
`),e.resource.Cipher.display&&(i=i+`
${t("plus_max_resource",[1e4,e.resource.Cipher.name])}
`),i+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return _e(12)},action(){return u($(this)[0])?(e.space.zero_g_lab.count++,re($(this)[0]),!0):!1},post(){Lt()},postPower(r){bi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[W().enceladus])}
`},reqs:{enceladus:4},path:["truepath"],cost:{Money(r){return f("operating_base",r,75e5,1.3)},Furs(r){return f("operating_base",r,5e5,1.3)},Adamantite(r){return f("operating_base",r,375e3,1.3)},Stanene(r){return f("operating_base",r,75e4,1.3)},Mythril(r){return f("operating_base",r,225e3,1.3)},Horseshoe(){return e.race.hooved?4:0}},effect(){let r=`
${t("space_used_support",[W().enceladus])}
`;if(r+=`
${t("galaxy_defense_platform_effect",[50])}
`,r+=t("plus_max_resource",[N(4),t("civics_garrison_soldiers")]),e.race.orbit_decayed){let a=e.tech.medic*5;r+=`
${t("city_hospital_effect",[a])}
`}return r+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.operating_base.count++,re($(this)[0]),!0):!1},post(){D({el:"#spc_enceladussynd"},"update")}},munitions_depot:{id:"space-munitions_depot",title:t("tech_munitions_depot"),desc:t("tech_munitions_depot"),category:"storage",era:"solar",reqs:{enceladus:5},path:["truepath"],cost:{Money(r){return f("munitions_depot",r,5e6,1.22)},Iron(r){return f("munitions_depot",r,185e3,1.22)},Sheet_Metal(r){return f("munitions_depot",r,1e5,1.22)}},effect(){let r=25;return`
${t("plus_max_crates",[r])}
${t("plus_max_containers",[r])}
`},action(){return u($(this)[0])?(e.space.munitions_depot.count++,e.resource.Crates.max+=25,e.resource.Containers.max+=25,e.resource.Containers.display||Yr(),!0):!1}}},spc_triton:{info:{name(){return W().triton},desc(){return t("space_triton_info_desc",[W().triton,F[e.race.species].home])},zone:"outer",syndicate(){return!!(e.tech.triton&&e.tech.triton>=2)},syndicate_cap(){return e.tech.outer&&e.tech.outer>=4?5e3:3e3},extra(r){e.tech.triton&&e.tech.triton>=3&&($(`#${r}`).append(`
${t("space_ground_resist")}
`),D({el:`#${r}resist`,data:e.space.fob,methods:{threat(a,i){let s=e.civic.garrison.wounded-We();s<0&&(s=0);let n=+(a-mt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[W().triton])},desc(){return t("space_mission_desc",[W().triton])},reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete(){return e.tech.triton>=1?0:1},cost:{Helium_3(r,a){return+Fe(6e5,!1,a).toFixed(0)},Elerium(){return 2500}},effect(){return t("space_triton_mission_effect",[W().triton])},action(){return u($(this)[0])?(I(t("space_triton_mission_action",[W().triton]),"info",!1,["progress"]),e.space.syndicate.spc_triton=1250,e.space.syndicate.spc_titan+=250,e.space.syndicate.spc_enceladus+=250,!0):!1}},fob:{id:"space-fob",title:t("space_fob_title"),desc(){return`
${t("tech_fob")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{triton:2},path:["truepath"],queue_complete(){return 1-e.space.fob.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,25e7,1.1)},Copper(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,8e6,1.1)},Uranium(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,5e4,1.1)},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,25e5,1.1)},Graphene(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,3e6,1.1)},Sheet_Metal(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,75e5,1.1)},Quantium(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,5e5,1.1)},Horseshoe(r){return e.race.hooved&&(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)<1?10:0}},effect(r){let a=We(),i=We(!0),s=`
${t("galaxy_defense_platform_effect",[500])}
`;s+=t("plus_max_resource",[N(10),t("civics_garrison_soldiers")]),s+=`
${t("civics_garrison_soldiers")}: ${a} / ${i}
`,s+=`
${t("civics_garrison_wounded")}: ${e.civic.garrison?e.civic.garrison.wounded:0}
`,s+=`
${t("space_fob_landed",[e.space.fob?e.space.fob.troops:0])}
`;let n=+Fe(125,!0,r).toFixed(2);return s+`
${t("requires_power_combo_effect",[$(this)[0].powered(),n,e.resource.Helium_3.name])}
`},powered(){return _e(50)},action(){return e.space.fob.count<1&&u($(this)[0])?(e.space.fob.count++,re($(this)[0]),!0):!1},post(){e.tech.triton===2&&(e.tech.triton=3,ue(),Pt(),I(t("space_fob_msg"),"info",!1,["progress"]))}},lander:{id:"space-lander",title:t("space_lander_title"),desc(){return`
${t("space_lander_title")}
${t("requires_soldiers")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{triton:3},path:["truepath"],cost:{Money(r){return f("lander",r,24e5,1.15)},Aluminium(r){return f("lander",r,185e3,1.15)},Neutronium(r){return f("lander",r,1e4,1.15)},Nano_Tube(r){return f("lander",r,158e3,1.15)}},powered(){return 0},effect(r){let a=+Fe(50,!0,r).toFixed(2),i="";return e.space.crashed_ship&&e.space.crashed_ship.count===100&&(i=`
${t("space_lander_effect3",[T("lander"),e.resource.Cipher.name])}
`),`
${t("space_lander_effect",[W().triton])}
${i}
${t("space_lander_effect2",[N(3)])}
${t("space_red_space_barracks_effect2",[a])}
`},action(){return u($(this)[0])?(e.space.lander.count++,e.space.lander.on++,!0):!1}},crashed_ship:{id:"space-crashed_ship",title:t("space_crashed_ship_title"),desc(){return`
${t("space_crashed_ship_title")}
`},reqs:{triton:3},path:["truepath"],queue_complete(){return 0},cost:{},effect(){let r=e.space.crashed_ship?e.space.crashed_ship.count:0;return`
${t("space_crashed_ship_effect",[r])}
`},action(){return!1}}},spc_kuiper:{info:{name(){return t("space_kuiper_title")},desc(){return t("space_kuiper_desc")},zone:"outer",syndicate(){return!!e.tech.kuiper},syndicate_cap(){return 2500}},kuiper_mission:{id:"space-kuiper_mission",title(){return t("space_mission_title",[t("space_kuiper_title")])},desc(){return t("space_mission_desc",[t("space_kuiper_title")])},reqs:{outer:7},grant:["kuiper",1],path:["truepath"],queue_complete(){return e.tech.kuiper>=1?0:1},cost:{Helium_3(r,a){return+Fe(1e6,!1,a).toFixed(0)},Elerium(){return 1e3}},effect(){return t("space_kuiper_mission_effect")},action(){return u($(this)[0])?(e.space.orichalcum_mine={count:0,on:0},e.space.uranium_mine={count:0,on:0},e.space.neutronium_mine={count:0,on:0},e.space.syndicate.spc_kuiper=500,I(t("space_kuiper_mission_action"),"info",!1,["progress"]),!0):!1}},orichalcum_mine:{id:"space-orichalcum_mine",title(){return t("space_kuiper_mine",[e.resource.Orichalcum.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Orichalcum.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("orichalcum_mine",r,25e6,1.25)},Graphene(r){return f("orichalcum_mine",r,9e5,1.25)},Elerium(r){return f("orichalcum_mine",r,200,1.25)},Mythril(r){return f("orichalcum_mine",r,45e4,1.25)},Quantium(r){return f("orichalcum_mine",r,15e4,1.25)}},effect(r){let a=+T("orichalcum_mine").toFixed(3),i=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Orichalcum_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(10)},p_fuel(){return{r:"Oil",a:200}},action(){return u($(this)[0])?(e.space.orichalcum_mine.count++,e.resource.Orichalcum.display=!0,re($(this)[0]),!0):!1}},uranium_mine:{id:"space-uranium_mine",title(){return t("space_kuiper_mine",[e.resource.Uranium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Uranium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("uranium_mine",r,5e6,1.25)},Iridium(r){return f("uranium_mine",r,25e4,1.25)},Steel(r){return f("uranium_mine",r,62e4,1.25)}},effect(r){let a=+T("uranium_mine").toFixed(3),i=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Uranium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(5)},p_fuel(){return{r:"Oil",a:60}},action(){return u($(this)[0])?(e.space.uranium_mine.count++,re($(this)[0]),!0):!1}},neutronium_mine:{id:"space-neutronium_mine",title(){return t("space_kuiper_mine",[e.resource.Neutronium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Neutronium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("neutronium_mine",r,8e6,1.25)},Adamantite(r){return f("neutronium_mine",r,65e4,1.25)},Stanene(r){return f("neutronium_mine",r,125e4,1.25)}},effect(r){let a=+T("neutronium_mine").toFixed(3),i=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Neutronium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(8)},p_fuel(){return{r:"Oil",a:60}},action(){return u($(this)[0])?(e.space.neutronium_mine.count++,re($(this)[0]),!0):!1}},elerium_mine:{id:"space-elerium_mine",title(){return t("space_kuiper_mine",[e.resource.Elerium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Elerium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:2},path:["truepath"],cost:{Money(r){return f("elerium_mine",r,2e7,1.25)},Titanium(r){return f("elerium_mine",r,25e4,1.25)},Neutronium(r){return f("elerium_mine",r,12e4,1.25)},Orichalcum(r){return f("elerium_mine",r,175e3,1.25)}},effect(r){let a=+T("elerium_mine").toFixed(3),i=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Elerium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(12)},p_fuel(){return{r:"Oil",a:125}},action(){return u($(this)[0])?(e.space.elerium_mine.count++,re($(this)[0]),!0):!1}}},spc_eris:{info:{name(){return W().eris},desc(){return t("space_eris_info_desc",[W().eris])},support:"drone_control",zone:"outer",syndicate(){return!!e.tech.eris},syndicate_cap(){return 7500},extra(r){e.tech.eris&&e.tech.eris===1&&($(`#${r}`).append(`
${t("space_scanned")} {{ eris_scan }}%
`),D({el:`#${r}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[W().eris])},desc(){return t("space_mission_desc",[W().eris])},reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete(){return e.tech.eris>=1?0:1},cost:{Helium_3(r,a){return+Fe(125e4,!1,a).toFixed(0)},Elerium(){return 1250}},effect(){return t("space_eris_mission_effect",[W().eris])},action(){return u($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[W().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[W().titan])},desc(){return`
${t("space_drone_control",[W().titan])}
${t("requires_power_combo",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(r){return f("drone_control",r,75e6,1.3)},Neutronium(r){return f("drone_control",r,1e5,1.3)},Stanene(r){return f("drone_control",r,45e4,1.3)},Quantium(r){return f("drone_control",r,3e5,1.3)}},effect(){let r=$(this)[0].p_fuel().a;return`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),r,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return _e(25)},p_fuel(){return{r:"Uranium",a:5}},action(){return u($(this)[0])?(e.space.drone_control.count++,re($(this)[0]),!0):!1}},shock_trooper:{id:"space-shock_trooper",title:t("space_shock_trooper_title"),desc(){return`
${t("space_shock_trooper_title")}
${t("space_support",[W().eris])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(r){return f("shock_trooper",r,425e4,1.225)},Polymer(r){return f("shock_trooper",r,375e3,1.225)},Adamantite(r){return f("shock_trooper",r,5e5,1.225)},Graphene(r){return f("shock_trooper",r,22e4,1.225)},Elerium(r){return f("shock_trooper",r,350,1.225)}},effect(){let r=Math.round(mt(1,"army",0)*yt("spc_eris")),a=`
${t("space_used_support",[W().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(a=`
${t("space_lander_effect3",[T("shock_trooper"),e.resource.Cipher.name])}
`),a+`
${t("space_digsite_offense",[r])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.shock_trooper.count++,re($(this)[0]),!0):!1}},tank:{id:"space-tank",title:t("space_tank_title"),desc(){return`
${t("space_tank_title")}
${t("space_support",[W().eris])}
`},reqs:{eris:4},path:["truepath"],cost:{Money(r){return f("tank",r,1e8,1.25)},Alloy(r){return f("tank",r,125e4,1.25)},Orichalcum(r){return f("tank",r,6e5,1.25)},Mythril(r){return f("tank",r,5e5,1.25)},Uranium(r){return f("tank",r,25e3,1.25)}},effect(){let r=Math.round(100*yt("spc_eris")),a=`
${t("space_used_support",[W().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(a=`
${t("space_lander_effect3",[T("tank"),e.resource.Cipher.name])}
`),a+`
${t("space_digsite_offense",[r])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.tank.count++,re($(this)[0]),!0):!1}},digsite:{id:"space-digsite",title:t("space_digsite_title"),desc(){return`
${t("space_digsite_title")}
`},reqs:{eris:3},path:["truepath"],queue_complete(){return 0},cost:{},effect(){let r=e.space.digsite?e.space.digsite.count:0;return`
${t("space_crashed_ship_effect",[r])}
`},action(){return!1}}}},Ye={tau_star:{info:{name(){return t("tab_tauceti")},desc(){return t("tau_star",[t("tab_tauceti"),t("space_sun_info_name")])}},ringworld:{id:"tauceti-ringworld",title:t("tau_star_ringworld"),desc(r){return!e.tauceti.hasOwnProperty("ringworld")||e.tauceti.ringworld.count<1e3||r?`
${t("tau_star_ringworld")}
${t("requires_segments",[1e3])}
`:`
${t("tau_star_ringworld")}
`},reqs:{matrix:2},path:["truepath"],queue_size:50,queue_complete(){return 1e3-e.tauceti.ringworld.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?1e7:1e8:0},Neutronium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e4:1e5:0},Nano_Tube(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?7e4:35e4:0},Adamantite(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e5:1e6:0},Bolognium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?17600:88e3:0},Orichalcum(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?25e3:125e3:0},Unobtainium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?360:1800:0},Quantium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?Jr(e.race.lone_survivor?10100:101e3):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0);if(i<1e3){let s=1e3-i;a+=`
${t("tau_star_ringworld_effect")}
`,a+=`
${t("space_dwarf_collider_effect2",[s])}
`}else a+=`
${t("space_dwarf_reactor_effect1",[e.race.lone_survivor?100:1e4])}
`;return a},action(){return u($(this)[0])&&e.tauceti.ringworld.count<1e3?(e.tauceti.ringworld.count++,e.tauceti.ringworld.count>=1e3&&(e.race.lone_survivor?e.tech.eden=1:(e.tech.matrix=3,e.tauceti.matrix={count:1,on:0}),Ar(),Ie()),!0):!1}},matrix:{id:"tauceti-matrix",title:t("tau_star_matrix"),desc(){return`
${t("tau_star_matrix")}
${t("requires_power")}
`},reqs:{matrix:3},condition(){return e.tauceti.ringworld.count>=1e3},queue_complete(){return 0},cost:{},powered(){return 1e4},postPower(r){r?setTimeout(function(){e.tech.matrix=k.matrix?4:3,Ar()},250):(e.tech.matrix=3,Ar())},effect(){let r=qo(),a=$(this)[0].powered(),i=a>0?`
${t("minus_power",[a])}
`:"";return`
${t("tau_star_matrix_effect")}
${r}${i}`},action(){return!1}},blue_pill:{id:"tauceti-blue_pill",title:t("tau_star_blue_pill"),desc:t("tau_star_blue_pill"),wiki:!1,reqs:{matrix:4},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=qo();return`
${t("tau_star_blue_pill_effect")}
${r}`},action(){if(u($(this)[0])){let l=function(){a.fillStyle="#0001",a.fillRect(0,0,i,s),a.fillStyle="#0f0",a.font="15pt monospace",c.forEach((o,d)=>{let h=String.fromCharCode(Math.rand(65382,65438)),_=d*20;a.fillText(h,_,o),o>100+Math.random()*1e4?c[d]=0:c[d]=o+20})};$("body").append('');let r=document.getElementById("matrix"),a=r.getContext("2d"),i=r.width=document.body.offsetWidth,s=r.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);return setInterval(l,50),setTimeout(function(){no()},5e3),!0}return!1}},goe_facility:{id:"tauceti-goe_facility",title:t("tau_star_goe_facility"),desc(){return`
${t("tau_star_goe_facility")}
`},reqs:{eden:2},condition(){return e.tauceti.ringworld.count>=1e3},queue_complete(){return 0},cost:{Money(r){return 1e6},Copper(r){return 1e7},Graphene(r){return 5e6},Stanene(r){return 8e6},Elerium(r){return 1e4}},effect(){let r=fu();return`
${t("tau_star_goe_facility_effect")}
${r}`},action(){if(u($(this)[0])){let r=jr(Ye.tau_star.goe_facility);return Object.keys(r).forEach(function(a){e.resource[a].amount+=r[a]()}),oo(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[F[e.race.species].home])},desc(){return t("tau_home",[F[e.race.species].home])},support:"orbital_station",extra(r){e.tech.tau_home&&e.tech.tau_home>=2&&!yr()&&($(`#${r}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),D({el:`#${r}Mats`,data:e.resource.Materials,methods:{tauShow(){return!yr()}},filters:{round(a){return+a.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[F[e.race.species].home])},desc(){return t("tau_new_mission_title",[F[e.race.species].home])},reqs:{tauceti:2},grant:["tau_home",1],path:["truepath"],queue_complete(){return e.tech.tau_home>=1?0:1},cost:{Money(){return 1e9}},effect(){return t("tau_new_mission_effect",[F[e.race.species].home])},action(){return u($(this)[0])?(e.tauceti.colony={count:0,on:0},e.tauceti.mining_pit={count:0,on:0},I(t("tau_home_mission_result",[F[e.race.species].home]),"info",!1,["progress"]),!0):!1}},dismantle:{id:"tauceti-dismantle",title(){return t("tau_home_dismantle")},desc(){return t("tau_home_dismantle")},reqs:{tau_home:1},grant:["tau_home",2],path:["truepath"],queue_complete(){return e.tech.tau_home>=2?0:1},cost:{Money(){return 1e8}},effect(){let r="Explorer";if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let a=e.space.shipyard.ships.findIndex(i=>i.location==="tauceti"&&i.class==="explorer");a!==-1&&(r=e.space.shipyard.ships[a].name)}return t("tau_home_dismantle_effect",[r])},action(){let r=-1;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")&&(r=e.space.shipyard.ships.findIndex(a=>a.location==="tauceti"&&a.class==="explorer")),r>=0&&u($(this)[0])){if(e.space.shipyard.ships.splice(r,1),e.tauceti.orbital_station.count++,e.tauceti.colony.count++,e.tauceti.mining_pit.count++,e.civic.pit_miner.display=!0,e.resource.Materials.display=!0,e.city.powered&&e.city.power>=Ye.tau_home.orbital_station.powered()){e.tauceti.orbital_station.on++,e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let a=N(4);e.civic.pit_miner.max+=a;let i=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=i,e.civic.pit_miner.workers+=i}return e.settings.tabLoad&&yi(),!0}return!1}},orbital_station:{id:"tauceti-orbital_station",title:t("tau_home_orbital_station"),desc:`
${t("tau_home_orbital_station")}
${t("requires_power")}
`,reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("orbital_station",r,8e7,1.3,"tauceti")},Materials(r){return yr()?0:f("orbital_station",r,5e5,1.3,"tauceti")},Helium_3(r){return yr()?f("orbital_station",r,ze(25e4),1.3,"tauceti"):0},Copper(r){return yr()?f("orbital_station",r,125e4,1.3,"tauceti"):0},Adamantite(r){return yr()?f("orbital_station",r,9e5,1.3,"tauceti"):0}},effect(){let r=H(15e3),a=+ze($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[F[e.race.species].home]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Helium_3.name])}
`,i=i+`
${t("spend_power",[a,e.resource[$(this)[0].support_fuel().r].name,$(this)[0].powered()])}
`,i},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?5:25:400}},support(){return 3},powered(){return _e(e.tech.isolation?e.race.lone_survivor?4:6:30)},refresh:!0,action(){return u($(this)[0])?(e.tauceti.orbital_station.count++,re($(this)[0]),!0):!1}},colony:{id:"tauceti-colony",title:t("tau_home_colony"),desc(){return`
${t("tau_home_colony_desc",[F[e.race.species].home])}
${t("requires_power_support_combo",[F[e.race.species].home,e.resource.Food.name])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("colony",r,1575e4,1.225,"tauceti")},Materials(r){return yr()?0:f("colony",r,65e4,1.225,"tauceti")},Furs(r){return yr()?f("colony",r,72e4,1.225,"tauceti"):0},Graphene(r){return yr()?f("colony",r,485e3,1.225,"tauceti"):0},Brick(r){return yr()?f("colony",r,Jr(88e4),1.225,"tauceti"):0}},effect(){let r=$(this)[0].citizens(),a=e.tech.isolation?900:250,i=+$(this)[0].support_fuel().a.toFixed(1),s=`
${t("tau_new_support",[$(this)[0].support(),F[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[r])}
`),e.tech.isolation){let n=Fr()*25;n=H(n),n=(+n.toFixed(0)).toLocaleString(),s=s+`
${t("plus_max_resource",[`$${n}`,t("resource_Money_name")])}
`}if(s=s+`
${t("tau_home_colony_effect",[50,F[e.race.species].home])}
`,e.tech.isolation){let n=ge("gaslighter",0),c=(n?n+e.tech.broadcast:e.tech.broadcast)*2;s=s+`
${t("space_red_vr_center_effect1",[c])}
`}return s=s+`
${t("plus_max_resource",[a,t("resource_Crates_name")])}
${t("plus_max_resource",[a,t("resource_Containers_name")])}
`,e.race.lone_survivor?s=s+`
${t("gain",[-i,e.resource[$(this)[0].support_fuel().r].name])}
`:s=s+`
${t("spend",[i,e.resource[$(this)[0].support_fuel().r].name])}
`,s},s_type:"tau_home",support(){return-2},support_fuel(){return{r:"Food",a:e.tech.isolation?e.race.lone_survivor?-2:75:1e3}},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.colony.count++,re($(this)[0]),e.resource.Containers.display||Yr(),!0):!1},citizens(){let r=e.tech.isolation?8:5;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),e.race.lone_survivor?0:r}},tau_housing:{id:"tauceti-tau_housing",title(){return St("small")},desc(){return $(this)[0].citizens()===1?t("city_basic_housing_desc"):t("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1,isolation:1},condition(){return!e.race.lone_survivor},cost:{Money(r){return f("tau_housing",r,15e4,1.15,"tauceti")},Lumber(r){return e.race.kindling_kindred||e.race.smoldering?0:f("tau_housing",r,125e3,1.25,"tauceti")},Stone(r){return e.race.kindling_kindred?f("tau_housing",r,125e3,1.25,"tauceti"):0},Chrysotile(r){return e.race.smoldering?f("tau_housing",r,5e4,1.25,"tauceti"):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[r,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[r,t("citizen")])},action(){return u($(this)[0])?(e.tauceti.tau_housing.count++,!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},captive_housing:hr("captive_housing","tauceti"),pylon:{id:"tauceti-pylon",title:t("tau_home_pylon"),desc:t("tau_home_pylon"),reqs:{magic:2},condition(){return!!(e.tech.isolation&&e.tauceti.hasOwnProperty("pylon"))},cost:{Money(r){return f("pylon",r,50,1.48,"tauceti")},Stone(r){return f("pylon",r,100,1.42,"tauceti")},Crystal(r){return f("pylon",r,8,1.42,"tauceti")-3}},effect(){let r=H(2),a=+(.0125*ft("magic")).toFixed(3);return`
${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.tauceti.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},cloning_facility:{id:"tauceti-cloning_facility",title:t("tau_home_cloning"),desc(){return t("tau_home_cloning_desc",[F[e.race.species].name])},category:"military",reqs:{cloning:1},path:["truepath"],queue_complete(){return e.resource[e.race.species].max-e.resource[e.race.species].amount},cost:{Money(r){return e.resource[e.race.species].amount?f("citizen",r,Math.round((e.race.high_pop?1e5:125e3)/N(1)),e.race.high_pop?1.01:1.02,"tauceti",e.race.high_pop?1.003:1.005):0},Copper(r){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?f("citizen",r,Math.round(50/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Aluminium(r){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?f("citizen",r,Math.round(50/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Nanite(r){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?f("citizen",r,Math.round(500/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0}},effect(){let r="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(r=`
${t("city_assembly_effect_warn")}
`),`
${t("tau_home_cloning_effect",[F[e.race.species].name])}
${r}`},action(){return e.resource[e.race.species].max>e.resource[e.race.species].amount&&u($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}},horseshoe:hr("horseshoe","tauceti"),bonfire:hr("bonfire","tauceti"),firework:hr("firework","tauceti"),assembly:hr("assembly","tauceti"),nanite_factory:hr("nanite_factory","tauceti"),tau_farm:{id:"tauceti-tau_farm",title:t("tau_home_tau_farm"),desc(){return`
${t("tau_home_tau_farm")}
${t("requires_power")}
`},reqs:{tau_home:7},path:["truepath"],cost:{Money(r){return f("tau_farm",r,135e6,1.25,"tauceti")},Stone(r){return f("tau_farm",r,921e4,1.25,"tauceti")},Steel(r){return f("tau_farm",r,6295e3,1.25,"tauceti")},Water(r){return f("tau_farm",r,1e4,1.25,"tauceti")}},effect(){let r=`
${t("space_red_spaceport_effect1",[t("tau_planet",[F[e.race.species].home]),$(this)[0].support()])}
`;if(r=r+`
${t("produce",[+T("tau_farm","food").toFixed(2),e.resource.Food.name])}
`,!e.race.kindling_kindred&&!e.race.smoldering&&(r=r+`
${t("produce",[+T("tau_farm","lumber").toFixed(2),e.resource.Lumber.name])}
`),e.tech.isolation){let a=+T("tau_farm","water").toFixed(2);if(r=r+`
${t("produce",[a,e.resource.Water.name])}
`,e.race.artifical){let i=H(350);r=r+`
${t("city_transmitter_effect",[i])}
`}}return r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},support(){return 1},powered(){return _e(e.tech.isolation?1:4)},action(){return u($(this)[0])?(e.tauceti.tau_farm.count++,re($(this)[0]),!0):!1}},mining_pit:{id:"tauceti-mining_pit",title:t("tau_home_mining_pit"),desc(){return`
${t("tau_home_mining_pit")}
${t("space_support",[F[e.race.species].home])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("mining_pit",r,425e4,1.225,"tauceti")},Materials(r){return yr()?0:f("mining_pit",r,35e4,1.225,"tauceti")},Lumber(r){return yr()?f("mining_pit",r,235e4,1.225,"tauceti"):0},Iron(r){return yr()?f("mining_pit",r,835e3,1.225,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),F[e.race.species].home])}
`;if(r=r+`
${t("plus_max_resource",[N(e.tech.isolation?6:8),t("job_pit_miner")])}
`,!yr())r=r+`
${t("plus_max_resource",[1e6,t("resource_Materials_name")])}
`,r=r+`
${t("tau_home_mining_pit_effect",[e.resource.Materials.name])}
`;else if(e.tech.isolation){if(e.race.lone_survivor){let a=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Iron.name,e.resource.Aluminium.name,e.resource.Coal.name];e.race.smoldering?(a.push(e.resource.Chrysotile.name),r=r+`
${t("tau_home_mining_pit_effect2cs",a)}
`):r=r+`
${t("tau_home_mining_pit_effect2c",a)}
`}else{let a=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Coal.name];e.race.smoldering?(a.push(e.resource.Chrysotile.name),r=r+`
${t("tau_home_mining_pit_effect2bs",a)}
`):r=r+`
${t("tau_home_mining_pit_effect2b",a)}
`}r=r+`
${t("tau_gas_womling_station_effect",[8,e.resource.Cement.name])}
`}else r=r+`
${t("tau_home_mining_pit_effect2",[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name])}
`;return r},s_type:"tau_home",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.mining_pit.count++,re($(this)[0]),!0):!1}},excavate:{id:"tauceti-excavate",title:t("tau_home_excavate"),desc(){return`
${t("tau_home_excavate")}
`},reqs:{tau_home:2},grant:["tau_home",3],path:["truepath"],cost:{Money(r){return 165e7},Materials(r){return 75e4}},effect(){return t("tau_home_excavate_effect")},action(){return u($(this)[0])?(I(t("tau_home_excavate_msg"),"info",!1,["progress"]),!0):!1}},alien_outpost:{id:"tauceti-alien_outpost",title:t("tech_alien_outpost"),desc(){return`
${t("tech_alien_outpost")}
${t("requires_power")}
`},reqs:{tau_home:4},path:["truepath"],cost:{},queue_complete(){return 0},effect(){let r=`
${t("plus_max_resource",["20%",t("resource_Knowledge_name")])}
`;return e.tech.isolation&&(r=r+`
${t("plus_max_resource",[(e.race.lone_survivor?35e5:65e5).toLocaleString(),t("resource_Knowledge_name")])}
`,r=r+`
${t("plus_max_resource",[2e5.toLocaleString(),e.resource.Cipher.name])}
`,r=r+`
${t("space_lander_effect3",[T("alien_outpost"),e.resource.Cipher.name])}
`),e.tech.outpost_boost&&(r=r+`
${t("tech_alien_outpost_effect2")}
`),e.race.lone_survivor&&(r=r+`
${t("city_wardenclyffe_effect1",[N(1),e.civic.professor.name])}
`),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.tech.isolation?e.race.lone_survivor?8:25:100)},special(){return!!e.tech.replicator},action(){return!1}},jump_gate:{id:"tauceti-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.tauceti.hasOwnProperty("jump_gate")||e.tauceti.jump_gate.count<100||r?`
${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`
${t("tau_jump_gate")}
`},reqs:{tauceti:3},condition(){return e.tech.isolation?0:1},path:["truepath"],queue_size:10,queue_complete(){return 100-e.tauceti.jump_gate.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?1e6:0},Materials(r){return(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?12500:0}},effect(r){let a=(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0);if(a<100){let i=100-a;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.tauceti.jump_gate.count<100?(e.tauceti.jump_gate.count++,!0):!1}},fusion_generator:{id:"tauceti-fusion_generator",title:t("tech_fusion_generator"),desc(){return`
${t("tech_fusion_generator")}
${t("requires_res",[e.resource.Helium_3.name])}
`},reqs:{tau_home:6},path:["truepath"],cost:{Money(r){return f("fusion_generator",r,188e6,1.25,"tauceti")},Iridium(r){return f("fusion_generator",r,555e4,1.25,"tauceti")},Stanene(r){return f("fusion_generator",r,7003500,1.25,"tauceti")},Sheet_Metal(r){return f("fusion_generator",r,Jr(95e3),1.25,"tauceti")}},effect(){let r=+ze($(this)[0].p_fuel().a).toFixed(1),a=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;return e.race.lone_survivor?a=a+`
${t("gain",[-r,e.resource[$(this)[0].p_fuel().r].name])}
`:a=a+`
${t("spend",[r,e.resource[$(this)[0].p_fuel().r].name])}
`,a},p_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?-15:75:500}},powered(){return dt(-32)},action(){return u($(this)[0])?(e.tauceti.fusion_generator.count++,e.tauceti.fusion_generator.on++,!0):!1}},repository:{id:"tauceti-repository",title:t("tech_repository"),desc:t("tech_repository"),reqs:{tau_home:5},path:["truepath"],cost:{Money(r){return f("repository",r,1028e4,1.28,"tauceti")},Iron(r){return f("repository",r,18e5,1.28,"tauceti")},Cement(r){return f("repository",r,15e5,1.28,"tauceti")},Neutronium(r){return f("repository",r,215e3,1.28,"tauceti")}},wide:!0,res(){let r=["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Crystal","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite","Unobtainium"];return e.tech.isolation&&(r.push("Oil"),r.push("Helium_3"),r.push("Uranium"),r.push("Water")),r},val(r){switch(r){case"Lumber":return 3e4;case"Stone":return 3e4;case"Chrysotile":return 3e4;case"Crystal":return 10;case"Furs":return 17e3;case"Copper":return 15200;case"Iron":return 14e3;case"Aluminium":return 12800;case"Cement":return 11200;case"Coal":return 4800;case"Steel":return 2400;case"Titanium":return 1600;case"Alloy":return 1800;case"Polymer":return 1500;case"Iridium":return 1750;case"Nano_Tube":return 1200;case"Neutronium":return 640;case"Adamantite":return 720;case"Unobtainium":return 1e3;case"Oil":return 680;case"Helium_3":return 575;case"Uranium":return 125;case"Water":return 15;case"Elerium":return 3;default:return 0}},effect(){let r='
',a=Aa("repository"),i=250;for(let s of $(this)[0].res())if(e.resource[s].display){let n=Ee(+(H($(this)[0].val(s))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return e.tech.isolation&&(r=r+`${t("plus_max_resource",[i,t("resource_Crates_name")])}${t("plus_max_resource",[i,t("resource_Containers_name")])}`),r=r+"
",r},action(){if(u($(this)[0])){e.tauceti.repository.count++;let r=250;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Aa("repository");for(let i of $(this)[0].res())e.resource[i].display&&(e.resource[i].max+=H($(this)[0].val(i))*a);return!0}return!1}},tau_factory:{id:"tauceti-tau_factory",title:t("tau_home_tau_factory"),desc(){return`
${t("tau_home_tau_factory")}
${t("requires_power_support",[F[e.race.species].home])}
`},reqs:{tau_home:8},path:["truepath"],cost:{Money(r){return f("tau_factory",r,269e6,1.25,"tauceti")},Titanium(r){return f("tau_factory",r,3e6,1.25,"tauceti")},Elerium(r){return f("tau_factory",r,850,1.25,"tauceti")},Bolognium(r){return f("tau_factory",r,25e4,1.25,"tauceti")},Quantium(r){return f("tau_factory",r,Jr(425e3),1.25,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),F[e.race.species].home])}
`;return r=r+`
${t("tau_home_tau_factory_effect",[e.tech.isolation?5:3])}
`,e.tech.isolation&&(e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[N(2)])}
`),r=r+`
${t("space_red_fabrication_effect1",[N(5)])}
`),r=r+`
${t("city_crafted_mats",[e.tech.isolation?275:90])}
`,r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},special:!0,s_type:"tau_home",support(){return-1},powered(){return _e(e.tech.isolation?2:5)},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,re($(this)[0]),!0):!1}},infectious_disease_lab:{id:"tauceti-infectious_disease_lab",title(){return e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},desc(){return`
${$(this)[0].title()}
${t("requires_power_support",[F[e.race.species].home])}
`},reqs:{disease:1},path:["truepath"],cost:{Money(r){return f("infectious_disease_lab",r,1e9,1.25,"tauceti")},Alloy(r){return f("infectious_disease_lab",r,325e5,1.25,"tauceti")},Polymer(r){return f("infectious_disease_lab",r,5e7,1.25,"tauceti")},Bolognium(r){return f("infectious_disease_lab",r,25e5,1.25,"tauceti")},Unobtainium(r){return f("infectious_disease_lab",r,64e3,1.25,"tauceti")}},effect(){let r=39616;if(e.tech.supercollider&&e.tech.isolation){let i=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/i+1}let a=`
${t("tau_new_support",[$(this)[0].support(),F[e.race.species].home])}
`;if(a=a+`
${t("city_max_knowledge",[Math.round(r).toLocaleString()])}
`,e.tech.isolation){let i=H(375);a=a+`
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
`,a=a+`
${t("city_wardenclyffe_effect1",[N(2),e.civic.professor.name])}
`,a=a+`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,a=a+`
${t("space_zero_g_lab_effect",[N(1)])}
`,a=a+`
${t("city_library_effect",[75])}
`}return e.tech.alien_crafting&&(a=a+`
${t("tau_gas_womling_station_effect",[65,e.resource.Quantium.name])}
`),e.tech.focus_cure&&(a=a+`
${t("tau_home_disease_lab_cure",[+e.tauceti.infectious_disease_lab.cure.toFixed(1)])}
`,e.race.hasOwnProperty("vax")&&(a=a+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`)),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},s_type:"tau_home",support(){return-1},powered(){return _e(e.tech.isolation?e.race.lone_survivor?2:8:35)},action(){return u($(this)[0])?(e.tauceti.infectious_disease_lab.count++,re($(this)[0]),!0):!1},post(){e.tech.disease===1&&(e.tech.disease=2,I(t("tau_plague4",[t("tab_tauceti")]),"info",!1,["progress"]),ue()),Lt()},postPower(r){bi("Quantium")}},tauceti_casino:{id:"tauceti-tauceti_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money(r){return f("tauceti_casino",r,145e4,1.35,"tauceti")},Furs(r){return f("tauceti_casino",r,95e3,1.35,"tauceti")},Cement(r){return f("tauceti_casino",r,12e4,1.35,"tauceti")},Plywood(r){return f("tauceti_casino",r,Jr(55e3),1.35,"tauceti")}},effect(){let r=$(this)[0].citizens(),a=e.race.lone_survivor?"":`
${t("plus_max_resource",[r,t("citizen")])}
`;return a=a+ms(),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return _e(e.race.lone_survivor?1:2)},action(){return u($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),e.race.lone_survivor?0:r},flair:t("city_casino_flair")},tau_cultural_center:{id:"tauceti-tau_cultural_center",title:t("tech_cultural_center"),desc(){return`
${t("tech_cultural_center")}
${t("space_electrolysis_req",[e.resource[$(this)[0].p_fuel().r].name])}
`},category:"commercial",reqs:{tau_culture:1},path:["truepath"],cost:{Money(r){return f("tau_cultural_center",r,9145e4,1.35,"tauceti")},Copper(r){return f("tau_cultural_center",r,585e4,1.35,"tauceti")},Coal(r){return f("tau_cultural_center",r,465e3,1.35,"tauceti")},Polymer(r){return f("tau_cultural_center",r,3792e3,1.35,"tauceti")}},effect(){let r=8,a=1;e.civic.govern.type==="corpocracy"?a=2:e.civic.govern.type==="socialist"&&(a=.8);let i=20*a,s=5*a,n=15*a,c=`
${t("tau_home_cultureal_effect1",[$(this)[0].p_fuel().a,e.resource[$(this)[0].p_fuel().r].name,$(this)[0].title])}
`;return c+=`
${t("city_tourist_center_effect3",[i])}
`,c+=`
${t("city_tourist_center_effect4",[s])}
`,c+=`
${t("tau_home_cultureal_effect2",[r,t("tau_red_womlings")])}
`,e.tech.tau_culture>=2&&(c+=`
${t("tau_home_cultureal_effect3",[n,t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])}
`),c+=`
${t("minus_power",[$(this)[0].powered()])}
`,c},powered(){return _e(1)},p_fuel(){return{r:"Food",a:e.race.lone_survivor?25:500}},action(){return u($(this)[0])?(e.tauceti.tau_cultural_center.count++,e.tauceti.tau_cultural_center.on++,!0):!1}}},tau_red:{info:{name(){return t("tau_planet",[W().red])},desc(){return t("tau_red",[W().red])},support:"orbital_platform",extra(r){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${r}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),D({el:`#${r}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[W().red])},desc(){return t("tau_new_mission_title",[W().red])},reqs:{tauceti:2},grant:["tau_red",1],path:["truepath"],queue_complete(){return e.tech.tau_red>=1?0:1},cost:{Money(){return 1e9}},effect(){return t("tau_new_mission_effect",[W().red])},action(){return u($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[W().red]),"info",!1,["progress"]),!0):!1}},orbital_platform:{id:"tauceti-orbital_platform",title:t("tau_red_orbital_platform"),desc:`
${t("tau_red_orbital_platform")}
${t("requires_power")}
`,reqs:{tau_red:1,tauceti:4},path:["truepath"],cost:{Money(r){return f("orbital_platform",r,5e7,1.3,"tauceti")},Oil(r){return yr()?f("orbital_platform",r,ze(mu(275e3)),1.3,"tauceti"):0},Aluminium(r){return f("orbital_platform",r,178e4,1.3,"tauceti")},Bolognium(r){return f("orbital_platform",r,45e4,1.3,"tauceti")}},effect(){let r=H(17500),a=+ze($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[W().red]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Oil.name])}
`,i=i+`
${t("spend_power",[a,e.resource[$(this)[0].support_fuel().r].name,$(this)[0].powered()])}
`,i},support_fuel(){return{r:e.race.lone_survivor?"Helium_3":"Oil",a:e.tech.isolation?e.race.lone_survivor?8:32:125}},support(){let r=e.tech.womling_logistics?2.5:2;return e.race.lone_survivor&&(r*=2),r},powered(){return _e(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return yr()&&u($(this)[0])?(e.tauceti.orbital_platform.count++,re($(this)[0]),e.tech.tau_red===1&&(e.tech.tau_red=2,I(t("tau_red_orbital_platform_msg",[t("tau_planet",[W().red]),t("tau_planet",[F[e.race.species].home])]),"info",!1,["progress"])),!0):!1}},contact:{id:"tauceti-contact",title(){return t("tau_red_contact")},desc(){return t("tau_red_contact")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Money(){return 6e8},Food(){return e.race.lone_survivor&&e.race.artifical?62e3:25e5}},effect(){return t("tau_red_contact_effect")},action(){return u($(this)[0])?(e.race.womling_friend=1,Dn(),!0):!1}},introduce:{id:"tauceti-introduce",title(){return t("tau_red_introduce")},desc(){return t("tau_red_introduce")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Knowledge(){return 7e6}},effect(){return t("tau_red_introduce_effect")},action(){return u($(this)[0])?(e.race.womling_god=1,Dn(),!0):!1}},subjugate:{id:"tauceti-subjugate",title(){return t("tau_red_subjugate")},desc(){return t("tau_red_subjugate")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Money(){return 285e7}},effect(){return t("tau_red_subjugate_effect")},action(){return u($(this)[0])?(e.race.womling_lord=1,Dn(),!0):!1}},jeff:{id:"tauceti-jeff",title(){return t("tau_red_jeff")},desc(){return t("tau_red_jeff")},reqs:{tau_red:5},path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{},effect(){let r=e.tauceti.overseer?e.tauceti.overseer.injured:0;e.tauceti.overseer&&e.tauceti.overseer.pop${t("tau_red_jeff_effect1",[e.tauceti.overseer?e.tauceti.overseer.pop:0])}
`;return a=a+`
${t("tau_red_jeff_effect2",[e.tauceti.overseer?e.tauceti.overseer.working:0])}
`,a=a+`
${t("tau_red_jeff_effect3",[r])}
`,a=a+`
${t("tau_red_jeff_effect4",[e.tauceti.overseer?e.tauceti.overseer.loyal:0])}
`,a=a+`
${t("tau_red_jeff_effect5",[e.tauceti.overseer?e.tauceti.overseer.morale:0])}
`,e.tech.hasOwnProperty("womling_tech")&&(a=a+`
${t("tau_red_jeff_effect6",[e.tech.womling_tech])}
`),a=a+`
${t("job_farmer")}: ${e.tauceti.womling_farm?e.tauceti.womling_farm.farmers:0}
`,a=a+`
${t("job_miner")}: ${e.tauceti.womling_mine?e.tauceti.womling_mine.miners:0}
`,e.tauceti.womling_lab&&(a=a+`
${t("job_scientist")}: ${e.tauceti.womling_lab?e.tauceti.womling_lab.scientist:0}
`),a},action(){return!1}},overseer:{id:"tauceti-overseer",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[W().red])}
`},name(){return e.race.womling_lord?t("tau_red_overseer"):e.race.womling_god?t("tau_red_womgod"):t("tau_red_womally")},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("overseer",r,6e6,1.28,"tauceti")},Cement(r){return f("overseer",r,245e4,1.28,"tauceti")},Alloy(r){return e.race.womling_friend?f("overseer",r,185e4,1.28,"tauceti"):0},Neutronium(r){return e.race.womling_lord?f("overseer",r,165e3,1.28,"tauceti"):0},Titanium(r){return e.race.womling_god?f("overseer",r,225e4,1.28,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return r=r+`
${t("tau_red_overseer_effect",[$(this)[0].val()])}
`,r},val(){let r=0;return e.race.womling_lord?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_god?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?6:5:e.race.womling_friend&&(r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?10:8),e.race.lone_survivor&&(r*=2),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.overseer.count++,re($(this)[0]),!0):!1}},womling_village:{id:"tauceti-womling_village",title:t("tau_red_womling_village"),desc(){return`
${t("tau_red_womling_village")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_village",r,1e7,1.28,"tauceti")},Stone(r){return f("womling_village",r,225e4,1.28,"tauceti")},Plywood(r){return f("womling_village",r,Jr(125e4),1.28,"tauceti")},Wrought_Iron(r){return f("womling_village",r,Jr(4e5),1.28,"tauceti")}},effect(){let r=e.tech.womling_pop&&e.tech.womling_pop>=2?6:5,a=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return a=a+`
${t("tau_red_womling_village_effect",[r])}
`,e.tech.tau_junksale&&(a=a+`
${t("tau_red_womling_village_effect2",[40,t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`)])}
`),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_village.count++,re($(this)[0]),!0):!1}},womling_farm:{id:"tauceti-womling_farm",title:t("tau_red_womling_farm"),desc(){return`
${t("tau_red_womling_farm")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_farm",r,24e6,1.28,"tauceti")},Iron(r){return f("womling_farm",r,95e5,1.28,"tauceti")},Water(r){return f("womling_farm",r,5e3,1.28,"tauceti")}},effect(){let r=e.tech.womling_pop?16:12;e.tech.womling_gene&&(r+=4);let a=e.tauceti.hasOwnProperty("womling_farm")?e.tauceti.womling_farm.farmers:0,i=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return i=i+`
${t("tau_red_womling_farm_effect",[r])}
`,i=i+`
${t("tau_red_womling_employ",[2])}
`,e.tech.isolation&&(i=i+`
${t("tau_red_womling_generate",[e.resource.Furs.name])}
`),i=i+`
${t("tau_red_womling_farm_effect2",[r/2*a])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_farm.count++,re($(this)[0]),!0):!1}},womling_mine:{id:"tauceti-womling_mine",title:t("tau_red_womling_mine"),desc(){return`
${t("tau_red_womling_mine")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_mine",r,125e5,1.28,"tauceti")},Lumber(r){return f("womling_mine",r,128e5,1.28,"tauceti")},Steel(r){return f("womling_mine",r,45e5,1.28,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return e.tech.isolation?e.race.lone_survivor?r=r+`
${t("tau_red_womling_mine_effect_c",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name,e.resource.Iron.name,e.resource.Copper.name,e.resource.Aluminium.name,e.resource.Neutronium.name,e.resource.Iridium.name])}
`:r=r+`
${t("tau_red_womling_mine_effect_b",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name])}
`:r=r+`
${t("tau_red_womling_mine_effect_a",[e.resource.Unobtainium.name])}
`,r=r+`
${t("tau_red_womling_employ",[6])}
`,r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_mine.count++,e.resource.Unobtainium.display=!0,re($(this)[0]),!0):!1},flair(){return t("tau_red_womling_mine_flair")}},womling_fun:{id:"tauceti-womling_fun",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[W().red])}
`},name(){return e.race.womling_lord?t("tau_red_womling_fun1"):e.race.womling_god?t("tau_red_womling_fun2"):t("tau_red_womling_fun3")},reqs:{tau_red:6},path:["truepath"],cost:{Money(r){return f("womling_fun",r,38e5,1.28,"tauceti")},Food(r){return e.race.womling_friend?f("womling_fun",r,175e3,1.28,"tauceti"):0},Lumber(r){return f("womling_fun",r,5e5,1.28,"tauceti")},Stone(r){return f("womling_fun",r,5e5,1.28,"tauceti")},Furs(r){return e.race.womling_lord||e.race.womling_god?f("womling_fun",r,835e3,1.28,"tauceti"):0},Copper(r){return e.race.womling_lord?f("womling_fun",r,1125e3,1.28,"tauceti"):0},Alloy(r){return e.race.womling_god?f("womling_fun",r,656e3,1.28,"tauceti"):0},Water(r){return e.race.womling_friend?f("womling_fun",r,3500,1.28,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return r=r+`
${t("tau_red_womling_fun_effect",[$(this)[0].val()])}
`,r},val(){let r=0;return e.race.womling_lord?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?24:20:e.race.womling_god?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_friend&&(r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?18:15),e.race.lone_survivor&&(r*=2),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_fun.count++,re($(this)[0]),!0):!1}},womling_lab:{id:"tauceti-womling_lab",title:t("interstellar_laboratory_title"),desc(){return`
${t("interstellar_laboratory_title")}
${t("space_support",[W().red])}
`},reqs:{tau_red:7},path:["truepath"],cost:{Money(r){return f("womling_lab",r,65e6,1.28,"tauceti")},Elerium(r){return f("womling_lab",r,1200,1.28,"tauceti")},Orichalcum(r){return f("womling_lab",r,25e5,1.28,"tauceti")},Unobtainium(r){return f("womling_lab",r,1e4,1.28,"tauceti")},Quantium(r){return f("womling_lab",r,Jr(95e3),1.28,"tauceti")}},effect(){let r=e.tauceti.hasOwnProperty("overseer")?e.tauceti.overseer.prod:100,a=Math.round(25e3*r/100),i=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return i=i+`
${t("tau_red_womling_lab_effect",[a])}
`,i=i+`
${t("tau_red_womling_employ_single",[1])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_lab.count++,re($(this)[0]),!0):!1}}},tau_gas:{info:{name(r,a){let i=a||"gas_name",s=i==="gas_name"?0:1;if(r||e.race[i])switch(r||e.race[i]){case 1:{let n=e.race.universe==="antimatter"?"plasmid":"antiplasmid";switch(Math.round(e.stats[n]+s)%3){case 1:return t("tau_planet",[W().gas]);case 2:return t("tau_gas_title0a",[W().gas]);default:return t("tau_gas_title0b",[W().gas])}}case 2:switch(Math.round(e.stats.reset+s)%3){case 1:return t("tau_gas_title1a");case 2:return t("tau_gas_title1b");default:return t("tau_gas_title1c")}case 3:switch(Math.round(e.stats.mad+s)%3){case 1:return t("tau_gas_title2a");case 2:return t("tau_gas_title2b");default:return t("tau_gas_title2c")}case 4:switch(Math.round(e.stats.bioseed+s)%3){case 1:return t("tau_gas_title3a",[F[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[F[e.race.old_gods].name]);default:return t("tau_gas_title3c",[F[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[W().gas]);case 2:return t("tau_gas_title4b",[tt("reverse",W().gas)]);default:return t("tau_gas_title4c")}case 6:switch(Math.round(e.stats.womling.friend.l+e.stats.womling.lord.l+e.stats.womling.god.l+s)%3){case 1:return t("tau_gas_title5a");case 2:return t("tau_gas_title5b");default:return t("tau_gas_title5c")}case 7:switch(Math.round(e.stats.tdays+s)%3){case 1:return t("tau_gas_title6a");case 2:return t("tau_gas_title6b");default:return t("tau_gas_title6c")}default:return i==="gas_name"?t("tau_gas_title"):t("tau_gas2_title")}return i==="gas_name"?t("tau_gas_title"):t("tau_gas2_title")},desc(){return t("tau_gas_desc")}},gas_contest:{id:"tauceti-gas_contest",title(){return t("tau_gas_contest_title")},desc(){return t("tau_gas_contest_title")},reqs:{tauceti:5},grant:["tau_gas",1],path:["truepath"],queue_complete(){return e.tech.tau_gas>=1?0:1},cost:{Money(){return 1e7}},effect(){return e.race.lone_survivor?t("tau_gas_contest_effect_alt"):t("tau_gas_contest_effect")},action(){return!!u($(this)[0])}},refueling_station:{id:"tauceti-refueling_station",title(){return t("tau_gas_refueling_station_title")},desc(){return`
${t("tau_gas_refueling_station_title")}
${t("requires_power")}
`},reqs:{tau_gas:2},path:["truepath"],cost:{Money(r){return f("refueling_station",r,68e6,1.28,"tauceti")},Graphene(r){return f("refueling_station",r,25e5,1.28,"tauceti")},Unobtainium(r){return f("refueling_station",r,5500,1.28,"tauceti")},Mythril(r){return f("refueling_station",r,Jr(6e4),1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:5)},effect(){let r=+T("refueling_station").toFixed(2),a=H(1e4),i=`
${t("space_gas_mining_effect1",[r])}
`;if(i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Helium_3.name])}
`,e.tech.tau_whale>=2){let s=H(6500);i=i+`
${t("plus_max_resource",[s.toLocaleString(),e.resource.Oil.name])}
`}return e.tech.isolation&&(i=i+`
${t("interstellar_g_factory_effect")}
`),i=i+`
${t("minus_power",[$(this)[0].powered()])}
`,i},special(){return!!e.tech.isolation},action(){return u($(this)[0])?(e.tauceti.refueling_station.count++,re($(this)[0]),!0):!1},post(){e.tech.tau_gas===2&&(e.tech.tau_gas=3,ue())}},ore_refinery:{id:"tauceti-ore_refinery",title(){return t("tau_gas_ore_refinery_title")},desc(){return`
${t("tau_gas_ore_refinery_title")}
${t("requires_power")}
`},reqs:{tau_gas:4},path:["truepath"],cost:{Money(r){return f("ore_refinery",r,52e6,1.28,"tauceti")},Iridium(r){return f("ore_refinery",r,16e5,1.28,"tauceti")},Unobtainium(r){return f("ore_refinery",r,800,1.28,"tauceti")},Sheet_Metal(r){return f("ore_refinery",r,Jr(118e3),1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:8)},effect(){let r=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.fill:0,a=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.max:0,i=+T("ore_refinery").toFixed(2),s=`
${t("tau_gas_ore_refinery_effect",[+r.toFixed(2)])}
`;return s=s+`
${t("tau_gas_ore_refinery_effect2",[a])}
`,s=s+`
${t("tau_gas_ore_refinery_effect3",[i])}
`,s=s+`
${t("interstellar_stellar_forge_effect3",[e.tech.isolation?12:4])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){return u($(this)[0])?(e.tauceti.ore_refinery.count++,e.city.powered&&e.city.power>=$(this)[0].powered()&&(e.tauceti.ore_refinery.on++,e.city.smelter.cap+=e.tech.isolation?12:2,e.city.smelter.Steel+=e.tech.isolation?12:2,e.race.evil?e.city.smelter.Wood+=e.tech.isolation?12:2:e.city.smelter.Oil+=e.tech.isolation?12:2),!0):!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,Ar(),ue())}},whaling_station:{id:"tauceti-whaling_station",title(){return t("tau_gas_whaling_station_title")},desc(){return`
${t("tau_gas_whaling_station_title")}
${t("requires_power")}
`},reqs:{tau_whale:1},path:["truepath"],cost:{Money(r){return f("whaling_station",r,72e6,1.28,"tauceti")},Steel(r){return f("whaling_station",r,18e5,1.28,"tauceti")},Polymer(r){return f("whaling_station",r,955e3,1.28,"tauceti")},Orichalcum(r){return f("whaling_station",r,268e3,1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:6)},effect(){let r=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.fill:0,a=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.max:0,i=+T("whaling_station").toFixed(2),s=`
${t("tau_gas_whaling_station_effect",[+r.toFixed(2)])}
`;return s=s+`
${t("tau_gas_whaling_station_effect2",[a])}
`,s=s+`
${t("tau_gas_whaling_station_effect3",[i])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return u($(this)[0])?(e.tauceti.whaling_station.count++,re($(this)[0]),!0):!1},post(){e.tech.tau_whale===1&&(e.tech.tau_whale=2,Ar())}},womling_station:{id:"tauceti-womling_station",title(){return t("tau_gas_womling_station_title")},desc(){return`
${t("tau_gas_womling_station_desc")}
${t("requires_power")}
`},reqs:{womling_technicians:1},path:["truepath"],cost:{Money(r){return f("womling_station",r,1334e5,1.26,"tauceti")},Furs(r){return f("womling_station",r,3805e3,1.26,"tauceti")},Aluminium(r){return f("womling_station",r,85e5,1.26,"tauceti")},Nano_Tube(r){return f("womling_station",r,909e3,1.26,"tauceti")}},powered(){return _e(e.tech.isolation?3:6)},effect(){let r=e.tech.isolation?30:8;e.tech.womling_gene&&(r*=1.25);let a=`
${t("tau_gas_womling_station_effect",[r,Ye.tau_gas.info.name()])}
`;return e.race.flier||(a=a+`
${t("city_cement_plant_effect1",[N(1)])}
`),a=a+`
${t("space_red_fabrication_effect1",[N(1)])}
`,a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.womling_station.count++,re($(this)[0]),!0):!1}}},tau_roid:{info:{name(){return t("tau_roid_title")},desc(){return t("tau_roid_desc")},support:"patrol_ship"},roid_mission:{id:"tauceti-roid_mission",title(){return t("space_mission_title",[t("tau_roid_title")])},desc(){return t("space_mission_desc",[t("tau_roid_title")])},reqs:{tauceti:5},grant:["tau_roid",1],path:["truepath"],queue_complete(){return e.tech.tau_roid>=1?0:1},cost:{Helium_3(r,a){return+ze(125e4,!1,a).toFixed(0)}},effect(){return t("tau_roid_mission_effect",[t("tau_roid_title")])},action(){return u($(this)[0])?(I(t("tau_roid_mission_result"),"info",!1,["progress"]),!0):!1}},patrol_ship:{id:"tauceti-patrol_ship",title:t("tau_roid_patrol_ship"),desc(){return`
${t("tau_roid_patrol_ship")}
${t("requires_res",[e.resource.Helium_3.name])}
`},reqs:{tau_roid:3},path:["truepath"],cost:{Money(r){return f("patrol_ship",r,45e6,1.25,"tauceti")},Adamantite(r){return f("patrol_ship",r,18e5,1.25,"tauceti")},Elerium(r){return f("patrol_ship",r,520,1.25,"tauceti")},Stanene(r){return f("patrol_ship",r,2675e3,1.25,"tauceti")},Bolognium(r){return f("patrol_ship",r,115e4,1.25,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=`
${t("tau_roid_patrol_ship_security",[$(this)[0].support()])}
`;return a=a+`
${t("tau_roid_patrol_ship_effect")}
`,a=a+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,a},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?15:250}},support(){return 1},powered(){return 0},refresh:!0,action(){return u($(this)[0])?(e.tauceti.patrol_ship.count++,e.tauceti.patrol_ship.on++,!0):!1}},mining_ship:{id:"tauceti-mining_ship",title:t("tau_roid_mining_ship"),desc(){return`
${t("tau_roid_mining_ship")}
`},reqs:{tau_roid:4},path:["truepath"],cost:{Money(r){return f("mining_ship",r,28e6,1.28,"tauceti")},Uranium(r){return f("mining_ship",r,12500,1.28,"tauceti")},Titanium(r){return f("mining_ship",r,22e5,1.28,"tauceti")},Alloy(r){return f("mining_ship",r,175e4,1.28,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=+T("mining_ship").toFixed(2),i=`
${t("tau_roid_mining_ship_effect",[a])}
`;return i=i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,i},s_type:"tau_roid",support_fuel(){return{r:"Helium_3",a:e.tech.isolation?12:75}},support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(e.tauceti.mining_ship.count++,re($(this)[0]),!0):!1}},whaling_ship:{id:"tauceti-whaling_ship",title:t("tau_roid_whaling_ship"),desc(){return`
${t("tau_roid_whaling_ship")}
`},reqs:{tau_whale:2},path:["truepath"],cost:{Money(r){return f("whaling_ship",r,35e6,1.28,"tauceti")},Aluminium(r){return f("whaling_ship",r,34e5,1.28,"tauceti")},Neutronium(r){return f("whaling_ship",r,168e3,1.28,"tauceti")},Nano_Tube(r){return f("whaling_ship",r,8e5,1.28,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=+T("whaling_ship").toFixed(2),i=`
${t("tau_roid_whaling_ship_effect",[a])}
`;return i=i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,i},s_type:"tau_roid",support_fuel(){return{r:"Helium_3",a:e.tech.isolation?14:90}},support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.whaling_ship.count++,re($(this)[0]),!0):!1}}},tau_gas2:{info:{name(r){return Ye.tau_gas.info.name(r||e.race.gas_name2||!1,"gas_name2")},desc(){return t("tau_gas2_desc",[Ye.tau_gas.info.name()])}},gas_contest2:{id:"tauceti-gas_contest2",title(){return t("tau_gas2_contest_title")},desc(){return t("tau_gas2_contest_title")},reqs:{tau_gas2:1},grant:["tau_gas2",2],path:["truepath"],queue_complete(){return e.tech.tau_gas2>=1?0:1},cost:{Money(){return 25e6}},effect(){return t("tau_gas2_contest_effect")},action(){return!!u($(this)[0])},flair(){return t("tau_gas2_contest_flair")}},alien_station_survey:{id:"tauceti-alien_station_survey",title:t("tau_gas2_alien_station"),desc:t("tau_gas2_alien_station"),reqs:{tau_gas2:3},grant:["tau_gas2",4],path:["truepath"],queue_complete(){return e.tech.tau_gas3>=4?0:1},cost:{Money(){return e.race.lone_survivor?15e8:3e9},Helium_3(){return 5e6}},effect(){return t("tau_gas2_alien_station_repair_effect",[Ye.tau_gas2.info.name()])},action(){return u($(this)[0])?(e.tauceti.alien_station={count:0},I(t("tau_gas2_alien_station_msg",[Ye.tau_gas2.info.name()]),"info",!1,["progress"]),!0):!1}},alien_station:{id:"tauceti-alien_station",title:t("tau_gas2_alien_station"),desc(r){return!e.tauceti.hasOwnProperty("alien_station")||e.tauceti.alien_station.count<100||r?`
${t("tau_gas2_alien_station")}
`+(e.tauceti.hasOwnProperty("alien_station")&&e.tauceti.alien_station.count>=100?`
${t("space_dwarf_reactor_desc_req")}
`:`
${t("tau_gas2_alien_station_repair")}
`):`
${t("tau_gas2_alien_station")}
`},reqs:{tau_gas2:4},condition(){return e.tauceti.alien_station.count<100},path:["truepath"],queue_size:5,queue_complete(){return 100-e.tauceti.alien_station.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?12e6:5e7:0},Aluminium(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256e3:256e4:0},Polymer(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?198900:989e3:0},Mythril(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?Jr(125e3):0},Cipher(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256:2001:0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0);return i<100?(a+=`
${t("tau_gas2_alien_station_repaired",[i])}
`,a):Ye.tau_gas2.alien_space_station.effect(r)},action(){return u($(this)[0])&&e.tauceti.alien_station.count<100?(e.tauceti.alien_station.count++,e.tauceti.alien_station.count>=100&&(e.tech.tau_gas2=5,e.tauceti.alien_space_station={count:1,on:0}),!0):!1},post(){e.resource.Elerium.diff>=10&&(e.tauceti.alien_space_station.on=1),Ar()}},alien_space_station:{id:"tauceti-alien_space_station",title:t("tau_gas2_alien_station"),desc(){return`
${t("tau_gas2_alien_station")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{tau_gas2:5},path:["truepath"],cost:{},queue_complete(){return 0},special(){return!!(e.tech.tau_gas2&&e.tech.tau_gas2===6&&(!e.tech.alien_data||e.tech.alien_data<6))},wiki:!1,effect(){let r=$(this)[0].p_fuel().a,a=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;if(e.tech.tau_gas2&&e.tech.tau_gas2>=6&&e.tauceti.alien_space_station.hasOwnProperty("decrypted")){let i=e.race.lone_survivor?1e5:25e6,s=+(e.tauceti.alien_space_station.decrypted/i).toFixed(2);s>100&&(s=100),a=a+`
${t("tau_gas2_alien_station_effect",[s])}
`}return a=a+`
${t("spend",[r,e.resource[$(this)[0].p_fuel().r].name])}
`,a},p_fuel(){return{r:"Elerium",a:e.race.lone_survivor?1:10}},powered(){return dt(-75)},action(){return!1}},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:t("tech_matrioshka_brain"),desc(r){return!e.tauceti.hasOwnProperty("matrioshka_brain")||e.tauceti.matrioshka_brain.count<1e3||r?`
${t("tech_matrioshka_brain")}
${t("requires_segments",[1e3])}
`:`
${t("tech_matrioshka_brain")}
`},reqs:{tau_gas2:7},condition(){return!!e.tauceti.matrioshka_brain},path:["truepath"],queue_size:50,queue_complete(){return 1e3-e.tauceti.matrioshka_brain.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?2e7:0},Neutronium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?45e3:0},Nano_Tube(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?16e4:0},Adamantite(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?666e3:0},Stanene(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?61600:0},Bolognium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?44e3:0},Unobtainium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?1200:0},Mythril(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?Jr(64e3):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0);return i<1e3&&(a+=`
${t("tau_gas2_matrioshka_brain_seg",[1e3-i])}
`),a},action(){return u($(this)[0])&&e.tauceti.matrioshka_brain.count<1e3?(e.tauceti.matrioshka_brain.count++,e.tauceti.matrioshka_brain.count>=1e3&&(e.tech.m_brain=1),!0):!1}},ignition_device:{id:"tauceti-ignition_device",title:t("tech_ignition_device"),desc(r){return!e.tauceti.hasOwnProperty("ignition_device")||e.tauceti.ignition_device.count<10||r?`
${t("tech_ignition_device")}
${t("requires_segments",[10])}
`:`
${t("tech_ignition_device")}
`},reqs:{tau_gas2:8},condition(){return!!(e.tauceti.ignition_device&&e.tauceti.ignition_device.count<10)},path:["truepath"],queue_size:1,queue_complete(){return 10-e.tauceti.ignition_device.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e7:0},Uranium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?5e4:0},Elerium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e3:0},Graphene(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?225e5:0},Orichalcum(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?15e6:0},Quantium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?Jr(8e6):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0);return i<10&&(a+=`
${t("tau_gas2_ignition_device_seg",[10-i])}
`),a},action(){return u($(this)[0])&&e.tauceti.ignition_device.count<10?(e.tauceti.ignition_device.count++,e.tauceti.ignition_device.count>=10&&(e.tech.m_ignite=1),!0):!1}},ignite_gas_giant:{id:"tauceti-ignite_gas_giant",title(){return t("tau_gas2_ignite_gas_giant",[Ye.tau_gas2.info.name()])},desc(){return t("tau_gas2_ignite_gas_giant",[Ye.tau_gas2.info.name()])},reqs:{tau_gas2:8,m_ignite:1},grant:["m_ignite",2],queue_size:1,queue_complete(){return!1},path:["truepath"],cost:{Helium_3(){return 75e5}},effect(){let r=`
${t("tau_gas2_ignite_gas_giant_effect",[t("tech_matrioshka_brain")])}
`;return e.tech.m_brain?(r=r+`
${t("tau_gas2_ignite_gas_giant_effect3")}
`,r+=hu()):r=r+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,r},action(){return e.tech.m_brain&&u($(this)[0])?(co(),!0):!1}}}};for(let r=1;r<9;r++)Ye.tau_gas[`gas_contest-a${r}`]={id:`tauceti-gas_contest-a${r}`,title(){return Ye.tau_gas.info.name(r)},desc(){return Ye.tau_gas.info.name(r)},reqs:{tau_gas:1},grant:["tau_gas",2],path:["truepath"],wiki:!1,queue_complete(){return e.tech.tau_gas>=2?0:1},cost:{},effect(){return t(r===8?"tau_gas_contest_reject":"tau_gas_contest_pick",[Ye.tau_gas.info.name(r)])},action(){return u($(this)[0])?(e.race.gas_name=r,e.tauceti.refueling_station={count:0,on:0},!0):!1}},Ye.tau_gas2[`gas_contest-b${r}`]={id:`tauceti-gas_contest-b${r}`,title(){return Ye.tau_gas2.info.name(r)},desc(){return Ye.tau_gas2.info.name(r)},reqs:{tau_gas2:2},grant:["tau_gas2",3],path:["truepath"],wiki:!1,queue_complete(){return e.tech.tau_gas2>=3?0:1},cost:{},effect(){return t(r===8?"tau_gas2_contest_reject":"tau_gas_contest_pick",[Ye.tau_gas2.info.name(r)])},action(){return u($(this)[0])?(e.race.gas_name2=r,!0):!1}};function qo(){let r=ot("matrix"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=e.stats.retire===e.stats.matrix+1?`
${t("tau_star_matrix_skilled",[1])}
`:"";return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function hu(){let r=ot("retired"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=e.stats.retire+1===e.stats.matrix?`
${t("tau_star_matrix_skilled",[1])}
`:"";return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function fu(){let r=ot("eden"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
`}function Dn(){e.tauceti.overseer={count:0,on:0,pop:0,working:0,injured:0,morale:0,loyal:0,prod:0},e.tauceti.womling_village=e.race.lone_survivor?{count:2,on:2}:{count:1,on:1},e.tauceti.womling_mine=e.race.lone_survivor?{count:1,on:1,miners:0}:{count:0,on:0,miners:0},e.tauceti.womling_farm={count:1,on:1,farmers:0},e.tauceti.womling_fun={count:0,on:0}}function mu(r){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(r*=.94**e.tech.womling_tech),r}function Jr(r){return e.tech.womling_tech&&e.tech.womling_recycling&&e.tech.womling_recycling>=1&&(r*=(e.tech.isolation?.97:.98)**e.tech.womling_tech),r}function Bi(){return Hn}function Po(){return Ye}function yr(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function Co(r,a,i){switch(r){case"tauceti":return Dr(Ye,a,i)}}function Ar(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==6))return;let r=$("#tauceti");le(r),r.append($(`

${t("tab_tauceti")}

`)),!(!e.tech.tauceti||e.tech.tauceti<2)&&Object.keys(Ye).forEach(function(a){let i=a.replace("tau_","");if(e.settings.tau[`${i}`]){let s=typeof Ye[a].info.name=="string"?Ye[a].info.name:Ye[a].info.name(),n="";if(Ye[a].info.hasOwnProperty("prop")&&(n=Ye[a].info.prop()),Ye[a].info.support){let c=Ye[a].info.support;Ye[a].info.hide_support?r.append(`

${s}

${n}
`):r.append(`

${s}

{{ support }}/{{ s_max }}${n}
`),D({el:`#sr${a}`,data:e.tauceti[c],filters:{filter(){return Ye[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);pe(a,function(){return typeof Ye[a].info.desc=="string"?Ye[a].info.desc:Ye[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ye[a]).forEach(function(c){if(c!=="info"&&Dr(Ye,a,c)){let l=Ye[a][c];Br(l,"tauceti",c)}}),Ye[a].info.hasOwnProperty("extra")&&Ye[a].info.extra(a)}})}function Un(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(Qn(),Gi(),le($("#dwarfShipYard")),e.space.hasOwnProperty("shipyard")&&e.settings.showShipYard)){let r=$("#dwarfShipYard");e.space.shipyard.hasOwnProperty("blueprint")||(e.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:Bn()});let a=$('
');r.append(a);let i=$('
');a.append(i),i.append(`
${t("outer_shipyard_registry")}:
`),i.append(`
${t("crew")}
`),i.append(`
${t("power")}
`),i.append(`
${t("firepower")}
`),i.append(`
${t("outer_shipyard_sensors")}
`),i.append(`
${t("speed")}
`),i.append(`
${t("outer_shipyard_fuel")}
`),a.append('
');let s=$('
');a.append(s);let n={class:["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"],power:["solar","diesel","fission","fusion","elerium"],weapon:["railgun","laser","p_laser","plasma","phaser","disruptor"],armor:["steel","alloy","neutronium"],engine:["ion","tie","pulse","photon","vacuum","emdrive"],sensor:["visual","radar","lidar","quantum"]};Object.keys(n).forEach(function(o){let d="";n[o].forEach(function(h,_){d+=`${t(`outer_shipyard_${o}_${h}`)}`}),s.append(` + `);a.append(i),$("#r_civics").append(a),D({el:"#government .govTabs2",data:{t:e.civic.taxes,s:e.settings},methods:{vis(){return!!e.tech.govern}}}),Jl($("#r_govern0")),eu($("#r_govern0"));var s=$('
');$("#r_govern0").append(s),Ot()}}function ls(){if(us(),!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==3))){var r=$('
');$("#military").append(r),$("#military").append($('
')),ia(r,!0),tu()}}function us(){e.civic.garrison||(e.civic.garrison={display:!1,disabled:!1,rate:0,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0}),e.civic.garrison.mercs||(e.civic.garrison.mercs=!1),e.civic.garrison.fatigue||(e.civic.garrison.fatigue=0),e.civic.garrison.protest||(e.civic.garrison.protest=0),e.civic.garrison.m_use||(e.civic.garrison.m_use=0),e.civic.garrison.crew||(e.civic.garrison.crew=0),e.civic.mad||(e.civic.mad={display:!1,armed:!0})}function ds(r){if(e.race.truepath){if(e.civic.foreign[`gov${r}`].hstl<10)return 1+(10-e.civic.foreign[`gov${r}`].hstl)/40;if(e.civic.foreign[`gov${r}`].hstl>60)return 1-(-60+e.civic.foreign[`gov${r}`].hstl)/160}return 1}function ut(r){if(typeof e.civic.foreign[`gov${r}`].name>"u"){let a=ga();e.civic.foreign[`gov${r}`].name={s0:a.s0,s1:a.s1}}return t(`civics_gov${e.civic.foreign[`gov${r}`].name.s0}`,[e.civic.foreign[`gov${r}`].name.s1])}var ho=function(){return{anarchy:t("govern_anarchy_effect"),autocracy:t("govern_autocracy_effect",$e.autocracy()),democracy:t("govern_democracy_effect",$e.democracy()),oligarchy:e.tech.high_tech&&e.tech.high_tech>=12?t("govern_oligarchy_effect_alt",[$e.oligarchy()[1]]):t("govern_oligarchy_effect",[$e.oligarchy()[0],$e.oligarchy()[1]]),theocracy:t("govern_theocracy_effect",$e.theocracy()),theocracy_alt:t("govern_theocracy_effect_alt",$e.theocracy()),republic:t("govern_republic_effect",$e.republic()),socialist:t("govern_socialist_effect",$e.socialist()),corpocracy:t("govern_corpocracy_effect",$e.corpocracy()),technocracy:e.tech.high_tech&&e.tech.high_tech>=16?t("govern_technocracy_effect_alt",[$e.technocracy()[0],$e.technocracy()[2]]):t("govern_technocracy_effect",$e.technocracy()),federation:t("govern_federation_effect",[$e.federation()[0],$e.federation()[1]]),federation_alt:t("govern_federation_effect_alt",[25,$e.federation()[2],$e.federation()[1]]),magocracy:t("govern_magocracy_effect",$e.magocracy())}},$e={autocracy(){let r=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?10:18:25,a=ge("organizer",0)?40:35;return[r,a]},democracy(){let r=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?30:25:20,a=ge("organizer",0)?1:5;return[r,a]},oligarchy(){let r=e.tech.high_tech&&e.tech.high_tech>=12?0:e.tech.high_tech&&e.tech.high_tech>=2?2:5,a=ge("organizer",0)?25:20;return[r,a]},theocracy(){let r=12,a=ge("organizer",0)?10:25,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?25:40:50;return[r,a,i]},republic(){let r=ge("organizer",0)?30:25,a=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:30:20;return[r,a]},socialist(){let r=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:42:35,a=ge("organizer",0)?12:10,i=10,s=ge("organizer",0)?10:20;return[r,a,i,s]},corpocracy(){let r=ge("organizer",0)?220:200,a=ge("organizer",0)?175:150,i=ge("organizer",0)?110:100,s=e.tech.high_tech&&e.tech.high_tech>=12?5:10,n=e.tech.high_tech&&e.tech.high_tech>=16?40:30;return[r,a,i,s,n]},technocracy(){let r=8,a=e.tech.high_tech&&e.tech.high_tech>=16?0:e.tech.high_tech&&e.tech.high_tech>=12?1:2,i=ge("organizer",0)?18:10;return[r,a,i]},federation(){let r=3,a=ge("organizer",0)?12:10,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:36:32;return[r,a,i]},magocracy(){let r=ge("organizer",0)?30:25,a=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:40:25;return[r,a]}};function Jl(r){var a=$('
');r.append(a);var i=$(`
${t("civics_government_type")} {{ type | govern }}
`);a.append(i);var s=$("
");a.append(s);var n=$('');s.append(n);var c={template:''};D({el:"#govType",data:e.civic.govern,filters:{govern(l){return t(`govern_${l}`)},set(l){return l==="anarchy"?t("civics_set_gov"):t("civics_revolution")}},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var l=setInterval(function(){$("#modalBox").length>0&&(clearInterval(l),Yl())},50)},startrev(){e.civic.govern.fr=e.civic.govern.rev,e.civic.govern.rev=0},force(){return e.civic.govern.rev>0?t("civics_force_rev_desc"):t("civics_force_rev_desc2")},vis(){return!!e.tech.govern}}}),pe("govLabel",function(){let l=e.tech.unify&&e.tech.unify>=2&&e.civic.govern.type==="federation"?"federation_alt":e.civic.govern.type;return l==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(l="theocracy_alt"),$(`
${fo(e.civic.govern.type)}
${ho()[l]}
`)}),pe("govTypeChange",function(){return e.civic.govern.rev>0?t("civics_change_desc",[e.civic.govern.rev]):t("civics_change_desc2")},{elm:"#govType .change"})}function fo(r){return e.race.witch_hunter&&r==="magocracy"?t("witch_hunter_magocracy"):t(`govern_${r}_desc`)}function Yl(){$("#modalBox").append($(`

${t("civics_government_type")}

`));let r=jt(6,10);r.length>0&&$("#modalBoxTitle").append(r);let a=ar(6,14,!1);a.length>0&&$("#modalBoxTitle").append(a);var i=$('
');$("#modalBox").append(i),e.tech.govern&&(e.civic.govern.type!=="autocracy"&&i.append($(``)),e.civic.govern.type!=="democracy"&&i.append($(``)),e.civic.govern.type!=="oligarchy"&&i.append($(``)),e.tech.gov_theo&&e.civic.govern.type!=="theocracy"&&i.append($(``)),e.tech.govern>=2&&e.civic.govern.type!=="republic"&&i.append($(``)),e.tech.gov_soc&&e.civic.govern.type!=="socialist"&&i.append($(``)),e.tech.gov_corp&&e.civic.govern.type!=="corpocracy"&&i.append($(``)),e.tech.govern>=3&&e.civic.govern.type!=="technocracy"&&i.append($(``)),e.tech.gov_fed&&e.civic.govern.type!=="federation"&&i.append($(``)),e.tech.gov_mage&&e.civic.govern.type!=="magocracy"&&i.append($(``))),D({el:"#govModal",data:e.civic.govern,methods:{setGov(s){if(e.civic.govern.rev===0){let n=e.genes.governor&&e.civic.govern.type==="anarchy";e.civic.govern.type=s;let c=1e3;e.tech.high_tech&&(c+=250,e.tech.high_tech>=3&&(c+=250),e.tech.high_tech>=6&&(c+=250)),e.tech.space_explore&&e.tech.space_explore>=3&&(c+=250),e.race.unorganized&&(c=Math.round(c*(1+b.unorganized.vars()[0]/100))),e.stats.achieve.anarchist&&(c=Math.round(c*(1-e.stats.achieve.anarchist.l/10))),e.race.lawless&&(c=Math.round(c*((100-b.lawless.vars()[0])/100)));let l=ve("tuskin");l>0&&(c=Math.round(c*((100-b.lawless.vars(1)[0]*l)/100)));let o=ge("aristocrat",0);o&&(c=Math.round(c*(1-o/100))),e.civic.govern.rev=c+e.civic.govern.fr,n&&ue(),D({el:"#govModal"},"destroy"),$(".modal-background").click(),Ie()}}}}),pe("GovPop",function(s){let n=$(s.this).data("gov"),c=e.tech.unify&&e.tech.unify>=2&&n==="federation"?"federation_alt":n;return c==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(c="theocracy_alt"),$(`
${fo(n)}
${ho()[c]}
`)},{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}function ps(){if($("#foreign").length===0&&!e.race.cataclysm&&(!e.tech.world_control||e.race.truepath)&&!e.tech.isolation){let a=$('
');a.append($(`

${t("civics_foreign")}

`)),$("#r_govern0").append(a);var r={template:''};let i=e.race.truepath?5:3;for(let n=0;n{{ '${n}' | gov }} - ${t("civics_garrison_occupy")} - ${t("civics_garrison_annex")} - ${t("civics_garrison_purchase")}
`);a.append(c);let l=$("
");l.append($(``)),l.append($(``)),l.append($(``)),c.append(l),c.append($(`
${t("civics_gov_mil_rate")}: {{ f${n}.mil | military(${n}) }} ({{ f${n}.mil }})
`)),c.append($(`
${t("civics_gov_relations")}: {{ f${n}.hstl | relation }} ({{ f${n}.hstl | hate }})
`)),c.append($(`
${t("civics_gov_eco_rate")}: {{ f${n}.eco | eco(${n}) }} ({{ f${n}.eco }})
`)),c.append($(`
${t("civics_gov_unrest")}: {{ f${n}.unrest | discontent(${n}) }} ({{ f${n}.unrest | turmoil }})
`))}let s={f0:e.civic.foreign.gov0,f1:e.civic.foreign.gov1,f2:e.civic.foreign.gov2,t:e.tech};e.race.truepath&&(s.f3=e.civic.foreign.gov3,s.f4=e.civic.foreign.gov4),D({el:"#foreign",data:s,filters:{military(n,c){return e.civic.foreign[`gov${c}`].spy>=1?n<50?t("civics_gov_v_weak"):n<75?t("civics_gov_weak"):n>300?t("civics_gov_superpower"):n>200?t("civics_gov_v_strong"):n>160?t("civics_gov_strong"):n>125?t("civics_gov_above_average"):t("civics_gov_average"):"???"},relation(n){return n>80?t("civics_gov_hated"):n>60?t("civics_gov_hostile"):n>40?t("civics_gov_poor"):n>25?t("civics_gov_neutral"):n>10?t("civics_gov_liked"):t("civics_gov_good")},eco(n,c){return e.civic.foreign[`gov${c}`].spy>=2?n<60?t("civics_gov_weak"):n<80?t("civics_gov_recession"):n>120?t("civics_gov_strong"):t("civics_gov_average"):"???"},discontent(n,c){return e.civic.foreign[`gov${c}`].spy>=3?n<=0?t("civics_gov_none"):n<30?t("civics_gov_low"):n<60?t("civics_gov_medium"):n<90?t("civics_gov_high"):t("civics_gov_extreme"):"???"},gov(n){return ut(n)},sab(n){return n==="none"?"":t(`civics_spy_${n}`)},hate(n){return`${100-n}%`},turmoil(n){return`${n}%`}},methods:{campaign(n){vo(n)},battleAssessment(n){return zn(n)},trigModal(n){this.$buefy.modal.open({parent:this,component:r});var c=setInterval(function(){$("#modalBox").length>0&&(clearInterval(c),Xl(n))},50)},spy_disabled(n){return e.civic.foreign[`gov${n}`].trn>0||Es(n)>e.resource.Money.amount},spy(n){mo(n)},spyDesc(n){return lo(n)},espDesc(){return uo()},vis(){return!!(e.civic.garrison.display&&(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation)},gvis(n){return e.tech.isolation?!1:n<=2?!e.tech.world_control:n===3?!!e.tech.rival:!1}}});for(let n=0;n{{ label() }}"},{elm:`#gov${n} .attack`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return zn(n)}}})},out:function(c){D({el:c.id},"destroy")}}),pe(`gov${n}ts`,function(){return"{{ label() }}"},{elm:`#gov${n} .tspy`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return lo(n)}}})},out:function(c){D({el:c.id},"destroy")}}),pe(`gov${n}s`,function(){return uo()},{elm:`#gov${n} .sspy`});e.race.truepath&&pe("garRivaldesc1",function(){return t("civics_gov_tp_rival",[ut(3),A[e.race.species].home])},{elm:"#gov3 > span"})}}function lo(r){if(e.civic.foreign[`gov${r}`].trn>0)return t("civics_progress");let a=Ee(Es(r));return t("civics_gov_spy_desc",[a])}function uo(){return t("civics_gov_esp_desc")}function Es(r){let a=Math.round(e.civic.foreign[`gov${r}`].mil/2+e.civic.foreign[`gov${r}`].hstl/2-e.civic.foreign[`gov${r}`].unrest)+10;return a<50&&(a=50),e.race.infiltrator&&(a/=3),ma()==="scorpio"&&(a*=1-Zt("scorpio")[0]/100),Math.round(a**(e.civic.foreign[`gov${r}`].spy+1))+500}function mo(r){if(e.tech.spy&&e.civic.foreign[`gov${r}`].trn===0){let a=Es(r);if(e.resource.Money.amount>=a){e.resource.Money.amount-=a;let i=300;e.tech.spy>=3&&e.city.boot_camp&&(i-=(e.race.orbit_decayed&&e.space.space_barracks?e.space.space_barracks.on:e.city.boot_camp.count)*10,i<10&&(i=10)),e.race.infiltrator&&(i=Math.round(i/2)),e.civic.foreign[`gov${r}`].trn=i}}}function po(r){let a=e.civic.foreign[`gov${r}`].eco*15384;return a*=1+e.civic.foreign[`gov${r}`].hstl*1.6/100,a*=1-e.civic.foreign[`gov${r}`].unrest*.25/100,+a.toFixed(0)}function _r(r){return r?e.tech.world_control||e.civic.foreign[r].occ||e.civic.foreign[r].anx||e.civic.foreign[r].buy:e.civic.foreign.gov0.occ||e.civic.foreign.gov1.occ||e.civic.foreign.gov2.occ||e.civic.foreign.gov0.anx||e.civic.foreign.gov1.anx||e.civic.foreign.gov2.anx||e.civic.foreign.gov0.buy||e.civic.foreign.gov1.buy||e.civic.foreign.gov2.buy}function Ei(r,a){switch(r){case"influence":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?200:300;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="influence"}break;case"sabotage":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?400:600;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="sabotage"}break;case"incite":{if(a>=3)break;if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&e.civic.foreign[`gov${a}`].sab===0){let i=e.tech.spy>=4?600:900;e.race.befuddle&&(i=Math.round(i*(1-b.befuddle.vars()[0]/100)));let s=ve("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${a}`].sab=i,e.civic.foreign[`gov${a}`].act="incite"}}break}}function Xl(r){$("#modalBox").append($(`

${t("civics_espionage_actions")}

`));var a=$('
');$("#modalBox").append(a),e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&(a.append($(``)),a.append($(``)),r<3&&a.append($(``)),r<3&&e.civic.foreign[`gov${r}`].hstl<=50&&e.civic.foreign[`gov${r}`].unrest>=50&&a.append($(``)),r<3&&e.civic.foreign[`gov${r}`].spy>=3&&a.append($(``))),D({el:"#espModal",data:e.civic.foreign[`gov${r}`],methods:{influence(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("influence",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie())},sabotage(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("sabotage",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),$("#popGov").hide(),Ie())},incite(i){i>=3||e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Ei("incite",i),D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie())},annex(i){if(!(i>=3)&&e.civic.foreign[`gov${r}`].hstl<=50&&e.civic.foreign[`gov${r}`].unrest>=50&&e.city.morale.current>=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest&&e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&e.civic.foreign[`gov${i}`].sab===0){let s=e.tech.spy>=4?150:300;e.race.befuddle&&(s=Math.round(s*(1-b.befuddle.vars()[0]/100)));let n=ve("dryad");n>0&&(s=Math.round(s*(1-b.befuddle.vars(1)[0]/100*n))),e.civic.foreign[`gov${i}`].sab=s,e.civic.foreign[`gov${i}`].act="annex",D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie()}},purchase(i){if(i>=3)return;let s=po(i);if(s<=e.resource.Money.amount&&e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=3&&e.civic.foreign[`gov${i}`].sab===0){e.resource.Money.amount-=s;let n=e.tech.spy>=4?150:300;e.race.befuddle&&(n=Math.round(n*(1-b.befuddle.vars()[0]/100)));let c=ve("dryad");c>0&&(n=Math.round(n*(1-b.befuddle.vars(1)[0]/100*c))),e.civic.foreign[`gov${i}`].sab=n,e.civic.foreign[`gov${i}`].act="purchase",D({el:"#espModal"},"destroy"),$(".modal-background").click(),Ie()}}}}),pe("GovLabel",function(i){let s=$(i.this).data("esp"),n="";if(s==="purchase"){let l=po(r).toLocaleString();n=t(`civics_spy_${s}_desc`,[ut(r),l])}else if(s==="annex")if(e.city.morale.current>=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest)n=t(`civics_spy_${s}_desc`,[ut(r)]);else{let l=200+e.civic.foreign[`gov${r}`].hstl-e.civic.foreign[`gov${r}`].unrest;n=t(`civics_spy_${s}_goal`,[ut(r),l])}else n=t(`civics_spy_${s}_desc`,[ut(r)]);let c="";return(s==="influence"&&e.civic.foreign[`gov${r}`].hstl===0||s==="sabotage"&&e.civic.foreign[`gov${r}`].spy>=2&&e.civic.foreign[`gov${r}`].mil===50||s==="incite"&&e.civic.foreign[`gov${r}`].spy>=4&&e.civic.foreign[`gov${r}`].unrest===100)&&(c=`
${t("civics_spy_warning")}
`),$(`${c}
${n}
`)},{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}function Fn(r){let a=!!(e.tech.currency&&e.tech.currency>=5);if(r)return(a||e.race.terrifying)&&!e.race.noble?0:e.race.noble?b.noble.vars()[0]:10;{let i=30;e.race.noble?i=b.noble.vars()[1]:(a||e.race.terrifying)&&(i+=20),e.civic.govern.type==="oligarchy"&&(i+=$e.oligarchy()[1]);let s=ge("aristocrat",1);return s&&(i+=s),i}}function An(r,a){switch(r){case"add":{let i=a||fe(),s=Fn(!1);e.race.noble?(e.civic.taxes.tax_rate+=i,e.civic.taxes.tax_rate>(e.civic.govern.type==="oligarchy"?b.noble.vars()[1]+20:b.noble.vars()[1])&&(e.civic.taxes.tax_rate=e.civic.govern.type==="oligarchy"?b.noble.vars()[1]+20:b.noble.vars()[1])):e.civic.taxes.tax_rates&&(e.civic.taxes.tax_rate=s))}break;case"sub":{let i=a||fe(),s=Fn(!0);e.civic.taxes.tax_rate>s&&(e.civic.taxes.tax_rate-=i,e.civic.taxes.tax_rate
');r.append(a);var i=$(`

${t("civics_tax_rates")}

`);a.append(i);var s=$(''),n=$('«'),c=$('»');a.append(n),a.append(s),a.append(c),D({el:"#tax_rates",data:e.civic.taxes,filters:{tax_level(l){let o=jt(11,14),d=ar(2,14,!1);return o.length>0&&(l===0&&!e.race.noble||l===10&&e.race.noble)?o:l===13&&d.length>0?d:`${l}%`}},methods:{add(){An("add")},sub(){An("sub")}}}),pe("taxRateLabel",function(){return t("civics_tax_rates_desc")},{classes:"has-background-light has-text-dark"})}function vr(r,a){switch(r){case"m_cost":return _s();case"m_buy":return go(1);case"s_cost":return Es(a);case"t_spy":return mo(a);case"adj_tax":return An(a,1);case"tax_cap":return Fn(a);case"s_influence":return Ei("influence",a);case"s_sabotage":return Ei("sabotage",a);case"s_incite":return Ei("incite",a)}}function _s(){let r=Math.round(1.24**e.civic.garrison.workers*75)-50;r>25e3&&(r=25e3),e.civic.garrison.m_use>0&&(r*=1.1**e.civic.garrison.m_use),e.race.brute&&(r*=1-b.brute.vars()[0]/100);let a=ve("orc");return a>0&&(r*=1-b.brute.vars(1)[0]/100*a),e.race.inflation&&(r*=1+e.race.inflation/500),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),Math.round(r)}function go(r){if(e.tech.mercs){let a=r||fe(),i=!0;for(;i&&a>0;){let s=_s();e.civic.garrison.workers=s?(e.resource.Money.amount-=s,e.civic.garrison.workers++,e.civic.garrison.m_use++):i=!1,a--}}}function ia(r,a){le(r),e.tech.world_control&&!e.race.truepath?r.append($(`

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }}
`)):r.append($(`

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
`));var i=$('
');r.append(i);var s=$('
');i.append(s);let n=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");if(e.tech.isolation||(s.append($(`
${n} / {{ g.max | s_max }}
`)),s.append($(`
${t("civics_garrison_crew")} {{ g.crew }}
`)),s.append($(`
${t("civics_garrison_wounded")}
`)),i.append($(`
`))),a){let j="";e.tech.isolation&&(j=jt(8,12)),r.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${j} {{ g.progress }}%
`))}var c=$('
');r.append(c);var l=$('
');if(c.append(l),(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation){var o=$(`
${t("civics_garrison_campaign")}
`);l.append(o);var d=$('{{ g.tactic | tactics }}'),h=$('«'),_=$('»');o.append(h),o.append(d),o.append(_);var m=$(`
${t("civics_garrison_battalion")}
`);l.append(m);var w=$('{{ g.raid }}'),M=$('«'),F=$('»');m.append(M),m.append(w),m.append(F),a&&(e.race.truepath&&e.tech.rival&&c.append($(`
${ut(3)}
`)),e.tech.world_control||(c.append($(`
${ut(0)}
`)),c.append($(`
${ut(1)}
`)),c.append($(`
${ut(2)}
`))))}let x={g:e.civic.garrison,g0:e.civic.foreign.gov0,g1:e.civic.foreign.gov1,g2:e.civic.foreign.gov2};if(e.race.truepath&&(x.g3=e.civic.foreign.gov3,x.g4=e.civic.foreign.gov4),D({el:a?"#garrison":"#c_garrison",data:x,methods:{hire(){go()},campaign(j){vo(j)},next(){e.civic.garrison.tactic<4&&e.civic.garrison.tactic++},last(){e.civic.garrison.tactic>0&&e.civic.garrison.tactic--},aNext(){let j=fe();e.civic.garrison.raidWe()&&(e.civic.garrison.raid=We()))},aLast(){let j=fe();e.civic.garrison.raid>0&&(e.civic.garrison.raid-=j,e.civic.garrison.raid<0&&(e.civic.garrison.raid=0))},vis(){return e.civic.garrison.display},rvis(){return!!(e.tech.rival&&!e.tech.isolation)}},filters:{tactics(j){switch(j){case 0:return t("civics_garrison_tactic_ambush");case 1:return t("civics_garrison_tactic_raid");case 2:return t("civics_garrison_tactic_pillage");case 3:return t("civics_garrison_tactic_assault");case 4:return t("civics_garrison_tactic_siege")}},rating(j){return+mt(j,"army").toFixed(1)},hell(j){return We()},stationed(j){let B=We(),S=e.race.cataclysm?13:31,Q=B===S&&!a?ar(2,14,!0):!1;return B===S&&Q.length>0?Q:B},s_max(j){return We(!0)},wounded(j){let B=jt(8,12);return a&&j===0&&B.length>0?B:Ve("fool",2021)?We()-j:j},trainTime(j,B){return j===0?Ft(-1):Ft((100-B)/(j*4))}}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach(function(j){pe(a?`garrison${j}`:`cGarrison${j}`,function(){return"{{ label() }}"},{elm:`${a?"#garrison":"#c_garrison"} .${j}`,in:function(B){D({el:`#${B.id} > span`,data:{test:"val"},methods:{label(){switch(j){case"tactic":switch(e.civic.garrison.tactic){case 0:return t("civics_garrison_tactic_ambush_desc");case 1:return t("civics_garrison_tactic_raid_desc");case 2:return t("civics_garrison_tactic_pillage_desc");case 3:return t("civics_garrison_tactic_assault_desc");case 4:return t("civics_garrison_tactic_siege_desc",[N(e.civic.govern.type==="federation"?15:20)])}case"bat":return t("civics_garrison_army_label");case"soldier":return Tn();case"crew":return t("civics_garrison_crew_desc");case"wounded":return t("civics_garrison_wounded_desc");case"hmerc":{let S=Math.round(_s()).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[S])}case"defenseRating":return t("civics_garrison_defensive_rate");case"offenseRating":return t("civics_garrison_offensive_rate")}}}})},out:function(B){D({el:B.id},"destroy")}})}),a){let j=e.race.truepath?4:3;for(let B=0;B{{ label() }}"},{elm:`#garrison .gov${B} button`,in:function(S){D({el:`#${S.id} > span`,data:{test:"val"},methods:{label(){return zn(B)}}})},out:function(S){D({el:S.id},"destroy")}});e.race.truepath&&!e.tech.isolation&&pe("garRivaldesc2",function(){return t("civics_gov_tp_rival",[ut(3),A[e.race.species].home])},{elm:"#garrison .gov3 > div"})}}function Tn(){let r=mt(We(),"hunting"),a=[];if((!e.race.herbivore||e.race.carnivore)&&!e.race.artifical){let c=+(r/3).toFixed(2);a.push(c,e.resource.Food.name)}let i=+(r/10).toFixed(2);if(a.push(i,e.resource.Furs.name),e.race.evil&&!e.race.kindling_kindred&&!e.race.smoldering){let c=+(r/(e.race.soul_eater?3:5)).toFixed(2);a.push(c,e.resource.Lumber.name)}let s="civics_garrison_soldier_loot"+a.length/2,n=e.race.evil&&e.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc";return t(n)+t(s,a)}function zn(r){if(e.civic.foreign[`gov${r}`].occ)return t("civics_garrison_deoccupy_desc");if(e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)return t("civics_garrison_secede_desc");if(e.civic.garrison.tactic<=1&&e.civic.foreign[`gov${r}`].spy<1||e.civic.garrison.tactic>=2&&e.civic.garrison.tactic<=3&&e.civic.foreign[`gov${r}`].spy<2||e.civic.garrison.tactic===4&&e.civic.foreign[`gov${r}`].spy<3)return t("civics_garrison_no_spy");let a=mt(e.civic.garrison.raid,"army"),i=0;switch(e.civic.garrison.tactic){case 0:i=5;break;case 1:i=27.5;break;case 2:i=62.5;break;case 3:i=125;break;case 4:i=300;break}return i*=e.civic.foreign[`gov${r}`].mil/100,e.race.banana&&(i*=2),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[0]),Ve("fool",2021)&&(i/=1.25),aWe()?e.civic.garrison.raid=We():e.civic.garrison.raid<0&&(e.civic.garrison.raid=0),e.civic.garrison.raid===0){I(t("civics_garrison_campaign_no_soldier"),"warning",!1,["combat"]);return}e.stats.attacks++;let a=e.race.claws?20:16,i=e.race.puny?3:5,s=Math.floor(J(i,a,!0))/10,n=mt(e.civic.garrison.raid,"army")*s,c=0;switch(e.civic.garrison.tactic){case 0:c=J(0,10,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(0,2,!0));break;case 1:c=J(5,50,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(0,3,!0));break;case 2:c=J(25,100,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(1,5,!0));break;case 3:c=J(50,200,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(4,12,!0));break;case 4:c=J(100,500,!0),e.civic.foreign[`gov${r}`].hstl+=Math.floor(J(10,25,!0));break}c=Math.floor(c*e.civic.foreign[`gov${r}`].mil/100),e.race.banana&&(c*=2),e.city.biome==="swamp"&&(c*=qe.swamp.vars()[0]),e.race.mistrustful&&(e.civic.foreign[`gov${r}`].hstl+=b.mistrustful.vars()[0]),e.civic.foreign[`gov${r}`].hstl>100&&(e.civic.foreign[`gov${r}`].hstl=100),e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.ceil(c/5),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let l=0;if(e.civic.garrison.raid>e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded&&(l=e.civic.garrison.raid-(e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded)),e.civic.garrison.fatigue++,n>c){let o=Math.floor(e.civic.garrison.raid/(5-e.civic.garrison.tactic));o+=l,e.city.ptrait.includes("rage")&&(o+=Re.rage.vars()[2]),o<1&&(o=1),o>os()&&(o=os());let d=Math.floor(J(0,o,!0));e.race.frail&&(d+=b.frail.vars()[0]);let h=0;if(e.race.scales&&(h+=b.scales.vars()[0]),e.tech.armor&&(h+=e.tech.armor),e.race.high_pop&&(h+=Math.floor(J(0,h*b.high_pop.vars()[0],!0))),e.race.armored){let Y=b.armored.vars()[0]/100;h+=Math.floor(d*Y)}let _=ve("tortoisan");if(_>0){let Y=b.armored.vars(1)[0]/100*_;h+=Math.floor(d*Y)}if(e.civic.garrison.raid>l&&(d-=h),d<0&&(d=0),d>e.civic.garrison.raid&&(d=e.civic.garrison.raid),e.race.instinct){let Y=Math.floor(d*(b.instinct.vars()[1]/100));d-=Y,l+=Y}e.civic.garrison.workers-=d,e.stats.died+=d,e.civic.garrison.protest+=d,d>l?(e.civic.garrison.wounded-=l,l=0):(e.civic.garrison.wounded-=d,l-=d),e.civic.garrison.wounded+=Math.floor(J(l,e.civic.garrison.raid-d,!0));let m={Money:0,Food:0,Lumber:0,Stone:0,Copper:0,Iron:0,Aluminium:0,Coal:0,Cement:0,Steel:0,Titanium:0,Crystal:0,Chrysotile:0,Furs:0,Iridium:0,Alloy:0,Polymer:0,Oil:0},w=r===3&&e.race.truepath?["Food","Lumber","Stone","Copper","Iron"]:["Food","Lumber","Stone"],M=r===3&&e.race.truepath?["Aluminium","Coal","Cement","Steel","Furs"]:["Copper","Iron","Aluminium","Coal"],F=r===3&&e.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];e.race.artifical&&w.shift(),e.race.smoldering&&w.push("Chrysotile"),e.race.terrifying&&r!==3&&F.push("Titanium"),e.tech.magic&&F.push("Crystal");let x=["Money"];switch(e.civic.garrison.tactic){case 0:{let Y=["Money"].concat(w,M);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))]),e.resource.Steel.amount<25&&e.tech.smelting&&e.tech.smelting===1&&Math.floor(J(0,20,!0))===0&&x.push("Steel")}break;case 1:{let Y=["Money"].concat(w,M,F);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 2:{let Y=["Money"].concat(w,M,F),Ge=M.concat(F);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),x.push(Ge[Math.floor(J(0,Ge.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 3:{let Y=["Money"].concat(w,M,F);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(F[Math.floor(J(0,F.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break;case 4:{let Y=["Money"].concat(w,M,F);x.push(w[Math.floor(J(0,w.length,!0))]),x.push(M[Math.floor(J(0,M.length,!0))]),x.push(F[Math.floor(J(0,F.length,!0))]),x.push(Y[Math.floor(J(0,Y.length,!0))]),e.race.beast_of_burden&&x.push(Y[Math.floor(J(0,Y.length,!0))])}break}let j=e.race.terrifying&&r!==3?b.terrifying.vars()[0]:12,B=e.race.terrifying&&r!==3?b.terrifying.vars()[1]:32;x.forEach(function(Y){switch(Y){case"Money":m[Y]+=Math.floor(J(100,375,!0));break;case"Food":m[Y]+=Math.floor(J(40,175,!0));break;case"Lumber":case"Stone":m[Y]+=Math.floor(J(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":m[Y]+=Math.floor(J(35,125,!0));break;case"Coal":case"Cement":m[Y]+=Math.floor(J(25,100,!0));break;case"Steel":case"Chrysotile":m[Y]+=Math.floor(J(20,65,!0));break;case"Titanium":m[Y]+=Math.floor(J(j,B,!0));break;case"Crystal":m[Y]+=Math.floor(J(1,5,!0));break;case"Oil":m[Y]+=Math.floor(J(20,50,!0));break;case"Iridium":m[Y]+=Math.floor(J(2,30,!0));break;case"Alloy":case"Polymer":m[Y]+=Math.floor(J(5,38,!0));break}});let S=t("civics_garrison_gained");e.resource.Money.display&&m.Money>0&&(m.Money=_o(m.Money,r),S=S+t("civics_garrison_quant_money",[m.Money]),L("Money",m.Money)),w.concat(M,F).forEach(function(Y){m[Y]>0&&(e.resource[Y].display||Y==="Steel"||Y==="Titanium")&&(m[Y]=_o(m[Y],r),S=S+t("civics_garrison_quant_res",[m[Y],e.resource[Y].name]),L(Y,m[Y]),(Y==="Steel"||Y==="Titanium")&&(e.resource[Y].display=!0))}),S=S.slice(0,-2),S=S+".",I(S,"warning",!1,["combat"]);let V=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[0]),!0));break;case 1:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[1]),!0));break;case 2:V=Math.floor(J(0,Math.floor(d/b.revive.vars()[2]),!0));break}e.civic.garrison.workers+=V}if(V>0?I(t("civics_garrison_victorious_revive",[d,V]),"success",!1,["combat"]):I(t("civics_garrison_victorious",[d]),"success",!1,["combat"]),e.race.slaver&&e.city.slave_pen){let Y=e.city.slave_pen.count*4;if(Y>e.resource.Slave.amount){let Ge=Math.floor(J(0,e.civic.garrison.tactic+2,!0));Ge+e.resource.Slave.amount>Y&&(Ge=Y-e.resource.Slave.amount),Ge>0&&(e.resource.Slave.amount+=Ge,I(t("civics_garrison_capture",[Ge]),"success",!1,["combat"]))}}if(e.race.infectious){let Y=0;switch(e.civic.garrison.tactic){case 0:Y=Math.floor(J(0,b.infectious.vars()[0],!0));break;case 1:Y=Math.floor(J(0,b.infectious.vars()[1],!0));break;case 2:Y=Math.floor(J(0,b.infectious.vars()[2],!0));break;case 3:Y=Math.floor(J(0,b.infectious.vars()[3],!0));break;case 4:Y=Math.floor(J(0,b.infectious.vars()[4],!0));break}e.resource[e.race.species].amount+Y>e.resource[e.race.species].max&&(Y=e.resource[e.race.species].max-e.resource[e.race.species].amount),Y>0&&(e.resource[e.race.species].amount+=Y,e.civic.d_job!=="unemployed"&&(e.civic[e.civic.d_job].workers+=Y),Y===1?I(t("civics_garrison_soldier_infected"),"special",!1,["combat"]):I(t("civics_garrison_soldiers_infected",[Y]),"special",!1,["combat"]))}let ce=N(e.civic.govern.type==="federation"?15:20);if(r<=2&&e.civic.garrison.tactic===4&&e.civic.garrison.workers>=ce){let Y=!e.tech.gov_fed&&!_r();if(e.civic.garrison.workers-=ce,e.civic.foreign[`gov${r}`].occ=!0,e.civic.foreign[`gov${r}`].sab=0,e.civic.foreign[`gov${r}`].act="none",Y&&ue(),e.race.banana){let Ge=ot();e.stats.banana.b1[Ge]=!0,Ge!=="m"&&Ge!=="l"&&(e.stats.banana.b1.l=!0)}}}else{let o=e.civic.garrison.raid;o+=l,e.civic.garrison.tactic===0&&(o=Math.floor(o/2)),e.city.ptrait.includes("rage")&&(o+=Re.rage.vars()[2]),o<1&&(o=1),o>os()&&(o=os());let d=Math.floor(J(1,o,!0));e.race.frail&&(d+=e.civic.garrison.tactic+b.frail.vars()[1]);let h=0;if(e.race.scales&&(h+=b.scales.vars()[1]),e.tech.armor&&(h+=e.tech.armor),e.race.high_pop&&(h+=Math.floor(J(0,Math.floor(h*b.high_pop.vars()[0]/2),!0))),e.race.armored){let w=b.armored.vars()[0]/100;h+=Math.floor(d*w)}let _=ve("tortoisan");if(_>0){let w=b.armored.vars(1)[0]/100*_;h+=Math.floor(d*w)}if(e.civic.garrison.raid>l&&(d-=h),e.race.instinct){let w=Math.floor(d*(b.instinct.vars()[1]/100));d-=w,l+=w}d<1&&(d=1),d>e.civic.garrison.raid&&(d=e.civic.garrison.raid),e.civic.garrison.workers-=d,e.stats.died+=d,e.civic.garrison.protest+=d,d>l?(e.civic.garrison.wounded-=l,l=0):(e.civic.garrison.wounded-=d,l-=d),e.civic.garrison.wounded+=1+Math.floor(J(l,e.civic.garrison.raid-d,!0));let m=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[3]),!0));break;case 1:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[4]),!0));break;case 2:m=Math.floor(J(0,Math.floor(d/b.revive.vars()[5]),!0));break}e.civic.garrison.workers+=m}m>0?I(t("civics_garrison_defeat_revive",[d,m]),"danger",!1,["combat"]):I(t("civics_garrison_defeat",[d]),"danger",!1,["combat"])}e.civic.garrison.wounded>e.civic.garrison.workers-e.civic.garrison.crew?e.civic.garrison.wounded=e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.wounded<0&&(e.civic.garrison.wounded=0)}function os(){let r=0,a=e.civic.garrison.raid;switch(e.civic.garrison.tactic){case 0:r=5;break;case 1:r=10;break;case 2:r=25;break;case 3:r=50;break;case 4:r=999;break}return e.race.high_pop&&(r=N(r)),a>r&&(a=r),a}function _o(r,a){let i=os();e.race.high_pop&&(i=i/N(1));let s=r*Math.log(i+1);switch(e.race.invertebrate&&(s*=1-b.invertebrate.vars()[0]/100),e.race.universe==="evil"&&(s*=ft("evil")),e.race.gravity_well&&(s*=1-.75*ft("heavy")),e.civic.garrison.tactic){case 1:s*=4;break;case 2:s*=30;break;case 3:s*=100;break;case 4:s*=400;break}return e.race.banana&&(s*=.5),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[1]),Math.floor(s*e.civic.foreign[`gov${a}`].eco/100)}function ti(){let r=e.tech.military?e.tech.military>=5?e.tech.military-1:e.tech.military:1;if(e.tech.military&&e.tech.military>1){r-=e.tech.military>=11?2:1,e.race.sniper&&(r*=1+b.sniper.vars()[0]/100*r);let a=ve("centaur");a>0&&(r*=1+b.sniper.vars(1)[0]/100*r*a),r+=e.tech.military>=11?2:1}return r}function mt(r,a,i){if(!e.civic.hasOwnProperty("garrison"))return 1;let s=0;typeof i=="number"?s=i:r>e.civic.garrison.workers-e.civic.garrison.wounded&&(s=r-(e.civic.garrison.workers-e.civic.garrison.wounded));let n=ti(),c=ve("rhinotaur"),l=r-s/2;if(e.race.rage||c>0){let d=e.race.rage?s*b.rage.vars()[1]/100:0,h=c>0?s*b.rage.vars(1)[1]/100*c:0;l=r+d+h}let o=e.tech.military?l*n:l;if(a==="army"||a==="hellArmy"){e.race.rage&&(o*=1+b.rage.vars()[0]/100*(e.civic.garrison.wounded||0)),c>0&&(o*=1+b.rage.vars(1)[0]/100*c*(e.civic.garrison.wounded||0)),e.race.puny&&(o*=1-b.puny.vars()[0]/100),e.race.claws&&(o*=1+b.claws.vars()[0]/100);let d=ve("scorpid");d>0&&(o*=1+b.claws.vars(1)[0]/100*d),e.race.chameleon&&(o*=1+b.chameleon.vars()[0]/100),e.race.cautious&&e.city.calendar.weather===0&&(o*=1-b.cautious.vars()[0]/100),e.race.apex_predator&&(o*=1+b.apex_predator.vars()[0]/100);let h=ve("sharkin");h>0&&(o*=1+b.apex_predator.vars(1)[0]/100*h),e.race.swift&&(o*=1+b.swift.vars()[0]/100),e.race.fiery&&(o*=1+b.fiery.vars()[0]/100);let _=ve("balorg");_>0&&(o*=1+b.fiery.vars(1)[0]/100*_),e.race.sticky&&(o*=1+b.sticky.vars()[1]/100);let m=ve("pinguicula");m>0&&(o*=1+b.sticky.vars(1)[1]/100*m),e.race.pathetic&&(o*=1-b.pathetic.vars()[0]/100),e.race.tactical&&(o*=1+b.tactical.vars()[0]*e.race.tactical/100),e.tech.fanaticism&&e.tech.fanaticism>=4&&(o*=1+e.city.temple.count*.01),e.race.holy&&a==="hellArmy"&&(o*=1+b.holy.vars()[0]/100);let w=ve("unicorn");w>0&&a==="hellArmy"&&(o*=1+b.holy.vars(1)[0]/100*w),e.race.banana&&a==="hellArmy"&&(o*=.8),ma()==="aries"&&(o*=1+Zt("aries")[0]/100);let M=ge("tactician",0);if(M&&(o*=1+M/100),e.city.ptrait.includes("rage")&&(o*=Re.rage.vars()[0]),e.race.parasite&&(r===1?o+=2:r>1&&(o+=4)),e.tech.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("assaultTime")){let F=0;if(e.race.psychicPowers.assaultTime>0&&(F+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let x=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;F+=+(b.psychic.vars()[3]/5e4*x*e.race.psychicPowers.channel.assault).toFixed(3)}o*=1+F}}return a==="hunting"&&e.race.unfathomable&&(o*=.66),e.race.rejuvenated&&(o*=1.05),e.civic.govern.type==="autocracy"&&(o*=1+$e.autocracy()[1]/100),o=Math.floor(o),o*$t(r,a)}function We(r,a){if(!e.civic.garrison)return 0;let i=r?"max":"workers",s=e.portal.fortress?e.portal.fortress.garrison:0,n=e.space.fob&&!a?e.space.fob.troops:0;return e.civic.garrison[i]-e.civic.garrison.crew-s-n}function tu(){if(e.race.sludge)return!1;if($("#mad").length===0){let i=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");var r=$('
');$("#military").append(r);var a=$('
');r.append(a),a.append($(`
${t("civics_mad_reset_desc",[i])}
`));let s=!!(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt));a.append($(`
`)),a.append($(`
`)),e.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),D({el:"#mad",data:e.civic.mad,methods:{launch(){if(!e.civic.mad.armed&&!e.race.cataclysm){$("body").addClass("nuke");let n=$('
');$("body").append(n),setTimeout(function(){n.addClass("burn")},500),setTimeout(function(){n.addClass("b")},600),setTimeout(function(){Yc()},4e3)}},arm(){e.civic.mad.armed?($("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles")),e.civic.mad.armed=!1,$("#mad").addClass("armed")):($("#mad .arm").html(t(s?"civics_mad_arm_grenades":"civics_mad_arm_missiles")),e.civic.mad.armed=!0,$("#mad").removeClass("armed"))}}}),["mdarm","mdlaunch"].forEach(function(n){pe(`mad${n}`,function(){return"{{ label() }}"},{elm:`#mad .${n}`,in:function(c){D({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){switch(n){case"mdarm":return e.tech.world_control&&!e.race.truepath?t("civics_mad_missiles_world_control_desc"):t(s?"civics_mad_missiles_desc_easter":"civics_mad_missiles_desc");case"mdlaunch":{let l=ct("mad"),o=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return t("civics_mad_missiles_warning",[l.plasmid,o])}}}}})},out:function(c){D({el:`#${c.id} > span`},"destroy")}})})}}function xe(r){return e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r}function Xe(r){if(e.race.gravity_well&&e.race.teamster&&e.race.teamster>0){let a=En(),i=e.civic.teamster.workers>a?a:e.civic.teamster.workers;r*=i/a}return r}function T(r,a){switch(r){case"transmitter":return 2.5;case"oil_well":{let i=e.tech.oil>=4?.48:.4;e.tech.oil>=7?i*=2:e.tech.oil>=5&&(i*=e.tech.oil>=6?1.75:1.25),e.city.geology.Oil&&(i*=e.city.geology.Oil+1),e.city.biome==="desert"?i*=qe.desert.vars()[1]:e.city.biome==="tundra"?i*=qe.tundra.vars()[1]:e.city.biome==="taiga"&&(i*=qe.taiga.vars()[2]);let s=ge("dirty_jobs",2);return s&&(i*=1+s/100),i}case"iridium_mine":switch(a){case"iridium":{let i=.035;e.city.geology.Iridium&&(i*=e.city.geology.Iridium+1);let s=i,n=ds(3);return{b:s,g:n-1,f:s*n}}case"coal":return .55}case"helium_mine":{let i=.18,s=ds(3);return{b:i,g:s-1,f:i*s}}case"red_mine":switch(a){case"copper":{let i=xe(.25),s=ds(3);return{b:i,g:s-1,f:i*s}}case"titanium":{let i=xe(.02),s=ds(3);return{b:i,g:s-1,f:i*s}}case"stone":return xe(.75);case"asbestos":return xe(1.25);case"aluminium":return xe(.066)}case"biodome":switch(a){case"food":return xe(.25);case"cat_food":return 2;case"lumber":return xe(1.5)}case"gas_mining":return e.tech.helium?.65:.5;case"outpost":{let i={b:.025,d:0,n:0};if(e.tech.drone){let s=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?.12:.06;i.d=e.space.drone.count*s,i.n=i.b*(1+i.d)}else i.n=i.b;return a?i:i.n}case"oil_extractor":{let i=e.tech.oil>=4?.48:.4;return e.tech.oil>=7?i*=2:e.tech.oil>=5&&(i*=e.tech.oil>=6?1.75:1.25),i}case"elerium_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?.009:.0075:.005;case"iridium_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?.1:.08:.055;case"iron_ship":return e.tech.asteroid>=6?e.tech.asteroid>=7?4:3:2;case"g_factory":if(e.race.truepath){if(e.tech.isolation)return 1.8;{let s=.05*(k.ai_colonist?e.civic.titan_colonist.workers+N(k.ai_colonist):e.civic.titan_colonist.workers);return e.race.high_pop&&(s=xe(s)),s}}else return .6;case"harvester":switch(a){case"helium":return .85;case"deuterium":return .15}case"elerium_prospector":return .014;case"neutron_miner":return .055;case"bolognium_ship":return .008;case"excavator":return .2;case"vitreloy_plant":{let i=.18;return e.civic.govern.type==="corpocracy"&&(i*=e.tech.high_tech&&e.tech.high_tech>=16?1.4:1.3),e.civic.govern.type==="socialist"&&(i*=1.1),i}case"infernite_mine":return .5*Nr("gate").supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return xe(.02)*(e.space.titan_mine?e.space.titan_mine.ratio:50)/100;case"aluminium":return xe(.12)*(100-(e.space.titan_mine?e.space.titan_mine.ratio:50))/100}case"lander":return e.space.crashed_ship.count===100?.005:0;case"orichalcum_mine":return .08;case"uranium_mine":return .025;case"neutronium_mine":return .04;case"elerium_mine":return .009;case"shock_trooper":return e.space.digsite.count===100?.0018:0;case"tank":return e.space.digsite.count===100?.0018:0;case"mining_pit":{let i=0;switch(a){case"materials":{i=e.tech.isolation?.12:.09;break}case"bolognium":{i=e.tech.isolation?.0288:.0216;break}case"stone":{i=e.tech.isolation?.8:.6;break}case"adamantite":{i=e.tech.isolation?.448:.336;break}case"copper":{i=.58;break}case"coal":{i=.13;break}case"iron":{i=.74;break}case"aluminium":{i=.88;break}case"chrysotile":{i=1.44;break}}e.race.tough&&(i*=1+b.tough.vars()[0]/100);let s=ve("ogre");return s>0&&(i*=1+b.tough.vars(1)[0]/100*s),e.tech.tau_pit_mining&&(i*=1.18),i}case"tau_farm":switch(a){case"food":return e.tech.isolation?15:9;case"lumber":return e.tech.isolation?12:5.5;case"water":return .35}case"womling_mine":{let i=1;switch(e.tech.womling_mining&&(i+=e.tech.womling_mining*.15),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&(i*=1.1),e.tech.womling_gene&&(i*=1.25),a){case"unobtainium":return .0305*i;case"uranium":return .047*i;case"titanium":return .616*i;case"copper":return 1.191*i;case"iron":return 1.377*i;case"aluminium":return 1.544*i;case"neutronium":return .382*i;case"iridium":return .535*i}}case"refueling_station":return e.tech.isolation?18.5:9.35;case"ore_refinery":return e.tech.tau_ore_mining?40:25;case"whaling_station":return 12;case"mining_ship":{if(e.tauceti.patrol_ship){let i=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(i=tt("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),(e.tech.tau_ore_mining&&e.tech.tau_ore_mining>=2?12:10)*i}return 0}case"mining_ship_ore":switch(a){case"iron":return e.tech.isolation?2.22:1.85;case"aluminium":return e.tech.isolation?2.22:1.85;case"iridium":return e.tech.isolation?.42:.35;case"neutronium":return e.tech.isolation?.42:.35;case"orichalcum":return e.tech.isolation?.3:.25;case"elerium":return e.tech.isolation?.024:.02}case"whaling_ship":{if(e.tauceti.patrol_ship){let i=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(i=tt("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),8*i}return 0}case"whaling_ship_oil":return e.tech.isolation?.78:.42;case"alien_outpost":return .01;case"psychic_boost":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.boost.r===a&&e.race.psychicPowers.hasOwnProperty("boostTime")){let i=0;if(e.race.psychicPowers.boostTime>0&&(i+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;i+=+(b.psychic.vars()[3]/5e4*s*e.race.psychicPowers.channel.boost).toFixed(3)}return 1+i}return 1}case"psychic_cash":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("cash")){let i=0;if(e.race.psychicPowers.cash>0&&(i+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;i+=+(b.psychic.vars()[3]/5e4*s*e.race.psychicPowers.channel.cash).toFixed(3)}return 1+i}return 1}}}function Ue(r){switch(r){case"Physics":xo();break;case"Genetics":Ga();break;case"Monument":return $o();case"PhysicsTech":return gt;case"GeneTech":return yo;case"BloodTech":return ru;case"Crispr":ko();break;case"Blood":Nn();break}}var gt={lhc:{title(){return Ve("fool",2022)?t("arpa_projects_railway_title"):t("arpa_projects_lhc_title")},desc(){return Ve("fool",2022)?t("arpa_projects_railway_desc"):t("arpa_projects_lhc_desc")},reqs:{high_tech:6},grant:"supercollider",effect(r){if(Ve("fool",2022)&&!r)return gt.railway.effect(!0);let a=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?e.race.cataclysm?20:8:e.race.cataclysm?10:4;return e.tech.storage>=6?e.tech.particles&&e.tech.particles>=4?e.race.cataclysm?t("arpa_projects_lhc_cataclysm3",[a]):t("arpa_projects_lhc_effect3",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm2",[a]):t("arpa_projects_lhc_effect2",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm1",[a]):e.tech.isolation?t("arpa_projects_lhc_iso1",[a,t("tech_infectious_disease_lab_alt")]):t("arpa_projects_lhc_effect1",[a,e.race.orbit_decayed?t("space_home_satellite_title"):dr()])},cost:{Money(r,a){return Ze("lhc",r,25e5,1.05,a)},Knowledge(r,a){return Ze("lhc",r,5e5,1.05,a)},Copper(r,a){return Ze("lhc",r,125e3,1.05,a)},Cement(r,a){return Ze("lhc",r,25e4,1.05,a)},Aluminium(r,a){return Ze("lhc",r,35e4,1.05,a)},Titanium(r,a){return Ze("lhc",r,5e4,1.05,a)},Polymer(r,a){return Ze("lhc",r,12e3,1.05,a)}}},stock_exchange:{title:t("arpa_projects_stock_exchange_title"),desc:t("arpa_projects_stock_exchange_desc"),reqs:{banking:9},grant:"stock_exchange",effect(){return e.tech.banking>=10?e.race.cataclysm?e.tech.gambling&&e.tech.gambling>=4?t("arpa_projects_stock_exchange_cataclysm2"):t("arpa_projects_stock_exchange_cataclysm1"):e.tech.gambling&&e.tech.gambling>=4?t("arpa_projects_stock_exchange_effect3"):t("arpa_projects_stock_exchange_effect2"):t("arpa_projects_stock_exchange_effect1")},cost:{Money(r,a){return Ze("stock_exchange",r,3e6,1.06,a)},Plywood(r,a){return Ze("stock_exchange",r,25e3,1.06,a)},Brick(r,a){return Ze("stock_exchange",r,2e4,1.06,a)},Wrought_Iron(r,a){return Ze("stock_exchange",r,1e4,1.06,a)}}},tp_depot:{title:t("galaxy_gateway_depot"),desc:t("arpa_projects_depot_desc"),reqs:{high_tech:6,storage:4},grant:"tp_depot",path:["truepath"],effect(){return t(e.tech.isolation?"arpa_projects_depot_effect_iso":"arpa_projects_depot_effect",[5,50])},cost:{Money(r,a){return Ze("tp_depot",r,18e5,1.08,a)},Stone(r,a){return Ze("tp_depot",r,75e4,1.08,a)},Iron(r,a){return Ze("tp_depot",r,25e4,1.08,a)},Alloy(r,a){return Ze("tp_depot",r,3e4,1.08,a)}}},launch_facility:{id:"arpalaunch_facility",title:t("arpa_projects_launch_facility_title"),desc:t("arpa_projects_launch_facility_desc"),reqs:{high_tech:7},condition(){return!(e.race.cataclysm||e.race.lone_survivor)},grant:"launch_facility",rank:1,queue_complete(){return e.tech.space>=1?0:1},effect(){return t("arpa_projects_launch_facility_effect1")},cost:{Money(r){return Ze("launch_facility",r,2e6,1.1)},Knowledge(r){return Ze("launch_facility",r,5e5,1.1)},Cement(r){return Ze("launch_facility",r,15e4,1.1)},Oil(r){return Ze("launch_facility",r,2e4,1.1)},Sheet_Metal(r){return Ze("launch_facility",r,15e3,1.1)},Alloy(r){return Ze("launch_facility",r,25e3,1.1)}}},monument:{title(r){if(r)return t("arpa_project_monument_title");switch(e.arpa.m_type){case"Obelisk":return t("arpa_project_monument_obelisk");case"Statue":return t("arpa_project_monument_statue");case"Sculpture":return t("arpa_project_monument_sculpture");case"Monolith":return t("arpa_project_monument_monolith");case"Pillar":return t("arpa_project_monument_pillar");case"Megalith":return t("arpa_project_monument_megalith")}},desc:t("arpa_projects_monument_desc"),reqs:{monument:1},grant:"monuments",effect(){let r=ge("gaslighter",2),a=r?2-r:2;return t("arpa_projects_monument_effect1",[a])},cost:{Stone(r,a){return Li("Stone",r,a)},Aluminium(r,a){return Li("Aluminium",r,a)},Cement(r,a){return Li("Cement",r,a)},Steel(r,a){return Li("Steel",r,a)},Lumber(r,a){return Li("Lumber",r,a)},Crystal(r,a){return Li("Crystal",r,a)}}},railway:{title(){return Ve("fool",2022)?t("arpa_projects_lhc_title"):t("arpa_projects_railway_title")},desc(){return Ve("fool",2022)?t("arpa_projects_lhc_desc"):t("arpa_projects_railway_desc")},reqs:{high_tech:6,trade:3},grant:"railway",effect(r){if(Ve("fool",2022)&&!r)return gt.lhc.effect(!0);let a=e.stats.achieve.banana&&e.stats.achieve.banana.l>=2?1:0,i=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?3:2;return e.race.cataclysm||e.race.orbit_decayed?(a+=e.space.gps?Math.floor(e.space.gps.count/3):0,t("arpa_projects_railway_cataclysm1",[a,i,3,1])):(a+=e.city.storage_yard?Math.floor(e.city.storage_yard.count/6):0,t("arpa_projects_railway_effect1",[a,i,6,1]))},cost:{Money(r,a){return Ze("railway",r,25e5,1.08,a)},Lumber(r,a){return Ze("railway",r,75e4,1.08,a)},Iron(r,a){return Ze("railway",r,3e5,1.08,a)},Steel(r,a){return Ze("railway",r,45e4,1.08,a)}}},roid_eject:{title(){return t("arpa_projects_roid_eject_title",[In()])},desc(){return t(e.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[In()])},reqs:{blackhole:6,gateway:3},grant:"roid_eject",effect(){let r=0,a=0;return e.tech.roid_eject&&(r+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12),a=.225*(e.tech.roid_eject+1)*(1+(e.tech.roid_eject+1)/12)-r),`
${t("arpa_projects_roid_eject_effect1")}
${t("arpa_projects_roid_eject_effect2",[+r.toFixed(3),+a.toFixed(3),In()])}
`},cost:{Money(r,a){return Ze("roid_eject",r,1875e4,1.075,a)},Deuterium(r,a){return Ze("roid_eject",r,375e3,1.075,a)},Bolognium(r,a){return Ze("roid_eject",r,15e3,1.075,a)}}},nexus:{title:t("arpa_projects_nexus_title"),desc:t("arpa_projects_nexus_desc"),reqs:{magic:5},grant:"nexus",effect(){return e.tech.roguemagic&&e.tech.roguemagic>=7?`
${t("arpa_projects_nexus_effect1",[5])}
${t("witch_hunter_nexus",[8])}
`:t("arpa_projects_nexus_effect1",[5])},cost:{Money(r,a){return Ze("nexus",r,5e6,1.12,a)},Crystal(r,a){return Ze("nexus",r,6e4,1.12,a)},Iridium(r,a){return Ze("nexus",r,35e3,1.12,a)}}},syphon:{title:t("arpa_syphon_title"),desc(){let r="";return e.tech.syphon&&e.tech.syphon>=0?r=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn2")}
`:r=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn1")}
`,e.race.witch_hunter&&(r+=`
${t("witch_hunter_suspicion")}
`),r},reqs:{veil:2},grant:"syphon",effect(){let r=+(.3333333333333333*ft("magic")).toFixed(3);if(e.tech.syphon&&e.tech.syphon>=60){let a=ct("vacuum"),i=t("resource_Plasmid_plural_name");return`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect4")}
${t("arpa_syphon_effect_reward",[a.plasmid,a.phage,a.dark,i,80])}
`}else return e.tech.syphon&&e.tech.syphon>=40?`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect3")}
`:e.tech.syphon&&e.tech.syphon>=20?`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect2")}
`:`
${t("arpa_syphon_effect_main",[r])}
${t("arpa_syphon_effect1")}
`},cost:{Money(r,a){return Ze("syphon",r,75e5,1.025,a)},Mana(r,a){return Ze("syphon",r,5e3,1.025,a)},Crystal(r,a){return Ze("syphon",r,1e5,1.025,a)},Infernite(r,a){return Ze("syphon",r,1e4,1.025,a)}}}};function In(){return!e.tech.roid_eject||e.tech.roid_eject<=10?t("arpa_projects_roid_eject_asteroid"):e.tech.roid_eject<=25?t("arpa_projects_roid_eject_moon"):e.tech.roid_eject<=40?t("arpa_projects_roid_eject_dwarf"):e.tech.roid_eject<=60?t("arpa_projects_roid_eject_planet"):t("arpa_projects_roid_eject_remnant")}var yo={genetic_memory:{id:"genes-genetic_memory",title:t("arpa_genepool_genetic_memory_title"),desc:t("arpa_genepool_genetic_memory_desc"),reqs:{},grant:["creep",1],cost:{Plasmid(){return 25}},action(){return!!Ne("genetic_memory")}},animus:{id:"genes-animus",title:t("arpa_genepool_animus_title"),desc:t("arpa_genepool_animus_desc"),reqs:{creep:1},grant:["creep",2],cost:{Plasmid(){return 75}},action(){return!!Ne("animus")}},divine_remembrance:{id:"genes-divine_remembrance",title:t("arpa_genepool_divine_remembrance_title"),desc:t("arpa_genepool_divine_remembrance_desc"),reqs:{creep:2},grant:["creep",3],cost:{Plasmid(){return 225}},action(){return!!Ne("divine_remembrance")}},divine_proportion:{id:"genes-divine_proportion",title:t("arpa_genepool_divine_proportion_title"),desc:t("arpa_genepool_divine_proportion_desc"),reqs:{creep:3},grant:["creep",4],cost:{Plasmid(){return 618}},action(){return!!Ne("divine_proportion")}},genetic_repository:{id:"genes-genetic_repository",title:t("arpa_genepool_genetic_repository_title"),desc:t("arpa_genepool_genetic_repository_desc"),reqs:{creep:4},grant:["creep",5],cost:{Plasmid(){return 999}},action(){return!!Ne("genetic_repository")}},spatial_reasoning:{id:"genes-spatial_reasoning",title:t("arpa_genepool_spatial_reasoning_title"),desc:t("arpa_genepool_spatial_reasoning_desc"),reqs:{},grant:["store",1],cost:{Plasmid(){return 50}},action(){return!!Ne("spatial_reasoning")}},spatial_superiority:{id:"genes-spatial_superiority",title:t("arpa_genepool_spatial_superiority_title"),desc:t("arpa_genepool_spatial_superiority_desc"),reqs:{store:1},grant:["store",2],cost:{Plasmid(){return 125}},action(){return!!Ne("spatial_superiority")}},spatial_supremacy:{id:"genes-spatial_supremacy",title:t("arpa_genepool_spatial_supremacy_title"),desc:t("arpa_genepool_spatial_supremacy_desc"),reqs:{store:2},grant:["store",3],cost:{Plasmid(){return 325}},action(){return!!Ne("spatial_supremacy")}},dimensional_warping:{id:"genes-dimensional_warping",title:t("arpa_genepool_dimensional_warping_title"),desc:t("arpa_genepool_dimensional_warping_desc"),reqs:{store:3},grant:["store",4],cost:{Plasmid(){return 500}},action(){return!!Ne("dimensional_warping")}},enhanced_muscle_fiber:{id:"genes-enhanced_muscle_fiber",title:t("arpa_genepool_enhanced_muscle_fiber_title"),desc:t("arpa_genepool_enhanced_muscle_fiber_desc"),reqs:{},grant:["enhance",1],cost:{Plasmid(){return 25}},action(){return!!Ne("enhanced_muscle_fiber")}},morphogenesis:{id:"genes-morphogenesis",title:t("arpa_genepool_morphogenesis_title"),desc:t("arpa_genepool_morphogenesis_desc"),reqs:{},grant:["evolve",1],cost:{Plasmid(){return 10}},action(){return!!Ne("morphogenesis")}},recombination:{id:"genes-recombination",title:t("arpa_genepool_recombination_title"),desc:t("arpa_genepool_recombination_desc"),reqs:{evolve:1},grant:["evolve",2],cost:{Plasmid(){return 35}},action(){return!!Ne("recombination")}},homologous_recombination:{id:"genes-homologous_recombination",title:t("arpa_genepool_homologous_recombination_title"),desc:t("arpa_genepool_homologous_recombination_desc"),reqs:{evolve:2},grant:["evolve",3],cost:{Plasmid(){return 70}},action(){return!!Ne("homologous_recombination")}},genetic_reshuffling:{id:"genes-genetic_reshuffling",title:t("arpa_genepool_genetic_reshuffling_title"),desc:t("arpa_genepool_genetic_reshuffling_desc"),reqs:{evolve:3},grant:["evolve",4],cost:{Plasmid(){return 175}},action(){return!!Ne("genetic_reshuffling")}},recombinant_dna:{id:"genes-recombinant_dna",title:t("arpa_genepool_recombinant_dna_title"),desc:t("arpa_genepool_recombinant_dna_desc"),reqs:{evolve:4},grant:["evolve",5],cost:{Plasmid(){return 440}},action(){return!!Ne("recombinant_dna")}},chimeric_dna:{id:"genes-chimeric_dna",title:t("arpa_genepool_chimeric_dna_title"),desc:t("arpa_genepool_chimeric_dna_desc"),reqs:{evolve:5},grant:["evolve",6],cost:{Plasmid(){return 1100}},action(){return!!Ne("chimeric_dna")}},molecular_cloning:{id:"genes-molecular_cloning",title:t("arpa_genepool_molecular_cloning_title"),desc:t("arpa_genepool_molecular_cloning_desc"),reqs:{evolve:6},grant:["evolve",7],cost:{Plasmid(){return 2750}},action(){return!!Ne("molecular_cloning")}},transgenes:{id:"genes-transgenes",title:t("arpa_genepool_transgenes_title"),desc:t("arpa_genepool_transgenes_desc"),reqs:{evolve:7},grant:["evolve",8],cost:{Plasmid(){return 6875}},action(){return!!Ne("transgenes")}},synthesis:{id:"genes-synthesis",title:t("arpa_genepool_synthesis_title"),desc:t("arpa_genepool_synthesis_desc",[2,10]),reqs:{evolve:1},grant:["synthesis",1],cost:{Plasmid(){return 25}},action(){return!!Ne("synthesis")}},karyokinesis:{id:"genes-karyokinesis",title:t("arpa_genepool_karyokinesis_title"),desc:t("arpa_genepool_synthesis_desc",[3,25]),reqs:{synthesis:1},grant:["synthesis",2],cost:{Plasmid(){return 40}},action(){return!!Ne("karyokinesis")}},cytokinesis:{id:"genes-cytokinesis",title:t("arpa_genepool_cytokinesis_title"),desc:t("arpa_genepool_synthesis_desc",[4,50]),reqs:{synthesis:2},grant:["synthesis",3],cost:{Plasmid(){return 55}},action(){return!!Ne("cytokinesis")}},mitosis:{id:"genes-mitosis",title:t("arpa_genepool_mitosis_title"),desc:t("arpa_genepool_mitosis_desc",[3]),reqs:{synthesis:3,evolve:2},grant:["plasma",1],cost:{Plasmid(){return 90}},action(){return!!Ne("mitosis")}},metaphase:{id:"genes-metaphase",title:t("arpa_genepool_metaphase_title"),desc:t("arpa_genepool_mitosis_desc",[5]),reqs:{plasma:1},grant:["plasma",2],cost:{Plasmid(){return 165}},action(){return!!Ne("metaphase")}},mutation:{id:"genes-mutation",title:t("arpa_genepool_mutation_title"),desc:t("arpa_genepool_mutation_desc"),reqs:{synthesis:3,creep:5},grant:["mutation",1],cost:{Plasmid(){return 1250}},action(){return Ne("mutation")?(e.genes.mutation=1,Ga(),!0):!1}},transformation:{id:"genes-transformation",title:t("arpa_genepool_transformation_title"),desc:t("arpa_genepool_transformation_desc"),reqs:{mutation:1},grant:["mutation",2],cost:{Plasmid(){return 1500}},action(){return Ne("transformation")?(e.genes.mutation=2,Ga(),!0):!1}},metamorphosis:{id:"genes-metamorphosis",title:t("arpa_genepool_metamorphosis_title"),desc:t("arpa_genepool_metamorphosis_desc"),reqs:{mutation:2},grant:["mutation",3],cost:{Plasmid(){return 1750}},action(){return Ne("metamorphosis")?(e.genes.mutation=3,Ga(),!0):!1}},replication:{id:"genes-replication",title:t("arpa_genepool_replication_title"),desc:t("arpa_genepool_replication_desc"),reqs:{evolve:1},grant:["birth",1],cost:{Plasmid(){return 65}},action(){return!!Ne("replication")}},artificer:{id:"genes-artificer",title:t("arpa_genepool_artificer_title"),desc:t("arpa_genepool_artificer_desc"),reqs:{evolve:1},grant:["crafty",1],cost:{Plasmid(){return 45}},action(){return!!Ne("artificer")}},detail_oriented:{id:"genes-detail_oriented",title:t("arpa_genepool_detail_oriented_title"),desc:t("arpa_genepool_crafting_desc",["50"]),reqs:{crafty:1},grant:["crafty",2],cost:{Plasmid(){return 90}},action(){return!!Ne("detail_oriented")}},rigorous:{id:"genes-rigorous",title:t("arpa_genepool_rigorous_title"),desc:t("arpa_genepool_crafting_desc",["100"]),reqs:{crafty:2},grant:["crafty",3],cost:{Plasmid(){return 135}},action(){return!!Ne("rigorous")}},geographer:{id:"genes-geographer",title:t("arpa_genepool_geographer_title"),desc:t("arpa_genepool_geographer_desc"),reqs:{store:1},grant:["queue",1],cost:{Plasmid(){return 75}},action(){return!!Ne("geographer")}},architect:{id:"genes-architect",title:t("arpa_genepool_architect_title"),desc:t("arpa_genepool_architect_desc"),reqs:{queue:1},grant:["queue",2],cost:{Plasmid(){return 160}},action(){return!!Ne("architect")},post(){zr(),ra()}},precognition:{id:"genes-precognition",title:t("arpa_genepool_precognition_title"),desc:t("arpa_genepool_precognition_desc"),reqs:{queue:2},grant:["queue",3],condition(){return e.stats.aiappoc>0},cost:{Plasmid(){return 3500},Phage(){return 100},AICore(){return 1}},action(){return!!Ne("precognition")}},governance:{id:"genes-governance",title:t("arpa_genepool_governance_title"),desc:t("arpa_genepool_governance_desc"),reqs:{queue:2},grant:["governor",1],cost:{Plasmid(){return 300},Phage(){return 25}},action(){return!!Ne("governance")}},civil_service:{id:"genes-civil_service",title:t("arpa_genepool_civil_service_title"),desc:t("arpa_genepool_civil_service_desc"),reqs:{governor:1},grant:["governor",2],cost:{Plasmid(){return 1e3},Harmony(){return 1}},action(){return!!Ne("civil_service")},post(){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let r=0;r<6;r++)e.race.governor.tasks.hasOwnProperty(`t${r}`)||(e.race.governor.tasks[`t${r}`]="none");Ot()}},hardened_genes:{id:"genes-hardened_genes",title:t("arpa_genepool_hardened_genes_title"),desc:t("arpa_genepool_hardened_genes_desc"),reqs:{},grant:["challenge",1],cost:{Plasmid(){return 5}},action(){return!!Ne("hardened_genes")}},unlocked:{id:"genes-unlocked",title:t("arpa_genepool_unlocked_title"),desc:t("arpa_genepool_unlocked_desc"),reqs:{challenge:1},grant:["challenge",2],cost:{Plasmid(){return 50}},action(){return!!Ne("unlocked")},post(){Nt(!0)}},universal:{id:"genes-universal",title:t("arpa_genepool_universal_title"),desc:t("arpa_genepool_universal_desc"),reqs:{challenge:2},grant:["challenge",3],condition(){return e.race.universe!=="standard"},cost:{Plasmid(){return 400}},action(){return!!Ne("universal")},post(){Nt(!0)}},standard:{id:"genes-standard",title:t("arpa_genepool_standard_title"),desc:t("arpa_genepool_standard_desc"),reqs:{challenge:3},grant:["challenge",4],condition(){return e.race.universe!=="standard"},cost:{Plasmid(){return 2500}},action(){return!!Ne("standard")},post(){Nt(!0)}},mastered:{id:"genes-mastered",title:t("arpa_genepool_mastered_title"),desc:t("arpa_genepool_mastered_desc"),reqs:{challenge:4},grant:["challenge",5],cost:{Plasmid(){return 4e3}},action(){return!!Ne("mastered")}},negotiator:{id:"genes-negotiator",title:t("arpa_genepool_negotiator_title"),desc:t("arpa_genepool_negotiator_desc"),reqs:{challenge:2},grant:["trader",1],cost:{Plasmid(){return 750}},action(){return Ne("negotiator")?(e.genes.trader=1,Ln(),!0):!1}},ancients:{id:"genes-ancients",title:t("arpa_genepool_ancients_title"),desc:t("arpa_genepool_ancients_desc"),reqs:{evolve:2},condition(){return!!e.genes.old_gods},grant:["ancients",1],cost:{Plasmid(){return 120}},action(){return Ne("ancients")?(e.genes.ancients=1,ue(),!0):!1}},faith:{id:"genes-faith",title:t("arpa_genepool_faith_title"),desc:t("arpa_genepool_faith_desc"),reqs:{ancients:1},grant:["ancients",2],cost:{Plasmid(){return 300}},action(){return Ne("faith")?(e.civic.priest.display=!0,!0):!1}},devotion:{id:"genes-devotion",title:t("arpa_genepool_devotion_title"),desc:t("arpa_genepool_devotion_desc"),reqs:{ancients:2},grant:["ancients",3],cost:{Plasmid(){return 600}},action(){return!!Ne("devotion")}},acolyte:{id:"genes-acolyte",title:t("arpa_genepool_acolyte_title"),desc:t("arpa_genepool_acolyte_desc"),reqs:{ancients:3},grant:["ancients",4],cost:{Plasmid(){return 1e3}},action(){return!!Ne("acolyte")}},conviction:{id:"genes-conviction",title:t("arpa_genepool_conviction_title"),desc:t("arpa_genepool_conviction_desc"),reqs:{ancients:4},grant:["ancients",5],cost:{Plasmid(){return 1500}},action(){return!!Ne("conviction")}},transcendence:{id:"genes-transcendence",title:t("arpa_genepool_transcendence_title"),desc:t("arpa_genepool_transcendence_desc"),reqs:{ancients:1,mutation:3},grant:["transcendence",1],cost:{Plasmid(){return 3e3}},action(){return Ne("transcendence")?(e.genes.transcendence=1,ue(),!0):!1}},bleeding_effect:{id:"genes-bleeding_effect",title:t("arpa_genepool_bleeding_effect_title"),desc:t("arpa_genepool_bleeding_effect_desc",[2.5]),reqs:{creep:2},grant:["bleed",1],condition(){return e.race.universe==="antimatter"},cost:{Plasmid(){return 100}},action(){return!!Ne("bleeding_effect")}},synchronicity:{id:"genes-synchronicity",title:t("arpa_genepool_synchronicity_title"),desc:t("arpa_genepool_synchronicity_desc",[25]),reqs:{bleed:1},grant:["bleed",2],cost:{Plasmid(){return 500}},action(){return!!Ne("synchronicity")}},astral_awareness:{id:"genes-astral_awareness",title:t("arpa_genepool_astral_awareness_title"),desc:t("arpa_genepool_astral_awareness_desc"),reqs:{bleed:2},grant:["bleed",3],cost:{Plasmid(){return 1e3}},action(){return!!Ne("astral_awareness")}},blood_remembrance:{id:"genes-blood_remembrance",title:t("arpa_genepool_blood_remembrance_title"),desc:t("arpa_genepool_blood_remembrance_desc"),reqs:{},grant:["blood",1],condition(){return e.prestige.Blood_Stone.count>=1},cost:{Plasmid(){return 1e3},Phage(){return 10}},action(){return!!Ne("blood_remembrance")}},blood_sacrifice:{id:"genes-blood_sacrifice",title:t("arpa_genepool_blood_sacrifice_title"),desc:t("arpa_genepool_blood_sacrifice_desc"),reqs:{blood:1},grant:["blood",2],cost:{Plasmid(){return 3e3},Phage(){return 100},Artifact(){return 1}},action(){return!!Ne("blood_sacrifice")}},essence_absorber:{id:"genes-essence_absorber",title:t("arpa_genepool_essence_absorber_title"),desc:t("arpa_genepool_essence_absorber_desc"),reqs:{blood:2},grant:["blood",3],cost:{Plasmid(){return 7500},Phage(){return 250},Artifact(){return 1}},action(){return!!Ne("essence_absorber")},post(){Nn()}}},ru={purify:{id:"blood-purify",title:t("arpa_blood_purify_title"),desc:t("arpa_blood_purify_desc"),reqs:{},grant:["spire",1],cost:{Blood_Stone(){return 10}},action(){return!!Mr($(this)[0].cost)}},chum:{id:"blood-chum",title:t("arpa_blood_chum_title"),desc:t("arpa_blood_chum_desc"),reqs:{spire:1},grant:["spire",2],cost:{Blood_Stone(){return 25}},action(){return!!Mr($(this)[0].cost)}},lust:{id:"blood-lust",title:t("arpa_blood_lust_title"),desc:t("arpa_blood_lust_desc"),reqs:{},grant:["lust","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.lust||0))*15+15},Artifact(r){return((r||0)+(e.blood.lust||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},illuminate:{id:"blood-illuminate",title:t("arpa_blood_illuminate_title"),desc:t("arpa_blood_illuminate_desc"),reqs:{},grant:["illuminate","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.illuminate||0))*12+12},Artifact(r){return((r||0)+(e.blood.illuminate||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},greed:{id:"blood-greed",title:t("arpa_blood_greed_title"),desc:t("arpa_blood_greed_desc"),reqs:{},grant:["greed","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.greed||0))*16+16},Artifact(r){return((r||0)+(e.blood.greed||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},hoarder:{id:"blood-hoarder",title:t("arpa_blood_hoarder_title"),desc:t("arpa_blood_hoarder_desc"),reqs:{},grant:["hoarder","*"],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(r){return((r||0)+(e.blood.hoarder||0))*14+14},Artifact(r){return((r||0)+(e.blood.hoarder||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},artisan:{id:"blood-artisan",title:t("arpa_blood_artisan_title"),desc:t("arpa_blood_artisan_desc"),reqs:{},grant:["artisan","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.artisan||0))*8+8},Artifact(r){return((r||0)+(e.blood.artisan||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},attract:{id:"blood-attract",title:t("arpa_blood_attract_title"),desc:t("arpa_blood_attract_desc"),reqs:{},grant:["attract","*"],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(r){return((r||0)+(e.blood.attract||0))*4+4},Artifact(r){return((r||0)+(e.blood.attract||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},wrath:{id:"blood-wrath",title:t("arpa_blood_wrath_title"),desc:t("arpa_blood_wrath_desc"),reqs:{},grant:["wrath","*"],cost:{Blood_Stone(r){return((r||0)+(e.blood.wrath||0))*2+2},Artifact(){return 1}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Mr($(this)[0].cost)}},prepared:{id:"blood-prepared",title:t("arpa_blood_prepared_title"),desc:t("arpa_blood_prepared_desc"),reqs:{},grant:["prepared",1],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 50}},action(){return!!Mr($(this)[0].cost)},post(){Ki()}},compact:{id:"blood-compact",title:t("arpa_blood_compact_title"),desc:t("arpa_blood_compact_desc"),reqs:{prepared:1},grant:["prepared",2],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 75}},action(){return!!Mr($(this)[0].cost)}},infernal:{id:"blood-infernal",title:t("arpa_blood_infernal_title"),desc:t("arpa_blood_infernal_desc"),reqs:{prepared:2},grant:["prepared",3],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 125},Artifact(){return 1}},action(){return!!Mr($(this)[0].cost)}},unbound:{id:"blood-unbound",title:t("arpa_blood_unbound_title"),desc:t("arpa_blood_unbound_desc"),reqs:{},grant:["unbound",1],cost:{Blood_Stone(){return 50}},action(){return!!Mr($(this)[0].cost)}},unbound_resistance:{id:"blood-unbound_resistance",title:t("arpa_blood_unbound_resistance_title"),desc:t("arpa_blood_unbound_resistance_desc"),reqs:{unbound:1},grant:["unbound",2],cost:{Blood_Stone(){return 100}},action(){return!!Mr($(this)[0].cost)}},shadow_war:{id:"blood-shadow_war",title:t("arpa_blood_shadow_war_title"),desc:t("arpa_blood_shadow_war_desc"),reqs:{unbound:2},grant:["unbound",3],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 250},Artifact(){return 2}},action(){return!!Mr($(this)[0].cost)}},unbound_immunity:{id:"blood-unbound_immunity",title:t("arpa_blood_unbound_immunity_title"),desc:t("arpa_blood_unbound_immunity_desc"),reqs:{unbound:3},grant:["unbound",4],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 500}},action(){return!!Mr($(this)[0].cost)}},blood_aware:{id:"blood-blood_aware",title:t("arpa_blood_blood_aware_title"),desc:t("arpa_blood_blood_aware_desc"),reqs:{},grant:["aware",1],condition(){return!!(e.genes.blood&&e.genes.blood>=3)},cost:{Blood_Stone(){return 10}},action(){return!!Mr($(this)[0].cost)}}};function Ne(r){let a=!0,i=yo[r].cost;return Object.keys(i).forEach(function(s){let n=s;s==="Plasmid"&&e.race.universe==="antimatter"&&(s="AntiPlasmid"),e.prestige[s].countNumber(e.resource[i].amount))return a=!1,!1}),a}function hs(r,a,i){return r=uu(r,a,i),jr({cost:r},a,i)}function uu(r,a,i){let s=ve("human");if(i&&i.creative||!i&&e.race.creative||!i&&s>0){var n={};return Object.keys(r).forEach(function(c){n[c]=function(){let l=r[c](a,i);return(i&&i.creative||!i&&e.race.creative)&&(l*=1-b.creative.vars()[1]/100),s>0&&(l*=1-b.creative.vars(1)[1]/100*s),l}}),n}return r}function Ze(r,a,i,s,n){var c=e.arpa[r]?e.arpa[r].rank:0;return(n&&n.creative||!n&&e.race.creative)&&r!=="syphon"&&(s-=b.creative.vars()[0]),a&&(c+=a),Math.round(s**c*i)}function xo(){if(e.tech.high_tech&&e.tech.high_tech>=6){let r=$("#arpaPhysics");le(r),Object.keys(gt).forEach(function(a){_u(r,a)})}}function Kn(){let r=$("#geneticMinor")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function du(){let r=$("#geneticMinor")[0];r&&Sortable.create(r,{onEnd(a){let i=e.settings.mtorder;i.splice(a.newDraggableIndex,0,i.splice(a.oldDraggableIndex,1)[0]),e.settings.mtorder=i,Ga()}})}function Ga(){let r=$("#arpaGenetics");if(Kn(),le(r),!e.settings.arpa.genetics)return!1;if(e.tech.genetics>1){let a=$('
');r.append(a);let i=e.tech.genetics>2?t("arpa_gene_mutation"):t("arpa_sequence_genome");e.race.artifical&&(i=e.tech.genetics>2?t("arpa_code_modification"):t("arpa_decompile_source"));let s=$(`
${i} - ${t("arpa_to_complete")}
`);a.append(s);let n=$(`{{ progress }}%`);a.append(n);let c=e.tech.genetics>2?t("arpa_mutate"):t("arpa_sequence");e.race.artifical&&(c=e.tech.genetics>2?t("arpa_modify"):t("arpa_decompile"));let l=$(``);if(a.append(l),e.tech.genetics>=5){let o=$(``);a.append(o)}if(e.tech.genetics>=6){let o=$(``);a.append(o)}if(e.tech.genetics>=7){let o=$(``);a.append(o)}e.arpa.sequence.on&&$("#arpaSequence button.seq").addClass("has-text-success"),e.arpa.sequence.boost&&$("#arpaSequence button.boost").addClass("has-text-success"),e.arpa.sequence.auto&&$("#arpaSequence button.auto").addClass("has-text-success"),D({el:"#arpaSequence",data:e.arpa.sequence,methods:{toggle(){e.arpa.sequence.on?(e.arpa.sequence.on=!1,$("#arpaSequence button.seq").removeClass("has-text-success")):(e.arpa.sequence.on=!0,$("#arpaSequence button.seq").addClass("has-text-success"))},booster(){e.arpa.sequence.boost?(e.arpa.sequence.boost=!1,$("#arpaSequence button.boost").removeClass("has-text-success")):(e.arpa.sequence.boost=!0,$("#arpaSequence button.boost").addClass("has-text-success"))},boostLabel(o){return t(e.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(o?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")},novo(){let o=fe();for(let d=0;d=2e5;d++)e.resource.Knowledge.amount-=2e5,e.resource.Genes.amount++},novoLabel(){return t(e.race.artifical?"arpa_novo_artifical_label":"arpa_novo_label",["200k"])},auto_seq(){e.arpa.sequence.auto?(e.arpa.sequence.auto=!1,$("#arpaSequence button.auto").removeClass("has-text-success")):(e.arpa.sequence.auto=!0,$("#arpaSequence button.auto").addClass("has-text-success"))},autoLabel(o){return t(e.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(o?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")}},filters:{timer(o){if(e.arpa.sequence.on&&e.arpa.sequence.labs>0)return e.arpa.sequence.boost?Ft(o/(e.arpa.sequence.labs*2)):Ft(o/e.arpa.sequence.labs);{let d=jt(14,12);return d.length>0?d:t("time_never")}}}}),pe("popArpaSeq",function(){return e.tech.genetics>2?e.race.artifical?t("arpa_modify_desc"):t("arpa_mutate_desc"):e.race.artifical?t("arpa_decompile_desc"):t("arpa_sequence_desc")},{elm:"#arpaSequence .seqlbl",classes:"has-background-light has-text-dark"})}if(e.tech.genetics>2){let a=$('
');$("#arpaGenetics").append(a);let i=$('
');a.append(i),e.tech.decay&&e.tech.decay>=2&&(e.settings.mtorder.includes("fortify")||e.settings.mtorder.push("fortify")),Object.keys(e.race).forEach(function(x){b[x]&&b[x].type==="minor"&&(e.settings.mtorder.includes(x)||e.settings.mtorder.push(x))}),e.genes.challenge&&e.genes.challenge>=5&&(e.settings.mtorder.includes("mastery")||e.settings.mtorder.push("mastery"));let s=!1,n=[];e.settings.mtorder.forEach(function(x){(b[x]&&b[x].type==="minor"||x==="mastery"||x==="fortify")&&(x!=="fortify"||e.tech.decay&&e.tech.decay>=2)&&(!["promiscuous","content","resilient","industrious","tactical","fibroblast"].includes(x)&&e.race.lone_survivor||!e.race.lone_survivor)&&(s=!0,pu(i,x),n.push(x))}),a.append(`
${t("arpa_race_genetic_traids",[tt("name")])}
`);let c=sa("name"),l=[],o=[],d=$('
');a.append(d);let h=Ke(e.race);Ve("fool",2023)&&(h.hooved=1),Object.keys(h).forEach(function(x){if(b[x]&&b[x].type!=="minor"&&b[x].type!=="special"&&x!=="evil"&&x!=="soul_eater"&&x!=="artifical"){let j=!1;if(e.race.ss_traits&&e.race.ss_traits.includes(x)||e.race.iTraits&&e.race.iTraits.hasOwnProperty(x)||e.race.species==="sludge"&&(x==="ooze"||e.race.modified)?j=!0:e.race.hasOwnProperty(x)||(j=!0),!j&&(b[x].type==="major"&&e.genes.mutation||b[x].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let B=$('
'),S=$(`${t("arpa_remove_button")}`);l.push(x),B.append(S),B.append($(`${c[x]?c[x]:b[x].name} (${t("arpa_genepool_rank",[h[x]])})`)),d.append(B)}else o.push(x),d.append(`
${c[x]?c[x]:b[x].name} (${t("arpa_genepool_rank",[h[x]])})
`)}});let _=[];if(e.genes.mutation&&e.genes.mutation>=3&&(e.race.species!=="sludge"||!e.race.modified)){a.append(`
${t("arpa_race_genetic_gain")}
`);let x=["dumb","smart"];Object.keys(A).forEach(function(B){B!=="junker"&&B!=="sludge"&&B!=="custom"&&A[B].type===A[e.race.species].type&&Object.keys(A[B].traits).forEach(function(S){if(!e.race[S]&&S!=="soul_eater"){let Q=x.indexOf(S);if(Q===-1)_.push(S);else{let V=!1;switch(Q%2){case 0:e.race[x[Q+1]]&&(V=!0);break;case 1:e.race[x[Q-1]]&&(V=!0);break}V||_.push(S)}}})});let j=$('
');a.append(j);for(let B=0;B<_.length;B++){let S=_[B],Q=$('
'),V=$(`${t("arpa_gain_button")}`);Q.append(V),Q.append($(`${c[S]?c[S]:b[S].name}`)),j.append(Q)}}s&&a.prepend(`
${t("arpa_race_genetic_minor_traits",[tt("name")])}
`);let m=function(x){let j=b[x].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1),t("arpa_remove",[sa("name",x),j,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},w=function(x){let j=b[x].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1),t("arpa_gain",[sa("name",x),j,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},M=function(x){let j=Ba(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),t("arpa_gene_buy",[sa("name",x),Ee(j),e.resource.Genes.name])},F=function(x){let j=Ba(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),t("arpa_phage_buy",[sa("name",x),Ee(j),t("resource_Phage_name")])};D({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(x){let j=0,B=fe(),S=!0,Q=!1;for(;j=V?(e.resource.Genes.amount-=V,e.race.minor[x]?e.race.minor[x]++:e.race.minor[x]=1,e.race[x]?e.race[x]++:e.race[x]=1,Q=!0):S=!1,j++}Q&&(x==="mastery"&&Nt(!0),Ga(),x==="persuasive"&&Ln())},phage(x){let j=0,B=fe(),S=!0,Q=!1;for(;j=V?(e.prestige.Phage.count-=V,e.genes.minor[x]?e.genes.minor[x]++:e.genes.minor[x]=1,e.race[x]?e.race[x]++:e.race[x]=1,Q=!0):S=!1,j++}Q&&(x==="mastery"&&Nt(!0),Ga(),x==="persuasive"&&Ln())},purge(x){if(e.race.species==="sludge"&&(e.race.modified||x==="ooze"))return;let j=b[x].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1);let B=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[B].count>=j){e.prestige[B].count-=j;let S=e.race[x];delete e.race[x],e.race.modified?e.race.modified++:e.race.modified=1,Ns(x,S),Ga(),ue(),Et();let Q=0;Object.keys(e.race).forEach(function(V){b[V]&&(b[V].type=="major"||b[V].type=="genus")&&V!=="evil"&&Q++}),Q===0&&De("blank_slate")}},gain(x){if(e.race.species==="sludge"&&e.race.modified)return;let j=b[x].val*5;e.race.species==="sludge"&&(j*=2),e.race.species==="custom"&&(j*=10),j<0&&(j*=-1);let B=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[B].count>=j&&(e.prestige[B].count-=j,e.race[x]=1,e.race.modified?e.race.modified++:e.race.modified=1,Ni(x),Ga(),ue(),Et())},geneCost(x){return M(x)},phageCost(x){return F(x)},traitEffect(x){return t(`trait_${x}_effect`)},removeCost(x){return m(x)},addCost(x){return w(x)},genePurchasable(x){let j=Ba(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),e.resource.Genes.amount>=j},phagePurchasable(x){let j=Ba(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),e.prestige.Phage.count>=j}}}),n.forEach(function(x){pe(`popGenetrait${x}`,function(){return M(x)},{elm:`#geneticBreakdown .t-${x} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&pe(`popGenetrait${x}`,function(){return F(x)},{elm:`#geneticBreakdown .t-${x} .pbuy`,classes:"has-background-light has-text-dark"}),pe(`popGenetrait${x}`,function(){return e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?`
${sa("desc",x)}
${t(`trait_${x}_effect`)}
`:sa("desc",x)},{elm:`#geneticBreakdown .t-${x} .name`,classes:"has-background-light has-text-dark"})}),l.forEach(function(x){pe(`popRemoveBkdwn${x}`,function(){return m(x)},{elm:`#geneticBreakdown .remove${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{wide:!0,classes:"w30"})}),o.forEach(function(x){let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{elm:`#geneticBreakdown .trait${x}`,wide:!0,classes:"w30"})}),_.forEach(function(x){pe(`popAddBkdwn${x}`,function(){return w(x)},{elm:`#geneticBreakdown .add${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,B=$("
");vi(B,x,{trank:e.race[x]}),pe(j,B,{wide:!0,classes:"w30"})}),du()}}function pu(r,a){let i=$(`
`),s=$(`${e.resource.Genes.name} (${e.race.minor[a]||0})`);if(i.append(s),e.prestige.Phage.count>0){let c=$(`${t("resource_Phage_name")} (${e.genes.minor[a]||0})`);i.append(c)}let n=e.race[a]>1?`(${e.race[a]}) `:"";i.append(`${n}${sa("name",a)}`),r.append(i)}function ko(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(le($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),au())}function Nn(){e.tech.b_stone&&e.tech.b_stone>=2&&(le($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),iu())}function _u(r,a){if(cu(a)){if(e.arpa[a]||(e.arpa[a]={complete:0,rank:0}),gt[a].rank&&e.arpa[a].rank>=gt[a].rank)return;let i=$(`
`);r.append(i);let s=typeof gt[a].title=="string"?gt[a].title:gt[a].title(),n=$(`
${s}{{ rank | level }}
`);i.append(n);let c=$('
{{ complete }}%
');n.append(c);let l=$('
');i.append(l),l.append($(``)),l.append($(``)),l.append($(``)),l.append($(``)),l.append($(``)),D({el:`#arpa${a}`,data:e.arpa[a],methods:{queue(d){if(e.tech.queue){let _=fe();for(let m=0;m<_;m++){let w=`arpa${d}`,M=0,F=gt[d].queue_complete?gt[d].queue_complete():Number.MAX_SAFE_INTEGER;for(var h=0;h0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===w)e.queue.queue[e.queue.queue.length-1].q++;else{let x=typeof gt[d].title=="string"?gt[d].title:gt[d].title();e.queue.queue.push({id:w,action:"arpa",type:d,label:x,cna:!1,time:0,q:1,qs:1,t_max:0})}na()}else break}}},build(d,h){Is(d,h,!0)},srDesc(){return ss(typeof gt[a].desc=="string"?gt[a].desc:gt[a].desc())},srLevel(){return ss(gt[a].effect())},arpaProjectSRCosts(d,h){let _=d==="100"?100-e.arpa[h].complete:d;var m=`Construct ${_}%. Costs:`,w=hs(gt[h].cost);return Object.keys(w).forEach(function(M){var F=+(w[M]()*(_/100)).toFixed(0);if(F>0){var x=M==="Money"?"$":e.resource[M].name+": ",j=e.resource[M].amount>=F?"":` ${t("insufficient")} ${e.resource[M].name}.`;m=m+` ${x} ${Ee(F,2)}.${j}`}}),m}},filters:{remain(d){return 100-d},level(d){return t("arpa_level",[d])}}}),pe(`popArpa${a}`,function(){return gt[a].desc},{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),pe(`popArpa${a}`,function(){return gt[a].effect()},{elm:`#arpa${a} .head .rank`,classes:"has-background-light has-text-dark"});let o=[1,10,25,100];for(let d=0;d=100&&(e.arpa[r].rank++,e.arpa[r].complete=0,e.tech[gt[r].grant]=e.arpa[r].rank,n=!0,r==="monument"&&(e.arpa.m_type=$o(),$(`#arpa${r} .head .desc`).html(gt[r].title()),Qr(!1,["arpamonument"])),r==="roid_eject"&&($(`#arpa${r} .head .desc`).html(gt[r].title()),Qr(!1,["arparoid_eject"])),r==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,Ie("popArpalaunch_facility"),[1,10,25,100].forEach(function(l){Ie(`popArpalaunch_facility${l}`)}),s||Zr(["arpalaunch_facility"]),xo(),Pt(),I(t("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),e.race.inflation&&(e.race.inflation+=10),ue()));if(i){let c=[1,10,25,100],l=$("#popper"),o=l.data("id");for(let d=0;d
"),n=hs(gt[a].cost);let c=ei(gt[a],i/100,!1,!0);return Object.keys(n).forEach(function(l){var o=+(n[l]()*(i/100)).toFixed(0);if(o>0){var d=l==="Money"?"$":e.resource[l].name+": ",h=e.resource[l].amount>=o?"has-text-dark":l===c.r?"has-text-danger":"has-text-alert";s.append($(`
${d}${Ee(o,2)}
`))}}),s}function Ln(){Object.keys(e.resource).forEach(function(r){D({el:`#market-${r}`},"update")}),D({el:"#galaxyTrade"},"update")}var Hn={spc_titan:{info:{name(){return W().titan},desc(){return t("space_titan_info_desc",[W().titan,A[e.race.species].home])},support:"electrolysis",zone:"outer",syndicate(){return!!(e.tech.titan&&e.tech.titan>=3&&e.tech.enceladus&&e.tech.enceladus>=2)},syndicate_cap(){return e.tech.triton?e.tech.outer>=4?2e3:1e3:600}},titan_mission:{id:"space-titan_mission",title(){return t("space_mission_title",[W().titan])},desc(){return t("space_mission_desc",[W().titan])},reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete(){return e.tech.titan>=1?0:1},cost:{Helium_3(r,a){return+Ae(25e4,!1,a).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[W().titan])},action(){return u($(this)[0])?(I(t("space_titan_mission_action",[W().titan,A[e.race.species].home]),"info",!1,["progress"]),!0):!1}},titan_spaceport:{id:"space-titan_spaceport",title:t("space_red_spaceport_title"),desc:`
${t("space_red_spaceport_desc")}
${t("requires_power")}
`,reqs:{titan:1},path:["truepath"],cost:{Money(r){return f("titan_spaceport",r,25e5,1.32)},Lumber(r){return f("titan_spaceport",r,75e4,1.32)},Cement(r){return f("titan_spaceport",r,35e4,1.32)},Mythril(r){return f("titan_spaceport",r,1e4,1.32)}},effect(){let r=e.resource.Water.display?`
${t("plus_max_resource",[Ee(H(250)),e.resource.Water.name])}
`:"",a=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().enceladus])}
`:"",i=e.tech.titan&&e.tech.titan>=5?`
${t("space_titan_spaceport_storage",[25])}
`:"";return`${a}${r}${i}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 2},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.titan_spaceport.count++,re($(this)[0]),!0):!1},post(){e.tech.titan===1&&(e.tech.titan=2,ue())}},electrolysis:{id:"space-electrolysis",title:t("space_electrolysis_title"),desc(){return`
${t("space_electrolysis_title")}
${t("space_electrolysis_req",[e.resource.Water.name])}
`},reqs:{titan:3},path:["truepath"],cost:{Money(r){return f("electrolysis",r,1e6,1.25)},Copper(r){return f("electrolysis",r,185e3,1.25)},Steel(r){return f("electrolysis",r,22e4,1.25)},Polymer(r){return f("electrolysis",r,38e4,1.25)}},effect(){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&k.ai_core2?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return _e(8)},action(){return u($(this)[0])?(e.space.electrolysis.count++,re($(this)[0]),!0):!1},post(){e.tech.titan===3&&(e.tech.titan=4,ue())}},hydrogen_plant:{id:"space-hydrogen_plant",title:t("space_hydrogen_plant_title"),desc(){return`
${t("space_hydrogen_plant_title")}
${t("space_hydrogen_plant_req")}
`},reqs:{titan_power:1},path:["truepath"],cost:{Money(r){return f("hydrogen_plant",r,15e5,1.28)},Iridium(r){return f("hydrogen_plant",r,292e3,1.28)},Stanene(r){return f("hydrogen_plant",r,599e3,1.28)},Cement(r){return f("hydrogen_plant",r,18e4,1.28)}},effect(){return`${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("space_hydrogen_plant_effect",[1,t("space_electrolysis_title")])}`},support(){return 2},powered(){return dt(-22)},action(){return u($(this)[0])?(e.space.hydrogen_plant.count++,e.space.electrolysis.on>e.space.hydrogen_plant.on&&e.space.hydrogen_plant.on++,!0):!1}},titan_quarters:{id:"space-titan_quarters",title:t("interstellar_habitat_title"),desc(){return`
${t("interstellar_habitat_title")}
${t("space_habitat_req",[W().titan,e.resource.Food.name,e.resource.Water.name])}
`},reqs:{titan:4},path:["truepath"],cost:{Money(r){return f("titan_quarters",r,12e5,1.28)},Furs(r){return f("titan_quarters",r,85e3,1.28)},Plywood(r){return f("titan_quarters",r,1e5,1.28)},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=N(1);return`
${t("space_used_support",[W().titan])}
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().titan]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
${t("spend",[$(this)[0].support_fuel()[0].a,e.resource[$(this)[0].support_fuel()[0].r].name])}
${t("spend",[$(this)[0].support_fuel()[1].a,e.resource[$(this)[0].support_fuel()[1].r].name])}
`},s_type:"titan",support(){return-1},support_fuel(){return[{r:"Water",a:12},{r:"Food",a:500}]},powered(){return 0},action(){if(u($(this)[0])){if(e.space.titan_quarters.count++,e.civic.titan_colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.titan_colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.titan_colonist.workers+=a}return!0}return!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},titan_mine:{id:"space-titan_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[W().titan])}
`},reqs:{titan:4},condition(){return!!(e.space.titan_quarters&&e.space.titan_quarters.count>0)},path:["truepath"],cost:{Money(r){return f("titan_mine",r,475e3,1.28)},Lumber(r){return f("titan_mine",r,568e3,1.28)},Wrought_Iron(r){return f("titan_mine",r,25e4,1.28)}},effect(){let r=T("titan_mine","adamantite"),a=T("titan_mine","aluminium"),i=+r.toFixed(3),s=+a.toFixed(3);return`
${t("space_used_support",[W().titan])}
${t("space_red_mine_effect",[i,e.resource.Adamantite.name])}
${t("space_red_mine_effect",[s,e.resource.Aluminium.name])}
`},s_type:"titan",support(){return-1},powered(){return 0},special(){return!0},action(){return u($(this)[0])?(e.space.titan_mine.count++,e.resource.Adamantite.display=!0,re($(this)[0]),!0):!1}},storehouse:{id:"space-storehouse",title:t("space_storehouse_title"),desc:t("space_storehouse_title"),reqs:{titan:5},path:["truepath"],cost:{Money(r){return f("storehouse",r,175e3,1.28)},Lumber(r){return f("storehouse",r,1e5,1.28)},Aluminium(r){return f("storehouse",r,12e4,1.28)},Cement(r){return f("storehouse",r,45e3,1.28)}},wide:!0,res(){return["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite"]},heavy(r){return!!["Copper","Iron","Steel","Titanium","Iridium","Neutronium","Adamantite"].includes(r)},val(r){switch(r){case"Lumber":return 3e3;case"Stone":return 3e3;case"Chrysotile":return 3e3;case"Furs":return 1700;case"Copper":return 1520;case"Iron":return 1400;case"Aluminium":return 1280;case"Cement":return 1120;case"Coal":return 480;case"Steel":return 240;case"Titanium":return 160;case"Alloy":return 180;case"Polymer":return 150;case"Iridium":return 175;case"Nano_Tube":return 120;case"Neutronium":return 64;case"Adamantite":return 72;default:return 0}},effect(){let r='
',a=Fa("storehouse",!1),i=Fa("storehouse",!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s),c=Ee(+(H($(this)[0].val(s))*(n?i:a)).toFixed(0),1);r=r+`${t("plus_max_resource",[c,e.resource[s].name])}`}return r=r+"
",r},action(){if(u($(this)[0])){e.space.storehouse.count++;let r=Fa("storehouse",!1),a=Fa("storehouse",!0);for(let i of $(this)[0].res())if(e.resource[i].display){let s=$(this)[0].heavy(i);e.resource[i].max+=H($(this)[0].val(i))*(s?a:r)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:t("city_bank"),desc(){return t("city_bank_desc",[W().titan])},reqs:{titan:6},path:["truepath"],cost:{Money(r){return f("titan_bank",r,25e5,1.32)},Titanium(r){return f("titan_bank",r,38e4,1.32)},Neutronium(r){return f("titan_bank",r,5e3,1.32)}},effect(){let r=Ar()*2;return r=H(r),r=(+r.toFixed(0)).toLocaleString(),t("plus_max_resource",[`$${r}`,t("resource_Money_name")])},action(){return u($(this)[0])?(e.resource.Money.max+=H(1800),e.space.titan_bank.count++,!0):!1}},g_factory:{id:"space-g_factory",title:t("interstellar_g_factory_title"),desc(){return`
${t("interstellar_g_factory_title")}
${t("space_support",[W().titan])}
`},reqs:{graphene:1},path:["truepath"],cost:{Money(r){return f("g_factory",r,95e4,1.28)},Copper(r){return f("g_factory",r,165e3,1.28)},Stone(r){return f("g_factory",r,22e4,1.28)},Adamantite(r){return f("g_factory",r,12500,1.28)}},effect(){let r=.05;return e.race.high_pop&&(r=+xe(r).toFixed(3)),`
${t("space_used_support",[W().titan])}
${t("space_red_mine_effect",[r,e.resource.Graphene.name])}
${t("interstellar_g_factory_effect")}
`},s_type:"titan",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(e.space.g_factory.count++,e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.space.g_factory.Oil++:e.space.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},sam:{id:"space-sam",title:t("space_sam_title"),desc(){return`
${t("space_sam_desc")}
${t("requires_power")}
`},reqs:{titan:7},path:["truepath"],cost:{Money(r){return f("sam",r,25e5,1.28)},Steel(r){return f("sam",r,45e4,1.28)},Elerium(r){return f("sam",r,120,1.28)},Brick(r){return f("sam",r,16e4,1.28)}},effect(){return`
${t("galaxy_defense_platform_effect",[25])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(e.space.sam.count++,re($(this)[0]),!0):!1},post(){D({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[W().titan,e.resource.Cipher.name])}
`},reqs:{titan:8},path:["truepath"],cost:{Money(r){return f("decoder",r,125e5,1.275)},Elerium(r){return f("decoder",r,750,1.275)},Orichalcum(r){return f("decoder",r,33e4,1.275)},Quantium(r){return f("decoder",r,18e4,1.275)}},effect(){let r=$(this)[0].support_fuel().a,a=2500;e.race.high_pop&&(a=xe(a)),k.ai_core2&&(a*=1.25);let i=`
${t("space_used_support",[W().titan])}
`;return i+=`
${t("space_red_exotic_lab_effect1",[a])}
`,i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`},s_type:"titan",support(){return-1},powered(){return 0},support_fuel(){return{r:"Cipher",a:.06}},action(){return u($(this)[0])?(e.space.decoder.count++,re($(this)[0]),!0):!1}},ai_core:{id:"space-ai_core",title:t("space_ai_core"),desc(r){return!e.space.hasOwnProperty("ai_core")||e.space.ai_core.count<100||r?`
${t("space_ai_core")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("ai_core")&&e.space.ai_core.count>=100?`
${t("requires_power")}
`:""):`
${t("space_ai_core")}
`},reqs:{titan:9},path:["truepath"],condition(){return!(e.space.ai_core.count>=100)},queue_size:10,queue_complete(){return 100-e.space.ai_core.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e5:0},Cement(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?18e4:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e4:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?250:0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?125e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?5e4:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?1e5:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?750:0}},effect(r){let a=`
${t("space_ai_core_effect")}
`,i=(r||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}else return Hn.spc_titan.ai_core2.effect();return a},action(){return u($(this)[0])&&e.space.ai_core.count<100?(e.space.ai_core.count++,e.space.ai_core.count>=100&&(e.tech.titan_ai_core=1,e.space.ai_core2={count:1,on:0},e.city.power>=Hn.spc_titan.ai_core2.powered()&&e.space.ai_core2.on++,Pt(),ue()),!0):!1}},ai_core2:{id:"space-ai_core2",title:t("space_ai_core"),desc(){return`
${t("space_ai_core")}
${t("space_electrolysis_req",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{titan_ai_core:1},path:["truepath"],condition(){return!!(e.space.hasOwnProperty("ai_core")&&e.space.ai_core.count>=100)},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},p_fuel(){return{r:"Water",a:1e3}},effect(){let r=25,a=`
${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
`;if(a+=`
${t("interstellar_citadel_effect",[r])}
${t("space_ai_core_effect2",[r])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(a+=`
${t("space_ai_core_effect3",[50])}
`),a+=`
${t("space_electrolysis_use",[$(this)[0].p_fuel().a,e.resource[$(this)[0].p_fuel().r].name,$(this)[0].powered()])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=3){let i=+Vn().toFixed(1);a+=`
${t("space_ai_core_effect4",[i])}
`}return a},action(){return!1},flair(){return e.space.hasOwnProperty("ai_core2")&&e.space.ai_core2.on>=1?t("space_ai_core_flair"):t("space_ai_core_flair2")}},ai_colonist:{id:"space-ai_colonist",title:t("space_ai_colonist_title"),desc(){return`
${t("space_ai_colonist_title")}
${t("requires_power")}
`},reqs:{titan_ai_core:3},path:["truepath"],cost:{Money(r){return f("ai_colonist",r,112e6,1.35)},Alloy(r){return f("ai_colonist",r,75e4,1.35)},Elerium(r){return f("ai_colonist",r,500,1.35)},Nano_Tube(r){return f("ai_colonist",r,525e3,1.35)},Quantium(r){return f("ai_colonist",r,15e4,1.35)},Cipher(r){return f("ai_colonist",r,1e4,1.35)}},effect(){return`
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[N(1),W().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.ai_colonist.count++,re($(this)[0]),!0):!1},flair:t("tech_combat_droids_flair")}},spc_enceladus:{info:{name(){return W().enceladus},desc(){return t("space_enceladus_info_desc",[W().enceladus,A[e.race.species].home])},support:"titan_spaceport",zone:"outer",syndicate(){return!!(e.tech.titan&&e.tech.titan>=3&&e.tech.enceladus&&e.tech.enceladus>=2)},syndicate_cap(){return e.tech.triton?e.tech.outer>=4?1500:1e3:600}},enceladus_mission:{id:"space-enceladus_mission",title(){return t("space_mission_title",[W().enceladus])},desc(){return t("space_mission_desc",[W().enceladus])},reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete(){return e.tech.enceladus>=1?0:1},cost:{Helium_3(r,a){return+Ae(25e4,!1,a).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[W().enceladus])},action(){return u($(this)[0])?(I(t("space_enceladus_mission_action",[W().enceladus]),"info",!1,["progress"]),e.resource.Water.display=!0,!0):!1}},water_freighter:{id:"space-water_freighter",title:t("space_water_freighter_title"),desc(){return`
${t("space_water_freighter_title")}
${t("space_support",[W().enceladus])}
`},reqs:{enceladus:2},path:["truepath"],cost:{Money(r){return f("water_freighter",r,45e4,1.25)},Iron(r){return f("water_freighter",r,362e3,1.25)},Nano_Tube(r){return f("water_freighter",r,125e3,1.25)},Sheet_Metal(r){return f("water_freighter",r,75e3,1.25)}},effect(r){let a=+Ae(5,!0,r).toFixed(2),i=+T("water_freighter").toFixed(2);return`
${t("space_used_support",[W().enceladus])}
${t("produce",[i,e.resource.Water.name])}
${t("space_belt_station_effect3",[a])}
`},s_type:"enceladus",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.water_freighter.count++,re($(this)[0]),!0):!1}},zero_g_lab:{id:"space-zero_g_lab",title:t("tech_zero_g_lab"),desc(){return`
${t("tech_zero_g_lab")}
${t("requires_power_support",[W().enceladus])}
`},reqs:{enceladus:3},path:["truepath"],cost:{Money(r){return f("zero_g_lab",r,5e6,1.25)},Alloy(r){return f("zero_g_lab",r,125e3,1.25)},Graphene(r){return f("zero_g_lab",r,225e3,1.25)},Stanene(r){return f("zero_g_lab",r,6e5,1.25)}},effect(){let r=yt("spc_enceladus"),a=Math.round(1e4*r),i=`
${t("space_used_support",[W().enceladus])}
${t("city_max_knowledge",[a])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[N(1)])}
`),e.resource.Cipher.display&&(i=i+`
${t("plus_max_resource",[1e4,e.resource.Cipher.name])}
`),i+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return _e(12)},action(){return u($(this)[0])?(e.space.zero_g_lab.count++,re($(this)[0]),!0):!1},post(){Lt()},postPower(r){bi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[W().enceladus])}
`},reqs:{enceladus:4},path:["truepath"],cost:{Money(r){return f("operating_base",r,75e5,1.3)},Furs(r){return f("operating_base",r,5e5,1.3)},Adamantite(r){return f("operating_base",r,375e3,1.3)},Stanene(r){return f("operating_base",r,75e4,1.3)},Mythril(r){return f("operating_base",r,225e3,1.3)},Horseshoe(){return e.race.hooved?4:0}},effect(){let r=`
${t("space_used_support",[W().enceladus])}
`;if(r+=`
${t("galaxy_defense_platform_effect",[50])}
`,r+=t("plus_max_resource",[N(4),t("civics_garrison_soldiers")]),e.race.orbit_decayed){let a=e.tech.medic*5;r+=`
${t("city_hospital_effect",[a])}
`}return r+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return _e(10)},action(){return u($(this)[0])?(e.space.operating_base.count++,re($(this)[0]),!0):!1},post(){D({el:"#spc_enceladussynd"},"update")}},munitions_depot:{id:"space-munitions_depot",title:t("tech_munitions_depot"),desc:t("tech_munitions_depot"),category:"storage",era:"solar",reqs:{enceladus:5},path:["truepath"],cost:{Money(r){return f("munitions_depot",r,5e6,1.22)},Iron(r){return f("munitions_depot",r,185e3,1.22)},Sheet_Metal(r){return f("munitions_depot",r,1e5,1.22)}},effect(){let r=25;return`
${t("plus_max_crates",[r])}
${t("plus_max_containers",[r])}
`},action(){return u($(this)[0])?(e.space.munitions_depot.count++,e.resource.Crates.max+=25,e.resource.Containers.max+=25,e.resource.Containers.display||Yr(),!0):!1}}},spc_triton:{info:{name(){return W().triton},desc(){return t("space_triton_info_desc",[W().triton,A[e.race.species].home])},zone:"outer",syndicate(){return!!(e.tech.triton&&e.tech.triton>=2)},syndicate_cap(){return e.tech.outer&&e.tech.outer>=4?5e3:3e3},extra(r){e.tech.triton&&e.tech.triton>=3&&($(`#${r}`).append(`
${t("space_ground_resist")}
`),D({el:`#${r}resist`,data:e.space.fob,methods:{threat(a,i){let s=e.civic.garrison.wounded-We();s<0&&(s=0);let n=+(a-mt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[W().triton])},desc(){return t("space_mission_desc",[W().triton])},reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete(){return e.tech.triton>=1?0:1},cost:{Helium_3(r,a){return+Ae(6e5,!1,a).toFixed(0)},Elerium(){return 2500}},effect(){return t("space_triton_mission_effect",[W().triton])},action(){return u($(this)[0])?(I(t("space_triton_mission_action",[W().triton]),"info",!1,["progress"]),e.space.syndicate.spc_triton=1250,e.space.syndicate.spc_titan+=250,e.space.syndicate.spc_enceladus+=250,!0):!1}},fob:{id:"space-fob",title:t("space_fob_title"),desc(){return`
${t("tech_fob")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{triton:2},path:["truepath"],queue_complete(){return 1-e.space.fob.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,25e7,1.1)},Copper(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,8e6,1.1)},Uranium(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,5e4,1.1)},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,25e5,1.1)},Graphene(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,3e6,1.1)},Sheet_Metal(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,75e5,1.1)},Quantium(r){return(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:f("fob",r,5e5,1.1)},Horseshoe(r){return e.race.hooved&&(r||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)<1?10:0}},effect(r){let a=We(),i=We(!0),s=`
${t("galaxy_defense_platform_effect",[500])}
`;s+=t("plus_max_resource",[N(10),t("civics_garrison_soldiers")]),s+=`
${t("civics_garrison_soldiers")}: ${a} / ${i}
`,s+=`
${t("civics_garrison_wounded")}: ${e.civic.garrison?e.civic.garrison.wounded:0}
`,s+=`
${t("space_fob_landed",[e.space.fob?e.space.fob.troops:0])}
`;let n=+Ae(125,!0,r).toFixed(2);return s+`
${t("requires_power_combo_effect",[$(this)[0].powered(),n,e.resource.Helium_3.name])}
`},powered(){return _e(50)},action(){return e.space.fob.count<1&&u($(this)[0])?(e.space.fob.count++,re($(this)[0]),!0):!1},post(){e.tech.triton===2&&(e.tech.triton=3,ue(),Pt(),I(t("space_fob_msg"),"info",!1,["progress"]))}},lander:{id:"space-lander",title:t("space_lander_title"),desc(){return`
${t("space_lander_title")}
${t("requires_soldiers")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{triton:3},path:["truepath"],cost:{Money(r){return f("lander",r,24e5,1.15)},Aluminium(r){return f("lander",r,185e3,1.15)},Neutronium(r){return f("lander",r,1e4,1.15)},Nano_Tube(r){return f("lander",r,158e3,1.15)}},powered(){return 0},effect(r){let a=+Ae(50,!0,r).toFixed(2),i="";return e.space.crashed_ship&&e.space.crashed_ship.count===100&&(i=`
${t("space_lander_effect3",[T("lander"),e.resource.Cipher.name])}
`),`
${t("space_lander_effect",[W().triton])}
${i}
${t("space_lander_effect2",[N(3)])}
${t("space_red_space_barracks_effect2",[a])}
`},action(){return u($(this)[0])?(e.space.lander.count++,e.space.lander.on++,!0):!1}},crashed_ship:{id:"space-crashed_ship",title:t("space_crashed_ship_title"),desc(){return`
${t("space_crashed_ship_title")}
`},reqs:{triton:3},path:["truepath"],queue_complete(){return 0},cost:{},effect(){let r=e.space.crashed_ship?e.space.crashed_ship.count:0;return`
${t("space_crashed_ship_effect",[r])}
`},action(){return!1}}},spc_kuiper:{info:{name(){return t("space_kuiper_title")},desc(){return t("space_kuiper_desc")},zone:"outer",syndicate(){return!!e.tech.kuiper},syndicate_cap(){return 2500}},kuiper_mission:{id:"space-kuiper_mission",title(){return t("space_mission_title",[t("space_kuiper_title")])},desc(){return t("space_mission_desc",[t("space_kuiper_title")])},reqs:{outer:7},grant:["kuiper",1],path:["truepath"],queue_complete(){return e.tech.kuiper>=1?0:1},cost:{Helium_3(r,a){return+Ae(1e6,!1,a).toFixed(0)},Elerium(){return 1e3}},effect(){return t("space_kuiper_mission_effect")},action(){return u($(this)[0])?(e.space.orichalcum_mine={count:0,on:0},e.space.uranium_mine={count:0,on:0},e.space.neutronium_mine={count:0,on:0},e.space.syndicate.spc_kuiper=500,I(t("space_kuiper_mission_action"),"info",!1,["progress"]),!0):!1}},orichalcum_mine:{id:"space-orichalcum_mine",title(){return t("space_kuiper_mine",[e.resource.Orichalcum.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Orichalcum.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("orichalcum_mine",r,25e6,1.25)},Graphene(r){return f("orichalcum_mine",r,9e5,1.25)},Elerium(r){return f("orichalcum_mine",r,200,1.25)},Mythril(r){return f("orichalcum_mine",r,45e4,1.25)},Quantium(r){return f("orichalcum_mine",r,15e4,1.25)}},effect(r){let a=+T("orichalcum_mine").toFixed(3),i=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Orichalcum_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(10)},p_fuel(){return{r:"Oil",a:200}},action(){return u($(this)[0])?(e.space.orichalcum_mine.count++,e.resource.Orichalcum.display=!0,re($(this)[0]),!0):!1}},uranium_mine:{id:"space-uranium_mine",title(){return t("space_kuiper_mine",[e.resource.Uranium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Uranium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("uranium_mine",r,5e6,1.25)},Iridium(r){return f("uranium_mine",r,25e4,1.25)},Steel(r){return f("uranium_mine",r,62e4,1.25)}},effect(r){let a=+T("uranium_mine").toFixed(3),i=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Uranium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(5)},p_fuel(){return{r:"Oil",a:60}},action(){return u($(this)[0])?(e.space.uranium_mine.count++,re($(this)[0]),!0):!1}},neutronium_mine:{id:"space-neutronium_mine",title(){return t("space_kuiper_mine",[e.resource.Neutronium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Neutronium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:1},path:["truepath"],cost:{Money(r){return f("neutronium_mine",r,8e6,1.25)},Adamantite(r){return f("neutronium_mine",r,65e4,1.25)},Stanene(r){return f("neutronium_mine",r,125e4,1.25)}},effect(r){let a=+T("neutronium_mine").toFixed(3),i=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Neutronium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(8)},p_fuel(){return{r:"Oil",a:60}},action(){return u($(this)[0])?(e.space.neutronium_mine.count++,re($(this)[0]),!0):!1}},elerium_mine:{id:"space-elerium_mine",title(){return t("space_kuiper_mine",[e.resource.Elerium.name])},desc(){return`
${t("space_kuiper_mine",[e.resource.Elerium.name])}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{kuiper:2},path:["truepath"],cost:{Money(r){return f("elerium_mine",r,2e7,1.25)},Titanium(r){return f("elerium_mine",r,25e4,1.25)},Neutronium(r){return f("elerium_mine",r,12e4,1.25)},Orichalcum(r){return f("elerium_mine",r,175e3,1.25)}},effect(r){let a=+T("elerium_mine").toFixed(3),i=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(1);return`
${t("gain",[a,t("resource_Elerium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return _e(12)},p_fuel(){return{r:"Oil",a:125}},action(){return u($(this)[0])?(e.space.elerium_mine.count++,re($(this)[0]),!0):!1}}},spc_eris:{info:{name(){return W().eris},desc(){return t("space_eris_info_desc",[W().eris])},support:"drone_control",zone:"outer",syndicate(){return!!e.tech.eris},syndicate_cap(){return 7500},extra(r){e.tech.eris&&e.tech.eris===1&&($(`#${r}`).append(`
${t("space_scanned")} {{ eris_scan }}%
`),D({el:`#${r}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[W().eris])},desc(){return t("space_mission_desc",[W().eris])},reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete(){return e.tech.eris>=1?0:1},cost:{Helium_3(r,a){return+Ae(125e4,!1,a).toFixed(0)},Elerium(){return 1250}},effect(){return t("space_eris_mission_effect",[W().eris])},action(){return u($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[W().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[W().titan])},desc(){return`
${t("space_drone_control",[W().titan])}
${t("requires_power_combo",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(r){return f("drone_control",r,75e6,1.3)},Neutronium(r){return f("drone_control",r,1e5,1.3)},Stanene(r){return f("drone_control",r,45e4,1.3)},Quantium(r){return f("drone_control",r,3e5,1.3)}},effect(){let r=$(this)[0].p_fuel().a;return`
+${t("galaxy_alien2_support",[$(this)[0].support(),W().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),r,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return _e(25)},p_fuel(){return{r:"Uranium",a:5}},action(){return u($(this)[0])?(e.space.drone_control.count++,re($(this)[0]),!0):!1}},shock_trooper:{id:"space-shock_trooper",title:t("space_shock_trooper_title"),desc(){return`
${t("space_shock_trooper_title")}
${t("space_support",[W().eris])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(r){return f("shock_trooper",r,425e4,1.225)},Polymer(r){return f("shock_trooper",r,375e3,1.225)},Adamantite(r){return f("shock_trooper",r,5e5,1.225)},Graphene(r){return f("shock_trooper",r,22e4,1.225)},Elerium(r){return f("shock_trooper",r,350,1.225)}},effect(){let r=Math.round(mt(1,"army",0)*yt("spc_eris")),a=`
${t("space_used_support",[W().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(a=`
${t("space_lander_effect3",[T("shock_trooper"),e.resource.Cipher.name])}
`),a+`
${t("space_digsite_offense",[r])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.shock_trooper.count++,re($(this)[0]),!0):!1}},tank:{id:"space-tank",title:t("space_tank_title"),desc(){return`
${t("space_tank_title")}
${t("space_support",[W().eris])}
`},reqs:{eris:4},path:["truepath"],cost:{Money(r){return f("tank",r,1e8,1.25)},Alloy(r){return f("tank",r,125e4,1.25)},Orichalcum(r){return f("tank",r,6e5,1.25)},Mythril(r){return f("tank",r,5e5,1.25)},Uranium(r){return f("tank",r,25e3,1.25)}},effect(){let r=Math.round(100*yt("spc_eris")),a=`
${t("space_used_support",[W().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(a=`
${t("space_lander_effect3",[T("tank"),e.resource.Cipher.name])}
`),a+`
${t("space_digsite_offense",[r])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.space.tank.count++,re($(this)[0]),!0):!1}},digsite:{id:"space-digsite",title:t("space_digsite_title"),desc(){return`
${t("space_digsite_title")}
`},reqs:{eris:3},path:["truepath"],queue_complete(){return 0},cost:{},effect(){let r=e.space.digsite?e.space.digsite.count:0;return`
${t("space_crashed_ship_effect",[r])}
`},action(){return!1}}}},Ye={tau_star:{info:{name(){return t("tab_tauceti")},desc(){return t("tau_star",[t("tab_tauceti"),t("space_sun_info_name")])}},ringworld:{id:"tauceti-ringworld",title:t("tau_star_ringworld"),desc(r){return!e.tauceti.hasOwnProperty("ringworld")||e.tauceti.ringworld.count<1e3||r?`
${t("tau_star_ringworld")}
${t("requires_segments",[1e3])}
`:`
${t("tau_star_ringworld")}
`},reqs:{matrix:2},path:["truepath"],queue_size:50,queue_complete(){return 1e3-e.tauceti.ringworld.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?1e7:1e8:0},Neutronium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e4:1e5:0},Nano_Tube(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?7e4:35e4:0},Adamantite(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e5:1e6:0},Bolognium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?17600:88e3:0},Orichalcum(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?25e3:125e3:0},Unobtainium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?360:1800:0},Quantium(r){return(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?Jr(e.race.lone_survivor?10100:101e3):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0);if(i<1e3){let s=1e3-i;a+=`
${t("tau_star_ringworld_effect")}
`,a+=`
${t("space_dwarf_collider_effect2",[s])}
`}else a+=`
${t("space_dwarf_reactor_effect1",[e.race.lone_survivor?100:1e4])}
`;return a},action(){return u($(this)[0])&&e.tauceti.ringworld.count<1e3?(e.tauceti.ringworld.count++,e.tauceti.ringworld.count>=1e3&&(e.race.lone_survivor?e.tech.eden=1:(e.tech.matrix=3,e.tauceti.matrix={count:1,on:0}),Fr(),Ie()),!0):!1}},matrix:{id:"tauceti-matrix",title:t("tau_star_matrix"),desc(){return`
${t("tau_star_matrix")}
${t("requires_power")}
`},reqs:{matrix:3},condition(){return e.tauceti.ringworld.count>=1e3},queue_complete(){return 0},cost:{},powered(){return 1e4},postPower(r){r?setTimeout(function(){e.tech.matrix=k.matrix?4:3,Fr()},250):(e.tech.matrix=3,Fr())},effect(){let r=qo(),a=$(this)[0].powered(),i=a>0?`
${t("minus_power",[a])}
`:"";return`
${t("tau_star_matrix_effect")}
${r}${i}`},action(){return!1}},blue_pill:{id:"tauceti-blue_pill",title:t("tau_star_blue_pill"),desc:t("tau_star_blue_pill"),wiki:!1,reqs:{matrix:4},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=qo();return`
${t("tau_star_blue_pill_effect")}
${r}`},action(){if(u($(this)[0])){let l=function(){a.fillStyle="#0001",a.fillRect(0,0,i,s),a.fillStyle="#0f0",a.font="15pt monospace",c.forEach((o,d)=>{let h=String.fromCharCode(Math.rand(65382,65438)),_=d*20;a.fillText(h,_,o),o>100+Math.random()*1e4?c[d]=0:c[d]=o+20})};$("body").append('');let r=document.getElementById("matrix"),a=r.getContext("2d"),i=r.width=document.body.offsetWidth,s=r.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);return setInterval(l,50),setTimeout(function(){no()},5e3),!0}return!1}},goe_facility:{id:"tauceti-goe_facility",title:t("tau_star_goe_facility"),desc(){return`
${t("tau_star_goe_facility")}
`},reqs:{eden:2},condition(){return e.tauceti.ringworld.count>=1e3},queue_complete(){return 0},cost:{Money(r){return 1e6},Copper(r){return 1e7},Graphene(r){return 5e6},Stanene(r){return 8e6},Elerium(r){return 1e4}},effect(){let r=fu();return`
${t("tau_star_goe_facility_effect")}
${r}`},action(){if(u($(this)[0])){let r=jr(Ye.tau_star.goe_facility);return Object.keys(r).forEach(function(a){e.resource[a].amount+=r[a]()}),oo(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[A[e.race.species].home])},desc(){return t("tau_home",[A[e.race.species].home])},support:"orbital_station",extra(r){e.tech.tau_home&&e.tech.tau_home>=2&&!yr()&&($(`#${r}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),D({el:`#${r}Mats`,data:e.resource.Materials,methods:{tauShow(){return!yr()}},filters:{round(a){return+a.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[A[e.race.species].home])},desc(){return t("tau_new_mission_title",[A[e.race.species].home])},reqs:{tauceti:2},grant:["tau_home",1],path:["truepath"],queue_complete(){return e.tech.tau_home>=1?0:1},cost:{Money(){return 1e9}},effect(){return t("tau_new_mission_effect",[A[e.race.species].home])},action(){return u($(this)[0])?(e.tauceti.colony={count:0,on:0},e.tauceti.mining_pit={count:0,on:0},I(t("tau_home_mission_result",[A[e.race.species].home]),"info",!1,["progress"]),!0):!1}},dismantle:{id:"tauceti-dismantle",title(){return t("tau_home_dismantle")},desc(){return t("tau_home_dismantle")},reqs:{tau_home:1},grant:["tau_home",2],path:["truepath"],queue_complete(){return e.tech.tau_home>=2?0:1},cost:{Money(){return 1e8}},effect(){let r="Explorer";if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let a=e.space.shipyard.ships.findIndex(i=>i.location==="tauceti"&&i.class==="explorer");a!==-1&&(r=e.space.shipyard.ships[a].name)}return t("tau_home_dismantle_effect",[r])},action(){let r=-1;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")&&(r=e.space.shipyard.ships.findIndex(a=>a.location==="tauceti"&&a.class==="explorer")),r>=0&&u($(this)[0])){if(e.space.shipyard.ships.splice(r,1),e.tauceti.orbital_station.count++,e.tauceti.colony.count++,e.tauceti.mining_pit.count++,e.civic.pit_miner.display=!0,e.resource.Materials.display=!0,e.city.powered&&e.city.power>=Ye.tau_home.orbital_station.powered()){e.tauceti.orbital_station.on++,e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let a=N(4);e.civic.pit_miner.max+=a;let i=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=i,e.civic.pit_miner.workers+=i}return e.settings.tabLoad&&yi(),!0}return!1}},orbital_station:{id:"tauceti-orbital_station",title:t("tau_home_orbital_station"),desc:`
${t("tau_home_orbital_station")}
${t("requires_power")}
`,reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("orbital_station",r,8e7,1.3,"tauceti")},Materials(r){return yr()?0:f("orbital_station",r,5e5,1.3,"tauceti")},Helium_3(r){return yr()?f("orbital_station",r,ze(25e4),1.3,"tauceti"):0},Copper(r){return yr()?f("orbital_station",r,125e4,1.3,"tauceti"):0},Adamantite(r){return yr()?f("orbital_station",r,9e5,1.3,"tauceti"):0}},effect(){let r=H(15e3),a=+ze($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[A[e.race.species].home]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Helium_3.name])}
`,i=i+`
${t("spend_power",[a,e.resource[$(this)[0].support_fuel().r].name,$(this)[0].powered()])}
`,i},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?5:25:400}},support(){return 3},powered(){return _e(e.tech.isolation?e.race.lone_survivor?4:6:30)},refresh:!0,action(){return u($(this)[0])?(e.tauceti.orbital_station.count++,re($(this)[0]),!0):!1}},colony:{id:"tauceti-colony",title:t("tau_home_colony"),desc(){return`
${t("tau_home_colony_desc",[A[e.race.species].home])}
${t("requires_power_support_combo",[A[e.race.species].home,e.resource.Food.name])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("colony",r,1575e4,1.225,"tauceti")},Materials(r){return yr()?0:f("colony",r,65e4,1.225,"tauceti")},Furs(r){return yr()?f("colony",r,72e4,1.225,"tauceti"):0},Graphene(r){return yr()?f("colony",r,485e3,1.225,"tauceti"):0},Brick(r){return yr()?f("colony",r,Jr(88e4),1.225,"tauceti"):0}},effect(){let r=$(this)[0].citizens(),a=e.tech.isolation?900:250,i=+$(this)[0].support_fuel().a.toFixed(1),s=`
${t("tau_new_support",[$(this)[0].support(),A[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[r])}
`),e.tech.isolation){let n=Ar()*25;n=H(n),n=(+n.toFixed(0)).toLocaleString(),s=s+`
${t("plus_max_resource",[`$${n}`,t("resource_Money_name")])}
`}if(s=s+`
${t("tau_home_colony_effect",[50,A[e.race.species].home])}
`,e.tech.isolation){let n=ge("gaslighter",0),c=(n?n+e.tech.broadcast:e.tech.broadcast)*2;s=s+`
${t("space_red_vr_center_effect1",[c])}
`}return s=s+`
${t("plus_max_resource",[a,t("resource_Crates_name")])}
${t("plus_max_resource",[a,t("resource_Containers_name")])}
`,e.race.lone_survivor?s=s+`
${t("gain",[-i,e.resource[$(this)[0].support_fuel().r].name])}
`:s=s+`
${t("spend",[i,e.resource[$(this)[0].support_fuel().r].name])}
`,s},s_type:"tau_home",support(){return-2},support_fuel(){return{r:"Food",a:e.tech.isolation?e.race.lone_survivor?-2:75:1e3}},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.colony.count++,re($(this)[0]),e.resource.Containers.display||Yr(),!0):!1},citizens(){let r=e.tech.isolation?8:5;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),e.race.lone_survivor?0:r}},tau_housing:{id:"tauceti-tau_housing",title(){return St("small")},desc(){return $(this)[0].citizens()===1?t("city_basic_housing_desc"):t("city_basic_housing_desc_plural",[$(this)[0].citizens()])},category:"residential",reqs:{housing:1,isolation:1},condition(){return!e.race.lone_survivor},cost:{Money(r){return f("tau_housing",r,15e4,1.15,"tauceti")},Lumber(r){return e.race.kindling_kindred||e.race.smoldering?0:f("tau_housing",r,125e3,1.25,"tauceti")},Stone(r){return e.race.kindling_kindred?f("tau_housing",r,125e3,1.25,"tauceti"):0},Chrysotile(r){return e.race.smoldering?f("tau_housing",r,5e4,1.25,"tauceti"):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[r,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[r,t("citizen")])},action(){return u($(this)[0])?(e.tauceti.tau_housing.count++,!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},captive_housing:hr("captive_housing","tauceti"),pylon:{id:"tauceti-pylon",title:t("tau_home_pylon"),desc:t("tau_home_pylon"),reqs:{magic:2},condition(){return!!(e.tech.isolation&&e.tauceti.hasOwnProperty("pylon"))},cost:{Money(r){return f("pylon",r,50,1.48,"tauceti")},Stone(r){return f("pylon",r,100,1.42,"tauceti")},Crystal(r){return f("pylon",r,8,1.42,"tauceti")-3}},effect(){let r=H(2),a=+(.0125*ft("magic")).toFixed(3);return`
${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.tauceti.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},cloning_facility:{id:"tauceti-cloning_facility",title:t("tau_home_cloning"),desc(){return t("tau_home_cloning_desc",[A[e.race.species].name])},category:"military",reqs:{cloning:1},path:["truepath"],queue_complete(){return e.resource[e.race.species].max-e.resource[e.race.species].amount},cost:{Money(r){return e.resource[e.race.species].amount?f("citizen",r,Math.round((e.race.high_pop?1e5:125e3)/N(1)),e.race.high_pop?1.01:1.02,"tauceti",e.race.high_pop?1.003:1.005):0},Copper(r){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?f("citizen",r,Math.round(50/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Aluminium(r){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?f("citizen",r,Math.round(50/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Nanite(r){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?f("citizen",r,Math.round(500/N(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0}},effect(){let r="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(r=`
${t("city_assembly_effect_warn")}
`),`
${t("tau_home_cloning_effect",[A[e.race.species].name])}
${r}`},action(){return e.resource[e.race.species].max>e.resource[e.race.species].amount&&u($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}},horseshoe:hr("horseshoe","tauceti"),bonfire:hr("bonfire","tauceti"),firework:hr("firework","tauceti"),assembly:hr("assembly","tauceti"),nanite_factory:hr("nanite_factory","tauceti"),tau_farm:{id:"tauceti-tau_farm",title:t("tau_home_tau_farm"),desc(){return`
${t("tau_home_tau_farm")}
${t("requires_power")}
`},reqs:{tau_home:7},path:["truepath"],cost:{Money(r){return f("tau_farm",r,135e6,1.25,"tauceti")},Stone(r){return f("tau_farm",r,921e4,1.25,"tauceti")},Steel(r){return f("tau_farm",r,6295e3,1.25,"tauceti")},Water(r){return f("tau_farm",r,1e4,1.25,"tauceti")}},effect(){let r=`
${t("space_red_spaceport_effect1",[t("tau_planet",[A[e.race.species].home]),$(this)[0].support()])}
`;if(r=r+`
${t("produce",[+T("tau_farm","food").toFixed(2),e.resource.Food.name])}
`,!e.race.kindling_kindred&&!e.race.smoldering&&(r=r+`
${t("produce",[+T("tau_farm","lumber").toFixed(2),e.resource.Lumber.name])}
`),e.tech.isolation){let a=+T("tau_farm","water").toFixed(2);if(r=r+`
${t("produce",[a,e.resource.Water.name])}
`,e.race.artifical){let i=H(350);r=r+`
${t("city_transmitter_effect",[i])}
`}}return r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},support(){return 1},powered(){return _e(e.tech.isolation?1:4)},action(){return u($(this)[0])?(e.tauceti.tau_farm.count++,re($(this)[0]),!0):!1}},mining_pit:{id:"tauceti-mining_pit",title:t("tau_home_mining_pit"),desc(){return`
${t("tau_home_mining_pit")}
${t("space_support",[A[e.race.species].home])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(r){return f("mining_pit",r,425e4,1.225,"tauceti")},Materials(r){return yr()?0:f("mining_pit",r,35e4,1.225,"tauceti")},Lumber(r){return yr()?f("mining_pit",r,235e4,1.225,"tauceti"):0},Iron(r){return yr()?f("mining_pit",r,835e3,1.225,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),A[e.race.species].home])}
`;if(r=r+`
${t("plus_max_resource",[N(e.tech.isolation?6:8),t("job_pit_miner")])}
`,!yr())r=r+`
${t("plus_max_resource",[1e6,t("resource_Materials_name")])}
`,r=r+`
${t("tau_home_mining_pit_effect",[e.resource.Materials.name])}
`;else if(e.tech.isolation){if(e.race.lone_survivor){let a=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Iron.name,e.resource.Aluminium.name,e.resource.Coal.name];e.race.smoldering?(a.push(e.resource.Chrysotile.name),r=r+`
${t("tau_home_mining_pit_effect2cs",a)}
`):r=r+`
${t("tau_home_mining_pit_effect2c",a)}
`}else{let a=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Coal.name];e.race.smoldering?(a.push(e.resource.Chrysotile.name),r=r+`
${t("tau_home_mining_pit_effect2bs",a)}
`):r=r+`
${t("tau_home_mining_pit_effect2b",a)}
`}r=r+`
${t("tau_gas_womling_station_effect",[8,e.resource.Cement.name])}
`}else r=r+`
${t("tau_home_mining_pit_effect2",[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name])}
`;return r},s_type:"tau_home",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.mining_pit.count++,re($(this)[0]),!0):!1}},excavate:{id:"tauceti-excavate",title:t("tau_home_excavate"),desc(){return`
${t("tau_home_excavate")}
`},reqs:{tau_home:2},grant:["tau_home",3],path:["truepath"],cost:{Money(r){return 165e7},Materials(r){return 75e4}},effect(){return t("tau_home_excavate_effect")},action(){return u($(this)[0])?(I(t("tau_home_excavate_msg"),"info",!1,["progress"]),!0):!1}},alien_outpost:{id:"tauceti-alien_outpost",title:t("tech_alien_outpost"),desc(){return`
${t("tech_alien_outpost")}
${t("requires_power")}
`},reqs:{tau_home:4},path:["truepath"],cost:{},queue_complete(){return 0},effect(){let r=`
${t("plus_max_resource",["20%",t("resource_Knowledge_name")])}
`;return e.tech.isolation&&(r=r+`
${t("plus_max_resource",[(e.race.lone_survivor?35e5:65e5).toLocaleString(),t("resource_Knowledge_name")])}
`,r=r+`
${t("plus_max_resource",[2e5.toLocaleString(),e.resource.Cipher.name])}
`,r=r+`
${t("space_lander_effect3",[T("alien_outpost"),e.resource.Cipher.name])}
`),e.tech.outpost_boost&&(r=r+`
${t("tech_alien_outpost_effect2")}
`),e.race.lone_survivor&&(r=r+`
${t("city_wardenclyffe_effect1",[N(1),e.civic.professor.name])}
`),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.tech.isolation?e.race.lone_survivor?8:25:100)},special(){return!!e.tech.replicator},action(){return!1}},jump_gate:{id:"tauceti-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.tauceti.hasOwnProperty("jump_gate")||e.tauceti.jump_gate.count<100||r?`
${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`
${t("tau_jump_gate")}
`},reqs:{tauceti:3},condition(){return e.tech.isolation?0:1},path:["truepath"],queue_size:10,queue_complete(){return 100-e.tauceti.jump_gate.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?1e6:0},Materials(r){return(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?12500:0}},effect(r){let a=(r||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0);if(a<100){let i=100-a;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.tauceti.jump_gate.count<100?(e.tauceti.jump_gate.count++,!0):!1}},fusion_generator:{id:"tauceti-fusion_generator",title:t("tech_fusion_generator"),desc(){return`
${t("tech_fusion_generator")}
${t("requires_res",[e.resource.Helium_3.name])}
`},reqs:{tau_home:6},path:["truepath"],cost:{Money(r){return f("fusion_generator",r,188e6,1.25,"tauceti")},Iridium(r){return f("fusion_generator",r,555e4,1.25,"tauceti")},Stanene(r){return f("fusion_generator",r,7003500,1.25,"tauceti")},Sheet_Metal(r){return f("fusion_generator",r,Jr(95e3),1.25,"tauceti")}},effect(){let r=+ze($(this)[0].p_fuel().a).toFixed(1),a=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;return e.race.lone_survivor?a=a+`
${t("gain",[-r,e.resource[$(this)[0].p_fuel().r].name])}
`:a=a+`
${t("spend",[r,e.resource[$(this)[0].p_fuel().r].name])}
`,a},p_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?-15:75:500}},powered(){return dt(-32)},action(){return u($(this)[0])?(e.tauceti.fusion_generator.count++,e.tauceti.fusion_generator.on++,!0):!1}},repository:{id:"tauceti-repository",title:t("tech_repository"),desc:t("tech_repository"),reqs:{tau_home:5},path:["truepath"],cost:{Money(r){return f("repository",r,1028e4,1.28,"tauceti")},Iron(r){return f("repository",r,18e5,1.28,"tauceti")},Cement(r){return f("repository",r,15e5,1.28,"tauceti")},Neutronium(r){return f("repository",r,215e3,1.28,"tauceti")}},wide:!0,res(){let r=["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Crystal","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite","Unobtainium"];return e.tech.isolation&&(r.push("Oil"),r.push("Helium_3"),r.push("Uranium"),r.push("Water")),r},val(r){switch(r){case"Lumber":return 3e4;case"Stone":return 3e4;case"Chrysotile":return 3e4;case"Crystal":return 10;case"Furs":return 17e3;case"Copper":return 15200;case"Iron":return 14e3;case"Aluminium":return 12800;case"Cement":return 11200;case"Coal":return 4800;case"Steel":return 2400;case"Titanium":return 1600;case"Alloy":return 1800;case"Polymer":return 1500;case"Iridium":return 1750;case"Nano_Tube":return 1200;case"Neutronium":return 640;case"Adamantite":return 720;case"Unobtainium":return 1e3;case"Oil":return 680;case"Helium_3":return 575;case"Uranium":return 125;case"Water":return 15;case"Elerium":return 3;default:return 0}},effect(){let r='
',a=Fa("repository"),i=250;for(let s of $(this)[0].res())if(e.resource[s].display){let n=Ee(+(H($(this)[0].val(s))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return e.tech.isolation&&(r=r+`${t("plus_max_resource",[i,t("resource_Crates_name")])}${t("plus_max_resource",[i,t("resource_Containers_name")])}`),r=r+"
",r},action(){if(u($(this)[0])){e.tauceti.repository.count++;let r=250;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Fa("repository");for(let i of $(this)[0].res())e.resource[i].display&&(e.resource[i].max+=H($(this)[0].val(i))*a);return!0}return!1}},tau_factory:{id:"tauceti-tau_factory",title:t("tau_home_tau_factory"),desc(){return`
${t("tau_home_tau_factory")}
${t("requires_power_support",[A[e.race.species].home])}
`},reqs:{tau_home:8},path:["truepath"],cost:{Money(r){return f("tau_factory",r,269e6,1.25,"tauceti")},Titanium(r){return f("tau_factory",r,3e6,1.25,"tauceti")},Elerium(r){return f("tau_factory",r,850,1.25,"tauceti")},Bolognium(r){return f("tau_factory",r,25e4,1.25,"tauceti")},Quantium(r){return f("tau_factory",r,Jr(425e3),1.25,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),A[e.race.species].home])}
`;return r=r+`
${t("tau_home_tau_factory_effect",[e.tech.isolation?5:3])}
`,e.tech.isolation&&(e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[N(2)])}
`),r=r+`
${t("space_red_fabrication_effect1",[N(5)])}
`),r=r+`
${t("city_crafted_mats",[e.tech.isolation?275:90])}
`,r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},special:!0,s_type:"tau_home",support(){return-1},powered(){return _e(e.tech.isolation?2:5)},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,re($(this)[0]),!0):!1}},infectious_disease_lab:{id:"tauceti-infectious_disease_lab",title(){return e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},desc(){return`
${$(this)[0].title()}
${t("requires_power_support",[A[e.race.species].home])}
`},reqs:{disease:1},path:["truepath"],cost:{Money(r){return f("infectious_disease_lab",r,1e9,1.25,"tauceti")},Alloy(r){return f("infectious_disease_lab",r,325e5,1.25,"tauceti")},Polymer(r){return f("infectious_disease_lab",r,5e7,1.25,"tauceti")},Bolognium(r){return f("infectious_disease_lab",r,25e5,1.25,"tauceti")},Unobtainium(r){return f("infectious_disease_lab",r,64e3,1.25,"tauceti")}},effect(){let r=39616;if(e.tech.supercollider&&e.tech.isolation){let i=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/i+1}let a=`
${t("tau_new_support",[$(this)[0].support(),A[e.race.species].home])}
`;if(a=a+`
${t("city_max_knowledge",[Math.round(r).toLocaleString()])}
`,e.tech.isolation){let i=H(375);a=a+`
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
`,a=a+`
${t("city_wardenclyffe_effect1",[N(2),e.civic.professor.name])}
`,a=a+`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,a=a+`
${t("space_zero_g_lab_effect",[N(1)])}
`,a=a+`
${t("city_library_effect",[75])}
`}return e.tech.alien_crafting&&(a=a+`
${t("tau_gas_womling_station_effect",[65,e.resource.Quantium.name])}
`),e.tech.focus_cure&&(a=a+`
${t("tau_home_disease_lab_cure",[+e.tauceti.infectious_disease_lab.cure.toFixed(1)])}
`,e.race.hasOwnProperty("vax")&&(a=a+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`)),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},s_type:"tau_home",support(){return-1},powered(){return _e(e.tech.isolation?e.race.lone_survivor?2:8:35)},action(){return u($(this)[0])?(e.tauceti.infectious_disease_lab.count++,re($(this)[0]),!0):!1},post(){e.tech.disease===1&&(e.tech.disease=2,I(t("tau_plague4",[t("tab_tauceti")]),"info",!1,["progress"]),ue()),Lt()},postPower(r){bi("Quantium")}},tauceti_casino:{id:"tauceti-tauceti_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money(r){return f("tauceti_casino",r,145e4,1.35,"tauceti")},Furs(r){return f("tauceti_casino",r,95e3,1.35,"tauceti")},Cement(r){return f("tauceti_casino",r,12e4,1.35,"tauceti")},Plywood(r){return f("tauceti_casino",r,Jr(55e3),1.35,"tauceti")}},effect(){let r=$(this)[0].citizens(),a=e.race.lone_survivor?"":`
${t("plus_max_resource",[r,t("citizen")])}
`;return a=a+ms(),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return _e(e.race.lone_survivor?1:2)},action(){return u($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),e.race.lone_survivor?0:r},flair:t("city_casino_flair")},tau_cultural_center:{id:"tauceti-tau_cultural_center",title:t("tech_cultural_center"),desc(){return`
${t("tech_cultural_center")}
${t("space_electrolysis_req",[e.resource[$(this)[0].p_fuel().r].name])}
`},category:"commercial",reqs:{tau_culture:1},path:["truepath"],cost:{Money(r){return f("tau_cultural_center",r,9145e4,1.35,"tauceti")},Copper(r){return f("tau_cultural_center",r,585e4,1.35,"tauceti")},Coal(r){return f("tau_cultural_center",r,465e3,1.35,"tauceti")},Polymer(r){return f("tau_cultural_center",r,3792e3,1.35,"tauceti")}},effect(){let r=8,a=1;e.civic.govern.type==="corpocracy"?a=2:e.civic.govern.type==="socialist"&&(a=.8);let i=20*a,s=5*a,n=15*a,c=`
${t("tau_home_cultureal_effect1",[$(this)[0].p_fuel().a,e.resource[$(this)[0].p_fuel().r].name,$(this)[0].title])}
`;return c+=`
${t("city_tourist_center_effect3",[i])}
`,c+=`
${t("city_tourist_center_effect4",[s])}
`,c+=`
${t("tau_home_cultureal_effect2",[r,t("tau_red_womlings")])}
`,e.tech.tau_culture>=2&&(c+=`
${t("tau_home_cultureal_effect3",[n,t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])}
`),c+=`
${t("minus_power",[$(this)[0].powered()])}
`,c},powered(){return _e(1)},p_fuel(){return{r:"Food",a:e.race.lone_survivor?25:500}},action(){return u($(this)[0])?(e.tauceti.tau_cultural_center.count++,e.tauceti.tau_cultural_center.on++,!0):!1}}},tau_red:{info:{name(){return t("tau_planet",[W().red])},desc(){return t("tau_red",[W().red])},support:"orbital_platform",extra(r){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${r}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),D({el:`#${r}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[W().red])},desc(){return t("tau_new_mission_title",[W().red])},reqs:{tauceti:2},grant:["tau_red",1],path:["truepath"],queue_complete(){return e.tech.tau_red>=1?0:1},cost:{Money(){return 1e9}},effect(){return t("tau_new_mission_effect",[W().red])},action(){return u($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[W().red]),"info",!1,["progress"]),!0):!1}},orbital_platform:{id:"tauceti-orbital_platform",title:t("tau_red_orbital_platform"),desc:`
${t("tau_red_orbital_platform")}
${t("requires_power")}
`,reqs:{tau_red:1,tauceti:4},path:["truepath"],cost:{Money(r){return f("orbital_platform",r,5e7,1.3,"tauceti")},Oil(r){return yr()?f("orbital_platform",r,ze(mu(275e3)),1.3,"tauceti"):0},Aluminium(r){return f("orbital_platform",r,178e4,1.3,"tauceti")},Bolognium(r){return f("orbital_platform",r,45e4,1.3,"tauceti")}},effect(){let r=H(17500),a=+ze($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[W().red]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Oil.name])}
`,i=i+`
${t("spend_power",[a,e.resource[$(this)[0].support_fuel().r].name,$(this)[0].powered()])}
`,i},support_fuel(){return{r:e.race.lone_survivor?"Helium_3":"Oil",a:e.tech.isolation?e.race.lone_survivor?8:32:125}},support(){let r=e.tech.womling_logistics?2.5:2;return e.race.lone_survivor&&(r*=2),r},powered(){return _e(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return yr()&&u($(this)[0])?(e.tauceti.orbital_platform.count++,re($(this)[0]),e.tech.tau_red===1&&(e.tech.tau_red=2,I(t("tau_red_orbital_platform_msg",[t("tau_planet",[W().red]),t("tau_planet",[A[e.race.species].home])]),"info",!1,["progress"])),!0):!1}},contact:{id:"tauceti-contact",title(){return t("tau_red_contact")},desc(){return t("tau_red_contact")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Money(){return 6e8},Food(){return e.race.lone_survivor&&e.race.artifical?62e3:25e5}},effect(){return t("tau_red_contact_effect")},action(){return u($(this)[0])?(e.race.womling_friend=1,Dn(),!0):!1}},introduce:{id:"tauceti-introduce",title(){return t("tau_red_introduce")},desc(){return t("tau_red_introduce")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Knowledge(){return 7e6}},effect(){return t("tau_red_introduce_effect")},action(){return u($(this)[0])?(e.race.womling_god=1,Dn(),!0):!1}},subjugate:{id:"tauceti-subjugate",title(){return t("tau_red_subjugate")},desc(){return t("tau_red_subjugate")},reqs:{tau_red:4},grant:["tau_red",5],path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{Money(){return 285e7}},effect(){return t("tau_red_subjugate_effect")},action(){return u($(this)[0])?(e.race.womling_lord=1,Dn(),!0):!1}},jeff:{id:"tauceti-jeff",title(){return t("tau_red_jeff")},desc(){return t("tau_red_jeff")},reqs:{tau_red:5},path:["truepath"],queue_complete(){return e.tech.tau_red>=5?0:1},cost:{},effect(){let r=e.tauceti.overseer?e.tauceti.overseer.injured:0;e.tauceti.overseer&&e.tauceti.overseer.pop${t("tau_red_jeff_effect1",[e.tauceti.overseer?e.tauceti.overseer.pop:0])}
`;return a=a+`
${t("tau_red_jeff_effect2",[e.tauceti.overseer?e.tauceti.overseer.working:0])}
`,a=a+`
${t("tau_red_jeff_effect3",[r])}
`,a=a+`
${t("tau_red_jeff_effect4",[e.tauceti.overseer?e.tauceti.overseer.loyal:0])}
`,a=a+`
${t("tau_red_jeff_effect5",[e.tauceti.overseer?e.tauceti.overseer.morale:0])}
`,e.tech.hasOwnProperty("womling_tech")&&(a=a+`
${t("tau_red_jeff_effect6",[e.tech.womling_tech])}
`),a=a+`
${t("job_farmer")}: ${e.tauceti.womling_farm?e.tauceti.womling_farm.farmers:0}
`,a=a+`
${t("job_miner")}: ${e.tauceti.womling_mine?e.tauceti.womling_mine.miners:0}
`,e.tauceti.womling_lab&&(a=a+`
${t("job_scientist")}: ${e.tauceti.womling_lab?e.tauceti.womling_lab.scientist:0}
`),a},action(){return!1}},overseer:{id:"tauceti-overseer",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[W().red])}
`},name(){return e.race.womling_lord?t("tau_red_overseer"):e.race.womling_god?t("tau_red_womgod"):t("tau_red_womally")},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("overseer",r,6e6,1.28,"tauceti")},Cement(r){return f("overseer",r,245e4,1.28,"tauceti")},Alloy(r){return e.race.womling_friend?f("overseer",r,185e4,1.28,"tauceti"):0},Neutronium(r){return e.race.womling_lord?f("overseer",r,165e3,1.28,"tauceti"):0},Titanium(r){return e.race.womling_god?f("overseer",r,225e4,1.28,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return r=r+`
${t("tau_red_overseer_effect",[$(this)[0].val()])}
`,r},val(){let r=0;return e.race.womling_lord?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_god?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?6:5:e.race.womling_friend&&(r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?10:8),e.race.lone_survivor&&(r*=2),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.overseer.count++,re($(this)[0]),!0):!1}},womling_village:{id:"tauceti-womling_village",title:t("tau_red_womling_village"),desc(){return`
${t("tau_red_womling_village")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_village",r,1e7,1.28,"tauceti")},Stone(r){return f("womling_village",r,225e4,1.28,"tauceti")},Plywood(r){return f("womling_village",r,Jr(125e4),1.28,"tauceti")},Wrought_Iron(r){return f("womling_village",r,Jr(4e5),1.28,"tauceti")}},effect(){let r=e.tech.womling_pop&&e.tech.womling_pop>=2?6:5,a=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return a=a+`
${t("tau_red_womling_village_effect",[r])}
`,e.tech.tau_junksale&&(a=a+`
${t("tau_red_womling_village_effect2",[40,t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`)])}
`),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_village.count++,re($(this)[0]),!0):!1}},womling_farm:{id:"tauceti-womling_farm",title:t("tau_red_womling_farm"),desc(){return`
${t("tau_red_womling_farm")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_farm",r,24e6,1.28,"tauceti")},Iron(r){return f("womling_farm",r,95e5,1.28,"tauceti")},Water(r){return f("womling_farm",r,5e3,1.28,"tauceti")}},effect(){let r=e.tech.womling_pop?16:12;e.tech.womling_gene&&(r+=4);let a=e.tauceti.hasOwnProperty("womling_farm")?e.tauceti.womling_farm.farmers:0,i=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return i=i+`
${t("tau_red_womling_farm_effect",[r])}
`,i=i+`
${t("tau_red_womling_employ",[2])}
`,e.tech.isolation&&(i=i+`
${t("tau_red_womling_generate",[e.resource.Furs.name])}
`),i=i+`
${t("tau_red_womling_farm_effect2",[r/2*a])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_farm.count++,re($(this)[0]),!0):!1}},womling_mine:{id:"tauceti-womling_mine",title:t("tau_red_womling_mine"),desc(){return`
${t("tau_red_womling_mine")}
${t("space_support",[W().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(r){return f("womling_mine",r,125e5,1.28,"tauceti")},Lumber(r){return f("womling_mine",r,128e5,1.28,"tauceti")},Steel(r){return f("womling_mine",r,45e5,1.28,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return e.tech.isolation?e.race.lone_survivor?r=r+`
${t("tau_red_womling_mine_effect_c",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name,e.resource.Iron.name,e.resource.Copper.name,e.resource.Aluminium.name,e.resource.Neutronium.name,e.resource.Iridium.name])}
`:r=r+`
${t("tau_red_womling_mine_effect_b",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name])}
`:r=r+`
${t("tau_red_womling_mine_effect_a",[e.resource.Unobtainium.name])}
`,r=r+`
${t("tau_red_womling_employ",[6])}
`,r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_mine.count++,e.resource.Unobtainium.display=!0,re($(this)[0]),!0):!1},flair(){return t("tau_red_womling_mine_flair")}},womling_fun:{id:"tauceti-womling_fun",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[W().red])}
`},name(){return e.race.womling_lord?t("tau_red_womling_fun1"):e.race.womling_god?t("tau_red_womling_fun2"):t("tau_red_womling_fun3")},reqs:{tau_red:6},path:["truepath"],cost:{Money(r){return f("womling_fun",r,38e5,1.28,"tauceti")},Food(r){return e.race.womling_friend?f("womling_fun",r,175e3,1.28,"tauceti"):0},Lumber(r){return f("womling_fun",r,5e5,1.28,"tauceti")},Stone(r){return f("womling_fun",r,5e5,1.28,"tauceti")},Furs(r){return e.race.womling_lord||e.race.womling_god?f("womling_fun",r,835e3,1.28,"tauceti"):0},Copper(r){return e.race.womling_lord?f("womling_fun",r,1125e3,1.28,"tauceti"):0},Alloy(r){return e.race.womling_god?f("womling_fun",r,656e3,1.28,"tauceti"):0},Water(r){return e.race.womling_friend?f("womling_fun",r,3500,1.28,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return r=r+`
${t("tau_red_womling_fun_effect",[$(this)[0].val()])}
`,r},val(){let r=0;return e.race.womling_lord?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?24:20:e.race.womling_god?r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_friend&&(r=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?18:15),e.race.lone_survivor&&(r*=2),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_fun.count++,re($(this)[0]),!0):!1}},womling_lab:{id:"tauceti-womling_lab",title:t("interstellar_laboratory_title"),desc(){return`
${t("interstellar_laboratory_title")}
${t("space_support",[W().red])}
`},reqs:{tau_red:7},path:["truepath"],cost:{Money(r){return f("womling_lab",r,65e6,1.28,"tauceti")},Elerium(r){return f("womling_lab",r,1200,1.28,"tauceti")},Orichalcum(r){return f("womling_lab",r,25e5,1.28,"tauceti")},Unobtainium(r){return f("womling_lab",r,1e4,1.28,"tauceti")},Quantium(r){return f("womling_lab",r,Jr(95e3),1.28,"tauceti")}},effect(){let r=e.tauceti.hasOwnProperty("overseer")?e.tauceti.overseer.prod:100,a=Math.round(25e3*r/100),i=`
${t("tau_new_support",[$(this)[0].support(),W().red])}
`;return i=i+`
${t("tau_red_womling_lab_effect",[a])}
`,i=i+`
${t("tau_red_womling_employ_single",[1])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.womling_lab.count++,re($(this)[0]),!0):!1}}},tau_gas:{info:{name(r,a){let i=a||"gas_name",s=i==="gas_name"?0:1;if(r||e.race[i])switch(r||e.race[i]){case 1:{let n=e.race.universe==="antimatter"?"plasmid":"antiplasmid";switch(Math.round(e.stats[n]+s)%3){case 1:return t("tau_planet",[W().gas]);case 2:return t("tau_gas_title0a",[W().gas]);default:return t("tau_gas_title0b",[W().gas])}}case 2:switch(Math.round(e.stats.reset+s)%3){case 1:return t("tau_gas_title1a");case 2:return t("tau_gas_title1b");default:return t("tau_gas_title1c")}case 3:switch(Math.round(e.stats.mad+s)%3){case 1:return t("tau_gas_title2a");case 2:return t("tau_gas_title2b");default:return t("tau_gas_title2c")}case 4:switch(Math.round(e.stats.bioseed+s)%3){case 1:return t("tau_gas_title3a",[A[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[A[e.race.old_gods].name]);default:return t("tau_gas_title3c",[A[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[W().gas]);case 2:return t("tau_gas_title4b",[tt("reverse",W().gas)]);default:return t("tau_gas_title4c")}case 6:switch(Math.round(e.stats.womling.friend.l+e.stats.womling.lord.l+e.stats.womling.god.l+s)%3){case 1:return t("tau_gas_title5a");case 2:return t("tau_gas_title5b");default:return t("tau_gas_title5c")}case 7:switch(Math.round(e.stats.tdays+s)%3){case 1:return t("tau_gas_title6a");case 2:return t("tau_gas_title6b");default:return t("tau_gas_title6c")}default:return i==="gas_name"?t("tau_gas_title"):t("tau_gas2_title")}return i==="gas_name"?t("tau_gas_title"):t("tau_gas2_title")},desc(){return t("tau_gas_desc")}},gas_contest:{id:"tauceti-gas_contest",title(){return t("tau_gas_contest_title")},desc(){return t("tau_gas_contest_title")},reqs:{tauceti:5},grant:["tau_gas",1],path:["truepath"],queue_complete(){return e.tech.tau_gas>=1?0:1},cost:{Money(){return 1e7}},effect(){return e.race.lone_survivor?t("tau_gas_contest_effect_alt"):t("tau_gas_contest_effect")},action(){return!!u($(this)[0])}},refueling_station:{id:"tauceti-refueling_station",title(){return t("tau_gas_refueling_station_title")},desc(){return`
${t("tau_gas_refueling_station_title")}
${t("requires_power")}
`},reqs:{tau_gas:2},path:["truepath"],cost:{Money(r){return f("refueling_station",r,68e6,1.28,"tauceti")},Graphene(r){return f("refueling_station",r,25e5,1.28,"tauceti")},Unobtainium(r){return f("refueling_station",r,5500,1.28,"tauceti")},Mythril(r){return f("refueling_station",r,Jr(6e4),1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:5)},effect(){let r=+T("refueling_station").toFixed(2),a=H(1e4),i=`
${t("space_gas_mining_effect1",[r])}
`;if(i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Helium_3.name])}
`,e.tech.tau_whale>=2){let s=H(6500);i=i+`
${t("plus_max_resource",[s.toLocaleString(),e.resource.Oil.name])}
`}return e.tech.isolation&&(i=i+`
${t("interstellar_g_factory_effect")}
`),i=i+`
${t("minus_power",[$(this)[0].powered()])}
`,i},special(){return!!e.tech.isolation},action(){return u($(this)[0])?(e.tauceti.refueling_station.count++,re($(this)[0]),!0):!1},post(){e.tech.tau_gas===2&&(e.tech.tau_gas=3,ue())}},ore_refinery:{id:"tauceti-ore_refinery",title(){return t("tau_gas_ore_refinery_title")},desc(){return`
${t("tau_gas_ore_refinery_title")}
${t("requires_power")}
`},reqs:{tau_gas:4},path:["truepath"],cost:{Money(r){return f("ore_refinery",r,52e6,1.28,"tauceti")},Iridium(r){return f("ore_refinery",r,16e5,1.28,"tauceti")},Unobtainium(r){return f("ore_refinery",r,800,1.28,"tauceti")},Sheet_Metal(r){return f("ore_refinery",r,Jr(118e3),1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:8)},effect(){let r=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.fill:0,a=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.max:0,i=+T("ore_refinery").toFixed(2),s=`
${t("tau_gas_ore_refinery_effect",[+r.toFixed(2)])}
`;return s=s+`
${t("tau_gas_ore_refinery_effect2",[a])}
`,s=s+`
${t("tau_gas_ore_refinery_effect3",[i])}
`,s=s+`
${t("interstellar_stellar_forge_effect3",[e.tech.isolation?12:4])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){return u($(this)[0])?(e.tauceti.ore_refinery.count++,e.city.powered&&e.city.power>=$(this)[0].powered()&&(e.tauceti.ore_refinery.on++,e.city.smelter.cap+=e.tech.isolation?12:2,e.city.smelter.Steel+=e.tech.isolation?12:2,e.race.evil?e.city.smelter.Wood+=e.tech.isolation?12:2:e.city.smelter.Oil+=e.tech.isolation?12:2),!0):!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,Fr(),ue())}},whaling_station:{id:"tauceti-whaling_station",title(){return t("tau_gas_whaling_station_title")},desc(){return`
${t("tau_gas_whaling_station_title")}
${t("requires_power")}
`},reqs:{tau_whale:1},path:["truepath"],cost:{Money(r){return f("whaling_station",r,72e6,1.28,"tauceti")},Steel(r){return f("whaling_station",r,18e5,1.28,"tauceti")},Polymer(r){return f("whaling_station",r,955e3,1.28,"tauceti")},Orichalcum(r){return f("whaling_station",r,268e3,1.28,"tauceti")}},powered(){return _e(e.tech.isolation?2:6)},effect(){let r=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.fill:0,a=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.max:0,i=+T("whaling_station").toFixed(2),s=`
${t("tau_gas_whaling_station_effect",[+r.toFixed(2)])}
`;return s=s+`
${t("tau_gas_whaling_station_effect2",[a])}
`,s=s+`
${t("tau_gas_whaling_station_effect3",[i])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return u($(this)[0])?(e.tauceti.whaling_station.count++,re($(this)[0]),!0):!1},post(){e.tech.tau_whale===1&&(e.tech.tau_whale=2,Fr())}},womling_station:{id:"tauceti-womling_station",title(){return t("tau_gas_womling_station_title")},desc(){return`
${t("tau_gas_womling_station_desc")}
${t("requires_power")}
`},reqs:{womling_technicians:1},path:["truepath"],cost:{Money(r){return f("womling_station",r,1334e5,1.26,"tauceti")},Furs(r){return f("womling_station",r,3805e3,1.26,"tauceti")},Aluminium(r){return f("womling_station",r,85e5,1.26,"tauceti")},Nano_Tube(r){return f("womling_station",r,909e3,1.26,"tauceti")}},powered(){return _e(e.tech.isolation?3:6)},effect(){let r=e.tech.isolation?30:8;e.tech.womling_gene&&(r*=1.25);let a=`
${t("tau_gas_womling_station_effect",[r,Ye.tau_gas.info.name()])}
`;return e.race.flier||(a=a+`
${t("city_cement_plant_effect1",[N(1)])}
`),a=a+`
${t("space_red_fabrication_effect1",[N(1)])}
`,a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.womling_station.count++,re($(this)[0]),!0):!1}}},tau_roid:{info:{name(){return t("tau_roid_title")},desc(){return t("tau_roid_desc")},support:"patrol_ship"},roid_mission:{id:"tauceti-roid_mission",title(){return t("space_mission_title",[t("tau_roid_title")])},desc(){return t("space_mission_desc",[t("tau_roid_title")])},reqs:{tauceti:5},grant:["tau_roid",1],path:["truepath"],queue_complete(){return e.tech.tau_roid>=1?0:1},cost:{Helium_3(r,a){return+ze(125e4,!1,a).toFixed(0)}},effect(){return t("tau_roid_mission_effect",[t("tau_roid_title")])},action(){return u($(this)[0])?(I(t("tau_roid_mission_result"),"info",!1,["progress"]),!0):!1}},patrol_ship:{id:"tauceti-patrol_ship",title:t("tau_roid_patrol_ship"),desc(){return`
${t("tau_roid_patrol_ship")}
${t("requires_res",[e.resource.Helium_3.name])}
`},reqs:{tau_roid:3},path:["truepath"],cost:{Money(r){return f("patrol_ship",r,45e6,1.25,"tauceti")},Adamantite(r){return f("patrol_ship",r,18e5,1.25,"tauceti")},Elerium(r){return f("patrol_ship",r,520,1.25,"tauceti")},Stanene(r){return f("patrol_ship",r,2675e3,1.25,"tauceti")},Bolognium(r){return f("patrol_ship",r,115e4,1.25,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=`
${t("tau_roid_patrol_ship_security",[$(this)[0].support()])}
`;return a=a+`
${t("tau_roid_patrol_ship_effect")}
`,a=a+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,a},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?15:250}},support(){return 1},powered(){return 0},refresh:!0,action(){return u($(this)[0])?(e.tauceti.patrol_ship.count++,e.tauceti.patrol_ship.on++,!0):!1}},mining_ship:{id:"tauceti-mining_ship",title:t("tau_roid_mining_ship"),desc(){return`
${t("tau_roid_mining_ship")}
`},reqs:{tau_roid:4},path:["truepath"],cost:{Money(r){return f("mining_ship",r,28e6,1.28,"tauceti")},Uranium(r){return f("mining_ship",r,12500,1.28,"tauceti")},Titanium(r){return f("mining_ship",r,22e5,1.28,"tauceti")},Alloy(r){return f("mining_ship",r,175e4,1.28,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=+T("mining_ship").toFixed(2),i=`
${t("tau_roid_mining_ship_effect",[a])}
`;return i=i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,i},s_type:"tau_roid",support_fuel(){return{r:"Helium_3",a:e.tech.isolation?12:75}},support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(e.tauceti.mining_ship.count++,re($(this)[0]),!0):!1}},whaling_ship:{id:"tauceti-whaling_ship",title:t("tau_roid_whaling_ship"),desc(){return`
${t("tau_roid_whaling_ship")}
`},reqs:{tau_whale:2},path:["truepath"],cost:{Money(r){return f("whaling_ship",r,35e6,1.28,"tauceti")},Aluminium(r){return f("whaling_ship",r,34e5,1.28,"tauceti")},Neutronium(r){return f("whaling_ship",r,168e3,1.28,"tauceti")},Nano_Tube(r){return f("whaling_ship",r,8e5,1.28,"tauceti")}},effect(){let r=+ze($(this)[0].support_fuel().a).toFixed(1),a=+T("whaling_ship").toFixed(2),i=`
${t("tau_roid_whaling_ship_effect",[a])}
`;return i=i+`
${t("spend",[r,e.resource[$(this)[0].support_fuel().r].name])}
`,i},s_type:"tau_roid",support_fuel(){return{r:"Helium_3",a:e.tech.isolation?14:90}},support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.tauceti.whaling_ship.count++,re($(this)[0]),!0):!1}}},tau_gas2:{info:{name(r){return Ye.tau_gas.info.name(r||e.race.gas_name2||!1,"gas_name2")},desc(){return t("tau_gas2_desc",[Ye.tau_gas.info.name()])}},gas_contest2:{id:"tauceti-gas_contest2",title(){return t("tau_gas2_contest_title")},desc(){return t("tau_gas2_contest_title")},reqs:{tau_gas2:1},grant:["tau_gas2",2],path:["truepath"],queue_complete(){return e.tech.tau_gas2>=1?0:1},cost:{Money(){return 25e6}},effect(){return t("tau_gas2_contest_effect")},action(){return!!u($(this)[0])},flair(){return t("tau_gas2_contest_flair")}},alien_station_survey:{id:"tauceti-alien_station_survey",title:t("tau_gas2_alien_station"),desc:t("tau_gas2_alien_station"),reqs:{tau_gas2:3},grant:["tau_gas2",4],path:["truepath"],queue_complete(){return e.tech.tau_gas3>=4?0:1},cost:{Money(){return e.race.lone_survivor?15e8:3e9},Helium_3(){return 5e6}},effect(){return t("tau_gas2_alien_station_repair_effect",[Ye.tau_gas2.info.name()])},action(){return u($(this)[0])?(e.tauceti.alien_station={count:0},I(t("tau_gas2_alien_station_msg",[Ye.tau_gas2.info.name()]),"info",!1,["progress"]),!0):!1}},alien_station:{id:"tauceti-alien_station",title:t("tau_gas2_alien_station"),desc(r){return!e.tauceti.hasOwnProperty("alien_station")||e.tauceti.alien_station.count<100||r?`
${t("tau_gas2_alien_station")}
`+(e.tauceti.hasOwnProperty("alien_station")&&e.tauceti.alien_station.count>=100?`
${t("space_dwarf_reactor_desc_req")}
`:`
${t("tau_gas2_alien_station_repair")}
`):`
${t("tau_gas2_alien_station")}
`},reqs:{tau_gas2:4},condition(){return e.tauceti.alien_station.count<100},path:["truepath"],queue_size:5,queue_complete(){return 100-e.tauceti.alien_station.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?12e6:5e7:0},Aluminium(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256e3:256e4:0},Polymer(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?198900:989e3:0},Mythril(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?Jr(125e3):0},Cipher(r){return(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256:2001:0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0);return i<100?(a+=`
${t("tau_gas2_alien_station_repaired",[i])}
`,a):Ye.tau_gas2.alien_space_station.effect(r)},action(){return u($(this)[0])&&e.tauceti.alien_station.count<100?(e.tauceti.alien_station.count++,e.tauceti.alien_station.count>=100&&(e.tech.tau_gas2=5,e.tauceti.alien_space_station={count:1,on:0}),!0):!1},post(){e.resource.Elerium.diff>=10&&(e.tauceti.alien_space_station.on=1),Fr()}},alien_space_station:{id:"tauceti-alien_space_station",title:t("tau_gas2_alien_station"),desc(){return`
${t("tau_gas2_alien_station")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{tau_gas2:5},path:["truepath"],cost:{},queue_complete(){return 0},special(){return!!(e.tech.tau_gas2&&e.tech.tau_gas2===6&&(!e.tech.alien_data||e.tech.alien_data<6))},wiki:!1,effect(){let r=$(this)[0].p_fuel().a,a=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;if(e.tech.tau_gas2&&e.tech.tau_gas2>=6&&e.tauceti.alien_space_station.hasOwnProperty("decrypted")){let i=e.race.lone_survivor?1e5:25e6,s=+(e.tauceti.alien_space_station.decrypted/i).toFixed(2);s>100&&(s=100),a=a+`
${t("tau_gas2_alien_station_effect",[s])}
`}return a=a+`
${t("spend",[r,e.resource[$(this)[0].p_fuel().r].name])}
`,a},p_fuel(){return{r:"Elerium",a:e.race.lone_survivor?1:10}},powered(){return dt(-75)},action(){return!1}},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:t("tech_matrioshka_brain"),desc(r){return!e.tauceti.hasOwnProperty("matrioshka_brain")||e.tauceti.matrioshka_brain.count<1e3||r?`
${t("tech_matrioshka_brain")}
${t("requires_segments",[1e3])}
`:`
${t("tech_matrioshka_brain")}
`},reqs:{tau_gas2:7},condition(){return!!e.tauceti.matrioshka_brain},path:["truepath"],queue_size:50,queue_complete(){return 1e3-e.tauceti.matrioshka_brain.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?2e7:0},Neutronium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?45e3:0},Nano_Tube(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?16e4:0},Adamantite(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?666e3:0},Stanene(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?61600:0},Bolognium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?44e3:0},Unobtainium(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?1200:0},Mythril(r){return(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?Jr(64e3):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0);return i<1e3&&(a+=`
${t("tau_gas2_matrioshka_brain_seg",[1e3-i])}
`),a},action(){return u($(this)[0])&&e.tauceti.matrioshka_brain.count<1e3?(e.tauceti.matrioshka_brain.count++,e.tauceti.matrioshka_brain.count>=1e3&&(e.tech.m_brain=1),!0):!1}},ignition_device:{id:"tauceti-ignition_device",title:t("tech_ignition_device"),desc(r){return!e.tauceti.hasOwnProperty("ignition_device")||e.tauceti.ignition_device.count<10||r?`
${t("tech_ignition_device")}
${t("requires_segments",[10])}
`:`
${t("tech_ignition_device")}
`},reqs:{tau_gas2:8},condition(){return!!(e.tauceti.ignition_device&&e.tauceti.ignition_device.count<10)},path:["truepath"],queue_size:1,queue_complete(){return 10-e.tauceti.ignition_device.count},cost:{Money(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e7:0},Uranium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?5e4:0},Elerium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e3:0},Graphene(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?225e5:0},Orichalcum(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?15e6:0},Quantium(r){return(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?Jr(8e6):0}},effect(r){let a="",i=(r||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0);return i<10&&(a+=`
${t("tau_gas2_ignition_device_seg",[10-i])}
`),a},action(){return u($(this)[0])&&e.tauceti.ignition_device.count<10?(e.tauceti.ignition_device.count++,e.tauceti.ignition_device.count>=10&&(e.tech.m_ignite=1),!0):!1}},ignite_gas_giant:{id:"tauceti-ignite_gas_giant",title(){return t("tau_gas2_ignite_gas_giant",[Ye.tau_gas2.info.name()])},desc(){return t("tau_gas2_ignite_gas_giant",[Ye.tau_gas2.info.name()])},reqs:{tau_gas2:8,m_ignite:1},grant:["m_ignite",2],queue_size:1,queue_complete(){return!1},path:["truepath"],cost:{Helium_3(){return 75e5}},effect(){let r=`
${t("tau_gas2_ignite_gas_giant_effect",[t("tech_matrioshka_brain")])}
`;return e.tech.m_brain?(r=r+`
${t("tau_gas2_ignite_gas_giant_effect3")}
`,r+=hu()):r=r+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,r},action(){return e.tech.m_brain&&u($(this)[0])?(co(),!0):!1}}}};for(let r=1;r<9;r++)Ye.tau_gas[`gas_contest-a${r}`]={id:`tauceti-gas_contest-a${r}`,title(){return Ye.tau_gas.info.name(r)},desc(){return Ye.tau_gas.info.name(r)},reqs:{tau_gas:1},grant:["tau_gas",2],path:["truepath"],wiki:!1,queue_complete(){return e.tech.tau_gas>=2?0:1},cost:{},effect(){return t(r===8?"tau_gas_contest_reject":"tau_gas_contest_pick",[Ye.tau_gas.info.name(r)])},action(){return u($(this)[0])?(e.race.gas_name=r,e.tauceti.refueling_station={count:0,on:0},!0):!1}},Ye.tau_gas2[`gas_contest-b${r}`]={id:`tauceti-gas_contest-b${r}`,title(){return Ye.tau_gas2.info.name(r)},desc(){return Ye.tau_gas2.info.name(r)},reqs:{tau_gas2:2},grant:["tau_gas2",3],path:["truepath"],wiki:!1,queue_complete(){return e.tech.tau_gas2>=3?0:1},cost:{},effect(){return t(r===8?"tau_gas2_contest_reject":"tau_gas_contest_pick",[Ye.tau_gas2.info.name(r)])},action(){return u($(this)[0])?(e.race.gas_name2=r,!0):!1}};function qo(){let r=ct("matrix"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=e.stats.retire===e.stats.matrix+1?`
${t("tau_star_matrix_skilled",[1])}
`:"";return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function hu(){let r=ct("retired"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=e.stats.retire+1===e.stats.matrix?`
${t("tau_star_matrix_skilled",[1])}
`:"";return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function fu(){let r=ct("eden"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
`}function Dn(){e.tauceti.overseer={count:0,on:0,pop:0,working:0,injured:0,morale:0,loyal:0,prod:0},e.tauceti.womling_village=e.race.lone_survivor?{count:2,on:2}:{count:1,on:1},e.tauceti.womling_mine=e.race.lone_survivor?{count:1,on:1,miners:0}:{count:0,on:0,miners:0},e.tauceti.womling_farm={count:1,on:1,farmers:0},e.tauceti.womling_fun={count:0,on:0}}function mu(r){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(r*=.94**e.tech.womling_tech),r}function Jr(r){return e.tech.womling_tech&&e.tech.womling_recycling&&e.tech.womling_recycling>=1&&(r*=(e.tech.isolation?.97:.98)**e.tech.womling_tech),r}function Bi(){return Hn}function Po(){return Ye}function yr(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function Co(r,a,i){switch(r){case"tauceti":return Dr(Ye,a,i)}}function Fr(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==6))return;let r=$("#tauceti");le(r),r.append($(`

${t("tab_tauceti")}

`)),!(!e.tech.tauceti||e.tech.tauceti<2)&&Object.keys(Ye).forEach(function(a){let i=a.replace("tau_","");if(e.settings.tau[`${i}`]){let s=typeof Ye[a].info.name=="string"?Ye[a].info.name:Ye[a].info.name(),n="";if(Ye[a].info.hasOwnProperty("prop")&&(n=Ye[a].info.prop()),Ye[a].info.support){let c=Ye[a].info.support;Ye[a].info.hide_support?r.append(`

${s}

${n}
`):r.append(`

${s}

{{ support }}/{{ s_max }}${n}
`),D({el:`#sr${a}`,data:e.tauceti[c],filters:{filter(){return Ye[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);pe(a,function(){return typeof Ye[a].info.desc=="string"?Ye[a].info.desc:Ye[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Ye[a]).forEach(function(c){if(c!=="info"&&Dr(Ye,a,c)){let l=Ye[a][c];Br(l,"tauceti",c)}}),Ye[a].info.hasOwnProperty("extra")&&Ye[a].info.extra(a)}})}function Un(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(Qn(),Gi(),le($("#dwarfShipYard")),e.space.hasOwnProperty("shipyard")&&e.settings.showShipYard)){let r=$("#dwarfShipYard");e.space.shipyard.hasOwnProperty("blueprint")||(e.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:Bn()});let a=$('
');r.append(a);let i=$('
');a.append(i),i.append(`
${t("outer_shipyard_registry")}:
`),i.append(`
${t("crew")}
`),i.append(`
${t("power")}
`),i.append(`
${t("firepower")}
`),i.append(`
${t("outer_shipyard_sensors")}
`),i.append(`
${t("speed")}
`),i.append(`
${t("outer_shipyard_fuel")}
`),a.append('
');let s=$('
');a.append(s);let n={class:["corvette","frigate","destroyer","cruiser","battlecruiser","dreadnought","explorer"],power:["solar","diesel","fission","fusion","elerium"],weapon:["railgun","laser","p_laser","plasma","phaser","disruptor"],armor:["steel","alloy","neutronium"],engine:["ion","tie","pulse","photon","vacuum","emdrive"],sensor:["visual","radar","lidar","quantum"]};Object.keys(n).forEach(function(o){let d="";n[o].forEach(function(h,_){d+=`${t(`outer_shipyard_${o}_${h}`)}`}),s.append(` ${d} @@ -39,10 +39,10 @@ ${n} - `;if(e.space.shipyard.expand){let o=`${t(`outer_shipyard_engine_${s.engine}`)} ${t(`outer_shipyard_class_${s.class}`)}`,d=$(`
`),h=$(`
${s.name} | ${t("outer_shipyard_scrap")} | ${o} | ${t(`outer_shipyard_weapon_${s.weapon}`)} | ${t(`outer_shipyard_power_${s.power}`)} | ${t(`outer_shipyard_armor_${s.armor}`)} | ${t(`outer_shipyard_sensor_${s.sensor}`)}
`),_=$('
'),m=$('
'),w=$(`
${l}
`);_.append(`${t("crew")} `),_.append(`${t("firepower")} `),_.append(`${t("outer_shipyard_sensors")} `),_.append(`${t("speed")} `),_.append(`${t("outer_shipyard_fuel")} `),_.append(`${t("outer_shipyard_hull")} `),m.append(``),d.append(h),d.append(_),d.append(m),d.append(w),r.append(d)}else{let o=$(`
`),d=$('
'),h=$('
'),_=$(`
${l}
`);d.append(`${s.name} | `),d.append(`${t("firepower")} `),d.append(`${t("outer_shipyard_sensors")} `),d.append(`${t("speed")} `),d.append(`${t("outer_shipyard_fuel")} `),d.append(`${t("outer_shipyard_hull")} `),h.append(``),o.append(d),o.append(h),o.append(_),r.append(o)}D({el:`#shipReg${i}`,data:e.space.shipyard.ships[i],methods:{scrap(o){e.space.shipyard.ships[o]&&e.space.shipyard.ships[o].location==="spc_dwarf"&&(e.space.shipyard.ships.splice(o,1),yi(),Ds())},scrapAllowed(o){return!!(e.space.shipyard.ships[o]&&e.space.shipyard.ships[o].location==="spc_dwarf")},setLoc(o,d){let h=e.space.shipyard.ships[d];if(o!==h.location){let _=fs(h),m=h.transit>0||h.location!=="spc_dwarf";if(m||e.civic.garrison.workers-e.civic.garrison.crew>=_){let w=Gn(h,o),M=Rn(h.xy,w),A=Di(h);h.location=o,h.transit=Math.round(M/A),h.dist=Math.round(M/A),h.origin=Ke(h.xy),h.destination={x:w.x,y:w.y},m||(e.civic.garrison.crew+=_),yi(),Ie(`ship${d}loc${o}`)}}},crewText(o){return fs(e.space.shipyard.ships[o])},fireText(o){return Wn(e.space.shipyard.ships[o])},sensorText(o){return Ri(e.space.shipyard.ships[o])+"km"},speedText(o){let d=7.695363719135802*Di(e.space.shipyard.ships[o]);return Math.round(d)+"km/s"},fuelText(o){let d=Rs(e.space.shipyard.ships[o]);return d.res?`${d.burn} ${e.resource[d.res].name}/s`:"N/A"},hullText(o){return`${100-e.space.shipyard.ships[o].damage}%`},hullDamage(o){return e.space.shipyard.ships[o].damage<=10?"has-text-success":e.space.shipyard.ships[o].damage>=40&&e.space.shipyard.ships[o].damage<65?"has-text-caution":e.space.shipyard.ships[o].damage>=65?"has-text-danger":""},dest(o){let d=s.class==="explorer"?t("tech_era_tauceti"):typeof a[e.space.shipyard.ships[o].location].info.name=="string"?a[e.space.shipyard.ships[o].location].info.name:a[e.space.shipyard.ships[o].location].info.name();return t("outer_shipyard_arrive",[d,e.space.shipyard.ships[o].transit])},show(o){return e.space.shipyard.ships[o].transit>0}}}),s.class==="explorer"?s.location!=="tauceti"&&pe(`ship${i}loctauceti`,function(){return t("transit_time",[Math.round(Rn(s.xy,Gn(s,"tauceti"))/Di(s))])},{elm:`#ship${i}loc .tauceti`,placement:"left"}):Object.keys(a).forEach(function(o){(a[o].info.syndicate()||o==="spc_dwarf")&&s.location!==o&&pe(`ship${i}loc${o}`,function(){return t("transit_time",[Math.round(Rn(s.xy,Gn(s,o))/Di(s))])},{elm:`#ship${i}loc .${o}`,placement:"left"})})}vu()}function Gn(r,a){if(It[a].orbit===-2)return ii(a);let i=Math.sqrt((r.xy.x-Gs(a))**2+r.xy.y**2),s=Di(r)/225,n=Bs(1,a),c=Math.abs(i-It[a].dist),l=Math.abs(i+It[a].dist),o=Math.abs(i-It[a].dist*n),d=Math.abs(i+It[a].dist*n),h=Math.floor(Math.min(c,o,l,d)/s),_=Math.ceil(Math.max(c,o,l,d)/s);i>=It[a].dist&&i<=It[a].dist*n&&(h=0);let w=360/(It[a].orbit===-1?e.city.calendar.orbit:It[a].orbit),M=(e.space.position[a]+h*w)%360,A=Math.PI/180;for(let x=h;x<=_;x++){let j=Bs(Math.cos(M*A)*It[a].dist,a);j+=Gs(a);let B=Math.sin(M*A)*It[a].dist;if(Math.sqrt((j-r.xy.x)**2+(B-r.xy.y)**2)/s<=x)return{x:j,y:B};M=(M+w)%360}return ii(a)}function yt(r,a){if(!e.tech.isolation&&e.tech.syndicate&&e.race.truepath&&e.space.syndicate&&e.space.syndicate.hasOwnProperty(r)){let i=1e3,s=0;switch(e.civic.foreign.gov3.hstl<10?s=250-25*e.civic.foreign.gov3.hstl:e.civic.foreign.gov3.hstl>60&&(s=-13*(e.civic.foreign.gov3.hstl-60)),r){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":i=1250+s;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":i=1020+s;break;case"spc_titan":case"spc_enceladus":i=O.space[r].info.syndicate_cap();break;case"spc_triton":case"spc_kuiper":case"spc_eris":i=O.space[r].info.syndicate_cap();break}let n=e.space.syndicate[r],c=0,l=0,o=0;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){if(e.space.shipyard.ships.forEach(function(d){if(d.location===r&&d.transit===0&&d.fueled){let h=Wn(d);c+=d.damage>0?Math.round(h*(100-d.damage)/100):h,l+=Ri(d)}}),r==="spc_enceladus"&&Math.min(U.operating_base,k.operating_base)>0){let d=Math.min(U.operating_base,k.operating_base);c+=d*50}else r==="spc_titan"&&k.sam>0?c+=k.sam*25:r==="spc_triton"&&k.fob>0&&(c+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),c=Math.round(c*((l+25)/125)),c>n&&(o=c-n),n=n-c>0?n-c:0}return a?{p:1-+(n/i).toFixed(4),r:n,s:l,o}:1-+(n/i).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function Ri(r){let a=1;switch(r.class){case"corvette":case"frigate":a=2;break;case"destroyer":case"cruiser":a=1.5;break;case"explorer":a=5;break;default:a=1;break}switch(r.sensor){case"visual":return 1;case"radar":return 10*a;case"lidar":return 18*a;case"quantum":return 32*a}}function Oo(){if(e.space.fob){if(e.space.fob.enemy<=1e3){let c=e.tech.outer&&e.tech.outer>=4?125:100;e.space.fob.enemy+=Math.rand(25,c)}let r=Math.ceil(N(e.space.fob.enemy)/5),a=e.civic.garrison.wounded-We();a<0&&(a=0);let i=mt(e.space.fob.troops,"army",a),s=Math.rand(0,a+1);e.civic.garrison.workers-=s,e.stats.died+=s,e.civic.garrison.wounded-=s,e.space.fob.enemy-=Math.rand(0,i),e.space.fob.enemy<0&&(e.space.fob.enemy=0);let n=Math.rand(0,e.space.fob.troops+1);if(n>r&&(n=r),e.race.armored&&(n-=N(1)),e.race.scales&&(n-=N(1)),e.tech.armor&&(n-=N(e.tech.armor)),n<0&&(n=0),e.race.revive&&s>0){let c=Math.round(Math.rand(0,s+1));e.civic.garrison.workers+=c}e.civic.garrison.wounded+=n,e.civic.garrison.wounded>We(!1,!0)&&(e.civic.garrison.wounded=We(!1,!0));{let c=e.civic.garrison.wounded-We();c<0&&(c=0);let l=e.space.fob.enemy-mt(e.space.fob.troops,"army",c);l<=0&&e.space.crashed_ship.count<100?e.space.crashed_ship.count++:l>0&&e.space.crashed_ship.count>0&&e.space.crashed_ship.count--,e.space.crashed_ship.count===100&&(e.resource.Cipher.display=!0)}}}function So(){if(e.space.digsite){if(e.space.digsite.enemy<=1e4){let a=250;e.space.digsite.enemy+=Math.rand(25,a)}let r=mt(U.shock_trooper,"army",0);U.tank&&(r+=U.tank*100),r*=yt("spc_eris"),e.space.digsite.enemy-=Math.rand(0,r),e.space.digsite.enemy<0?e.space.digsite.enemy=0:e.space.digsite.enemy>1e4&&(e.space.digsite.enemy=1e4),e.space.digsite.count=Math.floor(100-e.space.digsite.enemy/100)}}var It={spc_sun:{dist:0,orbit:0,size:2},spc_home:{dist:1,orbit:-1,size:.6},spc_moon:{dist:1.01,orbit:-1,size:.1,moon:!0},spc_red:{dist:1.524,orbit:687,size:.5},spc_hell:{dist:.4,orbit:88,size:.4},spc_venus:{dist:.7,orbit:225,size:.5},spc_gas:{dist:5.203,orbit:4330,size:1.25},spc_gas_moon:{dist:5.204,orbit:4330,size:.2,moon:!0},spc_belt:{dist:2.7,orbit:1642,size:.5,belt:!0},spc_dwarf:{dist:2.77,orbit:1682,size:.5},spc_saturn:{dist:9.539,orbit:10751,size:1.1},spc_titan:{dist:9.536,orbit:10751,size:.2,moon:!0},spc_enceladus:{dist:9.542,orbit:10751,size:.1,moon:!0},spc_uranus:{dist:19.8,orbit:30660,size:1},spc_neptune:{dist:30.08,orbit:60152,size:1},spc_triton:{dist:30.1,orbit:60152,size:.1,moon:!0},spc_kuiper:{dist:39.5,orbit:90498,size:.5,belt:!0},spc_eris:{dist:68,orbit:204060,size:.5},tauceti:{dist:752568.8,orbit:-2,size:2}};function Qn(){e.space.position||(e.space.position={}),Object.keys(It).forEach(function(r){e.space.position.hasOwnProperty(r)||(e.space.position[r]=Math.rand(0,360))}),e.space.position.spc_home=e.space.position.spc_moon,e.space.position.spc_gas_moon=e.space.position.spc_gas,e.space.position.spc_titan=e.space.position.spc_enceladus,e.space.position.spc_saturn=e.space.position.spc_titan,e.space.position.spc_neptune=e.space.position.spc_triton}function ii(r){let a=Bs(+Math.cos(e.space.position[r]*(Math.PI/180)).toFixed(5)*It[r].dist,r),i=+Math.sin(e.space.position[r]*(Math.PI/180)).toFixed(5)*It[r].dist;return a+=Gs(r),{x:a,y:i}}function Rn(r,a){return Math.ceil(Math.sqrt((a.x-r.x)**2+(a.y-r.y)**2)*225)}function Aa(r,a){let i=1;switch(e.race.pack_rat&&(i*=1+b.pack_rat.vars()[1]/100),e.stats.achieve.blackhole&&(i*=1+e.stats.achieve.blackhole.l*.05),e.tech.world_control&&(i*=3),r){case"storehouse":k.titan_spaceport&&(i*=1+k.titan_spaceport*.25),a&&e.tech.shelving&&(i*=2),e.tech.shelving&&e.tech.shelving>=3&&(i*=1.5);case"repository":e.tech.isolation&&(i*=3,e.tech.tp_depot&&(i*=1+e.tech.tp_depot/20));break}return i}function jo(){let r={city:{},space:{},ships:[]};r.ships=[...e.space.shipyard.ships],e.space.shipyard.ships=[],e.settings.spaceTabs=6,e.settings.showSpace=!1,e.settings.showOuter=!1,e.settings.showCity=!1,e.settings.showShipYard=!1,e.settings.govTabs===5&&(e.settings.govTabs=0),Gi(),le($("#shipList")),Object.keys(O.city).forEach(function(i){e.city.hasOwnProperty(i)&&e.city[i].hasOwnProperty("count")&&(e.race.hooved&&O.city[i].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.city[i].cost.Horseshoe()*e.city[i].count),r.city[i]={c:e.city[i].count},e.city[i].count=0,e.city[i].hasOwnProperty("on")&&(r.city[i].o=e.city[i].on,e.city[i].on=0))}),["spc_home","spc_moon","spc_red","spc_hell","spc_sun","spc_gas","spc_gas_moon","spc_belt","spc_dwarf","spc_titan","spc_enceladus","spc_triton","spc_kuiper","spc_eris"].forEach(function(i){Object.keys(O.space[i]).forEach(function(s){e.space.hasOwnProperty(s)&&e.space[s].hasOwnProperty("count")&&(e.race.hooved&&O.space[i][s].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.space[i][s].cost.Horseshoe()*e.space[s].count),r.space[s]={c:e.space[s].count},e.space[s].count=0,e.space[s].hasOwnProperty("on")&&(r.space[s].o=e.space[s].on,e.space[s].on=0))})}),e.race.hooved&&e.race.shoecnt<5&&(e.race.shoecnt=5),e.resource.Zen.display&&(e.resource.Zen.display=!1),e.resource.Slave.display&&(e.resource.Slave.display=!1,e.resource.Slave.amount=0,qr("slave")),e.race.deconstructor&&va.forEach(function(i){e.city.nanite_factory[i]=0}),Object.keys(e.resource).forEach(function(i){e.resource[i].hasOwnProperty("trade")&&(e.resource[i].trade=0)}),Object.keys(si).forEach(function(i){["professor","scientist","pit_miner","cement_worker","craftsman"].includes(i)||(e.civic[i].workers=0,e.civic[i].assigned=0)}),["forager","farmer","lumberjack","quarry_worker","miner","coal_miner","priest","colonist","titan_colonist","space_miner"].forEach(function(i){e.civic[i].display=!1}),e.civic.hunter.display?e.civic.d_job="hunter":e.civic.d_job="unemployed",e.arpa.sequence&&(e.arpa.sequence.on=!1,e.arpa.sequence.boost=!1);for(let i of Object.values(e.race.purgatory.city))i.hasOwnProperty("count")&&(i.count=0),i.hasOwnProperty("on")&&(i.on=0);for(let i of Object.values(e.race.purgatory.space))i.hasOwnProperty("count")&&(i.count=0),i.hasOwnProperty("on")&&(i.on=0);if(e.queue.hasOwnProperty("queue"))for(let i=e.queue.queue.length-1;i>=0;i--){let s=e.queue.queue[i];(s.action==="city"||s.action==="space"||s.action==="starDock")&&e.queue.queue.splice(i,1)}e.tech.magic&&e.tech.magic>=2&&(e.tauceti.pylon={count:0},e.race.casting&&Object.keys(e.race.casting).forEach(function(i){e.race.casting[0]=0})),e.tauceti.tauceti_casino={count:0,on:0},e.tauceti.tau_housing={count:0};let a=U.colony*Ye.tau_home.colony.citizens();e.resource[e.race.species].amount>a&&(e.resource[e.race.species].amount=a),qr("spy"),qr("spyop"),le($("#infoTimer")),e.race.inactive=r}function Ao(){e.race.lone_survivor&&(e.tech.alloy=1,e.tech.alumina=2,e.tech.asteroid=7,e.tech.banking=11,e.tech.biotech=1,e.tech.boot_camp=2,e.tech.broadcast=2,e.tech.container=7,e.tech.copper=1,e.tech.currency=6,e.tech.disease=2,e.tech.drone=1,e.tech.elerium=2,e.tech.explosives=3,e.tech.factory=3,e.tech.foundry=8,e.tech.gambling=4,e.tech.gas_giant=1,e.tech.gas_moon=2,e.tech.genesis=2,e.tech.genetics=2,e.tech.gov_corp=1,e.tech.gov_fed=1,e.tech.gov_soc=1,e.tech.gov_theo=1,e.tech.govern=3,e.tech.graphene=1,e.tech.helium=1,e.tech.hell=1,e.tech.high_tech=13,e.tech.home_safe=2,e.tech.housing=3,e.tech.housing_reduction=3,e.tech.kuiper=2,e.tech.launch_facility=1,e.tech.luna=2,e.tech.m_smelting=2,e.tech.marines=2,e.tech.mars=5,e.tech.mass=1,e.tech.medic=3,e.tech.military=8,e.tech.mine_conveyor=1,e.tech.mining=4,e.tech.monument=1,e.tech.nano=1,e.tech.oil=7,e.tech.outer=8,e.tech.pickaxe=5,e.tech.polymer=2,e.tech.primitive=3,e.tech.q_factory=1,e.tech.quantium=1,e.tech.queue=3,e.tech.r_queue=1,e.tech.reproduction=1,e.tech.rival=1,e.tech.satellite=1,e.tech.science=9,e.tech.shelving=3,e.tech.shipyard=1,e.tech.smelting=6,e.tech.solar=5,e.tech.space=6,e.tech.space_explore=4,e.tech.space_housing=1,e.tech.spy=5,e.tech.stanene=1,e.tech.steel_container=6,e.tech.storage=5,e.tech.swarm=6,e.tech.syard_armor=3,e.tech.syard_class=6,e.tech.syard_engine=5,e.tech.syard_power=5,e.tech.syard_sensor=4,e.tech.syard_weapon=6,e.tech.syndicate=0,e.tech.synthetic_fur=1,e.tech.tau_home=6,e.tech.tauceti=4,e.tech.theatre=3,e.tech.theology=2,e.tech.titan=9,e.tech.titan_ai_core=3,e.tech.titan_power=1,e.tech.titanium=3,e.tech.trade=3,e.tech.unify=2,e.tech.uranium=4,e.tech.v_train=1,e.tech.vault=4,e.tech.wharf=1,e.tech.world_control=1,e.tech.wsc=0,e.race.flier||(e.tech.cement=5,e.resource.Cement.display=!0),e.race.universe==="magic"&&(e.tech.gov_mage=1,e.tech.magic=4,e.tech.conjuring=2,e.resource.Mana.display=!0,e.resource.Crystal.display=!0,e.civic.crystal_miner.display=!0,e.tauceti.pylon={count:0},e.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0}),e.settings.showSpace=!1,e.settings.showTau=!0,e.settings.tau.home=!0,e.settings.showCity=!1,e.settings.showIndustry=!0,e.settings.showPowerGrid=!0,e.settings.showResearch=!0,e.settings.showCivic=!0,e.settings.showMil=!0,e.settings.showResources=!0,e.settings.showMarket=!0,e.settings.showStorage=!0,e.settings.civTabs=1,e.settings.spaceTabs=6,e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.settings.arpa.genetics=!0,e.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.resource.Food.display=!0,e.resource.Stone.display=!0,e.resource.Furs.display=!0,e.resource.Copper.display=!0,e.resource.Iron.display=!0,e.resource.Aluminium.display=!0,e.resource.Coal.display=!0,e.resource.Oil.display=!0,e.resource.Uranium.display=!0,e.resource.Steel.display=!0,e.resource.Titanium.display=!0,e.resource.Alloy.display=!0,e.resource.Polymer.display=!0,e.resource.Iridium.display=!0,e.resource.Helium_3.display=!0,e.resource.Water.display=!0,e.resource.Neutronium.display=!0,e.resource.Adamantite.display=!0,e.resource.Elerium.display=!0,e.resource.Nano_Tube.display=!0,e.resource.Graphene.display=!0,e.resource.Stanene.display=!0,e.resource.Orichalcum.display=!0,e.resource.Bolognium.display=!0,e.resource.Unobtainium.display=!0,e.resource.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Mythril.display=!0,e.resource.Quantium.display=!0,e.resource.Cipher.display=!0,!e.race.kindling_kindred&&!e.race.smoldering&&(e.civic.lumberjack.display=!0,e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.resource.Lumber.max=1e7,e.resource.Lumber.amount=1e7,e.resource.Plywood.amount=25e5,e.resource.Lumber.crates=25,e.resource.Lumber.containers=25,e.tech.axe=5),e.race.smoldering&&(e.resource.Chrysotile.display=!0,e.resource.Chrysotile.max=5e6,e.resource.Chrysotile.amount=5e6),e.race.sappy||(e.tech.hammer=4),e.race.apex_predator||(e.tech.armor=3),e.resource[e.race.species].max=1,e.resource[e.race.species].amount=1,e.resource.Crates.amount=1e3,e.resource.Containers.amount=1e3,e.resource.Money.max=1e9,e.resource.Money.amount=1e9,e.resource.Knowledge.max=8e6,e.resource.Knowledge.amount=8e6,e.resource.Food.max=1e4,e.resource.Food.amount=1e4,e.resource.Oil.max=5e5,e.resource.Oil.amount=5e5,e.resource.Helium_3.max=5e5,e.resource.Helium_3.amount=5e5,e.resource.Water.max=25e3,e.resource.Water.amount=25e3,e.resource.Uranium.max=5e5,e.resource.Uranium.amount=5e5,e.resource.Stone.max=1e7,e.resource.Stone.amount=1e7,e.resource.Furs.max=5e6,e.resource.Furs.amount=5e6,e.resource.Copper.max=5e6,e.resource.Copper.amount=5e6,e.resource.Iron.max=5e6,e.resource.Iron.amount=5e6,e.resource.Steel.max=5e6,e.resource.Steel.amount=5e6,e.resource.Aluminium.max=5e6,e.resource.Aluminium.amount=5e6,e.resource.Cement.max=5e6,e.resource.Cement.amount=5e6,e.resource.Titanium.max=5e6,e.resource.Titanium.amount=5e6,e.resource.Coal.max=5e6,e.resource.Coal.amount=5e6,e.resource.Alloy.max=5e6,e.resource.Alloy.amount=5e6,e.resource.Polymer.max=5e6,e.resource.Polymer.amount=5e6,e.resource.Iridium.max=5e6,e.resource.Iridium.amount=5e6,e.resource.Neutronium.max=5e5,e.resource.Neutronium.amount=5e5,e.resource.Adamantite.max=5e6,e.resource.Adamantite.amount=5e6,e.resource.Elerium.max=1e3,e.resource.Elerium.amount=1e3,e.resource.Nano_Tube.max=5e6,e.resource.Nano_Tube.amount=5e6,e.resource.Graphene.max=5e6,e.resource.Graphene.amount=5e6,e.resource.Stanene.max=5e6,e.resource.Stanene.amount=5e6,e.resource.Bolognium.max=5e6,e.resource.Bolognium.amount=5e6,e.resource.Orichalcum.max=5e6,e.resource.Orichalcum.amount=5e6,e.resource.Brick.amount=25e5,e.resource.Wrought_Iron.amount=25e5,e.resource.Sheet_Metal.amount=25e5,e.resource.Mythril.amount=25e5,e.resource.Quantium.amount=25e5,e.race.artifical||(e.resource.Food.crates=10,e.resource.Food.containers=10),e.resource.Stone.crates=25,e.resource.Stone.containers=25,e.resource.Furs.crates=25,e.resource.Furs.containers=25,e.resource.Coal.crates=10,e.resource.Coal.containers=10,e.resource.Copper.crates=25,e.resource.Copper.containers=25,e.resource.Iron.crates=25,e.resource.Iron.containers=25,e.resource.Aluminium.crates=25,e.resource.Aluminium.containers=25,e.resource.Steel.crates=25,e.resource.Steel.containers=25,e.resource.Titanium.crates=25,e.resource.Titanium.containers=25,e.resource.Alloy.crates=25,e.resource.Alloy.containers=25,e.resource.Polymer.crates=25,e.resource.Polymer.containers=25,e.resource.Iridium.crates=25,e.resource.Iridium.containers=25,e.resource.Adamantite.crates=25,e.resource.Adamantite.containers=25,e.resource.Graphene.crates=25,e.resource.Graphene.containers=25,e.resource.Stanene.crates=25,e.resource.Stanene.containers=25,e.resource.Bolognium.crates=25,e.resource.Bolognium.containers=25,e.resource.Orichalcum.crates=25,e.resource.Orichalcum.containers=25,e.civic.taxes.display=!0,e.race.flier||(e.civic.cement_worker.display=!0,e.resource.Cement.crates=25,e.resource.Cement.containers=25),e.race.sappy||(e.civic.quarry_worker.display=!0),e.civic.professor.display=!0,e.civic.scientist.display=!0,e.civic.banker.display=!0,e.civic.pit_miner.display=!0,e.civic.professor.max=1,e.civic.professor.workers=1,e.city.calendar.day++,e.city.market.active=!0,e.city.power=0,e.city.powered=!0,e.race.artifical&&(e.city.transmitter={count:0,on:0}),e.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},e.city.foundry={count:0,crafting:0,Plywood:0,Brick:0,Bronze:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0,Quantium:0},e.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},e.city.amphitheatre={count:0},e.city.apartment={count:0,on:0},e.city.bank={count:0},e.city.basic_housing={count:0},e.city.biolab={count:0,on:0},e.city.boot_camp={count:0},e.city.casino={count:0,on:0},e.city.cement_plant={count:0,on:0},e.city.coal_mine={count:0,on:0},e.city.coal_power={count:0,on:0},e.city.cottage={count:0},e.city.fission_power={count:0,on:0},e.city.garrison={count:0,on:0},e.city.hospital={count:0},e.city.library={count:0},e.city.lumber_yard={count:0},e.city.mass_driver={count:0,on:0},e.city.metal_refinery={count:0,on:0},e.city.mine={count:0,on:0},e.city.oil_depot={count:0},e.city.oil_power={count:0,on:0},e.city.oil_well={count:0},e.city.rock_quarry={count:0,on:0,asbestos:50},e.city.sawmill={count:0,on:0},e.city.shed={count:0,on:0},e.city.storage_yard={count:0},e.city.temple={count:0},e.city.tourist_center={count:0,on:0},e.city.trade={count:0},e.city.university={count:0},e.city.wardenclyffe={count:0,on:0},e.city.warehouse={count:0},e.city.wharf={count:0},e.space.ai_colonist={count:0,on:0},e.space.ai_core={count:100},e.space.ai_core2={count:0,on:0},e.space.biodome={count:0,on:0},e.space.crashed_ship={count:100},e.space.decoder={count:0,on:0},e.space.digsite={count:0},e.space.drone={count:0},e.space.drone_control={count:0,on:0},e.space.e_reactor={count:0,on:0},e.space.electrolysis={count:0,on:0,support:0,s_max:0},e.space.elerium_contain={count:0,on:0},e.space.elerium_mine={count:0,on:0},e.space.elerium_ship={count:0,on:0},e.space.exotic_lab={count:0,on:0},e.space.fabrication={count:0,on:0},e.space.fob={count:0,on:0,troops:0,enemy:0},e.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},e.space.garage={count:0},e.space.gas_mining={count:0,on:0},e.space.gas_storage={count:0},e.space.geothermal={count:0,on:0},e.space.gps={count:0},e.space.helium_mine={count:0,on:0},e.space.hell_smelter={count:0,on:0},e.space.hydrogen_plant={count:0,on:0},e.space.iridium_mine={count:0,on:0},e.space.iridium_ship={count:0,on:0},e.space.iron_ship={count:0,on:0},e.space.lander={count:0,on:0},e.space.living_quarters={count:0,on:0},e.space.m_relay={count:0,on:0},e.space.mass_relay={count:100},e.space.moon_base={count:0,on:0,support:0,s_max:0},e.space.munitions_depot={count:0},e.space.nav_beacon={count:0,on:0},e.space.neutronium_mine={count:0,on:0},e.space.observatory={count:0,on:0},e.space.oil_extractor={count:0,on:0},e.space.operating_base={count:0,on:0},e.space.orichalcum_mine={count:0,on:0},e.space.outpost={count:0,on:0},e.space.propellant_depot={count:0},e.space.red_factory={count:0,on:0},e.space.red_mine={count:0,on:0},e.space.red_tower={count:0,on:0},e.space.satellite={count:0},e.space.shipyard={count:0,on:0,ships:[],expand:!1,sort:!0},e.space.shock_trooper={count:0,on:0},e.space.space_barracks={count:0,on:0},e.space.space_station={count:0,on:0,support:0,s_max:0},e.space.spaceport={count:0,on:0,support:0,s_max:0},e.space.spc_casino={count:0,on:0},e.space.storehouse={count:0},e.space.swarm_control={count:0,support:0,s_max:0},e.space.swarm_plant={count:0},e.space.swarm_satellite={count:0},e.space.tank={count:0,on:0},e.space.titan_bank={count:0},e.space.titan_mine={count:0,on:0},e.space.titan_quarters={count:0,on:0},e.space.titan_spaceport={count:0,on:0,support:0,s_max:0},e.space.uranium_mine={count:0,on:0},e.space.vr_center={count:0,on:0},e.space.water_freighter={count:0,on:0},e.space.zero_g_lab={count:0,on:0},e.space.ziggurat={count:0},e.tauceti.alien_outpost={count:1,on:1},e.tauceti.colony={count:1,on:1},e.tauceti.fusion_generator={count:1,on:1},e.tauceti.infectious_disease_lab={count:0,on:0,cure:0},e.tauceti.mining_pit={count:1,on:1},e.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},e.tauceti.orbital_station={count:1,on:1,support:0,s_max:0},e.tauceti.refueling_station={count:0,on:0},e.tauceti.repository={count:2},e.tauceti.tauceti_casino={count:0,on:0},e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!0,boost:!1,auto:!1,labs:0},e.tech.stock_exchange=0,e.tech.monuments=0,e.tech.supercollider=0,e.tech.tp_depot=0,e.tech.railway=0,e.tech.isolation=1,e.race.truepath=1,e.arpa.m_type=Ue("Monument"),ue(),Ar(),Ue("Physics"),Lt())}function Vn(){let r=0;return k.ai_colonist&&U.decoder&&(r+=k.ai_colonist*U.decoder*.35),U.shock_trooper&&(r+=U.shock_trooper*2),U.tank&&(r+=U.tank*2),r>100&&(r=100),r}function Bs(r,a){if(It[a].orbit!==-2){let i=1.075+It[a].dist/100;if(e.city.ptrait.includes("elliptical"))switch(a){case"spc_home":i=1.5;break;default:i=1.275+It[a].dist/100;break}r*=i}return r}function Gs(r){if(It[r].orbit!==-2){let a=It[r].dist/3;return e.city.ptrait.includes("elliptical")&&r==="spc_home"&&(a+=.15),r==="spc_eris"&&(a+=25),a}return 0}var ja,Ut;function ai(){let r=document.getElementById("mapCanvas"),a=r.getContext("2d");r.width=r.getBoundingClientRect().width,r.height=r.getBoundingClientRect().height,a.save(),a.fillStyle="#000000",a.fillRect(0,0,r.width,r.height),a.translate(Ut.x,Ut.y),a.scale(ja,ja);let i={};for(let[s,n]of Object.entries(It))i[s]=ii(s);a.lineWidth=1/ja,a.strokeStyle="#c0c0c0";for(let[s,n]of Object.entries(It))if(!n.moon&&n.orbit!==-2){a.beginPath(),n.belt||e.race.orbit_decayed&&s==="spc_home"?a.setLineDash([.01,.01]):a.setLineDash([]);let c=Gs(s);a.ellipse(c,0,Bs(n.dist,s),n.dist,0,0,Math.PI*2,!0),a.stroke()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(a.beginPath(),a.setLineDash([.1,.4]),a.moveTo(s.xy.x,s.xy.y),a.lineTo(s.destination.x,s.destination.y),a.stroke());for(let[s,n]of Object.entries(It)){if(e.race.orbit_decayed&&["spc_home","spc_moon"].includes(s))continue;let c="558888";if(O.space[s]&&O.space[s].info.syndicate()&&e.settings.space[s.substring(4)]){let o=yt(s);c=((Math.round(255*(1-o))<<16)+(Math.round(255*o)<<8)).toString(16).padStart(6,0)}s==="spc_dwarf"?c="7132a8":(s==="spc_sun"||s==="tauceti")&&(c="f8ff2b"),a.fillStyle="#"+c,a.beginPath();let l=n.size/10;if(n.moon)switch(s){case"spc_moon":a.arc(i[s].x+.05,i[s].y+.05,l,0,Math.PI*2,!0);break;case"spc_titan":a.arc(i[s].x-.2,i[s].y-.2,l,0,Math.PI*2,!0);break;default:a.arc(i[s].x+.2,i[s].y+.2,l,0,Math.PI*2,!0);break}else{let o=n.size/10;switch(s){case"spc_sun":a.arc(i[s].x,i[s].y,o,0,Math.PI*2,!0);break;default:a.arc(i[s].x,i[s].y,o,0,Math.PI*2,!0);break}}a.fill()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(a.beginPath(),a.arc(s.xy.x,s.xy.y,.1,0,Math.PI*2,!0),a.fill());a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=2,a.shadowColor="rgba(0, 0, 0, 0.5)",a.fillStyle="#009aff",a.font=`${20/ja}px serif`;for(let s of e.space.shipyard.ships)s.transit>0&&a.fillText(s.name,s.xy.x+.15,s.xy.y-.15);a.fillStyle="#ffa500",a.font=`${25/ja}px serif`;for(let[s,n]of Object.entries(It))if(O.space[s]&&e.settings.space[s.substring(4)]){if(e.race.orbit_decayed&&["spc_home"].includes(s))continue;let c=O.space[s].info.name,l=typeof c=="function"?c():c;if(n.moon)switch(s){case"spc_moon":a.fillText(l,i[s].x+.1,i[s].y+.1);break;case"spc_titan":a.fillText(l,i[s].x-.3,i[s].y-.3);break;default:a.fillText(l,i[s].x+.25,i[s].y+.2);break}else switch(s){case"spc_sun":break;default:a.fillText(l,i[s].x,i[s].y-.2*n.size);break}}a.restore()}function bu(r){let a=$('
').appendTo(r),i={},s={},n=!1;Ut={},ja=20,a.append($('').on("mouseup mouseover mouseout",()=>n=!1).on("mousedown",l=>{n=!0,s.x=l.clientX-Ut.x,s.y=l.clientY-Ut.y}).on("mousemove",l=>{n&&(Ut.x=l.clientX-s.x,Ut.y=l.clientY-s.y,ai())}).on("wheel",l=>(l.originalEvent.deltaY<0?(ja/=.8,Ut.x=i.x+(Ut.x-i.x)/.8,Ut.y=i.y+(Ut.y-i.y)/.8,ai()):(ja*=.8,Ut.x=i.x+(Ut.x-i.x)*.8,Ut.y=i.y+(Ut.y-i.y)*.8,ai()),!1)),$('').on("click",()=>{ja/=.8,Ut.x=i.x+(Ut.x-i.x)/.8,Ut.y=i.y+(Ut.y-i.y)/.8,ai()}),$('').on("click",()=>{ja*=.8,Ut.x=i.x+(Ut.x-i.x)*.8,Ut.y=i.y+(Ut.y-i.y)*.8,ai()}));let c=document.getElementById("mapCanvas").getBoundingClientRect();i.x=c.width/2,i.y=c.height/2,Ut.x=i.x,Ut.y=i.y,ai()}function wu(){$("#modalBox").append($('

Solar System

')),bu($("#modalBox"))}function Fo(){D({el:"#mainColumn div:first-child",data:{s:e.settings},methods:{swapTab(a){return e.settings.tabLoad||gr(a),a},saveImport(){$("#importExport").val().length>0&&importGame($("#importExport").val())},saveExport(){$("#importExport").val(window.exportGame()),$("#importExport").select(),document.execCommand("copy")},saveExportFile(){let a=(d,h,_)=>{let m=document.createElement("a"),w=new Blob([d],{type:_});m.href=URL.createObjectURL(w),m.download=h,m.click(),URL.revokeObjectURL(m.href)},i=new Date,s=i.getFullYear(),n=(i.getMonth()+1).toFixed(0).padStart(2,"0"),c=i.getDate().toFixed(0).padStart(2,"0"),l=i.getHours().toFixed(0).padStart(2,"0"),o=i.getMinutes().toFixed(0).padStart(2,"0");a(window.exportGame(),`evolve-${s}-${n}-${c}-${l}-${o}.txt`,"text/plain")},importStringFile(){let a=document.getElementById("stringPackFile").files[0];if(a){let i=new FileReader,s=document.getElementById("stringPackFile").files[0].name;i.readAsText(a,"UTF-8"),i.onload=function(n){try{JSON.parse(n.target.result)}catch{e.settings.sPackMsg=t("string_pack_error",[s]);return}e.settings.sPackMsg=t("string_pack_using",[s]),Se.setItem("string_pack_name",s),Se.setItem("string_pack",LZString.compressToUTF16(n.target.result)),e.settings.sPackOn&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())},i.onerror=function(n){console.error("error reading file")}}},clearStringFile(){Se.getItem("string_pack")&&(e.settings.sPackMsg=t("string_pack_none"),Se.removeItem("string_pack_name"),Se.removeItem("string_pack"),e.settings.sPackOn&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()))},stringPackOn(){Se.getItem("string_pack")&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())},restoreGame(){let a=Se.getItem("evolveBak")||!1;this.$buefy.dialog.confirm({title:t("restore"),message:t("restore_warning"),ariaModal:!0,confirmText:t("restore"),onConfirm(){a&&importGame(a,!0)}})},lChange(a){e.settings.locale=a,e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()},setTheme(a){e.settings.theme=a,$("html").removeClass(),$("html").addClass(a),$("html").addClass(e.settings.font)},numNotation(a){e.settings.affix=a},setQueueStyle(a){e.settings.queuestyle=a,$u()},setQueueResize(a){e.settings.q_resize=a},icon(a){e.settings.icon=a,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()},remove(a){e.r_queue.queue.splice(a,1)},font(a){e.settings.font=a,$("html").removeClass("standard"),$("html").removeClass("large_log"),$("html").removeClass("large_all"),$("html").addClass(a)},q_merge(a){e.settings.q_merge=a},toggleTabLoad(){Zn()},unpause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),e.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),!e.settings.pause&&!Pe.s&&Pr("start")}},filters:{namecase(a){return a.replace(/(?:^|\s)\w/g,function(i){return i.toUpperCase()})},label(a){return wi(a)},sPack(){return e.settings.sPackMsg},notation(a){switch(a){case"si":return t("metric");case"sci":return t("scientific");case"sln":return t("sln")}}}}),["1","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"].forEach(function(a){pe(`settings${a}`,function(){return t(`settings${a}`)},{elm:`#settings span.settings${a}`})});let r=`
{ + `;if(e.space.shipyard.expand){let o=`${t(`outer_shipyard_engine_${s.engine}`)} ${t(`outer_shipyard_class_${s.class}`)}`,d=$(`
`),h=$(`
${s.name} | ${t("outer_shipyard_scrap")} | ${o} | ${t(`outer_shipyard_weapon_${s.weapon}`)} | ${t(`outer_shipyard_power_${s.power}`)} | ${t(`outer_shipyard_armor_${s.armor}`)} | ${t(`outer_shipyard_sensor_${s.sensor}`)}
`),_=$('
'),m=$('
'),w=$(`
${l}
`);_.append(`${t("crew")} `),_.append(`${t("firepower")} `),_.append(`${t("outer_shipyard_sensors")} `),_.append(`${t("speed")} `),_.append(`${t("outer_shipyard_fuel")} `),_.append(`${t("outer_shipyard_hull")} `),m.append(``),d.append(h),d.append(_),d.append(m),d.append(w),r.append(d)}else{let o=$(`
`),d=$('
'),h=$('
'),_=$(`
${l}
`);d.append(`${s.name} | `),d.append(`${t("firepower")} `),d.append(`${t("outer_shipyard_sensors")} `),d.append(`${t("speed")} `),d.append(`${t("outer_shipyard_fuel")} `),d.append(`${t("outer_shipyard_hull")} `),h.append(``),o.append(d),o.append(h),o.append(_),r.append(o)}D({el:`#shipReg${i}`,data:e.space.shipyard.ships[i],methods:{scrap(o){e.space.shipyard.ships[o]&&e.space.shipyard.ships[o].location==="spc_dwarf"&&(e.space.shipyard.ships.splice(o,1),yi(),Ds())},scrapAllowed(o){return!!(e.space.shipyard.ships[o]&&e.space.shipyard.ships[o].location==="spc_dwarf")},setLoc(o,d){let h=e.space.shipyard.ships[d];if(o!==h.location){let _=fs(h),m=h.transit>0||h.location!=="spc_dwarf";if(m||e.civic.garrison.workers-e.civic.garrison.crew>=_){let w=Gn(h,o),M=Rn(h.xy,w),F=Di(h);h.location=o,h.transit=Math.round(M/F),h.dist=Math.round(M/F),h.origin=Ke(h.xy),h.destination={x:w.x,y:w.y},m||(e.civic.garrison.crew+=_),yi(),Ie(`ship${d}loc${o}`)}}},crewText(o){return fs(e.space.shipyard.ships[o])},fireText(o){return Wn(e.space.shipyard.ships[o])},sensorText(o){return Ri(e.space.shipyard.ships[o])+"km"},speedText(o){let d=7.695363719135802*Di(e.space.shipyard.ships[o]);return Math.round(d)+"km/s"},fuelText(o){let d=Rs(e.space.shipyard.ships[o]);return d.res?`${d.burn} ${e.resource[d.res].name}/s`:"N/A"},hullText(o){return`${100-e.space.shipyard.ships[o].damage}%`},hullDamage(o){return e.space.shipyard.ships[o].damage<=10?"has-text-success":e.space.shipyard.ships[o].damage>=40&&e.space.shipyard.ships[o].damage<65?"has-text-caution":e.space.shipyard.ships[o].damage>=65?"has-text-danger":""},dest(o){let d=s.class==="explorer"?t("tech_era_tauceti"):typeof a[e.space.shipyard.ships[o].location].info.name=="string"?a[e.space.shipyard.ships[o].location].info.name:a[e.space.shipyard.ships[o].location].info.name();return t("outer_shipyard_arrive",[d,e.space.shipyard.ships[o].transit])},show(o){return e.space.shipyard.ships[o].transit>0}}}),s.class==="explorer"?s.location!=="tauceti"&&pe(`ship${i}loctauceti`,function(){return t("transit_time",[Math.round(Rn(s.xy,Gn(s,"tauceti"))/Di(s))])},{elm:`#ship${i}loc .tauceti`,placement:"left"}):Object.keys(a).forEach(function(o){(a[o].info.syndicate()||o==="spc_dwarf")&&s.location!==o&&pe(`ship${i}loc${o}`,function(){return t("transit_time",[Math.round(Rn(s.xy,Gn(s,o))/Di(s))])},{elm:`#ship${i}loc .${o}`,placement:"left"})})}vu()}function Gn(r,a){if(It[a].orbit===-2)return ii(a);let i=Math.sqrt((r.xy.x-Gs(a))**2+r.xy.y**2),s=Di(r)/225,n=Bs(1,a),c=Math.abs(i-It[a].dist),l=Math.abs(i+It[a].dist),o=Math.abs(i-It[a].dist*n),d=Math.abs(i+It[a].dist*n),h=Math.floor(Math.min(c,o,l,d)/s),_=Math.ceil(Math.max(c,o,l,d)/s);i>=It[a].dist&&i<=It[a].dist*n&&(h=0);let w=360/(It[a].orbit===-1?e.city.calendar.orbit:It[a].orbit),M=(e.space.position[a]+h*w)%360,F=Math.PI/180;for(let x=h;x<=_;x++){let j=Bs(Math.cos(M*F)*It[a].dist,a);j+=Gs(a);let B=Math.sin(M*F)*It[a].dist;if(Math.sqrt((j-r.xy.x)**2+(B-r.xy.y)**2)/s<=x)return{x:j,y:B};M=(M+w)%360}return ii(a)}function yt(r,a){if(!e.tech.isolation&&e.tech.syndicate&&e.race.truepath&&e.space.syndicate&&e.space.syndicate.hasOwnProperty(r)){let i=1e3,s=0;switch(e.civic.foreign.gov3.hstl<10?s=250-25*e.civic.foreign.gov3.hstl:e.civic.foreign.gov3.hstl>60&&(s=-13*(e.civic.foreign.gov3.hstl-60)),r){case"spc_home":case"spc_moon":case"spc_red":case"spc_hell":i=1250+s;break;case"spc_gas":case"spc_gas_moon":case"spc_belt":i=1020+s;break;case"spc_titan":case"spc_enceladus":i=O.space[r].info.syndicate_cap();break;case"spc_triton":case"spc_kuiper":case"spc_eris":i=O.space[r].info.syndicate_cap();break}let n=e.space.syndicate[r],c=0,l=0,o=0;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){if(e.space.shipyard.ships.forEach(function(d){if(d.location===r&&d.transit===0&&d.fueled){let h=Wn(d);c+=d.damage>0?Math.round(h*(100-d.damage)/100):h,l+=Ri(d)}}),r==="spc_enceladus"&&Math.min(U.operating_base,k.operating_base)>0){let d=Math.min(U.operating_base,k.operating_base);c+=d*50}else r==="spc_titan"&&k.sam>0?c+=k.sam*25:r==="spc_triton"&&k.fob>0&&(c+=500,l+=10);l>100&&(l=Math.round((l-100)/(l-100+200)*100)+100),c=Math.round(c*((l+25)/125)),c>n&&(o=c-n),n=n-c>0?n-c:0}return a?{p:1-+(n/i).toFixed(4),r:n,s:l,o}:1-+(n/i).toFixed(4)}return a?{p:1,r:0,s:0,o:0}:1}function Ri(r){let a=1;switch(r.class){case"corvette":case"frigate":a=2;break;case"destroyer":case"cruiser":a=1.5;break;case"explorer":a=5;break;default:a=1;break}switch(r.sensor){case"visual":return 1;case"radar":return 10*a;case"lidar":return 18*a;case"quantum":return 32*a}}function Oo(){if(e.space.fob){if(e.space.fob.enemy<=1e3){let c=e.tech.outer&&e.tech.outer>=4?125:100;e.space.fob.enemy+=Math.rand(25,c)}let r=Math.ceil(N(e.space.fob.enemy)/5),a=e.civic.garrison.wounded-We();a<0&&(a=0);let i=mt(e.space.fob.troops,"army",a),s=Math.rand(0,a+1);e.civic.garrison.workers-=s,e.stats.died+=s,e.civic.garrison.wounded-=s,e.space.fob.enemy-=Math.rand(0,i),e.space.fob.enemy<0&&(e.space.fob.enemy=0);let n=Math.rand(0,e.space.fob.troops+1);if(n>r&&(n=r),e.race.armored&&(n-=N(1)),e.race.scales&&(n-=N(1)),e.tech.armor&&(n-=N(e.tech.armor)),n<0&&(n=0),e.race.revive&&s>0){let c=Math.round(Math.rand(0,s+1));e.civic.garrison.workers+=c}e.civic.garrison.wounded+=n,e.civic.garrison.wounded>We(!1,!0)&&(e.civic.garrison.wounded=We(!1,!0));{let c=e.civic.garrison.wounded-We();c<0&&(c=0);let l=e.space.fob.enemy-mt(e.space.fob.troops,"army",c);l<=0&&e.space.crashed_ship.count<100?e.space.crashed_ship.count++:l>0&&e.space.crashed_ship.count>0&&e.space.crashed_ship.count--,e.space.crashed_ship.count===100&&(e.resource.Cipher.display=!0)}}}function So(){if(e.space.digsite){if(e.space.digsite.enemy<=1e4){let a=250;e.space.digsite.enemy+=Math.rand(25,a)}let r=mt(U.shock_trooper,"army",0);U.tank&&(r+=U.tank*100),r*=yt("spc_eris"),e.space.digsite.enemy-=Math.rand(0,r),e.space.digsite.enemy<0?e.space.digsite.enemy=0:e.space.digsite.enemy>1e4&&(e.space.digsite.enemy=1e4),e.space.digsite.count=Math.floor(100-e.space.digsite.enemy/100)}}var It={spc_sun:{dist:0,orbit:0,size:2},spc_home:{dist:1,orbit:-1,size:.6},spc_moon:{dist:1.01,orbit:-1,size:.1,moon:!0},spc_red:{dist:1.524,orbit:687,size:.5},spc_hell:{dist:.4,orbit:88,size:.4},spc_venus:{dist:.7,orbit:225,size:.5},spc_gas:{dist:5.203,orbit:4330,size:1.25},spc_gas_moon:{dist:5.204,orbit:4330,size:.2,moon:!0},spc_belt:{dist:2.7,orbit:1642,size:.5,belt:!0},spc_dwarf:{dist:2.77,orbit:1682,size:.5},spc_saturn:{dist:9.539,orbit:10751,size:1.1},spc_titan:{dist:9.536,orbit:10751,size:.2,moon:!0},spc_enceladus:{dist:9.542,orbit:10751,size:.1,moon:!0},spc_uranus:{dist:19.8,orbit:30660,size:1},spc_neptune:{dist:30.08,orbit:60152,size:1},spc_triton:{dist:30.1,orbit:60152,size:.1,moon:!0},spc_kuiper:{dist:39.5,orbit:90498,size:.5,belt:!0},spc_eris:{dist:68,orbit:204060,size:.5},tauceti:{dist:752568.8,orbit:-2,size:2}};function Qn(){e.space.position||(e.space.position={}),Object.keys(It).forEach(function(r){e.space.position.hasOwnProperty(r)||(e.space.position[r]=Math.rand(0,360))}),e.space.position.spc_home=e.space.position.spc_moon,e.space.position.spc_gas_moon=e.space.position.spc_gas,e.space.position.spc_titan=e.space.position.spc_enceladus,e.space.position.spc_saturn=e.space.position.spc_titan,e.space.position.spc_neptune=e.space.position.spc_triton}function ii(r){let a=Bs(+Math.cos(e.space.position[r]*(Math.PI/180)).toFixed(5)*It[r].dist,r),i=+Math.sin(e.space.position[r]*(Math.PI/180)).toFixed(5)*It[r].dist;return a+=Gs(r),{x:a,y:i}}function Rn(r,a){return Math.ceil(Math.sqrt((a.x-r.x)**2+(a.y-r.y)**2)*225)}function Fa(r,a){let i=1;switch(e.race.pack_rat&&(i*=1+b.pack_rat.vars()[1]/100),e.stats.achieve.blackhole&&(i*=1+e.stats.achieve.blackhole.l*.05),e.tech.world_control&&(i*=3),r){case"storehouse":k.titan_spaceport&&(i*=1+k.titan_spaceport*.25),a&&e.tech.shelving&&(i*=2),e.tech.shelving&&e.tech.shelving>=3&&(i*=1.5);case"repository":e.tech.isolation&&(i*=3,e.tech.tp_depot&&(i*=1+e.tech.tp_depot/20));break}return i}function jo(){let r={city:{},space:{},ships:[]};r.ships=[...e.space.shipyard.ships],e.space.shipyard.ships=[],e.settings.spaceTabs=6,e.settings.showSpace=!1,e.settings.showOuter=!1,e.settings.showCity=!1,e.settings.showShipYard=!1,e.settings.govTabs===5&&(e.settings.govTabs=0),Gi(),le($("#shipList")),Object.keys(O.city).forEach(function(i){e.city.hasOwnProperty(i)&&e.city[i].hasOwnProperty("count")&&(e.race.hooved&&O.city[i].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.city[i].cost.Horseshoe()*e.city[i].count),r.city[i]={c:e.city[i].count},e.city[i].count=0,e.city[i].hasOwnProperty("on")&&(r.city[i].o=e.city[i].on,e.city[i].on=0))}),["spc_home","spc_moon","spc_red","spc_hell","spc_sun","spc_gas","spc_gas_moon","spc_belt","spc_dwarf","spc_titan","spc_enceladus","spc_triton","spc_kuiper","spc_eris"].forEach(function(i){Object.keys(O.space[i]).forEach(function(s){e.space.hasOwnProperty(s)&&e.space[s].hasOwnProperty("count")&&(e.race.hooved&&O.space[i][s].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=O.space[i][s].cost.Horseshoe()*e.space[s].count),r.space[s]={c:e.space[s].count},e.space[s].count=0,e.space[s].hasOwnProperty("on")&&(r.space[s].o=e.space[s].on,e.space[s].on=0))})}),e.race.hooved&&e.race.shoecnt<5&&(e.race.shoecnt=5),e.resource.Zen.display&&(e.resource.Zen.display=!1),e.resource.Slave.display&&(e.resource.Slave.display=!1,e.resource.Slave.amount=0,qr("slave")),e.race.deconstructor&&va.forEach(function(i){e.city.nanite_factory[i]=0}),Object.keys(e.resource).forEach(function(i){e.resource[i].hasOwnProperty("trade")&&(e.resource[i].trade=0)}),Object.keys(si).forEach(function(i){["professor","scientist","pit_miner","cement_worker","craftsman"].includes(i)||(e.civic[i].workers=0,e.civic[i].assigned=0)}),["forager","farmer","lumberjack","quarry_worker","miner","coal_miner","priest","colonist","titan_colonist","space_miner"].forEach(function(i){e.civic[i].display=!1}),e.civic.hunter.display?e.civic.d_job="hunter":e.civic.d_job="unemployed",e.arpa.sequence&&(e.arpa.sequence.on=!1,e.arpa.sequence.boost=!1);for(let i of Object.values(e.race.purgatory.city))i.hasOwnProperty("count")&&(i.count=0),i.hasOwnProperty("on")&&(i.on=0);for(let i of Object.values(e.race.purgatory.space))i.hasOwnProperty("count")&&(i.count=0),i.hasOwnProperty("on")&&(i.on=0);if(e.queue.hasOwnProperty("queue"))for(let i=e.queue.queue.length-1;i>=0;i--){let s=e.queue.queue[i];(s.action==="city"||s.action==="space"||s.action==="starDock")&&e.queue.queue.splice(i,1)}e.tech.magic&&e.tech.magic>=2&&(e.tauceti.pylon={count:0},e.race.casting&&Object.keys(e.race.casting).forEach(function(i){e.race.casting[0]=0})),e.tauceti.tauceti_casino={count:0,on:0},e.tauceti.tau_housing={count:0};let a=U.colony*Ye.tau_home.colony.citizens();e.resource[e.race.species].amount>a&&(e.resource[e.race.species].amount=a),qr("spy"),qr("spyop"),le($("#infoTimer")),e.race.inactive=r}function Fo(){e.race.lone_survivor&&(e.tech.alloy=1,e.tech.alumina=2,e.tech.asteroid=7,e.tech.banking=11,e.tech.biotech=1,e.tech.boot_camp=2,e.tech.broadcast=2,e.tech.container=7,e.tech.copper=1,e.tech.currency=6,e.tech.disease=2,e.tech.drone=1,e.tech.elerium=2,e.tech.explosives=3,e.tech.factory=3,e.tech.foundry=8,e.tech.gambling=4,e.tech.gas_giant=1,e.tech.gas_moon=2,e.tech.genesis=2,e.tech.genetics=2,e.tech.gov_corp=1,e.tech.gov_fed=1,e.tech.gov_soc=1,e.tech.gov_theo=1,e.tech.govern=3,e.tech.graphene=1,e.tech.helium=1,e.tech.hell=1,e.tech.high_tech=13,e.tech.home_safe=2,e.tech.housing=3,e.tech.housing_reduction=3,e.tech.kuiper=2,e.tech.launch_facility=1,e.tech.luna=2,e.tech.m_smelting=2,e.tech.marines=2,e.tech.mars=5,e.tech.mass=1,e.tech.medic=3,e.tech.military=8,e.tech.mine_conveyor=1,e.tech.mining=4,e.tech.monument=1,e.tech.nano=1,e.tech.oil=7,e.tech.outer=8,e.tech.pickaxe=5,e.tech.polymer=2,e.tech.primitive=3,e.tech.q_factory=1,e.tech.quantium=1,e.tech.queue=3,e.tech.r_queue=1,e.tech.reproduction=1,e.tech.rival=1,e.tech.satellite=1,e.tech.science=9,e.tech.shelving=3,e.tech.shipyard=1,e.tech.smelting=6,e.tech.solar=5,e.tech.space=6,e.tech.space_explore=4,e.tech.space_housing=1,e.tech.spy=5,e.tech.stanene=1,e.tech.steel_container=6,e.tech.storage=5,e.tech.swarm=6,e.tech.syard_armor=3,e.tech.syard_class=6,e.tech.syard_engine=5,e.tech.syard_power=5,e.tech.syard_sensor=4,e.tech.syard_weapon=6,e.tech.syndicate=0,e.tech.synthetic_fur=1,e.tech.tau_home=6,e.tech.tauceti=4,e.tech.theatre=3,e.tech.theology=2,e.tech.titan=9,e.tech.titan_ai_core=3,e.tech.titan_power=1,e.tech.titanium=3,e.tech.trade=3,e.tech.unify=2,e.tech.uranium=4,e.tech.v_train=1,e.tech.vault=4,e.tech.wharf=1,e.tech.world_control=1,e.tech.wsc=0,e.race.flier||(e.tech.cement=5,e.resource.Cement.display=!0),e.race.universe==="magic"&&(e.tech.gov_mage=1,e.tech.magic=4,e.tech.conjuring=2,e.resource.Mana.display=!0,e.resource.Crystal.display=!0,e.civic.crystal_miner.display=!0,e.tauceti.pylon={count:0},e.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0}),e.settings.showSpace=!1,e.settings.showTau=!0,e.settings.tau.home=!0,e.settings.showCity=!1,e.settings.showIndustry=!0,e.settings.showPowerGrid=!0,e.settings.showResearch=!0,e.settings.showCivic=!0,e.settings.showMil=!0,e.settings.showResources=!0,e.settings.showMarket=!0,e.settings.showStorage=!0,e.settings.civTabs=1,e.settings.spaceTabs=6,e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.settings.arpa.genetics=!0,e.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.resource.Food.display=!0,e.resource.Stone.display=!0,e.resource.Furs.display=!0,e.resource.Copper.display=!0,e.resource.Iron.display=!0,e.resource.Aluminium.display=!0,e.resource.Coal.display=!0,e.resource.Oil.display=!0,e.resource.Uranium.display=!0,e.resource.Steel.display=!0,e.resource.Titanium.display=!0,e.resource.Alloy.display=!0,e.resource.Polymer.display=!0,e.resource.Iridium.display=!0,e.resource.Helium_3.display=!0,e.resource.Water.display=!0,e.resource.Neutronium.display=!0,e.resource.Adamantite.display=!0,e.resource.Elerium.display=!0,e.resource.Nano_Tube.display=!0,e.resource.Graphene.display=!0,e.resource.Stanene.display=!0,e.resource.Orichalcum.display=!0,e.resource.Bolognium.display=!0,e.resource.Unobtainium.display=!0,e.resource.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Mythril.display=!0,e.resource.Quantium.display=!0,e.resource.Cipher.display=!0,!e.race.kindling_kindred&&!e.race.smoldering&&(e.civic.lumberjack.display=!0,e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.resource.Lumber.max=1e7,e.resource.Lumber.amount=1e7,e.resource.Plywood.amount=25e5,e.resource.Lumber.crates=25,e.resource.Lumber.containers=25,e.tech.axe=5),e.race.smoldering&&(e.resource.Chrysotile.display=!0,e.resource.Chrysotile.max=5e6,e.resource.Chrysotile.amount=5e6),e.race.sappy||(e.tech.hammer=4),e.race.apex_predator||(e.tech.armor=3),e.resource[e.race.species].max=1,e.resource[e.race.species].amount=1,e.resource.Crates.amount=1e3,e.resource.Containers.amount=1e3,e.resource.Money.max=1e9,e.resource.Money.amount=1e9,e.resource.Knowledge.max=8e6,e.resource.Knowledge.amount=8e6,e.resource.Food.max=1e4,e.resource.Food.amount=1e4,e.resource.Oil.max=5e5,e.resource.Oil.amount=5e5,e.resource.Helium_3.max=5e5,e.resource.Helium_3.amount=5e5,e.resource.Water.max=25e3,e.resource.Water.amount=25e3,e.resource.Uranium.max=5e5,e.resource.Uranium.amount=5e5,e.resource.Stone.max=1e7,e.resource.Stone.amount=1e7,e.resource.Furs.max=5e6,e.resource.Furs.amount=5e6,e.resource.Copper.max=5e6,e.resource.Copper.amount=5e6,e.resource.Iron.max=5e6,e.resource.Iron.amount=5e6,e.resource.Steel.max=5e6,e.resource.Steel.amount=5e6,e.resource.Aluminium.max=5e6,e.resource.Aluminium.amount=5e6,e.resource.Cement.max=5e6,e.resource.Cement.amount=5e6,e.resource.Titanium.max=5e6,e.resource.Titanium.amount=5e6,e.resource.Coal.max=5e6,e.resource.Coal.amount=5e6,e.resource.Alloy.max=5e6,e.resource.Alloy.amount=5e6,e.resource.Polymer.max=5e6,e.resource.Polymer.amount=5e6,e.resource.Iridium.max=5e6,e.resource.Iridium.amount=5e6,e.resource.Neutronium.max=5e5,e.resource.Neutronium.amount=5e5,e.resource.Adamantite.max=5e6,e.resource.Adamantite.amount=5e6,e.resource.Elerium.max=1e3,e.resource.Elerium.amount=1e3,e.resource.Nano_Tube.max=5e6,e.resource.Nano_Tube.amount=5e6,e.resource.Graphene.max=5e6,e.resource.Graphene.amount=5e6,e.resource.Stanene.max=5e6,e.resource.Stanene.amount=5e6,e.resource.Bolognium.max=5e6,e.resource.Bolognium.amount=5e6,e.resource.Orichalcum.max=5e6,e.resource.Orichalcum.amount=5e6,e.resource.Brick.amount=25e5,e.resource.Wrought_Iron.amount=25e5,e.resource.Sheet_Metal.amount=25e5,e.resource.Mythril.amount=25e5,e.resource.Quantium.amount=25e5,e.race.artifical||(e.resource.Food.crates=10,e.resource.Food.containers=10),e.resource.Stone.crates=25,e.resource.Stone.containers=25,e.resource.Furs.crates=25,e.resource.Furs.containers=25,e.resource.Coal.crates=10,e.resource.Coal.containers=10,e.resource.Copper.crates=25,e.resource.Copper.containers=25,e.resource.Iron.crates=25,e.resource.Iron.containers=25,e.resource.Aluminium.crates=25,e.resource.Aluminium.containers=25,e.resource.Steel.crates=25,e.resource.Steel.containers=25,e.resource.Titanium.crates=25,e.resource.Titanium.containers=25,e.resource.Alloy.crates=25,e.resource.Alloy.containers=25,e.resource.Polymer.crates=25,e.resource.Polymer.containers=25,e.resource.Iridium.crates=25,e.resource.Iridium.containers=25,e.resource.Adamantite.crates=25,e.resource.Adamantite.containers=25,e.resource.Graphene.crates=25,e.resource.Graphene.containers=25,e.resource.Stanene.crates=25,e.resource.Stanene.containers=25,e.resource.Bolognium.crates=25,e.resource.Bolognium.containers=25,e.resource.Orichalcum.crates=25,e.resource.Orichalcum.containers=25,e.civic.taxes.display=!0,e.race.flier||(e.civic.cement_worker.display=!0,e.resource.Cement.crates=25,e.resource.Cement.containers=25),e.race.sappy||(e.civic.quarry_worker.display=!0),e.civic.professor.display=!0,e.civic.scientist.display=!0,e.civic.banker.display=!0,e.civic.pit_miner.display=!0,e.civic.professor.max=1,e.civic.professor.workers=1,e.city.calendar.day++,e.city.market.active=!0,e.city.power=0,e.city.powered=!0,e.race.artifical&&(e.city.transmitter={count:0,on:0}),e.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:1,Nano:0,Stanene:0},e.city.foundry={count:0,crafting:0,Plywood:0,Brick:0,Bronze:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0,Quantium:0},e.city.smelter={count:0,cap:2,Wood:0,Coal:0,Oil:2,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:1,Iridium:0},e.city.amphitheatre={count:0},e.city.apartment={count:0,on:0},e.city.bank={count:0},e.city.basic_housing={count:0},e.city.biolab={count:0,on:0},e.city.boot_camp={count:0},e.city.casino={count:0,on:0},e.city.cement_plant={count:0,on:0},e.city.coal_mine={count:0,on:0},e.city.coal_power={count:0,on:0},e.city.cottage={count:0},e.city.fission_power={count:0,on:0},e.city.garrison={count:0,on:0},e.city.hospital={count:0},e.city.library={count:0},e.city.lumber_yard={count:0},e.city.mass_driver={count:0,on:0},e.city.metal_refinery={count:0,on:0},e.city.mine={count:0,on:0},e.city.oil_depot={count:0},e.city.oil_power={count:0,on:0},e.city.oil_well={count:0},e.city.rock_quarry={count:0,on:0,asbestos:50},e.city.sawmill={count:0,on:0},e.city.shed={count:0,on:0},e.city.storage_yard={count:0},e.city.temple={count:0},e.city.tourist_center={count:0,on:0},e.city.trade={count:0},e.city.university={count:0},e.city.wardenclyffe={count:0,on:0},e.city.warehouse={count:0},e.city.wharf={count:0},e.space.ai_colonist={count:0,on:0},e.space.ai_core={count:100},e.space.ai_core2={count:0,on:0},e.space.biodome={count:0,on:0},e.space.crashed_ship={count:100},e.space.decoder={count:0,on:0},e.space.digsite={count:0},e.space.drone={count:0},e.space.drone_control={count:0,on:0},e.space.e_reactor={count:0,on:0},e.space.electrolysis={count:0,on:0,support:0,s_max:0},e.space.elerium_contain={count:0,on:0},e.space.elerium_mine={count:0,on:0},e.space.elerium_ship={count:0,on:0},e.space.exotic_lab={count:0,on:0},e.space.fabrication={count:0,on:0},e.space.fob={count:0,on:0,troops:0,enemy:0},e.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},e.space.garage={count:0},e.space.gas_mining={count:0,on:0},e.space.gas_storage={count:0},e.space.geothermal={count:0,on:0},e.space.gps={count:0},e.space.helium_mine={count:0,on:0},e.space.hell_smelter={count:0,on:0},e.space.hydrogen_plant={count:0,on:0},e.space.iridium_mine={count:0,on:0},e.space.iridium_ship={count:0,on:0},e.space.iron_ship={count:0,on:0},e.space.lander={count:0,on:0},e.space.living_quarters={count:0,on:0},e.space.m_relay={count:0,on:0},e.space.mass_relay={count:100},e.space.moon_base={count:0,on:0,support:0,s_max:0},e.space.munitions_depot={count:0},e.space.nav_beacon={count:0,on:0},e.space.neutronium_mine={count:0,on:0},e.space.observatory={count:0,on:0},e.space.oil_extractor={count:0,on:0},e.space.operating_base={count:0,on:0},e.space.orichalcum_mine={count:0,on:0},e.space.outpost={count:0,on:0},e.space.propellant_depot={count:0},e.space.red_factory={count:0,on:0},e.space.red_mine={count:0,on:0},e.space.red_tower={count:0,on:0},e.space.satellite={count:0},e.space.shipyard={count:0,on:0,ships:[],expand:!1,sort:!0},e.space.shock_trooper={count:0,on:0},e.space.space_barracks={count:0,on:0},e.space.space_station={count:0,on:0,support:0,s_max:0},e.space.spaceport={count:0,on:0,support:0,s_max:0},e.space.spc_casino={count:0,on:0},e.space.storehouse={count:0},e.space.swarm_control={count:0,support:0,s_max:0},e.space.swarm_plant={count:0},e.space.swarm_satellite={count:0},e.space.tank={count:0,on:0},e.space.titan_bank={count:0},e.space.titan_mine={count:0,on:0},e.space.titan_quarters={count:0,on:0},e.space.titan_spaceport={count:0,on:0,support:0,s_max:0},e.space.uranium_mine={count:0,on:0},e.space.vr_center={count:0,on:0},e.space.water_freighter={count:0,on:0},e.space.zero_g_lab={count:0,on:0},e.space.ziggurat={count:0},e.tauceti.alien_outpost={count:1,on:1},e.tauceti.colony={count:1,on:1},e.tauceti.fusion_generator={count:1,on:1},e.tauceti.infectious_disease_lab={count:0,on:0,cure:0},e.tauceti.mining_pit={count:1,on:1},e.tauceti.orbital_platform={count:0,on:0,support:0,s_max:0},e.tauceti.orbital_station={count:1,on:1,support:0,s_max:0},e.tauceti.refueling_station={count:0,on:0},e.tauceti.repository={count:2},e.tauceti.tauceti_casino={count:0,on:0},e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!0,boost:!1,auto:!1,labs:0},e.tech.stock_exchange=0,e.tech.monuments=0,e.tech.supercollider=0,e.tech.tp_depot=0,e.tech.railway=0,e.tech.isolation=1,e.race.truepath=1,e.arpa.m_type=Ue("Monument"),ue(),Fr(),Ue("Physics"),Lt())}function Vn(){let r=0;return k.ai_colonist&&U.decoder&&(r+=k.ai_colonist*U.decoder*.35),U.shock_trooper&&(r+=U.shock_trooper*2),U.tank&&(r+=U.tank*2),r>100&&(r=100),r}function Bs(r,a){if(It[a].orbit!==-2){let i=1.075+It[a].dist/100;if(e.city.ptrait.includes("elliptical"))switch(a){case"spc_home":i=1.5;break;default:i=1.275+It[a].dist/100;break}r*=i}return r}function Gs(r){if(It[r].orbit!==-2){let a=It[r].dist/3;return e.city.ptrait.includes("elliptical")&&r==="spc_home"&&(a+=.15),r==="spc_eris"&&(a+=25),a}return 0}var ja,Ut;function ai(){let r=document.getElementById("mapCanvas"),a=r.getContext("2d");r.width=r.getBoundingClientRect().width,r.height=r.getBoundingClientRect().height,a.save(),a.fillStyle="#000000",a.fillRect(0,0,r.width,r.height),a.translate(Ut.x,Ut.y),a.scale(ja,ja);let i={};for(let[s,n]of Object.entries(It))i[s]=ii(s);a.lineWidth=1/ja,a.strokeStyle="#c0c0c0";for(let[s,n]of Object.entries(It))if(!n.moon&&n.orbit!==-2){a.beginPath(),n.belt||e.race.orbit_decayed&&s==="spc_home"?a.setLineDash([.01,.01]):a.setLineDash([]);let c=Gs(s);a.ellipse(c,0,Bs(n.dist,s),n.dist,0,0,Math.PI*2,!0),a.stroke()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(a.beginPath(),a.setLineDash([.1,.4]),a.moveTo(s.xy.x,s.xy.y),a.lineTo(s.destination.x,s.destination.y),a.stroke());for(let[s,n]of Object.entries(It)){if(e.race.orbit_decayed&&["spc_home","spc_moon"].includes(s))continue;let c="558888";if(O.space[s]&&O.space[s].info.syndicate()&&e.settings.space[s.substring(4)]){let o=yt(s);c=((Math.round(255*(1-o))<<16)+(Math.round(255*o)<<8)).toString(16).padStart(6,0)}s==="spc_dwarf"?c="7132a8":(s==="spc_sun"||s==="tauceti")&&(c="f8ff2b"),a.fillStyle="#"+c,a.beginPath();let l=n.size/10;if(n.moon)switch(s){case"spc_moon":a.arc(i[s].x+.05,i[s].y+.05,l,0,Math.PI*2,!0);break;case"spc_titan":a.arc(i[s].x-.2,i[s].y-.2,l,0,Math.PI*2,!0);break;default:a.arc(i[s].x+.2,i[s].y+.2,l,0,Math.PI*2,!0);break}else{let o=n.size/10;switch(s){case"spc_sun":a.arc(i[s].x,i[s].y,o,0,Math.PI*2,!0);break;default:a.arc(i[s].x,i[s].y,o,0,Math.PI*2,!0);break}}a.fill()}a.fillStyle="#0000ff",a.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(a.beginPath(),a.arc(s.xy.x,s.xy.y,.1,0,Math.PI*2,!0),a.fill());a.shadowOffsetX=2,a.shadowOffsetY=2,a.shadowBlur=2,a.shadowColor="rgba(0, 0, 0, 0.5)",a.fillStyle="#009aff",a.font=`${20/ja}px serif`;for(let s of e.space.shipyard.ships)s.transit>0&&a.fillText(s.name,s.xy.x+.15,s.xy.y-.15);a.fillStyle="#ffa500",a.font=`${25/ja}px serif`;for(let[s,n]of Object.entries(It))if(O.space[s]&&e.settings.space[s.substring(4)]){if(e.race.orbit_decayed&&["spc_home"].includes(s))continue;let c=O.space[s].info.name,l=typeof c=="function"?c():c;if(n.moon)switch(s){case"spc_moon":a.fillText(l,i[s].x+.1,i[s].y+.1);break;case"spc_titan":a.fillText(l,i[s].x-.3,i[s].y-.3);break;default:a.fillText(l,i[s].x+.25,i[s].y+.2);break}else switch(s){case"spc_sun":break;default:a.fillText(l,i[s].x,i[s].y-.2*n.size);break}}a.restore()}function bu(r){let a=$('
').appendTo(r),i={},s={},n=!1;Ut={},ja=20,a.append($('').on("mouseup mouseover mouseout",()=>n=!1).on("mousedown",l=>{n=!0,s.x=l.clientX-Ut.x,s.y=l.clientY-Ut.y}).on("mousemove",l=>{n&&(Ut.x=l.clientX-s.x,Ut.y=l.clientY-s.y,ai())}).on("wheel",l=>(l.originalEvent.deltaY<0?(ja/=.8,Ut.x=i.x+(Ut.x-i.x)/.8,Ut.y=i.y+(Ut.y-i.y)/.8,ai()):(ja*=.8,Ut.x=i.x+(Ut.x-i.x)*.8,Ut.y=i.y+(Ut.y-i.y)*.8,ai()),!1)),$('').on("click",()=>{ja/=.8,Ut.x=i.x+(Ut.x-i.x)/.8,Ut.y=i.y+(Ut.y-i.y)/.8,ai()}),$('').on("click",()=>{ja*=.8,Ut.x=i.x+(Ut.x-i.x)*.8,Ut.y=i.y+(Ut.y-i.y)*.8,ai()}));let c=document.getElementById("mapCanvas").getBoundingClientRect();i.x=c.width/2,i.y=c.height/2,Ut.x=i.x,Ut.y=i.y,ai()}function wu(){$("#modalBox").append($('

Solar System

')),bu($("#modalBox"))}function Ao(){D({el:"#mainColumn div:first-child",data:{s:e.settings},methods:{swapTab(a){return e.settings.tabLoad||gr(a),a},saveImport(){$("#importExport").val().length>0&&importGame($("#importExport").val())},saveExport(){$("#importExport").val(window.exportGame()),$("#importExport").select(),document.execCommand("copy")},saveExportFile(){let a=(d,h,_)=>{let m=document.createElement("a"),w=new Blob([d],{type:_});m.href=URL.createObjectURL(w),m.download=h,m.click(),URL.revokeObjectURL(m.href)},i=new Date,s=i.getFullYear(),n=(i.getMonth()+1).toFixed(0).padStart(2,"0"),c=i.getDate().toFixed(0).padStart(2,"0"),l=i.getHours().toFixed(0).padStart(2,"0"),o=i.getMinutes().toFixed(0).padStart(2,"0");a(window.exportGame(),`evolve-${s}-${n}-${c}-${l}-${o}.txt`,"text/plain")},importStringFile(){let a=document.getElementById("stringPackFile").files[0];if(a){let i=new FileReader,s=document.getElementById("stringPackFile").files[0].name;i.readAsText(a,"UTF-8"),i.onload=function(n){try{JSON.parse(n.target.result)}catch{e.settings.sPackMsg=t("string_pack_error",[s]);return}e.settings.sPackMsg=t("string_pack_using",[s]),Se.setItem("string_pack_name",s),Se.setItem("string_pack",LZString.compressToUTF16(n.target.result)),e.settings.sPackOn&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())},i.onerror=function(n){console.error("error reading file")}}},clearStringFile(){Se.getItem("string_pack")&&(e.settings.sPackMsg=t("string_pack_none"),Se.removeItem("string_pack_name"),Se.removeItem("string_pack"),e.settings.sPackOn&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()))},stringPackOn(){Se.getItem("string_pack")&&(e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload())},restoreGame(){let a=Se.getItem("evolveBak")||!1;this.$buefy.dialog.confirm({title:t("restore"),message:t("restore_warning"),ariaModal:!0,confirmText:t("restore"),onConfirm(){a&&importGame(a,!0)}})},lChange(a){e.settings.locale=a,e.queue.rename=!0,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()},setTheme(a){e.settings.theme=a,$("html").removeClass(),$("html").addClass(a),$("html").addClass(e.settings.font)},numNotation(a){e.settings.affix=a},setQueueStyle(a){e.settings.queuestyle=a,$u()},setQueueResize(a){e.settings.q_resize=a},icon(a){e.settings.icon=a,Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),Pe.w&&Pe.w.terminate(),window.location.reload()},remove(a){e.r_queue.queue.splice(a,1)},font(a){e.settings.font=a,$("html").removeClass("standard"),$("html").removeClass("large_log"),$("html").removeClass("large_all"),$("html").addClass(a)},q_merge(a){e.settings.q_merge=a},toggleTabLoad(){Zn()},unpause(){$("#pausegame").removeClass("play"),$("#pausegame").removeClass("pause"),e.settings.pause?$("#pausegame").addClass("pause"):$("#pausegame").addClass("play"),!e.settings.pause&&!Pe.s&&Pr("start")}},filters:{namecase(a){return a.replace(/(?:^|\s)\w/g,function(i){return i.toUpperCase()})},label(a){return wi(a)},sPack(){return e.settings.sPackMsg},notation(a){switch(a){case"si":return t("metric");case"sci":return t("scientific");case"sln":return t("sln")}}}}),["1","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"].forEach(function(a){pe(`settings${a}`,function(){return t(`settings${a}`)},{elm:`#settings span.settings${a}`})});let r=`
{ "year": "Galactic Standard Year", "resource_Food_name": "Nom Noms" -}
`;pe("stringPack",function(){return t("string_example",[r])})}function wi(r){switch(r){case"city":return e.resource[e.race.species]?e.resource[e.race.species].amount<=5?t("tab_city1"):e.resource[e.race.species].amount<=20?t("tab_city2"):e.resource[e.race.species].amount<=75?t("tab_city3"):e.resource[e.race.species].amount<=250?t("tab_city4"):e.resource[e.race.species].amount<=600?t("tab_city5"):e.resource[e.race.species].amount<=1200?t("tab_city6"):e.resource[e.race.species].amount<=2500?t("tab_city7"):t("tab_city8"):t("tab_city1");case"local_space":return t("sol_system",[e.race.truepath?F[e.race.species].home:tt("name")]);case"outer_local_space":return t("outer_sol_system",[e.race.truepath?F[e.race.species].home:tt("name")]);case"old":return t("tab_old_res");case"new":return t("tab_new_res");case"old_sr":return t("tab_old_sr_res");case"new_sr":return t("tab_new_sr_res");default:return t(r)}}function $u(){["standardqueuestyle","listqueuestyle","bulletlistqueuestyle","numberedlistqueuestyle"].map(r=>{e.settings.queuestyle===r?$("html").addClass(r):$("html").removeClass(r)})}function Zn(){e.settings.tabLoad?(gr("mTabCivil"),gr("mTabCivic"),gr("mTabResearch"),gr("mTabResource"),gr("mTabArpa"),gr("mTabStats"),gr("mTabObserve")):gr(e.settings.civTabs)}function gr(r){switch(e.settings.tabLoad?wt("page_view",{page_title:"Evolve - All Tabs"}):(tc(),Qs(),Ws(),Kn(),zs(),Gi(),le($("#mTabCivil")),le($("#mTabCivic")),le($("#mTabResearch")),le($("#mTabResource")),le($("#mTabArpa")),le($("#mTabStats")),le($("#mTabObserve"))),r){case 0:e.settings.tabLoad||(wt("page_view",{page_title:"Evolve - Evolution"}),Gr());break;case 1:case"mTabCivil":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append(` +}
`;pe("stringPack",function(){return t("string_example",[r])})}function wi(r){switch(r){case"city":return e.resource[e.race.species]?e.resource[e.race.species].amount<=5?t("tab_city1"):e.resource[e.race.species].amount<=20?t("tab_city2"):e.resource[e.race.species].amount<=75?t("tab_city3"):e.resource[e.race.species].amount<=250?t("tab_city4"):e.resource[e.race.species].amount<=600?t("tab_city5"):e.resource[e.race.species].amount<=1200?t("tab_city6"):e.resource[e.race.species].amount<=2500?t("tab_city7"):t("tab_city8"):t("tab_city1");case"local_space":return t("sol_system",[e.race.truepath?A[e.race.species].home:tt("name")]);case"outer_local_space":return t("outer_sol_system",[e.race.truepath?A[e.race.species].home:tt("name")]);case"old":return t("tab_old_res");case"new":return t("tab_new_res");case"old_sr":return t("tab_old_sr_res");case"new_sr":return t("tab_new_sr_res");default:return t(r)}}function $u(){["standardqueuestyle","listqueuestyle","bulletlistqueuestyle","numberedlistqueuestyle"].map(r=>{e.settings.queuestyle===r?$("html").addClass(r):$("html").removeClass(r)})}function Zn(){e.settings.tabLoad?(gr("mTabCivil"),gr("mTabCivic"),gr("mTabResearch"),gr("mTabResource"),gr("mTabArpa"),gr("mTabStats"),gr("mTabObserve")):gr(e.settings.civTabs)}function gr(r){switch(e.settings.tabLoad?wt("page_view",{page_title:"Evolve - All Tabs"}):(tc(),Qs(),Ws(),Kn(),zs(),Gi(),le($("#mTabCivil")),le($("#mTabCivic")),le($("#mTabResearch")),le($("#mTabResource")),le($("#mTabArpa")),le($("#mTabStats")),le($("#mTabObserve"))),r){case 0:e.settings.tabLoad||(wt("page_view",{page_title:"Evolve - Evolution"}),Gr());break;case 1:case"mTabCivil":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append(` - `),D({el:"#mTabCivil",data:{s:e.settings},methods:{swapTab(a){if(!e.settings.tabLoad)switch(le($("#city")),le($("#space")),le($("#interstellar")),le($("#galaxy")),le($("#portal")),le($("#outerSol")),le($("#tauCeti")),a){case 0:Et();break;case 1:case 2:case 3:case 5:Pt();break;case 4:ir();break;case 6:Ar();break}return a}},filters:{label(a){return wi(a)}}}),e.race.species!=="protoplasm"&&(Et(),Pt(),ir(),Ar()),e.race.noexport&&(e.race.noexport==="Race"?(le($("#city")),vs()):e.race.noexport==="Planet"&&(le($("#city")),Jn()));break;case 2:case"mTabCivic":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Civics"}),$("#mTabCivic").append(` + `),D({el:"#mTabCivil",data:{s:e.settings},methods:{swapTab(a){if(!e.settings.tabLoad)switch(le($("#city")),le($("#space")),le($("#interstellar")),le($("#galaxy")),le($("#portal")),le($("#outerSol")),le($("#tauCeti")),a){case 0:Et();break;case 1:case 2:case 3:case 5:Pt();break;case 4:ir();break;case 6:Fr();break}return a}},filters:{label(a){return wi(a)}}}),e.race.species!=="protoplasm"&&(Et(),Pt(),ir(),Fr()),e.race.noexport&&(e.race.noexport==="Race"?(le($("#city")),vs()):e.race.noexport==="Planet"&&(le($("#city")),Jn()));break;case 2:case"mTabCivic":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Civics"}),$("#mTabCivic").append(` - `),D({el:"#mTabResource",data:{s:e.settings},methods:{swapTab(a){if(!e.settings.tabLoad)switch(le($("#market")),le($("#resStorage")),le($("#resEjector")),le($("#resCargo")),le($("#resAlchemy")),a){case 0:Ha("market");break;case 1:Ha("storage");break;case 2:Ha("ejector");break;case 3:Ha("supply");break;case 4:Ha("alchemy");break}return a}},filters:{label(a){return wi(a)}}}),Fa(),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color,s=Je.resource[a].tradable;if(Je.resource[a].stackable){var c=$(`
`);$("#resStorage").append(c),ws(`#stack-${a}`,c,a,i,!0)}if(s){var c=$(`
`);$("#market").append(c),bs(`#market-${a}`,c,a,i,!0)}Mt[a]&&Yn(a,i),ya[a]&&Xn(a,i),sr[a]&&e.race.universe==="magic"&&(e.resource[a].basic=s,ec(a,i,s))}),Ui();break;case 5:case"mTabArpa":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
+ `),D({el:"#mTabResource",data:{s:e.settings},methods:{swapTab(a){if(!e.settings.tabLoad)switch(le($("#market")),le($("#resStorage")),le($("#resEjector")),le($("#resCargo")),le($("#resAlchemy")),a){case 0:Ha("market");break;case 1:Ha("storage");break;case 2:Ha("ejector");break;case 3:Ha("supply");break;case 4:Ha("alchemy");break}return a}},filters:{label(a){return wi(a)}}}),Aa(),Je.hasOwnProperty("resource")&&Object.keys(Je.resource).forEach(function(a){let i=Je.resource[a].color,s=Je.resource[a].tradable;if(Je.resource[a].stackable){var c=$(`
`);$("#resStorage").append(c),ws(`#stack-${a}`,c,a,i,!0)}if(s){var c=$(`
`);$("#market").append(c),bs(`#market-${a}`,c,a,i,!0)}Mt[a]&&Yn(a,i),ya[a]&&Xn(a,i),sr[a]&&e.race.universe==="magic"&&(e.resource[a].basic=s,ec(a,i,s))}),Ui();break;case 5:case"mTabArpa":e.settings.tabLoad||wt("page_view",{page_title:"Evolve - Arpa"}),$("#mTabArpa").append(`
@@ -263,7 +263,7 @@ ${t("message_log_settings_save")}
- `);Or.append(Gt),Or.append(fr),Or.append(Rt);let st="",$r="",da="",Hr={},lr={};Oa.forEach(function(Me){st+=`
${t("message_log_"+Me)}
`,$r+=`
${t("message_log_"+Me)}
`,da+=`
${t("message_log_"+Me)}
`,Hr[Me]=e.settings.msgFilters[Me].max,lr[Me]=e.settings.msgFilters[Me].save}),Gt.append(st),fr.append($r),Rt.append(da),fr.append(` + `);Or.append(Gt),Or.append(fr),Or.append(Rt);let it="",$r="",da="",Hr={},lr={};Oa.forEach(function(Me){it+=`
${t("message_log_"+Me)}
`,$r+=`
${t("message_log_"+Me)}
`,da+=`
${t("message_log_"+Me)}
`,Hr[Me]=e.settings.msgFilters[Me].max,lr[Me]=e.settings.msgFilters[Me].save}),Gt.append(it),fr.append($r),Rt.append(da),fr.append(`
@@ -305,7 +305,7 @@ {{ 'tab_stats' | label }}
- `);n.append(m);let w="",M=[{i:"nuclear",f:"steelem",r:2},{i:"zombie",f:"the_misery",r:2},{i:"fire",f:"ill_advised",r:2},{i:"mask",f:"friday",r:1},{i:"skull",f:"demon_slayer",r:2},{i:"taijitu",f:"equilibrium",r:2},{i:"martini",f:"utopia",r:2},{i:"lightbulb",f:"energetic",r:2},{i:"trash",f:"garbage_pie",r:2},{i:"banana",f:"banana",r:2},{i:"turtle",f:"finish_line",r:2},{i:"floppy",f:"digital_ascension",r:2},{i:"slime",f:"slime_lord",r:2},{i:"lightning",f:"annihilation",r:2},{i:"heart",f:"valentine",r:1},{i:"clover",f:"leprechaun",r:1},{i:"bunny",f:"easter",r:1},{i:"egg",f:"egghunt",r:1},{i:"rocket",f:"launch_day",r:1},{i:"sun",f:"solstice",r:1},{i:"firework",f:"firework",r:1},{i:"ghost",f:"halloween",r:1},{i:"candy",f:"trickortreat",r:1},{i:"turkey",f:"thanksgiving",r:1},{i:"present",f:"xmas",r:1}],A=Jt();A<2&&(A=2);for(let Ce=0;Ce=M[Ce].r?w=w+`${gs(M[Ce].i,16,A)} {{ '${M[Ce].i}' | label }}`:e.settings.icon===M[Ce].i&&(e.settings.icon="star");let x=jt(9,14),j="";x.length>0&&(j=`${x}`);let B=ar(5,12,!0),S="";B.length>0&&(S=`${B}`);let Q="",V="";Object.keys(ns).length>1&&Object.keys(ns).forEach(function(Ce){e.settings.locale===Ce&&(V=ns[Ce]),Q=Q+`${ns[Ce]}`});let ce=$(` + `);n.append(m);let w="",M=[{i:"nuclear",f:"steelem",r:2},{i:"zombie",f:"the_misery",r:2},{i:"fire",f:"ill_advised",r:2},{i:"mask",f:"friday",r:1},{i:"skull",f:"demon_slayer",r:2},{i:"taijitu",f:"equilibrium",r:2},{i:"martini",f:"utopia",r:2},{i:"lightbulb",f:"energetic",r:2},{i:"trash",f:"garbage_pie",r:2},{i:"banana",f:"banana",r:2},{i:"turtle",f:"finish_line",r:2},{i:"floppy",f:"digital_ascension",r:2},{i:"slime",f:"slime_lord",r:2},{i:"lightning",f:"annihilation",r:2},{i:"heart",f:"valentine",r:1},{i:"clover",f:"leprechaun",r:1},{i:"bunny",f:"easter",r:1},{i:"egg",f:"egghunt",r:1},{i:"rocket",f:"launch_day",r:1},{i:"sun",f:"solstice",r:1},{i:"firework",f:"firework",r:1},{i:"ghost",f:"halloween",r:1},{i:"candy",f:"trickortreat",r:1},{i:"turkey",f:"thanksgiving",r:1},{i:"present",f:"xmas",r:1}],F=Jt();F<2&&(F=2);for(let Ce=0;Ce=M[Ce].r?w=w+`${gs(M[Ce].i,16,F)} {{ '${M[Ce].i}' | label }}`:e.settings.icon===M[Ce].i&&(e.settings.icon="star");let x=jt(9,14),j="";x.length>0&&(j=`${x}`);let B=ar(5,12,!0),S="";B.length>0&&(S=`${B}`);let Q="",V="";Object.keys(ns).length>1&&Object.keys(ns).forEach(function(Ce){e.settings.locale===Ce&&(V=ns[Ce]),Q=Q+`${ns[Ce]}`});let ce=$(` @@ -346,7 +346,7 @@ {{ s.icon | label }} - ${gs("star",16,A)} {{ 'star' | label }} + ${gs("star",16,F)} {{ 'star' | label }} ${w}
@@ -495,9 +495,9 @@
- `)}var Yt={spc_home:{info:{name(){return F[e.race.species].home},desc:t("space_home_info_desc"),zone:"inner",syndicate(){return!1}},test_launch:{id:"space-test_launch",title:t("space_home_test_launch_title"),desc:t("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete(){return e.tech.space>=2?0:1},cost:{Money(){return 1e5},Oil(r,a){return Fe(7500,!1,a)}},effect:t("space_home_test_launch_effect"),action(){if(u($(this)[0])){if(e.race.truepath){let r=1;if(_r("gov0")||r++,_r("gov1")||r++,_r("gov2")||r++,Math.floor(J(0,r))!==0)return I(t("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return e.space.satellite={count:0},I(t("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:t("space_home_satellite_title"),desc:t("space_home_satellite_desc"),reqs:{space:2},cost:{Money(r){return f("satellite",r,72e3,1.22)},Knowledge(r){return f("satellite",r,28e3,1.22)},Oil(r,a){return f("satellite",r,Fe(3200,!1,a),1.22)},Alloy(r){return f("satellite",r,8e3,1.22)}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?2e3:750;if((e.race.cataclysm||e.race.orbit_decayed)&&e.tech.supercollider){let n=e.tech.particles&&e.tech.particles>=3?5:10;r*=e.tech.supercollider/n+1}let a=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):dr(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`
${t("space_home_satellite_effect2",[a,i])}
`;return`
${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${s}
${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return u($(this)[0])?(ne("satellite"),e.resource.Knowledge.max+=750,!0):!1}},gps:{id:"space-gps",title:t("space_home_gps_title"),desc(){return e.space.hasOwnProperty("gps")&&e.space.gps.count<4?`
${t("space_home_gps_desc")}
${t("space_home_gps_desc_req")}
`:`
${t("space_home_gps_desc")}
`},reqs:{satellite:1},not_trait:["terrifying"],cost:{Money(r){return f("gps",r,75e3,1.18)},Knowledge(r){return f("gps",r,5e4,1.18)},Copper(r){return f("gps",r,6500,1.18)},Oil(r,a){return f("gps",r,Fe(3500,!1,a),1.18)},Titanium(r){return f("gps",r,8e3,1.18)}},effect(r){return(r||0)+(e.space.hasOwnProperty("gps")?e.space.gps.count:0)<4?t("space_home_gps_effect_req"):`
${t("space_home_gps_effect")}
${t("space_home_gps_effect2",[2])}
`},action(){return u($(this)[0])?(ne("gps"),!0):!1}},propellant_depot:{id:"space-propellant_depot",title:t("space_home_propellant_depot_title"),desc:t("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money(r){return f("propellant_depot",r,55e3,1.35)},Aluminium(r){return f("propellant_depot",r,22e3,1.35)},Oil(r,a){return f("propellant_depot",r,Fe(5500,!1,a),1.35)}},effect(){let r=H(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let a=H(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
`}return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
`},action(){return u($(this)[0])?(ne("propellant_depot"),e.resource.Oil.max+=H(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(1e3)*(e.tech.world_control?1.5:1)),!0):!1}},nav_beacon:{id:"space-nav_beacon",title(){return e.race.orbit_decayed?t("space_home_broadcast_beacon_title"):t("space_home_nav_beacon_title")},desc:`
${t("space_home_nav_beacon_desc")}
${t("requires_power")}
`,reqs:{luna:2},cost:{Money(r){return f("nav_beacon",r,75e3,1.32)},Copper(r){return f("nav_beacon",r,38e3,1.32)},Aluminium(r){return f("nav_beacon",r,44e3,1.32)},Oil(r,a){return f("nav_beacon",r,Fe(12500,!1,a),1.32)},Iridium(r){return f("nav_beacon",r,1200,1.32)}},powered(){return _e(2)},powerBalancer(){return e.tech.luna&&e.tech.luna>=3?[{s:e.space.moon_base.s_max-e.space.moon_base.support},{s:e.space.spaceport.s_max-e.space.spaceport.support}]:[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},support(){return 1},effect(){let r="";e.race.orbit_decayed&&e.tech.broadcast&&(r=`
${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let a=e.race.orbit_decayed?"":`
${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`
${t("space_red_spaceport_effect1",[W().red,1])}
`:"";return`${a}${i}${r}
${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("nav_beacon"),re($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let r=F[e.race.species].home;return t("space_moon_info_desc",[r])},support:"moon_base",zone:"inner",syndicate(){return!0}},moon_mission:{id:"space-moon_mission",title:t("space_moon_mission_title"),desc:t("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete(){return e.tech.space>=3?0:1},cost:{Oil(r,a){return+Fe(12e3,!1,a).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return u($(this)[0])?(I(t("space_moon_mission_action"),"info",!1,["progress"]),e.space.iridium_mine={count:0,on:0},e.space.helium_mine={count:0,on:0},!0):!1}},moon_base:{id:"space-moon_base",title:t("space_moon_base_title"),desc(){return`
${t("space_moon_base_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{space:3},cost:{Money(r){return f("moon_base",r,22e3,1.32)},Cement(r){return f("moon_base",r,18e3,1.32)},Alloy(r){return f("moon_base",r,7800,1.32)},Polymer(r){return f("moon_base",r,12500,1.32)}},effect(r){let a=H(500),i=+Fe($(this)[0].support_fuel().a,!0,r).toFixed(2);return`
${t("space_moon_base_effect1")}
${t("plus_max_resource",[a,t("resource_Iridium_name")])}
${t("space_moon_base_effect3",[i,$(this)[0].powered()])}
`},support(){return 2},support_fuel(){return{r:"Oil",a:2}},powered(){return _e(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("moon_base"),re($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let r=t("space_moon_base_msg",[ut(3)]);e.civic.foreign.gov3.hstl<10?r=`${r} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(r=`${r} ${t("space_moon_base_msg_hstl")}`),I(r,"info",!1,["progress"])}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+2500&&(e.race.orbit_decay=e.stats.days+2500,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:t("space_moon_iridium_mine_title"),desc:`
${t("space_moon_iridium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("iridium_mine",r,42e3,1.35)},Lumber(r){return f("iridium_mine",r,9e3,1.35)},Titanium(r){return f("iridium_mine",r,17500,1.35)}},effect(){let r=T("iridium_mine","iridium"),a=+r.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`
${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`
${t("produce",[+T("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`
${t("produce",[+(T("iridium_mine","coal")/48).toFixed(3),e.resource.Uranium.name])}
`:"";return`
${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_iridium_mine_effect",[a])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Iridium.display=!0,ne("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Lt()),re($(this)[0]),!0):!1}},helium_mine:{id:"space-helium_mine",title:t("space_moon_helium_mine_title"),desc:`
${t("space_moon_helium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("helium_mine",r,38e3,1.35)},Aluminium(r){return f("helium_mine",r,9e3,1.35)},Steel(r){return f("helium_mine",r,17500,1.35)}},effect(){let r=H(100),a=T("helium_mine"),i=+a.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`)),`
${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_helium_mine_effect",[i])}
${s}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Helium_3.display=!0,ne("helium_mine"),re($(this)[0]),!0):!1}},observatory:{id:"space-observatory",title:t("space_moon_observatory_title"),desc:`
${t("space_moon_observatory_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{science:9,luna:1},cost:{Money(r){return f("observatory",r,2e5,1.28)},Knowledge(r){return f("observatory",r,69e3,1.28)},Stone(r){return f("observatory",r,125e3,1.28)},Iron(r){return f("observatory",r,65e3,1.28)},Iridium(r){return f("observatory",r,1250,1.28)}},effect(){let r="";e.race.cataclysm&&(r=`
${t("city_university_effect",[N(1)])}
`);let a=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(a*=1+e.space.satellite.count*.25);let i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[25])}
`:`
${t("space_moon_observatory_effect",[5])}
`;return`
${t("space_used_support",[t("space_moon_info_name")])}
${r}
${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("observatory"),re($(this)[0]),!0):!1}}},spc_red:{info:{name(){return W().red},desc(){return t("space_red_info_desc",[W().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[W().red])},desc(){return t("space_mission_desc",[W().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(r,a){return+Fe(4500,!1,a).toFixed(0)}},effect(){return t("space_red_mission_effect",[W().red])},action(){return u($(this)[0])?(I(t("space_red_mission_action",[W().red]),"info",!1,["progress"]),e.space.living_quarters={count:0,on:0},e.space.garage={count:0},e.space.red_mine={count:0,on:0},e.space.fabrication={count:0,on:0},!0):!1}},spaceport:{id:"space-spaceport",title:t("space_red_spaceport_title"),desc(){return`
${t("space_red_spaceport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{space:4},cost:{Money(r){return f("spaceport",r,47500,1.32)},Iridium(r){return f("spaceport",r,1750,1.32)},Mythril(r){return f("spaceport",r,25,1.32)},Titanium(r){return f("spaceport",r,22500,1.32)}},effect(r){let a=+Fe($(this)[0].support_fuel().a,!0,r).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=H(Fr()*4);i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_red_spaceport_effect1",[W().red,$(this)[0].support()])}
${i}
${t("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let r=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&r++,r},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return _e(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("spaceport"),re($(this)[0]),e.tech.mars||(e.tech.mars=1),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),e.race.fasting){let r=it();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1}},red_tower:{id:"space-red_tower",title:t("space_red_tower_title"),desc(){return`
${t("space_red_tower_desc")}
${t("requires_power")}
`},reqs:{mars:3},cost:{Money(r){return f("red_tower",r,225e3,1.28)},Iron(r){return f("red_tower",r,22e3,1.28)},Cement(r){return f("red_tower",r,15e3,1.28)},Alloy(r){return f("red_tower",r,8e3,1.28)}},effect(){return`
${t("space_red_spaceport_effect1",[W().red,e.race.cataclysm?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm?2:1},action(){return u($(this)[0])?(ne("red_tower"),re($(this)[0]),!0):!1}},captive_housing:hr("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(r){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||r?`
${t("space_terraformer")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("terraformer")&&e.space.terraformer.count>=100?`
${t("requires_power")}
`:""):`
${t("space_terraformer")}
`},reqs:{terraforming:1},condition(){return!(e.space.terraformer.count>=100)},queue_size:5,queue_complete(){return 100-e.space.terraformer.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(r){let a=(r?r.count:0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(a<100){let i=100-a;return`
${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_red.atmo_terraformer.effect(r)},action(){return u($(this)[0])&&e.space.terraformer.count<100?(ne("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},Pt(),Ie()),!0):!1}},atmo_terraformer:{id:"space-atmo_terraformer",title:t("space_terraformer"),desc(){return`
${t("space_terraformer")}
${t("requires_power")}
`},wiki:!1,reqs:{terraforming:2},condition(){return e.space.terraformer.count>=100},queue_complete(){return 0},cost:{},powered(r){return _e((r?r.truepath:e.race.truepath)?500:5e3)},postPower(r){r?setTimeout(function(){e.tech.terraforming=k.atmo_terraformer?3:2,Pt()},250):(e.tech.terraforming=2,Pt())},effect(r){let a=Eo(),i=$(this)[0].powered(r),s=i>0?`
${t("minus_power",[i])}
`:"";return`
${t("space_terraformer_effect2")}
${a}${s}`},action(){return!1}},terraform:{id:"space-terraform",title:t("space_terraform"),desc:t("space_terraform"),reqs:{terraforming:3},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Eo();return`
${t("space_terraform_effect")}
${r}`},action(){return u($(this)[0])?(Jn(),!0):!1}},assembly:hr("assembly","space"),living_quarters:{id:"space-living_quarters",title:t("space_red_living_quarters_title"),desc(){return`
${t("space_red_living_quarters_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("living_quarters",r,rc(38e3),1.28)},Steel(r){return f("living_quarters",r,rc(15e3),1.28)},Polymer(r){return f("living_quarters",r,rc(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a="";if(e.race.cataclysm||e.race.orbit_decayed){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");a=`
${t("plus_max_resource",[`$${i}`,t("resource_Money_name")])}
`}return`
${t("space_used_support",[W().red])}
${a}
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(u($(this)[0])){if(ne("living_quarters"),e.civic.colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.colonist.workers+=a}return!0}return!1},citizens(){let r=e.race.cataclysm||e.race.orbit_decayed?2:1;if(U.biodome){let a=e.tech.mars>=6?.1:.05;r+=a*U.biodome}return+N(r).toFixed(2)}},pylon:{id:"space-pylon",title:t("space_red_pylon"),desc:t("space_red_pylon"),reqs:{magic:2},condition(){return!!(e.race.cataclysm||e.race.orbit_decayed)},cost:{Money(r){return f("pylon",r,10,1.48)},Stone(r){return f("pylon",r,12,1.42)},Crystal(r){return f("pylon",r,8,1.42)-3}},effect(){let r=H(2),a=+(.005*ft("magic")).toFixed(3);return`
${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},vr_center:{id:"space-vr_center",title:t("space_red_vr_center_title"),desc(){return`
${t("space_red_vr_center_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(r){return f("vr_center",r,38e4,1.25)},Copper(r){return f("vr_center",r,55e3,1.25)},Stanene(r){return f("vr_center",r,1e5,1.25)},Soul_Gem(r){return f("vr_center",r,1,1.25)}},effect(){let r=ge("gaslighter",1),a=r?r+1:1;return e.race.orbit_decayed&&(a+=2),`
${t("space_used_support",[W().red])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("vr_center"),re($(this)[0]),!0):!1}},garage:{id:"space-garage",title:t("space_red_garage_title"),desc(){return`
${t("space_red_garage_desc")}
`},reqs:{mars:1},cost:{Money(r){return f("garage",r,75e3,1.28)},Iron(r){return f("garage",r,12e3,1.28)},Brick(r){return f("garage",r,3e3,1.28)},Sheet_Metal(r){return f("garage",r,1500,1.28)}},wide:!0,res(){let r=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(r.push("Polymer"),r.push("Coal"),r.push("Lumber"),r.push("Chrysotile"),r.push("Stone"),r.push("Furs")),r},heavy(r){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(r)},val(r){switch(r){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return e.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Polymer":return 2500;case"Coal":return 1500;case"Lumber":return 7500;case"Chrysotile":return 7500;case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(r){let a=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a*=2),e.tech.shelving&&e.tech.shelving>=3&&(a*=1.5),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,r&&e.tech.shelving&&e.tech.shelving>=2?a*3:a},effect(){let r=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),i=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(i+=10);let s=e.race.cataclysm||e.race.orbit_decayed?`${t("plus_max_resource",[i,t("resource_Crates_name")])}`:"",n='
';n=n+`${t("plus_max_resource",[i,t("resource_Containers_name")])}${s}`;for(let c of $(this)[0].res())if(e.resource[c].display){let l=$(this)[0].heavy(c),o=Ee(+(H($(this)[0].val(c))*(l?a:r)).toFixed(0),1);n=n+`${t("plus_max_resource",[o,e.resource[c].name])}`}return n=n+"
",n},action(){if(u($(this)[0])){ne("garage");let r=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r+=10),e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=$(this)[0].multiplier(!1),i=$(this)[0].multiplier(!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s);e.resource[s].max+=H($(this)[0].val(s))*(n?i:a)}return!0}return!1}},red_mine:{id:"space-red_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("red_mine",r,5e4,1.32)},Lumber(r){return f("red_mine",r,65e3,1.32)},Iron(r){return f("red_mine",r,33e3,1.32)}},effect(){let r=T("red_mine","copper"),a=T("red_mine","titanium"),i=+r.b.toFixed(3),s=+a.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`
${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`
${t("city_mine_effect1",[N(1)])}
${t("city_coal_mine_effect1",[N(1)])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`
${t("space_red_mine_effect",[+T("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`
${t("space_red_mine_effect",[+T("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",d=e.race.cataclysm||e.race.orbit_decayed?`
${t("space_red_mine_effect",[+T("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`
${t("space_used_support",[W().red])}
${c}
${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${o}${l}${d}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("red_mine"),re($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`
${t("space_red_fabrication_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("fabrication",r,9e4,1.32)},Copper(r){return f("fabrication",r,25e3,1.32)},Cement(r){return f("fabrication",r,12e3,1.32)},Wrought_Iron(r){return f("fabrication",r,1200,1.32)}},effect(){let r=e.race.cataclysm&&!e.race.flier?`
${t("city_cement_plant_effect1",[N(1)])}
`:"",a=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(a=xe(a)),`
${t("space_used_support",[W().red])}
${t("space_red_fabrication_effect1",[N(1)])}
${r}
${t("space_red_fabrication_effect2",[a])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("fabrication"),re($(this)[0])&&(e.civic.craftsman.max+=N(1)),!0):!1}},red_factory:{id:"space-red_factory",title:t("space_red_factory_title"),desc(){return`
${t("space_red_factory_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{mars:4},cost:{Money(r){return f("red_factory",r,75e3,1.32)},Brick(r){return f("red_factory",r,1e4,1.32)},Coal(r){return f("red_factory",r,7500,1.32)},Mythril(r){return f("red_factory",r,50,1.32)}},effect(r){let a=`
${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(a=a+`
${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(a=a+`
${t("city_cement_plant_effect1",[N(1)])}
`);let i=+Fe(1,!0,r).toFixed(2);return a=a+`
${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,a},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.space.red_factory.count++,re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("nanite_factory","space"),biodome:{id:"space-biodome",title(){return e.race.artifical?t("space_red_signal_tower_title"):e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")},desc(){let r;return e.race.artifical?r=`
${t("space_red_signal_tower_title")}
`:e.race.soul_eater?r=`
${t("space_red_asphodel_desc")}
`:e.race.carnivore?r=`
${t("space_red_biodome_desc_carn")}
`:r=`
${t("space_red_biodome_desc",[W().red])}
`,`
${r}
${t("space_support",[W().red])}
`},reqs:{mars:2},cost:{Money(r){return f("biodome",r,45e3,1.28)},Lumber(r){return f("biodome",r,65e3,1.28)},Brick(r){return f("biodome",r,1e3,1.28)},Nanite(r){return e.race.deconstructor?f("biodome",r,75,1.28):0}},effect(){let r=+T("biodome","food").toFixed(2),a=e.race.cataclysm||e.race.orbit_decayed?`
${t("produce",[+T("biodome","cat_food").toFixed(2),e.resource.Food.name])}
`:"",i=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.kindling_kindred&&!e.race.smoldering?`
${t("space_red_mine_effect",[+T("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[H(500)]):t("plus_max_resource",[H(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`
${n}${t("space_used_support",[W().red])}
${a}
${t("space_red_biodome_effect",[r,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+N(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("biodome"),e.race.cataclysm||(ie("colonist"),e.race.joyless&&(ie("joyless"),delete e.race.joyless,ue())),re($(this)[0]),!0):!1},flair(){return e.race.artifical?t("space_red_signal_tower_flair"):e.race.soul_eater?t("space_red_asphodel_flair"):e.race.carnivore?t("space_red_biodome_flair_carn"):t("space_red_biodome_flair")}},red_university:{id:"space-red_university",title:t("city_university"),desc(){return t("city_university_desc",[W().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(r){return f("university",r,900,1.5,"city")-500},Lumber(r){return f("university",r,500,1.36,"city")-200},Stone(r){return f("university",r,750,1.36,"city")-350},Crystal(r){return e.race.universe==="magic"?f("university",r,5,1.36,"city"):0}},wiki:!1,effect(){return O.city.university.effect()},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:t("space_red_exotic_lab_title"),desc(){return`
${t("space_red_exotic_lab_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:5},cost:{Money(r){return f("exotic_lab",r,75e4,1.28)},Steel(r){return f("exotic_lab",r,1e5,1.28)},Mythril(r){return f("exotic_lab",r,1e3,1.28)},Elerium(r){return f("exotic_lab",r,20,1.28)-4}},effect(){let r=500;e.tech.science>=13&&e.interstellar.laboratory&&bt.laboratory&&(r+=bt.laboratory*25),e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15),e.tech.mass>=2&&k.mass_driver&&(r+=xe(k.mass_driver*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=xe(r));let a=H(10),i="",s="";return(e.race.cataclysm||e.race.orbit_decayed)&&(i=`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,r*=1+U.observatory*.25,e.tech.science>=15&&(s=`
${t("city_wardenclyffe_effect4",[2])}
`)),`
${t("space_used_support",[W().red])}
${i}${s}
${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exotic_lab"),re($(this)[0]),!0):!1},flair(){return`
${t("space_red_exotic_lab_flair1")}
${t("space_red_exotic_lab_flair2")}
`}},ziggurat:{id:"space-ziggurat",title:t("space_red_ziggurat_title"),desc(){let r=e.race.old_gods!=="none"?F[e.race.old_gods.toLowerCase()].entity:F[e.race.species].entity;return`
${t("space_red_ziggurat_desc",[r])}
`},reqs:{theology:4},cost:{Money(r){return f("ziggurat",r,6e5,1.28)},Stone(r){return f("ziggurat",r,25e4,1.28)},Aluminium(r){return f("ziggurat",r,7e4,1.28)},Mythril(r){return f("ziggurat",r,250,1.28)}},effect(){let r=e.tech.ancient_study?.6:.4;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(r+=.01*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=.002;e.race.high_pop&&(s=xe(s)),r+=s*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=xe(r)),r=+r.toFixed(2);let a=e.race.truepath?[r,F[e.race.species].home]:[r],i=`
${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(i=i+`
${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(i=i+cc()),e.genes.ancients&&e.genes.ancients>=4&&(i=i+`
${t("city_temple_effect6",[N(1)])}
`),i},action(){return u($(this)[0])?(ne("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=N(1)),e.race.cataclysm&&ie("iron_will",!1,1),!0):!1}},space_barracks:{id:"space-space_barracks",title:t("space_red_space_barracks_title"),desc(){return`
${t("space_red_space_barracks_desc")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{marines:1},cost:{Money(r){return f("space_barracks",r,35e4,1.28)},Alloy(r){return f("space_barracks",r,65e3,1.28)},Iridium(r){return f("space_barracks",r,22500,1.28)},Wrought_Iron(r){return f("space_barracks",r,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(r){let a=e.race.orbit_decayed?O.city.boot_camp.effect():"",i=+Fe(2,!0,r).toFixed(2),s=e.tech.marines>=2?N(4):N(2),n=e.race.cataclysm?"":`
${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`
${t("plus_max_soldiers",[s])}
${a}
${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return u($(this)[0])?(ne("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:hr("bonfire","space"),horseshoe:hr("horseshoe","space")},spc_hell:{info:{name(){return W().hell},desc(){return t("space_hell_info_desc",[W().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[W().hell])},desc(){return t("space_mission_desc",[W().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(r,a){return+Fe(6500,!1,a).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[W().hell])},action(){return u($(this)[0])?(I(t("space_hell_mission_action",[W().hell]),"info",!1,["progress"]),e.space.geothermal={count:0,on:0},!0):!1}},geothermal:{id:"space-geothermal",title:t("space_hell_geothermal_title"),desc(){return`
${t("space_hell_geothermal_desc")}
${t("space_hell_geothermal_desc_req")}
`},reqs:{hell:1},cost:{Money(r){return f("geothermal",r,38e3,1.35)},Steel(r){return f("geothermal",r,15e3,1.35)},Polymer(r){return f("geothermal",r,9500,1.35)}},effect(r){let a=+Fe($(this)[0].p_fuel().a,!0,r).toFixed(2);return`${e.race.cataclysm||e.race.orbit_decayed?`
${t("interstellar_stellar_forge_effect3",[1])}
`:""}${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("space_belt_station_effect3",[a])}`},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let r=-8;return e.race.forge&&(r-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(r-=2),dt(r)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return u($(this)[0])?(ne("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[W().hell])},desc(){return t("space_hell_smelter_title",[W().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(r){return f("hell_smelter",r,25e4,1.24)},Adamantite(r){return f("hell_smelter",r,15e3,1.24)}},effect(){return`
${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return u($(this)[0])?(ne("hell_smelter"),e.city.smelter.cap+=2,e.city.smelter.Steel+=2,e.city.smelter.Oil+=2,!0):!1}},spc_casino:{id:"space-spc_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition(){return!!(e.race.cataclysm||e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)},cost:{Money(r){return f("spc_casino",r,4e5,1.35)},Furs(r){return f("spc_casino",r,75e3,1.35)},Cement(r){return f("spc_casino",r,1e5,1.35)},Plywood(r){return f("spc_casino",r,2e4,1.35)}},effect(){let r=ms();return r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:t("space_hell_swarm_plant_title"),desc(){return`
${t("space_hell_swarm_plant_desc")}
`},reqs:{solar:4,hell:1},cost:{Money(r){return f("swarm_plant",r,$s(75e3),1.28)},Iron(r){return f("swarm_plant",r,$s(65e3),1.28)},Neutronium(r){return f("swarm_plant",r,$s(75),1.28)},Brick(r){return f("swarm_plant",r,$s(2500),1.28)},Mythril(r){return f("swarm_plant",r,$s(100),1.28)}},effect(){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=xt/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return u($(this)[0])?(ne("swarm_plant"),!0):!1}},firework:hr("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[F[e.race.species].home])},support:"swarm_control",zone:"inner",syndicate(){return!1}},sun_mission:{id:"space-sun_mission",title(){return t("space_sun_mission_title")},desc(){return t("space_sun_mission_desc")},reqs:{space_explore:4},grant:["solar",1],queue_complete(){return e.tech.solar>=1?0:1},cost:{Helium_3(r,a){return+Fe(15e3,!1,a).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!u($(this)[0])}},swarm_control:{id:"space-swarm_control",title:t("space_sun_swarm_control_title"),desc(){return`
${t("space_sun_swarm_control_desc")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_control",r,1e5,1.3)},Knowledge(r){return f("swarm_control",r,6e4,1.3)},Alloy(r){return f("swarm_control",r,7500,1.3)},Helium_3(r,a){return f("swarm_control",r,Fe(2e3,!1,a),1.3)},Mythril(r){return f("swarm_control",r,250,1.3)}},effect(){return t("space_sun_swarm_control_effect1",[$(this)[0].support()])},support(){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(xt):12:10},action(){return u($(this)[0])?(ne("swarm_control"),e.space.swarm_control.s_max+=$(this)[0].support(),!0):!1}},swarm_satellite:{id:"space-swarm_satellite",title:t("space_sun_swarm_satellite_title"),desc(){return`
${t("space_sun_swarm_satellite_desc")}
${t("space_sun_swarm_satellite_desc_req")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_satellite",r,Zs(5e3),1.1)},Copper(r){return f("swarm_satellite",r,Zs(2500),1.1)},Iridium(r){return f("swarm_satellite",r,Zs(150),1.1)},Helium_3(r,a){return f("swarm_satellite",r,Zs(Fe(50,!1,a)),1.1)}},effect(){let r=.35;return e.tech.swarm>=4&&(r+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(r+=.15),e.blood.illuminate&&(r+=.01*e.blood.illuminate),r=+r.toFixed(2),`${t("space_dwarf_reactor_effect1",[dt(r)])}, ${t("space_sun_swarm_satellite_effect1",[1])}`},support(){return-1},action(){return u($(this)[0])?(ne("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||r?`
${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`
${t("tau_jump_gate")}
`},reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete(){return 100-e.space.jump_gate.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(a<100){let i=100-a;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return W().gas},desc(){return t("space_gas_info_desc",[W().gas,F[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[W().gas])},desc(){return t("space_mission_desc",[W().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(r,a){return+Fe(12500,!1,a).toFixed(0)}},effect(){return t("space_gas_mission_effect",[W().gas])},action(){return u($(this)[0])?(I(t("space_gas_mission_action",[W().gas]),"info",!1,["progress"]),e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.space.space_station={count:0,on:0,support:0,s_max:0},!0):!1}},gas_mining:{id:"space-gas_mining",title:t("space_gas_mining_title"),desc(){return`
${t("space_gas_mining_desc")}
${t("requires_power")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_mining",r,25e4,1.32)},Uranium(r){return f("gas_mining",r,500,1.32)},Alloy(r){return f("gas_mining",r,1e4,1.32)},Helium_3(r,a){return f("gas_mining",r,Fe(2500,!1,a),1.32)},Mythril(r){return f("gas_mining",r,25,1.32)}},effect(){let r=+T("gas_mining").toFixed(2);return`
${t("space_gas_mining_effect1",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},action(){return u($(this)[0])?(ne("gas_mining"),re($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[W().gas])},desc(){return`
${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_storage",r,125e3,1.32)},Iridium(r){return f("gas_storage",r,3e3,1.32)},Sheet_Metal(r){return f("gas_storage",r,2e3,1.32)},Helium_3(r,a){return f("gas_storage",r,Fe(1e3,!1,a),1.32)}},effect(){let r=H(3500)*(e.tech.world_control?1.5:1),a=H(2500)*(e.tech.world_control?1.5:1),i=H(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return u($(this)[0])?(ne("gas_storage"),!0):!1}},star_dock:{id:"space-star_dock",title(){return t("space_gas_star_dock_title")},desc(){return`
${t("space_gas_star_dock_title")}
${t("space_gas_star_dock_desc_req")}
`},reqs:{genesis:3},queue_complete(){return 1-e.space.star_dock.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(r,a){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(Fe(e.race.gravity_well?25e3:1e4,!1,a)):0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?1e4:0}},effect(){return`
${t("space_gas_star_dock_effect1")}
`},special:!0,action(){return e.space.star_dock.count===0&&u($(this)[0])?(ne("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return W().gas_moon},desc(){return t("space_gas_moon_info_desc",[W().gas_moon,W().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[W().gas_moon])},desc(){return t("space_mission_desc",[W().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(r,a){return+Fe(3e4,!1,a).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[W().gas_moon])},action(){return u($(this)[0])?(I(t("space_gas_moon_mission_action",[W().gas_moon]),"info",!1,["progress"]),e.space.outpost={count:0,on:0},e.tech.gas_moon=1,!0):!1}},outpost:{id:"space-outpost",title:t("space_gas_moon_outpost_title"),desc(){return`
${t("space_gas_moon_outpost_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{gas_moon:1},cost:{Money(r){return f("outpost",r,666e3,1.3)},Titanium(r){return f("outpost",r,18e3,1.3)},Iridium(r){return f("outpost",r,2500,1.3)},Helium_3(r,a){return f("outpost",r,Fe(6e3,!1,a),1.3)},Mythril(r){return f("outpost",r,300,1.3)}},effect(r){let a=+T("outpost").toFixed(3),i=H(500),s=+Fe(2,!0,r).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("outpost"),e.resource.Neutronium.display=!0,re($(this)[0]),!0):!1}},drone:{id:"space-drone",title:t("space_gas_moon_drone_title"),desc(){return`
${t("space_gas_moon_drone_desc")}
`},reqs:{gas_moon:1,drone:1},cost:{Money(r){return f("drone",r,25e4,1.3)},Steel(r){return f("drone",r,2e4,1.3)},Neutronium(r){return f("drone",r,500,1.3)},Elerium(r){return f("drone",r,25,1.3)},Nano_Tube(r){return f("drone",r,45e3,1.3)}},effect(){let r=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`
${t("space_gas_moon_drone_effect1",[r])}
`},action(){return u($(this)[0])?(ne("drone"),!0):!1}},oil_extractor:{id:"space-oil_extractor",title:t("space_gas_moon_oil_extractor_title"),desc(){return`
${t("space_gas_moon_oil_extractor_title")}
${t("requires_power")}
`},reqs:{gas_moon:2},cost:{Money(r){return f("oil_extractor",r,666e3,1.3)},Polymer(r){return f("oil_extractor",r,7500,1.3)},Helium_3(r,a){return f("oil_extractor",r,Fe(2500,!1,a),1.3)},Wrought_Iron(r){return f("oil_extractor",r,5e3,1.3)}},effect(){let r=+T("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[r])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return _e(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return u($(this)[0])?(ne("oil_extractor"),re($(this)[0]),!0):!1}}},spc_belt:{info:{name(){return t("space_belt_info_name")},desc(){return e.space.space_station&&e.space.space_station.count>0?`
${t("space_belt_info_desc",[W().red,W().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[W().red,W().gas])},support:"space_station",zone:"inner",syndicate(){return!0}},belt_mission:{id:"space-belt_mission",title(){return t("space_belt_mission_title")},desc(){return t("space_belt_mission_desc")},reqs:{space:5},grant:["asteroid",1],queue_complete(){return e.tech.asteroid>=1?0:1},cost:{Helium_3(r,a){return+Fe(25e3,!1,a).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return u($(this)[0])?(I(t("space_belt_mission_action"),"info",!1,["progress"]),e.settings.space.dwarf=!0,!0):!1}},space_station:{id:"space-space_station",title:t("space_belt_station_title"),desc(){return`
${t("space_belt_station_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{asteroid:2},cost:{Money(r){return f("space_station",r,25e4,1.3)},Iron(r){return f("space_station",r,85e3,1.3)},Polymer(r){return f("space_station",r,18e3,1.3)},Iridium(r){return f("space_station",r,2800,1.28)},Helium_3(r,a){return f("space_station",r,Fe(2e3,!1,a),1.3)},Mythril(r){return f("space_station",r,75,1.25)}},effect(r){let a=+Fe(2.5,!0,r).toFixed(2),i=e.race.cataclysm?1:10,s=H(5),n=e.tech.asteroid>=5?`
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`
${t("plus_max_space_miners",[N(3)])}
${n}
${t("space_belt_station_effect5",[a,$(this)[0].powered()])}
`:`
${t("plus_max_space_miners",[N(3)])}
${n}
${t("space_belt_station_effect3",[a])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return N(3)},powered(){return _e(3)},refresh:!0,action(){if(u($(this)[0])){if(ne("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),re($(this)[0])){let r=N(3);e.civic.space_miner.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.space_miner.workers+=a}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:t("space_belt_elerium_ship_title"),desc(){return t("space_belt_elerium_ship_title")},reqs:{asteroid:5},cost:{Money(r){return f("elerium_ship",r,5e5,1.3)},Uranium(r){return f("elerium_ship",r,2500,1.3)},Titanium(r){return f("elerium_ship",r,1e4,1.3)},Mythril(r){return f("elerium_ship",r,500,1.3)},Helium_3(r,a){return f("elerium_ship",r,Fe(5e3,!1,a),1.3)}},effect(){let r=+T("elerium_ship").toFixed(4);return`
${t("space_belt_elerium_ship_effect1",[N(2)])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-2)},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_ship"),re($(this)[0]),!0):!1}},iridium_ship:{id:"space-iridium_ship",title:t("space_belt_iridium_ship_title"),desc(){return t("space_belt_iridium_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iridium_ship",r,12e4,1.3)},Uranium(r){return f("iridium_ship",r,1e3,1.3)},Alloy(r){return f("iridium_ship",r,48e3,1.3)},Iridium(r){return f("iridium_ship",r,2800,1.3)},Helium_3(r,a){return f("iridium_ship",r,Fe(1800,!1,a),1.3)}},effect(){let r=+T("iridium_ship").toFixed(3);return`
${t("space_belt_iridium_ship_effect1",[N(1)])}
${t("space_belt_iridium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iridium_ship"),re($(this)[0]),!0):!1}},iron_ship:{id:"space-iron_ship",title:t("space_belt_iron_ship_title"),desc(){return t("space_belt_iron_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iron_ship",r,8e4,1.3)},Steel(r){return f("iron_ship",r,42e3,1.3)},Aluminium(r){return f("iron_ship",r,38e3,1.3)},Polymer(r){return f("iron_ship",r,16e3,1.3)},Helium_3(r,a){return f("iron_ship",r,Fe(1200,!1,a),1.3)}},effect(){let r=+T("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`
${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
${t("space_belt_iron_ship_effect3")}
`:`
${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iron_ship"),re($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return W().dwarf},desc(){return t("space_dwarf_info_desc",[W().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[W().dwarf])},desc(){return t("space_mission_desc",[W().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(r,a){return+Fe(45e3,!1,a).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[W().dwarf])},action(){return u($(this)[0])?(I(t("space_dwarf_mission_action",[W().dwarf]),"info",!1,["progress"]),e.space.elerium_contain={count:0,on:0},!0):!1}},elerium_contain:{id:"space-elerium_contain",title:t("space_dwarf_elerium_contain_title"),desc(){return`
${t("space_dwarf_elerium_contain_title")}
${t("requires_power")}
`},reqs:{dwarf:1},cost:{Money(r){return f("elerium_contain",r,8e5,1.28)},Cement(r){return f("elerium_contain",r,12e4,1.28)},Iridium(r){return f("elerium_contain",r,5e4,1.28)},Neutronium(r){return f("elerium_contain",r,250,1.28)}},effect(){let r=H(100);return`
${t("plus_max_resource",[r,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(6)},action(){return u($(this)[0])?(ne("elerium_contain"),re($(this)[0]),!0):!1}},e_reactor:{id:"space-e_reactor",title:t("space_dwarf_reactor_title"),desc(){return`
${t("space_dwarf_reactor_title")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{elerium:2},cost:{Money(r){return f("e_reactor",r,125e4,1.28)},Steel(r){return f("e_reactor",r,35e4,1.28)},Neutronium(r){return f("e_reactor",r,1250,1.28)},Mythril(r){return f("e_reactor",r,2500,1.28)}},effect(){let r=$(this)[0].p_fuel().a,a=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[a])}
${t("space_dwarf_reactor_effect2",[r])}
`},powered(){return dt(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return u($(this)[0])?(ne("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(r){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||r)return`
${t("space_dwarf_collider_desc")}
${t("space_dwarf_collider_desc_req")}
`+(e.space.hasOwnProperty("world_collider")&&e.space.world_collider.count>=1859?`
${t("requires_power")}
`:"")},reqs:{science:10},path:["standard"],condition(){return e.space.world_collider.count<1859},queue_size:100,queue_complete(){return 1859-e.space.world_collider.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(a<1859){let i=1859-a;return`
${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&u($(this)[0])){if(ne("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},ue(),Pt(),e.race.banana){let r=it();e.stats.banana.b2[r]=!0,r!=="m"&&r!=="l"&&(e.stats.banana.b2.l=!0)}Ie()}return!0}return!1},flair:t("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:t("space_dwarf_collider_title"),desc(){return`
${t("space_dwarf_collider_title")}
${t("requires_power")}
`},wiki:!1,reqs:{science:11},path:["standard"],condition(){return!(e.space.world_collider.count<1859)},queue_complete(){return 0},cost:{},effect(){let r=25;return e.interstellar.far_reach&&k.far_reach>0&&(r+=k.far_reach*1),e.tech.science>=19&&(r+=15),`
${t("plus_max_resource",[r+"%",t("resource_Knowledge_name")])}
${t("space_dwarf_controller_effect3")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(20)},action(){return!1},flair:t("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:t("outer_shipyard_title"),desc(){return`
${t("outer_shipyard_title")}
${t("requires_power")}
`},reqs:{shipyard:1},path:["truepath"],cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?5e5:0}},queue_complete(){return 1-e.space.shipyard.count},effect(){return`
${t("outer_shipyard_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(50)},special:!0,sAction(){k.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(gr("mTabCivic"),Ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&u($(this)[0])?(ne("shipyard"),re($(this)[0])&&(e.settings.showShipYard=!0),e.tech.syard_class=2,e.tech.syard_armor=3,e.tech.syard_weapon=1,e.tech.syard_engine=2,e.tech.syard_power=3,e.tech.syard_sensor=3,!0):!1}},mass_relay:{id:"space-mass_relay",title:t("space_dwarf_mass_relay_title"),desc(r){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||r)return`
${t("space_dwarf_mass_relay_title")}
${t("requires_segments",[100])}
`},reqs:{outer:5},path:["truepath"],condition(){return e.space.mass_relay.count<100},queue_size:5,queue_complete(){return 100-e.space.mass_relay.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(a<100){let i=100-a;return`
${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&u($(this)[0])?(e.space.mass_relay.count++,e.space.mass_relay.count>=100&&(e.tech.outer=6,e.space.m_relay={count:1,on:1,charged:0},ue(),Pt(),Ie()),!0):!1}},m_relay:{id:"space-m_relay",title:t("space_dwarf_mass_relay_title"),desc(){return`
${t("space_dwarf_mass_relay_title")}
${t("requires_power")}
`},reqs:{outer:6},path:["truepath"],condition(){return e.space.mass_relay.count>=100},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},effect(){let r=Math.floor(e.space.m_relay.charged/10)/10;return`
${t("space_dwarf_mass_relay_effect2",[W().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[r])}
`},action(){return!1}}},spc_titan:Bi().spc_titan,spc_enceladus:Bi().spc_enceladus,spc_triton:Bi().spc_triton,spc_kuiper:Bi().spc_kuiper,spc_eris:Bi().spc_eris},Cr={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[F[e.race.species].home]):t("interstellar_alpha_desc1",[F[e.race.species].home])},support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:t("space_mission_title",[t("interstellar_alpha_name")]),desc:t("space_mission_desc",[t("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete(){return e.tech.alpha>=1?0:1},cost:{Helium_3(){return+ze(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_alpha_mission_result"),"info",!1,["progress"]),e.interstellar.nexus={count:0,on:0,support:0,s_max:0},e.interstellar.warehouse={count:0},!0):!1}},starport:{id:"interstellar-starport",title:t("interstellar_alpha_starport_title"),desc(){return`
${t("interstellar_alpha_starport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{alpha:1},cost:{Money(r){return f("starport",r,1e6,1.3,"interstellar")},Aluminium(r){return f("starport",r,4e5,1.3,"interstellar")},Neutronium(r){return f("starport",r,1e3,1.3,"interstellar")},Elerium(r){return f("starport",r,100,1.3,"interstellar")}},effect(){let r=+ze(5).toFixed(2),a=100;return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 5},powered(){return _e(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,re($(this)[0]),e.tech.alpha===1&&(e.tech.alpha=2,e.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+100&&(e.race.orbit_decay=e.stats.days+100,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},habitat:{id:"interstellar-habitat",title:t("interstellar_habitat_title"),desc:`
${t("interstellar_habitat_desc")}
${t("requires_power")}
`,reqs:{alpha:3},cost:{Money(r){return f("habitat",r,8e5,1.25,"interstellar")},Furs(r){return f("habitat",r,38e3,1.25,"interstellar")},Adamantite(r){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:f("habitat",r,3200,1.25,"interstellar")},Plywood(r){return f("habitat",r,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[r])}, ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return u($(this)[0])?(ne("habitat","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},mining_droid:{id:"interstellar-mining_droid",title:t("interstellar_mining_droid_title"),desc:`
${t("interstellar_mining_droid_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{alpha:2},cost:{Money(r){return f("mining_droid",r,65e4,1.28,"interstellar")},Steel(r){return f("mining_droid",r,12e4,1.28,"interstellar")},Nano_Tube(r){return f("mining_droid",r,75e3,1.28,"interstellar")},Elerium(r){return f("mining_droid",r,50,1.28,"interstellar")}},effect(){return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_mining_droid_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,refresh:!0,action(){return u($(this)[0])?(ne("mining_droid","interstellar"),e.resource.Adamantite.display=!0,re($(this)[0])&&e.interstellar.mining_droid.adam++,e.tech.droids||(e.tech.droids=1,e.interstellar.processing={count:0,on:0}),e.settings.showIndustry=!0,rt(),!0):!1}},processing:{id:"interstellar-processing",title:t("interstellar_processing_title"),desc:`
${t("interstellar_processing_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{droids:1},cost:{Money(r){return f("processing",r,35e4,1.28,"interstellar")},Iron(r){return f("processing",r,18e4,1.28,"interstellar")},Aluminium(r){return f("processing",r,6e4,1.28,"interstellar")},Iridium(r){return f("processing",r,5e3,1.28,"interstellar")}},effect(){let r=12;return e.tech.ai_core&&e.tech.ai_core>=2&&k.citadel>0&&(r+=k.citadel*2),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_processing_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("processing","interstellar"),re($(this)[0]),!0):!1}},fusion:{id:"interstellar-fusion",title:t("interstellar_fusion_title"),desc(){return`
${t("interstellar_fusion_title")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Deuterium.name])}
`},reqs:{fusion:1},cost:{Money(r){return f("fusion",r,99e4,1.28,"interstellar")},Iridium(r){return f("fusion",r,44e3,1.28,"interstellar")},Infernite(r){return f("fusion",r,350,1.28,"interstellar")},Brick(r){return f("fusion",r,18e3,1.28,"interstellar")}},effect(){let r=1.25;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("interstellar_fusion_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return dt(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return u($(this)[0])?(ne("fusion","interstellar"),re($(this)[0]),!0):!1}},laboratory:{id:"interstellar-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title")},desc:`
${t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{science:12},cost:{Money(r){return f("laboratory",r,75e4,1.28,"interstellar")},Crystal(r){return e.race.universe==="magic"?f("laboratory",r,1200,1.28,"interstellar"):0},Titanium(r){return f("laboratory",r,12e4,1.28,"interstellar")},Alloy(r){return f("laboratory",r,95e3,1.28,"interstellar")},Mythril(r){return f("laboratory",r,8500,1.28,"interstellar")}},effect(){let r=1e4;e.tech.science>=15&&(r*=1+(e.race.cataclysm||e.race.orbit_decayed?U.exotic_lab:e.city.wardenclyffe.count)*.02),(e.race.cataclysm||e.race.orbit_decayed)&&k.s_gate&&we.scavenger&&(r*=1+we.scavenger*+(kt("gxy_alien2")*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let a="";e.tech.science>=16&&(a=`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`);let i=`
${t("space_used_support",[t("interstellar_alpha_name")])}
${a}
${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(i=i+`
${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let s=H(12);i=i+`
${t("plus_max_resource",[s,e.resource.Mana.name])}
`}return i},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("laboratory","interstellar"),re($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=N(1))),!0):!1}},exchange:{id:"interstellar-exchange",title:t("interstellar_exchange_title"),desc:`
${t("interstellar_exchange_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{banking:12},cost:{Money(r){return f("exchange",r,68e4,1.28,"interstellar")},Stone(r){return f("exchange",r,115e3,1.28,"interstellar")},Adamantite(r){return f("exchange",r,55e3,1.28,"interstellar")},Graphene(r){return f("exchange",r,78e3,1.28,"interstellar")}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?k.spaceport:e.city.bank?e.city.bank.count:0,a=e.race.cataclysm||e.race.orbit_decayed?Fr()*4:Fr(),i=H(e.city.bank?a*r/18:0);return e.race.inflation&&(i*=2),e.tech.banking>=13&&(e.galaxy.freighter&&(i*=1+we.freighter*.03),e.galaxy.super_freighter&&(i*=1+we.super_freighter*.08)),i=+i.toFixed(0),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exchange","interstellar"),re($(this)[0])&&(e.resource.Money.max+=+H(45e4).toFixed(0)),!0):!1}},g_factory:{id:"interstellar-g_factory",title:t("interstellar_g_factory_title"),desc:`
${t("interstellar_g_factory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{graphene:1},cost:{Money(r){return f("g_factory",r,95e4,1.28,"interstellar")},Copper(r){return f("g_factory",r,165e3,1.28,"interstellar")},Cement(r){return f("g_factory",r,22e4,1.28,"interstellar")},Infernite(r){return f("g_factory",r,750,1.28,"interstellar")}},effect(){return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_g_factory_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(ne("g_factory","interstellar"),e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},int_factory:{id:"interstellar-int_factory",title:t("interstellar_int_factory_title"),desc(){return`
${t("interstellar_int_factory_title")}
${t("requires_power_combo",[e.resource.Deuterium.name])}
`},reqs:{alpha:4},cost:{Money(r){return f("int_factory",r,25e6,1.26,"interstellar")},Coal(r){return f("int_factory",r,1e7,1.26,"interstellar")},Brick(r){return f("int_factory",r,75e4,1.26,"interstellar")},Bolognium(r){return f("int_factory",r,5e4,1.26,"interstellar")}},effect(){let r=+ze(5).toFixed(2);return`
${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[r])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},special:!0,action(){return u($(this)[0])?(ne("int_factory","interstellar"),re($(this)[0])&&(e.city.factory.Alloy+=2,rt()),!0):!1}},luxury_condo:{id:"interstellar-luxury_condo",title:t("tech_luxury_condo"),desc:`
${t("tech_luxury_condo")}
${t("requires_power")}
`,reqs:{alpha:5},cost:{Money(r){return f("luxury_condo",r,25e6,1.25,"interstellar")},Neutronium(r){return f("luxury_condo",r,75e3,1.25,"interstellar")},Stanene(r){return f("luxury_condo",r,23e4,1.25,"interstellar")},Orichalcum(r){return f("luxury_condo",r,65e3,1.25,"interstellar")},Nanoweave(r){return f("luxury_condo",r,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a=H(75e4);return`
${t("plus_max_citizens",[r])}, ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("luxury_condo","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},zoo:{id:"interstellar-zoo",title:t("tech_zoo"),desc(){return`
${t("tech_zoo")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Food.name])}
`},reqs:{zoo:1},cost:{Money(r){return f("zoo",r,5e7,1.24,"interstellar")},Polymer(r){return f("zoo",r,6e6,1.24,"interstellar")},Infernite(r){return f("zoo",r,75e3,1.24,"interstellar")},Brick(r){return f("zoo",r,2e6,1.24,"interstellar")}},effect(){let r=5,a=2,i=12e3;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[a])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return u($(this)[0])?(ne("zoo","interstellar"),re($(this)[0]),!0):!1}},warehouse:{id:"interstellar-warehouse",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},reqs:{alpha:2},cost:{Money(r){return f("warehouse",r,175e3,1.28,"interstellar")},Lumber(r){return f("warehouse",r,1e5,1.28,"interstellar")},Aluminium(r){return f("warehouse",r,12e4,1.28,"interstellar")},Cement(r){return f("warehouse",r,45e3,1.28,"interstellar")}},res(){let r=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),r},val(r){switch(r){case"Lumber":return 750;case"Stone":return 750;case"Chrysotile":return 750;case"Furs":return 425;case"Copper":return 380;case"Iron":return 350;case"Aluminium":return 320;case"Cement":return 280;case"Coal":return 120;case"Steel":return 60;case"Titanium":return 40;case"Nano_Tube":return 30;case"Neutronium":return 8;case"Adamantite":return 18;case"Infernite":return 5;default:return 0}},wide:!0,effect(){let r='
',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])}`}return r=r+"
",r},action(){if(u($(this)[0])){ne("warehouse","interstellar");let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}}},int_proxima:{info:{name:t("interstellar_proxima_name"),desc(){return e.tech.proxima?t("interstellar_proxima_desc2"):t("interstellar_proxima_desc1")}},proxima_mission:{id:"interstellar-proxima_mission",title:t("space_mission_title",[t("interstellar_proxima_name")]),desc:t("space_mission_desc",[t("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete(){return e.tech.proxima>=1?0:1},cost:{Helium_3(){return+ze(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return u($(this)[0])?(e.interstellar.xfer_station={count:0,on:0},I(t("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0):!1}},xfer_station:{id:"interstellar-xfer_station",title:t("interstellar_xfer_station_title"),desc(){return`
${t("interstellar_xfer_station_desc")}
${t("requires_power_combo",[e.resource.Uranium.name])}
`},reqs:{proxima:1},cost:{Money(r){return f("xfer_station",r,12e5,1.28,"interstellar")},Neutronium(r){return f("xfer_station",r,1500,1.28,"interstellar")},Adamantite(r){return f("xfer_station",r,6e3,1.28,"interstellar")},Polymer(r){return f("xfer_station",r,12e3,1.28,"interstellar")},Wrought_Iron(r){return f("xfer_station",r,3500,1.28,"interstellar")}},effect(){let r=.28,a=H(5e3),i=H(4e3),s=H(2500),n="";return e.resource.Deuterium.display&&(n=`
${t("plus_max_resource",[H(2e3),t("resource_Deuterium_name")])}
`),`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[i,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}
${t("city_fission_power_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("xfer_station","interstellar"),re($(this)[0])&&(e.resource.Uranium.max+=H(2500),e.resource.Helium_3.max+=H(5e3),e.resource.Oil.max+=H(4e3),e.resource.Deuterium.max+=H(2e3)),e.tech.proxima===1&&(e.tech.proxima=2,e.interstellar.cargo_yard={count:0}),!0):!1}},cargo_yard:{id:"interstellar-cargo_yard",title:t("interstellar_cargo_yard_title"),desc:t("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money(r){return f("cargo_yard",r,275e3,1.28,"interstellar")},Graphene(r){return f("cargo_yard",r,7500,1.28,"interstellar")},Mythril(r){return f("cargo_yard",r,6e3,1.28,"interstellar")}},effect(){let r=50,a=H(200),i=H(150),s=`
${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(s=s+`
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("plus_max_resource",[i,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let n=+xt.toFixed(3);s=s+`
${t("interstellar_cargo_yard_effect",[n])}
`}return s},action(){if(u($(this)[0])){ne("cargo_yard","interstellar");let r=50;return e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(r){return f("cruiser",r,875e3,1.28,"interstellar")},Aluminium(r){return f("cruiser",r,195e3,1.28,"interstellar")},Deuterium(r){return f("cruiser",r,+ze(1500).toFixed(0),1.28,"interstellar")},Neutronium(r){return f("cruiser",r,2e3,1.28,"interstellar")},Aerogel(r){return f("cruiser",r,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let r=+ze(6).toFixed(2),a=N(3);return`
${t("plus_max_soldiers",[a])}
${t("space_belt_station_effect3",[r])}
`},action(){return u($(this)[0])?(ne("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||r?`
${t("interstellar_dyson_title")}
${t("requires_segments",[100])}
`:`
${t("interstellar_dyson_title")}
`},reqs:{proxima:3},queue_size:10,queue_complete(){return 100-e.interstellar.dyson.count},condition(){return!(e.interstellar.dyson.count>=100&&e.tech.dyson)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(a<100){let i=a>0?`
${t("space_dwarf_reactor_effect1",[dt(a*1.25)])}
`:"",s=100-a;return`
${t("interstellar_dyson_effect")}
${i}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[dt(175)])},action(){return u($(this)[0])&&e.interstellar.dyson.count<100?(ne("dyson","interstellar"),e.interstellar.dyson.count>=100&&ue(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||r?`
${t("interstellar_dyson_sphere_title")}
${t("requires_segments",[100])}
`:`
${t("interstellar_dyson_sphere_title")}
`},reqs:{proxima:3,dyson:1},queue_size:10,queue_complete(){return 100-e.interstellar.dyson_sphere.count},condition(){return!!(e.interstellar.dyson.count>=100&&e.tech.dyson&&e.tech.dyson===1)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(a<100){let i=175+a*5,s=100-a;return`
${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(750)])},action(){return u($(this)[0])&&e.interstellar.dyson_sphere.count<100?(ne("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&ue(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||r?`
${t("interstellar_orichalcum_sphere_desc")}
${t("requires_segments",[100])}
`:`
${t("interstellar_orichalcum_sphere_desc")}
`},reqs:{proxima:3,dyson:2},queue_size:10,queue_complete(){return 100-e.interstellar.orichalcum_sphere.count},condition(){return!!(e.interstellar.dyson_sphere.count>=100&&e.tech.dyson&&e.tech.dyson===2)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(a<100){let i=750+a*8,s=100-a;return`
${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(1750)])},action(){return u($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(ne("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&ie("blacken_the_sun"),!0):!1}}},int_nebula:{info:{name:t("interstellar_nebula_name"),desc(){return e.tech.nebula?t("interstellar_nebula_desc2"):t("interstellar_nebula_desc1")},support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:t("space_mission_title",[t("interstellar_nebula_name")]),desc:t("space_mission_desc",[t("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete(){return e.tech.nebula>=1?0:1},cost:{Helium_3(){return+ze(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0):!1}},nexus:{id:"interstellar-nexus",title:t("interstellar_nexus_title"),desc(){return`
${t("interstellar_nexus_title")}
${t("requires_power_combo",[e.resource.Money.name])}
`},reqs:{nebula:1},cost:{Money(r){return f("nexus",r,9e5,1.24,"interstellar")},Adamantite(r){return f("nexus",r,7500,1.24,"interstellar")},Infernite(r){return f("nexus",r,250,1.24,"interstellar")},Sheet_Metal(r){return f("nexus",r,14e3,1.24,"interstellar")},Nano_Tube(r){return f("nexus",r,17500,1.24,"interstellar")}},effect(){let r=H(3500),a=H(4e3),i=H(3e3),s=H(25);return`
${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
`},support(){return 2},powered(){return _e(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return u($(this)[0])?(ne("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),re($(this)[0])&&(e.resource.Oil.max+=H(2500),e.resource.Helium_3.max+=H(4e3),e.resource.Deuterium.max+=H(3e3),e.resource.Elerium.max+=H(25)),!0):!1}},harvester:{id:"interstellar-harvester",title:t("interstellar_harvester_title"),desc:`
${t("interstellar_harvester_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:2},cost:{Money(r){return f("harvester",r,65e4,1.28,"interstellar")},Copper(r){return f("harvester",r,8e4,1.28,"interstellar")},Alloy(r){return f("harvester",r,45e3,1.28,"interstellar")},Iridium(r){return f("harvester",r,8e3,1.28,"interstellar")}},effect(){let r=+T("harvester","helium").toFixed(3),a=+T("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`
${t("interstellar_harvester_effect",[a])}
`:"";return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[r])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("harvester","interstellar"),re($(this)[0]),!0):!1}},elerium_prospector:{id:"interstellar-elerium_prospector",title:t("interstellar_elerium_prospector_title"),desc:`
${t("interstellar_elerium_prospector_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:3},cost:{Money(r){return f("elerium_prospector",r,825e3,1.28,"interstellar")},Steel(r){return f("elerium_prospector",r,18e3,1.28,"interstellar")},Polymer(r){return f("elerium_prospector",r,22e3,1.28,"interstellar")},Graphene(r){return f("elerium_prospector",r,82e3,1.28,"interstellar")},Stanene(r){return f("elerium_prospector",r,57e3,1.28,"interstellar")}},effect(){let r=+T("elerium_prospector").toFixed(3);return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_prospector","interstellar"),re($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[F[e.race.species].home]):t("interstellar_neutron_desc1")}},neutron_mission:{id:"interstellar-neutron_mission",title:t("space_mission_title",[t("interstellar_neutron_name")]),desc:t("space_mission_desc",[t("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete(){return e.tech.neutron>=1?0:1},cost:{Helium_3(){return+ze(6e4).toFixed(0)},Deuterium(){return+ze(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return u($(this)[0])?(e.interstellar.neutron_miner={count:0,on:0},I(t("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0):!1}},neutron_miner:{id:"interstellar-neutron_miner",title:t("interstellar_neutron_miner_title"),desc(){return`
${t("interstellar_neutron_miner_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{neutron:1},cost:{Money(r){return f("neutron_miner",r,1e6,1.32,"interstellar")},Titanium(r){return f("neutron_miner",r,45e3,1.32,"interstellar")},Stanene(r){return f("neutron_miner",r,88e3,1.32,"interstellar")},Elerium(r){return f("neutron_miner",r,20,1.32,"interstellar")},Aerogel(r){return f("neutron_miner",r,50,1.32,"interstellar")}},effect(){let r=+T("neutron_miner").toFixed(3),a=H(500),i=+ze(3).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return _e(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("neutron_miner","interstellar"),re($(this)[0]),!0):!1}},citadel:{id:"interstellar-citadel",title:t("interstellar_citadel_title"),desc:`
${t("interstellar_citadel_desc")}
${t("requires_power")}
`,reqs:{neutron:1,high_tech:15},cost:{Money(r){return f("citadel",r,5e6,1.25,"interstellar")},Knowledge(r){return f("citadel",r,15e5,1.15,"interstellar")},Graphene(r){return f("citadel",r,5e4,1.25,"interstellar")},Stanene(r){return f("citadel",r,1e5,1.25,"interstellar")},Elerium(r){return f("citadel",r,250,1.25,"interstellar")},Soul_Gem(r){return f("citadel",r,1,1.25,"interstellar")}},wide:!0,effect(){let r=`
${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let a=+(xt/1.75).toFixed(1);if(e.race.flier||(r=r+`
${t("interstellar_citadel_effect2",[a])}
`),e.tech.ai_core>=2&&(r=r+`
${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let i=+(xt/5).toFixed(1);r=r+`
${t("interstellar_citadel_effect4",[i])}
`}}return`${r}
${t("interstellar_citadel_power",[$(this)[0].powered(),_e(2.5)])}
`},powered(){return k.citadel&&k.citadel>1?_e(30+(k.citadel-1)*2.5):_e(30)},action(){return u($(this)[0])?(ne("citadel","interstellar"),re($(this)[0]),!0):!1},flair(){return t("interstellar_citadel_flair")}},stellar_forge:{id:"interstellar-stellar_forge",title:t("interstellar_stellar_forge_title"),desc:`
${t("interstellar_stellar_forge_title")}
${t("requires_power")}
`,reqs:{star_forge:1},cost:{Money(r){return f("stellar_forge",r,12e5,1.25,"interstellar")},Iridium(r){return f("stellar_forge",r,25e4,1.25,"interstellar")},Bolognium(r){return f("stellar_forge",r,35e3,1.25,"interstellar")},Aerogel(r){return f("stellar_forge",r,75e3,1.25,"interstellar")}},effect(){let r=`
${t("city_foundry_effect1",[N(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(r+=`
${t("interstellar_stellar_forge_effect3",[2])}
`),`${r}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(ne("stellar_forge","interstellar"),re($(this)[0])&&(e.civic.craftsman.max+=N(2),e.tech.star_forge>=2&&(e.city.smelter.cap+=2,e.city.smelter.Star+=2,e.city.smelter.StarCap+=2,e.city.smelter.Iron+=2)),!0):!1},flair(){return t("interstellar_stellar_forge_flair")}}},int_blackhole:{info:{name:t("interstellar_blackhole_name"),desc(){let r=F[e.race.species].home;if(e.tech.blackhole>=5){let a=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(a+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ot("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_blackhole_desc4",[r,a,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[r,a,i]):t("interstellar_blackhole_desc3",[r,a])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[r]):t("interstellar_blackhole_desc1",[r])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:t("space_mission_title",[t("interstellar_blackhole_name")]),desc:t("space_mission_desc",[t("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete(){return e.tech.blackhole>=1?0:1},cost:{Helium_3(){return+ze(75e3).toFixed(0)},Deuterium(){return+ze(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.far_reach={count:0,on:0},I(t("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0):!1}},far_reach:{id:"interstellar-far_reach",title:t("interstellar_far_reach"),desc:`
${t("interstellar_far_reach_desc")}
${t("requires_power")}
`,reqs:{blackhole:1},cost:{Money(r){return f("far_reach",r,1e6,1.32,"interstellar")},Knowledge(r){return f("far_reach",r,1e5,1.32,"interstellar")},Neutronium(r){return f("far_reach",r,2500,1.32,"interstellar")},Elerium(r){return f("far_reach",r,100,1.32,"interstellar")},Aerogel(r){return f("far_reach",r,1e3,1.32,"interstellar")}},effect(){return`
${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("far_reach","interstellar"),re($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,ue()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(r){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||r?`
${t("interstellar_stellar_engine")}
${t("requires_segments",[100])}
`:`
${t("interstellar_stellar_engine")}
`},reqs:{blackhole:3},queue_size:10,queue_complete(){return 100-e.interstellar.stellar_engine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(a<100){let i=100-a;return`
${t("interstellar_stellar_engine_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else{let i=e.tech.gravity&&e.tech.gravity>=2?13.5:7.5,s=e.interstellar.stellar_engine?e.interstellar.stellar_engine.mass:8;e.tech.roid_eject&&(s+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12));let n=1+(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h?e.stats.achieve.escape_velocity.h*.02:0),c=dt((20+(s-8)*i+(e.interstellar.stellar_engine?e.interstellar.stellar_engine.exotic:0)*i*10).toFixed(2))*n;if(e.tech.blackhole>=5){let l=+e.interstellar.stellar_engine.exotic.toFixed(10),o=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,l]):t("interstellar_stellar_engine_effect2",[s]);return`
${t("interstellar_stellar_engine_complete",[c])}
${o}
`}else return t("interstellar_stellar_engine_complete",[c])}},action(){return u($(this)[0])&&e.interstellar.stellar_engine.count<100?(ne("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,ue()),!0):!1}},mass_ejector:{id:"interstellar-mass_ejector",title:t("interstellar_mass_ejector"),desc:`
${t("interstellar_mass_ejector")}
${t("requires_power")}
`,reqs:{blackhole:5},cost:{Money(r){return f("mass_ejector",r,75e4,1.25,"interstellar")},Adamantite(r){return f("mass_ejector",r,125e3,1.25,"interstellar")},Infernite(r){return f("mass_ejector",r,275,1.25,"interstellar")},Elerium(r){return f("mass_ejector",r,100,1.25,"interstellar")},Mythril(r){return f("mass_ejector",r,1e4,1.25,"interstellar")}},effect(){return`
${t("interstellar_mass_ejector_effect")}, ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(gr("mTabResource"),Ie("interstellar-mass_ejector"))},action(){return u($(this)[0])?(ne("mass_ejector","interstellar"),re($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,defineGovernor()),drawResourceTab("ejector"),!0):!1},flair(){return t("interstellar_mass_ejector_flair")}},jump_ship:{id:"interstellar-jump_ship",title:t("interstellar_jump_ship"),desc:t("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete(){return e.tech.stargate>=2?0:1},cost:{Money(){return 2e7},Copper(){return 24e5},Aluminium(){return 4e6},Titanium(){return 125e4},Adamantite(){return 75e4},Stanene(){return 9e5},Aerogel(){return 1e5}},effect:t("interstellar_jump_ship_effect"),action(){return!!u($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:t("space_mission_title",[t("interstellar_wormhole_name")]),desc:t("space_mission_desc",[t("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete(){return e.tech.stargate>=3?0:1},cost:{Helium_3(){return+ze(15e4).toFixed(0)},Deuterium(){return+ze(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.stargate={count:0},e.galaxy.gateway_station={count:0,on:0},I(t("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0):!1}},stargate:{id:"interstellar-stargate",title:t("interstellar_stargate"),desc(r){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||r?`
${t("interstellar_stargate")}
${t("requires_segments",[200])}
`+(e.interstellar.hasOwnProperty("stargate")&&e.interstellar.stargate.count>=200?`
${t("requires_power")}
`:""):`
${t("interstellar_stargate")}
`},reqs:{stargate:3},condition(){return!(e.interstellar.stargate.count>=200)},queue_size:10,queue_complete(){return 200-e.interstellar.stargate.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(a<200){let i=200-a;return`
${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_blackhole.s_gate.effect()},action(){return u($(this)[0])&&e.interstellar.stargate.count<200?(ne("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},e.city.power>=Cr.int_blackhole.s_gate.powered()&&e.interstellar.s_gate.on++,qi(),Ie()),!0):!1}},s_gate:{id:"interstellar-s_gate",title:t("interstellar_stargate"),desc(){return`
${t("interstellar_stargate")}
${t("requires_power")}
`},reqs:{stargate:4},condition(){return e.interstellar.stargate.count>=200},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(250)},effect(){return`
${t("interstellar_s_gate_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return!1}}},int_sirius:{info:{name(){return e.tech.ascension>=3?t("interstellar_sirius_b_name"):t("interstellar_sirius_name")},desc(){return e.tech.ascension>=3?t("interstellar_sirius_b_desc"):t("interstellar_sirius_desc",[F[e.race.species].home])}},sirius_mission:{id:"interstellar-sirius_mission",title:t("space_mission_title",[t("interstellar_sirius_name")]),desc:t("space_mission_desc",[t("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete(){return e.tech.ascension>=3?0:1},cost:{Helium_3(){return+ze(48e4).toFixed(0)},Deuterium(){return+ze(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[tt("name"),F[e.race.species].home])},action(){return!!u($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:t("interstellar_sirius_b"),desc:t("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete(){return e.tech.ascension>=4?0:1},cost:{Knowledge(){return 2e7}},effect(){return t("interstellar_sirius_b_effect")},action(){return u($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(r){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||r?`
${t("interstellar_space_elevator")}
${t("requires_segments",[100])}
`:`
${t("interstellar_space_elevator")}
`},reqs:{ascension:4},condition(){return!(e.interstellar.space_elevator.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.space_elevator.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(r){let a=`
${t("interstellar_space_elevator_effect")}
`,i=(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.space_elevator.count<100?(ne("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},qi(),Ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(r){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||r?`
${t("interstellar_gravity_dome")}
${t("requires_segments",[100])}
`:`
${t("interstellar_gravity_dome")}
`},reqs:{ascension:5},condition(){return!(e.interstellar.gravity_dome.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.gravity_dome.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(r){let a=`
${t("interstellar_gravity_dome_effect",[F[e.race.species].home])}
`,i=(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.gravity_dome.count<100?(ne("gravity_dome","interstellar"),e.interstellar.gravity_dome.count>=100&&(e.tech.ascension=6,e.interstellar.ascension_machine={count:0},e.interstellar.thermal_collector={count:0},qi(),Ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(r){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||r?`
${t("interstellar_ascension_machine")}
${t("requires_segments",[100])}
`+(e.interstellar.hasOwnProperty("ascension_machine")&&e.interstellar.ascension_machine.count>=100?`
${t("requires_power")}
`:""):`
${t("interstellar_ascension_machine")}
`},reqs:{ascension:6},condition(){return!(e.interstellar.ascension_machine.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.ascension_machine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(a<100){let i=100-a;return`
${t("interstellar_ascension_machine_effect",[tt("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_sirius.ascension_trigger.effect()},action(){return u($(this)[0])&&e.interstellar.ascension_machine.count<100?(ne("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},qi(),Ie()),!0):!1}},ascension_trigger:{id:"interstellar-ascension_trigger",title:t("interstellar_ascension_machine"),desc(){return`
${t("interstellar_ascension_machine")}
${t("requires_power")}
`},wiki:!1,reqs:{ascension:7},condition(){return e.interstellar.ascension_machine.count>=100},queue_complete(){return 0},cost:{},powered(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}let a=Math.round(_e(1e4)-r*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(r){r?setTimeout(function(){e.tech.ascension=k.ascension_trigger?8:7,qi()},250):(e.tech.ascension=7,qi())},effect(){let r=Ys(),a=$(this)[0].powered(),i=a>0?`
${t("minus_power",[a])}
`:"";return`
${t("interstellar_ascension_trigger_effect")}
${r}${i}`},action(){return!1}},ascend:{id:"interstellar-ascend",title:t("interstellar_ascend"),desc:t("interstellar_ascend"),reqs:{ascension:8},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Ys();return`
${t("interstellar_ascend_effect")}
${r}`},action(){return u($(this)[0])?(vs(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(r){return f("thermal_collector",r,5e6,1.08,"interstellar")},Infernite(r){return f("thermal_collector",r,25e3,1.08,"interstellar")},Stanene(r){return f("thermal_collector",r,1e6,1.08,"interstellar")},Vitreloy(r){return f("thermal_collector",r,1e5,1.08,"interstellar")}},effect(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(r+=5)}return t("interstellar_thermal_collector_effect",[r])},action(){return u($(this)[0])?(ne("thermal_collector","interstellar"),!0):!1}}}};function Ys(){let r=ot("ascend"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Eo(){let r=ot("terraform"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var He={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:tt("name"),color:"success"}},support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:t("galaxy_gateway_mission"),desc:t("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete(){return e.tech.gateway>=2?0:1},cost:{Helium_3(){return+ze(212e3).toFixed(0)},Deuterium(){return+ze(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return u($(this)[0])?(Io(),e.galaxy.defense={gxy_stargate:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gateway:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gorddon:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien1:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien2:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_chthonian:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0}},!0):!1}},starbase:{id:"galaxy-starbase",title:t("galaxy_starbase"),desc(){return`
${t("galaxy_starbase")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{gateway:2},cost:{Money(r){return f("starbase",r,42e5,1.25,"galaxy")},Elerium(r){return f("starbase",r,1e3,1.25,"galaxy")},Mythril(r){return f("starbase",r,9e4,1.25,"galaxy")},Graphene(r){return f("starbase",r,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=+ze(25).toFixed(2),a=250,i=e.tech.marines>=2?N(8):N(5);return`
${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[i])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 2},powered(){return _e(k.s_gate?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starbase","galaxy"),re($(this)[0]),e.tech.gateway===2&&(e.galaxy.bolognium_ship={count:0,on:0,crew:0},e.tech.gateway=3),!0):!1}},ship_dock:{id:"galaxy-ship_dock",title:t("galaxy_ship_dock"),desc:`
${t("galaxy_ship_dock")}
${t("requires_power")}
`,reqs:{gateway:4},cost:{Money(r){return f("ship_dock",r,36e5,1.25,"galaxy")},Steel(r){return f("ship_dock",r,88e4,1.25,"galaxy")},Aluminium(r){return f("ship_dock",r,12e5,1.25,"galaxy")},Bolognium(r){return f("ship_dock",r,75e3,1.25,"galaxy")}},effect(){return e.race.fasting?`
${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered()])}
`:`
${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.race.fasting?k.gateway_station?.1*k.gateway_station:0:k.starbase?.25*k.starbase:0},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.race.fasting?[{s:e.galaxy.gateway_station.s_max-e.galaxy.gateway_station.support}]:[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},action(){return u($(this)[0])?(ne("ship_dock","galaxy"),re($(this)[0]),!0):!1}},bolognium_ship:{id:"galaxy-bolognium_ship",title:t("galaxy_bolognium_ship"),desc(){return`
${t("galaxy_bolognium_ship_desc")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{gateway:3},cost:{Money(r){return f("bolognium_ship",r,14e5,1.22,"galaxy")},Iron(r){return f("bolognium_ship",r,56e4,1.22,"galaxy")},Infernite(r){return f("bolognium_ship",r,1800,1.22,"galaxy")},Nano_Tube(r){return f("bolognium_ship",r,475e3,1.22,"galaxy")}},effect(){let r=+T("bolognium_ship").toFixed(3),a=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("gain",[r,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[a,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return 0},helium:5},powered(){return 0},action(){return u($(this)[0])?(ne("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,re($(this)[0]),!0):!1}},scout_ship:{id:"galaxy-scout_ship",title:t("galaxy_scout_ship"),desc(){return`
${t("galaxy_scout_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:1},cost:{Money(r){return f("scout_ship",r,16e5,1.25,"galaxy")},Titanium(r){return f("scout_ship",r,325e3,1.25,"galaxy")},Graphene(r){return f("scout_ship",r,118e3,1.25,"galaxy")},Soul_Gem(r){return f("scout_ship",r,1,1.02,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=e.tech.science>=17?`
${t("galaxy_scout_ship_effect2",[25])}
`:"";return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:6,rating(){return e.race.banana?7:10}},powered(){return 0},action(){return u($(this)[0])?(ne("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,re($(this)[0]),!0):!1}},corvette_ship:{id:"galaxy-corvette_ship",title:t("galaxy_corvette_ship"),desc(){return`
${t("galaxy_corvette_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:2},cost:{Money(r){return f("corvette_ship",r,45e5,1.25,"galaxy")},Steel(r){return f("corvette_ship",r,175e4,1.25,"galaxy")},Infernite(r){return f("corvette_ship",r,16e3,1.25,"galaxy")},Bolognium(r){return f("corvette_ship",r,35e3,1.25,"galaxy")},Soul_Gem(r){return f("corvette_ship",r,1,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},helium:10,rating(){return e.race.banana?21:30}},powered(){return 0},action(){return u($(this)[0])?(ne("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,re($(this)[0]),!0):!1}},frigate_ship:{id:"galaxy-frigate_ship",title:t("galaxy_frigate_ship"),desc(){return`
${t("galaxy_frigate_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:3},cost:{Money(r){return f("frigate_ship",r,18e6,1.25,"galaxy")},Elerium(r){return f("frigate_ship",r,1250,1.25,"galaxy")},Mythril(r){return f("frigate_ship",r,35e4,1.25,"galaxy")},Sheet_Metal(r){return f("frigate_ship",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("frigate_ship",r,2,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-2},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},helium:25,rating(){return e.race.banana?56:80}},powered(){return 0},action(){return u($(this)[0])?(ne("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,re($(this)[0]),!0):!1},flair:t("tech_frigate_ship_flair")},cruiser_ship:{id:"galaxy-cruiser_ship",title:t("galaxy_cruiser_ship"),desc(){return`
${t("galaxy_cruiser_ship")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:4},cost:{Money(r){return f("cruiser_ship",r,75e6,1.25,"galaxy")},Copper(r){return f("cruiser_ship",r,6e6,1.25,"galaxy")},Adamantite(r){return f("cruiser_ship",r,1e6,1.25,"galaxy")},Vitreloy(r){return f("cruiser_ship",r,75e4,1.25,"galaxy")},Elerium(r){return f("cruiser_ship",r,1800,1.25,"galaxy")},Soul_Gem(r){return f("cruiser_ship",r,5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-3},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*6:6},mil(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},deuterium:25,rating(){return e.race.banana?175:250}},powered(){return 0},action(){return u($(this)[0])?(ne("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,re($(this)[0]),!0):!1}},dreadnought:{id:"galaxy-dreadnought",title:t("galaxy_dreadnought"),desc(){return`
${t("galaxy_dreadnought")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:5},cost:{Money(r){return f("dreadnought",r,225e6,1.25,"galaxy")},Neutronium(r){return f("dreadnought",r,25e4,1.25,"galaxy")},Bolognium(r){return f("dreadnought",r,15e5,1.25,"galaxy")},Vitreloy(r){return f("dreadnought",r,1e6,1.25,"galaxy")},Infernite(r){return f("dreadnought",r,4e5,1.25,"galaxy")},Aerogel(r){return f("dreadnought",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("dreadnought",r,25,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-5},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},mil(){return e.race.high_pop?b.high_pop.vars()[0]*20:20},deuterium:80,rating(){return e.race.banana?1260:1800}},powered(){return 0},action(){return u($(this)[0])?(ne("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,re($(this)[0]),!0):!1}}},gxy_stargate:{info:{name:t("galaxy_stargate"),desc(){return e.tech.piracy?t("galaxy_stargate_desc_alt"):t("galaxy_stargate_desc")},control(){return{name:tt("name"),color:"success"}}},gateway_station:{id:"galaxy-gateway_station",title:t("galaxy_gateway_station"),desc(){return`
${t("galaxy_gateway_station_desc")}
${t("requires_power")}
`},reqs:{stargate:4},cost:{Money(r){return f("gateway_station",r,5e6,1.25,"galaxy")},Aluminium(r){return f("gateway_station",r,52e4,1.25,"galaxy")},Polymer(r){return f("gateway_station",r,35e4,1.25,"galaxy")},Neutronium(r){return f("gateway_station",r,17500,1.25,"galaxy")}},effect(){let r=H(2e3),a=H(4500),i=H(50),s="";return e.tech.gateway&&e.tech.gateway>=2&&(s=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${s}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[a,t("resource_Deuterium_name")])}
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return .5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return u($(this)[0])?(ne("gateway_station","galaxy"),e.resource.Helium_3.max+=H(2e3),e.resource.Deuterium.max+=H(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),re($(this)[0]),!0):!1}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:t("galaxy_telemetry_beacon"),desc(){return`
${t("galaxy_telemetry_beacon")}
${t("requires_power")}
`},reqs:{stargate:5},cost:{Money(r){return f("telemetry_beacon",r,225e4,1.25,"galaxy")},Copper(r){return f("telemetry_beacon",r,685e3,1.25,"galaxy")},Alloy(r){return f("telemetry_beacon",r,425e3,1.25,"galaxy")},Iridium(r){return f("telemetry_beacon",r,177e3,1.25,"galaxy")}},effect(){let r=e.tech.telemetry?1200:800;e.tech.science>=17&&(r+=we.scout_ship*25);let a=k.telemetry_beacon?r*k.telemetry_beacon:0,i="";return e.tech.gateway&&e.tech.gateway>=2&&(i=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${i}
${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.tech.telemetry?.75:.5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(r){let a=r?k.telemetry_beacon+fe():k.telemetry_beacon-fe();a>e.galaxy.telemetry_beacon.count?a=e.galaxy.telemetry_beacon.count:a<0&&(a=0),k.telemetry_beacon=a,Ci($(this)[0],"galaxy","telemetry_beacon")},action(){return u($(this)[0])?(ne("telemetry_beacon","galaxy"),re($(this)[0])&&(e.resource.Knowledge.max+=1750),e.tech.gateway||(e.galaxy.starbase={count:0,on:0,support:0,s_max:0},e.settings.space.gateway=!0,e.tech.gateway=1,ac()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`
${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(r){return f("gateway_depot",r,4e6,1.25,"galaxy")},Neutronium(r){return f("gateway_depot",r,8e4,1.25,"galaxy")},Stanene(r){return f("gateway_depot",r,5e5,1.25,"galaxy")},Vitreloy(r){return f("gateway_depot",r,2500,1.25,"galaxy")}},wide:!0,effect(){let r=e.tech.world_control?150:100,a=H(200),i=Xs(),s=Ee(+H(3e3*i).toFixed(0),1),n=Ee(+H(25e4*i).toFixed(0),1),c=Ee(+H(9001*i).toFixed(0),1),l=Ee(+H(6660*i).toFixed(0),1),o='
';return o=o+`${t("plus_max_crates",[r])}${t("plus_max_containers",[r])}`,o=o+`${t("plus_max_resource",[s,e.resource.Uranium.name])}`,o=o+`${t("plus_max_resource",[n,e.resource.Nano_Tube.name])}`,o=o+`${t("plus_max_resource",[c,e.resource.Neutronium.name])}`,o=o+`${t("plus_max_resource",[l,e.resource.Infernite.name])}`,o=o+"
",`${o}
${t("galaxy_gateway_depot_effect",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?10:0)},action(){if(u($(this)[0])){ne("gateway_depot","galaxy");let r=e.tech.world_control?150:100;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Xs();return e.resource.Uranium.max+=H(3e3*a),e.resource.Nano_Tube.max+=H(25e4*a),e.resource.Neutronium.max+=H(9001*a),e.resource.Infernite.max+=H(6660*a),re($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:t("galaxy_defense_platform"),desc(){return`
${t("galaxy_defense_platform")}
${t("requires_power")}
`},reqs:{stargate:6},cost:{Money(r){return f("defense_platform",r,75e4,1.25,"galaxy")},Adamantite(r){return f("defense_platform",r,425e3,1.25,"galaxy")},Elerium(r){return f("defense_platform",r,800,1.25,"galaxy")},Vitreloy(r){return f("defense_platform",r,1250,1.25,"galaxy")},Wrought_Iron(r){return f("defense_platform",r,75e3,1.25,"galaxy")}},effect(){return`
${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?5:0)},postPower(r){D({el:"#gxy_stargate"},"update")},action(){return u($(this)[0])?(ne("defense_platform","galaxy"),re($(this)[0]),!0):!1},post(){D({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:F[e.galaxy.alien1.id].name,color:"advanced"}}},gorddon_mission:{id:"galaxy-gorddon_mission",title:t("galaxy_gorddon_mission"),desc:t("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete(){return e.tech.xeno>=3?0:1},cost:{Structs(){return{galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}},Helium_3(){return+ze(23e4).toFixed(0)},Deuterium(){return+ze(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(u($(this)[0])){Io(),e.galaxy.defense.gxy_gateway.scout_ship-=2,e.galaxy.defense.gxy_gorddon.scout_ship+=2,e.galaxy.defense.gxy_gateway.corvette_ship--,e.galaxy.defense.gxy_gorddon.corvette_ship++;let r=F[e.galaxy.alien1.id].name,a=F[e.galaxy.alien1.id].entity,i=F[e.galaxy.alien2.id].name,s=F[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[a,r,s,i]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:t("galaxy_embassy"),desc(){return`
${t("galaxy_embassy")}
${t("requires_power_combo",[e.resource.Food.name])}
`},reqs:{xeno:4},queue_complete(){return 1-e.galaxy.embassy.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(){let r=7500,a="";e.tech.xeno>=11&&(a=`
${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let i="";return e.race.fasting||(i=`
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`
${t("galaxy_embassy_effect",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${i}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&u($(this)[0])){if(ne("embassy","galaxy"),re($(this)[0]),e.tech.xeno===4&&(e.tech.xeno=5,e.galaxy.freighter={count:0,on:0,crew:0},e.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},I(t("galaxy_embassy_complete",[F[e.galaxy.alien1.id].name,F[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let r=it();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let r=20;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`
${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("dormitory",r,1e7,1.25,"galaxy")},Furs(r){return f("dormitory",r,7e5,1.25,"galaxy")},Cement(r){return f("dormitory",r,12e5,1.25,"galaxy")},Plywood(r){return f("dormitory",r,85e3,1.25,"galaxy")},Horseshoe(){return e.race.hooved?3:0}},effect(){return`
${t("requires_res",[t("galaxy_embassy")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("dormitory","galaxy"),re($(this)[0]),!0):!1},citizens(){let r=3;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`
${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("symposium",r,8e6,1.25,"galaxy")},Food(r){return e.race.ravenous?0:f("symposium",r,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(r){return f("symposium",r,46e4,1.25,"galaxy")},Brick(r){return f("symposium",r,261600,1.25,"galaxy")}},effect(){let r="";return e.tech.xeno>=7&&(r=`
${t("galaxy_symposium_effect3",[+xe(300).toFixed(2)])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(4)},action(){return u($(this)[0])?(ne("symposium","galaxy"),re($(this)[0]),!0):!1}},freighter:{id:"galaxy-freighter",title:t("galaxy_freighter"),desc(){return`
${t("galaxy_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:5},cost:{Money(r){return f("freighter",r,6e6,1.2,"galaxy")},Uranium(r){return f("freighter",r,1e4,1.2,"galaxy")},Adamantite(r){return f("freighter",r,46e4,1.2,"galaxy")},Stanene(r){return f("freighter",r,261600,1.2,"galaxy")},Bolognium(r){return f("freighter",r,66e3,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`
${t("interstellar_exchange_boost",[3])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0},helium:12},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},reqs:{xeno:8},queue_complete(){return 1-e.galaxy.consulate.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(r){return e.race.hooved&&(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?10:0}},effect(){return t("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return u($(this)[0])&&e.galaxy.consulate.count<1?(ne("consulate","galaxy"),e.galaxy.resort={count:0,on:0},e.galaxy.super_freighter={count:0,on:0,crew:0},e.tech.xeno=9,!0):!1},citizens(){let r=10;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`
${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(r){return f("resort",r,33e6,1.25,"galaxy")},Stone(r){return f("resort",r,25e6,1.25,"galaxy")},Furs(r){return f("resort",r,1e7,1.25,"galaxy")},Oil(r){return f("resort",r,ze(125e3),1.25,"galaxy")}},effect(){let r=H(e.tech.world_control?1875e3:15e5),a=e.race.joyless?"":`
${t("city_max_entertainer",[N(2)])}
`;return`
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}
${t("space_red_vr_center_effect2",[2])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("resort","galaxy"),re($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=N(2),e.civic.entertainer.display=!0)),!0):!1}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:t("galaxy_vitreloy_plant"),desc(){return`
${t("galaxy_vitreloy_plant")}
${t("galaxy_vitreloy_plant_desc")}
`},reqs:{xeno:10},cost:{Money(r){return f("vitreloy_plant",r,35e6,1.25,"galaxy")},Cement(r){return f("vitreloy_plant",r,18e5,1.25,"galaxy")},Neutronium(r){return f("vitreloy_plant",r,25e4,1.25,"galaxy")},Iridium(r){return f("vitreloy_plant",r,85e4,1.25,"galaxy")},Aerogel(r){return f("vitreloy_plant",r,4e5,1.25,"galaxy")}},effect(){let r=+T("vitreloy_plant").toFixed(2),a=2.5,i=100,s=5e4;return`
${t("galaxy_vitreloy_plant_effect",[r])}
${t("galaxy_vitreloy_plant_effect2",[a,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(ne("vitreloy_plant","galaxy"),re($(this)[0]),!0):!1}},super_freighter:{id:"galaxy-super_freighter",title:t("galaxy_super_freighter"),desc(){return`
${t("galaxy_super_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:9},cost:{Money(r){return f("super_freighter",r,28e6,1.2,"galaxy")},Aluminium(r){return f("super_freighter",r,35e5,1.2,"galaxy")},Alloy(r){return f("super_freighter",r,1e6,1.2,"galaxy")},Graphene(r){return f("super_freighter",r,75e4,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`
${t("interstellar_exchange_boost",[8])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,F[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},mil(){return 0},helium:25},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},reqs:{andromeda:4},grant:["conflict",1],queue_complete(){return e.tech.conflict>=1?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")){let r=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),{label:t("galaxy_fleet_rating",[`400`]),met:!(r<400)}}return{label:t("galaxy_fleet_rating",['400']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let a=r>=650?`${t("galaxy_piracy_low")}`:`${t("galaxy_piracy_avg")}`;return`
${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),r>=400){if(I(t("galaxy_alien2_mission_result2",[F[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),r<650){let a=80;e.race.instinct&&(a/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_foothold")}
${t("requires_power_combo",[e.resource.Elerium.name])}
`},reqs:{conflict:1},cost:{Money(r){return f("foothold",r,25e6,1.25,"galaxy")},Titanium(r){return f("foothold",r,3e6,1.25,"galaxy")},Polymer(r){return f("foothold",r,175e4,1.25,"galaxy")},Iridium(r){return f("foothold",r,9e5,1.25,"galaxy")},Bolognium(r){return f("foothold",r,5e4,1.25,"galaxy")}},effect(){let r=2.5;return`
${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered()])}
`},support(){return 4},powered(){return _e(k.s_gate?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return u($(this)[0])?(ne("foothold","galaxy"),re($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,ac(),ue()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`
${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(r){return f("armed_miner",r,5e6,1.25,"galaxy")},Steel(r){return f("armed_miner",r,18e5,1.25,"galaxy")},Stanene(r){return f("armed_miner",r,1975e3,1.25,"galaxy")},Vitreloy(r){return f("armed_miner",r,2e4,1.25,"galaxy")},Soul_Gem(r){return f("armed_miner",r,1,1.25,"galaxy")}},effect(){let r=.032,a=.23,i=.65,s=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Bolognium_name")])}
${t("gain",[a,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[s,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:10,rating(){return e.race.banana?4:5}},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("armed_miner","galaxy"),re($(this)[0]),!0):!1}},ore_processor:{id:"galaxy-ore_processor",title:t("galaxy_ore_processor"),desc(){return`
${t("galaxy_ore_processor")}
`},reqs:{conflict:3},cost:{Money(r){return f("ore_processor",r,3e6,1.25,"galaxy")},Iron(r){return f("ore_processor",r,5e6,1.25,"galaxy")},Coal(r){return f("ore_processor",r,375e4,1.25,"galaxy")},Graphene(r){return f("ore_processor",r,225e4,1.25,"galaxy")}},effect(){return`
${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("ore_processor","galaxy"),re($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(r){return f("scavenger",r,75e5,1.25,"galaxy")},Alloy(r){return f("scavenger",r,125e4,1.25,"galaxy")},Aluminium(r){return f("scavenger",r,68e5,1.25,"galaxy")},Neutronium(r){return f("scavenger",r,75e3,1.25,"galaxy")},Elerium(r){return f("scavenger",r,750,1.25,"galaxy")}},effect(){let r=kt("gxy_alien2"),a=Math.round(r*25e3),i=+ze($(this)[0].ship.helium).toFixed(2),s=e.race.cataclysm?`
${t("galaxy_scavenger_effect2_cata",[+(r*100*.75).toFixed(1)])}
`:`
${t("galaxy_scavenger_effect2",[+(r*100/4).toFixed(1)])}
`;return`
${t("galaxy_scavenger_effect",[a])}
${s}
${t("galaxy_alien2_support",[$(this)[0].support(),F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[i,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return 0},helium:12},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("scavenger","galaxy"),re($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[F[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:F[e.galaxy.alien2.id].name,color:"danger"}}},chthonian_mission:{id:"galaxy-chthonian_mission",title(){return t("galaxy_alien2_mission",[t("galaxy_chthonian")])},desc(){return t("galaxy_alien2_mission_desc",[t("galaxy_chthonian")])},reqs:{chthonian:1},grant:["chthonian",2],queue_complete(){return e.tech.chthonian>=2?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")){let r=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),{label:t("galaxy_fleet_rating",[`1250`]),met:!(r<1250)}}return{label:t("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let a=r>=4500?`${t("galaxy_piracy_low")}`:r>=2500?`${t("galaxy_piracy_avg")}`:`${t("galaxy_piracy_high")}`;return`
${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),r>=1250){let a=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),r>=2500&&(a=r>=4500?80:160),e.race.instinct&&(a/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_minelayer")}`},reqs:{chthonian:2},cost:{Money(r){return f("minelayer",r,9e6,1.25,"galaxy")},Iron(r){return f("minelayer",r,48e5,1.25,"galaxy")},Nano_Tube(r){return f("minelayer",r,125e4,1.25,"galaxy")},Nanoweave(r){return f("minelayer",r,1e5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:8,rating(){return e.race.banana?35:50}},powered(){return 0},action(){return u($(this)[0])?(ne("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`
${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(r){return f("excavator",r,12e6,1.25,"galaxy")},Polymer(r){return f("excavator",r,44e5,1.25,"galaxy")},Iridium(r){return f("excavator",r,36e5,1.25,"galaxy")},Mythril(r){return f("excavator",r,18e4,1.25,"galaxy")}},effect(){let r=+T("excavator").toFixed(3);return`
${t("gain",[r,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(8)},powerBalancer(){return[{r:"Orichalcum",p:T("excavator")}]},action(){return u($(this)[0])?(ne("excavator","galaxy"),re($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`
${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(r){return f("raider",r,12e6,1.25,"galaxy")},Titanium(r){return f("raider",r,125e4,1.25,"galaxy")},Bolognium(r){return f("raider",r,6e5,1.25,"galaxy")},Vitreloy(r){return f("raider",r,125e3,1.25,"galaxy")},Stanene(r){return f("raider",r,825e3,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=kt("gxy_chthonian"),i=.65,s=.05,n=2.3,c=.8;return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[i,t("resource_Deuterium_name")])}
${t("gain",[s,t("resource_Vitreloy_name")])}
${t("gain",[n,t("resource_Polymer_name")])}
${t("gain",[c,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},helium:18,rating(){return e.race.banana?9:12}},powered(){return 0},action(){return u($(this)[0])?(ne("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}}}};function ba(r){let a="space";return r.substr(0,4)==="int_"?a="interstellar":r.substr(0,5)==="prtl_"?a="portal":r.substr(0,4)==="gxy_"?a="galaxy":r.substr(0,4)==="tau_"&&(a="tauceti"),a}function kt(r,a,i){if(e.tech.piracy&&!e.race.truepath){let s=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let o=0;oc?c:s;return((1-(c-o)/c)*l+(1-l))*(a?1:kt("gxy_stargate"))}else{let o=s>c?c:s;return(1-(c-o)/c)*l+(1-l)}}else return 1}function Io(){let r=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&r.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||r.push("custom");let a=Object.keys(F).filter(function(n){return!["demonic","eldritch"].includes(F[n].type)&&!r.includes(n)}),i=xs(a);e.galaxy.alien1={id:a[i]},r.push(a[i]),a=Object.keys(F).filter(function(n){return!["angelic"].includes(F[n].type)&&!r.includes(n)});let s=xs(a);e.galaxy.alien2={id:a[s]}}function Xs(){let r=1;return e.race.pack_rat&&(r*=1.05),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?2:1,r}var xu={satellite:{count:0},propellant_depot:{count:0},gps:{count:0},nav_beacon:{count:0,on:0},moon_base:{count:0,on:0,support:0,s_max:0},iridium_mine:{count:0,on:0},helium_mine:{count:0,on:0},observatory:{count:0,on:0},spaceport:{count:0,on:0,support:0,s_max:0},red_tower:{count:0,on:0},living_quarters:{count:0,on:0},vr_center:{count:0,on:0},garage:{count:0},red_mine:{count:0,on:0},fabrication:{count:0,on:0},red_factory:{count:0,on:0},exotic_lab:{count:0,on:0},ziggurat:{count:0},space_barracks:{count:0,on:0},biodome:{count:0,on:0},laboratory:{count:0,on:0},geothermal:{count:0,on:0},swarm_plant:{count:0},swarm_control:{count:0,support:0,s_max:0},swarm_satellite:{count:0},gas_mining:{count:0,on:0},gas_storage:{count:0},star_dock:{count:0,ship:0,probe:0,template:"human"},outpost:{count:0,on:0},drone:{count:0},oil_extractor:{count:0,on:0},space_station:{count:0,on:0,support:0,s_max:0},iridium_ship:{count:0,on:0},elerium_ship:{count:0,on:0},elerium_prospector:{count:0,on:0},iron_ship:{count:0,on:0},elerium_contain:{count:0,on:0},e_reactor:{count:0,on:0},world_collider:{count:0},world_controller:{count:0,on:0},starport:{count:0,on:0,support:0,s_max:0},mining_droid:{count:0,on:0,adam:0,uran:0,coal:0,alum:0},processing:{count:0,on:0},habitat:{count:0,on:0},fusion:{count:0,on:0},exchange:{count:0,on:0},warehouse:{count:0},xfer_station:{count:0,on:0},cargo_yard:{count:0},cruiser:{count:0,on:0},dyson:{count:0},nexus:{count:0,on:0,support:0,s_max:0},harvester:{count:0,on:0},far_reach:{count:0,on:0},stellar_engine:{count:0,mass:8,exotic:0},mass_ejector:{count:0,on:0,total:0,mass:0,Food:0,Lumber:0,Chrysotile:0,Stone:0,Crystal:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0},stargate:{count:0},gateway_station:{count:0,on:0},s_gate:{count:0,on:0},starbase:{count:0,on:0,support:0,s_max:0},bolognium_ship:{count:0,on:0,crew:0},scout_ship:{count:0,on:0,crew:0,mil:0},corvette_ship:{count:0,on:0,crew:0,mil:0},frigate_ship:{count:0,on:0,crew:0,mil:0},cruiser_ship:{count:0,on:0,crew:0,mil:0},dreadnought:{count:0,on:0,crew:0,mil:0},foothold:{count:0,on:0,support:0,s_max:0},turret:{count:0,on:0},carport:{count:0,damaged:0,repair:0},war_droid:{count:0,on:0},repair_droid:{count:0,on:0},war_drones:{count:0,on:0},sensor_drone:{count:0,on:0},attractor:{count:0,on:0}};function ne(r,a){a||(a="space"),e[a][r]||(e[a][r]=xu[r]),e[a][r].count++}function Hi(r,a){return r&&a?Yt[r][a]:Yt}function Ko(){return Cr}function No(){return He}function sc(r,a,i){switch(r){case"space":return Dr(Yt,a,i);case"interstellar":return Dr(Cr,a,i);case"galaxy":return Dr(He,a,i)}}function Dr(r,a,i){let s=e.race.truepath?"truepath":"standard";if(r[a][i].hasOwnProperty("path")&&!r[a][i].path.includes(s))return!1;var n=!0;return Object.keys(r[a][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=r[a][i].grant[1]&&(n=!1),n}function Pt(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Lo("inner"),e.race.truepath&&Lo("outer"),qi(),ac())}function Lo(r){if(r||(r=e.settings.spaceTabs===5?"outer":"inner"),!e.settings.tabLoad&&(e.settings.civTabs!==1||![1,5].includes(e.settings.spaceTabs)||e.settings.civTabs===1&&e.settings.spaceTabs===1&&r!=="inner"||e.settings.spaceTabs===5&&r!=="outer"))return;let a=r==="inner"?$("#space"):$("#outerSol");if(le(a),a.append($(`

${t(r==="inner"?"tab_space":"tab_outer_space")}

`)),!e.settings.showSpace)return!1;let i=[];Object.keys(Yt).forEach(function(s){e.race.orbit_decayed||e.race.cataclysm?s!=="spc_home"&&(i.push(s),(e.race.orbit_decayed&&s==="spc_red"||e.race.cataclysm&&s==="spc_moon")&&i.push("spc_home")):i.push(s)}),i.forEach(function(s){let n=s.replace("spc_","");if(e.settings.space[`${n}`]){if(e.race.truepath&&Yt[s].info.zone!==r)return;let c=typeof Yt[s].info.name=="string"?Yt[s].info.name:Yt[s].info.name(),l=!!(e.race.orbit_decayed||e.race.cataclysm);if(l&&s!=="spc_home"||!l){if(Yt[s].info.support){let o=Yt[s].info.support;e.space[o].hasOwnProperty("support")||(e.space[o].support=0,e.space[o].s_max=0),a.append(`

${c}

{{ support }}/{{ s_max }}
`),D({el:`#sr${s}`,data:e.space[o]})}else a.append(`

${c}

`);e.race.truepath&&Yt[s].info.hasOwnProperty("syndicate")&&Yt[s].info.syndicate()&&e.tech.syndicate&&($(`#${s}`).append(`
`),$(`#${s}synd`).append(`${t("space_syndicate")} `),$(`#${s}synd`).append(`${t("space_scan_effectiveness")} `),$(`#${s}synd`).append(`${t("space_overkill")} `),D({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);if(d.s>=10)return d.s>=50?d.r:Math.round(d.r*d.s*.02)}return"???"},scan(o){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((yt(o,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);return d.s>=100?d.o:0}return 0}}}),Yt[s].info.hasOwnProperty("extra")&&Yt[s].info.extra(s))}pe(s,function(){return typeof Yt[s].info.desc=="string"?Yt[s].info.desc:Yt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Yt[s]).forEach(function(o){if(o!=="info"&&Dr(Yt,s,o)){let d=Yt[s][o];Br(d,r==="inner"?"space":"outerSol",o)}})}})}function qi(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let r=$("#interstellar");if(le(r),r.append($(`

${t("tab_interstellar")}

`)),!e.settings.showDeep)return!1;Object.keys(Cr).forEach(function(a){let i=a.replace("int_","");if(e.settings.space[`${i}`]){let s=typeof Cr[a].info.name=="string"?Cr[a].info.name:Cr[a].info.name();if(Cr[a].info.support){let n=Cr[a].info.support;e.interstellar[n].hasOwnProperty("support")||(e.interstellar[n].support=0,e.interstellar[n].s_max=0),r.append(`

${s}

{{ support }}/{{ s_max }}
`),D({el:`#sr${a}`,data:e.interstellar[n]})}else r.append(`

${s}

`);pe(a,function(){return typeof Cr[a].info.desc=="string"?Cr[a].info.desc:Cr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Cr[a]).forEach(function(n){if(n!=="info"&&Dr(Cr,a,n)){let c=Cr[a][n];Br(c,"interstellar",n)}})}})}function ac(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==3))return;let r=$("#galaxy");if(le(r),r.append($(`

${t("tab_galactic")}

`)),!e.settings.showGalactic)return!1;ku(r,"fleet"),Object.keys(He).forEach(function(a){let i=a.replace("gxy_","");if(e.galaxy.defense&&!e.galaxy.defense.hasOwnProperty(a)&&(e.galaxy.defense[a]={}),e.settings.space[`${i}`]){let s=typeof He[a].info.name=="string"?He[a].info.name:He[a].info.name(),n=$(`
`);r.append(n);let c=$(`

${s}

`);n.append(c),e.tech.xeno&&e.tech.xeno>=3&&n.append(`{{ r.control().name }}`);let l={el:`#${a}`,data:{r:He[a].info},methods:{threat(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;return h=h<1?Math.ceil(h):Math.round(h),h===0?"has-text-success":h<=20?"has-text-advanced":h<=40?"has-text-info":h<=60?"has-text-warning":h<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;h=h<1?Math.ceil(h):Math.round(h);let _=e.race.infiltrator?3:4;return e.galaxy.defense[o].scout_ship>=_?`${h}%`:h===0?t("galaxy_piracy_none"):h<=20?t("galaxy_piracy_vlow"):h<=40?t("galaxy_piracy_low"):h<=60?t("galaxy_piracy_avg"):h<=80?t("galaxy_piracy_high"):t("galaxy_piracy_vhigh")}return"???"},defense(o){return kt(o,!0,!0)}}};if(He[a].info.support){let o=He[a].info.support;e.galaxy[o]&&(e.galaxy[o].hasOwnProperty("support")||(e.galaxy[o].support=0,e.galaxy[o].s_max=0),n.append('{{ s.support }}/{{ s.s_max%1 ? s.s_max.toFixed(2) : s.s_max }}'),l.data.s=e.galaxy[o])}e.tech.piracy&&n.append(`
${t("galaxy_piracy_threat",[F[e.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${t("galaxy_armada")}: {{ '${a}' | defense }}
`),D(l),pe(a,function(){return typeof He[a].info.desc=="string"?He[a].info.desc:He[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),pe(a,function(){return t("galaxy_control",[He[a].info.control().name,s])},{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach(function(o){if(o!=="info"&&Dr(He,a,o)){let d=He[a][o];Br(d,"galaxy",o)}})}})}function ku(r,a){if(e.tech.piracy&&!e.race.truepath){let i=$(`

${t("galaxy_armada")}

`);r.append(i);let s=e.tech.world_control?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");i.append($("|")),i.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),i.append($("|")),i.append($(`${t("job_crew_mil")} {{ g.crew }}`)),i.append($("|")),i.append($(`${t("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),D({el:`#h${a}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(o){return We()},s_max(o){return We(!0)}}}),["soldier","crew1","crew2"].forEach(function(o){pe(`h${a}${o}`,function(){switch(o){case"soldier":return Tn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${a} span.${o}`})});let n=$(`
`);r.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],l=[];for(let o=0;o<6;o++){let d=$('
');l.push(d),n.append(d)}for(let o=0;o${He.gxy_gateway[c[o]].title}`);l[o+1].append(d)}l[0].append($("")),l[0].append($(`${He.gxy_gateway.info.name}`));for(let o=0;o{{ gateway.${c[o]} }}`);l[o+1].append(d)}Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);if(e.settings.space[d]&&d!=="gateway"){let h=$(`${typeof He[o].info.name=="string"?He[o].info.name:He[o].info.name()}`);l[0].append(h);for(let _=0;_'),w=$(`«`),M=$(`{{ ${d}.${c[_]} }}`),A=$(`»`);l[_+1].append(m),m.append(w),m.append(M),m.append(A)}}}),D({el:`#${a}`,data:{stargate:e.galaxy.defense.gxy_stargate,gateway:e.galaxy.defense.gxy_gateway,gorddon:e.galaxy.defense.gxy_gorddon,alien1:e.galaxy.defense.gxy_alien1,alien2:e.galaxy.defense.gxy_alien2,chthonian:e.galaxy.defense.gxy_chthonian,t:e.tech},methods:{sub(o,d){if(e.galaxy.defense[o][d]>0){let h=fe();h>e.galaxy.defense[o][d]&&(h=e.galaxy.defense[o][d]),e.galaxy.defense.gxy_gateway[d]+=h,e.galaxy.defense[o][d]-=h}},add(o,d){if(e.galaxy.defense.gxy_gateway[d]>0){let h=fe();h>e.galaxy.defense.gxy_gateway[d]&&(h=e.galaxy.defense.gxy_gateway[d]),e.galaxy.defense.gxy_gateway[d]-=h,e.galaxy.defense[o][d]+=h}}}}),Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);e.settings.space[d]&&pe(`armada${d}`,function(){return`
${typeof He[o].info.desc=="string"?He[o].info.desc:He[o].info.desc()}
`})});for(let o=0;o=5&&U.iron_ship&&(r*=.95**U.iron_ship),r}function Zs(r){if(e.space.swarm_plant){let a=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(a-=xt/100),a<.05&&(a=.05),r*=a**e.space.swarm_plant.count}return r}function Fe(r,a,i){if(i=i||{},e.race.universe==="heavy"&&(r*=1.25+.5*ft("heavy")),e.race.truepath&&(r*=a?2.5:1.25),e.city.mass_driver&&k.mass_driver){let s=e.race.truepath?.94:.95;r*=s**k.mass_driver}else i.mass_driver&&(r*=.95**i.mass_driver);return e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(r*=Re.dense.vars()[2]),e.race.cataclysm&&(r*=.2),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(r*=1.35+9.65*ft("heavy")),Ve("launch_day")&&(r*=.95),r}function ze(r){return e.race.universe==="heavy"&&(r*=1.2+.3*ft("heavy")),e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),Ve("launch_day")&&(r*=.95),r}function Do(){let r=1;if(e.space.ziggurat&&e.space.ziggurat.count>0){let a=e.tech.ancient_study?.006:.004;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(a+=1e-4*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let i=2e-5;e.race.high_pop&&(i=xe(i)),a+=i*e.civic.priest.workers}e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(a=xe(a)),r+=e.space.ziggurat.count*e.civic.colonist.workers*a}return r}function W(){let r={red:F[e.race.species].solar.red,hell:F[e.race.species].solar.hell,gas:F[e.race.species].solar.gas,gas_moon:F[e.race.species].solar.gas_moon,dwarf:F[e.race.species].solar.dwarf,titan:Mi[F[e.race.species].type].solar.titan,enceladus:Mi[F[e.race.species].type].solar.enceladus,triton:Mi[F[e.race.species].type].solar.triton,eris:Mi[F[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let a of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(a)&&(r[a]=e.custom.race0[a]);return r}var Dt=["l","h","a","e","m","mg"],Rr={standard:{name:t("universe_standard"),desc:t("universe_standard_desc"),effect:t("universe_standard_effect")},heavy:{name:t("universe_heavy"),desc:t("universe_heavy_desc"),effect:t("universe_heavy_effect",[5])},antimatter:{name:t("universe_antimatter"),desc:t("universe_antimatter_desc"),effect:t("universe_antimatter_effect")},evil:{name:t("universe_evil"),desc:t("universe_evil_desc"),effect:t("universe_evil_effect")},micro:{name:t("universe_micro"),desc:t("universe_micro_desc"),effect:t("universe_micro_effect",[75])},magic:{name:t("universe_magic"),desc:t("universe_magic_desc"),effect:t("universe_magic_effect")}};function nc(){let r=[];if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4&&e.custom.hasOwnProperty("planet")&&Object.keys(Rr).forEach(function(a){let i=it(a);e.custom.planet.hasOwnProperty(i)&&e.custom.planet[i].s&&r.push(`${i}:s`)}),e.race.geck&&e.race.geck>0){let a=$(`
${t("gecks_remaining")}: {{ geck }}
`);$("#evolution").append(a),D({el:"#geck",data:e.race})}if(e.race.probes===0)ic({custom:r});else{let a=!1;for(let i=0;i`),c=$(`${Rr[i].name}`);n.append(c),$("#evolution").append(n),$("#"+s).on("click",function(){e.race.universe=i,le($("#evolution")),nc(),Ie()}),pe(s,function(l){l.popper.append($(`
${Rr[i].name}
`)),l.popper.append($(`
${Rr[i].desc}
`)),l.popper.append($(`
${Rr[i].effect}
`))},{classes:"has-background-light has-text-dark"})}}function vs(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${F[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("soul_sponge"):(ie("ascended"),e.interstellar.thermal_collector.count===0&&De("energetic")),e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.emfield&&ie("technophobe"),e.race.cataclysm&&De("finish_line"),e.race.noexport="Race",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(r?r.append(a):$("#city").append(a),a.append(`

${t("genelab_title")}

- ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }}
`),r){a.append(` + `)}var Yt={spc_home:{info:{name(){return A[e.race.species].home},desc:t("space_home_info_desc"),zone:"inner",syndicate(){return!1}},test_launch:{id:"space-test_launch",title:t("space_home_test_launch_title"),desc:t("space_home_test_launch_desc"),reqs:{space:1},grant:["space",2],queue_complete(){return e.tech.space>=2?0:1},cost:{Money(){return 1e5},Oil(r,a){return Ae(7500,!1,a)}},effect:t("space_home_test_launch_effect"),action(){if(u($(this)[0])){if(e.race.truepath){let r=1;if(_r("gov0")||r++,_r("gov1")||r++,_r("gov2")||r++,Math.floor(J(0,r))!==0)return I(t("space_home_test_launch_action_fail"),"danger",!1,["progress"]),0}return e.space.satellite={count:0},I(t("space_home_test_launch_action"),"info",!1,["progress"]),!0}return!1}},satellite:{id:"space-satellite",title:t("space_home_satellite_title"),desc:t("space_home_satellite_desc"),reqs:{space:2},cost:{Money(r){return f("satellite",r,72e3,1.22)},Knowledge(r){return f("satellite",r,28e3,1.22)},Oil(r,a){return f("satellite",r,Ae(3200,!1,a),1.22)},Alloy(r){return f("satellite",r,8e3,1.22)}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?2e3:750;if((e.race.cataclysm||e.race.orbit_decayed)&&e.tech.supercollider){let n=e.tech.particles&&e.tech.particles>=3?5:10;r*=e.tech.supercollider/n+1}let a=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):dr(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`
${t("space_home_satellite_effect2",[a,i])}
`;return`
${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${s}
${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return u($(this)[0])?(ne("satellite"),e.resource.Knowledge.max+=750,!0):!1}},gps:{id:"space-gps",title:t("space_home_gps_title"),desc(){return e.space.hasOwnProperty("gps")&&e.space.gps.count<4?`
${t("space_home_gps_desc")}
${t("space_home_gps_desc_req")}
`:`
${t("space_home_gps_desc")}
`},reqs:{satellite:1},not_trait:["terrifying"],cost:{Money(r){return f("gps",r,75e3,1.18)},Knowledge(r){return f("gps",r,5e4,1.18)},Copper(r){return f("gps",r,6500,1.18)},Oil(r,a){return f("gps",r,Ae(3500,!1,a),1.18)},Titanium(r){return f("gps",r,8e3,1.18)}},effect(r){return(r||0)+(e.space.hasOwnProperty("gps")?e.space.gps.count:0)<4?t("space_home_gps_effect_req"):`
${t("space_home_gps_effect")}
${t("space_home_gps_effect2",[2])}
`},action(){return u($(this)[0])?(ne("gps"),!0):!1}},propellant_depot:{id:"space-propellant_depot",title:t("space_home_propellant_depot_title"),desc:t("space_home_propellant_depot_desc"),reqs:{space_explore:1},cost:{Money(r){return f("propellant_depot",r,55e3,1.35)},Aluminium(r){return f("propellant_depot",r,22e3,1.35)},Oil(r,a){return f("propellant_depot",r,Ae(5500,!1,a),1.35)}},effect(){let r=H(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let a=H(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
`}return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
`},action(){return u($(this)[0])?(ne("propellant_depot"),e.resource.Oil.max+=H(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=H(1e3)*(e.tech.world_control?1.5:1)),!0):!1}},nav_beacon:{id:"space-nav_beacon",title(){return e.race.orbit_decayed?t("space_home_broadcast_beacon_title"):t("space_home_nav_beacon_title")},desc:`
${t("space_home_nav_beacon_desc")}
${t("requires_power")}
`,reqs:{luna:2},cost:{Money(r){return f("nav_beacon",r,75e3,1.32)},Copper(r){return f("nav_beacon",r,38e3,1.32)},Aluminium(r){return f("nav_beacon",r,44e3,1.32)},Oil(r,a){return f("nav_beacon",r,Ae(12500,!1,a),1.32)},Iridium(r){return f("nav_beacon",r,1200,1.32)}},powered(){return _e(2)},powerBalancer(){return e.tech.luna&&e.tech.luna>=3?[{s:e.space.moon_base.s_max-e.space.moon_base.support},{s:e.space.spaceport.s_max-e.space.spaceport.support}]:[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},support(){return 1},effect(){let r="";e.race.orbit_decayed&&e.tech.broadcast&&(r=`
${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let a=e.race.orbit_decayed?"":`
${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`
${t("space_red_spaceport_effect1",[W().red,1])}
`:"";return`${a}${i}${r}
${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("nav_beacon"),re($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let r=A[e.race.species].home;return t("space_moon_info_desc",[r])},support:"moon_base",zone:"inner",syndicate(){return!0}},moon_mission:{id:"space-moon_mission",title:t("space_moon_mission_title"),desc:t("space_moon_mission_desc"),reqs:{space:2,space_explore:2},grant:["space",3],queue_complete(){return e.tech.space>=3?0:1},cost:{Oil(r,a){return+Ae(12e3,!1,a).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return u($(this)[0])?(I(t("space_moon_mission_action"),"info",!1,["progress"]),e.space.iridium_mine={count:0,on:0},e.space.helium_mine={count:0,on:0},!0):!1}},moon_base:{id:"space-moon_base",title:t("space_moon_base_title"),desc(){return`
${t("space_moon_base_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{space:3},cost:{Money(r){return f("moon_base",r,22e3,1.32)},Cement(r){return f("moon_base",r,18e3,1.32)},Alloy(r){return f("moon_base",r,7800,1.32)},Polymer(r){return f("moon_base",r,12500,1.32)}},effect(r){let a=H(500),i=+Ae($(this)[0].support_fuel().a,!0,r).toFixed(2);return`
${t("space_moon_base_effect1")}
${t("plus_max_resource",[a,t("resource_Iridium_name")])}
${t("space_moon_base_effect3",[i,$(this)[0].powered()])}
`},support(){return 2},support_fuel(){return{r:"Oil",a:2}},powered(){return _e(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(u($(this)[0])){if(ne("moon_base"),re($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let r=t("space_moon_base_msg",[ut(3)]);e.civic.foreign.gov3.hstl<10?r=`${r} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(r=`${r} ${t("space_moon_base_msg_hstl")}`),I(r,"info",!1,["progress"])}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+2500&&(e.race.orbit_decay=e.stats.days+2500,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},iridium_mine:{id:"space-iridium_mine",title:t("space_moon_iridium_mine_title"),desc:`
${t("space_moon_iridium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("iridium_mine",r,42e3,1.35)},Lumber(r){return f("iridium_mine",r,9e3,1.35)},Titanium(r){return f("iridium_mine",r,17500,1.35)}},effect(){let r=T("iridium_mine","iridium"),a=+r.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`
${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`
${t("produce",[+T("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`
${t("produce",[+(T("iridium_mine","coal")/48).toFixed(3),e.resource.Uranium.name])}
`:"";return`
${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_iridium_mine_effect",[a])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Iridium.display=!0,ne("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Lt()),re($(this)[0]),!0):!1}},helium_mine:{id:"space-helium_mine",title:t("space_moon_helium_mine_title"),desc:`
${t("space_moon_helium_mine_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{space:3,luna:1},cost:{Money(r){return f("helium_mine",r,38e3,1.35)},Aluminium(r){return f("helium_mine",r,9e3,1.35)},Steel(r){return f("helium_mine",r,17500,1.35)}},effect(){let r=H(100),a=T("helium_mine"),i=+a.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`)),`
${t("space_used_support",[t("space_moon_info_name")])}
${t("space_moon_helium_mine_effect",[i])}
${s}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(e.resource.Helium_3.display=!0,ne("helium_mine"),re($(this)[0]),!0):!1}},observatory:{id:"space-observatory",title:t("space_moon_observatory_title"),desc:`
${t("space_moon_observatory_desc")}
${t("space_support",[t("space_moon_info_name")])}
`,reqs:{science:9,luna:1},cost:{Money(r){return f("observatory",r,2e5,1.28)},Knowledge(r){return f("observatory",r,69e3,1.28)},Stone(r){return f("observatory",r,125e3,1.28)},Iron(r){return f("observatory",r,65e3,1.28)},Iridium(r){return f("observatory",r,1250,1.28)}},effect(){let r="";e.race.cataclysm&&(r=`
${t("city_university_effect",[N(1)])}
`);let a=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(a*=1+e.space.satellite.count*.25);let i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[25])}
`:`
${t("space_moon_observatory_effect",[5])}
`;return`
${t("space_used_support",[t("space_moon_info_name")])}
${r}
${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("observatory"),re($(this)[0]),!0):!1}}},spc_red:{info:{name(){return W().red},desc(){return t("space_red_info_desc",[W().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[W().red])},desc(){return t("space_mission_desc",[W().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(r,a){return+Ae(4500,!1,a).toFixed(0)}},effect(){return t("space_red_mission_effect",[W().red])},action(){return u($(this)[0])?(I(t("space_red_mission_action",[W().red]),"info",!1,["progress"]),e.space.living_quarters={count:0,on:0},e.space.garage={count:0},e.space.red_mine={count:0,on:0},e.space.fabrication={count:0,on:0},!0):!1}},spaceport:{id:"space-spaceport",title:t("space_red_spaceport_title"),desc(){return`
${t("space_red_spaceport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{space:4},cost:{Money(r){return f("spaceport",r,47500,1.32)},Iridium(r){return f("spaceport",r,1750,1.32)},Mythril(r){return f("spaceport",r,25,1.32)},Titanium(r){return f("spaceport",r,22500,1.32)}},effect(r){let a=+Ae($(this)[0].support_fuel().a,!0,r).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=H(Ar()*4);i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_red_spaceport_effect1",[W().red,$(this)[0].support()])}
${i}
${t("space_red_spaceport_effect2",[a,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let r=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&r++,r},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return _e(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("spaceport"),re($(this)[0]),e.tech.mars||(e.tech.mars=1),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},red_tower:{id:"space-red_tower",title:t("space_red_tower_title"),desc(){return`
${t("space_red_tower_desc")}
${t("requires_power")}
`},reqs:{mars:3},cost:{Money(r){return f("red_tower",r,225e3,1.28)},Iron(r){return f("red_tower",r,22e3,1.28)},Cement(r){return f("red_tower",r,15e3,1.28)},Alloy(r){return f("red_tower",r,8e3,1.28)}},effect(){return`
${t("space_red_spaceport_effect1",[W().red,e.race.cataclysm?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm?2:1},action(){return u($(this)[0])?(ne("red_tower"),re($(this)[0]),!0):!1}},captive_housing:hr("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(r){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||r?`
${t("space_terraformer")}
${t("requires_segments",[100])}
`+(e.space.hasOwnProperty("terraformer")&&e.space.terraformer.count>=100?`
${t("requires_power")}
`:""):`
${t("space_terraformer")}
`},reqs:{terraforming:1},condition(){return!(e.space.terraformer.count>=100)},queue_size:5,queue_complete(){return 100-e.space.terraformer.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(r){return(r||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(r){let a=(r?r.count:0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(a<100){let i=100-a;return`
${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_red.atmo_terraformer.effect(r)},action(){return u($(this)[0])&&e.space.terraformer.count<100?(ne("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},Pt(),Ie()),!0):!1}},atmo_terraformer:{id:"space-atmo_terraformer",title:t("space_terraformer"),desc(){return`
${t("space_terraformer")}
${t("requires_power")}
`},wiki:!1,reqs:{terraforming:2},condition(){return e.space.terraformer.count>=100},queue_complete(){return 0},cost:{},powered(r){return _e((r?r.truepath:e.race.truepath)?500:5e3)},postPower(r){r?setTimeout(function(){e.tech.terraforming=k.atmo_terraformer?3:2,Pt()},250):(e.tech.terraforming=2,Pt())},effect(r){let a=Eo(),i=$(this)[0].powered(r),s=i>0?`
${t("minus_power",[i])}
`:"";return`
${t("space_terraformer_effect2")}
${a}${s}`},action(){return!1}},terraform:{id:"space-terraform",title:t("space_terraform"),desc:t("space_terraform"),reqs:{terraforming:3},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Eo();return`
${t("space_terraform_effect")}
${r}`},action(){return u($(this)[0])?(Jn(),!0):!1}},assembly:hr("assembly","space"),living_quarters:{id:"space-living_quarters",title:t("space_red_living_quarters_title"),desc(){return`
${t("space_red_living_quarters_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("living_quarters",r,rc(38e3),1.28)},Steel(r){return f("living_quarters",r,rc(15e3),1.28)},Polymer(r){return f("living_quarters",r,rc(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a="";if(e.race.cataclysm||e.race.orbit_decayed){let i=H(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");a=`
${t("plus_max_resource",[`$${i}`,t("resource_Money_name")])}
`}return`
${t("space_used_support",[W().red])}
${a}
${t("plus_max_resource",[N(1),e.race.truepath?t("job_colonist_tp",[W().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(u($(this)[0])){if(ne("living_quarters"),e.civic.colonist.display=!0,re($(this)[0])){e.resource[e.race.species].max+=N(1);let r=N(1);e.civic.colonist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.colonist.workers+=a}return!0}return!1},citizens(){let r=e.race.cataclysm||e.race.orbit_decayed?2:1;if(U.biodome){let a=e.tech.mars>=6?.1:.05;r+=a*U.biodome}return+N(r).toFixed(2)}},pylon:{id:"space-pylon",title:t("space_red_pylon"),desc:t("space_red_pylon"),reqs:{magic:2},condition(){return!!(e.race.cataclysm||e.race.orbit_decayed)},cost:{Money(r){return f("pylon",r,10,1.48)},Stone(r){return f("pylon",r,12,1.42)},Crystal(r){return f("pylon",r,8,1.42)-3}},effect(){let r=H(2),a=+(.005*ft("magic")).toFixed(3);return`
${t("gain",[a,e.resource.Mana.name])}
${t("plus_max_resource",[r,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return u($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=H(2),!0):!1}},vr_center:{id:"space-vr_center",title:t("space_red_vr_center_title"),desc(){return`
${t("space_red_vr_center_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(r){return f("vr_center",r,38e4,1.25)},Copper(r){return f("vr_center",r,55e3,1.25)},Stanene(r){return f("vr_center",r,1e5,1.25)},Soul_Gem(r){return f("vr_center",r,1,1.25)}},effect(){let r=ge("gaslighter",1),a=r?r+1:1;return e.race.orbit_decayed&&(a+=2),`
${t("space_used_support",[W().red])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("vr_center"),re($(this)[0]),!0):!1}},garage:{id:"space-garage",title:t("space_red_garage_title"),desc(){return`
${t("space_red_garage_desc")}
`},reqs:{mars:1},cost:{Money(r){return f("garage",r,75e3,1.28)},Iron(r){return f("garage",r,12e3,1.28)},Brick(r){return f("garage",r,3e3,1.28)},Sheet_Metal(r){return f("garage",r,1500,1.28)}},wide:!0,res(){let r=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(r.push("Polymer"),r.push("Coal"),r.push("Lumber"),r.push("Chrysotile"),r.push("Stone"),r.push("Furs")),r},heavy(r){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(r)},val(r){switch(r){case"Copper":return 6500;case"Iron":return 5500;case"Cement":return e.race.cataclysm?10500:6e3;case"Steel":return 4500;case"Titanium":return 3500;case"Alloy":return 2500;case"Nano_Tube":return 25e3;case"Neutronium":return 125;case"Infernite":return 75;case"Polymer":return 2500;case"Coal":return 1500;case"Lumber":return 7500;case"Chrysotile":return 7500;case"Stone":return 7500;case"Furs":return 2200;default:return 0}},multiplier(r){let a=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a*=2),e.tech.shelving&&e.tech.shelving>=3&&(a*=1.5),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,r&&e.tech.shelving&&e.tech.shelving>=2?a*3:a},effect(){let r=$(this)[0].multiplier(!1),a=$(this)[0].multiplier(!0),i=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(i+=10);let s=e.race.cataclysm||e.race.orbit_decayed?`${t("plus_max_resource",[i,t("resource_Crates_name")])}`:"",n='
';n=n+`${t("plus_max_resource",[i,t("resource_Containers_name")])}${s}`;for(let c of $(this)[0].res())if(e.resource[c].display){let l=$(this)[0].heavy(c),o=Ee(+(H($(this)[0].val(c))*(l?a:r)).toFixed(0),1);n=n+`${t("plus_max_resource",[o,e.resource[c].name])}`}return n=n+"
",n},action(){if(u($(this)[0])){ne("garage");let r=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r+=10),e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=$(this)[0].multiplier(!1),i=$(this)[0].multiplier(!0);for(let s of $(this)[0].res())if(e.resource[s].display){let n=$(this)[0].heavy(s);e.resource[s].max+=H($(this)[0].val(s))*(n?i:a)}return!0}return!1}},red_mine:{id:"space-red_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("red_mine",r,5e4,1.32)},Lumber(r){return f("red_mine",r,65e3,1.32)},Iron(r){return f("red_mine",r,33e3,1.32)}},effect(){let r=T("red_mine","copper"),a=T("red_mine","titanium"),i=+r.b.toFixed(3),s=+a.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`
${t("space_rival_war",[+(r.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`
${t("city_mine_effect1",[N(1)])}
${t("city_coal_mine_effect1",[N(1)])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`
${t("space_red_mine_effect",[+T("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`
${t("space_red_mine_effect",[+T("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",d=e.race.cataclysm||e.race.orbit_decayed?`
${t("space_red_mine_effect",[+T("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`
${t("space_used_support",[W().red])}
${c}
${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${o}${l}${d}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("red_mine"),re($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`
${t("space_red_fabrication_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:1},cost:{Money(r){return f("fabrication",r,9e4,1.32)},Copper(r){return f("fabrication",r,25e3,1.32)},Cement(r){return f("fabrication",r,12e3,1.32)},Wrought_Iron(r){return f("fabrication",r,1200,1.32)}},effect(){let r=e.race.cataclysm&&!e.race.flier?`
${t("city_cement_plant_effect1",[N(1)])}
`:"",a=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(a=xe(a)),`
${t("space_used_support",[W().red])}
${t("space_red_fabrication_effect1",[N(1)])}
${r}
${t("space_red_fabrication_effect2",[a])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("fabrication"),re($(this)[0])&&(e.civic.craftsman.max+=N(1)),!0):!1}},red_factory:{id:"space-red_factory",title:t("space_red_factory_title"),desc(){return`
${t("space_red_factory_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{mars:4},cost:{Money(r){return f("red_factory",r,75e3,1.32)},Brick(r){return f("red_factory",r,1e4,1.32)},Coal(r){return f("red_factory",r,7500,1.32)},Mythril(r){return f("red_factory",r,50,1.32)}},effect(r){let a=`
${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(a=a+`
${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(a=a+`
${t("city_cement_plant_effect1",[N(1)])}
`);let i=+Ae(1,!0,r).toFixed(2);return a=a+`
${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,a},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(e.space.red_factory.count++,re($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,rt(),!0):!1}},nanite_factory:hr("nanite_factory","space"),biodome:{id:"space-biodome",title(){return e.race.artifical?t("space_red_signal_tower_title"):e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")},desc(){let r;return e.race.artifical?r=`
${t("space_red_signal_tower_title")}
`:e.race.soul_eater?r=`
${t("space_red_asphodel_desc")}
`:e.race.carnivore?r=`
${t("space_red_biodome_desc_carn")}
`:r=`
${t("space_red_biodome_desc",[W().red])}
`,`
${r}
${t("space_support",[W().red])}
`},reqs:{mars:2},cost:{Money(r){return f("biodome",r,45e3,1.28)},Lumber(r){return f("biodome",r,65e3,1.28)},Brick(r){return f("biodome",r,1e3,1.28)},Nanite(r){return e.race.deconstructor?f("biodome",r,75,1.28):0}},effect(){let r=+T("biodome","food").toFixed(2),a=e.race.cataclysm||e.race.orbit_decayed?`
${t("produce",[+T("biodome","cat_food").toFixed(2),e.resource.Food.name])}
`:"",i=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.kindling_kindred&&!e.race.smoldering?`
${t("space_red_mine_effect",[+T("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[H(500)]):t("plus_max_resource",[H(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`
${n}${t("space_used_support",[W().red])}
${a}
${t("space_red_biodome_effect",[r,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+N(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("biodome"),e.race.cataclysm||(ie("colonist"),e.race.joyless&&(ie("joyless"),delete e.race.joyless,ue())),re($(this)[0]),!0):!1},flair(){return e.race.artifical?t("space_red_signal_tower_flair"):e.race.soul_eater?t("space_red_asphodel_flair"):e.race.carnivore?t("space_red_biodome_flair_carn"):t("space_red_biodome_flair")}},red_university:{id:"space-red_university",title:t("city_university"),desc(){return t("city_university_desc",[W().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(r){return f("university",r,900,1.5,"city")-500},Lumber(r){return f("university",r,500,1.36,"city")-200},Stone(r){return f("university",r,750,1.36,"city")-350},Crystal(r){return e.race.universe==="magic"?f("university",r,5,1.36,"city"):0}},wiki:!1,effect(){return O.city.university.effect()},action(){if(u($(this)[0])){let r=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let a=e.tech.particles&&e.tech.particles>=3?12.5:25;r*=e.tech.supercollider/a+1}return e.resource.Knowledge.max+=r,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=N(e.city.university.count),!0}return!1}},exotic_lab:{id:"space-exotic_lab",title:t("space_red_exotic_lab_title"),desc(){return`
${t("space_red_exotic_lab_desc")}
${t("space_support",[W().red])}
`},reqs:{mars:5},cost:{Money(r){return f("exotic_lab",r,75e4,1.28)},Steel(r){return f("exotic_lab",r,1e5,1.28)},Mythril(r){return f("exotic_lab",r,1e3,1.28)},Elerium(r){return f("exotic_lab",r,20,1.28)-4}},effect(){let r=500;e.tech.science>=13&&e.interstellar.laboratory&&bt.laboratory&&(r+=bt.laboratory*25),e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15),e.tech.mass>=2&&k.mass_driver&&(r+=xe(k.mass_driver*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=xe(r));let a=H(10),i="",s="";return(e.race.cataclysm||e.race.orbit_decayed)&&(i=`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`,r*=1+U.observatory*.25,e.tech.science>=15&&(s=`
${t("city_wardenclyffe_effect4",[2])}
`)),`
${t("space_used_support",[W().red])}
${i}${s}
${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exotic_lab"),re($(this)[0]),!0):!1},flair(){return`
${t("space_red_exotic_lab_flair1")}
${t("space_red_exotic_lab_flair2")}
`}},ziggurat:{id:"space-ziggurat",title:t("space_red_ziggurat_title"),desc(){let r=e.race.old_gods!=="none"?A[e.race.old_gods.toLowerCase()].entity:A[e.race.species].entity;return`
${t("space_red_ziggurat_desc",[r])}
`},reqs:{theology:4},cost:{Money(r){return f("ziggurat",r,6e5,1.28)},Stone(r){return f("ziggurat",r,25e4,1.28)},Aluminium(r){return f("ziggurat",r,7e4,1.28)},Mythril(r){return f("ziggurat",r,250,1.28)}},effect(){let r=e.tech.ancient_study?.6:.4;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(r+=.01*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=.002;e.race.high_pop&&(s=xe(s)),r+=s*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=xe(r)),r=+r.toFixed(2);let a=e.race.truepath?[r,A[e.race.species].home]:[r],i=`
${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",a)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(i=i+`
${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(i=i+cc()),e.genes.ancients&&e.genes.ancients>=4&&(i=i+`
${t("city_temple_effect6",[N(1)])}
`),i},action(){return u($(this)[0])?(ne("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=N(1)),e.race.cataclysm&&ie("iron_will",!1,1),!0):!1}},space_barracks:{id:"space-space_barracks",title:t("space_red_space_barracks_title"),desc(){return`
${t("space_red_space_barracks_desc")}
${t("space_red_space_barracks_desc_req")}
`},reqs:{marines:1},cost:{Money(r){return f("space_barracks",r,35e4,1.28)},Alloy(r){return f("space_barracks",r,65e3,1.28)},Iridium(r){return f("space_barracks",r,22500,1.28)},Wrought_Iron(r){return f("space_barracks",r,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(r){let a=e.race.orbit_decayed?O.city.boot_camp.effect():"",i=+Ae(2,!0,r).toFixed(2),s=e.tech.marines>=2?N(4):N(2),n=e.race.cataclysm?"":`
${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`
${t("plus_max_soldiers",[s])}
${a}
${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return u($(this)[0])?(ne("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:hr("bonfire","space"),horseshoe:hr("horseshoe","space")},spc_hell:{info:{name(){return W().hell},desc(){return t("space_hell_info_desc",[W().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[W().hell])},desc(){return t("space_mission_desc",[W().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(r,a){return+Ae(6500,!1,a).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[W().hell])},action(){return u($(this)[0])?(I(t("space_hell_mission_action",[W().hell]),"info",!1,["progress"]),e.space.geothermal={count:0,on:0},!0):!1}},geothermal:{id:"space-geothermal",title:t("space_hell_geothermal_title"),desc(){return`
${t("space_hell_geothermal_desc")}
${t("space_hell_geothermal_desc_req")}
`},reqs:{hell:1},cost:{Money(r){return f("geothermal",r,38e3,1.35)},Steel(r){return f("geothermal",r,15e3,1.35)},Polymer(r){return f("geothermal",r,9500,1.35)}},effect(r){let a=+Ae($(this)[0].p_fuel().a,!0,r).toFixed(2);return`${e.race.cataclysm||e.race.orbit_decayed?`
${t("interstellar_stellar_forge_effect3",[1])}
`:""}${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("space_belt_station_effect3",[a])}`},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let r=-8;return e.race.forge&&(r-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(r-=2),dt(r)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return u($(this)[0])?(ne("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[W().hell])},desc(){return t("space_hell_smelter_title",[W().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(r){return f("hell_smelter",r,25e4,1.24)},Adamantite(r){return f("hell_smelter",r,15e3,1.24)}},effect(){return`
${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return u($(this)[0])?(ne("hell_smelter"),e.city.smelter.cap+=2,e.city.smelter.Steel+=2,e.city.smelter.Oil+=2,!0):!1}},spc_casino:{id:"space-spc_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{hell:1,gambling:1},condition(){return!!(e.race.cataclysm||e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)},cost:{Money(r){return f("spc_casino",r,4e5,1.35)},Furs(r){return f("spc_casino",r,75e3,1.35)},Cement(r){return f("spc_casino",r,1e5,1.35)},Plywood(r){return f("spc_casino",r,2e4,1.35)}},effect(){let r=ms();return r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return _e(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return u($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=N(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},flair:t("city_casino_flair")},swarm_plant:{id:"space-swarm_plant",title:t("space_hell_swarm_plant_title"),desc(){return`
${t("space_hell_swarm_plant_desc")}
`},reqs:{solar:4,hell:1},cost:{Money(r){return f("swarm_plant",r,$s(75e3),1.28)},Iron(r){return f("swarm_plant",r,$s(65e3),1.28)},Neutronium(r){return f("swarm_plant",r,$s(75),1.28)},Brick(r){return f("swarm_plant",r,$s(2500),1.28)},Mythril(r){return f("swarm_plant",r,$s(100),1.28)}},effect(){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=xt/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return u($(this)[0])?(ne("swarm_plant"),!0):!1}},firework:hr("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[A[e.race.species].home])},support:"swarm_control",zone:"inner",syndicate(){return!1}},sun_mission:{id:"space-sun_mission",title(){return t("space_sun_mission_title")},desc(){return t("space_sun_mission_desc")},reqs:{space_explore:4},grant:["solar",1],queue_complete(){return e.tech.solar>=1?0:1},cost:{Helium_3(r,a){return+Ae(15e3,!1,a).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!u($(this)[0])}},swarm_control:{id:"space-swarm_control",title:t("space_sun_swarm_control_title"),desc(){return`
${t("space_sun_swarm_control_desc")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_control",r,1e5,1.3)},Knowledge(r){return f("swarm_control",r,6e4,1.3)},Alloy(r){return f("swarm_control",r,7500,1.3)},Helium_3(r,a){return f("swarm_control",r,Ae(2e3,!1,a),1.3)},Mythril(r){return f("swarm_control",r,250,1.3)}},effect(){return t("space_sun_swarm_control_effect1",[$(this)[0].support()])},support(){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(xt):12:10},action(){return u($(this)[0])?(ne("swarm_control"),e.space.swarm_control.s_max+=$(this)[0].support(),!0):!1}},swarm_satellite:{id:"space-swarm_satellite",title:t("space_sun_swarm_satellite_title"),desc(){return`
${t("space_sun_swarm_satellite_desc")}
${t("space_sun_swarm_satellite_desc_req")}
`},reqs:{solar:3},cost:{Money(r){return f("swarm_satellite",r,Zs(5e3),1.1)},Copper(r){return f("swarm_satellite",r,Zs(2500),1.1)},Iridium(r){return f("swarm_satellite",r,Zs(150),1.1)},Helium_3(r,a){return f("swarm_satellite",r,Zs(Ae(50,!1,a)),1.1)}},effect(){let r=.35;return e.tech.swarm>=4&&(r+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(r+=.15),e.blood.illuminate&&(r+=.01*e.blood.illuminate),r=+r.toFixed(2),`${t("space_dwarf_reactor_effect1",[dt(r)])}, ${t("space_sun_swarm_satellite_effect1",[1])}`},support(){return-1},action(){return u($(this)[0])?(ne("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(r){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||r?`
${t("tau_jump_gate")}
${t("requires_segments",[100])}
`:`
${t("tau_jump_gate")}
`},reqs:{tauceti:3},path:["truepath"],queue_size:10,queue_complete(){return 100-e.space.jump_gate.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(a<100){let i=100-a;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return u($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return W().gas},desc(){return t("space_gas_info_desc",[W().gas,A[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[W().gas])},desc(){return t("space_mission_desc",[W().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(r,a){return+Ae(12500,!1,a).toFixed(0)}},effect(){return t("space_gas_mission_effect",[W().gas])},action(){return u($(this)[0])?(I(t("space_gas_mission_action",[W().gas]),"info",!1,["progress"]),e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.space.space_station={count:0,on:0,support:0,s_max:0},!0):!1}},gas_mining:{id:"space-gas_mining",title:t("space_gas_mining_title"),desc(){return`
${t("space_gas_mining_desc")}
${t("requires_power")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_mining",r,25e4,1.32)},Uranium(r){return f("gas_mining",r,500,1.32)},Alloy(r){return f("gas_mining",r,1e4,1.32)},Helium_3(r,a){return f("gas_mining",r,Ae(2500,!1,a),1.32)},Mythril(r){return f("gas_mining",r,25,1.32)}},effect(){let r=+T("gas_mining").toFixed(2);return`
${t("space_gas_mining_effect1",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(2)},action(){return u($(this)[0])?(ne("gas_mining"),re($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[W().gas])},desc(){return`
${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(r){return f("gas_storage",r,125e3,1.32)},Iridium(r){return f("gas_storage",r,3e3,1.32)},Sheet_Metal(r){return f("gas_storage",r,2e3,1.32)},Helium_3(r,a){return f("gas_storage",r,Ae(1e3,!1,a),1.32)}},effect(){let r=H(3500)*(e.tech.world_control?1.5:1),a=H(2500)*(e.tech.world_control?1.5:1),i=H(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return u($(this)[0])?(ne("gas_storage"),!0):!1}},star_dock:{id:"space-star_dock",title(){return t("space_gas_star_dock_title")},desc(){return`
${t("space_gas_star_dock_title")}
${t("space_gas_star_dock_desc_req")}
`},reqs:{genesis:3},queue_complete(){return 1-e.space.star_dock.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(r,a){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(Ae(e.race.gravity_well?25e3:1e4,!1,a)):0},Nano_Tube(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?1e4:0}},effect(){return`
${t("space_gas_star_dock_effect1")}
`},special:!0,action(){return e.space.star_dock.count===0&&u($(this)[0])?(ne("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return W().gas_moon},desc(){return t("space_gas_moon_info_desc",[W().gas_moon,W().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[W().gas_moon])},desc(){return t("space_mission_desc",[W().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(r,a){return+Ae(3e4,!1,a).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[W().gas_moon])},action(){return u($(this)[0])?(I(t("space_gas_moon_mission_action",[W().gas_moon]),"info",!1,["progress"]),e.space.outpost={count:0,on:0},e.tech.gas_moon=1,!0):!1}},outpost:{id:"space-outpost",title:t("space_gas_moon_outpost_title"),desc(){return`
${t("space_gas_moon_outpost_desc")}
${t("requires_power_combo",[e.resource.Oil.name])}
`},reqs:{gas_moon:1},cost:{Money(r){return f("outpost",r,666e3,1.3)},Titanium(r){return f("outpost",r,18e3,1.3)},Iridium(r){return f("outpost",r,2500,1.3)},Helium_3(r,a){return f("outpost",r,Ae(6e3,!1,a),1.3)},Mythril(r){return f("outpost",r,300,1.3)}},effect(r){let a=+T("outpost").toFixed(3),i=H(500),s=+Ae(2,!0,r).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("outpost"),e.resource.Neutronium.display=!0,re($(this)[0]),!0):!1}},drone:{id:"space-drone",title:t("space_gas_moon_drone_title"),desc(){return`
${t("space_gas_moon_drone_desc")}
`},reqs:{gas_moon:1,drone:1},cost:{Money(r){return f("drone",r,25e4,1.3)},Steel(r){return f("drone",r,2e4,1.3)},Neutronium(r){return f("drone",r,500,1.3)},Elerium(r){return f("drone",r,25,1.3)},Nano_Tube(r){return f("drone",r,45e3,1.3)}},effect(){let r=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`
${t("space_gas_moon_drone_effect1",[r])}
`},action(){return u($(this)[0])?(ne("drone"),!0):!1}},oil_extractor:{id:"space-oil_extractor",title:t("space_gas_moon_oil_extractor_title"),desc(){return`
${t("space_gas_moon_oil_extractor_title")}
${t("requires_power")}
`},reqs:{gas_moon:2},cost:{Money(r){return f("oil_extractor",r,666e3,1.3)},Polymer(r){return f("oil_extractor",r,7500,1.3)},Helium_3(r,a){return f("oil_extractor",r,Ae(2500,!1,a),1.3)},Wrought_Iron(r){return f("oil_extractor",r,5e3,1.3)}},effect(){let r=+T("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[r])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return _e(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return u($(this)[0])?(ne("oil_extractor"),re($(this)[0]),!0):!1}}},spc_belt:{info:{name(){return t("space_belt_info_name")},desc(){return e.space.space_station&&e.space.space_station.count>0?`
${t("space_belt_info_desc",[W().red,W().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[W().red,W().gas])},support:"space_station",zone:"inner",syndicate(){return!0}},belt_mission:{id:"space-belt_mission",title(){return t("space_belt_mission_title")},desc(){return t("space_belt_mission_desc")},reqs:{space:5},grant:["asteroid",1],queue_complete(){return e.tech.asteroid>=1?0:1},cost:{Helium_3(r,a){return+Ae(25e3,!1,a).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return u($(this)[0])?(I(t("space_belt_mission_action"),"info",!1,["progress"]),e.settings.space.dwarf=!0,!0):!1}},space_station:{id:"space-space_station",title:t("space_belt_station_title"),desc(){return`
${t("space_belt_station_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{asteroid:2},cost:{Money(r){return f("space_station",r,25e4,1.3)},Iron(r){return f("space_station",r,85e3,1.3)},Polymer(r){return f("space_station",r,18e3,1.3)},Iridium(r){return f("space_station",r,2800,1.28)},Helium_3(r,a){return f("space_station",r,Ae(2e3,!1,a),1.3)},Mythril(r){return f("space_station",r,75,1.25)}},effect(r){let a=+Ae(2.5,!0,r).toFixed(2),i=e.race.cataclysm?1:10,s=H(5),n=e.tech.asteroid>=5?`
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`
${t("plus_max_space_miners",[N(3)])}
${n}
${t("space_belt_station_effect5",[a,$(this)[0].powered()])}
`:`
${t("plus_max_space_miners",[N(3)])}
${n}
${t("space_belt_station_effect3",[a])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return N(3)},powered(){return _e(3)},refresh:!0,action(){if(u($(this)[0])){if(ne("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),re($(this)[0])){let r=N(3);e.civic.space_miner.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.space_miner.workers+=a}return e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+1e3&&(e.race.orbit_decay=e.stats.days+1e3,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0}return!1}},elerium_ship:{id:"space-elerium_ship",title:t("space_belt_elerium_ship_title"),desc(){return t("space_belt_elerium_ship_title")},reqs:{asteroid:5},cost:{Money(r){return f("elerium_ship",r,5e5,1.3)},Uranium(r){return f("elerium_ship",r,2500,1.3)},Titanium(r){return f("elerium_ship",r,1e4,1.3)},Mythril(r){return f("elerium_ship",r,500,1.3)},Helium_3(r,a){return f("elerium_ship",r,Ae(5e3,!1,a),1.3)}},effect(){let r=+T("elerium_ship").toFixed(4);return`
${t("space_belt_elerium_ship_effect1",[N(2)])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-2)},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_ship"),re($(this)[0]),!0):!1}},iridium_ship:{id:"space-iridium_ship",title:t("space_belt_iridium_ship_title"),desc(){return t("space_belt_iridium_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iridium_ship",r,12e4,1.3)},Uranium(r){return f("iridium_ship",r,1e3,1.3)},Alloy(r){return f("iridium_ship",r,48e3,1.3)},Iridium(r){return f("iridium_ship",r,2800,1.3)},Helium_3(r,a){return f("iridium_ship",r,Ae(1800,!1,a),1.3)}},effect(){let r=+T("iridium_ship").toFixed(3);return`
${t("space_belt_iridium_ship_effect1",[N(1)])}
${t("space_belt_iridium_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iridium_ship"),re($(this)[0]),!0):!1}},iron_ship:{id:"space-iron_ship",title:t("space_belt_iron_ship_title"),desc(){return t("space_belt_iron_ship_title")},reqs:{asteroid:3},cost:{Money(r){return f("iron_ship",r,8e4,1.3)},Steel(r){return f("iron_ship",r,42e3,1.3)},Aluminium(r){return f("iron_ship",r,38e3,1.3)},Polymer(r){return f("iron_ship",r,16e3,1.3)},Helium_3(r,a){return f("iron_ship",r,Ae(1200,!1,a),1.3)}},effect(){let r=+T("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`
${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
${t("space_belt_iron_ship_effect3")}
`:`
${t("space_belt_iron_ship_effect1",[N(1)])}
${t("space_belt_iron_ship_effect2",[r])}
`},s_type:"belt",support(){return N(-1)},powered(){return 0},action(){return u($(this)[0])?(ne("iron_ship"),re($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return W().dwarf},desc(){return t("space_dwarf_info_desc",[W().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[W().dwarf])},desc(){return t("space_mission_desc",[W().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(r,a){return+Ae(45e3,!1,a).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[W().dwarf])},action(){return u($(this)[0])?(I(t("space_dwarf_mission_action",[W().dwarf]),"info",!1,["progress"]),e.space.elerium_contain={count:0,on:0},!0):!1}},elerium_contain:{id:"space-elerium_contain",title:t("space_dwarf_elerium_contain_title"),desc(){return`
${t("space_dwarf_elerium_contain_title")}
${t("requires_power")}
`},reqs:{dwarf:1},cost:{Money(r){return f("elerium_contain",r,8e5,1.28)},Cement(r){return f("elerium_contain",r,12e4,1.28)},Iridium(r){return f("elerium_contain",r,5e4,1.28)},Neutronium(r){return f("elerium_contain",r,250,1.28)}},effect(){let r=H(100);return`
${t("plus_max_resource",[r,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(6)},action(){return u($(this)[0])?(ne("elerium_contain"),re($(this)[0]),!0):!1}},e_reactor:{id:"space-e_reactor",title:t("space_dwarf_reactor_title"),desc(){return`
${t("space_dwarf_reactor_title")}
${t("space_dwarf_reactor_desc_req")}
`},reqs:{elerium:2},cost:{Money(r){return f("e_reactor",r,125e4,1.28)},Steel(r){return f("e_reactor",r,35e4,1.28)},Neutronium(r){return f("e_reactor",r,1250,1.28)},Mythril(r){return f("e_reactor",r,2500,1.28)}},effect(){let r=$(this)[0].p_fuel().a,a=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[a])}
${t("space_dwarf_reactor_effect2",[r])}
`},powered(){return dt(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return u($(this)[0])?(ne("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(r){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||r)return`
${t("space_dwarf_collider_desc")}
${t("space_dwarf_collider_desc_req")}
`+(e.space.hasOwnProperty("world_collider")&&e.space.world_collider.count>=1859?`
${t("requires_power")}
`:"")},reqs:{science:10},path:["standard"],condition(){return e.space.world_collider.count<1859},queue_size:100,queue_complete(){return 1859-e.space.world_collider.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(a<1859){let i=1859-a;return`
${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&u($(this)[0])){if(ne("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},ue(),Pt(),e.race.banana){let r=ot();e.stats.banana.b2[r]=!0,r!=="m"&&r!=="l"&&(e.stats.banana.b2.l=!0)}Ie()}return!0}return!1},flair:t("space_dwarf_collider_flair")},world_controller:{id:"space-world_controller",title:t("space_dwarf_collider_title"),desc(){return`
${t("space_dwarf_collider_title")}
${t("requires_power")}
`},wiki:!1,reqs:{science:11},path:["standard"],condition(){return!(e.space.world_collider.count<1859)},queue_complete(){return 0},cost:{},effect(){let r=25;return e.interstellar.far_reach&&k.far_reach>0&&(r+=k.far_reach*1),e.tech.science>=19&&(r+=15),`
${t("plus_max_resource",[r+"%",t("resource_Knowledge_name")])}
${t("space_dwarf_controller_effect3")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(20)},action(){return!1},flair:t("space_dwarf_controller_flair")},shipyard:{id:"space-shipyard",title:t("outer_shipyard_title"),desc(){return`
${t("outer_shipyard_title")}
${t("requires_power")}
`},reqs:{shipyard:1},path:["truepath"],cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(r){return(r||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?5e5:0}},queue_complete(){return 1-e.space.shipyard.count},effect(){return`
${t("outer_shipyard_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(50)},special:!0,sAction(){k.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(gr("mTabCivic"),Ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&u($(this)[0])?(ne("shipyard"),re($(this)[0])&&(e.settings.showShipYard=!0),e.tech.syard_class=2,e.tech.syard_armor=3,e.tech.syard_weapon=1,e.tech.syard_engine=2,e.tech.syard_power=3,e.tech.syard_sensor=3,!0):!1}},mass_relay:{id:"space-mass_relay",title:t("space_dwarf_mass_relay_title"),desc(r){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||r)return`
${t("space_dwarf_mass_relay_title")}
${t("requires_segments",[100])}
`},reqs:{outer:5},path:["truepath"],condition(){return e.space.mass_relay.count<100},queue_size:5,queue_complete(){return 100-e.space.mass_relay.count},cost:{Money(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(r){return(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(r){let a=(r||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(a<100){let i=100-a;return`
${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Yt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&u($(this)[0])?(e.space.mass_relay.count++,e.space.mass_relay.count>=100&&(e.tech.outer=6,e.space.m_relay={count:1,on:1,charged:0},ue(),Pt(),Ie()),!0):!1}},m_relay:{id:"space-m_relay",title:t("space_dwarf_mass_relay_title"),desc(){return`
${t("space_dwarf_mass_relay_title")}
${t("requires_power")}
`},reqs:{outer:6},path:["truepath"],condition(){return e.space.mass_relay.count>=100},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(100)},effect(){let r=Math.floor(e.space.m_relay.charged/10)/10;return`
${t("space_dwarf_mass_relay_effect2",[W().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[r])}
`},action(){return!1}}},spc_titan:Bi().spc_titan,spc_enceladus:Bi().spc_enceladus,spc_triton:Bi().spc_triton,spc_kuiper:Bi().spc_kuiper,spc_eris:Bi().spc_eris},Cr={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[A[e.race.species].home]):t("interstellar_alpha_desc1",[A[e.race.species].home])},support:"starport"},alpha_mission:{id:"interstellar-alpha_mission",title:t("space_mission_title",[t("interstellar_alpha_name")]),desc:t("space_mission_desc",[t("interstellar_alpha_name")]),reqs:{ftl:2},grant:["alpha",1],queue_complete(){return e.tech.alpha>=1?0:1},cost:{Helium_3(){return+ze(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_alpha_mission_result"),"info",!1,["progress"]),e.interstellar.nexus={count:0,on:0,support:0,s_max:0},e.interstellar.warehouse={count:0},!0):!1}},starport:{id:"interstellar-starport",title:t("interstellar_alpha_starport_title"),desc(){return`
${t("interstellar_alpha_starport_desc")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{alpha:1},cost:{Money(r){return f("starport",r,1e6,1.3,"interstellar")},Aluminium(r){return f("starport",r,4e5,1.3,"interstellar")},Neutronium(r){return f("starport",r,1e3,1.3,"interstellar")},Elerium(r){return f("starport",r,100,1.3,"interstellar")}},effect(){let r=+ze(5).toFixed(2),a=100;return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 5},powered(){return _e(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,re($(this)[0]),e.tech.alpha===1&&(e.tech.alpha=2,e.interstellar.mining_droid={count:0,on:0,adam:0,uran:0,coal:0,alum:0}),e.race.orbit_decay&&e.race.orbit_decay>e.stats.days+100&&(e.race.orbit_decay=e.stats.days+100,I(t("evo_challenge_orbit_decayed_accelerated",[e.race.orbit_decay-e.stats.days]),"info",!1,["progress"])),!0):!1}},habitat:{id:"interstellar-habitat",title:t("interstellar_habitat_title"),desc:`
${t("interstellar_habitat_desc")}
${t("requires_power")}
`,reqs:{alpha:3},cost:{Money(r){return f("habitat",r,8e5,1.25,"interstellar")},Furs(r){return f("habitat",r,38e3,1.25,"interstellar")},Adamantite(r){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:f("habitat",r,3200,1.25,"interstellar")},Plywood(r){return f("habitat",r,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let r=$(this)[0].citizens();return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[r])}, ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return u($(this)[0])?(ne("habitat","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},mining_droid:{id:"interstellar-mining_droid",title:t("interstellar_mining_droid_title"),desc:`
${t("interstellar_mining_droid_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{alpha:2},cost:{Money(r){return f("mining_droid",r,65e4,1.28,"interstellar")},Steel(r){return f("mining_droid",r,12e4,1.28,"interstellar")},Nano_Tube(r){return f("mining_droid",r,75e3,1.28,"interstellar")},Elerium(r){return f("mining_droid",r,50,1.28,"interstellar")}},effect(){return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_mining_droid_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,refresh:!0,action(){return u($(this)[0])?(ne("mining_droid","interstellar"),e.resource.Adamantite.display=!0,re($(this)[0])&&e.interstellar.mining_droid.adam++,e.tech.droids||(e.tech.droids=1,e.interstellar.processing={count:0,on:0}),e.settings.showIndustry=!0,rt(),!0):!1}},processing:{id:"interstellar-processing",title:t("interstellar_processing_title"),desc:`
${t("interstellar_processing_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{droids:1},cost:{Money(r){return f("processing",r,35e4,1.28,"interstellar")},Iron(r){return f("processing",r,18e4,1.28,"interstellar")},Aluminium(r){return f("processing",r,6e4,1.28,"interstellar")},Iridium(r){return f("processing",r,5e3,1.28,"interstellar")}},effect(){let r=12;return e.tech.ai_core&&e.tech.ai_core>=2&&k.citadel>0&&(r+=k.citadel*2),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_processing_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("processing","interstellar"),re($(this)[0]),!0):!1}},fusion:{id:"interstellar-fusion",title:t("interstellar_fusion_title"),desc(){return`
${t("interstellar_fusion_title")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Deuterium.name])}
`},reqs:{fusion:1},cost:{Money(r){return f("fusion",r,99e4,1.28,"interstellar")},Iridium(r){return f("fusion",r,44e3,1.28,"interstellar")},Infernite(r){return f("fusion",r,350,1.28,"interstellar")},Brick(r){return f("fusion",r,18e3,1.28,"interstellar")}},effect(){let r=1.25;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("interstellar_fusion_effect",[r])}
`},s_type:"alpha",support(){return-1},powered(){return dt(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return u($(this)[0])?(ne("fusion","interstellar"),re($(this)[0]),!0):!1}},laboratory:{id:"interstellar-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title")},desc:`
${t(e.race.universe==="magic"?"tech_sanctum":"interstellar_laboratory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{science:12},cost:{Money(r){return f("laboratory",r,75e4,1.28,"interstellar")},Crystal(r){return e.race.universe==="magic"?f("laboratory",r,1200,1.28,"interstellar"):0},Titanium(r){return f("laboratory",r,12e4,1.28,"interstellar")},Alloy(r){return f("laboratory",r,95e3,1.28,"interstellar")},Mythril(r){return f("laboratory",r,8500,1.28,"interstellar")}},effect(){let r=1e4;e.tech.science>=15&&(r*=1+(e.race.cataclysm||e.race.orbit_decayed?U.exotic_lab:e.city.wardenclyffe.count)*.02),(e.race.cataclysm||e.race.orbit_decayed)&&k.s_gate&&we.scavenger&&(r*=1+we.scavenger*+(kt("gxy_alien2")*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let a="";e.tech.science>=16&&(a=`
${t("city_wardenclyffe_effect1",[N(1),e.civic.scientist.name])}
`);let i=`
${t("space_used_support",[t("interstellar_alpha_name")])}
${a}
${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(i=i+`
${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let s=H(12);i=i+`
${t("plus_max_resource",[s,e.resource.Mana.name])}
`}return i},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("laboratory","interstellar"),re($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=N(1))),!0):!1}},exchange:{id:"interstellar-exchange",title:t("interstellar_exchange_title"),desc:`
${t("interstellar_exchange_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{banking:12},cost:{Money(r){return f("exchange",r,68e4,1.28,"interstellar")},Stone(r){return f("exchange",r,115e3,1.28,"interstellar")},Adamantite(r){return f("exchange",r,55e3,1.28,"interstellar")},Graphene(r){return f("exchange",r,78e3,1.28,"interstellar")}},effect(){let r=e.race.cataclysm||e.race.orbit_decayed?k.spaceport:e.city.bank?e.city.bank.count:0,a=e.race.cataclysm||e.race.orbit_decayed?Ar()*4:Ar(),i=H(e.city.bank?a*r/18:0);return e.race.inflation&&(i*=2),e.tech.banking>=13&&(e.galaxy.freighter&&(i*=1+we.freighter*.03),e.galaxy.super_freighter&&(i*=1+we.super_freighter*.08)),i=+i.toFixed(0),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("exchange","interstellar"),re($(this)[0])&&(e.resource.Money.max+=+H(45e4).toFixed(0)),!0):!1}},g_factory:{id:"interstellar-g_factory",title:t("interstellar_g_factory_title"),desc:`
${t("interstellar_g_factory_title")}
${t("space_support",[t("interstellar_alpha_name")])}
`,reqs:{graphene:1},cost:{Money(r){return f("g_factory",r,95e4,1.28,"interstellar")},Copper(r){return f("g_factory",r,165e3,1.28,"interstellar")},Cement(r){return f("g_factory",r,22e4,1.28,"interstellar")},Infernite(r){return f("g_factory",r,750,1.28,"interstellar")}},effect(){return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("interstellar_g_factory_effect")}
`},s_type:"alpha",support(){return-1},powered(){return 0},special:!0,action(){return u($(this)[0])?(ne("g_factory","interstellar"),e.resource.Graphene.display=!0,re($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,rt(),!0):!1}},int_factory:{id:"interstellar-int_factory",title:t("interstellar_int_factory_title"),desc(){return`
${t("interstellar_int_factory_title")}
${t("requires_power_combo",[e.resource.Deuterium.name])}
`},reqs:{alpha:4},cost:{Money(r){return f("int_factory",r,25e6,1.26,"interstellar")},Coal(r){return f("int_factory",r,1e7,1.26,"interstellar")},Brick(r){return f("int_factory",r,75e4,1.26,"interstellar")},Bolognium(r){return f("int_factory",r,5e4,1.26,"interstellar")}},effect(){let r=+ze(5).toFixed(2);return`
${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[r])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},special:!0,action(){return u($(this)[0])?(ne("int_factory","interstellar"),re($(this)[0])&&(e.city.factory.Alloy+=2,rt()),!0):!1}},luxury_condo:{id:"interstellar-luxury_condo",title:t("tech_luxury_condo"),desc:`
${t("tech_luxury_condo")}
${t("requires_power")}
`,reqs:{alpha:5},cost:{Money(r){return f("luxury_condo",r,25e6,1.25,"interstellar")},Neutronium(r){return f("luxury_condo",r,75e3,1.25,"interstellar")},Stanene(r){return f("luxury_condo",r,23e4,1.25,"interstellar")},Orichalcum(r){return f("luxury_condo",r,65e3,1.25,"interstellar")},Nanoweave(r){return f("luxury_condo",r,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let r=$(this)[0].citizens(),a=H(75e4);return`
${t("plus_max_citizens",[r])}, ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("luxury_condo","interstellar"),re($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let r=2;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},zoo:{id:"interstellar-zoo",title:t("tech_zoo"),desc(){return`
${t("tech_zoo")}
${t("requires_power_support_combo",[t("interstellar_alpha_name"),e.resource.Food.name])}
`},reqs:{zoo:1},cost:{Money(r){return f("zoo",r,5e7,1.24,"interstellar")},Polymer(r){return f("zoo",r,6e6,1.24,"interstellar")},Infernite(r){return f("zoo",r,75e3,1.24,"interstellar")},Brick(r){return f("zoo",r,2e6,1.24,"interstellar")}},effect(){let r=5,a=2,i=12e3;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[a])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return u($(this)[0])?(ne("zoo","interstellar"),re($(this)[0]),!0):!1}},warehouse:{id:"interstellar-warehouse",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let r=e.tech.storage>=3?e.tech.storage>=4?t("city_shed_desc_size3"):t("city_shed_desc_size2"):t("city_shed_desc_size1");return t("city_shed_desc",[r])},reqs:{alpha:2},cost:{Money(r){return f("warehouse",r,175e3,1.28,"interstellar")},Lumber(r){return f("warehouse",r,1e5,1.28,"interstellar")},Aluminium(r){return f("warehouse",r,12e4,1.28,"interstellar")},Cement(r){return f("warehouse",r,45e3,1.28,"interstellar")}},res(){let r=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&r.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&r.push("Titanium"),r},val(r){switch(r){case"Lumber":return 750;case"Stone":return 750;case"Chrysotile":return 750;case"Furs":return 425;case"Copper":return 380;case"Iron":return 350;case"Aluminium":return 320;case"Cement":return 280;case"Coal":return 120;case"Steel":return 60;case"Titanium":return 40;case"Nano_Tube":return 30;case"Neutronium":return 8;case"Adamantite":return 18;case"Infernite":return 5;default:return 0}},wide:!0,effect(){let r='
',a=ci();for(let i of $(this)[0].res())if(e.resource[i].display){let s=Ee(+(H($(this)[0].val(i))*a).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])}`}return r=r+"
",r},action(){if(u($(this)[0])){ne("warehouse","interstellar");let r=ci();for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=H($(this)[0].val(a)*r));return!0}return!1}}},int_proxima:{info:{name:t("interstellar_proxima_name"),desc(){return e.tech.proxima?t("interstellar_proxima_desc2"):t("interstellar_proxima_desc1")}},proxima_mission:{id:"interstellar-proxima_mission",title:t("space_mission_title",[t("interstellar_proxima_name")]),desc:t("space_mission_desc",[t("interstellar_proxima_name")]),reqs:{alpha:1},grant:["proxima",1],queue_complete(){return e.tech.proxima>=1?0:1},cost:{Helium_3(){return+ze(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return u($(this)[0])?(e.interstellar.xfer_station={count:0,on:0},I(t("interstellar_proxima_mission_result"),"info",!1,["progress"]),!0):!1}},xfer_station:{id:"interstellar-xfer_station",title:t("interstellar_xfer_station_title"),desc(){return`
${t("interstellar_xfer_station_desc")}
${t("requires_power_combo",[e.resource.Uranium.name])}
`},reqs:{proxima:1},cost:{Money(r){return f("xfer_station",r,12e5,1.28,"interstellar")},Neutronium(r){return f("xfer_station",r,1500,1.28,"interstellar")},Adamantite(r){return f("xfer_station",r,6e3,1.28,"interstellar")},Polymer(r){return f("xfer_station",r,12e3,1.28,"interstellar")},Wrought_Iron(r){return f("xfer_station",r,3500,1.28,"interstellar")}},effect(){let r=.28,a=H(5e3),i=H(4e3),s=H(2500),n="";return e.resource.Deuterium.display&&(n=`
${t("plus_max_resource",[H(2e3),t("resource_Deuterium_name")])}
`),`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[i,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}
${t("city_fission_power_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return _e(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return u($(this)[0])?(ne("xfer_station","interstellar"),re($(this)[0])&&(e.resource.Uranium.max+=H(2500),e.resource.Helium_3.max+=H(5e3),e.resource.Oil.max+=H(4e3),e.resource.Deuterium.max+=H(2e3)),e.tech.proxima===1&&(e.tech.proxima=2,e.interstellar.cargo_yard={count:0}),!0):!1}},cargo_yard:{id:"interstellar-cargo_yard",title:t("interstellar_cargo_yard_title"),desc:t("interstellar_cargo_yard_title"),reqs:{proxima:2},cost:{Money(r){return f("cargo_yard",r,275e3,1.28,"interstellar")},Graphene(r){return f("cargo_yard",r,7500,1.28,"interstellar")},Mythril(r){return f("cargo_yard",r,6e3,1.28,"interstellar")}},effect(){let r=50,a=H(200),i=H(150),s=`
${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(s=s+`
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("plus_max_resource",[i,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let n=+xt.toFixed(3);s=s+`
${t("interstellar_cargo_yard_effect",[n])}
`}return s},action(){if(u($(this)[0])){ne("cargo_yard","interstellar");let r=50;return e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(r){return f("cruiser",r,875e3,1.28,"interstellar")},Aluminium(r){return f("cruiser",r,195e3,1.28,"interstellar")},Deuterium(r){return f("cruiser",r,+ze(1500).toFixed(0),1.28,"interstellar")},Neutronium(r){return f("cruiser",r,2e3,1.28,"interstellar")},Aerogel(r){return f("cruiser",r,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let r=+ze(6).toFixed(2),a=N(3);return`
${t("plus_max_soldiers",[a])}
${t("space_belt_station_effect3",[r])}
`},action(){return u($(this)[0])?(ne("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||r?`
${t("interstellar_dyson_title")}
${t("requires_segments",[100])}
`:`
${t("interstellar_dyson_title")}
`},reqs:{proxima:3},queue_size:10,queue_complete(){return 100-e.interstellar.dyson.count},condition(){return!(e.interstellar.dyson.count>=100&&e.tech.dyson)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(a<100){let i=a>0?`
${t("space_dwarf_reactor_effect1",[dt(a*1.25)])}
`:"",s=100-a;return`
${t("interstellar_dyson_effect")}
${i}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[dt(175)])},action(){return u($(this)[0])&&e.interstellar.dyson.count<100?(ne("dyson","interstellar"),e.interstellar.dyson.count>=100&&ue(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||r?`
${t("interstellar_dyson_sphere_title")}
${t("requires_segments",[100])}
`:`
${t("interstellar_dyson_sphere_title")}
`},reqs:{proxima:3,dyson:1},queue_size:10,queue_complete(){return 100-e.interstellar.dyson_sphere.count},condition(){return!!(e.interstellar.dyson.count>=100&&e.tech.dyson&&e.tech.dyson===1)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(a<100){let i=175+a*5,s=100-a;return`
${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(750)])},action(){return u($(this)[0])&&e.interstellar.dyson_sphere.count<100?(ne("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&ue(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(r){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||r?`
${t("interstellar_orichalcum_sphere_desc")}
${t("requires_segments",[100])}
`:`
${t("interstellar_orichalcum_sphere_desc")}
`},reqs:{proxima:3,dyson:2},queue_size:10,queue_complete(){return 100-e.interstellar.orichalcum_sphere.count},condition(){return!!(e.interstellar.dyson_sphere.count>=100&&e.tech.dyson&&e.tech.dyson===2)},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(a<100){let i=750+a*8,s=100-a;return`
${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[dt(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[dt(1750)])},action(){return u($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(ne("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&ie("blacken_the_sun"),!0):!1}}},int_nebula:{info:{name:t("interstellar_nebula_name"),desc(){return e.tech.nebula?t("interstellar_nebula_desc2"):t("interstellar_nebula_desc1")},support:"nexus"},nebula_mission:{id:"interstellar-nebula_mission",title:t("space_mission_title",[t("interstellar_nebula_name")]),desc:t("space_mission_desc",[t("interstellar_nebula_name")]),reqs:{alpha:1},grant:["nebula",1],queue_complete(){return e.tech.nebula>=1?0:1},cost:{Helium_3(){return+ze(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return u($(this)[0])?(I(t("interstellar_nebula_mission_result"),"info",!1,["progress"]),!0):!1}},nexus:{id:"interstellar-nexus",title:t("interstellar_nexus_title"),desc(){return`
${t("interstellar_nexus_title")}
${t("requires_power_combo",[e.resource.Money.name])}
`},reqs:{nebula:1},cost:{Money(r){return f("nexus",r,9e5,1.24,"interstellar")},Adamantite(r){return f("nexus",r,7500,1.24,"interstellar")},Infernite(r){return f("nexus",r,250,1.24,"interstellar")},Sheet_Metal(r){return f("nexus",r,14e3,1.24,"interstellar")},Nano_Tube(r){return f("nexus",r,17500,1.24,"interstellar")}},effect(){let r=H(3500),a=H(4e3),i=H(3e3),s=H(25);return`
${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[r,t("resource_Oil_name")])}
${t("plus_max_resource",[a,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("interstellar_nexus_effect2",[$(this)[0].powered(),350])}
`},support(){return 2},powered(){return _e(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return u($(this)[0])?(ne("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),re($(this)[0])&&(e.resource.Oil.max+=H(2500),e.resource.Helium_3.max+=H(4e3),e.resource.Deuterium.max+=H(3e3),e.resource.Elerium.max+=H(25)),!0):!1}},harvester:{id:"interstellar-harvester",title:t("interstellar_harvester_title"),desc:`
${t("interstellar_harvester_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:2},cost:{Money(r){return f("harvester",r,65e4,1.28,"interstellar")},Copper(r){return f("harvester",r,8e4,1.28,"interstellar")},Alloy(r){return f("harvester",r,45e3,1.28,"interstellar")},Iridium(r){return f("harvester",r,8e3,1.28,"interstellar")}},effect(){let r=+T("harvester","helium").toFixed(3),a=+T("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`
${t("interstellar_harvester_effect",[a])}
`:"";return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[r])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("harvester","interstellar"),re($(this)[0]),!0):!1}},elerium_prospector:{id:"interstellar-elerium_prospector",title:t("interstellar_elerium_prospector_title"),desc:`
${t("interstellar_elerium_prospector_title")}
${t("space_support",[t("interstellar_nebula_name")])}
`,reqs:{nebula:3},cost:{Money(r){return f("elerium_prospector",r,825e3,1.28,"interstellar")},Steel(r){return f("elerium_prospector",r,18e3,1.28,"interstellar")},Polymer(r){return f("elerium_prospector",r,22e3,1.28,"interstellar")},Graphene(r){return f("elerium_prospector",r,82e3,1.28,"interstellar")},Stanene(r){return f("elerium_prospector",r,57e3,1.28,"interstellar")}},effect(){let r=+T("elerium_prospector").toFixed(3);return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[r])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("elerium_prospector","interstellar"),re($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[A[e.race.species].home]):t("interstellar_neutron_desc1")}},neutron_mission:{id:"interstellar-neutron_mission",title:t("space_mission_title",[t("interstellar_neutron_name")]),desc:t("space_mission_desc",[t("interstellar_neutron_name")]),reqs:{nebula:1,high_tech:14},grant:["neutron",1],queue_complete(){return e.tech.neutron>=1?0:1},cost:{Helium_3(){return+ze(6e4).toFixed(0)},Deuterium(){return+ze(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return u($(this)[0])?(e.interstellar.neutron_miner={count:0,on:0},I(t("interstellar_neutron_mission_result"),"info",!1,["progress"]),!0):!1}},neutron_miner:{id:"interstellar-neutron_miner",title:t("interstellar_neutron_miner_title"),desc(){return`
${t("interstellar_neutron_miner_desc")}
${t("requires_power_combo",[e.resource.Helium_3.name])}
`},reqs:{neutron:1},cost:{Money(r){return f("neutron_miner",r,1e6,1.32,"interstellar")},Titanium(r){return f("neutron_miner",r,45e3,1.32,"interstellar")},Stanene(r){return f("neutron_miner",r,88e3,1.32,"interstellar")},Elerium(r){return f("neutron_miner",r,20,1.32,"interstellar")},Aerogel(r){return f("neutron_miner",r,50,1.32,"interstellar")}},effect(){let r=+T("neutron_miner").toFixed(3),a=H(500),i=+ze(3).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[a,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return _e(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return u($(this)[0])?(ne("neutron_miner","interstellar"),re($(this)[0]),!0):!1}},citadel:{id:"interstellar-citadel",title:t("interstellar_citadel_title"),desc:`
${t("interstellar_citadel_desc")}
${t("requires_power")}
`,reqs:{neutron:1,high_tech:15},cost:{Money(r){return f("citadel",r,5e6,1.25,"interstellar")},Knowledge(r){return f("citadel",r,15e5,1.15,"interstellar")},Graphene(r){return f("citadel",r,5e4,1.25,"interstellar")},Stanene(r){return f("citadel",r,1e5,1.25,"interstellar")},Elerium(r){return f("citadel",r,250,1.25,"interstellar")},Soul_Gem(r){return f("citadel",r,1,1.25,"interstellar")}},wide:!0,effect(){let r=`
${t("interstellar_citadel_stat",[+xt.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let a=+(xt/1.75).toFixed(1);if(e.race.flier||(r=r+`
${t("interstellar_citadel_effect2",[a])}
`),e.tech.ai_core>=2&&(r=r+`
${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let i=+(xt/5).toFixed(1);r=r+`
${t("interstellar_citadel_effect4",[i])}
`}}return`${r}
${t("interstellar_citadel_power",[$(this)[0].powered(),_e(2.5)])}
`},powered(){return k.citadel&&k.citadel>1?_e(30+(k.citadel-1)*2.5):_e(30)},action(){return u($(this)[0])?(ne("citadel","interstellar"),re($(this)[0]),!0):!1},flair(){return t("interstellar_citadel_flair")}},stellar_forge:{id:"interstellar-stellar_forge",title:t("interstellar_stellar_forge_title"),desc:`
${t("interstellar_stellar_forge_title")}
${t("requires_power")}
`,reqs:{star_forge:1},cost:{Money(r){return f("stellar_forge",r,12e5,1.25,"interstellar")},Iridium(r){return f("stellar_forge",r,25e4,1.25,"interstellar")},Bolognium(r){return f("stellar_forge",r,35e3,1.25,"interstellar")},Aerogel(r){return f("stellar_forge",r,75e3,1.25,"interstellar")}},effect(){let r=`
${t("city_foundry_effect1",[N(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(r+=`
${t("interstellar_stellar_forge_effect3",[2])}
`),`${r}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,action(){return u($(this)[0])?(ne("stellar_forge","interstellar"),re($(this)[0])&&(e.civic.craftsman.max+=N(2),e.tech.star_forge>=2&&(e.city.smelter.cap+=2,e.city.smelter.Star+=2,e.city.smelter.StarCap+=2,e.city.smelter.Iron+=2)),!0):!1},flair(){return t("interstellar_stellar_forge_flair")}}},int_blackhole:{info:{name:t("interstellar_blackhole_name"),desc(){let r=A[e.race.species].home;if(e.tech.blackhole>=5){let a=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(a+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ct("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_blackhole_desc4",[r,a,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[r,a,i]):t("interstellar_blackhole_desc3",[r,a])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[r]):t("interstellar_blackhole_desc1",[r])}},blackhole_mission:{id:"interstellar-blackhole_mission",title:t("space_mission_title",[t("interstellar_blackhole_name")]),desc:t("space_mission_desc",[t("interstellar_blackhole_name")]),reqs:{nebula:1},grant:["blackhole",1],queue_complete(){return e.tech.blackhole>=1?0:1},cost:{Helium_3(){return+ze(75e3).toFixed(0)},Deuterium(){return+ze(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.far_reach={count:0,on:0},I(t("interstellar_blackhole_mission_result"),"info",!1,["progress"]),!0):!1}},far_reach:{id:"interstellar-far_reach",title:t("interstellar_far_reach"),desc:`
${t("interstellar_far_reach_desc")}
${t("requires_power")}
`,reqs:{blackhole:1},cost:{Money(r){return f("far_reach",r,1e6,1.32,"interstellar")},Knowledge(r){return f("far_reach",r,1e5,1.32,"interstellar")},Neutronium(r){return f("far_reach",r,2500,1.32,"interstellar")},Elerium(r){return f("far_reach",r,100,1.32,"interstellar")},Aerogel(r){return f("far_reach",r,1e3,1.32,"interstellar")}},effect(){return`
${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("far_reach","interstellar"),re($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,ue()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(r){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||r?`
${t("interstellar_stellar_engine")}
${t("requires_segments",[100])}
`:`
${t("interstellar_stellar_engine")}
`},reqs:{blackhole:3},queue_size:10,queue_complete(){return 100-e.interstellar.stellar_engine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(a<100){let i=100-a;return`
${t("interstellar_stellar_engine_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else{let i=e.tech.gravity&&e.tech.gravity>=2?13.5:7.5,s=e.interstellar.stellar_engine?e.interstellar.stellar_engine.mass:8;e.tech.roid_eject&&(s+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12));let n=1+(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h?e.stats.achieve.escape_velocity.h*.02:0),c=dt((20+(s-8)*i+(e.interstellar.stellar_engine?e.interstellar.stellar_engine.exotic:0)*i*10).toFixed(2))*n;if(e.tech.blackhole>=5){let l=+e.interstellar.stellar_engine.exotic.toFixed(10),o=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,l]):t("interstellar_stellar_engine_effect2",[s]);return`
${t("interstellar_stellar_engine_complete",[c])}
${o}
`}else return t("interstellar_stellar_engine_complete",[c])}},action(){return u($(this)[0])&&e.interstellar.stellar_engine.count<100?(ne("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,ue()),!0):!1}},mass_ejector:{id:"interstellar-mass_ejector",title:t("interstellar_mass_ejector"),desc:`
${t("interstellar_mass_ejector")}
${t("requires_power")}
`,reqs:{blackhole:5},cost:{Money(r){return f("mass_ejector",r,75e4,1.25,"interstellar")},Adamantite(r){return f("mass_ejector",r,125e3,1.25,"interstellar")},Infernite(r){return f("mass_ejector",r,275,1.25,"interstellar")},Elerium(r){return f("mass_ejector",r,100,1.25,"interstellar")},Mythril(r){return f("mass_ejector",r,1e4,1.25,"interstellar")}},effect(){return`
${t("interstellar_mass_ejector_effect")}, ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(gr("mTabResource"),Ie("interstellar-mass_ejector"))},action(){return u($(this)[0])?(ne("mass_ejector","interstellar"),re($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,defineGovernor()),drawResourceTab("ejector"),!0):!1},flair(){return t("interstellar_mass_ejector_flair")}},jump_ship:{id:"interstellar-jump_ship",title:t("interstellar_jump_ship"),desc:t("interstellar_jump_ship_desc"),reqs:{stargate:1},grant:["stargate",2],queue_complete(){return e.tech.stargate>=2?0:1},cost:{Money(){return 2e7},Copper(){return 24e5},Aluminium(){return 4e6},Titanium(){return 125e4},Adamantite(){return 75e4},Stanene(){return 9e5},Aerogel(){return 1e5}},effect:t("interstellar_jump_ship_effect"),action(){return!!u($(this)[0])}},wormhole_mission:{id:"interstellar-wormhole_mission",title:t("space_mission_title",[t("interstellar_wormhole_name")]),desc:t("space_mission_desc",[t("interstellar_wormhole_name")]),reqs:{stargate:2},grant:["stargate",3],queue_complete(){return e.tech.stargate>=3?0:1},cost:{Helium_3(){return+ze(15e4).toFixed(0)},Deuterium(){return+ze(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return u($(this)[0])?(e.interstellar.stargate={count:0},e.galaxy.gateway_station={count:0,on:0},I(t("interstellar_wormhole_mission_result"),"info",!1,["progress"]),!0):!1}},stargate:{id:"interstellar-stargate",title:t("interstellar_stargate"),desc(r){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||r?`
${t("interstellar_stargate")}
${t("requires_segments",[200])}
`+(e.interstellar.hasOwnProperty("stargate")&&e.interstellar.stargate.count>=200?`
${t("requires_power")}
`:""):`
${t("interstellar_stargate")}
`},reqs:{stargate:3},condition(){return!(e.interstellar.stargate.count>=200)},queue_size:10,queue_complete(){return 200-e.interstellar.stargate.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(a<200){let i=200-a;return`
${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_blackhole.s_gate.effect()},action(){return u($(this)[0])&&e.interstellar.stargate.count<200?(ne("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},e.city.power>=Cr.int_blackhole.s_gate.powered()&&e.interstellar.s_gate.on++,qi(),Ie()),!0):!1}},s_gate:{id:"interstellar-s_gate",title:t("interstellar_stargate"),desc(){return`
${t("interstellar_stargate")}
${t("requires_power")}
`},reqs:{stargate:4},condition(){return e.interstellar.stargate.count>=200},wiki:!1,queue_complete(){return 0},cost:{},powered(){return _e(250)},effect(){return`
${t("interstellar_s_gate_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return!1}}},int_sirius:{info:{name(){return e.tech.ascension>=3?t("interstellar_sirius_b_name"):t("interstellar_sirius_name")},desc(){return e.tech.ascension>=3?t("interstellar_sirius_b_desc"):t("interstellar_sirius_desc",[A[e.race.species].home])}},sirius_mission:{id:"interstellar-sirius_mission",title:t("space_mission_title",[t("interstellar_sirius_name")]),desc:t("space_mission_desc",[t("interstellar_sirius_name")]),reqs:{ascension:2},grant:["ascension",3],queue_complete(){return e.tech.ascension>=3?0:1},cost:{Helium_3(){return+ze(48e4).toFixed(0)},Deuterium(){return+ze(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[tt("name"),A[e.race.species].home])},action(){return!!u($(this)[0])}},sirius_b:{id:"interstellar-sirius_b",title:t("interstellar_sirius_b"),desc:t("interstellar_sirius_b"),reqs:{ascension:3},grant:["ascension",4],queue_complete(){return e.tech.ascension>=4?0:1},cost:{Knowledge(){return 2e7}},effect(){return t("interstellar_sirius_b_effect")},action(){return u($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(r){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||r?`
${t("interstellar_space_elevator")}
${t("requires_segments",[100])}
`:`
${t("interstellar_space_elevator")}
`},reqs:{ascension:4},condition(){return!(e.interstellar.space_elevator.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.space_elevator.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(r){return(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(r){let a=`
${t("interstellar_space_elevator_effect")}
`,i=(r||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.space_elevator.count<100?(ne("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},qi(),Ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(r){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||r?`
${t("interstellar_gravity_dome")}
${t("requires_segments",[100])}
`:`
${t("interstellar_gravity_dome")}
`},reqs:{ascension:5},condition(){return!(e.interstellar.gravity_dome.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.gravity_dome.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(r){return(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(r){let a=`
${t("interstellar_gravity_dome_effect",[A[e.race.species].home])}
`,i=(r||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;a+=`
${t("space_dwarf_collider_effect2",[s])}
`}return a},action(){return u($(this)[0])&&e.interstellar.gravity_dome.count<100?(ne("gravity_dome","interstellar"),e.interstellar.gravity_dome.count>=100&&(e.tech.ascension=6,e.interstellar.ascension_machine={count:0},e.interstellar.thermal_collector={count:0},qi(),Ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(r){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||r?`
${t("interstellar_ascension_machine")}
${t("requires_segments",[100])}
`+(e.interstellar.hasOwnProperty("ascension_machine")&&e.interstellar.ascension_machine.count>=100?`
${t("requires_power")}
`:""):`
${t("interstellar_ascension_machine")}
`},reqs:{ascension:6},condition(){return!(e.interstellar.ascension_machine.count>=100)},queue_size:5,queue_complete(){return 100-e.interstellar.ascension_machine.count},cost:{Money(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(a<100){let i=100-a;return`
${t("interstellar_ascension_machine_effect",[tt("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Cr.int_sirius.ascension_trigger.effect()},action(){return u($(this)[0])&&e.interstellar.ascension_machine.count<100?(ne("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},qi(),Ie()),!0):!1}},ascension_trigger:{id:"interstellar-ascension_trigger",title:t("interstellar_ascension_machine"),desc(){return`
${t("interstellar_ascension_machine")}
${t("requires_power")}
`},wiki:!1,reqs:{ascension:7},condition(){return e.interstellar.ascension_machine.count>=100},queue_complete(){return 0},cost:{},powered(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}let a=Math.round(_e(1e4)-r*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return a<0&&(a=0),a},postPower(r){r?setTimeout(function(){e.tech.ascension=k.ascension_trigger?8:7,qi()},250):(e.tech.ascension=7,qi())},effect(){let r=Ys(),a=$(this)[0].powered(),i=a>0?`
${t("minus_power",[a])}
`:"";return`
${t("interstellar_ascension_trigger_effect")}
${r}${i}`},action(){return!1}},ascend:{id:"interstellar-ascend",title:t("interstellar_ascend"),desc:t("interstellar_ascend"),reqs:{ascension:8},queue_complete(){return 0},no_multi:!0,cost:{},effect(){let r=Ys();return`
${t("interstellar_ascend_effect")}
${r}`},action(){return u($(this)[0])?(vs(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(r){return f("thermal_collector",r,5e6,1.08,"interstellar")},Infernite(r){return f("thermal_collector",r,25e3,1.08,"interstellar")},Stanene(r){return f("thermal_collector",r,1e6,1.08,"interstellar")},Vitreloy(r){return f("thermal_collector",r,1e5,1.08,"interstellar")}},effect(){let r=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){r+=e.stats.achieve.technophobe.l>=4?25:10;for(let a=1;a=5&&(r+=5)}return t("interstellar_thermal_collector_effect",[r])},action(){return u($(this)[0])?(ne("thermal_collector","interstellar"),!0):!1}}}};function Ys(){let r=ct("ascend"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Eo(){let r=ct("terraform"),a=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[r.plasmid,a])}
${t("interstellar_ascension_trigger_effect2",[r.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[r.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var He={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:tt("name"),color:"success"}},support:"starbase"},gateway_mission:{id:"galaxy-gateway_mission",title:t("galaxy_gateway_mission"),desc:t("galaxy_gateway_mission"),reqs:{gateway:1},grant:["gateway",2],queue_complete(){return e.tech.gateway>=2?0:1},cost:{Helium_3(){return+ze(212e3).toFixed(0)},Deuterium(){return+ze(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return u($(this)[0])?(Io(),e.galaxy.defense={gxy_stargate:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gateway:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_gorddon:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien1:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_alien2:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0},gxy_chthonian:{scout_ship:0,corvette_ship:0,frigate_ship:0,cruiser_ship:0,dreadnought:0}},!0):!1}},starbase:{id:"galaxy-starbase",title:t("galaxy_starbase"),desc(){return`
${t("galaxy_starbase")}
${t("requires_power_space",[e.resource.Food.name])}
`},reqs:{gateway:2},cost:{Money(r){return f("starbase",r,42e5,1.25,"galaxy")},Elerium(r){return f("starbase",r,1e3,1.25,"galaxy")},Mythril(r){return f("starbase",r,9e4,1.25,"galaxy")},Graphene(r){return f("starbase",r,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(){let r=+ze(25).toFixed(2),a=250,i=e.tech.marines>=2?N(8):N(5);return`
${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[i])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[a,e.resource.Food.name])}
`},support(){return 2},powered(){return _e(k.s_gate?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return u($(this)[0])?(ne("starbase","galaxy"),re($(this)[0]),e.tech.gateway===2&&(e.galaxy.bolognium_ship={count:0,on:0,crew:0},e.tech.gateway=3),!0):!1}},ship_dock:{id:"galaxy-ship_dock",title:t("galaxy_ship_dock"),desc:`
${t("galaxy_ship_dock")}
${t("requires_power")}
`,reqs:{gateway:4},cost:{Money(r){return f("ship_dock",r,36e5,1.25,"galaxy")},Steel(r){return f("ship_dock",r,88e4,1.25,"galaxy")},Aluminium(r){return f("ship_dock",r,12e5,1.25,"galaxy")},Bolognium(r){return f("ship_dock",r,75e3,1.25,"galaxy")}},effect(){return e.race.fasting?`
${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered()])}
`:`
${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.race.fasting?k.gateway_station?.1*k.gateway_station:0:k.starbase?.25*k.starbase:0},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.race.fasting?[{s:e.galaxy.gateway_station.s_max-e.galaxy.gateway_station.support}]:[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},action(){return u($(this)[0])?(ne("ship_dock","galaxy"),re($(this)[0]),!0):!1}},bolognium_ship:{id:"galaxy-bolognium_ship",title:t("galaxy_bolognium_ship"),desc(){return`
${t("galaxy_bolognium_ship_desc")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{gateway:3},cost:{Money(r){return f("bolognium_ship",r,14e5,1.22,"galaxy")},Iron(r){return f("bolognium_ship",r,56e4,1.22,"galaxy")},Infernite(r){return f("bolognium_ship",r,1800,1.22,"galaxy")},Nano_Tube(r){return f("bolognium_ship",r,475e3,1.22,"galaxy")}},effect(){let r=+T("bolognium_ship").toFixed(3),a=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("gain",[r,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[a,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return 0},helium:5},powered(){return 0},action(){return u($(this)[0])?(ne("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,re($(this)[0]),!0):!1}},scout_ship:{id:"galaxy-scout_ship",title:t("galaxy_scout_ship"),desc(){return`
${t("galaxy_scout_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:1},cost:{Money(r){return f("scout_ship",r,16e5,1.25,"galaxy")},Titanium(r){return f("scout_ship",r,325e3,1.25,"galaxy")},Graphene(r){return f("scout_ship",r,118e3,1.25,"galaxy")},Soul_Gem(r){return f("scout_ship",r,1,1.02,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=e.tech.science>=17?`
${t("galaxy_scout_ship_effect2",[25])}
`:"";return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:6,rating(){return e.race.banana?7:10}},powered(){return 0},action(){return u($(this)[0])?(ne("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,re($(this)[0]),!0):!1}},corvette_ship:{id:"galaxy-corvette_ship",title:t("galaxy_corvette_ship"),desc(){return`
${t("galaxy_corvette_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:2},cost:{Money(r){return f("corvette_ship",r,45e5,1.25,"galaxy")},Steel(r){return f("corvette_ship",r,175e4,1.25,"galaxy")},Infernite(r){return f("corvette_ship",r,16e3,1.25,"galaxy")},Bolognium(r){return f("corvette_ship",r,35e3,1.25,"galaxy")},Soul_Gem(r){return f("corvette_ship",r,1,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-1},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},helium:10,rating(){return e.race.banana?21:30}},powered(){return 0},action(){return u($(this)[0])?(ne("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,re($(this)[0]),!0):!1}},frigate_ship:{id:"galaxy-frigate_ship",title:t("galaxy_frigate_ship"),desc(){return`
${t("galaxy_frigate_ship")}
${t("galaxy_starbase_support",[t("resource_Helium_3_name")])}
`},reqs:{andromeda:3},cost:{Money(r){return f("frigate_ship",r,18e6,1.25,"galaxy")},Elerium(r){return f("frigate_ship",r,1250,1.25,"galaxy")},Mythril(r){return f("frigate_ship",r,35e4,1.25,"galaxy")},Sheet_Metal(r){return f("frigate_ship",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("frigate_ship",r,2,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},s_type:"gateway",support(){return-2},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},helium:25,rating(){return e.race.banana?56:80}},powered(){return 0},action(){return u($(this)[0])?(ne("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,re($(this)[0]),!0):!1},flair:t("tech_frigate_ship_flair")},cruiser_ship:{id:"galaxy-cruiser_ship",title:t("galaxy_cruiser_ship"),desc(){return`
${t("galaxy_cruiser_ship")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:4},cost:{Money(r){return f("cruiser_ship",r,75e6,1.25,"galaxy")},Copper(r){return f("cruiser_ship",r,6e6,1.25,"galaxy")},Adamantite(r){return f("cruiser_ship",r,1e6,1.25,"galaxy")},Vitreloy(r){return f("cruiser_ship",r,75e4,1.25,"galaxy")},Elerium(r){return f("cruiser_ship",r,1800,1.25,"galaxy")},Soul_Gem(r){return f("cruiser_ship",r,5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-3},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*6:6},mil(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},deuterium:25,rating(){return e.race.banana?175:250}},powered(){return 0},action(){return u($(this)[0])?(ne("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,re($(this)[0]),!0):!1}},dreadnought:{id:"galaxy-dreadnought",title:t("galaxy_dreadnought"),desc(){return`
${t("galaxy_dreadnought")}
${t("galaxy_starbase_support",[t("resource_Deuterium_name")])}
`},reqs:{andromeda:5},cost:{Money(r){return f("dreadnought",r,225e6,1.25,"galaxy")},Neutronium(r){return f("dreadnought",r,25e4,1.25,"galaxy")},Bolognium(r){return f("dreadnought",r,15e5,1.25,"galaxy")},Vitreloy(r){return f("dreadnought",r,1e6,1.25,"galaxy")},Infernite(r){return f("dreadnought",r,4e5,1.25,"galaxy")},Aerogel(r){return f("dreadnought",r,8e5,1.25,"galaxy")},Soul_Gem(r){return f("dreadnought",r,25,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.deuterium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("galaxy_gateway_used_support",[-$(this)[0].support()])}
${t("spend",[r,e.resource.Deuterium.name])}
`},s_type:"gateway",support(){return-5},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*10:10},mil(){return e.race.high_pop?b.high_pop.vars()[0]*20:20},deuterium:80,rating(){return e.race.banana?1260:1800}},powered(){return 0},action(){return u($(this)[0])?(ne("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,re($(this)[0]),!0):!1}}},gxy_stargate:{info:{name:t("galaxy_stargate"),desc(){return e.tech.piracy?t("galaxy_stargate_desc_alt"):t("galaxy_stargate_desc")},control(){return{name:tt("name"),color:"success"}}},gateway_station:{id:"galaxy-gateway_station",title:t("galaxy_gateway_station"),desc(){return`
${t("galaxy_gateway_station_desc")}
${t("requires_power")}
`},reqs:{stargate:4},cost:{Money(r){return f("gateway_station",r,5e6,1.25,"galaxy")},Aluminium(r){return f("gateway_station",r,52e4,1.25,"galaxy")},Polymer(r){return f("gateway_station",r,35e4,1.25,"galaxy")},Neutronium(r){return f("gateway_station",r,17500,1.25,"galaxy")}},effect(){let r=H(2e3),a=H(4500),i=H(50),s="";return e.tech.gateway&&e.tech.gateway>=2&&(s=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${s}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[a,t("resource_Deuterium_name")])}
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return .5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return u($(this)[0])?(ne("gateway_station","galaxy"),e.resource.Helium_3.max+=H(2e3),e.resource.Deuterium.max+=H(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),re($(this)[0]),!0):!1}},telemetry_beacon:{id:"galaxy-telemetry_beacon",title:t("galaxy_telemetry_beacon"),desc(){return`
${t("galaxy_telemetry_beacon")}
${t("requires_power")}
`},reqs:{stargate:5},cost:{Money(r){return f("telemetry_beacon",r,225e4,1.25,"galaxy")},Copper(r){return f("telemetry_beacon",r,685e3,1.25,"galaxy")},Alloy(r){return f("telemetry_beacon",r,425e3,1.25,"galaxy")},Iridium(r){return f("telemetry_beacon",r,177e3,1.25,"galaxy")}},effect(){let r=e.tech.telemetry?1200:800;e.tech.science>=17&&(r+=we.scout_ship*25);let a=k.telemetry_beacon?r*k.telemetry_beacon:0,i="";return e.tech.gateway&&e.tech.gateway>=2&&(i=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${i}
${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return e.tech.telemetry?.75:.5},powered(){return _e(k.s_gate?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(r){let a=r?k.telemetry_beacon+fe():k.telemetry_beacon-fe();a>e.galaxy.telemetry_beacon.count?a=e.galaxy.telemetry_beacon.count:a<0&&(a=0),k.telemetry_beacon=a,Ci($(this)[0],"galaxy","telemetry_beacon")},action(){return u($(this)[0])?(ne("telemetry_beacon","galaxy"),re($(this)[0])&&(e.resource.Knowledge.max+=1750),e.tech.gateway||(e.galaxy.starbase={count:0,on:0,support:0,s_max:0},e.settings.space.gateway=!0,e.tech.gateway=1,ac()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`
${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(r){return f("gateway_depot",r,4e6,1.25,"galaxy")},Neutronium(r){return f("gateway_depot",r,8e4,1.25,"galaxy")},Stanene(r){return f("gateway_depot",r,5e5,1.25,"galaxy")},Vitreloy(r){return f("gateway_depot",r,2500,1.25,"galaxy")}},wide:!0,effect(){let r=e.tech.world_control?150:100,a=H(200),i=Xs(),s=Ee(+H(3e3*i).toFixed(0),1),n=Ee(+H(25e4*i).toFixed(0),1),c=Ee(+H(9001*i).toFixed(0),1),l=Ee(+H(6660*i).toFixed(0),1),o='
';return o=o+`${t("plus_max_crates",[r])}${t("plus_max_containers",[r])}`,o=o+`${t("plus_max_resource",[s,e.resource.Uranium.name])}`,o=o+`${t("plus_max_resource",[n,e.resource.Nano_Tube.name])}`,o=o+`${t("plus_max_resource",[c,e.resource.Neutronium.name])}`,o=o+`${t("plus_max_resource",[l,e.resource.Infernite.name])}`,o=o+"
",`${o}
${t("galaxy_gateway_depot_effect",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?10:0)},action(){if(u($(this)[0])){ne("gateway_depot","galaxy");let r=e.tech.world_control?150:100;e.resource.Crates.max+=r,e.resource.Containers.max+=r,e.resource.Containers.display||Yr();let a=Xs();return e.resource.Uranium.max+=H(3e3*a),e.resource.Nano_Tube.max+=H(25e4*a),e.resource.Neutronium.max+=H(9001*a),e.resource.Infernite.max+=H(6660*a),re($(this)[0]),!0}return!1}},defense_platform:{id:"galaxy-defense_platform",title:t("galaxy_defense_platform"),desc(){return`
${t("galaxy_defense_platform")}
${t("requires_power")}
`},reqs:{stargate:6},cost:{Money(r){return f("defense_platform",r,75e4,1.25,"galaxy")},Adamantite(r){return f("defense_platform",r,425e3,1.25,"galaxy")},Elerium(r){return f("defense_platform",r,800,1.25,"galaxy")},Vitreloy(r){return f("defense_platform",r,1250,1.25,"galaxy")},Wrought_Iron(r){return f("defense_platform",r,75e3,1.25,"galaxy")}},effect(){return`
${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?5:0)},postPower(r){D({el:"#gxy_stargate"},"update")},action(){return u($(this)[0])?(ne("defense_platform","galaxy"),re($(this)[0]),!0):!1},post(){D({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:A[e.galaxy.alien1.id].name,color:"advanced"}}},gorddon_mission:{id:"galaxy-gorddon_mission",title:t("galaxy_gorddon_mission"),desc:t("galaxy_gorddon_mission_desc"),reqs:{xeno:2},grant:["xeno",3],queue_complete(){return e.tech.xeno>=3?0:1},cost:{Structs(){return{galaxy:{scout_ship:{s:"gxy_gateway",count:2,on:2},corvette_ship:{s:"gxy_gateway",count:1,on:1}}}},Helium_3(){return+ze(23e4).toFixed(0)},Deuterium(){return+ze(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(u($(this)[0])){Io(),e.galaxy.defense.gxy_gateway.scout_ship-=2,e.galaxy.defense.gxy_gorddon.scout_ship+=2,e.galaxy.defense.gxy_gateway.corvette_ship--,e.galaxy.defense.gxy_gorddon.corvette_ship++;let r=A[e.galaxy.alien1.id].name,a=A[e.galaxy.alien1.id].entity,i=A[e.galaxy.alien2.id].name,s=A[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[a,r,s,i]),"info",!1,["progress"]),!0}return!1}},embassy:{id:"galaxy-embassy",title:t("galaxy_embassy"),desc(){return`
${t("galaxy_embassy")}
${t("requires_power_combo",[e.resource.Food.name])}
`},reqs:{xeno:4},queue_complete(){return 1-e.galaxy.embassy.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(){let r=7500,a="";e.tech.xeno>=11&&(a=`
${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let i="";return e.race.fasting||(i=`
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`
${t("galaxy_embassy_effect",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}${i}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(k.s_gate?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&u($(this)[0])){if(ne("embassy","galaxy"),re($(this)[0]),e.tech.xeno===4&&(e.tech.xeno=5,e.galaxy.freighter={count:0,on:0,crew:0},e.galaxy.trade={max:0,cur:0,f0:0,f1:0,f2:0,f3:0,f4:0,f5:0,f6:0,f7:0,f8:0},I(t("galaxy_embassy_complete",[A[e.galaxy.alien1.id].name,A[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let r=ot();e.stats.endless_hunger.b1[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let r=20;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`
${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("dormitory",r,1e7,1.25,"galaxy")},Furs(r){return f("dormitory",r,7e5,1.25,"galaxy")},Cement(r){return f("dormitory",r,12e5,1.25,"galaxy")},Plywood(r){return f("dormitory",r,85e3,1.25,"galaxy")},Horseshoe(){return e.race.hooved?3:0}},effect(){return`
${t("requires_res",[t("galaxy_embassy")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(3)},action(){return u($(this)[0])?(ne("dormitory","galaxy"),re($(this)[0]),!0):!1},citizens(){let r=3;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`
${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(r){return f("symposium",r,8e6,1.25,"galaxy")},Food(r){return e.race.ravenous?0:f("symposium",r,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(r){return f("symposium",r,46e4,1.25,"galaxy")},Brick(r){return f("symposium",r,261600,1.25,"galaxy")}},effect(){let r="";return e.tech.xeno>=7&&(r=`
${t("galaxy_symposium_effect3",[+xe(300).toFixed(2)])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(4)},action(){return u($(this)[0])?(ne("symposium","galaxy"),re($(this)[0]),!0):!1}},freighter:{id:"galaxy-freighter",title:t("galaxy_freighter"),desc(){return`
${t("galaxy_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:5},cost:{Money(r){return f("freighter",r,6e6,1.2,"galaxy")},Uranium(r){return f("freighter",r,1e4,1.2,"galaxy")},Adamantite(r){return f("freighter",r,46e4,1.2,"galaxy")},Stanene(r){return f("freighter",r,261600,1.2,"galaxy")},Bolognium(r){return f("freighter",r,66e3,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`
${t("interstellar_exchange_boost",[3])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0},helium:12},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},reqs:{xeno:8},queue_complete(){return 1-e.galaxy.consulate.count},cost:{Money(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(r){return(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(r){return e.race.hooved&&(r||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?10:0}},effect(){return t("plus_max_citizens",[$(this)[0].citizens()])},refresh:!0,action(){return u($(this)[0])&&e.galaxy.consulate.count<1?(ne("consulate","galaxy"),e.galaxy.resort={count:0,on:0},e.galaxy.super_freighter={count:0,on:0,crew:0},e.tech.xeno=9,!0):!1},citizens(){let r=10;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`
${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(r){return f("resort",r,33e6,1.25,"galaxy")},Stone(r){return f("resort",r,25e6,1.25,"galaxy")},Furs(r){return f("resort",r,1e7,1.25,"galaxy")},Oil(r){return f("resort",r,ze(125e3),1.25,"galaxy")}},effect(){let r=H(e.tech.world_control?1875e3:15e5),a=e.race.joyless?"":`
${t("city_max_entertainer",[N(2)])}
`;return`
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
${a}
${t("space_red_vr_center_effect2",[2])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(5)},action(){return u($(this)[0])?(ne("resort","galaxy"),re($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=N(2),e.civic.entertainer.display=!0)),!0):!1}},vitreloy_plant:{id:"galaxy-vitreloy_plant",title:t("galaxy_vitreloy_plant"),desc(){return`
${t("galaxy_vitreloy_plant")}
${t("galaxy_vitreloy_plant_desc")}
`},reqs:{xeno:10},cost:{Money(r){return f("vitreloy_plant",r,35e6,1.25,"galaxy")},Cement(r){return f("vitreloy_plant",r,18e5,1.25,"galaxy")},Neutronium(r){return f("vitreloy_plant",r,25e4,1.25,"galaxy")},Iridium(r){return f("vitreloy_plant",r,85e4,1.25,"galaxy")},Aerogel(r){return f("vitreloy_plant",r,4e5,1.25,"galaxy")}},effect(){let r=+T("vitreloy_plant").toFixed(2),a=2.5,i=100,s=5e4;return`
${t("galaxy_vitreloy_plant_effect",[r])}
${t("galaxy_vitreloy_plant_effect2",[a,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return _e(10)},action(){return u($(this)[0])?(ne("vitreloy_plant","galaxy"),re($(this)[0]),!0):!1}},super_freighter:{id:"galaxy-super_freighter",title:t("galaxy_super_freighter"),desc(){return`
${t("galaxy_super_freighter")}
${t("galaxy_crew_fuel",[t("resource_Helium_3_name")])}
`},reqs:{xeno:9},cost:{Money(r){return f("super_freighter",r,28e6,1.2,"galaxy")},Aluminium(r){return f("super_freighter",r,35e5,1.2,"galaxy")},Alloy(r){return f("super_freighter",r,1e6,1.2,"galaxy")},Graphene(r){return f("super_freighter",r,75e4,1.2,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a="";return e.tech.banking>=13&&(a=`
${t("interstellar_exchange_boost",[8])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,A[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${a}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*5:5},mil(){return 0},helium:25},special:!0,powered(){return 0},action(){return u($(this)[0])?(ne("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},reqs:{andromeda:4},grant:["conflict",1],queue_complete(){return e.tech.conflict>=1?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")){let r=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),{label:t("galaxy_fleet_rating",[`400`]),met:!(r<400)}}return{label:t("galaxy_fleet_rating",['400']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let a=r>=650?`${t("galaxy_piracy_low")}`:`${t("galaxy_piracy_avg")}`;return`
${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_alien2[a]}),r>=400){if(I(t("galaxy_alien2_mission_result2",[A[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),r<650){let a=80;e.race.instinct&&(a/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_foothold")}
${t("requires_power_combo",[e.resource.Elerium.name])}
`},reqs:{conflict:1},cost:{Money(r){return f("foothold",r,25e6,1.25,"galaxy")},Titanium(r){return f("foothold",r,3e6,1.25,"galaxy")},Polymer(r){return f("foothold",r,175e4,1.25,"galaxy")},Iridium(r){return f("foothold",r,9e5,1.25,"galaxy")},Bolognium(r){return f("foothold",r,5e4,1.25,"galaxy")}},effect(){let r=2.5;return`
${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered()])}
`},support(){return 4},powered(){return _e(k.s_gate?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return u($(this)[0])?(ne("foothold","galaxy"),re($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,ac(),ue()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`
${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(r){return f("armed_miner",r,5e6,1.25,"galaxy")},Steel(r){return f("armed_miner",r,18e5,1.25,"galaxy")},Stanene(r){return f("armed_miner",r,1975e3,1.25,"galaxy")},Vitreloy(r){return f("armed_miner",r,2e4,1.25,"galaxy")},Soul_Gem(r){return f("armed_miner",r,1,1.25,"galaxy")}},effect(){let r=.032,a=.23,i=.65,s=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Bolognium_name")])}
${t("gain",[a,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[s,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:10,rating(){return e.race.banana?4:5}},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("armed_miner","galaxy"),re($(this)[0]),!0):!1}},ore_processor:{id:"galaxy-ore_processor",title:t("galaxy_ore_processor"),desc(){return`
${t("galaxy_ore_processor")}
`},reqs:{conflict:3},cost:{Money(r){return f("ore_processor",r,3e6,1.25,"galaxy")},Iron(r){return f("ore_processor",r,5e6,1.25,"galaxy")},Coal(r){return f("ore_processor",r,375e4,1.25,"galaxy")},Graphene(r){return f("ore_processor",r,225e4,1.25,"galaxy")}},effect(){return`
${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("ore_processor","galaxy"),re($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(r){return f("scavenger",r,75e5,1.25,"galaxy")},Alloy(r){return f("scavenger",r,125e4,1.25,"galaxy")},Aluminium(r){return f("scavenger",r,68e5,1.25,"galaxy")},Neutronium(r){return f("scavenger",r,75e3,1.25,"galaxy")},Elerium(r){return f("scavenger",r,750,1.25,"galaxy")}},effect(){let r=kt("gxy_alien2"),a=Math.round(r*25e3),i=+ze($(this)[0].ship.helium).toFixed(2),s=e.race.cataclysm?`
${t("galaxy_scavenger_effect2_cata",[+(r*100*.75).toFixed(1)])}
`:`
${t("galaxy_scavenger_effect2",[+(r*100/4).toFixed(1)])}
`;return`
${t("galaxy_scavenger_effect",[a])}
${s}
${t("galaxy_alien2_support",[$(this)[0].support(),A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[i,e.resource.Helium_3.name])}
`},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},mil(){return 0},helium:12},s_type:"alien2",support(){return-1},powered(){return 0},action(){return u($(this)[0])?(ne("scavenger","galaxy"),re($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[A[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:A[e.galaxy.alien2.id].name,color:"danger"}}},chthonian_mission:{id:"galaxy-chthonian_mission",title(){return t("galaxy_alien2_mission",[t("galaxy_chthonian")])},desc(){return t("galaxy_alien2_mission_desc",[t("galaxy_chthonian")])},reqs:{chthonian:1},grant:["chthonian",2],queue_complete(){return e.tech.chthonian>=2?0:1},cost:{Custom(){if(e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")){let r=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),{label:t("galaxy_fleet_rating",[`1250`]),met:!(r<1250)}}return{label:t("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let r=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){r+=He.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let a=r>=4500?`${t("galaxy_piracy_low")}`:r>=2500?`${t("galaxy_piracy_avg")}`:`${t("galaxy_piracy_high")}`;return`
${t("galaxy_alien2_mission_effect2",[r])}
${t("galaxy_alien2_mission_effect3",[a])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(u($(this)[0])){let r=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(a){r+=He.gxy_gateway[a].ship.rating()*e.galaxy.defense.gxy_chthonian[a]}),r>=1250){let a=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),r>=2500&&(a=r>=4500?80:160),e.race.instinct&&(a/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(a-=He.gxy_gateway[s].ship.rating(),i.push(s))}),I(t("galaxy_chthonian_mission_result_losses",[i.map(s=>t(`galaxy_${s}`)).join(", ")]),"danger",!1,["progress"]);for(let s=0;s${t("galaxy_minelayer")}`},reqs:{chthonian:2},cost:{Money(r){return f("minelayer",r,9e6,1.25,"galaxy")},Iron(r){return f("minelayer",r,48e5,1.25,"galaxy")},Nano_Tube(r){return f("minelayer",r,125e4,1.25,"galaxy")},Nanoweave(r){return f("minelayer",r,1e5,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2);return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_defense_platform_effect",[$(this)[0].ship.rating()])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*1:1},helium:8,rating(){return e.race.banana?35:50}},powered(){return 0},action(){return u($(this)[0])?(ne("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`
${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(r){return f("excavator",r,12e6,1.25,"galaxy")},Polymer(r){return f("excavator",r,44e5,1.25,"galaxy")},Iridium(r){return f("excavator",r,36e5,1.25,"galaxy")},Mythril(r){return f("excavator",r,18e4,1.25,"galaxy")}},effect(){let r=+T("excavator").toFixed(3);return`
${t("gain",[r,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return _e(8)},powerBalancer(){return[{r:"Orichalcum",p:T("excavator")}]},action(){return u($(this)[0])?(ne("excavator","galaxy"),re($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`
${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(r){return f("raider",r,12e6,1.25,"galaxy")},Titanium(r){return f("raider",r,125e4,1.25,"galaxy")},Bolognium(r){return f("raider",r,6e5,1.25,"galaxy")},Vitreloy(r){return f("raider",r,125e3,1.25,"galaxy")},Stanene(r){return f("raider",r,825e3,1.25,"galaxy")}},effect(){let r=+ze($(this)[0].ship.helium).toFixed(2),a=kt("gxy_chthonian"),i=.65,s=.05,n=2.3,c=.8;return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[i,t("resource_Deuterium_name")])}
${t("gain",[s,t("resource_Vitreloy_name")])}
${t("gain",[n,t("resource_Polymer_name")])}
${t("gain",[c,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[r,e.resource.Helium_3.name])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2},helium:18,rating(){return e.race.banana?9:12}},powered(){return 0},action(){return u($(this)[0])?(ne("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){D({el:"#gxy_chthonian"},"update")},post(){D({el:"#gxy_chthonian"},"update")}}}};function ba(r){let a="space";return r.substr(0,4)==="int_"?a="interstellar":r.substr(0,5)==="prtl_"?a="portal":r.substr(0,4)==="gxy_"?a="galaxy":r.substr(0,4)==="tau_"&&(a="tauceti"),a}function kt(r,a,i){if(e.tech.piracy&&!e.race.truepath){let s=0,n=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let o=0;oc?c:s;return((1-(c-o)/c)*l+(1-l))*(a?1:kt("gxy_stargate"))}else{let o=s>c?c:s;return(1-(c-o)/c)*l+(1-l)}}else return 1}function Io(){let r=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&r.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||r.push("custom");let a=Object.keys(A).filter(function(n){return!["demonic","eldritch"].includes(A[n].type)&&!r.includes(n)}),i=xs(a);e.galaxy.alien1={id:a[i]},r.push(a[i]),a=Object.keys(A).filter(function(n){return!["angelic"].includes(A[n].type)&&!r.includes(n)});let s=xs(a);e.galaxy.alien2={id:a[s]}}function Xs(){let r=1;return e.race.pack_rat&&(r*=1.05),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?2:1,r}var xu={satellite:{count:0},propellant_depot:{count:0},gps:{count:0},nav_beacon:{count:0,on:0},moon_base:{count:0,on:0,support:0,s_max:0},iridium_mine:{count:0,on:0},helium_mine:{count:0,on:0},observatory:{count:0,on:0},spaceport:{count:0,on:0,support:0,s_max:0},red_tower:{count:0,on:0},living_quarters:{count:0,on:0},vr_center:{count:0,on:0},garage:{count:0},red_mine:{count:0,on:0},fabrication:{count:0,on:0},red_factory:{count:0,on:0},exotic_lab:{count:0,on:0},ziggurat:{count:0},space_barracks:{count:0,on:0},biodome:{count:0,on:0},laboratory:{count:0,on:0},geothermal:{count:0,on:0},swarm_plant:{count:0},swarm_control:{count:0,support:0,s_max:0},swarm_satellite:{count:0},gas_mining:{count:0,on:0},gas_storage:{count:0},star_dock:{count:0,ship:0,probe:0,template:"human"},outpost:{count:0,on:0},drone:{count:0},oil_extractor:{count:0,on:0},space_station:{count:0,on:0,support:0,s_max:0},iridium_ship:{count:0,on:0},elerium_ship:{count:0,on:0},elerium_prospector:{count:0,on:0},iron_ship:{count:0,on:0},elerium_contain:{count:0,on:0},e_reactor:{count:0,on:0},world_collider:{count:0},world_controller:{count:0,on:0},starport:{count:0,on:0,support:0,s_max:0},mining_droid:{count:0,on:0,adam:0,uran:0,coal:0,alum:0},processing:{count:0,on:0},habitat:{count:0,on:0},fusion:{count:0,on:0},exchange:{count:0,on:0},warehouse:{count:0},xfer_station:{count:0,on:0},cargo_yard:{count:0},cruiser:{count:0,on:0},dyson:{count:0},nexus:{count:0,on:0,support:0,s_max:0},harvester:{count:0,on:0},far_reach:{count:0,on:0},stellar_engine:{count:0,mass:8,exotic:0},mass_ejector:{count:0,on:0,total:0,mass:0,Food:0,Lumber:0,Chrysotile:0,Stone:0,Crystal:0,Furs:0,Copper:0,Iron:0,Aluminium:0,Cement:0,Coal:0,Oil:0,Uranium:0,Steel:0,Titanium:0,Alloy:0,Polymer:0,Iridium:0,Helium_3:0,Deuterium:0,Neutronium:0,Adamantite:0,Infernite:0,Elerium:0,Nano_Tube:0,Graphene:0,Stanene:0,Bolognium:0,Vitreloy:0,Orichalcum:0,Plywood:0,Brick:0,Wrought_Iron:0,Sheet_Metal:0,Mythril:0,Aerogel:0,Nanoweave:0,Scarletite:0},stargate:{count:0},gateway_station:{count:0,on:0},s_gate:{count:0,on:0},starbase:{count:0,on:0,support:0,s_max:0},bolognium_ship:{count:0,on:0,crew:0},scout_ship:{count:0,on:0,crew:0,mil:0},corvette_ship:{count:0,on:0,crew:0,mil:0},frigate_ship:{count:0,on:0,crew:0,mil:0},cruiser_ship:{count:0,on:0,crew:0,mil:0},dreadnought:{count:0,on:0,crew:0,mil:0},foothold:{count:0,on:0,support:0,s_max:0},turret:{count:0,on:0},carport:{count:0,damaged:0,repair:0},war_droid:{count:0,on:0},repair_droid:{count:0,on:0},war_drones:{count:0,on:0},sensor_drone:{count:0,on:0},attractor:{count:0,on:0}};function ne(r,a){a||(a="space"),e[a][r]||(e[a][r]=xu[r]),e[a][r].count++}function Hi(r,a){return r&&a?Yt[r][a]:Yt}function Ko(){return Cr}function No(){return He}function sc(r,a,i){switch(r){case"space":return Dr(Yt,a,i);case"interstellar":return Dr(Cr,a,i);case"galaxy":return Dr(He,a,i)}}function Dr(r,a,i){let s=e.race.truepath?"truepath":"standard";if(r[a][i].hasOwnProperty("path")&&!r[a][i].path.includes(s))return!1;var n=!0;return Object.keys(r[a][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=r[a][i].grant[1]&&(n=!1),n}function Pt(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Lo("inner"),e.race.truepath&&Lo("outer"),qi(),ac())}function Lo(r){if(r||(r=e.settings.spaceTabs===5?"outer":"inner"),!e.settings.tabLoad&&(e.settings.civTabs!==1||![1,5].includes(e.settings.spaceTabs)||e.settings.civTabs===1&&e.settings.spaceTabs===1&&r!=="inner"||e.settings.spaceTabs===5&&r!=="outer"))return;let a=r==="inner"?$("#space"):$("#outerSol");if(le(a),a.append($(`

${t(r==="inner"?"tab_space":"tab_outer_space")}

`)),!e.settings.showSpace)return!1;let i=[];Object.keys(Yt).forEach(function(s){e.race.orbit_decayed||e.race.cataclysm?s!=="spc_home"&&(i.push(s),(e.race.orbit_decayed&&s==="spc_red"||e.race.cataclysm&&s==="spc_moon")&&i.push("spc_home")):i.push(s)}),i.forEach(function(s){let n=s.replace("spc_","");if(e.settings.space[`${n}`]){if(e.race.truepath&&Yt[s].info.zone!==r)return;let c=typeof Yt[s].info.name=="string"?Yt[s].info.name:Yt[s].info.name(),l=!!(e.race.orbit_decayed||e.race.cataclysm);if(l&&s!=="spc_home"||!l){if(Yt[s].info.support){let o=Yt[s].info.support;e.space[o].hasOwnProperty("support")||(e.space[o].support=0,e.space[o].s_max=0),a.append(`

${c}

{{ support }}/{{ s_max }}
`),D({el:`#sr${s}`,data:e.space[o]})}else a.append(`

${c}

`);e.race.truepath&&Yt[s].info.hasOwnProperty("syndicate")&&Yt[s].info.syndicate()&&e.tech.syndicate&&($(`#${s}`).append(`
`),$(`#${s}synd`).append(`${t("space_syndicate")} `),$(`#${s}synd`).append(`${t("space_scan_effectiveness")} `),$(`#${s}synd`).append(`${t("space_overkill")} `),D({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);if(d.s>=10)return d.s>=50?d.r:Math.round(d.r*d.s*.02)}return"???"},scan(o){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((yt(o,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(o){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let d=yt(o,!0);return d.s>=100?d.o:0}return 0}}}),Yt[s].info.hasOwnProperty("extra")&&Yt[s].info.extra(s))}pe(s,function(){return typeof Yt[s].info.desc=="string"?Yt[s].info.desc:Yt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Yt[s]).forEach(function(o){if(o!=="info"&&Dr(Yt,s,o)){let d=Yt[s][o];Br(d,r==="inner"?"space":"outerSol",o)}})}})}function qi(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let r=$("#interstellar");if(le(r),r.append($(`

${t("tab_interstellar")}

`)),!e.settings.showDeep)return!1;Object.keys(Cr).forEach(function(a){let i=a.replace("int_","");if(e.settings.space[`${i}`]){let s=typeof Cr[a].info.name=="string"?Cr[a].info.name:Cr[a].info.name();if(Cr[a].info.support){let n=Cr[a].info.support;e.interstellar[n].hasOwnProperty("support")||(e.interstellar[n].support=0,e.interstellar[n].s_max=0),r.append(`

${s}

{{ support }}/{{ s_max }}
`),D({el:`#sr${a}`,data:e.interstellar[n]})}else r.append(`

${s}

`);pe(a,function(){return typeof Cr[a].info.desc=="string"?Cr[a].info.desc:Cr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(Cr[a]).forEach(function(n){if(n!=="info"&&Dr(Cr,a,n)){let c=Cr[a][n];Br(c,"interstellar",n)}})}})}function ac(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==3))return;let r=$("#galaxy");if(le(r),r.append($(`

${t("tab_galactic")}

`)),!e.settings.showGalactic)return!1;ku(r,"fleet"),Object.keys(He).forEach(function(a){let i=a.replace("gxy_","");if(e.galaxy.defense&&!e.galaxy.defense.hasOwnProperty(a)&&(e.galaxy.defense[a]={}),e.settings.space[`${i}`]){let s=typeof He[a].info.name=="string"?He[a].info.name:He[a].info.name(),n=$(`
`);r.append(n);let c=$(`

${s}

`);n.append(c),e.tech.xeno&&e.tech.xeno>=3&&n.append(`{{ r.control().name }}`);let l={el:`#${a}`,data:{r:He[a].info},methods:{threat(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;return h=h<1?Math.ceil(h):Math.round(h),h===0?"has-text-success":h<=20?"has-text-advanced":h<=40?"has-text-info":h<=60?"has-text-warning":h<=80?"has-text-caution":"has-text-danger"}return"has-text-danger"}},filters:{pirate(o){let d=e.race.infiltrator?1:2;if(e.galaxy.defense[o].scout_ship>=d){let h=(1-kt(o,!0))*100;h=h<1?Math.ceil(h):Math.round(h);let _=e.race.infiltrator?3:4;return e.galaxy.defense[o].scout_ship>=_?`${h}%`:h===0?t("galaxy_piracy_none"):h<=20?t("galaxy_piracy_vlow"):h<=40?t("galaxy_piracy_low"):h<=60?t("galaxy_piracy_avg"):h<=80?t("galaxy_piracy_high"):t("galaxy_piracy_vhigh")}return"???"},defense(o){return kt(o,!0,!0)}}};if(He[a].info.support){let o=He[a].info.support;e.galaxy[o]&&(e.galaxy[o].hasOwnProperty("support")||(e.galaxy[o].support=0,e.galaxy[o].s_max=0),n.append('{{ s.support }}/{{ s.s_max%1 ? s.s_max.toFixed(2) : s.s_max }}'),l.data.s=e.galaxy[o])}e.tech.piracy&&n.append(`
${t("galaxy_piracy_threat",[A[e.galaxy.alien2.id].name])}{{ '${a}' | pirate }}|${t("galaxy_armada")}: {{ '${a}' | defense }}
`),D(l),pe(a,function(){return typeof He[a].info.desc=="string"?He[a].info.desc:He[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),pe(a,function(){return t("galaxy_control",[He[a].info.control().name,s])},{elm:`#${a} .regionControl`,classes:"has-background-light has-text-dark"}),Object.keys(He[a]).forEach(function(o){if(o!=="info"&&Dr(He,a,o)){let d=He[a][o];Br(d,"galaxy",o)}})}})}function ku(r,a){if(e.tech.piracy&&!e.race.truepath){let i=$(`

${t("galaxy_armada")}

`);r.append(i);let s=e.tech.world_control?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");i.append($("|")),i.append($(`${s} {{ g.workers | stationed }} / {{ g.max | s_max }}`)),i.append($("|")),i.append($(`${t("job_crew_mil")} {{ g.crew }}`)),i.append($("|")),i.append($(`${t("job_crew_civ")} {{ c.workers }} / {{ c.max }}`)),D({el:`#h${a}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(o){return We()},s_max(o){return We(!0)}}}),["soldier","crew1","crew2"].forEach(function(o){pe(`h${a}${o}`,function(){switch(o){case"soldier":return Tn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${a} span.${o}`})});let n=$(`
`);r.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],l=[];for(let o=0;o<6;o++){let d=$('
');l.push(d),n.append(d)}for(let o=0;o${He.gxy_gateway[c[o]].title}`);l[o+1].append(d)}l[0].append($("")),l[0].append($(`${He.gxy_gateway.info.name}`));for(let o=0;o{{ gateway.${c[o]} }}`);l[o+1].append(d)}Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);if(e.settings.space[d]&&d!=="gateway"){let h=$(`${typeof He[o].info.name=="string"?He[o].info.name:He[o].info.name()}`);l[0].append(h);for(let _=0;_'),w=$(`«`),M=$(`{{ ${d}.${c[_]} }}`),F=$(`»`);l[_+1].append(m),m.append(w),m.append(M),m.append(F)}}}),D({el:`#${a}`,data:{stargate:e.galaxy.defense.gxy_stargate,gateway:e.galaxy.defense.gxy_gateway,gorddon:e.galaxy.defense.gxy_gorddon,alien1:e.galaxy.defense.gxy_alien1,alien2:e.galaxy.defense.gxy_alien2,chthonian:e.galaxy.defense.gxy_chthonian,t:e.tech},methods:{sub(o,d){if(e.galaxy.defense[o][d]>0){let h=fe();h>e.galaxy.defense[o][d]&&(h=e.galaxy.defense[o][d]),e.galaxy.defense.gxy_gateway[d]+=h,e.galaxy.defense[o][d]-=h}},add(o,d){if(e.galaxy.defense.gxy_gateway[d]>0){let h=fe();h>e.galaxy.defense.gxy_gateway[d]&&(h=e.galaxy.defense.gxy_gateway[d]),e.galaxy.defense.gxy_gateway[d]-=h,e.galaxy.defense[o][d]+=h}}}}),Object.keys(e.galaxy.defense).forEach(function(o){let d=o.substring(4);e.settings.space[d]&&pe(`armada${d}`,function(){return`
${typeof He[o].info.desc=="string"?He[o].info.desc:He[o].info.desc()}
`})});for(let o=0;o=5&&U.iron_ship&&(r*=.95**U.iron_ship),r}function Zs(r){if(e.space.swarm_plant){let a=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(a-=xt/100),a<.05&&(a=.05),r*=a**e.space.swarm_plant.count}return r}function Ae(r,a,i){if(i=i||{},e.race.universe==="heavy"&&(r*=1.25+.5*ft("heavy")),e.race.truepath&&(r*=a?2.5:1.25),e.city.mass_driver&&k.mass_driver){let s=e.race.truepath?.94:.95;r*=s**k.mass_driver}else i.mass_driver&&(r*=.95**i.mass_driver);return e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(r*=Re.dense.vars()[2]),e.race.cataclysm&&(r*=.2),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(r*=1.35+9.65*ft("heavy")),Ve("launch_day")&&(r*=.95),r}function ze(r){return e.race.universe==="heavy"&&(r*=1.2+.3*ft("heavy")),e.stats.achieve.heavyweight&&(r*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(r*=1+b.heavy.vars()[0]/100),Ve("launch_day")&&(r*=.95),r}function Do(){let r=1;if(e.space.ziggurat&&e.space.ziggurat.count>0){let a=e.tech.ancient_study?.006:.004;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&U.exotic_lab&&(a+=1e-4*U.exotic_lab),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let i=2e-5;e.race.high_pop&&(i=xe(i)),a+=i*e.civic.priest.workers}e.race.ooze&&(a*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(a=xe(a)),r+=e.space.ziggurat.count*e.civic.colonist.workers*a}return r}function W(){let r={red:A[e.race.species].solar.red,hell:A[e.race.species].solar.hell,gas:A[e.race.species].solar.gas,gas_moon:A[e.race.species].solar.gas_moon,dwarf:A[e.race.species].solar.dwarf,titan:Mi[A[e.race.species].type].solar.titan,enceladus:Mi[A[e.race.species].type].solar.enceladus,triton:Mi[A[e.race.species].type].solar.triton,eris:Mi[A[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let a of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(a)&&(r[a]=e.custom.race0[a]);return r}var Dt=["l","h","a","e","m","mg"],Rr={standard:{name:t("universe_standard"),desc:t("universe_standard_desc"),effect:t("universe_standard_effect")},heavy:{name:t("universe_heavy"),desc:t("universe_heavy_desc"),effect:t("universe_heavy_effect",[5])},antimatter:{name:t("universe_antimatter"),desc:t("universe_antimatter_desc"),effect:t("universe_antimatter_effect")},evil:{name:t("universe_evil"),desc:t("universe_evil_desc"),effect:t("universe_evil_effect")},micro:{name:t("universe_micro"),desc:t("universe_micro_desc"),effect:t("universe_micro_effect",[75])},magic:{name:t("universe_magic"),desc:t("universe_magic_desc"),effect:t("universe_magic_effect")}};function nc(){let r=[];if(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4&&e.custom.hasOwnProperty("planet")&&Object.keys(Rr).forEach(function(a){let i=ot(a);e.custom.planet.hasOwnProperty(i)&&e.custom.planet[i].s&&r.push(`${i}:s`)}),e.race.geck&&e.race.geck>0){let a=$(`
${t("gecks_remaining")}: {{ geck }}
`);$("#evolution").append(a),D({el:"#geck",data:e.race})}if(e.race.probes===0)ic({custom:r});else{let a=!1;for(let i=0;i`),c=$(`${Rr[i].name}`);n.append(c),$("#evolution").append(n),$("#"+s).on("click",function(){e.race.universe=i,le($("#evolution")),nc(),Ie()}),pe(s,function(l){l.popper.append($(`
${Rr[i].name}
`)),l.popper.append($(`
${Rr[i].desc}
`)),l.popper.append($(`
${Rr[i].effect}
`))},{classes:"has-background-light has-text-dark"})}}function vs(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${A[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?ie("soul_sponge"):(ie("ascended"),e.interstellar.thermal_collector.count===0&&De("energetic")),e.race.species==="junker"&&De("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&De("garbage_pie"),e.race.emfield&&ie("technophobe"),e.race.cataclysm&&De("finish_line"),e.race.noexport="Race",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(r?r.append(a):$("#city").append(a),a.append(`

${t("genelab_title")}

- ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }}
`),r){a.append(`
${t("achieve_ascended_name")}
- `);let x=$("
");a.append(x),Object.keys(Rr).forEach(function(j){i.ascended[j]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(it(j))?e.stats.achieve.ascended[it(j)]:0,x.append(` + `);let x=$("
");a.append(x),Object.keys(Rr).forEach(function(j){i.ascended[j]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(ot(j))?e.stats.achieve.ascended[ot(j)]:0,x.append(`
${t("universe_"+j)}
`)}),a.append(`
${t("achieve_technophobe_name")}
@@ -513,7 +513,7 @@
${t("genelab_titan")}
${t("genelab_enceladus")}
${t("genelab_triton")}
-
${t("genelab_eris")}
`);a.append(c);let l=$('
');a.append(l);let o=!1,d=`
${t("genelab_genus")}
",l.append($(d));let h=`
${t("genelab_traits")}
",l.append($(h));let w=` +
${t("genelab_eris")}
`);a.append(c);let l=$('
');a.append(l);let o=!1,d=`
${t("genelab_genus")}
",l.append($(d));let h=`
${t("genelab_traits")}
",l.append($(h));let w=`
@@ -530,7 +530,7 @@
- `),a.append(w);var M=e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")?{name:e.custom.race0.name,desc:e.custom.race0.desc,entity:e.custom.race0.entity,home:e.custom.race0.home,red:e.custom.race0.red,hell:e.custom.race0.hell,gas:e.custom.race0.gas,gas_moon:e.custom.race0.gas_moon,dwarf:e.custom.race0.dwarf,titan:e.custom.race0.titan||W().titan,enceladus:e.custom.race0.enceladus||W().enceladus,triton:e.custom.race0.triton||W().triton,eris:e.custom.race0.eris||W().eris,genes:0,genus:e.custom.race0.genus,traitlist:e.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:o,traitlist:[]};for(let x=M.traitlist.length-1;x>=0;x--)(!b.hasOwnProperty(M.traitlist[x])||b[M.traitlist[x]].type!=="major")&&M.traitlist.splice(x,1);M.genes=ni(M,r?i:!1);let A={msg:""};D({el:"#celestialLab",data:{g:M,w:i,err:A},methods:{val(x){x==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[x]<0?i.ascended[x]=0:i.ascended[x]>5&&(i.ascended[x]=5)},geneEdit(){M.genes=ni(M,r?i:!1)},setRace(){ni(M)>=0&&M.name.length>0&&M.desc.length>0&&M.entity.length>0&&M.home.length>0&&M.red.length>0&&M.hell.length>0&&M.gas.length>0&&M.gas_moon.length>0&&M.dwarf.length>0&&(e.custom.race0={name:M.name,desc:M.desc,entity:M.entity,home:M.home,red:M.red,hell:M.hell,gas:M.gas,gas_moon:M.gas_moon,dwarf:M.dwarf,titan:M.titan,enceladus:M.enceladus,triton:M.triton,eris:M.eris,genus:M.genus,traits:M.traitlist},ao())},allowed(x){return M.genus!=="synthetic"&&["deconstructor","imitation"].includes(x)?(M.traitlist.includes(x)&&M.traitlist.splice(M.traitlist.indexOf(x),1),!0):!1},reset(){M.name="",M.desc="",M.entity="",M.home="",M.red="",M.hell="",M.gas="",M.gas_moon="",M.dwarf="",M.titan="",M.enceladus="",M.triton="",M.eris="",M.genus=o,M.traitlist=[],M.genes=ni(M,r?i:!1)},customImport(){let x=document.getElementById("customFile").files[0];if(x){let j=new FileReader;j.readAsText(x,"UTF-8"),j.onload=function(B){let S="";try{S=JSON.parse(B.target.result)}catch{A.msg=t("string_pack_error",[x.name]);return}let Q=!1;if(Object.keys(M).forEach(function(ce){if(S[ce]&&typeof M[ce]!=typeof S[ce]){Q=!0;return}}),Q){A.msg=t("string_pack_error",[x.name]),console.log("format fail");return}Object.keys(M).forEach(function(ce){S[ce]&&(M[ce]=S[ce])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(ce){!S[ce]&&["titan","enceladus","triton","eris"].includes(ce)?M[ce]=t(`genus_${M.genus}_solar_${ce}`):M[ce].length>20&&(M[ce]=M[ce].substring(0,20))}),M.entity.length>40&&(M.entity=M.entity.substring(0,40)),M.desc.length>255&&(M.desc=M.desc.substring(0,255)),!r&&!(e.stats.achieve[`genus_${M.genus}`]&&e.stats.achieve[`genus_${M.genus}`].l>0)&&(M.genus=o);let V=[];for(let ce=0;ce{let Q=document.createElement("a"),V=new Blob([j],{type:S});Q.href=URL.createObjectURL(V),Q.download=B,Q.click(),URL.revokeObjectURL(Q.href)})(JSON.stringify(M,null,4),`evolve-custom-${M.name}.txt`,"text/plain")}},filters:{cost(x){if(b[x].val>=0){let j=2;r?j+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(j+=e.stats.achieve.technophobe.l);let B=b[x].val,S=0;for(let Q=0;Q=0&&S++;return M.traitlist.includes(x)&&S--,S>j&&(B+=S-j),B}else return b[x].val},untapped(x){return`+${x>0?+((x/(x+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(Er).forEach(function(x){e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0&&pe(`celestialLabgenusSelection${x}`,function(){let j=$(`
${t(`genelab_genus_${x}_desc`)}
`);return Object.keys(Er[x]).forEach(function(B){if(b[B]){let S=$("
");vi(S,B,{trank:1}),j.append(S)}}),j},{elm:`#celestialLab .genus_selection .${x}`,classes:"w30",wide:!0})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&pe(`celestialLabtraitSelection${x}`,function(){let j=$("
");return vi(j,x,{trank:1}),j},{elm:`#celestialLab .trait_selection .t${x}`,classes:"w30",wide:!0})})}function Jn(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${F[e.race.species].type}`),ie("lamentis"),e.race.species==="junker"&&De("the_misery"),e.race.noexport="Planet",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};r?r.append(a):$("#city").append(a),a.append(`

${t("planetlab_title")}

- ${t("planetlab_points")} {{ p.pts }}
`);let s=$('
');a.append(s);let n=!1,c=`
${t("wiki_planet_biome")}
",s.append($(c));let l=`
${t("wiki_planet_trait")}
",s.append($(l));let o={},d=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&d.push("Iridium");let h=`
${t("planetlab_res")}
",s.append($(h));let _={biome:n,pts:0,traitlist:[],geology:o,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let w=it();if(e.custom.planet.hasOwnProperty(w)){let M="s";e.custom.planet[w][M]&&(_=Ke(e.custom.planet[w][M]),_.orbit=e.city.calendar.orbit,d.forEach(function(A){_.geology.hasOwnProperty(A)?_.geology[A]*=100:_.geology[A]=0}))}}_.pts=Js(_,r?i:!1);let m=`
+ `),a.append(w);var M=e.hasOwnProperty("custom")&&e.custom.hasOwnProperty("race0")?{name:e.custom.race0.name,desc:e.custom.race0.desc,entity:e.custom.race0.entity,home:e.custom.race0.home,red:e.custom.race0.red,hell:e.custom.race0.hell,gas:e.custom.race0.gas,gas_moon:e.custom.race0.gas_moon,dwarf:e.custom.race0.dwarf,titan:e.custom.race0.titan||W().titan,enceladus:e.custom.race0.enceladus||W().enceladus,triton:e.custom.race0.triton||W().triton,eris:e.custom.race0.eris||W().eris,genes:0,genus:e.custom.race0.genus,traitlist:e.custom.race0.traits}:{name:"Zombie",desc:"Zombies aren't so much a species as they are the shambling remains of a race who succumbed to a nightmarish virus. Yet somehow they continue to drone on.",entity:"rotting bipedal creatures",home:"Grave",red:"Brains",hell:"Rigor Mortis",gas:"Decompose",gas_moon:"Bones",dwarf:"Double Tap",titan:"Necromancer",enceladus:"Skeleton",triton:"Rot",eris:"Zombieland",genes:10,genus:o,traitlist:[]};for(let x=M.traitlist.length-1;x>=0;x--)(!b.hasOwnProperty(M.traitlist[x])||b[M.traitlist[x]].type!=="major")&&M.traitlist.splice(x,1);M.genes=ni(M,r?i:!1);let F={msg:""};D({el:"#celestialLab",data:{g:M,w:i,err:F},methods:{val(x){x==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[x]<0?i.ascended[x]=0:i.ascended[x]>5&&(i.ascended[x]=5)},geneEdit(){M.genes=ni(M,r?i:!1)},setRace(){ni(M)>=0&&M.name.length>0&&M.desc.length>0&&M.entity.length>0&&M.home.length>0&&M.red.length>0&&M.hell.length>0&&M.gas.length>0&&M.gas_moon.length>0&&M.dwarf.length>0&&(e.custom.race0={name:M.name,desc:M.desc,entity:M.entity,home:M.home,red:M.red,hell:M.hell,gas:M.gas,gas_moon:M.gas_moon,dwarf:M.dwarf,titan:M.titan,enceladus:M.enceladus,triton:M.triton,eris:M.eris,genus:M.genus,traits:M.traitlist},ao())},allowed(x){return M.genus!=="synthetic"&&["deconstructor","imitation"].includes(x)?(M.traitlist.includes(x)&&M.traitlist.splice(M.traitlist.indexOf(x),1),!0):!1},reset(){M.name="",M.desc="",M.entity="",M.home="",M.red="",M.hell="",M.gas="",M.gas_moon="",M.dwarf="",M.titan="",M.enceladus="",M.triton="",M.eris="",M.genus=o,M.traitlist=[],M.genes=ni(M,r?i:!1)},customImport(){let x=document.getElementById("customFile").files[0];if(x){let j=new FileReader;j.readAsText(x,"UTF-8"),j.onload=function(B){let S="";try{S=JSON.parse(B.target.result)}catch{F.msg=t("string_pack_error",[x.name]);return}let Q=!1;if(Object.keys(M).forEach(function(ce){if(S[ce]&&typeof M[ce]!=typeof S[ce]){Q=!0;return}}),Q){F.msg=t("string_pack_error",[x.name]),console.log("format fail");return}Object.keys(M).forEach(function(ce){S[ce]&&(M[ce]=S[ce])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(ce){!S[ce]&&["titan","enceladus","triton","eris"].includes(ce)?M[ce]=t(`genus_${M.genus}_solar_${ce}`):M[ce].length>20&&(M[ce]=M[ce].substring(0,20))}),M.entity.length>40&&(M.entity=M.entity.substring(0,40)),M.desc.length>255&&(M.desc=M.desc.substring(0,255)),!r&&!(e.stats.achieve[`genus_${M.genus}`]&&e.stats.achieve[`genus_${M.genus}`].l>0)&&(M.genus=o);let V=[];for(let ce=0;ce{let Q=document.createElement("a"),V=new Blob([j],{type:S});Q.href=URL.createObjectURL(V),Q.download=B,Q.click(),URL.revokeObjectURL(Q.href)})(JSON.stringify(M,null,4),`evolve-custom-${M.name}.txt`,"text/plain")}},filters:{cost(x){if(b[x].val>=0){let j=2;r?j+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(j+=e.stats.achieve.technophobe.l);let B=b[x].val,S=0;for(let Q=0;Q=0&&S++;return M.traitlist.includes(x)&&S--,S>j&&(B+=S-j),B}else return b[x].val},untapped(x){return`+${x>0?+((x/(x+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(Er).forEach(function(x){e.stats.achieve[`genus_${x}`]&&e.stats.achieve[`genus_${x}`].l>0&&pe(`celestialLabgenusSelection${x}`,function(){let j=$(`
${t(`genelab_genus_${x}_desc`)}
`);return Object.keys(Er[x]).forEach(function(B){if(b[B]){let S=$("
");vi(S,B,{trank:1}),j.append(S)}}),j},{elm:`#celestialLab .genus_selection .${x}`,classes:"w30",wide:!0})}),Object.keys(m).sort().forEach(function(x){b.hasOwnProperty(x)&&b[x].type==="major"&&pe(`celestialLabtraitSelection${x}`,function(){let j=$("
");return vi(j,x,{trank:1}),j},{elm:`#celestialLab .trait_selection .t${x}`,classes:"w30",wide:!0})})}function Jn(r){!r&&!e.race.noexport&&(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ie(`biome_${e.city.biome}`),ie(`genus_${A[e.race.species].type}`),ie("lamentis"),e.race.species==="junker"&&De("the_misery"),e.race.noexport="Planet",le($("#city")),e.settings.showCity=!0,e.settings.showCivic=!1,e.settings.showResearch=!1,e.settings.showResources=!1,e.settings.showGenetics=!1,e.settings.showSpace=!1,e.settings.showDeep=!1,e.settings.showGalactic=!1,e.settings.showPortal=!1,e.settings.spaceTabs=0);let a=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};r?r.append(a):$("#city").append(a),a.append(`

${t("planetlab_title")}

- ${t("planetlab_points")} {{ p.pts }}
`);let s=$('
');a.append(s);let n=!1,c=`
${t("wiki_planet_biome")}
",s.append($(c));let l=`
${t("wiki_planet_trait")}
",s.append($(l));let o={},d=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&d.push("Iridium");let h=`
${t("planetlab_res")}
",s.append($(h));let _={biome:n,pts:0,traitlist:[],geology:o,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let w=ot();if(e.custom.planet.hasOwnProperty(w)){let M="s";e.custom.planet[w][M]&&(_=Ke(e.custom.planet[w][M]),_.orbit=e.city.calendar.orbit,d.forEach(function(F){_.geology.hasOwnProperty(F)?_.geology[F]*=100:_.geology[F]=0}))}}_.pts=Js(_,r?i:!1);let m=`
@@ -538,7 +538,7 @@
- `),m+="
",a.append(m),D({el:"#celestialLab",data:{p:_,w:i},methods:{pEdit(){_.pts=Js(_,r?i:!1)},setPlanet(){if(Js(_)>=0){Object.keys(_.geology).forEach(function(A){_.geology[A]===0?delete _.geology[A]:_.geology[A]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let w=it();e.custom.planet.hasOwnProperty(w)||(e.custom.planet[w]={s:!1});let M="s";e.custom.planet[w][M]=Ke(_),delete e.custom.planet[w][M].pts,io(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach(function(w){_.geology[w]=0}),_.pts=Js(_,r?i:!1)},less(w){_.geology[w]-=fe(),_.geology[w]<-20&&(_.geology[w]=-20)},more(w){_.geology[w]+=fe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),_.biome==="eden"&&(M+=5),_.geology[w]>M&&(_.geology[w]=M)}},filters:{res(w){return _.geology[w]}}})}function Js(r,a){let i=(r.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=r.traitlist.length**3;let s=0;return Object.keys(r.geology).forEach(function(n){r.geology[n]!==0&&(i-=r.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}var si={unemployed:function(r){let a=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!r&&(a=a+" "+t("job_default",[t("job_unemployed")])),a},hunter:function(r){let a=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(a=t("job_eld_hunter_desc")),e.race.artifical?a=e.race.soul_eater?t("job_art_demon_hunter_desc",[e.resource.Furs.name,e.resource.Lumber.name]):t("job_art_hunter_desc",[e.resource.Furs.name]):e.race.soul_eater&&e.race.species!=="wendigo"&&(a=t(e.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[e.resource.Food.name,e.resource.Lumber.name,e.resource.Furs.name])),e.civic.d_job==="hunter"&&!r&&(a=a+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),a},forager:function(r){let a=t("job_forager_desc");return e.civic.d_job==="forager"&&!r&&(a=a+" "+t("job_default",[t("job_forager")])),a},farmer:function(r){let a=+Oi(!0,r).toFixed(2),i=+Oi(!1,r).toFixed(2);r||(a=+ye(a,"farmer").toFixed(2),i=+ye(i,"farmer").toFixed(2));let s=e.race.high_pop&&!r?t("job_farmer_desc_hp",[a,e.resource.Food.name,N(1),i,N(1)*e.city.farm.count]):t("job_farmer_desc",[a,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!r&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(r){let a=r&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(r||(a=+ye(a,"lumberjack").toFixed(2),i=+ye(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;r||(s*=$t(a,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),l=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!r&&(l=l+" "+t("job_default",[t("job_reclaimer")])),l}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;r||(s*=$t(a,"lumberjack")),e.city.biome==="forest"&&(i*=qe.forest.vars()[0]),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[2]),e.city.biome==="desert"&&(i*=qe.desert.vars()[2]),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=qe.taiga.vars()[0]);let n=+(i*s).toFixed(2),c=t("job_lumberjack_desc",[n,e.resource.Lumber.name]);return e.civic.d_job==="lumberjack"&&!r&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(r){let a=r&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;r||(a=+ye(a,"quarry_worker").toFixed(2),i=+ye(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;r||(s*=$t(a,"miner")),e.city.biome==="desert"&&(s*=qe.desert.vars()[0]),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[3]),e.tech.explosives&&e.tech.explosives>=2&&(s*=e.tech.explosives>=3?1.75:1.5);let n=+(i*s).toFixed(1),c=e.resource.Aluminium.display?t("job_quarry_worker_desc2",[n,e.resource.Stone.name,e.resource.Aluminium.name]):t("job_quarry_worker_desc1",[n,e.resource.Stone.name]);return e.race.smoldering&&(c=c+" "+t("job_quarry_worker_smoldering",[e.resource.Chrysotile.name])),e.civic.d_job==="quarry_worker"&&!r&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(r){let a=r&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;r||(a=+ye(a,"crystal_miner").toFixed(2),i=+ye(i,"crystal_miner").toFixed(2),s*=$t(a,"miner"));let n=+(i*s).toFixed(2),c=t("job_crystal_miner_desc",[n,e.resource.Crystal.name]);return e.civic.d_job==="crystal_miner"&&!r&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(r){let a=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(a*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!r&&(a*=b.high_pop.vars()[1]/100),r||(a=+ye(a,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[F[e.race.species].home,a]);return e.civic.d_job==="scavenger"&&!r&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(r){let a=t("job_teamster_desc",[En()]);return e.civic.d_job==="teamster"&&!r&&(a=a+" "+t("job_default",[t("job_teamster")])),a},meditator:function(r){let a=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!r&&(a=a+" "+t("job_default",[t("job_meditator")])),a},torturer:function(){return t("job_torturer_desc")},miner:function(){return e.tech.mining>=3?e.race.sappy&&e.tech.alumina?t("job_miner_desc2_amber"):t("job_miner_desc2"):t("job_miner_desc1")},coal_miner:function(){return e.tech.uranium?t("job_coal_miner_desc2"):t("job_coal_miner_desc1")},craftsman:function(){return t("job_craftsman_desc")},cement_worker:function(){let r=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(r*=qe.ashland.vars()[1]),r=+ye(r,"cement_worker").toFixed(2);let a=+ye(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$t(e.civic.cement_worker.workers,"factory"),n=a*i*s;return e.city.biome==="ashland"&&(n*=qe.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,r])},banker:function(){let r=+ye(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(r+=2*e.tech.stock_exchange),e.race.truthful&&(r*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(r*=1.25),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+r.toFixed(0),t("job_banker_desc",[r])},entertainer:function(){let r=e.tech.theatre;e.race.musical&&(r+=b.musical.vars()[0]),e.race.emotionless&&(r*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+ye(r,"entertainer").toFixed(2);let a=e.race.high_pop?b.high_pop.vars()[1]/100:1;return a=+ye(a,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[r,a]):t("job_entertainer_desc",[+r.toFixed(2)])},priest:function(){let r="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?r=t("job_priest_desc2"):r=t("job_priest_desc"),e.tech.cleric&&(r=r+` ${t("job_priest_desc3")}`),r},professor:function(){let r=+ye(1,"professor"),a=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=ve("elven");return i>0&&(a+=b.studious.vars(1)[0]*i),r*=a,r*=e.race.pompous?1-b.pompous.vars()[0]/100:1,r*=$t(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(r*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(r*=.75),r=+r.toFixed(2),t("job_professor_desc",[r])},scientist:function(){let r=+ye(e.civic.scientist.impact,"scientist").toFixed(2);return r*=$t(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(r*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(r*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(r*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),r=+r.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[r,+(.025*ft("magic")).toFixed(4)]):t("job_scientist_desc",[r])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[W().red])},titan_colonist(){return t("job_colonist_desc_tp",[W().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let r=(k.arcology||0)*75,a=(mt(e.portal.guard_post.on,"hellArmy",0)+r)/5e3;a=a>1?1:a;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*a);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[F[e.race.species].home])])},crew(){return t("job_crew_desc")}};function $i(r){r||$("#civics").append($(`

${t("civics_jobs")}

`)),Ft("unemployed",r,0,0,"warning"),Ft("hunter",r,0,0),Ft("forager",r,0,0),Ft("farmer",r,.82,5),Ft("lumberjack",r,1,5),Ft("quarry_worker",r,1,5),Ft("crystal_miner",r,.1,5),Ft("scavenger",r,.12,5),Ft("teamster",r,1,e.tech.teamster?6:4),Ft("meditator",r,1,5),Ft("torturer",r,1,3,"advanced"),Ft("miner",r,1,4,"advanced"),Ft("coal_miner",r,.2,4,"advanced"),Ft("craftsman",r,1,5,"advanced"),Ft("cement_worker",r,.4,5,"advanced"),Ft("entertainer",r,1,10,"advanced"),Ft("priest",r,1,3,"advanced"),Ft("professor",r,.5,6,"advanced"),Ft("scientist",r,1,5,"advanced"),Ft("banker",r,.1,6,"advanced"),Ft("colonist",r,1,5,"advanced"),Ft("titan_colonist",r,1,5,"advanced"),Ft("space_miner",r,1,5,"advanced"),Ft("hell_surveyor",r,1,1,"advanced"),Ft("archaeologist",r,1,1,"advanced"),Ft("pit_miner",r,1,4.5,"advanced"),Ft("crew",r,1,4,"alert"),!r&&!e.race.start_cataclysm&&(Lt(),e.race.servants&&oc())}function ye(r,a){return e.race.strong&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars()[1]),(e.race.swift||e.race.living_tool)&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars(.25)[1]),e.race.lone_survivor&&(["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)?r*=80:["craftsman"].includes(a)?r*=60:["miner","coal_miner","cement_worker","banker","entertainer","priest","pit_miner"].includes(a)?r*=45:["professor","scientist"].includes(a)&&(r*=125)),r}function N(r){return e.race.high_pop?r*b.high_pop.vars()[0]:r}function tn(r){let a="";e.race.unfathomable&&r==="hunter"?a=t("job_raider"):e.race.universe==="magic"&&r==="scientist"?a=t("job_wizard"):e.race.truepath&&r==="colonist"?a=t("job_colonist_tp",[W().red]):r==="titan_colonist"?a=t("job_colonist_tp",[W().titan]):a=r==="lumberjack"&&e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?t("job_reclaimer"):t("job_"+r),e.civic[r].name=a}function Ft(r,a,i,s,n){let c=!1;if(a==="servant"&&(c=!0,a=!1),e.civic[r]||(e.civic[r]={job:r,display:!1,workers:0,max:0,impact:i}),tn(r),e.civic[r].assigned||(e.civic[r].assigned=r==="craftsman"?0:e.civic[r].workers),c||(e.civic[r].stress=s,e.civic[r].impact=i),!(r==="craftsman"||a)){var l=c?"servant-"+r:"civ-"+r,o=$(`
`),d=c?$('
'):$(`
`);if(!n||r==="unemployed"){n=n||"info";let m=c?$(`

{{ civic.${r}.name }}

{{ sjob.${r} }}
`):$(``);o.append(m)}else{let m=$(`

{{ civic.${r}.name }}

{{ civic.${r}.workers | adjust('${r}') }} / {{ civic.${r}.max | adjust('${r}') }}
`);o.append(m)}if(o.append(d),$(c?"#servants":"#jobs").append(o),r!=="crew"){var h=$(`«`),_=$(`»`);d.append(h),d.append(_)}c?D({el:`#${l}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(m){return e.civic[m].display||m==="scavenger"&&e.race.servants.force_scavenger},add(){let m=fe();for(let w=0;we.race.servants.used;w++)e.race.servants.jobs[r]++,e.race.servants.used++},sub(){let m=fe();for(let w=0;w0;w++)e.race.servants.jobs[r]--,e.race.servants.used--}}}):D({el:`#${l}`,data:{civic:e.civic},methods:{showJob(m){return e.civic[m].display},add(){let m=fe();for(let w=0;w0);w++)e.civic[r].workers++,e.civic[e.civic.d_job].workers--,e.civic[r].assigned=e.civic[r].workers},sub(){let m=fe();for(let w=0;w0;w++)e.civic[r].workers--,e.civic[e.civic.d_job].workers++,e.civic[r].assigned=e.civic[r].workers},level(m){return e.civic[m].workers===0?"count has-text-danger":e.civic[m].workers===e.civic[m].max?"count has-text-success":e.civic[m].workers<=e.civic[m].max/3?"count has-text-caution":e.civic[m].workers<=e.civic[m].max*.66?"count has-text-warning":e.civic[m].workers0)return w}return m},adjust(m,w){return w==="titan_colonist"&&k.ai_colonist?m+N(k.ai_colonist):m}}}),pe(l,function(){return si[r](c)},{elm:`#${l} .job_label`,classes:"has-background-light has-text-dark"})}}function oc(){if(le($("#servants")),e.race.servants){var r=$(`

${t("civics_servants")}

{{ s.used }} / {{ s.max }}
`);$("#servants").append(r),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(a){Ft(a,"servant")}),D({el:"#servantList",data:{s:e.race.servants},methods:{level(){return e.race.servants.used===0?"count has-text-danger":e.race.servants.used===e.race.servants.max?"count has-text-success":e.race.servants.used<=e.race.servants.max/3?"count has-text-caution":e.race.servants.used<=e.race.servants.max*.66?"count has-text-warning":e.race.servants.used=2?1.15:.65),e.race.living_tool&&!a?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science/5:0):i*=1+(e.tech.hoe&&e.tech.hoe>0?e.tech.hoe/3:0),i*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,a?i*=pr(e.race.servants.jobs.farmer,"farmer"):i*=$t(e.civic.farmer.workers,"farmer"),i*=e.tech.agriculture>=7?1.1:1,i*=e.race.low_light?1-b.low_light.vars()[0]/100:1,i}function Lt(r){if(le($(r?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let a=$(r?"#skilledServants":"#foundry"),i=r?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`

${t(r?"civics_skilled_servants":"craftsman_assigned")}

${i}
`);a.append(s);let n=Ve("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];r||(c.push("Scarletite"),c.push("Quantium")),n&&!r&&c.push("Thermite");for(let o=0;o
');a.append(_);let m=$('
'),w;if(d==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))w=$(`

${h}

{{ f.${d} }} / {{ p.on | maxScar }}
`);else if(d==="Quantium"&&(e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")))w=$(`

${h}

{{ f.${d} }} / {{ e.on | maxQuantium }}
`);else{let x=r?`{{ s.sjobs.${d} }}`:`{{ f.${d} }}`,j=r?`scraft${d}`:`craft${d}`;w=$(`

${h}

${x}
`)}_.append(w),_.append(m),a.append(_);let M=$(`«`),A=$(`»`);m.append(M),m.append(A)}}let l=e.portal.hasOwnProperty("hell_forge")?{c:e.civic.craftsman,p:e.portal.hell_forge}:{c:e.civic.craftsman,e:e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")?e.tech.isolation?e.tauceti.infectious_disease_lab:e.space.zero_g_lab:{count:0,on:0}};r?l.s=e.race.servants:l.f=e.city.foundry,D({el:r?"#skilledServants":"#foundry",data:l,methods:{add(o){let d=fe(),h=-1;(o==="Scarletite"||o==="Quantium")&&(h=en(o));for(let _=0;_0&&(h===-1||h>e.city.foundry[o]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[o]++,e.civic[e.civic.d_job].workers--;else break},sub(o){let d=fe();for(let h=0;h0)e.race.servants.sjobs[o]--,e.race.servants.sused--;else break;else if(e.city.foundry[o]>0)e.city.foundry[o]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let o=r?e.race.servants.sused:e.civic.craftsman.workers,d=r?e.race.servants.smax:e.civic.craftsman.max;return o===0?"count has-text-danger":o===d?"count has-text-success":o<=d/3?"count has-text-caution":o<=d*.66?"count has-text-warning":o"),w=e.resource[d].name,A=Ua(d,"auto").multiplier,x=e.genes.crafty?2:1,j=+e.resource[d].diff.toFixed(2),B=+(A*100).toFixed(0);m.append($(`
${t("craftsman_hover_bonus",[B.toLocaleString(),w])}
`)),m.append($(`
${t("craftsman_hover_prod",[j.toLocaleString(),w])}
`));let S=wa();for(let Q=0;Q0&&(V-=b.resourceful.vars(1)[0]/100*ce);let Y=+(S[d][Q].a*e.city.foundry[d]*V*x/140).toFixed(2);m.append($(`
${t("craftsman_hover_cost",[Y,e.resource[S[d][Q].r].name])}
`))}return m},_=r?`scraft${d}`:`craft${d}`;rn(_,d,"auto",h)}}r?pe("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):pe("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!r&&e.race.servants.smax>0&&Lt(!0)}}var br={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let r=200;return k.repair_droid&&(r*=.95**k.repair_droid),Math.round(r)}},turret:{id:"portal-turret",title(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(r)},desc(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(r)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(r){return f("turret",r,35e4,1.28,"portal")},Copper(r){return f("turret",r,5e4,1.28,"portal")},Adamantite(r){return f("turret",r,8e3,1.28,"portal")},Elerium(r){return f("turret",r,15,1.28,"portal")},Nano_Tube(r){return f("turret",r,28e3,1.28,"portal")}},powered(){return _e(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,D({el:"#fort"},"update")},effect(){let r=e.tech.turret?e.tech.turret>=2?70:50:35,a=$(this)[0].powered();return`
${t("portal_turret_effect",[r])}
${t("minus_power",[a])}
`},action(){return u($(this)[0])?(ne("turret","portal"),re($(this)[0])&&(k.turret++,D({el:"#fort"},"update")),!0):!1}},carport:{id:"portal-carport",title:t("portal_carport_title"),desc(){return t("portal_carport_desc",[1])},reqs:{portal:2},cost:{Money(r){return f("carport",r,25e4,1.3,"portal")},Cement(r){return f("carport",r,18e3,1.3,"portal")},Oil(r){return f("carport",r,6500,1.3,"portal")},Plywood(r){return f("carport",r,8500,1.3,"portal")}},repair(){let r=180;return k.repair_droid&&(r*=.92**k.repair_droid),Math.round(r)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return u($(this)[0])?(ne("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=N(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,ue()),!0):!1}},war_droid:{id:"portal-war_droid",title:t("portal_war_droid_title"),desc(){return`
${t("portal_war_droid_title")}
${t("requires_power")}
`},reqs:{portal:5},cost:{Money(r){return f("war_droid",r,495e3,1.26,"portal")},Neutronium(r){return f("war_droid",r,1250,1.26,"portal")},Elerium(r){return f("war_droid",r,18,1.26,"portal")},Stanene(r){return f("war_droid",r,37500,1.26,"portal")},Soul_Gem(r){return f("war_droid",r,1,1.26,"portal")}},powered(){return _e(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_droid_flair")},repair_droid:{id:"portal-repair_droid",title:t("portal_repair_droid_title"),desc(){return`
${t("portal_repair_droid_title")}
${t("requires_power")}
`},reqs:{portal:6},cost:{Money(r){return f("repair_droid",r,444e3,1.26,"portal")},Iron(r){return f("repair_droid",r,88e3,1.26,"portal")},Iridium(r){return f("repair_droid",r,17616,1.26,"portal")},Infernite(r){return f("repair_droid",r,666,1.26,"portal")},Soul_Gem(r){return f("repair_droid",r,1,1.15,"portal")}},powered(){return _e(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("repair_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_repair_droid_flair")}},prtl_badlands:{info:{name:t("portal_badlands_name"),desc:t("portal_badlands_desc")},war_drone:{id:"portal-war_drone",title:t("portal_war_drone_title"),desc(){return`
${t("portal_war_drone_title")}
${t("requires_power")}
`},reqs:{portal:3},powered(){return _e(5)},cost:{Money(r){return f("war_drone",r,65e4,1.28,"portal")},Alloy(r){return f("war_drone",r,6e4,1.28,"portal")},Graphene(r){return f("war_drone",r,1e5,1.28,"portal")},Elerium(r){return f("war_drone",r,25,1.28,"portal")},Soul_Gem(r){return f("war_drone",r,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_drone","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_drone_flair")},sensor_drone:{id:"portal-sensor_drone",title:t("portal_sensor_drone_title"),desc(){return`
${t("portal_sensor_drone_title")}
${t("requires_power")}
`},reqs:{infernite:2},powered(){return _e(3)},cost:{Money(r){return f("sensor_drone",r,5e5,1.25,"portal")},Polymer(r){return f("sensor_drone",r,25e3,1.25,"portal")},Adamantite(r){return f("sensor_drone",r,12500,1.25,"portal")},Infernite(r){return f("sensor_drone",r,100,1.25,"portal")}},effect(){let r=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,a=e.tech.infernite>=6?2500:1e3,i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[2])}
`:`
${t("space_moon_observatory_effect",[2])}
${t("portal_sensor_drone_effect2",[2])}
`,s=e.tech.science>=14?`
${t("city_max_knowledge",[a])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[r])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("sensor_drone","portal"),re($(this)[0]),!0):!1}},attractor:{id:"portal-attractor",title:t("portal_attractor_title"),desc(){return`
${t("portal_attractor_title")}
${t("requires_power")}
`},reqs:{portal:4},powered(){return _e(3)},cost:{Money(r){return f("attractor",r,35e4,1.25,"portal")},Aluminium(r){return f("attractor",r,175e3,1.25,"portal")},Stanene(r){return f("attractor",r,9e4,1.25,"portal")}},effect(){return`
${t("portal_attractor_effect1")}
${t("portal_attractor_effect2",[e.resource.Soul_Gem.name])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("attractor","portal"),re($(this)[0]),!0):!1}}},prtl_pit:{info:{name:t("portal_pit_name"),desc:t("portal_pit_desc")},pit_mission:{id:"portal-pit_mission",title:t("portal_pit_mission_title"),desc:t("portal_pit_mission_title"),reqs:{hell_pit:1},grant:["hell_pit",2],queue_complete(){return e.tech.hell_pit>=2?0:1},cost:{Money(){return 5e6},Helium_3(){return 3e5},Deuterium(){return 2e5}},effect:t("portal_pit_mission_effect"),action(){return u($(this)[0])?(I(t("portal_pit_mission_result"),"info",!1,["progress","hell"]),!0):!1}},assault_forge:{id:"portal-assault_forge",title:t("portal_assault_forge_title"),desc:t("portal_assault_forge_title"),reqs:{hell_pit:2},grant:["hell_pit",3],queue_complete(){return e.tech.hell_pit>=3?0:1},cost:{Money(){return 1e7},HellArmy(){return Math.round(650/mt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return u($(this)[0])?(I(t("portal_assault_forge_result"),"info",!1,["progress","hell"]),!0):!1}},soul_forge:{id:"portal-soul_forge",title:t("portal_soul_forge_title"),desc(){return`
${t("portal_soul_forge_desc")}
${t("requires_power")}
`},reqs:{hell_pit:4},queue_complete(){return 1-e.portal.soul_forge.count},powered(){return _e(30)},postPower(r){D({el:"#fort"},"update")},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(r){let a=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6;e.tech.hell_pit>=7&&k.soul_attractor>0&&(n*=.97**k.soul_attractor),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ji();return`${a}
${t("portal_soul_forge_soldiers",[s])}, ${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])&&e.portal.soul_forge.count<1?(ne("soul_forge","portal"),re($(this)[0]),!0):!1}},gun_emplacement:{id:"portal-gun_emplacement",title:t("portal_gun_emplacement_title"),desc(){return`
${t("portal_gun_emplacement_title")}
${t("requires_power")}
`},reqs:{hell_gun:1},powered(){return _e(3)},cost:{Money(r){return f("gun_emplacement",r,4e6,1.25,"portal")},Coal(r){return f("gun_emplacement",r,25e4,1.25,"portal")},Steel(r){return f("gun_emplacement",r,12e5,1.25,"portal")},Wrought_Iron(r){return f("gun_emplacement",r,2e5,1.25,"portal")}},effect(){let r=e.tech.hell_gun>=2?2:1,a=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[r])}
${t("portal_gun_emplacement_effect2",[a,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gun_emplacement","portal"),re($(this)[0]),!0):!1}},soul_attractor:{id:"portal-soul_attractor",title:t("portal_soul_attractor_title"),desc(){return`
${t("portal_soul_attractor_title")}
${t("requires_power")}
`},reqs:{hell_pit:5},powered(){return _e(4)},cost:{Money(r){return f("soul_attractor",r,12e6,1.25,"portal")},Stone(r){return f("soul_attractor",r,23e6,1.25,"portal")},Nano_Tube(r){return f("soul_attractor",r,314159,1.25,"portal")},Vitreloy(r){return f("soul_attractor",r,1618,1.25,"portal")},Aerogel(r){return f("soul_attractor",r,18e4,1.25,"portal")}},effect(){let r=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",a=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+a,120+a])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("soul_attractor","portal"),re($(this)[0]),!0):!1}},soul_capacitor:{id:"portal-soul_capacitor",title:t("portal_soul_capacitor_title"),desc(){return`
${t("portal_soul_capacitor_desc")}
${t("requires_power")}
`},reqs:{forbidden:2},powered(){return _e(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,75e7,1.01,"portal")},Crystal(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,65e5,1.01,"portal")},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e4,1.01,"portal")},Stanene(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,25e5,1.01,"portal")},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e6,1.01,"portal")},Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,3,1.01,"portal")},Mythril(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")}},effect(){let r=25e5,a=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.ecap:0,i=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.energy:0,s=`
${t("portal_soul_capacitor_effect",[i.toLocaleString()])}
`;return s+=`
${t("portal_soul_capacitor_effect2",[a.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[r.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&u($(this)[0])?(e.portal.soul_capacitor.count++,re($(this)[0]),!0):!1},postPower(){Ci($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(r){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||r?`
${t("portal_absorption_chamber_title")}
${t("requires_segments",[100])}
`:`
${t("portal_absorption_chamber_title")}
`},reqs:{forbidden:3},queue_size:5,queue_complete(){return 100-e.portal.absorption_chamber.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(a<100){let i=100-a;return`
${t("portal_absorption_chamber_incomplete")}
${t("space_dwarf_collider_effect2",[i])}
`}else{if(e.tech.forbidden===5)return`
${t("portal_absorption_chamber_effect_eld",[1e8.toLocaleString()])}
${t("tech_demonic_infusion_effect2",[ot("descend").artifact])}
`;{let i=Ys();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(u($(this)[0])){if(e.portal.absorption_chamber.count<100)return ne("absorption_chamber","portal"),e.portal.absorption_chamber.count>=100&&(e.tech.forbidden=4),!0;if(e.portal.soul_capacitor.energy>=1e8)return e.tech.forbidden===5?Ts():vs(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,r},filter(r,a){let i=Nr("ruins");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},ruins_mission:{id:"portal-ruins_mission",title:t("portal_ruins_mission_title"),desc:t("portal_ruins_mission_title"),reqs:{hell_ruins:1},grant:["hell_ruins",2],queue_complete(){return e.tech.hell_ruins>=2?0:1},cost:{Money(){return 1e8},Oil(){return 5e5},Helium_3(){return 5e5}},effect:t("portal_ruins_mission_effect"),action(){return u($(this)[0])?(I(t("portal_ruins_mission_result"),"info",!1,["progress","hell"]),e.portal.vault={count:0},e.portal.stonehedge={count:0},e.portal.archaeology={count:0,on:0},!0):!1}},guard_post:{id:"portal-guard_post",title:t("portal_guard_post_title"),desc(){return`
${t("portal_guard_post_title")}
${t("requires_soldiers")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("guard_post",r,8e6,1.06,"portal")},Lumber(r){return f("guard_post",r,65e5,1.06,"portal")},Sheet_Metal(r){return f("guard_post",r,3e5,1.06,"portal")}},powered(){return _e(5)},support(){return 1},effect(){let r=e.race.holy?1+b.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=Math.round(r*mt(N(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[N(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")}},vault:{id:"portal-vault",title:t("portal_vault_title"),desc:t("portal_vault_title"),reqs:{hell_ruins:2,hell_vault:1},condition(){return!(e.portal.vault.count>=2)},queue_complete(){return 2-e.portal.vault.count},cost:{Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){if(e.portal.vault.count<2&&u($(this)[0])){if(ne("vault","portal"),e.portal.vault.count===2&&(e.tech.hell_ruins=3,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_vault_result"),"info",!1,["progress","hell"]),e.race.fasting)){let r=it();e.stats.endless_hunger.b3[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b3.l=!0)}return!0}return!1},post(){e.portal.vault.count===2&&(ue(),ir(),Ie())}},archaeology:{id:"portal-archaeology",title:t("portal_archaeology_title"),desc(){return`
${t("portal_archaeology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("archaeology",r,1e8,1.25,"portal")},Titanium(r){return f("archaeology",r,375e4,1.25,"portal")},Mythril(r){return f("archaeology",r,125e4,1.25,"portal")}},powered(){return _e(8)},effect(){return`
${t("portal_archaeology_effect",[N(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("archaeology","portal"),e.civic.archaeologist.display=!0,re($(this)[0])){let r=N(2);e.civic.archaeologist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.archaeologist.workers+=a}return!0}return!1}},arcology:{id:"portal-arcology",title:t("portal_arcology_title"),desc(){return`
${t("portal_arcology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{housing:4},cost:{Money(r){return f("arcology",r,18e7,1.22,"portal")},Graphene(r){return f("arcology",r,75e5,1.22,"portal")},Bolognium(r){return f("arcology",r,28e5,1.22,"portal")},Orichalcum(r){return f("arcology",r,55e5,1.22,"portal")},Nanoweave(r){return f("arcology",r,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return _e(25)},effect(){let r=Nr("ruins"),a=H(Fr()*8*r.supress);a=+a.toFixed(0);let i=Math.round(xt)*10,s=`
${t("plus_max_resource",[i,t("resource_Crates_name")])}
${t("plus_max_resource",[i,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[N(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("arcology","portal"),re($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||Yr(),!0):!1},post(){D({el:"#srprtl_ruins"},"update"),ue()},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},hell_forge:{id:"portal-hell_forge",title:t("portal_hell_forge_title"),desc(){return`
${t("portal_hell_forge_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{scarletite:1},cost:{Money(r){return f("hell_forge",r,25e7,1.15,"portal")},Coal(r){return f("hell_forge",r,165e4,1.22,"portal")},Steel(r){return f("hell_forge",r,38e5,1.22,"portal")},Iridium(r){return f("hell_forge",r,12e5,1.22,"portal")},Neutronium(r){return f("hell_forge",r,28e4,1.22,"portal")},Soul_Gem(r){return f("hell_forge",r,5,1.22,"portal")}},powered(){return _e(12)},special:!0,effect(){let a=+(75*Nr("ruins").supress).toFixed(1),i=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[N(1)])}
${i}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("hell_forge","portal"),re($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Lt()},postPower(r){bi("Scarletite")}},inferno_power:{id:"portal-inferno_power",title:t("portal_inferno_power_title"),desc(){return`
${t("portal_inferno_power_title")}
`},reqs:{inferno_power:1},cost:{Money(r){return f("inferno_power",r,275e6,1.16,"portal")},Neutronium(r){return f("inferno_power",r,375e4,1.18,"portal")},Stanene(r){return f("inferno_power",r,12e6,1.18,"portal")},Bolognium(r){return f("inferno_power",r,8e6,1.18,"portal")}},powered(){let r=20;return k.hasOwnProperty("hell_forge")&&(r+=k.hell_forge*10),dt(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
${t("portal_inferno_power_effect",[r.Infernite,e.resource.Infernite.name,r.Coal,e.resource.Coal.name,r.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){D({el:"#foundry"},"update")}},ancient_pillars:{id:"portal-ancient_pillars",title:t("portal_ancient_pillars_title"),desc:t("portal_ancient_pillars_desc"),reqs:{hell_ruins:2},queue_complete(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"?1:0},cost:{Harmony(r){return r!==void 0?r+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(F).length-1,a])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(F).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Jt(),e.tech.pillars=2,H(0,!1,!0),ea(!0),Wt(!0),ie("resonance"),D({el:"#portal-ancient_pillars"},"update"),!0):!1}}},prtl_gate:{info:{name:t("portal_gate_name"),desc(){return`${t("portal_gate_desc")} ${t(e.tech.wtower&&e.tech.etower?"portal_gate_open":"portal_gate_closed")}`},support:"guard_post",hide_support:!0,prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,r},filter(r,a){let i=Nr("gate");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},gate_mission:{id:"portal-gate_mission",title:t("portal_gate_mission_title"),desc:t("portal_gate_mission_title"),reqs:{high_tech:18},grant:["hell_gate",1],queue_complete(){return e.tech.hell_gate>=1?0:1},cost:{Money(){return 25e7},Knowledge(){return 275e5}},effect:t("portal_gate_mission_effect"),action(){return u($(this)[0])?(I(t("portal_gate_mission_result"),"info",!1,["progress","hell"]),!0):!1}},west_tower:{id:"portal-west_tower",title:t("portal_west_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")}
${t("requires_segments",[a])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.west_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("west_tower")?e.portal.west_tower.count:0)${t("portal_tower_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.west_tower.count=Wt()&&(e.tech.wtower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}
${t("requires_segments",[a])}
`:`
${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.east_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("east_tower")?e.portal.east_tower.count:0)${t("portal_tower_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.east_tower.count=Wt()&&(e.tech.etower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},gate_turret:{id:"portal-gate_turret",title:t("portal_gate_turret_title"),desc(){return`
${t("portal_gate_turret_title")}
${t("requires_power")}
`},reqs:{hell_gate:3},powered(){return _e(6)},cost:{Money(r){return f("gate_turret",r,375e4,1.22,"portal")},Iron(r){return f("gate_turret",r,425e4,1.22,"portal")},Elerium(r){return f("gate_turret",r,275,1.22,"portal")},Stanene(r){return f("gate_turret",r,85e4,1.22,"portal")}},effect(){let r=100;e.race.holy&&(r*=1+b.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=e.tech.hell_gun>=2?65:40,s=e.tech.hell_gun>=2?100:60;return`
${t("portal_gate_turret_effect",[Math.round(r)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gate_turret","portal"),re($(this)[0]),!0):!1},postPower(){D({el:"#srprtl_gate"},"update")}},infernite_mine:{id:"portal-infernite_mine",title:t("portal_infernite_mine_title"),desc(){return`
${t("portal_infernite_mine_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_gate:4},powered(){return _e(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(r){return f("infernite_mine",r,75e6,1.26,"portal")},Alloy(r){return f("infernite_mine",r,245e4,1.26,"portal")},Orichalcum(r){return f("infernite_mine",r,165e4,1.26,"portal")},Wrought_Iron(r){return f("infernite_mine",r,68e4,1.26,"portal")}},effect(){let r=T("infernite_mine");return`
${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("infernite_mine","portal"),re($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbour"},lake_mission:{id:"portal-lake_mission",title:t("portal_lake_mission_title"),desc:t("portal_lake_mission_title"),reqs:{hell_lake:1},grant:["hell_lake",2],queue_complete(){return e.tech.hell_lake>=2?0:1},cost:{Money(){return 5e8},Oil(){return 75e4},Helium_3(){return 6e5}},effect:t("portal_lake_mission_effect"),action(){return u($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbour:{id:"portal-harbour",title:t("portal_harbour_title"),desc(){return`
${t("portal_harbour_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(){let r=k.cooling_tower||0;return+_e(500*.92**r).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbour",r,225e6,$a(1.18),"portal")},Cement(r){return f("harbour",r,5e7,$a(1.18),"portal")},Iridium(r){return f("harbour",r,75e5,$a(1.18),"portal")},Infernite(r){return f("harbour",r,8e5,$a(1.18),"portal")},Stanene(r){return f("harbour",r,175e5,$a(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(r){switch(r){case"Oil":return 3e4;case"Alloy":return 25e4;case"Polymer":return 25e4;case"Iridium":return 2e5;case"Helium_3":return 18e3;case"Deuterium":return 12e3;case"Neutronium":return 18e4;case"Adamantite":return 15e4;case"Infernite":return 75e3;case"Nano_Tube":return 75e4;case"Graphene":return 12e5;case"Stanene":return 12e5;case"Bolognium":return 13e4;case"Orichalcum":return 13e4;default:return 0}},effect(){let r='
';for(let a of $(this)[0].res())if(e.resource[a].display){let i=Ee(+H($(this)[0].val(a)).toFixed(0),1);r=r+`${t("plus_max_resource",[i,e.resource[a].name])}`}return r=r+"
",`
${t("portal_harbour_effect",[1])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("harbour","portal"),re($(this)[0]))for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=H($(this)[0].val(r)));return!0}return!1}},cooling_tower:{id:"portal-cooling_tower",title:t("portal_cooling_tower_title"),desc(){return`
${t("portal_cooling_tower_title")}
${t("requires_power")}
`},reqs:{hell_lake:6},powered(){return _e(10)},cost:{Money(r){return f("cooling_tower",r,25e7,1.2,"portal")},Polymer(r){return f("cooling_tower",r,12e6,1.2,"portal")},Orichalcum(r){return f("cooling_tower",r,85e5,1.2,"portal")},Brick(r){return f("cooling_tower",r,25e4,1.2,"portal")}},effect(){return`
${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("cooling_tower","portal"),re($(this)[0]),!0):!1}},bireme:{id:"portal-bireme",title:t("portal_bireme_title"),desc(){return`
${t("portal_bireme_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:4},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("bireme",r,19e7,1.24,"portal")},Helium_3(r){return f("bireme",r,225e3,1.24,"portal")},Adamantite(r){return f("bireme",r,15e6,1.24,"portal")},Nano_Tube(r){return f("bireme",r,18e6,1.24,"portal")},Soul_Gem(r){return f("bireme",r,10,1.24,"portal")},Scarletite(r){return f("bireme",r,125e3,1.24,"portal")}},effect(){let r=e.blood.spire&&e.blood.spire>=2?20:15;return`
${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[r])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2}},action(){return u($(this)[0])?(ne("bireme","portal"),re($(this)[0]),!0):!1}},transport:{id:"portal-transport",title:t("portal_transport_title"),desc(){return`
${t("portal_transport_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:5},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("transport",r,3e8,1.22,"portal")},Oil(r){return f("transport",r,18e4,1.22,"portal")},Alloy(r){return f("transport",r,18e6,1.22,"portal")},Graphene(r){return f("transport",r,125e5,1.22,"portal")},Soul_Gem(r){return f("transport",r,5,1.22,"portal")},Scarletite(r){return f("transport",r,25e4,1.22,"portal")}},effect(){let a=+((e.blood.spire&&e.blood.spire>=2?.8:.85)**(we.bireme||0)*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[a])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(gr("mTabResource"),Ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return u($(this)[0])?(ne("transport","portal"),re($(this)[0]),e.settings.portal.spire||(e.settings.portal.spire=!0,e.settings.showCargo=!0,e.tech.hell_spire=1,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0},I(t("portal_transport_unlocked"),"info",!1,["progress","hell"]),ir()),!0):!1}}},prtl_spire:{info:{name:t("portal_spire_name"),desc:t("portal_spire_desc"),support:"purifier",prop(){return` - ${t("portal_spire_supply")}: {{ supply | filter }} / {{ sup_max }}`+' (+{{ diff | filter(2) }}/s)'},filter(r,a){return a?+r.toFixed(a):Math.floor(r)}},spire_mission:{id:"portal-spire_mission",title:t("portal_spire_mission_title"),desc:t("portal_spire_mission_title"),reqs:{hell_spire:1},grant:["hell_spire",2],queue_complete(){return e.tech.hell_spire>=2?0:1},cost:{Species(){return Si(50)},Oil(){return 9e5},Helium_3(){return 75e4},Structs(){return{portal:{bireme:{s:"prtl_lake",count:1,on:1},transport:{s:"prtl_lake",count:1,on:1}}}}},effect:t("portal_spire_mission_effect"),action(){return u($(this)[0])?(I(t("portal_spire_mission_result"),"info",!1,["progress","hell"]),!0):!1},flair:t("portal_spire_mission_flair")},purifier:{id:"portal-purifier",title:t("portal_purifier_title"),desc(){return`
${t("portal_purifier_desc")}
${t("requires_power")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("purifier",r,85e6,$a(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,$a(1.2),"portal")}},powered(){return _e(125)},support(){return e.tech.b_stone&&e.tech.b_stone>=3?1.25:1},effect(){return`
${t("portal_purifier_effect",[$(this)[0].support()])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("purifier","portal"),re($(this)[0]),!0):!1}},port:{id:"portal-port",title:t("portal_port_title"),desc(){return`
${t("portal_port_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("port",r,135e6,$a(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){let r=1e4;return pa.base_camp&&(r*=1+pa.base_camp*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return u($(this)[0])?(ne("port","portal"),re($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},ir()),!0):!1}},base_camp:{id:"portal-base_camp",title:t("portal_base_camp_title"),desc(){return`
${t("portal_base_camp_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:4},cost:{Money(r){return f("base_camp",r,425e6,$a(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){return`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_base_camp_effect",[40])}
`},action(){return u($(this)[0])?(ne("base_camp","portal"),re($(this)[0]),e.tech.hell_spire===4&&(e.tech.hell_spire=5,e.portal.bridge={count:0},I(t("portal_spire_bridge_collapse"),"info",!1,["progress","hell"]),ir()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(r){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||r?`
${t("portal_bridge_title")}
${t("requires_segments",[10])}
`:`
${t("portal_bridge_title")}
`},reqs:{hell_spire:5},queue_size:1,queue_complete(){return 10-e.portal.bridge.count},cost:{Species(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?Si(10):0},Money(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(r){let a=10,i=(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0);if(i${t("portal_bridge_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_bridge_effect2")}
`}else return t("portal_bridge_complete")},action(){return e.portal.bridge.count<10&&u($(this)[0])?(ne("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,ir()),!0):!1}},sphinx:{id:"portal-sphinx",title(){return e.tech.hell_spire===7?t("portal_sphinx_solve"):t("portal_sphinx_title")},desc:t("portal_sphinx_desc"),reqs:{hell_spire:6},queue_complete(){return 8-e.tech.hell_spire},cost:{Knowledge(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?5e7:a===0?4e7:0}},effect(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?t("portal_sphinx_effect2"):a===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(u($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),ir(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,ir(),I(t("portal_sphinx_answer_msg"),"info",!1,["progress","hell"]),!0}return!1}},bribe_sphinx:{id:"portal-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_desc"),reqs:{hell_spire:7},condition(){return!!(e.tech.hell_spire&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe)},cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("portal_sphinx_bribe_effect")},action(){return u($(this)[0])&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe?(e.tech.sphinx_bribe=1,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_sphinx_bribe_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.sphinx_bribe&&(ue(),ir(),Ie("portal-bribe_sphinx"))}},spire_survey:{id:"portal-spire_survey",title:t("portal_spire_survey_title"),desc:t("portal_spire_survey_title"),reqs:{hell_spire:8},grant:["hell_spire",9],queue_complete(){return e.tech.hell_spire>=9?0:1},cost:{Oil(){return 12e5},Helium_3(){return 9e5}},effect:t("portal_spire_survey_effect"),action(){return u($(this)[0])?(e.portal.mechbay={count:0,on:0,bay:0,max:0,active:0,scouts:0,mechs:[]},e.portal.spire={count:1,progress:0,boss:"",type:"",status:{}},nn(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(ir(),Ie("portal-spire_survey"))}},mechbay:{id:"portal-mechbay",title:t("portal_mechbay_title"),desc(){return`
${t("portal_mechbay_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:9},cost:{Money(r){return f("mechbay",r,1e8,1.2,"portal")},Supply(r){return f("mechbay",r,25e4,1.2,"portal")}},powered(){return 0},s_type:"spire",support(){return-1},special:!0,sAction(){e.settings.civTabs=2,e.settings.govTabs=4,e.settings.tabLoad||(gr("mTabCivic"),Ie("portal-mechbay"))},effect(){let r=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.max:0;return`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_mechbay_effect")}
${t("portal_mechbay_effect2",[r,a])}
`},action(){return u($(this)[0])?(ne("mechbay","portal"),re($(this)[0])&&(e.portal.mechbay.max+=25),e.settings.showMechLab=!0,e.portal.mechbay.count===1&&(I(t("portal_mechbay_unlocked"),"info",!1,["progress","hell"]),Ki(),Ot()),!0):!1},postPower(){sn()}},spire:{id:"portal-spire",title:t("portal_spire_title"),desc:t("portal_spire_title"),reqs:{hell_spire:9},queue_complete(){return 0},cost:{},effect(){let r=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,a=e.portal.hasOwnProperty("spire")?`${t(`portal_spire_type_${e.portal.spire.type}`)}`:"?",i="";e.portal.hasOwnProperty("spire")&&Object.keys(e.portal.spire.status).length>0&&(i=`
${t("portal_spire_hazard",[Object.keys(e.portal.spire.status).map(_=>`${t(`portal_spire_status_${_}`)}`).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}%`:"0%",n=`
${t("portal_spire_effect",[r])}
${t("portal_spire_type",[a])}
${i}
${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",l=`
${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)}`])}
`,o="???",d="???";if(e.stats.spire){let _=qu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${_.w}`)),m>=5&&(d=t(`portal_mech_weapon_${_.r}`))}let h=`
${l}
${t("portal_spire_mob_weak",[`${o}`])}
${t("portal_spire_mob_resist",[`${d}`])}
`;return`
${n}
${h}
`},mscan(){let r=0;return Object.keys(e.stats.spire).forEach(function(a){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty(i)&&e.stats.spire[a][i]>r&&(r=e.stats.spire[a][i])}),r},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(r){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||r?`
${t("portal_waygate_title")}
${t("requires_segments",[10])}
`:`
${t("portal_waygate_title")}
`},reqs:{waygate:1},queue_size:1,queue_complete(){return e.tech.waygate>=2?0:10-e.portal.waygate.count},cost:{Species(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?Si(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?Si(25):0},Money(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?1e9:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?1e9:0},Supply(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5e5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5e5:0},Blood_Stone(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5:0}},powered(){return e.portal.hasOwnProperty("waygate")&&e.portal.waygate.count>=10?1:0},power_reqs:{waygate:2},effect(r){let a=(r||0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(a>=10){let i=e.portal.hasOwnProperty("waygate")?`${+e.portal.waygate.progress.toFixed(3)}%`:"0%";return`
${t("portal_waygate_open")}
${t("portal_waygate_progress",[i])}
`}else{let s=10-a;return`
${t("portal_waygate_effect")}
${t("space_dwarf_collider_effect2",[s])}
`}},action(){return e.portal.waygate.count<10&&e.tech.waygate&&e.tech.waygate===1&&u($(this)[0])?(ne("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,ir()),!0):!1}}}};function $a(r){let a=e.portal.hasOwnProperty("spire")&&e.blood.spire?r-(e.portal.spire.count-1)/2500:r;return a>=1.01?a:1.01}var Wt=function(){var r;return function(a){return r&&!a||(r=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(r-=12)})),r}}();function la(r){let a=Nr("gate");return Math.round(r/(a.supress>.01?a.supress:.01))}function ji(){let r=Math.round(650/mt(1,"hellArmy"));return k.gun_emplacement&&(r-=k.gun_emplacement*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function an(){return br}function ir(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let r=$("#portal");le(r),r.append($(`

${t("tab_portal")}

`)),!(!e.tech.portal||e.tech.portal<2)&&Object.keys(br).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof br[a].info.name=="string"?br[a].info.name:br[a].info.name(),n="";if(br[a].info.hasOwnProperty("prop")&&(n=br[a].info.prop()),br[a].info.support){let c=br[a].info.support;br[a].info.hide_support?r.append(`

${s}

${n}
`):r.append(`

${s}

{{ support }}/{{ s_max }}${n}
`),D({el:`#sr${a}`,data:e.portal[c],filters:{filter(){return br[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);pe(a,function(){return typeof br[a].info.desc=="string"?br[a].info.desc:br[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Us(r,!0),Object.keys(br[a]).forEach(function(c){if(c!=="info"&&Dr(br,a,c)){let l=br[a][c];Br(l,"portal",c)}})}})}function Jc(r,a){return Dr(br,r,a)}function Wi(r){switch(r){case"hostiles":return e.portal.fortress.threat>=2e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_high")}`:e.portal.fortress.threat<1e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_low")}`:`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_medium")}`;case"threatLevel":{let a=e.portal.fortress.threat;return a<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:a<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:a>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:a>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:a>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let a=Math.round(vr("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Us(r,a){if(!e.settings.tabLoad)switch(e.settings.civTabs){case 1:if(e.settings.spaceTabs!==4)return;break;case 2:if(e.settings.govTabs!==3)return;break;default:return}if(!e.tech.portal||e.tech.portal<2)return;let i=a?"fort":"gFort",s=a?$(`
`):$("#gFort");a?r.append(s):(s.length>0?le(s):(s=$(`
`),r.append(s)),s.append(`

${t("portal_fortress_name")}

`));let n=$("
");s.append(n);let c=$(`${t("fortress_defense")} {{ f.garrison | defensive }}`);n.append(c);let l=$(`${t("fortress_spotted")} {{ f.threat }}`);n.append(l);let o=$('{{ f.threat | threat }}');n.append(o);let d=$("
");s.append(d),d.append($(`${t("fortress_wall")} {{ f.walls }}%`));let h=$("
");s.append(h),h.append($(`${t("fortress_army")}`)),h.append($('«')),h.append($('{{ f.garrison | patrolling }}')),h.append($('»')),h.append($(`${t("fortress_patrol")}`)),h.append($('«')),h.append($('{{ f.patrols }}')),h.append($('»')),h.append($(`${t("fortress_patrol_size")}`)),h.append($('«')),h.append($('{{ f.patrol_size }}')),h.append($('»')),h.append($(``));var _=$('
');h.append(_),_.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");_.append($(`${m} / {{ g.max | s_max }} | `)),_.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),_.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let w=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',M=$("
");h.append(M),M.append($(`${t("fortress_patrol_reports")}`)),M.append($(`${t("fortress_surv_reports")}`)),M.append($(`${t("fortress_nocrew")}`)),a&&s.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
`)),D({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Wi("hostiles")},threatLevel(){return Wi("threatLevel")},aNext(){let A=fe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update"))},aLast(){let A=fe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=ji()),e.portal.hasOwnProperty("guard_post")&&(x+=N(e.portal.guard_post.on)),e.portal.fortress.garrison>x&&(e.portal.fortress.garrison-=A,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=A,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let A=fe();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=A,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let A=e.portal.fortress.walls;return A>=75?"has-text-success":A<=25?"has-text-danger":"has-text-warning"},threaten(){let A=e.portal.fortress.threat;return A<1e3?"has-text-success":A>=2e3?"has-text-danger":"has-text-warning"},hire(){let A=fe(),x=!0;for(;x&&A>0;){let j=_s();e.civic.garrison.workers=j?(e.resource.Money.amount-=j,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update")):x=!1,A--}},hireLabel(){return Wi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(A){return Ho(A)},patrolling(A){let x=A-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=ji();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=N(e.portal.guard_post.on)),x},threat(A){return A<1e3?t("fortress_threat_level1"):A<1500?t("fortress_threat_level2"):A>=5e3?t("fortress_threat_level6"):A>=3e3?t("fortress_threat_level5"):A>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(A,x){return A===0?At(-1):At((100-x)/(A*4))},stationed(){return We()},s_max(A){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(A){pe(`hf${i}${A}`,function(){switch(A){case"hostiles":return Wi("hostiles");case"threatLevel":return Wi("hostiles");case"armyLabel":return t("fortress_stationed");case"patLabel":return t("fortress_patrol_desc",[e.portal.fortress.patrols]);case"patSizeLabel":return t("fortress_patrol_size_desc",[e.portal.fortress.patrol_size]);case"hireLabel":return Wi("hireLabel")}},{elm:`#${i} span.${A}`})}),pe(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ho(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=ji();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=N(e.portal.guard_post.on));let i=0;if(e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(i=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),i>a&&(i=a)),k.war_droid){let n=k.war_droid-e.portal.fortress.patrols>0?k.war_droid-e.portal.fortress.patrols:0;a+=e.tech.hdroid?N(n*2):N(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(mt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function Go(r,a,i,s){let n=Math.round(Math.log2(r/e.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(n>0){n>e.portal.fortress.patrol_size&&(n=e.portal.fortress.patrol_size),n=Math.rand(i?1:0,n+1),c=Math.rand(0,n+1);let l=n-c;if(e.race.instinct){let o=Math.floor(c*(b.instinct.vars()[1]/100));c-=o,l+=o}s.wounded=l,s.died=c,e.civic.garrison.wounded+=l,e.civic.garrison.workers-=c,e.stats.died+=c}return c}function Uo(){let r={start:e.portal.fortress.threat,foundGems:0,stats:{wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0,surveyors:0}}},a=e.tech.armor?e.tech.armor:0;e.race.armored&&(a+=b.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(b.armored.vars(1)[1]*i)),e.race.scales&&(a+=b.scales.vars()[2]);let s=!1;if(k.soul_forge){let x=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size;ji()<=x?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let n=0;if(e.tech.portal>=3&&k.war_drone){r.drones={};for(let x=0;x=Math.rand(0,999)){let B=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10)),S=e.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);B=5?9e3:1e4)-e.portal.fortress.pity;if(e.race.universe==="evil"&&e.prestige.Dark.count>1){let x=e.prestige.Dark.count;e.prestige.Harmony.count>0&&(x*=1+e.prestige.Harmony.count*.01),l-=Math.round(Math.log2(x)*2)}e.tech.portal>=4&&k.attractor&&(l=Math.round(l*.948**k.attractor)),e.race.ghostly&&(l=Math.round(l*((100-b.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-b.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,_=!1,m=0;e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(m=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),m>e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size?(m-=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size,m/=e.portal.fortress.patrols):m=0);let w=+(m%1).toFixed(10);r.patrols={};for(let x=0;x1/e.portal.fortress.patrols*x?Math.ceil(m):Math.floor(m);if(Math.rand(0,e.portal.fortress.threat)>=Math.rand(0,999)){j.encounter=!0;let S=e.portal.fortress.patrol_size;h>0&&(j.droid=!0,S+=e.tech.hdroid?N(2):N(1),h--);let Q=Math.round(mt(S,"hellArmy",B)),V=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10));e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.rand(0,Math.ceil(V/10)),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?b.chameleon.vars()[1]:0,e.race.elusive?b.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=Go(Math.round(V*(1+Math.random()*3)),0,!0,j);let Y=Math.round(Q/2);V0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Ce=Math.round(Y/Ge);for(let wr=0;wre.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers);let A=e.portal.fortress.nocrew?e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.workers;if(A0&&e.portal.fortress.notify==="Yes"&&(M>0?I(t("fortress_patrol_casualties_revive",[d,M]),!1,!1,["hell"]):I(t("fortress_patrol_casualties",[d]),!1,!1,["hell"])),e.portal.fortress.garrison>0&&e.portal.fortress.siege>0&&e.portal.fortress.siege--,e.portal.fortress.siege<=900&&e.portal.fortress.garrison>0&&1>Math.rand(0,e.portal.fortress.siege)){let x={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},j=Ho(e.portal.fortress.garrison),B=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,V=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let Y=Math.round(Math.rand(1,B+1));if(Y>S&&(Y=S),S-=Y,e.portal.fortress.threat-=Y,e.stats.dkills+=Y,s&&(e.portal.soul_forge.kills+=Y,oi(Y)),V+=Y,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=V,r.stats.kills.sieges=V,ce?(I(t("fortress_lost"),!1,!1,["hell"]),x.surveyors=e.civic.hell_surveyor.workers,e.resource[e.race.species].amount-=e.civic.hell_surveyor.workers,e.civic.hell_surveyor.workers=0,e.civic.hell_surveyor.assigned=0,x.soldiers=e.portal.fortress.garrison,r.stats.died+=e.portal.fortress.garrison,e.portal.fortress.patrols=0,e.stats.died+=e.portal.fortress.garrison,e.civic.garrison.workers-=e.portal.fortress.garrison,e.portal.fortress.garrison=0,e.portal.fortress.assigned=0):I(t("fortress_sieged",[V,Q]),!1,!1,["hell"]),e.portal.fortress.siege=999,r.stats.sieges++,r.siege=x}if(e.portal.fortress.threat<1e4){let x=(1e4-e.portal.fortress.threat)/2500+1;e.tech.portal>=4&&k.attractor&&(x*=1+k.attractor*.22);let j=Math.rand(Math.round(10*x),Math.round(50*x));e.portal.fortress.threat+=j,r.demons=j}if(e.civic.hell_surveyor.display&&e.civic.hell_surveyor.workers>0){let x=1e3,j=ge("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+b.blurry.vars()[0]/100);let B=ve("yeti");B>0&&(x*=1+b.blurry.vars(1)[0]/100*B),e.race.instinct&&(x*=1+b.instinct.vars()[0]/100),e.tech.infernite&&e.tech.infernite>=5&&(x+=250);let S=e.portal.fortress.threat/x,Q=e.civic.hell_surveyor.workers>10?10:e.civic.hell_surveyor.workers,V=10-Math.rand(0,Q+1);if(S>V){let ce=Math.round(S),Y=Math.rand(0,ce+1);Y>e.civic.hell_surveyor.workers&&(Y=e.civic.hell_surveyor.workers),Y===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):Y>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[Y]),!1,!1,["hell"]),Y>0&&(r.surveyors=Y,r.stats.surveyors=Y,e.civic.hell_surveyor.workers-=Y,e.civic.hell_surveyor.max-=Y,e.resource[e.race.species].amount-=Y,e.portal.carport.damaged+=Y)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),Y.bodies=Ge,Ge>0){let Ce=25-Math.floor(k.attractor/5);Ce<5&&(Ce=5);let wr=Math.round(Ge/Ce);for(let Or=0;Or=1e6&&e.tech.gateway&&!e.tech.hell_pit&&(e.tech.hell_pit=1,e.settings.portal.pit=!0,I(t("portal_hell_pit_found"),"info",!1,["progress","hell"]),ir()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,B=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=B,r.soul_attractors=B,oi(B)}if(s&&e.tech.hell_gun&&k.gun_emplacement){r.gun_emplacements={};let j=0;for(let S=0;S=2?Math.rand(35,75):Math.rand(20,40);j+=Q,r.gun_emplacements[S+1].kills=Q}r.stats.kills.guns=j,e.portal.soul_forge.kills+=j,oi(j),e.stats.dkills+=j;let B=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(B*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,B)===0&&(r.soul_forge.gem=!0,r.stats.gems.soul_forge++,e.resource.Soul_Gem.amount++)}let x=e.tech.hell_pit>=6?75e4:1e6;if(e.tech.hell_pit>=7&&k.soul_attractor>0&&(x*=.97**k.soul_attractor),s&&e.portal.soul_forge.kills>=Math.round(x)){r.soul_forge.gem_craft=!0,e.portal.soul_forge.kills=0;let j=10-k.soul_attractor>0?10-k.soul_attractor:1;e.tech.high_tech>=16&&!e.tech.corrupt&&Math.rand(0,j+1)===0?(r.soul_forge.corrupt=!0,e.resource.Corrupt_Gem.amount++,e.resource.Corrupt_Gem.display=!0,I(t("portal_corrupt_gem"),"info",!1,["progress","hell"]),e.tech.corrupt=1,ue()):(e.resource.Soul_Gem.amount++,r.stats.gems.crafted++)}}if(e.tech.hell_gate&&e.tech.hell_gate>=3&&s&&k.gate_turret){r.gate_turrets={};let x=0,j=e.tech.hell_gun>=2?65:40,B=e.tech.hell_gun>=2?100:60;for(let Q=0;Q=5?2700:3e3;for(let Q=0;Q0&&(e.portal.soul_capacitor.energy+=r,e.portal.soul_capacitor.energy>e.portal.soul_capacitor.ecap&&(e.portal.soul_capacitor.energy=e.portal.soul_capacitor.ecap))}function Nr(r,a){switch(r){case"ruins":{let i=a||N(k.guard_post),s=(k.arcology||0)*75,n=mt(i,"hellArmy",0);e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let l=(n+s)/5e3;return{supress:l>1?1:l,rating:n+s}}case"gate":{let i=Nr("ruins",a),s=(k.gate_turret||0)*100;e.race.holy&&(s*=1+b.holy.vars()[1]/100);let n=ve("unicorn");n>0&&(s*=1+b.holy.vars(1)[1]/100*n);let c=(i.rating+s)/7500;return{supress:c>1?1:c,rating:i.rating+s}}default:return 0}}var xa={fire_elm:{weapon:{laser:1.05,flame:0,plasma:.25,kinetic:.5,missile:.5,sonic:1,shotgun:.75,tesla:.65},nozone:{freeze:!0,flooded:!0},amp:{hot:1.75,humid:.8,steam:.9}},water_elm:{weapon:{laser:.65,flame:.5,plasma:1,kinetic:.2,missile:.5,sonic:.5,shotgun:.25,tesla:.75},nozone:{hot:!0,freeze:!0},amp:{steam:1.5,river:1.1,flooded:2,rain:1.75,humid:1.25}},rock_golem:{weapon:{laser:1,flame:.5,plasma:1,kinetic:.65,missile:.95,sonic:.75,shotgun:.35,tesla:0},nozone:{},amp:{}},bone_golem:{weapon:{laser:.45,flame:.35,plasma:.55,kinetic:1,missile:1,sonic:.75,shotgun:.75,tesla:.15},nozone:{},amp:{}},mech_dino:{weapon:{laser:.85,flame:.05,plasma:.55,kinetic:.45,missile:.5,sonic:.35,shotgun:.5,tesla:1},nozone:{},amp:{}},plant:{weapon:{laser:.42,flame:1,plasma:.65,kinetic:.2,missile:.25,sonic:.75,shotgun:.35,tesla:.38},nozone:{},amp:{}},crazed:{weapon:{laser:.5,flame:.85,plasma:.65,kinetic:1,missile:.35,sonic:.15,shotgun:.95,tesla:.6},nozone:{},amp:{}},minotaur:{weapon:{laser:.32,flame:.5,plasma:.82,kinetic:.44,missile:1,sonic:.15,shotgun:.2,tesla:.35},nozone:{},amp:{}},ooze:{weapon:{laser:.2,flame:.65,plasma:1,kinetic:0,missile:0,sonic:.85,shotgun:0,tesla:.15},nozone:{},amp:{}},zombie:{weapon:{laser:.35,flame:1,plasma:.45,kinetic:.08,missile:.8,sonic:.18,shotgun:.95,tesla:.05},nozone:{},amp:{}},raptor:{weapon:{laser:.68,flame:.55,plasma:.85,kinetic:1,missile:.44,sonic:.22,shotgun:.33,tesla:.66},nozone:{},amp:{}},frost_giant:{weapon:{laser:.9,flame:.82,plasma:1,kinetic:.25,missile:.08,sonic:.45,shotgun:.28,tesla:.5},nozone:{hot:!0},amp:{freeze:2.5,hail:1.65}},swarm:{weapon:{laser:.02,flame:1,plasma:.04,kinetic:.01,missile:.08,sonic:.66,shotgun:.38,tesla:.45},nozone:{},amp:{}},dragon:{weapon:{laser:.18,flame:0,plasma:.12,kinetic:.35,missile:1,sonic:.22,shotgun:.65,tesla:.15},nozone:{},amp:{}},mech_dragon:{weapon:{laser:.84,flame:.1,plasma:.68,kinetic:.18,missile:.75,sonic:.22,shotgun:.28,tesla:1},nozone:{},amp:{}},construct:{weapon:{laser:.5,flame:.2,plasma:.6,kinetic:.34,missile:.9,sonic:.08,shotgun:.28,tesla:1},nozone:{},amp:{}},beholder:{weapon:{laser:.75,flame:.15,plasma:1,kinetic:.45,missile:.05,sonic:.01,shotgun:.12,tesla:.3},nozone:{},amp:{}},worm:{weapon:{laser:.55,flame:.38,plasma:.45,kinetic:.2,missile:.05,sonic:1,shotgun:.02,tesla:.01},nozone:{},amp:{}},hydra:{weapon:{laser:.85,flame:.75,plasma:.85,kinetic:.25,missile:.45,sonic:.5,shotgun:.6,tesla:.65},nozone:{},amp:{}},colossus:{weapon:{laser:1,flame:.05,plasma:.75,kinetic:.45,missile:1,sonic:.35,shotgun:.35,tesla:.5},nozone:{},amp:{}},lich:{weapon:{laser:.1,flame:.1,plasma:.1,kinetic:.45,missile:.75,sonic:.35,shotgun:.75,tesla:.5},nozone:{},amp:{}},ape:{weapon:{laser:1,flame:.95,plasma:.85,kinetic:.5,missile:.5,sonic:.05,shotgun:.35,tesla:.68},nozone:{},amp:{}},bandit:{weapon:{laser:.65,flame:.5,plasma:.85,kinetic:1,missile:.5,sonic:.25,shotgun:.75,tesla:.25},nozone:{},amp:{}},croc:{weapon:{laser:.65,flame:.05,plasma:.6,kinetic:.5,missile:.5,sonic:1,shotgun:.2,tesla:.75},nozone:{},amp:{}},djinni:{weapon:{laser:0,flame:.35,plasma:1,kinetic:.15,missile:0,sonic:.65,shotgun:.22,tesla:.4},nozone:{},amp:{}},snake:{weapon:{laser:.5,flame:.5,plasma:.5,kinetic:.5,missile:.5,sonic:.5,shotgun:.5,tesla:.5},nozone:{},amp:{}},centipede:{weapon:{laser:.5,flame:.85,plasma:.95,kinetic:.65,missile:.6,sonic:0,shotgun:.5,tesla:.01},nozone:{},amp:{}},spider:{weapon:{laser:.65,flame:1,plasma:.22,kinetic:.75,missile:.15,sonic:.38,shotgun:.9,tesla:.18},nozone:{},amp:{}},manticore:{weapon:{laser:.05,flame:.25,plasma:.95,kinetic:.5,missile:.15,sonic:.48,shotgun:.4,tesla:.6},nozone:{},amp:{}},fiend:{weapon:{laser:.75,flame:.25,plasma:.5,kinetic:.25,missile:.75,sonic:.25,shotgun:.5,tesla:.5},nozone:{},amp:{}},bat:{weapon:{laser:.16,flame:.18,plasma:.12,kinetic:.25,missile:.02,sonic:1,shotgun:.9,tesla:.58},nozone:{},amp:{}},medusa:{weapon:{laser:.35,flame:.1,plasma:.3,kinetic:.95,missile:1,sonic:.15,shotgun:.88,tesla:.26},nozone:{},amp:{}},ettin:{weapon:{laser:.5,flame:.35,plasma:.8,kinetic:.5,missile:.25,sonic:.3,shotgun:.6,tesla:.09},nozone:{},amp:{}},faceless:{weapon:{laser:.6,flame:.28,plasma:.6,kinetic:0,missile:.05,sonic:.8,shotgun:.15,tesla:1},nozone:{},amp:{}},enchanted:{weapon:{laser:1,flame:.02,plasma:.95,kinetic:.2,missile:.7,sonic:.05,shotgun:.65,tesla:.01},nozone:{},amp:{}},gargoyle:{weapon:{laser:.15,flame:.4,plasma:.3,kinetic:.5,missile:.5,sonic:.85,shotgun:1,tesla:.2},nozone:{},amp:{}},chimera:{weapon:{laser:.38,flame:.6,plasma:.42,kinetic:.85,missile:.35,sonic:.5,shotgun:.65,tesla:.8},nozone:{},amp:{}},gorgon:{weapon:{laser:.65,flame:.65,plasma:.65,kinetic:.65,missile:.65,sonic:.65,shotgun:.65,tesla:.65},nozone:{},amp:{}},kraken:{weapon:{laser:.75,flame:.35,plasma:.75,kinetic:.35,missile:.5,sonic:.18,shotgun:.05,tesla:.85},nozone:{},amp:{}},homunculus:{weapon:{laser:.05,flame:1,plasma:.1,kinetic:.85,missile:.65,sonic:.5,shotgun:.75,tesla:.2},nozone:{},amp:{}}};function ha(r,a){let i=9999,s=1e7;switch(r){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=a?n*2.5:n,i=a?20:1}break;case"medium":s=a?45e4:18e4,i=a?100:4;break;case"large":s=a?925e3:375e3,i=a?500:20;break;case"titan":s=a?15e5:75e4,i=a?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=a?n*2.5:n,i=1}break}return{s:i,c:s}}function qu(r){let a="laser",i="laser";return Object.keys(xa[r].weapon).forEach(function(s){xa[r].weapon[s]>xa[r].weapon[a]&&(a=s),xa[r].weapon[s]');r.append(a);let i=$(`
${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);a.append(i),i.append(` | ${t("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),i.append(` | ${t("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let s=e.blood.prepared&&e.blood.prepared>=3?`${t("portal_mech_infernal")} (${t("portal_mech_infernal_effect",[25])})`:"";a.append(`
${t("portal_mech_space")} {{ b.size | bay }} | ${t("portal_mech_cost")} {{ b.size | price }} | ${t("portal_mech_soul",[e.resource.Soul_Gem.name])} {{ b.size | soul }}${s}
`),a.append("
{{ b.size | desc }}
");let n=$('
');a.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(h,_){c+=`${t(`portal_mech_size_${h}`)}`}),n.append(` + `),m+="",a.append(m),D({el:"#celestialLab",data:{p:_,w:i},methods:{pEdit(){_.pts=Js(_,r?i:!1)},setPlanet(){if(Js(_)>=0){Object.keys(_.geology).forEach(function(F){_.geology[F]===0?delete _.geology[F]:_.geology[F]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let w=ot();e.custom.planet.hasOwnProperty(w)||(e.custom.planet[w]={s:!1});let M="s";e.custom.planet[w][M]=Ke(_),delete e.custom.planet[w][M].pts,io(_)}},reset(){_.traitlist=[],Object.keys(_.geology).forEach(function(w){_.geology[w]=0}),_.pts=Js(_,r?i:!1)},less(w){_.geology[w]-=fe(),_.geology[w]<-20&&(_.geology[w]=-20)},more(w){_.geology[w]+=fe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),_.biome==="eden"&&(M+=5),_.geology[w]>M&&(_.geology[w]=M)}},filters:{res(w){return _.geology[w]}}})}function Js(r,a){let i=(r.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=r.traitlist.length**3;let s=0;return Object.keys(r.geology).forEach(function(n){r.geology[n]!==0&&(i-=r.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}var si={unemployed:function(r){let a=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!r&&(a=a+" "+t("job_default",[t("job_unemployed")])),a},hunter:function(r){let a=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(a=t("job_eld_hunter_desc")),e.race.artifical?a=e.race.soul_eater?t("job_art_demon_hunter_desc",[e.resource.Furs.name,e.resource.Lumber.name]):t("job_art_hunter_desc",[e.resource.Furs.name]):e.race.soul_eater&&e.race.species!=="wendigo"&&(a=t(e.race.evil?"job_evil_hunter_desc":"job_not_evil_hunter_desc",[e.resource.Food.name,e.resource.Lumber.name,e.resource.Furs.name])),e.civic.d_job==="hunter"&&!r&&(a=a+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),a},forager:function(r){let a=t("job_forager_desc");return e.civic.d_job==="forager"&&!r&&(a=a+" "+t("job_default",[t("job_forager")])),a},farmer:function(r){let a=+Oi(!0,r).toFixed(2),i=+Oi(!1,r).toFixed(2);r||(a=+ye(a,"farmer").toFixed(2),i=+ye(i,"farmer").toFixed(2));let s=e.race.high_pop&&!r?t("job_farmer_desc_hp",[a,e.resource.Food.name,N(1),i,N(1)*e.city.farm.count]):t("job_farmer_desc",[a,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!r&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(r){let a=r&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(r||(a=+ye(a,"lumberjack").toFixed(2),i=+ye(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;r||(s*=$t(a,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),l=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!r&&(l=l+" "+t("job_default",[t("job_reclaimer")])),l}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;r||(s*=$t(a,"lumberjack")),e.city.biome==="forest"&&(i*=qe.forest.vars()[0]),e.city.biome==="savanna"&&(i*=qe.savanna.vars()[2]),e.city.biome==="desert"&&(i*=qe.desert.vars()[2]),e.city.biome==="swamp"&&(i*=qe.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=qe.taiga.vars()[0]);let n=+(i*s).toFixed(2),c=t("job_lumberjack_desc",[n,e.resource.Lumber.name]);return e.civic.d_job==="lumberjack"&&!r&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(r){let a=r&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;r||(a=+ye(a,"quarry_worker").toFixed(2),i=+ye(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;r||(s*=$t(a,"miner")),e.city.biome==="desert"&&(s*=qe.desert.vars()[0]),e.city.biome==="swamp"&&(s*=qe.swamp.vars()[3]),e.tech.explosives&&e.tech.explosives>=2&&(s*=e.tech.explosives>=3?1.75:1.5);let n=+(i*s).toFixed(1),c=e.resource.Aluminium.display?t("job_quarry_worker_desc2",[n,e.resource.Stone.name,e.resource.Aluminium.name]):t("job_quarry_worker_desc1",[n,e.resource.Stone.name]);return e.race.smoldering&&(c=c+" "+t("job_quarry_worker_smoldering",[e.resource.Chrysotile.name])),e.civic.d_job==="quarry_worker"&&!r&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(r){let a=r&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;r||(a=+ye(a,"crystal_miner").toFixed(2),i=+ye(i,"crystal_miner").toFixed(2),s*=$t(a,"miner"));let n=+(i*s).toFixed(2),c=t("job_crystal_miner_desc",[n,e.resource.Crystal.name]);return e.civic.d_job==="crystal_miner"&&!r&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(r){let a=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(a*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!r&&(a*=b.high_pop.vars()[1]/100),r||(a=+ye(a,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[A[e.race.species].home,a]);return e.civic.d_job==="scavenger"&&!r&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(r){let a=t("job_teamster_desc",[En()]);return e.civic.d_job==="teamster"&&!r&&(a=a+" "+t("job_default",[t("job_teamster")])),a},meditator:function(r){let a=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!r&&(a=a+" "+t("job_default",[t("job_meditator")])),a},torturer:function(){return t("job_torturer_desc")},miner:function(){return e.tech.mining>=3?e.race.sappy&&e.tech.alumina?t("job_miner_desc2_amber"):t("job_miner_desc2"):t("job_miner_desc1")},coal_miner:function(){return e.tech.uranium?t("job_coal_miner_desc2"):t("job_coal_miner_desc1")},craftsman:function(){return t("job_craftsman_desc")},cement_worker:function(){let r=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(r*=qe.ashland.vars()[1]),r=+ye(r,"cement_worker").toFixed(2);let a=+ye(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$t(e.civic.cement_worker.workers,"factory"),n=a*i*s;return e.city.biome==="ashland"&&(n*=qe.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,r])},banker:function(){let r=+ye(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(r+=2*e.tech.stock_exchange),e.race.truthful&&(r*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(r*=1.25),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+r.toFixed(0),t("job_banker_desc",[r])},entertainer:function(){let r=e.tech.theatre;e.race.musical&&(r+=b.musical.vars()[0]),e.race.emotionless&&(r*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(r*=b.high_pop.vars()[1]/100),r=+ye(r,"entertainer").toFixed(2);let a=e.race.high_pop?b.high_pop.vars()[1]/100:1;return a=+ye(a,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[r,a]):t("job_entertainer_desc",[+r.toFixed(2)])},priest:function(){let r="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?r=t("job_priest_desc2"):r=t("job_priest_desc"),e.tech.cleric&&(r=r+` ${t("job_priest_desc3")}`),r},professor:function(){let r=+ye(1,"professor"),a=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=ve("elven");return i>0&&(a+=b.studious.vars(1)[0]*i),r*=a,r*=e.race.pompous?1-b.pompous.vars()[0]/100:1,r*=$t(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(r*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(r*=.75),r=+r.toFixed(2),t("job_professor_desc",[r])},scientist:function(){let r=+ye(e.civic.scientist.impact,"scientist").toFixed(2);return r*=$t(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(r*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(r*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(r*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),r=+r.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[r,+(.025*ft("magic")).toFixed(4)]):t("job_scientist_desc",[r])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[W().red])},titan_colonist(){return t("job_colonist_desc_tp",[W().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let r=(k.arcology||0)*75,a=(mt(e.portal.guard_post.on,"hellArmy",0)+r)/5e3;a=a>1?1:a;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*a);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[A[e.race.species].home])])},crew(){return t("job_crew_desc")}};function $i(r){r||$("#civics").append($(`

${t("civics_jobs")}

`)),At("unemployed",r,0,0,"warning"),At("hunter",r,0,0),At("forager",r,0,0),At("farmer",r,.82,5),At("lumberjack",r,1,5),At("quarry_worker",r,1,5),At("crystal_miner",r,.1,5),At("scavenger",r,.12,5),At("teamster",r,1,e.tech.teamster?6:4),At("meditator",r,1,5),At("torturer",r,1,3,"advanced"),At("miner",r,1,4,"advanced"),At("coal_miner",r,.2,4,"advanced"),At("craftsman",r,1,5,"advanced"),At("cement_worker",r,.4,5,"advanced"),At("entertainer",r,1,10,"advanced"),At("priest",r,1,3,"advanced"),At("professor",r,.5,6,"advanced"),At("scientist",r,1,5,"advanced"),At("banker",r,.1,6,"advanced"),At("colonist",r,1,5,"advanced"),At("titan_colonist",r,1,5,"advanced"),At("space_miner",r,1,5,"advanced"),At("hell_surveyor",r,1,1,"advanced"),At("archaeologist",r,1,1,"advanced"),At("pit_miner",r,1,4.5,"advanced"),At("crew",r,1,4,"alert"),!r&&!e.race.start_cataclysm&&(Lt(),e.race.servants&&oc())}function ye(r,a){return e.race.strong&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars()[1]),(e.race.swift||e.race.living_tool)&&["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)&&(r*=b.strong.vars(.25)[1]),e.race.lone_survivor&&(["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].includes(a)?r*=80:["craftsman"].includes(a)?r*=60:["miner","coal_miner","cement_worker","banker","entertainer","priest","pit_miner"].includes(a)?r*=45:["professor","scientist"].includes(a)&&(r*=125)),r}function N(r){return e.race.high_pop?r*b.high_pop.vars()[0]:r}function tn(r){let a="";e.race.unfathomable&&r==="hunter"?a=t("job_raider"):e.race.universe==="magic"&&r==="scientist"?a=t("job_wizard"):e.race.truepath&&r==="colonist"?a=t("job_colonist_tp",[W().red]):r==="titan_colonist"?a=t("job_colonist_tp",[W().titan]):a=r==="lumberjack"&&e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")?t("job_reclaimer"):t("job_"+r),e.civic[r].name=a}function At(r,a,i,s,n){let c=!1;if(a==="servant"&&(c=!0,a=!1),e.civic[r]||(e.civic[r]={job:r,display:!1,workers:0,max:0,impact:i}),tn(r),e.civic[r].assigned||(e.civic[r].assigned=r==="craftsman"?0:e.civic[r].workers),c||(e.civic[r].stress=s,e.civic[r].impact=i),!(r==="craftsman"||a)){var l=c?"servant-"+r:"civ-"+r,o=$(`
`),d=c?$('
'):$(`
`);if(!n||r==="unemployed"){n=n||"info";let m=c?$(`

{{ civic.${r}.name }}

{{ sjob.${r} }}
`):$(``);o.append(m)}else{let m=$(`

{{ civic.${r}.name }}

{{ civic.${r}.workers | adjust('${r}') }} / {{ civic.${r}.max | adjust('${r}') }}
`);o.append(m)}if(o.append(d),$(c?"#servants":"#jobs").append(o),r!=="crew"){var h=$(`«`),_=$(`»`);d.append(h),d.append(_)}c?D({el:`#${l}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(m){return e.civic[m].display||m==="scavenger"&&e.race.servants.force_scavenger},add(){let m=fe();for(let w=0;we.race.servants.used;w++)e.race.servants.jobs[r]++,e.race.servants.used++},sub(){let m=fe();for(let w=0;w0;w++)e.race.servants.jobs[r]--,e.race.servants.used--}}}):D({el:`#${l}`,data:{civic:e.civic},methods:{showJob(m){return e.civic[m].display},add(){let m=fe();for(let w=0;w0);w++)e.civic[r].workers++,e.civic[e.civic.d_job].workers--,e.civic[r].assigned=e.civic[r].workers},sub(){let m=fe();for(let w=0;w0;w++)e.civic[r].workers--,e.civic[e.civic.d_job].workers++,e.civic[r].assigned=e.civic[r].workers},level(m){return e.civic[m].workers===0?"count has-text-danger":e.civic[m].workers===e.civic[m].max?"count has-text-success":e.civic[m].workers<=e.civic[m].max/3?"count has-text-caution":e.civic[m].workers<=e.civic[m].max*.66?"count has-text-warning":e.civic[m].workers0)return w}return m},adjust(m,w){return w==="titan_colonist"&&k.ai_colonist?m+N(k.ai_colonist):m}}}),pe(l,function(){return si[r](c)},{elm:`#${l} .job_label`,classes:"has-background-light has-text-dark"})}}function oc(){if(le($("#servants")),e.race.servants){var r=$(`

${t("civics_servants")}

{{ s.used }} / {{ s.max }}
`);$("#servants").append(r),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(a){At(a,"servant")}),D({el:"#servantList",data:{s:e.race.servants},methods:{level(){return e.race.servants.used===0?"count has-text-danger":e.race.servants.used===e.race.servants.max?"count has-text-success":e.race.servants.used<=e.race.servants.max/3?"count has-text-caution":e.race.servants.used<=e.race.servants.max*.66?"count has-text-warning":e.race.servants.used=2?1.15:.65),e.race.living_tool&&!a?i*=1+b.living_tool.vars()[0]*(e.tech.science&&e.tech.science>0?e.tech.science/5:0):i*=1+(e.tech.hoe&&e.tech.hoe>0?e.tech.hoe/3:0),i*=e.city.biome==="grassland"?qe.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?qe.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?qe.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?qe.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?qe.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Re.trashed.vars()[0]:1,a?i*=pr(e.race.servants.jobs.farmer,"farmer"):i*=$t(e.civic.farmer.workers,"farmer"),i*=e.tech.agriculture>=7?1.1:1,i*=e.race.low_light?1-b.low_light.vars()[0]/100:1,i}function Lt(r){if(le($(r?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let a=$(r?"#skilledServants":"#foundry"),i=r?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`

${t(r?"civics_skilled_servants":"craftsman_assigned")}

${i}
`);a.append(s);let n=Ve("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];r||(c.push("Scarletite"),c.push("Quantium")),n&&!r&&c.push("Thermite");for(let o=0;o');a.append(_);let m=$('
'),w;if(d==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))w=$(`

${h}

{{ f.${d} }} / {{ p.on | maxScar }}
`);else if(d==="Quantium"&&(e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")))w=$(`

${h}

{{ f.${d} }} / {{ e.on | maxQuantium }}
`);else{let x=r?`{{ s.sjobs.${d} }}`:`{{ f.${d} }}`,j=r?`scraft${d}`:`craft${d}`;w=$(`

${h}

${x}
`)}_.append(w),_.append(m),a.append(_);let M=$(`«`),F=$(`»`);m.append(M),m.append(F)}}let l=e.portal.hasOwnProperty("hell_forge")?{c:e.civic.craftsman,p:e.portal.hell_forge}:{c:e.civic.craftsman,e:e.space.hasOwnProperty("zero_g_lab")||e.tauceti.hasOwnProperty("infectious_disease_lab")?e.tech.isolation?e.tauceti.infectious_disease_lab:e.space.zero_g_lab:{count:0,on:0}};r?l.s=e.race.servants:l.f=e.city.foundry,D({el:r?"#skilledServants":"#foundry",data:l,methods:{add(o){let d=fe(),h=-1;(o==="Scarletite"||o==="Quantium")&&(h=en(o));for(let _=0;_0&&(h===-1||h>e.city.foundry[o]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[o]++,e.civic[e.civic.d_job].workers--;else break},sub(o){let d=fe();for(let h=0;h0)e.race.servants.sjobs[o]--,e.race.servants.sused--;else break;else if(e.city.foundry[o]>0)e.city.foundry[o]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let o=r?e.race.servants.sused:e.civic.craftsman.workers,d=r?e.race.servants.smax:e.civic.craftsman.max;return o===0?"count has-text-danger":o===d?"count has-text-success":o<=d/3?"count has-text-caution":o<=d*.66?"count has-text-warning":o"),w=e.resource[d].name,F=Ua(d,"auto").multiplier,x=e.genes.crafty?2:1,j=+e.resource[d].diff.toFixed(2),B=+(F*100).toFixed(0);m.append($(`
${t("craftsman_hover_bonus",[B.toLocaleString(),w])}
`)),m.append($(`
${t("craftsman_hover_prod",[j.toLocaleString(),w])}
`));let S=wa();for(let Q=0;Q0&&(V-=b.resourceful.vars(1)[0]/100*ce);let Y=+(S[d][Q].a*e.city.foundry[d]*V*x/140).toFixed(2);m.append($(`
${t("craftsman_hover_cost",[Y,e.resource[S[d][Q].r].name])}
`))}return m},_=r?`scraft${d}`:`craft${d}`;rn(_,d,"auto",h)}}r?pe("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):pe("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!r&&e.race.servants.smax>0&&Lt(!0)}}var br={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let r=200;return k.repair_droid&&(r*=.95**k.repair_droid),Math.round(r)}},turret:{id:"portal-turret",title(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(r)},desc(){let r=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(r)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(r){return f("turret",r,35e4,1.28,"portal")},Copper(r){return f("turret",r,5e4,1.28,"portal")},Adamantite(r){return f("turret",r,8e3,1.28,"portal")},Elerium(r){return f("turret",r,15,1.28,"portal")},Nano_Tube(r){return f("turret",r,28e3,1.28,"portal")}},powered(){return _e(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,D({el:"#fort"},"update")},effect(){let r=e.tech.turret?e.tech.turret>=2?70:50:35,a=$(this)[0].powered();return`
${t("portal_turret_effect",[r])}
${t("minus_power",[a])}
`},action(){return u($(this)[0])?(ne("turret","portal"),re($(this)[0])&&(k.turret++,D({el:"#fort"},"update")),!0):!1}},carport:{id:"portal-carport",title:t("portal_carport_title"),desc(){return t("portal_carport_desc",[1])},reqs:{portal:2},cost:{Money(r){return f("carport",r,25e4,1.3,"portal")},Cement(r){return f("carport",r,18e3,1.3,"portal")},Oil(r){return f("carport",r,6500,1.3,"portal")},Plywood(r){return f("carport",r,8500,1.3,"portal")}},repair(){let r=180;return k.repair_droid&&(r*=.92**k.repair_droid),Math.round(r)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return u($(this)[0])?(ne("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=N(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,ue()),!0):!1}},war_droid:{id:"portal-war_droid",title:t("portal_war_droid_title"),desc(){return`
${t("portal_war_droid_title")}
${t("requires_power")}
`},reqs:{portal:5},cost:{Money(r){return f("war_droid",r,495e3,1.26,"portal")},Neutronium(r){return f("war_droid",r,1250,1.26,"portal")},Elerium(r){return f("war_droid",r,18,1.26,"portal")},Stanene(r){return f("war_droid",r,37500,1.26,"portal")},Soul_Gem(r){return f("war_droid",r,1,1.26,"portal")}},powered(){return _e(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_droid_flair")},repair_droid:{id:"portal-repair_droid",title:t("portal_repair_droid_title"),desc(){return`
${t("portal_repair_droid_title")}
${t("requires_power")}
`},reqs:{portal:6},cost:{Money(r){return f("repair_droid",r,444e3,1.26,"portal")},Iron(r){return f("repair_droid",r,88e3,1.26,"portal")},Iridium(r){return f("repair_droid",r,17616,1.26,"portal")},Infernite(r){return f("repair_droid",r,666,1.26,"portal")},Soul_Gem(r){return f("repair_droid",r,1,1.15,"portal")}},powered(){return _e(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("repair_droid","portal"),re($(this)[0]),!0):!1},flair:t("portal_repair_droid_flair")}},prtl_badlands:{info:{name:t("portal_badlands_name"),desc:t("portal_badlands_desc")},war_drone:{id:"portal-war_drone",title:t("portal_war_drone_title"),desc(){return`
${t("portal_war_drone_title")}
${t("requires_power")}
`},reqs:{portal:3},powered(){return _e(5)},cost:{Money(r){return f("war_drone",r,65e4,1.28,"portal")},Alloy(r){return f("war_drone",r,6e4,1.28,"portal")},Graphene(r){return f("war_drone",r,1e5,1.28,"portal")},Elerium(r){return f("war_drone",r,25,1.28,"portal")},Soul_Gem(r){return f("war_drone",r,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("war_drone","portal"),re($(this)[0]),!0):!1},flair:t("portal_war_drone_flair")},sensor_drone:{id:"portal-sensor_drone",title:t("portal_sensor_drone_title"),desc(){return`
${t("portal_sensor_drone_title")}
${t("requires_power")}
`},reqs:{infernite:2},powered(){return _e(3)},cost:{Money(r){return f("sensor_drone",r,5e5,1.25,"portal")},Polymer(r){return f("sensor_drone",r,25e3,1.25,"portal")},Adamantite(r){return f("sensor_drone",r,12500,1.25,"portal")},Infernite(r){return f("sensor_drone",r,100,1.25,"portal")}},effect(){let r=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,a=e.tech.infernite>=6?2500:1e3,i=e.race.cataclysm?`
${t("space_moon_observatory_cata_effect",[2])}
`:`
${t("space_moon_observatory_effect",[2])}
${t("portal_sensor_drone_effect2",[2])}
`,s=e.tech.science>=14?`
${t("city_max_knowledge",[a])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[r])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("sensor_drone","portal"),re($(this)[0]),!0):!1}},attractor:{id:"portal-attractor",title:t("portal_attractor_title"),desc(){return`
${t("portal_attractor_title")}
${t("requires_power")}
`},reqs:{portal:4},powered(){return _e(3)},cost:{Money(r){return f("attractor",r,35e4,1.25,"portal")},Aluminium(r){return f("attractor",r,175e3,1.25,"portal")},Stanene(r){return f("attractor",r,9e4,1.25,"portal")}},effect(){return`
${t("portal_attractor_effect1")}
${t("portal_attractor_effect2",[e.resource.Soul_Gem.name])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("attractor","portal"),re($(this)[0]),!0):!1}}},prtl_pit:{info:{name:t("portal_pit_name"),desc:t("portal_pit_desc")},pit_mission:{id:"portal-pit_mission",title:t("portal_pit_mission_title"),desc:t("portal_pit_mission_title"),reqs:{hell_pit:1},grant:["hell_pit",2],queue_complete(){return e.tech.hell_pit>=2?0:1},cost:{Money(){return 5e6},Helium_3(){return 3e5},Deuterium(){return 2e5}},effect:t("portal_pit_mission_effect"),action(){return u($(this)[0])?(I(t("portal_pit_mission_result"),"info",!1,["progress","hell"]),!0):!1}},assault_forge:{id:"portal-assault_forge",title:t("portal_assault_forge_title"),desc:t("portal_assault_forge_title"),reqs:{hell_pit:2},grant:["hell_pit",3],queue_complete(){return e.tech.hell_pit>=3?0:1},cost:{Money(){return 1e7},HellArmy(){return Math.round(650/mt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return u($(this)[0])?(I(t("portal_assault_forge_result"),"info",!1,["progress","hell"]),!0):!1}},soul_forge:{id:"portal-soul_forge",title:t("portal_soul_forge_title"),desc(){return`
${t("portal_soul_forge_desc")}
${t("requires_power")}
`},reqs:{hell_pit:4},queue_complete(){return 1-e.portal.soul_forge.count},powered(){return _e(30)},postPower(r){D({el:"#fort"},"update")},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(r){let a=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((r||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6;e.tech.hell_pit>=7&&k.soul_attractor>0&&(n*=.97**k.soul_attractor),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ji();return`${a}
${t("portal_soul_forge_soldiers",[s])}, ${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])&&e.portal.soul_forge.count<1?(ne("soul_forge","portal"),re($(this)[0]),!0):!1}},gun_emplacement:{id:"portal-gun_emplacement",title:t("portal_gun_emplacement_title"),desc(){return`
${t("portal_gun_emplacement_title")}
${t("requires_power")}
`},reqs:{hell_gun:1},powered(){return _e(3)},cost:{Money(r){return f("gun_emplacement",r,4e6,1.25,"portal")},Coal(r){return f("gun_emplacement",r,25e4,1.25,"portal")},Steel(r){return f("gun_emplacement",r,12e5,1.25,"portal")},Wrought_Iron(r){return f("gun_emplacement",r,2e5,1.25,"portal")}},effect(){let r=e.tech.hell_gun>=2?2:1,a=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[r])}
${t("portal_gun_emplacement_effect2",[a,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gun_emplacement","portal"),re($(this)[0]),!0):!1}},soul_attractor:{id:"portal-soul_attractor",title:t("portal_soul_attractor_title"),desc(){return`
${t("portal_soul_attractor_title")}
${t("requires_power")}
`},reqs:{hell_pit:5},powered(){return _e(4)},cost:{Money(r){return f("soul_attractor",r,12e6,1.25,"portal")},Stone(r){return f("soul_attractor",r,23e6,1.25,"portal")},Nano_Tube(r){return f("soul_attractor",r,314159,1.25,"portal")},Vitreloy(r){return f("soul_attractor",r,1618,1.25,"portal")},Aerogel(r){return f("soul_attractor",r,18e4,1.25,"portal")}},effect(){let r=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",a=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+a,120+a])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("soul_attractor","portal"),re($(this)[0]),!0):!1}},soul_capacitor:{id:"portal-soul_capacitor",title:t("portal_soul_capacitor_title"),desc(){return`
${t("portal_soul_capacitor_desc")}
${t("requires_power")}
`},reqs:{forbidden:2},powered(){return _e(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,75e7,1.01,"portal")},Crystal(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,65e5,1.01,"portal")},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e4,1.01,"portal")},Stanene(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,25e5,1.01,"portal")},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,1e6,1.01,"portal")},Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,3,1.01,"portal")},Mythril(r){return(r||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:f("soul_capacitor",r,125e4,1.01,"portal")}},effect(){let r=25e5,a=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.ecap:0,i=e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.energy:0,s=`
${t("portal_soul_capacitor_effect",[i.toLocaleString()])}
`;return s+=`
${t("portal_soul_capacitor_effect2",[a.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[r.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&u($(this)[0])?(e.portal.soul_capacitor.count++,re($(this)[0]),!0):!1},postPower(){Ci($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(r){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||r?`
${t("portal_absorption_chamber_title")}
${t("requires_segments",[100])}
`:`
${t("portal_absorption_chamber_title")}
`},reqs:{forbidden:3},queue_size:5,queue_complete(){return 100-e.portal.absorption_chamber.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(r){return(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(r){let a=(r||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(a<100){let i=100-a;return`
${t("portal_absorption_chamber_incomplete")}
${t("space_dwarf_collider_effect2",[i])}
`}else{if(e.tech.forbidden===5)return`
${t("portal_absorption_chamber_effect_eld",[1e8.toLocaleString()])}
${t("tech_demonic_infusion_effect2",[ct("descend").artifact])}
`;{let i=Ys();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(u($(this)[0])){if(e.portal.absorption_chamber.count<100)return ne("absorption_chamber","portal"),e.portal.absorption_chamber.count>=100&&(e.tech.forbidden=4),!0;if(e.portal.soul_capacitor.energy>=1e8)return e.tech.forbidden===5?Ts():vs(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,r},filter(r,a){let i=Nr("ruins");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},ruins_mission:{id:"portal-ruins_mission",title:t("portal_ruins_mission_title"),desc:t("portal_ruins_mission_title"),reqs:{hell_ruins:1},grant:["hell_ruins",2],queue_complete(){return e.tech.hell_ruins>=2?0:1},cost:{Money(){return 1e8},Oil(){return 5e5},Helium_3(){return 5e5}},effect:t("portal_ruins_mission_effect"),action(){return u($(this)[0])?(I(t("portal_ruins_mission_result"),"info",!1,["progress","hell"]),e.portal.vault={count:0},e.portal.stonehedge={count:0},e.portal.archaeology={count:0,on:0},!0):!1}},guard_post:{id:"portal-guard_post",title:t("portal_guard_post_title"),desc(){return`
${t("portal_guard_post_title")}
${t("requires_soldiers")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("guard_post",r,8e6,1.06,"portal")},Lumber(r){return f("guard_post",r,65e5,1.06,"portal")},Sheet_Metal(r){return f("guard_post",r,3e5,1.06,"portal")}},powered(){return _e(5)},support(){return 1},effect(){let r=e.race.holy?1+b.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=Math.round(r*mt(N(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[N(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")}},vault:{id:"portal-vault",title:t("portal_vault_title"),desc:t("portal_vault_title"),reqs:{hell_ruins:2,hell_vault:1},condition(){return!(e.portal.vault.count>=2)},queue_complete(){return 2-e.portal.vault.count},cost:{Soul_Gem(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(r){return(r||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){if(e.portal.vault.count<2&&u($(this)[0])){if(ne("vault","portal"),e.portal.vault.count===2&&(e.tech.hell_ruins=3,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_vault_result"),"info",!1,["progress","hell"]),e.race.fasting)){let r=ot();e.stats.endless_hunger.b3[r]=!0,r!=="m"&&r!=="l"&&(e.stats.endless_hunger.b3.l=!0)}return!0}return!1},post(){e.portal.vault.count===2&&(ue(),ir(),Ie())}},archaeology:{id:"portal-archaeology",title:t("portal_archaeology_title"),desc(){return`
${t("portal_archaeology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_ruins:2},cost:{Money(r){return f("archaeology",r,1e8,1.25,"portal")},Titanium(r){return f("archaeology",r,375e4,1.25,"portal")},Mythril(r){return f("archaeology",r,125e4,1.25,"portal")}},powered(){return _e(8)},effect(){return`
${t("portal_archaeology_effect",[N(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("archaeology","portal"),e.civic.archaeologist.display=!0,re($(this)[0])){let r=N(2);e.civic.archaeologist.max+=r;let a=Math.min(r,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=a,e.civic.archaeologist.workers+=a}return!0}return!1}},arcology:{id:"portal-arcology",title:t("portal_arcology_title"),desc(){return`
${t("portal_arcology_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{housing:4},cost:{Money(r){return f("arcology",r,18e7,1.22,"portal")},Graphene(r){return f("arcology",r,75e5,1.22,"portal")},Bolognium(r){return f("arcology",r,28e5,1.22,"portal")},Orichalcum(r){return f("arcology",r,55e5,1.22,"portal")},Nanoweave(r){return f("arcology",r,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return _e(25)},effect(){let r=Nr("ruins"),a=H(Ar()*8*r.supress);a=+a.toFixed(0);let i=Math.round(xt)*10,s=`
${t("plus_max_resource",[i,t("resource_Crates_name")])}
${t("plus_max_resource",[i,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[N(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("arcology","portal"),re($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||Yr(),!0):!1},post(){D({el:"#srprtl_ruins"},"update"),ue()},postPower(){D({el:"#srprtl_ruins"},"update"),D({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},hell_forge:{id:"portal-hell_forge",title:t("portal_hell_forge_title"),desc(){return`
${t("portal_hell_forge_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{scarletite:1},cost:{Money(r){return f("hell_forge",r,25e7,1.15,"portal")},Coal(r){return f("hell_forge",r,165e4,1.22,"portal")},Steel(r){return f("hell_forge",r,38e5,1.22,"portal")},Iridium(r){return f("hell_forge",r,12e5,1.22,"portal")},Neutronium(r){return f("hell_forge",r,28e4,1.22,"portal")},Soul_Gem(r){return f("hell_forge",r,5,1.22,"portal")}},powered(){return _e(12)},special:!0,effect(){let a=+(75*Nr("ruins").supress).toFixed(1),i=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[N(1)])}
${i}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("hell_forge","portal"),re($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Lt()},postPower(r){bi("Scarletite")}},inferno_power:{id:"portal-inferno_power",title:t("portal_inferno_power_title"),desc(){return`
${t("portal_inferno_power_title")}
`},reqs:{inferno_power:1},cost:{Money(r){return f("inferno_power",r,275e6,1.16,"portal")},Neutronium(r){return f("inferno_power",r,375e4,1.18,"portal")},Stanene(r){return f("inferno_power",r,12e6,1.18,"portal")},Bolognium(r){return f("inferno_power",r,8e6,1.18,"portal")}},powered(){let r=20;return k.hasOwnProperty("hell_forge")&&(r+=k.hell_forge*10),dt(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
${t("portal_inferno_power_effect",[r.Infernite,e.resource.Infernite.name,r.Coal,e.resource.Coal.name,r.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){D({el:"#foundry"},"update")}},ancient_pillars:{id:"portal-ancient_pillars",title:t("portal_ancient_pillars_title"),desc:t("portal_ancient_pillars_desc"),reqs:{hell_ruins:2},queue_complete(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"?1:0},cost:{Harmony(r){return r!==void 0?r+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(A).length-1,a])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(A).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Jt(),e.tech.pillars=2,H(0,!1,!0),ea(!0),Wt(!0),ie("resonance"),D({el:"#portal-ancient_pillars"},"update"),!0):!1}}},prtl_gate:{info:{name:t("portal_gate_name"),desc(){return`${t("portal_gate_desc")} ${t(e.tech.wtower&&e.tech.etower?"portal_gate_open":"portal_gate_closed")}`},support:"guard_post",hide_support:!0,prop(){let r=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return r=r+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,r},filter(r,a){let i=Nr("gate");switch(a){case"army":return Math.round(i.rating);case"sup":return`${+(i.supress*100).toFixed(2)}%`}}},gate_mission:{id:"portal-gate_mission",title:t("portal_gate_mission_title"),desc:t("portal_gate_mission_title"),reqs:{high_tech:18},grant:["hell_gate",1],queue_complete(){return e.tech.hell_gate>=1?0:1},cost:{Money(){return 25e7},Knowledge(){return 275e5}},effect:t("portal_gate_mission_effect"),action(){return u($(this)[0])?(I(t("portal_gate_mission_result"),"info",!1,["progress","hell"]),!0):!1}},west_tower:{id:"portal-west_tower",title:t("portal_west_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")}
${t("requires_segments",[a])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.west_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("west_tower")?e.portal.west_tower.count:0)${t("portal_tower_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.west_tower.count=Wt()&&(e.tech.wtower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Wt();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}
${t("requires_segments",[a])}
`:`
${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Wt()-e.portal.east_tower.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("east_tower")?e.portal.east_tower.count:0)${t("portal_tower_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_tower_effect2")}
`}else return t("portal_tower_effect")},action(){return e.portal.east_tower.count=Wt()&&(e.tech.etower=1,e.tech.wtower&&e.tech.etower&&!e.tech.hell_lake&&(e.tech.hell_lake=1,e.settings.portal.lake=!0,e.portal.harbour={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),ir()))}},gate_turret:{id:"portal-gate_turret",title:t("portal_gate_turret_title"),desc(){return`
${t("portal_gate_turret_title")}
${t("requires_power")}
`},reqs:{hell_gate:3},powered(){return _e(6)},cost:{Money(r){return f("gate_turret",r,375e4,1.22,"portal")},Iron(r){return f("gate_turret",r,425e4,1.22,"portal")},Elerium(r){return f("gate_turret",r,275,1.22,"portal")},Stanene(r){return f("gate_turret",r,85e4,1.22,"portal")}},effect(){let r=100;e.race.holy&&(r*=1+b.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+b.holy.vars(1)[1]/100*a);let i=e.tech.hell_gun>=2?65:40,s=e.tech.hell_gun>=2?100:60;return`
${t("portal_gate_turret_effect",[Math.round(r)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("gate_turret","portal"),re($(this)[0]),!0):!1},postPower(){D({el:"#srprtl_gate"},"update")}},infernite_mine:{id:"portal-infernite_mine",title:t("portal_infernite_mine_title"),desc(){return`
${t("portal_infernite_mine_title")}
${t("requires_security")}
${t("requires_power")}
`},reqs:{hell_gate:4},powered(){return _e(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(r){return f("infernite_mine",r,75e6,1.26,"portal")},Alloy(r){return f("infernite_mine",r,245e4,1.26,"portal")},Orichalcum(r){return f("infernite_mine",r,165e4,1.26,"portal")},Wrought_Iron(r){return f("infernite_mine",r,68e4,1.26,"portal")}},effect(){let r=T("infernite_mine");return`
${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("infernite_mine","portal"),re($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbour"},lake_mission:{id:"portal-lake_mission",title:t("portal_lake_mission_title"),desc:t("portal_lake_mission_title"),reqs:{hell_lake:1},grant:["hell_lake",2],queue_complete(){return e.tech.hell_lake>=2?0:1},cost:{Money(){return 5e8},Oil(){return 75e4},Helium_3(){return 6e5}},effect:t("portal_lake_mission_effect"),action(){return u($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbour:{id:"portal-harbour",title:t("portal_harbour_title"),desc(){return`
${t("portal_harbour_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(){let r=k.cooling_tower||0;return+_e(500*.92**r).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbour",r,225e6,$a(1.18),"portal")},Cement(r){return f("harbour",r,5e7,$a(1.18),"portal")},Iridium(r){return f("harbour",r,75e5,$a(1.18),"portal")},Infernite(r){return f("harbour",r,8e5,$a(1.18),"portal")},Stanene(r){return f("harbour",r,175e5,$a(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(r){switch(r){case"Oil":return 3e4;case"Alloy":return 25e4;case"Polymer":return 25e4;case"Iridium":return 2e5;case"Helium_3":return 18e3;case"Deuterium":return 12e3;case"Neutronium":return 18e4;case"Adamantite":return 15e4;case"Infernite":return 75e3;case"Nano_Tube":return 75e4;case"Graphene":return 12e5;case"Stanene":return 12e5;case"Bolognium":return 13e4;case"Orichalcum":return 13e4;default:return 0}},effect(){let r='
';for(let a of $(this)[0].res())if(e.resource[a].display){let i=Ee(+H($(this)[0].val(a)).toFixed(0),1);r=r+`${t("plus_max_resource",[i,e.resource[a].name])}`}return r=r+"
",`
${t("portal_harbour_effect",[1])}
${r}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(u($(this)[0])){if(ne("harbour","portal"),re($(this)[0]))for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=H($(this)[0].val(r)));return!0}return!1}},cooling_tower:{id:"portal-cooling_tower",title:t("portal_cooling_tower_title"),desc(){return`
${t("portal_cooling_tower_title")}
${t("requires_power")}
`},reqs:{hell_lake:6},powered(){return _e(10)},cost:{Money(r){return f("cooling_tower",r,25e7,1.2,"portal")},Polymer(r){return f("cooling_tower",r,12e6,1.2,"portal")},Orichalcum(r){return f("cooling_tower",r,85e5,1.2,"portal")},Brick(r){return f("cooling_tower",r,25e4,1.2,"portal")}},effect(){return`
${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("cooling_tower","portal"),re($(this)[0]),!0):!1}},bireme:{id:"portal-bireme",title:t("portal_bireme_title"),desc(){return`
${t("portal_bireme_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:4},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("bireme",r,19e7,1.24,"portal")},Helium_3(r){return f("bireme",r,225e3,1.24,"portal")},Adamantite(r){return f("bireme",r,15e6,1.24,"portal")},Nano_Tube(r){return f("bireme",r,18e6,1.24,"portal")},Soul_Gem(r){return f("bireme",r,10,1.24,"portal")},Scarletite(r){return f("bireme",r,125e3,1.24,"portal")}},effect(){let r=e.blood.spire&&e.blood.spire>=2?20:15;return`
${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[r])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
`},ship:{civ(){return 0},mil(){return e.race.high_pop?b.high_pop.vars()[0]*2:2}},action(){return u($(this)[0])?(ne("bireme","portal"),re($(this)[0]),!0):!1}},transport:{id:"portal-transport",title:t("portal_transport_title"),desc(){return`
${t("portal_transport_title")}
${t("space_support",[t("lake")])}
`},reqs:{hell_lake:5},powered(){return 0},s_type:"lake",support(){return-1},cost:{Money(r){return f("transport",r,3e8,1.22,"portal")},Oil(r){return f("transport",r,18e4,1.22,"portal")},Alloy(r){return f("transport",r,18e6,1.22,"portal")},Graphene(r){return f("transport",r,125e5,1.22,"portal")},Soul_Gem(r){return f("transport",r,5,1.22,"portal")},Scarletite(r){return f("transport",r,25e4,1.22,"portal")}},effect(){let a=+((e.blood.spire&&e.blood.spire>=2?.8:.85)**(we.bireme||0)*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[a])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(gr("mTabResource"),Ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return u($(this)[0])?(ne("transport","portal"),re($(this)[0]),e.settings.portal.spire||(e.settings.portal.spire=!0,e.settings.showCargo=!0,e.tech.hell_spire=1,e.portal.purifier={count:0,on:0,support:0,s_max:0,supply:0,sup_max:100,diff:0},e.portal.port={count:0,on:0},I(t("portal_transport_unlocked"),"info",!1,["progress","hell"]),ir()),!0):!1}}},prtl_spire:{info:{name:t("portal_spire_name"),desc:t("portal_spire_desc"),support:"purifier",prop(){return` - ${t("portal_spire_supply")}: {{ supply | filter }} / {{ sup_max }}`+' (+{{ diff | filter(2) }}/s)'},filter(r,a){return a?+r.toFixed(a):Math.floor(r)}},spire_mission:{id:"portal-spire_mission",title:t("portal_spire_mission_title"),desc:t("portal_spire_mission_title"),reqs:{hell_spire:1},grant:["hell_spire",2],queue_complete(){return e.tech.hell_spire>=2?0:1},cost:{Species(){return Si(50)},Oil(){return 9e5},Helium_3(){return 75e4},Structs(){return{portal:{bireme:{s:"prtl_lake",count:1,on:1},transport:{s:"prtl_lake",count:1,on:1}}}}},effect:t("portal_spire_mission_effect"),action(){return u($(this)[0])?(I(t("portal_spire_mission_result"),"info",!1,["progress","hell"]),!0):!1},flair:t("portal_spire_mission_flair")},purifier:{id:"portal-purifier",title:t("portal_purifier_title"),desc(){return`
${t("portal_purifier_desc")}
${t("requires_power")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("purifier",r,85e6,$a(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,$a(1.2),"portal")}},powered(){return _e(125)},support(){return e.tech.b_stone&&e.tech.b_stone>=3?1.25:1},effect(){return`
${t("portal_purifier_effect",[$(this)[0].support()])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("purifier","portal"),re($(this)[0]),!0):!1}},port:{id:"portal-port",title:t("portal_port_title"),desc(){return`
${t("portal_port_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:3},cost:{Money(r){return f("port",r,135e6,$a(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){let r=1e4;return pa.base_camp&&(r*=1+pa.base_camp*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return u($(this)[0])?(ne("port","portal"),re($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},ir()),!0):!1}},base_camp:{id:"portal-base_camp",title:t("portal_base_camp_title"),desc(){return`
${t("portal_base_camp_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:4},cost:{Money(r){return f("base_camp",r,425e6,$a(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,$a(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(){return`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_base_camp_effect",[40])}
`},action(){return u($(this)[0])?(ne("base_camp","portal"),re($(this)[0]),e.tech.hell_spire===4&&(e.tech.hell_spire=5,e.portal.bridge={count:0},I(t("portal_spire_bridge_collapse"),"info",!1,["progress","hell"]),ir()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(r){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||r?`
${t("portal_bridge_title")}
${t("requires_segments",[10])}
`:`
${t("portal_bridge_title")}
`},reqs:{hell_spire:5},queue_size:1,queue_complete(){return 10-e.portal.bridge.count},cost:{Species(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?Si(10):0},Money(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(r){return(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(r){let a=10,i=(r||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0);if(i${t("portal_bridge_effect")}
${t("space_dwarf_collider_effect2",[s])}
${t("portal_bridge_effect2")}
`}else return t("portal_bridge_complete")},action(){return e.portal.bridge.count<10&&u($(this)[0])?(ne("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,ir()),!0):!1}},sphinx:{id:"portal-sphinx",title(){return e.tech.hell_spire===7?t("portal_sphinx_solve"):t("portal_sphinx_title")},desc:t("portal_sphinx_desc"),reqs:{hell_spire:6},queue_complete(){return 8-e.tech.hell_spire},cost:{Knowledge(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?5e7:a===0?4e7:0}},effect(r){let a=(r||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return a===1?t("portal_sphinx_effect2"):a===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(u($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),ir(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,ir(),I(t("portal_sphinx_answer_msg"),"info",!1,["progress","hell"]),!0}return!1}},bribe_sphinx:{id:"portal-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_desc"),reqs:{hell_spire:7},condition(){return!!(e.tech.hell_spire&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe)},cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("portal_sphinx_bribe_effect")},action(){return u($(this)[0])&&e.tech.hell_spire===7&&!e.tech.sphinx_bribe?(e.tech.sphinx_bribe=1,e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("portal_sphinx_bribe_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.sphinx_bribe&&(ue(),ir(),Ie("portal-bribe_sphinx"))}},spire_survey:{id:"portal-spire_survey",title:t("portal_spire_survey_title"),desc:t("portal_spire_survey_title"),reqs:{hell_spire:8},grant:["hell_spire",9],queue_complete(){return e.tech.hell_spire>=9?0:1},cost:{Oil(){return 12e5},Helium_3(){return 9e5}},effect:t("portal_spire_survey_effect"),action(){return u($(this)[0])?(e.portal.mechbay={count:0,on:0,bay:0,max:0,active:0,scouts:0,mechs:[]},e.portal.spire={count:1,progress:0,boss:"",type:"",status:{}},nn(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(ir(),Ie("portal-spire_survey"))}},mechbay:{id:"portal-mechbay",title:t("portal_mechbay_title"),desc(){return`
${t("portal_mechbay_title")}
${t("portal_spire_support")}
`},reqs:{hell_spire:9},cost:{Money(r){return f("mechbay",r,1e8,1.2,"portal")},Supply(r){return f("mechbay",r,25e4,1.2,"portal")}},powered(){return 0},s_type:"spire",support(){return-1},special:!0,sAction(){e.settings.civTabs=2,e.settings.govTabs=4,e.settings.tabLoad||(gr("mTabCivic"),Ie("portal-mechbay"))},effect(){let r=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.max:0;return`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_mechbay_effect")}
${t("portal_mechbay_effect2",[r,a])}
`},action(){return u($(this)[0])?(ne("mechbay","portal"),re($(this)[0])&&(e.portal.mechbay.max+=25),e.settings.showMechLab=!0,e.portal.mechbay.count===1&&(I(t("portal_mechbay_unlocked"),"info",!1,["progress","hell"]),Ki(),Ot()),!0):!1},postPower(){sn()}},spire:{id:"portal-spire",title:t("portal_spire_title"),desc:t("portal_spire_title"),reqs:{hell_spire:9},queue_complete(){return 0},cost:{},effect(){let r=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,a=e.portal.hasOwnProperty("spire")?`${t(`portal_spire_type_${e.portal.spire.type}`)}`:"?",i="";e.portal.hasOwnProperty("spire")&&Object.keys(e.portal.spire.status).length>0&&(i=`
${t("portal_spire_hazard",[Object.keys(e.portal.spire.status).map(_=>`${t(`portal_spire_status_${_}`)}`).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}%`:"0%",n=`
${t("portal_spire_effect",[r])}
${t("portal_spire_type",[a])}
${i}
${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",l=`
${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)}`])}
`,o="???",d="???";if(e.stats.spire){let _=qu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${_.w}`)),m>=5&&(d=t(`portal_mech_weapon_${_.r}`))}let h=`
${l}
${t("portal_spire_mob_weak",[`${o}`])}
${t("portal_spire_mob_resist",[`${d}`])}
`;return`
${n}
${h}
`},mscan(){let r=0;return Object.keys(e.stats.spire).forEach(function(a){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty(i)&&e.stats.spire[a][i]>r&&(r=e.stats.spire[a][i])}),r},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(r){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||r?`
${t("portal_waygate_title")}
${t("requires_segments",[10])}
`:`
${t("portal_waygate_title")}
`},reqs:{waygate:1},queue_size:1,queue_complete(){return e.tech.waygate>=2?0:10-e.portal.waygate.count},cost:{Species(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?Si(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?Si(25):0},Money(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?1e9:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?1e9:0},Supply(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5e5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5e5:0},Blood_Stone(r){return r?r+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?5:0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?5:0}},powered(){return e.portal.hasOwnProperty("waygate")&&e.portal.waygate.count>=10?1:0},power_reqs:{waygate:2},effect(r){let a=(r||0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(a>=10){let i=e.portal.hasOwnProperty("waygate")?`${+e.portal.waygate.progress.toFixed(3)}%`:"0%";return`
${t("portal_waygate_open")}
${t("portal_waygate_progress",[i])}
`}else{let s=10-a;return`
${t("portal_waygate_effect")}
${t("space_dwarf_collider_effect2",[s])}
`}},action(){return e.portal.waygate.count<10&&e.tech.waygate&&e.tech.waygate===1&&u($(this)[0])?(ne("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,ir()),!0):!1}}}};function $a(r){let a=e.portal.hasOwnProperty("spire")&&e.blood.spire?r-(e.portal.spire.count-1)/2500:r;return a>=1.01?a:1.01}var Wt=function(){var r;return function(a){return r&&!a||(r=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(r-=12)})),r}}();function la(r){let a=Nr("gate");return Math.round(r/(a.supress>.01?a.supress:.01))}function ji(){let r=Math.round(650/mt(1,"hellArmy"));return k.gun_emplacement&&(r-=k.gun_emplacement*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function an(){return br}function ir(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let r=$("#portal");le(r),r.append($(`

${t("tab_portal")}

`)),!(!e.tech.portal||e.tech.portal<2)&&Object.keys(br).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof br[a].info.name=="string"?br[a].info.name:br[a].info.name(),n="";if(br[a].info.hasOwnProperty("prop")&&(n=br[a].info.prop()),br[a].info.support){let c=br[a].info.support;br[a].info.hide_support?r.append(`

${s}

${n}
`):r.append(`

${s}

{{ support }}/{{ s_max }}${n}
`),D({el:`#sr${a}`,data:e.portal[c],filters:{filter(){return br[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);pe(a,function(){return typeof br[a].info.desc=="string"?br[a].info.desc:br[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Us(r,!0),Object.keys(br[a]).forEach(function(c){if(c!=="info"&&Dr(br,a,c)){let l=br[a][c];Br(l,"portal",c)}})}})}function Jc(r,a){return Dr(br,r,a)}function Wi(r){switch(r){case"hostiles":return e.portal.fortress.threat>=2e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_high")}`:e.portal.fortress.threat<1e3?`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_low")}`:`${t("fortress_threat",[e.portal.fortress.threat])} ${t("fortress_threat_medium")}`;case"threatLevel":{let a=e.portal.fortress.threat;return a<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:a<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:a>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:a>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:a>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let a=Math.round(vr("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Us(r,a){if(!e.settings.tabLoad)switch(e.settings.civTabs){case 1:if(e.settings.spaceTabs!==4)return;break;case 2:if(e.settings.govTabs!==3)return;break;default:return}if(!e.tech.portal||e.tech.portal<2)return;let i=a?"fort":"gFort",s=a?$(`
`):$("#gFort");a?r.append(s):(s.length>0?le(s):(s=$(`
`),r.append(s)),s.append(`

${t("portal_fortress_name")}

`));let n=$("
");s.append(n);let c=$(`${t("fortress_defense")} {{ f.garrison | defensive }}`);n.append(c);let l=$(`${t("fortress_spotted")} {{ f.threat }}`);n.append(l);let o=$('{{ f.threat | threat }}');n.append(o);let d=$("
");s.append(d),d.append($(`${t("fortress_wall")} {{ f.walls }}%`));let h=$("
");s.append(h),h.append($(`${t("fortress_army")}`)),h.append($('«')),h.append($('{{ f.garrison | patrolling }}')),h.append($('»')),h.append($(`${t("fortress_patrol")}`)),h.append($('«')),h.append($('{{ f.patrols }}')),h.append($('»')),h.append($(`${t("fortress_patrol_size")}`)),h.append($('«')),h.append($('{{ f.patrol_size }}')),h.append($('»')),h.append($(``));var _=$('
');h.append(_),_.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");_.append($(`${m} / {{ g.max | s_max }} | `)),_.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),_.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let w=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',M=$("
");h.append(M),M.append($(`${t("fortress_patrol_reports")}`)),M.append($(`${t("fortress_surv_reports")}`)),M.append($(`${t("fortress_nocrew")}`)),a&&s.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
`)),D({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Wi("hostiles")},threatLevel(){return Wi("threatLevel")},aNext(){let F=fe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update"))},aLast(){let F=fe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=ji()),e.portal.hasOwnProperty("guard_post")&&(x+=N(e.portal.guard_post.on)),e.portal.fortress.garrison>x&&(e.portal.fortress.garrison-=F,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=F,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let F=fe();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=F,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let F=e.portal.fortress.walls;return F>=75?"has-text-success":F<=25?"has-text-danger":"has-text-warning"},threaten(){let F=e.portal.fortress.threat;return F<1e3?"has-text-success":F>=2e3?"has-text-danger":"has-text-warning"},hire(){let F=fe(),x=!0;for(;x&&F>0;){let j=_s();e.civic.garrison.workers=j?(e.resource.Money.amount-=j,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,D({el:"#garrison"},"update")):x=!1,F--}},hireLabel(){return Wi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(F){return Ho(F)},patrolling(F){let x=F-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=ji();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=N(e.portal.guard_post.on)),x},threat(F){return F<1e3?t("fortress_threat_level1"):F<1500?t("fortress_threat_level2"):F>=5e3?t("fortress_threat_level6"):F>=3e3?t("fortress_threat_level5"):F>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(F,x){return F===0?Ft(-1):Ft((100-x)/(F*4))},stationed(){return We()},s_max(F){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(F){pe(`hf${i}${F}`,function(){switch(F){case"hostiles":return Wi("hostiles");case"threatLevel":return Wi("hostiles");case"armyLabel":return t("fortress_stationed");case"patLabel":return t("fortress_patrol_desc",[e.portal.fortress.patrols]);case"patSizeLabel":return t("fortress_patrol_size_desc",[e.portal.fortress.patrol_size]);case"hireLabel":return Wi("hireLabel")}},{elm:`#${i} span.${F}`})}),pe(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ho(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=ji();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=N(e.portal.guard_post.on));let i=0;if(e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(i=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),i>a&&(i=a)),k.war_droid){let n=k.war_droid-e.portal.fortress.patrols>0?k.war_droid-e.portal.fortress.patrols:0;a+=e.tech.hdroid?N(n*2):N(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(mt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function Go(r,a,i,s){let n=Math.round(Math.log2(r/e.portal.fortress.patrol_size/(a||1)))-Math.rand(0,a),c=0;if(n>0){n>e.portal.fortress.patrol_size&&(n=e.portal.fortress.patrol_size),n=Math.rand(i?1:0,n+1),c=Math.rand(0,n+1);let l=n-c;if(e.race.instinct){let o=Math.floor(c*(b.instinct.vars()[1]/100));c-=o,l+=o}s.wounded=l,s.died=c,e.civic.garrison.wounded+=l,e.civic.garrison.workers-=c,e.stats.died+=c}return c}function Uo(){let r={start:e.portal.fortress.threat,foundGems:0,stats:{wounded:0,died:0,revived:0,surveyors:0,sieges:0,kills:{drones:0,patrols:0,sieges:0,guns:0,soul_forge:0,turrets:0},gems:{patrols:0,guns:0,soul_forge:0,crafted:0,turrets:0,surveyors:0}}},a=e.tech.armor?e.tech.armor:0;e.race.armored&&(a+=b.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(b.armored.vars(1)[1]*i)),e.race.scales&&(a+=b.scales.vars()[2]);let s=!1;if(k.soul_forge){let x=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size;ji()<=x?(s=!0,$("#portal-soul_forge .on").removeClass("altwarn")):(s=!1,$("#portal-soul_forge .on").addClass("altwarn"))}else $("#portal-soul_forge .on").addClass("altwarn");let n=0;if(e.tech.portal>=3&&k.war_drone){r.drones={};for(let x=0;x=Math.rand(0,999)){let B=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10)),S=e.tech.portal>=7?Math.rand(50,125):Math.rand(25,75);B=5?9e3:1e4)-e.portal.fortress.pity;if(e.race.universe==="evil"&&e.prestige.Dark.count>1){let x=e.prestige.Dark.count;e.prestige.Harmony.count>0&&(x*=1+e.prestige.Harmony.count*.01),l-=Math.round(Math.log2(x)*2)}e.tech.portal>=4&&k.attractor&&(l=Math.round(l*.948**k.attractor)),e.race.ghostly&&(l=Math.round(l*((100-b.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-b.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,_=!1,m=0;e.civic.garrison.wounded>e.civic.garrison.workers-e.portal.fortress.garrison&&(m=e.civic.garrison.wounded-(e.civic.garrison.workers-e.portal.fortress.garrison),m>e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size?(m-=e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size,m/=e.portal.fortress.patrols):m=0);let w=+(m%1).toFixed(10);r.patrols={};for(let x=0;x1/e.portal.fortress.patrols*x?Math.ceil(m):Math.floor(m);if(Math.rand(0,e.portal.fortress.threat)>=Math.rand(0,999)){j.encounter=!0;let S=e.portal.fortress.patrol_size;h>0&&(j.droid=!0,S+=e.tech.hdroid?N(2):N(1),h--);let Q=Math.round(mt(S,"hellArmy",B)),V=Math.rand(Math.floor(e.portal.fortress.threat/50),Math.floor(e.portal.fortress.threat/10));e.race.blood_thirst&&(e.race.blood_thirst_count+=Math.rand(0,Math.ceil(V/10)),e.race.blood_thirst_count>b.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=b.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?b.chameleon.vars()[1]:0,e.race.elusive?b.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=Go(Math.round(V*(1+Math.random()*3)),0,!0,j);let Y=Math.round(Q/2);V0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Ce=Math.round(Y/Ge);for(let wr=0;wre.civic.garrison.workers&&(e.civic.garrison.wounded=e.civic.garrison.workers);let F=e.portal.fortress.nocrew?e.civic.garrison.workers-e.civic.garrison.crew:e.civic.garrison.workers;if(F0&&e.portal.fortress.notify==="Yes"&&(M>0?I(t("fortress_patrol_casualties_revive",[d,M]),!1,!1,["hell"]):I(t("fortress_patrol_casualties",[d]),!1,!1,["hell"])),e.portal.fortress.garrison>0&&e.portal.fortress.siege>0&&e.portal.fortress.siege--,e.portal.fortress.siege<=900&&e.portal.fortress.garrison>0&&1>Math.rand(0,e.portal.fortress.siege)){let x={destroyed:!1,damage:0,kills:0,surveyors:0,soldiers:0},j=Ho(e.portal.fortress.garrison),B=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,V=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let Y=Math.round(Math.rand(1,B+1));if(Y>S&&(Y=S),S-=Y,e.portal.fortress.threat-=Y,e.stats.dkills+=Y,s&&(e.portal.soul_forge.kills+=Y,oi(Y)),V+=Y,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=V,r.stats.kills.sieges=V,ce?(I(t("fortress_lost"),!1,!1,["hell"]),x.surveyors=e.civic.hell_surveyor.workers,e.resource[e.race.species].amount-=e.civic.hell_surveyor.workers,e.civic.hell_surveyor.workers=0,e.civic.hell_surveyor.assigned=0,x.soldiers=e.portal.fortress.garrison,r.stats.died+=e.portal.fortress.garrison,e.portal.fortress.patrols=0,e.stats.died+=e.portal.fortress.garrison,e.civic.garrison.workers-=e.portal.fortress.garrison,e.portal.fortress.garrison=0,e.portal.fortress.assigned=0):I(t("fortress_sieged",[V,Q]),!1,!1,["hell"]),e.portal.fortress.siege=999,r.stats.sieges++,r.siege=x}if(e.portal.fortress.threat<1e4){let x=(1e4-e.portal.fortress.threat)/2500+1;e.tech.portal>=4&&k.attractor&&(x*=1+k.attractor*.22);let j=Math.rand(Math.round(10*x),Math.round(50*x));e.portal.fortress.threat+=j,r.demons=j}if(e.civic.hell_surveyor.display&&e.civic.hell_surveyor.workers>0){let x=1e3,j=ge("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+b.blurry.vars()[0]/100);let B=ve("yeti");B>0&&(x*=1+b.blurry.vars(1)[0]/100*B),e.race.instinct&&(x*=1+b.instinct.vars()[0]/100),e.tech.infernite&&e.tech.infernite>=5&&(x+=250);let S=e.portal.fortress.threat/x,Q=e.civic.hell_surveyor.workers>10?10:e.civic.hell_surveyor.workers,V=10-Math.rand(0,Q+1);if(S>V){let ce=Math.round(S),Y=Math.rand(0,ce+1);Y>e.civic.hell_surveyor.workers&&(Y=e.civic.hell_surveyor.workers),Y===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):Y>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[Y]),!1,!1,["hell"]),Y>0&&(r.surveyors=Y,r.stats.surveyors=Y,e.civic.hell_surveyor.workers-=Y,e.civic.hell_surveyor.max-=Y,e.resource[e.race.species].amount-=Y,e.portal.carport.damaged+=Y)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),Y.bodies=Ge,Ge>0){let Ce=25-Math.floor(k.attractor/5);Ce<5&&(Ce=5);let wr=Math.round(Ge/Ce);for(let Or=0;Or=1e6&&e.tech.gateway&&!e.tech.hell_pit&&(e.tech.hell_pit=1,e.settings.portal.pit=!0,I(t("portal_hell_pit_found"),"info",!1,["progress","hell"]),ir()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,B=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=B,r.soul_attractors=B,oi(B)}if(s&&e.tech.hell_gun&&k.gun_emplacement){r.gun_emplacements={};let j=0;for(let S=0;S=2?Math.rand(35,75):Math.rand(20,40);j+=Q,r.gun_emplacements[S+1].kills=Q}r.stats.kills.guns=j,e.portal.soul_forge.kills+=j,oi(j),e.stats.dkills+=j;let B=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(B*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,B)===0&&(r.soul_forge.gem=!0,r.stats.gems.soul_forge++,e.resource.Soul_Gem.amount++)}let x=e.tech.hell_pit>=6?75e4:1e6;if(e.tech.hell_pit>=7&&k.soul_attractor>0&&(x*=.97**k.soul_attractor),s&&e.portal.soul_forge.kills>=Math.round(x)){r.soul_forge.gem_craft=!0,e.portal.soul_forge.kills=0;let j=10-k.soul_attractor>0?10-k.soul_attractor:1;e.tech.high_tech>=16&&!e.tech.corrupt&&Math.rand(0,j+1)===0?(r.soul_forge.corrupt=!0,e.resource.Corrupt_Gem.amount++,e.resource.Corrupt_Gem.display=!0,I(t("portal_corrupt_gem"),"info",!1,["progress","hell"]),e.tech.corrupt=1,ue()):(e.resource.Soul_Gem.amount++,r.stats.gems.crafted++)}}if(e.tech.hell_gate&&e.tech.hell_gate>=3&&s&&k.gate_turret){r.gate_turrets={};let x=0,j=e.tech.hell_gun>=2?65:40,B=e.tech.hell_gun>=2?100:60;for(let Q=0;Q=5?2700:3e3;for(let Q=0;Q0&&(e.portal.soul_capacitor.energy+=r,e.portal.soul_capacitor.energy>e.portal.soul_capacitor.ecap&&(e.portal.soul_capacitor.energy=e.portal.soul_capacitor.ecap))}function Nr(r,a){switch(r){case"ruins":{let i=a||N(k.guard_post),s=(k.arcology||0)*75,n=mt(i,"hellArmy",0);e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let l=(n+s)/5e3;return{supress:l>1?1:l,rating:n+s}}case"gate":{let i=Nr("ruins",a),s=(k.gate_turret||0)*100;e.race.holy&&(s*=1+b.holy.vars()[1]/100);let n=ve("unicorn");n>0&&(s*=1+b.holy.vars(1)[1]/100*n);let c=(i.rating+s)/7500;return{supress:c>1?1:c,rating:i.rating+s}}default:return 0}}var xa={fire_elm:{weapon:{laser:1.05,flame:0,plasma:.25,kinetic:.5,missile:.5,sonic:1,shotgun:.75,tesla:.65},nozone:{freeze:!0,flooded:!0},amp:{hot:1.75,humid:.8,steam:.9}},water_elm:{weapon:{laser:.65,flame:.5,plasma:1,kinetic:.2,missile:.5,sonic:.5,shotgun:.25,tesla:.75},nozone:{hot:!0,freeze:!0},amp:{steam:1.5,river:1.1,flooded:2,rain:1.75,humid:1.25}},rock_golem:{weapon:{laser:1,flame:.5,plasma:1,kinetic:.65,missile:.95,sonic:.75,shotgun:.35,tesla:0},nozone:{},amp:{}},bone_golem:{weapon:{laser:.45,flame:.35,plasma:.55,kinetic:1,missile:1,sonic:.75,shotgun:.75,tesla:.15},nozone:{},amp:{}},mech_dino:{weapon:{laser:.85,flame:.05,plasma:.55,kinetic:.45,missile:.5,sonic:.35,shotgun:.5,tesla:1},nozone:{},amp:{}},plant:{weapon:{laser:.42,flame:1,plasma:.65,kinetic:.2,missile:.25,sonic:.75,shotgun:.35,tesla:.38},nozone:{},amp:{}},crazed:{weapon:{laser:.5,flame:.85,plasma:.65,kinetic:1,missile:.35,sonic:.15,shotgun:.95,tesla:.6},nozone:{},amp:{}},minotaur:{weapon:{laser:.32,flame:.5,plasma:.82,kinetic:.44,missile:1,sonic:.15,shotgun:.2,tesla:.35},nozone:{},amp:{}},ooze:{weapon:{laser:.2,flame:.65,plasma:1,kinetic:0,missile:0,sonic:.85,shotgun:0,tesla:.15},nozone:{},amp:{}},zombie:{weapon:{laser:.35,flame:1,plasma:.45,kinetic:.08,missile:.8,sonic:.18,shotgun:.95,tesla:.05},nozone:{},amp:{}},raptor:{weapon:{laser:.68,flame:.55,plasma:.85,kinetic:1,missile:.44,sonic:.22,shotgun:.33,tesla:.66},nozone:{},amp:{}},frost_giant:{weapon:{laser:.9,flame:.82,plasma:1,kinetic:.25,missile:.08,sonic:.45,shotgun:.28,tesla:.5},nozone:{hot:!0},amp:{freeze:2.5,hail:1.65}},swarm:{weapon:{laser:.02,flame:1,plasma:.04,kinetic:.01,missile:.08,sonic:.66,shotgun:.38,tesla:.45},nozone:{},amp:{}},dragon:{weapon:{laser:.18,flame:0,plasma:.12,kinetic:.35,missile:1,sonic:.22,shotgun:.65,tesla:.15},nozone:{},amp:{}},mech_dragon:{weapon:{laser:.84,flame:.1,plasma:.68,kinetic:.18,missile:.75,sonic:.22,shotgun:.28,tesla:1},nozone:{},amp:{}},construct:{weapon:{laser:.5,flame:.2,plasma:.6,kinetic:.34,missile:.9,sonic:.08,shotgun:.28,tesla:1},nozone:{},amp:{}},beholder:{weapon:{laser:.75,flame:.15,plasma:1,kinetic:.45,missile:.05,sonic:.01,shotgun:.12,tesla:.3},nozone:{},amp:{}},worm:{weapon:{laser:.55,flame:.38,plasma:.45,kinetic:.2,missile:.05,sonic:1,shotgun:.02,tesla:.01},nozone:{},amp:{}},hydra:{weapon:{laser:.85,flame:.75,plasma:.85,kinetic:.25,missile:.45,sonic:.5,shotgun:.6,tesla:.65},nozone:{},amp:{}},colossus:{weapon:{laser:1,flame:.05,plasma:.75,kinetic:.45,missile:1,sonic:.35,shotgun:.35,tesla:.5},nozone:{},amp:{}},lich:{weapon:{laser:.1,flame:.1,plasma:.1,kinetic:.45,missile:.75,sonic:.35,shotgun:.75,tesla:.5},nozone:{},amp:{}},ape:{weapon:{laser:1,flame:.95,plasma:.85,kinetic:.5,missile:.5,sonic:.05,shotgun:.35,tesla:.68},nozone:{},amp:{}},bandit:{weapon:{laser:.65,flame:.5,plasma:.85,kinetic:1,missile:.5,sonic:.25,shotgun:.75,tesla:.25},nozone:{},amp:{}},croc:{weapon:{laser:.65,flame:.05,plasma:.6,kinetic:.5,missile:.5,sonic:1,shotgun:.2,tesla:.75},nozone:{},amp:{}},djinni:{weapon:{laser:0,flame:.35,plasma:1,kinetic:.15,missile:0,sonic:.65,shotgun:.22,tesla:.4},nozone:{},amp:{}},snake:{weapon:{laser:.5,flame:.5,plasma:.5,kinetic:.5,missile:.5,sonic:.5,shotgun:.5,tesla:.5},nozone:{},amp:{}},centipede:{weapon:{laser:.5,flame:.85,plasma:.95,kinetic:.65,missile:.6,sonic:0,shotgun:.5,tesla:.01},nozone:{},amp:{}},spider:{weapon:{laser:.65,flame:1,plasma:.22,kinetic:.75,missile:.15,sonic:.38,shotgun:.9,tesla:.18},nozone:{},amp:{}},manticore:{weapon:{laser:.05,flame:.25,plasma:.95,kinetic:.5,missile:.15,sonic:.48,shotgun:.4,tesla:.6},nozone:{},amp:{}},fiend:{weapon:{laser:.75,flame:.25,plasma:.5,kinetic:.25,missile:.75,sonic:.25,shotgun:.5,tesla:.5},nozone:{},amp:{}},bat:{weapon:{laser:.16,flame:.18,plasma:.12,kinetic:.25,missile:.02,sonic:1,shotgun:.9,tesla:.58},nozone:{},amp:{}},medusa:{weapon:{laser:.35,flame:.1,plasma:.3,kinetic:.95,missile:1,sonic:.15,shotgun:.88,tesla:.26},nozone:{},amp:{}},ettin:{weapon:{laser:.5,flame:.35,plasma:.8,kinetic:.5,missile:.25,sonic:.3,shotgun:.6,tesla:.09},nozone:{},amp:{}},faceless:{weapon:{laser:.6,flame:.28,plasma:.6,kinetic:0,missile:.05,sonic:.8,shotgun:.15,tesla:1},nozone:{},amp:{}},enchanted:{weapon:{laser:1,flame:.02,plasma:.95,kinetic:.2,missile:.7,sonic:.05,shotgun:.65,tesla:.01},nozone:{},amp:{}},gargoyle:{weapon:{laser:.15,flame:.4,plasma:.3,kinetic:.5,missile:.5,sonic:.85,shotgun:1,tesla:.2},nozone:{},amp:{}},chimera:{weapon:{laser:.38,flame:.6,plasma:.42,kinetic:.85,missile:.35,sonic:.5,shotgun:.65,tesla:.8},nozone:{},amp:{}},gorgon:{weapon:{laser:.65,flame:.65,plasma:.65,kinetic:.65,missile:.65,sonic:.65,shotgun:.65,tesla:.65},nozone:{},amp:{}},kraken:{weapon:{laser:.75,flame:.35,plasma:.75,kinetic:.35,missile:.5,sonic:.18,shotgun:.05,tesla:.85},nozone:{},amp:{}},homunculus:{weapon:{laser:.05,flame:1,plasma:.1,kinetic:.85,missile:.65,sonic:.5,shotgun:.75,tesla:.2},nozone:{},amp:{}}};function ha(r,a){let i=9999,s=1e7;switch(r){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=a?n*2.5:n,i=a?20:1}break;case"medium":s=a?45e4:18e4,i=a?100:4;break;case"large":s=a?925e3:375e3,i=a?500:20;break;case"titan":s=a?15e5:75e4,i=a?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=a?n*2.5:n,i=1}break}return{s:i,c:s}}function qu(r){let a="laser",i="laser";return Object.keys(xa[r].weapon).forEach(function(s){xa[r].weapon[s]>xa[r].weapon[a]&&(a=s),xa[r].weapon[s]');r.append(a);let i=$(`
${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);a.append(i),i.append(` | ${t("portal_mech_bay_space")}: {{ m.bay }} / {{ m.max }}`),i.append(` | ${t("portal_mech_sup_avail")}: {{ p.supply | round }} / {{ p.sup_max }}`);let s=e.blood.prepared&&e.blood.prepared>=3?`${t("portal_mech_infernal")} (${t("portal_mech_infernal_effect",[25])})`:"";a.append(`
${t("portal_mech_space")} {{ b.size | bay }} | ${t("portal_mech_cost")} {{ b.size | price }} | ${t("portal_mech_soul",[e.resource.Soul_Gem.name])} {{ b.size | soul }}${s}
`),a.append("
{{ b.size | desc }}
");let n=$('
');a.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(h,_){c+=`${t(`portal_mech_size_${h}`)}`}),n.append(` ${_} - `)}a.append(`
`),D({el:"#mechAssembly",data:{p:e.portal.purifier,m:e.portal.mechbay,b:e.portal.mechbay.blueprint},methods:{build(){let h=ha(e.portal.mechbay.blueprint.size,e.portal.mechbay.blueprint.infernal),_=h.c,m=h.s,w=Da(e.portal.mechbay.blueprint.size),M=e.portal.mechbay.max-e.portal.mechbay.bay;if(e.portal.purifier.supply>=_&&M>=w&&e.resource.Soul_Gem.amount>=m){e.portal.purifier.supply-=_,e.resource.Soul_Gem.amount-=m;let A=Ke(e.portal.mechbay.blueprint);e.portal.mechbay.mechs.push(A),e.portal.mechbay.bay+=w,e.portal.mechbay.active++}},setSize(h){switch(e.portal.mechbay.blueprint.size=h,h==="collector"?e.portal.mechbay.blueprint.hardpoint.length=0:h==="small"||h==="medium"?(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length=1):(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length===1&&e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),h==="titan"?e.portal.mechbay.blueprint.hardpoint.length===2&&(e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):e.portal.mechbay.blueprint.hardpoint.length=2),h){case"small":e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?1:0;break;case"medium":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?2:1;break;case"collector":case"large":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?3:2;break;case"titan":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length<3&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length<4&&e.portal.mechbay.blueprint.equip.push("seals"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("stabilizer"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?5:4;break}},setType(h){e.portal.mechbay.blueprint.chassis=h},setWep(h,_){e.portal.mechbay.blueprint.hardpoint[_]=h,D({el:"#mechAssembly"},"update")},setEquip(h,_){e.portal.mechbay.blueprint.equip[_]=h,D({el:"#mechAssembly"},"update")},vis(h){return e.portal.mechbay.blueprint.size==="collector"?!1:h===0||e.portal.mechbay.blueprint.size==="large"&&h<2||e.portal.mechbay.blueprint.size==="titan"},eVis(h){let _=e.blood.prepared?1:0;switch(e.portal.mechbay.blueprint.size){case"small":return _===1&&h===0;case"medium":return h<=0+_;case"collector":case"large":return h<=1+_;case"titan":return!0}}},filters:{bay(h){return Da(h)},price(h){return ha(h,e.portal.mechbay.blueprint.infernal).c},soul(h){return ha(h,e.portal.mechbay.blueprint.infernal).s},slabel(h){return t(`portal_mech_size_${h}`)},clabel(h){return t(`portal_mech_chassis_${h}`)},wlabel(h){return t(`portal_mech_weapon_${h}`)},desc(h){return t(`portal_mech_size_${h}_desc`)},round(h){return Math.round(h)},equipment(h){if(h!=="special")return t(`portal_mech_equip_${h}`);let _="jumpjet";switch(e.portal.mechbay.blueprint.size){case"large":_="battery";break;case"titan":_="target";break}return t(`portal_mech_equip_${_}`)}}}),["size","chassis","weapon","equip"].forEach(function(h){let _=1;h==="weapon"?_=4:h==="equip"&&(_=o);for(let m=0;m<_;m++)for(let w=0;w<$(`#mechAssembly .${h}.r${m}`).length;w++)pe(`mechAssembly${h}${m}${w}`,function(M){let A=$(M.this).attr("data-val");if(A==="special")switch(e.portal.mechbay.blueprint.size){case"large":A="battery";break;case"titan":A="target";break;default:A="jumpjet";break}return t(`portal_mech_${h}_${A}_desc`)},{elm:`#mechAssembly .${h}.r${m}.a${w}`,placement:"right"})});let d=$('
');r.append(d),Mu()}}function Mu(){Ws(),le($("#mechList")),$("#mechList").append(` +
`)}a.append(`
`),D({el:"#mechAssembly",data:{p:e.portal.purifier,m:e.portal.mechbay,b:e.portal.mechbay.blueprint},methods:{build(){let h=ha(e.portal.mechbay.blueprint.size,e.portal.mechbay.blueprint.infernal),_=h.c,m=h.s,w=Da(e.portal.mechbay.blueprint.size),M=e.portal.mechbay.max-e.portal.mechbay.bay;if(e.portal.purifier.supply>=_&&M>=w&&e.resource.Soul_Gem.amount>=m){e.portal.purifier.supply-=_,e.resource.Soul_Gem.amount-=m;let F=Ke(e.portal.mechbay.blueprint);e.portal.mechbay.mechs.push(F),e.portal.mechbay.bay+=w,e.portal.mechbay.active++}},setSize(h){switch(e.portal.mechbay.blueprint.size=h,h==="collector"?e.portal.mechbay.blueprint.hardpoint.length=0:h==="small"||h==="medium"?(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length=1):(e.portal.mechbay.blueprint.hardpoint.length===0&&e.portal.mechbay.blueprint.hardpoint.push("laser"),e.portal.mechbay.blueprint.hardpoint.length===1&&e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"plasma":"laser"),h==="titan"?e.portal.mechbay.blueprint.hardpoint.length===2&&(e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"shotgun":"laser"),e.portal.mechbay.blueprint.hardpoint.push(e.portal.mechbay.blueprint.hardpoint.includes("laser")?"kinetic":"laser")):e.portal.mechbay.blueprint.hardpoint.length=2),h){case"small":e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?1:0;break;case"medium":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?2:1;break;case"collector":case"large":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?3:2;break;case"titan":e.portal.mechbay.blueprint.equip.length<1&&e.portal.mechbay.blueprint.equip.push("special"),e.portal.mechbay.blueprint.equip.length<2&&e.portal.mechbay.blueprint.equip.push("shields"),e.portal.mechbay.blueprint.equip.length<3&&e.portal.mechbay.blueprint.equip.push("grapple"),e.portal.mechbay.blueprint.equip.length<4&&e.portal.mechbay.blueprint.equip.push("seals"),e.blood.prepared&&e.portal.mechbay.blueprint.equip.push("stabilizer"),e.portal.mechbay.blueprint.equip.length=e.blood.prepared?5:4;break}},setType(h){e.portal.mechbay.blueprint.chassis=h},setWep(h,_){e.portal.mechbay.blueprint.hardpoint[_]=h,D({el:"#mechAssembly"},"update")},setEquip(h,_){e.portal.mechbay.blueprint.equip[_]=h,D({el:"#mechAssembly"},"update")},vis(h){return e.portal.mechbay.blueprint.size==="collector"?!1:h===0||e.portal.mechbay.blueprint.size==="large"&&h<2||e.portal.mechbay.blueprint.size==="titan"},eVis(h){let _=e.blood.prepared?1:0;switch(e.portal.mechbay.blueprint.size){case"small":return _===1&&h===0;case"medium":return h<=0+_;case"collector":case"large":return h<=1+_;case"titan":return!0}}},filters:{bay(h){return Da(h)},price(h){return ha(h,e.portal.mechbay.blueprint.infernal).c},soul(h){return ha(h,e.portal.mechbay.blueprint.infernal).s},slabel(h){return t(`portal_mech_size_${h}`)},clabel(h){return t(`portal_mech_chassis_${h}`)},wlabel(h){return t(`portal_mech_weapon_${h}`)},desc(h){return t(`portal_mech_size_${h}_desc`)},round(h){return Math.round(h)},equipment(h){if(h!=="special")return t(`portal_mech_equip_${h}`);let _="jumpjet";switch(e.portal.mechbay.blueprint.size){case"large":_="battery";break;case"titan":_="target";break}return t(`portal_mech_equip_${_}`)}}}),["size","chassis","weapon","equip"].forEach(function(h){let _=1;h==="weapon"?_=4:h==="equip"&&(_=o);for(let m=0;m<_;m++)for(let w=0;w<$(`#mechAssembly .${h}.r${m}`).length;w++)pe(`mechAssembly${h}${m}${w}`,function(M){let F=$(M.this).attr("data-val");if(F==="special")switch(e.portal.mechbay.blueprint.size){case"large":F="battery";break;case"titan":F="target";break;default:F="jumpjet";break}return t(`portal_mech_${h}_${F}_desc`)},{elm:`#mechAssembly .${h}.r${m}.a${w}`,placement:"right"})});let d=$('
');r.append(d),Mu()}}function Mu(){Ws(),le($("#mechList")),$("#mechList").append(`
${t("portal_mech_scrap")} | ${t("portal_mech")} #{{index + 1}}: @@ -577,7 +577,7 @@
- `),D({el:"#mechList",data:e.portal.mechbay,methods:{scrap(a){if(e.portal.mechbay.mechs[a]){let i=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal),s=Da(e.portal.mechbay.mechs[a].size);e.portal.purifier.supply+=Math.floor(i.c/3),e.resource.Soul_Gem.amount+=Math.floor(i.s/2),e.portal.purifier.supply>e.portal.purifier.sup_max&&(e.portal.purifier.supply=e.portal.purifier.sup_max),e.portal.mechbay.mechs.splice(a,1),e.portal.mechbay.bay-=s,e.portal.mechbay.active--}}},filters:{equipment(a,i){if(a!=="special")return t(`portal_mech_equip_${a}`);let s="jumpjet";switch(i){case"large":s="battery";break;case"titan":s="target";break}return t(`portal_mech_equip_${s}`)},weapon(a){return t(`portal_mech_weapon_${a}`)},size(a){return t(`portal_mech_size_${a.size}`)},chassis(a){return t(`portal_mech_chassis_${a.chassis}`)}}}),Pu(),$("#mechList .scrap").each(function(a,i){pe(`mechList-scrap${a}`,function(){let s=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal);return t("portal_mech_scrap_refund",[Math.floor(s.c/3),Math.floor(s.s/2)])},{elm:i})})}function Da(r){switch(r){case"small":return 2;case"medium":return e.blood.prepared&&e.blood.prepared>=2?4:5;case"large":return e.blood.prepared&&e.blood.prepared>=2?8:10;case"titan":return e.blood.prepared&&e.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Ws(){let r=$("#mechList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function Pu(){let r=$("#mechList")[0];Sortable.create(r,{onEnd(a){let i=a.from.querySelectorAll(":scope > .mechRow");a.from.insertBefore(a.item,i[a.oldIndex+(a.oldIndex>a.newIndex)]);let s=e.portal.mechbay.mechs;s.splice(a.newDraggableIndex,0,s.splice(a.oldDraggableIndex,1)[0]),sn()}})}function sn(){let r=(pa.mechbay||0)*25,a=0,i=0,s=0;for(let n of e.portal.mechbay.mechs)a+=Da(n.size),a<=r&&(i++,n.size==="small"&&s++);e.portal.mechbay.bay=a,e.portal.mechbay.max=r,e.portal.mechbay.active=i,e.portal.mechbay.scouts=s}function nn(){let r=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(e.portal.spire.type=r[Math.floor(J(0,r.length))],e.portal.spire.count>=10){e.portal.spire.status={};let i=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(za(i[Math.floor(J(0,i.length))]),e.portal.spire.count>=25&&e.portal.spire.count<=100){let s=105-e.portal.spire.count;Math.floor(J(0,s)<=5)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>100&&e.portal.spire.count<=250){za(i[Math.floor(J(0,i.length))]);let s=260-e.portal.spire.count;Math.floor(J(0,s)<=10)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>250&&e.portal.spire.count<=1e3){za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]);let s=1025-e.portal.spire.count;Math.floor(J(0,s)<=25)&&za(i[Math.floor(J(0,i.length))])}else e.portal.spire.count>1e3&&(za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]))}let a=Object.keys(xa).filter(function(i){let s=Object.keys(xa[i].nozone);return!(s.some(n=>Object.keys(e.portal.spire.status).includes(n))||s.includes(e.portal.spire.type))});e.portal.spire.boss=a[Math.floor(J(0,a.length))]}function za(r){e.portal.spire.status.freeze||e.portal.spire.status.hot?r!=="freeze"&&r!=="hot"&&(e.portal.spire.status[r]=!0):e.portal.spire.status.rain||e.portal.spire.status.hail?r!=="rain"&&r!=="hail"&&(e.portal.spire.status[r]=!0):e.portal.spire.status[r]=!0}function Wo(r,a,i){return r.equip.includes("special")&&(r.size==="small"||r.size==="medium"||r.size==="collector")&&a<1&&(a+=(1-a)*(i.includes("gravity")?.1:.2)),r.size!=="small"&&a<1&&(a+=(i.includes("fog")||i.includes("dark")?.005:.01)*e.portal.mechbay.scouts,a>1&&(a=1)),a}function Cu(r,a){return a<1&&a!==0&&r.equip.includes("special")&&r.size==="titan"&&(a+=(1-a)*.25),r.equip.includes("special")&&r.size==="large"&&(a*=1.02),a}function Qo(r,a){let i=1;switch(a){case"freeze":r.equip.includes("radiator")||(i=.25);break;case"hot":r.equip.includes("coolant")||(i=.25);break;case"corrosive":r.equip.includes("ablative")||(i=r.equip.includes("shields")?.75:.25);break;case"humid":r.equip.includes("seals")||(i=.75);break;case"windy":r.chassis==="hover"&&(i=.5);break;case"hilly":r.chassis!=="spider"&&(i=.75);break;case"mountain":r.chassis!=="spider"&&!r.equip.includes("grapple")&&(i=r.equip.includes("flare")?.75:.5);break;case"radioactive":r.equip.includes("shields")||(i=.5);break;case"quake":r.equip.includes("stabilizer")||(i=.25);break;case"dust":r.equip.includes("seals")||(i=.5);break;case"river":r.chassis!=="hover"&&(i=.65);break;case"tar":r.chassis!=="quad"&&(i=r.chassis==="tread"||r.chassis==="wheel"?.5:.75);break;case"steam":r.equip.includes("shields")||(i=.75);break;case"flooded":r.chassis!=="hover"&&(i=.35);break;case"fog":r.equip.includes("sonar")||(i=.2);break;case"rain":r.equip.includes("seals")||(i=.75);break;case"hail":!r.equip.includes("ablative")&&!r.equip.includes("shields")&&(i=.75);break;case"chasm":r.equip.includes("grapple")||(i=.1);break;case"dark":r.equip.includes("infrared")||(i=r.equip.includes("flare")?.25:.1);break;case"gravity":switch(r.size){case"medium":i=.8;break;case"large":i=.45;break;case"titan":i=.25;break}break}return i}function Vo(r,a){let i=a||e.portal.spire.type,s=1;switch(r.chassis){case"wheel":switch(i){case"sand":s=["small","medium"].includes(r.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(r.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(r.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1:.95;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.58;break;case"grass":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(r.size)?1.1:1;break}break;case"tread":switch(i){case"sand":s=["small","medium"].includes(r.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(r.size)?.55:.4;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(r.size)?.88:.72;break}break;case"biped":switch(i){case"sand":s=["small","medium"].includes(r.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.68:.5;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(r.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.7;break;case"grass":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.92:.85;break}break;case"quad":switch(i){case"sand":s=["small","medium"].includes(r.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(r.size)?.58:.42;break;case"forest":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"rocky":s=["small","medium"].includes(r.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(r.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(r.size)?.68:.5;break;case"grass":s=["small","medium"].includes(r.size)?1:.95;break;case"brush":s=["small","medium"].includes(r.size)?.95:.9;break}break;case"spider":switch(i){case"sand":s=["small","medium"].includes(r.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.9:.78;break;case"forest":s=["small","medium"].includes(r.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(r.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(r.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(r.size)?.92:.82;break;case"brush":s=["small","medium"].includes(r.size)?1:.95;break}break;case"hover":switch(i){case"swamp":s=["small","medium"].includes(r.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(r.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(r.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(r.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(r.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(r.size)?.78:.7;break}break}return s}function Zo(r){let a=r.infernal?31.25:25,i=Vo(r),s=[];return Object.keys(e.portal.spire.status).forEach(function(n){s.push(n),a*=Qo(r,n)}),a*=Wo(r,i,s),a}function Ou(r){switch(r){case"small":return .0025;case"medium":return .0075;case"large":return .01;case"titan":return .012;default:return 0}}function pc(r,a){let i=Ou(r.size);if(i===0)return 0;if(r.hasOwnProperty("infernal")&&r.infernal&&e.blood.prepared&&e.blood.prepared>=3&&(i*=1.25),a){e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>0&&(i*=1+e.stats.achieve.gladiator.l*.1),e.blood.wrath&&(i*=1+e.blood.wrath/20),r.size==="titan"&&(i*=1.1);let s=it();e.stats.spire.hasOwnProperty(s)&&e.stats.spire[s].hasOwnProperty("dlstr")?i/=100+e.stats.spire[s].dlstr*25:i/=100;let n=0;for(let c=0;c0&&(i*=1+e.stats.achieve.gladiator.l*.2),e.blood.wrath&&(i*=1+e.blood.wrath/20),e.portal.spire.type==="concrete")switch(r.size){case"small":i*=.92;break;case"medium":i*=.95;break;case"titan":i*=1.25;break}let s=Vo(r),n=[];Object.keys(e.portal.spire.status).forEach(function(l){n.push(l),i*=Qo(r,l)}),i*=Wo(r,s,n),i/=e.portal.spire.count;let c=0;for(let l=0;l nav ul li").length-1&&!r)return;let a=$("#mTabObserve");le(a);let i=$('
');if(a.append(i),i.append(` + `),D({el:"#mechList",data:e.portal.mechbay,methods:{scrap(a){if(e.portal.mechbay.mechs[a]){let i=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal),s=Da(e.portal.mechbay.mechs[a].size);e.portal.purifier.supply+=Math.floor(i.c/3),e.resource.Soul_Gem.amount+=Math.floor(i.s/2),e.portal.purifier.supply>e.portal.purifier.sup_max&&(e.portal.purifier.supply=e.portal.purifier.sup_max),e.portal.mechbay.mechs.splice(a,1),e.portal.mechbay.bay-=s,e.portal.mechbay.active--}}},filters:{equipment(a,i){if(a!=="special")return t(`portal_mech_equip_${a}`);let s="jumpjet";switch(i){case"large":s="battery";break;case"titan":s="target";break}return t(`portal_mech_equip_${s}`)},weapon(a){return t(`portal_mech_weapon_${a}`)},size(a){return t(`portal_mech_size_${a.size}`)},chassis(a){return t(`portal_mech_chassis_${a.chassis}`)}}}),Pu(),$("#mechList .scrap").each(function(a,i){pe(`mechList-scrap${a}`,function(){let s=ha(e.portal.mechbay.mechs[a].size,e.portal.mechbay.mechs[a].infernal);return t("portal_mech_scrap_refund",[Math.floor(s.c/3),Math.floor(s.s/2)])},{elm:i})})}function Da(r){switch(r){case"small":return 2;case"medium":return e.blood.prepared&&e.blood.prepared>=2?4:5;case"large":return e.blood.prepared&&e.blood.prepared>=2?8:10;case"titan":return e.blood.prepared&&e.blood.prepared>=2?20:25;case"collector":return 1;case"default":return 25}}function Ws(){let r=$("#mechList")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function Pu(){let r=$("#mechList")[0];Sortable.create(r,{onEnd(a){let i=a.from.querySelectorAll(":scope > .mechRow");a.from.insertBefore(a.item,i[a.oldIndex+(a.oldIndex>a.newIndex)]);let s=e.portal.mechbay.mechs;s.splice(a.newDraggableIndex,0,s.splice(a.oldDraggableIndex,1)[0]),sn()}})}function sn(){let r=(pa.mechbay||0)*25,a=0,i=0,s=0;for(let n of e.portal.mechbay.mechs)a+=Da(n.size),a<=r&&(i++,n.size==="small"&&s++);e.portal.mechbay.bay=a,e.portal.mechbay.max=r,e.portal.mechbay.active=i,e.portal.mechbay.scouts=s}function nn(){let r=["sand","swamp","forest","jungle","rocky","gravel","muddy","grass","brush","concrete"];if(e.portal.spire.type=r[Math.floor(J(0,r.length))],e.portal.spire.count>=10){e.portal.spire.status={};let i=["freeze","hot","corrosive","humid","windy","hilly","mountain","radioactive","quake","dust","river","tar","steam","flooded","fog","rain","hail","chasm","dark","gravity"];if(za(i[Math.floor(J(0,i.length))]),e.portal.spire.count>=25&&e.portal.spire.count<=100){let s=105-e.portal.spire.count;Math.floor(J(0,s)<=5)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>100&&e.portal.spire.count<=250){za(i[Math.floor(J(0,i.length))]);let s=260-e.portal.spire.count;Math.floor(J(0,s)<=10)&&za(i[Math.floor(J(0,i.length))])}else if(e.portal.spire.count>250&&e.portal.spire.count<=1e3){za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]);let s=1025-e.portal.spire.count;Math.floor(J(0,s)<=25)&&za(i[Math.floor(J(0,i.length))])}else e.portal.spire.count>1e3&&(za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]),za(i[Math.floor(J(0,i.length))]))}let a=Object.keys(xa).filter(function(i){let s=Object.keys(xa[i].nozone);return!(s.some(n=>Object.keys(e.portal.spire.status).includes(n))||s.includes(e.portal.spire.type))});e.portal.spire.boss=a[Math.floor(J(0,a.length))]}function za(r){e.portal.spire.status.freeze||e.portal.spire.status.hot?r!=="freeze"&&r!=="hot"&&(e.portal.spire.status[r]=!0):e.portal.spire.status.rain||e.portal.spire.status.hail?r!=="rain"&&r!=="hail"&&(e.portal.spire.status[r]=!0):e.portal.spire.status[r]=!0}function Wo(r,a,i){return r.equip.includes("special")&&(r.size==="small"||r.size==="medium"||r.size==="collector")&&a<1&&(a+=(1-a)*(i.includes("gravity")?.1:.2)),r.size!=="small"&&a<1&&(a+=(i.includes("fog")||i.includes("dark")?.005:.01)*e.portal.mechbay.scouts,a>1&&(a=1)),a}function Cu(r,a){return a<1&&a!==0&&r.equip.includes("special")&&r.size==="titan"&&(a+=(1-a)*.25),r.equip.includes("special")&&r.size==="large"&&(a*=1.02),a}function Qo(r,a){let i=1;switch(a){case"freeze":r.equip.includes("radiator")||(i=.25);break;case"hot":r.equip.includes("coolant")||(i=.25);break;case"corrosive":r.equip.includes("ablative")||(i=r.equip.includes("shields")?.75:.25);break;case"humid":r.equip.includes("seals")||(i=.75);break;case"windy":r.chassis==="hover"&&(i=.5);break;case"hilly":r.chassis!=="spider"&&(i=.75);break;case"mountain":r.chassis!=="spider"&&!r.equip.includes("grapple")&&(i=r.equip.includes("flare")?.75:.5);break;case"radioactive":r.equip.includes("shields")||(i=.5);break;case"quake":r.equip.includes("stabilizer")||(i=.25);break;case"dust":r.equip.includes("seals")||(i=.5);break;case"river":r.chassis!=="hover"&&(i=.65);break;case"tar":r.chassis!=="quad"&&(i=r.chassis==="tread"||r.chassis==="wheel"?.5:.75);break;case"steam":r.equip.includes("shields")||(i=.75);break;case"flooded":r.chassis!=="hover"&&(i=.35);break;case"fog":r.equip.includes("sonar")||(i=.2);break;case"rain":r.equip.includes("seals")||(i=.75);break;case"hail":!r.equip.includes("ablative")&&!r.equip.includes("shields")&&(i=.75);break;case"chasm":r.equip.includes("grapple")||(i=.1);break;case"dark":r.equip.includes("infrared")||(i=r.equip.includes("flare")?.25:.1);break;case"gravity":switch(r.size){case"medium":i=.8;break;case"large":i=.45;break;case"titan":i=.25;break}break}return i}function Vo(r,a){let i=a||e.portal.spire.type,s=1;switch(r.chassis){case"wheel":switch(i){case"sand":s=["small","medium"].includes(r.size)?.9:.85;break;case"swamp":s=["small","medium"].includes(r.size)?.35:.18;break;case"jungle":s=["small","medium"].includes(r.size)?.92:.85;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1:.95;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.58;break;case"grass":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.9:.8;break;case"concrete":s=["small","medium"].includes(r.size)?1.1:1;break}break;case"tread":switch(i){case"sand":s=["small","medium"].includes(r.size)?1.15:1.1;break;case"swamp":s=["small","medium"].includes(r.size)?.55:.4;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.95:.9;break;case"rocky":s=["small","medium"].includes(r.size)?.65:.5;break;case"gravel":s=["small","medium"].includes(r.size)?1.3:1.2;break;case"muddy":s=["small","medium"].includes(r.size)?.88:.72;break}break;case"biped":switch(i){case"sand":s=["small","medium"].includes(r.size)?.78:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.68:.5;break;case"forest":s=["small","medium"].includes(r.size)?1:.95;break;case"jungle":s=["small","medium"].includes(r.size)?.82:.7;break;case"rocky":s=["small","medium"].includes(r.size)?.48:.4;break;case"muddy":s=["small","medium"].includes(r.size)?.85:.7;break;case"grass":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"brush":s=["small","medium"].includes(r.size)?.92:.85;break}break;case"quad":switch(i){case"sand":s=["small","medium"].includes(r.size)?.86:.75;break;case"swamp":s=["small","medium"].includes(r.size)?.58:.42;break;case"forest":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"rocky":s=["small","medium"].includes(r.size)?.95:.9;break;case"gravel":s=["small","medium"].includes(r.size)?.9:.8;break;case"muddy":s=["small","medium"].includes(r.size)?.68:.5;break;case"grass":s=["small","medium"].includes(r.size)?1:.95;break;case"brush":s=["small","medium"].includes(r.size)?.95:.9;break}break;case"spider":switch(i){case"sand":s=["small","medium"].includes(r.size)?.75:.65;break;case"swamp":s=["small","medium"].includes(r.size)?.9:.78;break;case"forest":s=["small","medium"].includes(r.size)?.82:.75;break;case"jungle":s=["small","medium"].includes(r.size)?.77:.65;break;case"rocky":s=["small","medium"].includes(r.size)?1.25:1.2;break;case"gravel":s=["small","medium"].includes(r.size)?.86:.75;break;case"muddy":s=["small","medium"].includes(r.size)?.92:.82;break;case"brush":s=["small","medium"].includes(r.size)?1:.95;break}break;case"hover":switch(i){case"swamp":s=["small","medium"].includes(r.size)?1.35:1.2;break;case"forest":s=["small","medium"].includes(r.size)?.65:.48;break;case"jungle":s=["small","medium"].includes(r.size)?.55:.35;break;case"rocky":s=["small","medium"].includes(r.size)?.82:.68;break;case"muddy":s=["small","medium"].includes(r.size)?1.15:1.08;break;case"brush":s=["small","medium"].includes(r.size)?.78:.7;break}break}return s}function Zo(r){let a=r.infernal?31.25:25,i=Vo(r),s=[];return Object.keys(e.portal.spire.status).forEach(function(n){s.push(n),a*=Qo(r,n)}),a*=Wo(r,i,s),a}function Ou(r){switch(r){case"small":return .0025;case"medium":return .0075;case"large":return .01;case"titan":return .012;default:return 0}}function pc(r,a){let i=Ou(r.size);if(i===0)return 0;if(r.hasOwnProperty("infernal")&&r.infernal&&e.blood.prepared&&e.blood.prepared>=3&&(i*=1.25),a){e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>0&&(i*=1+e.stats.achieve.gladiator.l*.1),e.blood.wrath&&(i*=1+e.blood.wrath/20),r.size==="titan"&&(i*=1.1);let s=ot();e.stats.spire.hasOwnProperty(s)&&e.stats.spire[s].hasOwnProperty("dlstr")?i/=100+e.stats.spire[s].dlstr*25:i/=100;let n=0;for(let c=0;c0&&(i*=1+e.stats.achieve.gladiator.l*.2),e.blood.wrath&&(i*=1+e.blood.wrath/20),e.portal.spire.type==="concrete")switch(r.size){case"small":i*=.92;break;case"medium":i*=.95;break;case"titan":i*=1.25;break}let s=Vo(r),n=[];Object.keys(e.portal.spire.status).forEach(function(l){n.push(l),i*=Qo(r,l)}),i*=Wo(r,s,n),i/=e.portal.spire.count;let c=0;for(let l=0;l nav ul li").length-1&&!r)return;let a=$("#mTabObserve");le(a);let i=$('
');if(a.append(i),i.append(`