diff --git a/evolve/main.js b/evolve/main.js index ba4cd3adde..e5b2043e92 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:{}},Rt={},k={},W={},bt={},xe={},ma={},br=0,Rl=0,Hl=0,ai={t:0};function Pn(r){br=r}function On(r){Rl=r}function Cn(r){Hl=r}var gr={},Aa={},ar={view:"all"},za=["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 X(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:Zc()}else Zc()}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={};za.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));be(e.version)<=103015&&e.portal.hasOwnProperty("harbour")&&(e.portal.harbor=e.portal.harbour,delete e.portal.harbour);e.version="1.3.15";delete e.revision;e.beta=8;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);Jc(!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})});za.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 Sn(){["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}})}Sn();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 Zc(){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 qr={x10:!1,x25:!1,x100:!1,q:!1};function pe(){let r=1;return e.settings.mKeys&&(qr.x10&&(r*=10),qr.x25&&(r*=25),qr.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 Li(){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 ri={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 Te(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=ri[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=ri[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=ri[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=ri[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=ri[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=ri[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=ri[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=ri[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(){Li()});function os(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||Dr();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={},jn(),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},Ra={};function Dr(){za.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Jc(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 jn(){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(X(80,100)),mil:Math.floor(X(75,125)),eco:Math.floor(X(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(X(0,20)),mil:Math.floor(X(125,175)),eco:Math.floor(X(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(X(40,60)),mil:Math.floor(X(200,300)),eco:Math.floor(X(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,Jc(!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 Fn;Ul(e.settings.locale);function t(r,a){let i=Fn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Fn)),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}),Fn=a}var ls={"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"};function ke(r){return e.race.high_pop&&(r*=w.high_pop.vars()[1]/100),r}function et(r){if(e.race.gravity_well&&e.race.teamster&&e.race.teamster>0){let a=An(),i=e.civic.teamster.workers>a?a:e.civic.teamster.workers;r*=i/a}return r}function T(r,a,i){switch(r){case"transmitter":return 2.5;case"oil_well":{let s=e.tech.oil>=4?.48:.4;e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),e.city.geology.Oil&&(s*=e.city.geology.Oil+1),e.city.biome==="desert"?s*=qe.desert.vars()[1]:e.city.biome==="tundra"?s*=qe.tundra.vars()[1]:e.city.biome==="taiga"&&(s*=qe.taiga.vars()[2]);let n=me("dirty_jobs",2);return n&&(s*=1+n/100),s}case"iridium_mine":switch(a){case"iridium":{let s=.035;e.city.geology.Iridium&&(s*=e.city.geology.Iridium+1);let n=s,c=us(3);return{b:n,g:c-1,f:n*c}}case"coal":return .55}case"helium_mine":{let s=.18,n=us(3);return{b:s,g:n-1,f:s*n}}case"red_mine":switch(a){case"copper":{let s=ke(.25),n=us(3);return{b:s,g:n-1,f:s*n}}case"titanium":{let s=ke(.02),n=us(3);return{b:s,g:n-1,f:s*n}}case"stone":return ke(.75);case"asbestos":return ke(1.25);case"aluminium":return ke(.066)}case"biodome":switch(a){case"food":return ke(.25);case"cat_food":return 2;case"lumber":return ke(1.5)}case"gas_mining":return e.tech.helium?.65:.5;case"outpost":{let s={b:.025,d:0,n:0};if(e.tech.drone){let n=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?.12:.06;s.d=e.space.drone.count*n,s.n=s.b*(1+s.d)}else s.n=s.b;return a?s:s.n}case"oil_extractor":{let s=e.tech.oil>=4?.48:.4;return e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),s}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 n=.05*(k.ai_colonist?e.civic.titan_colonist.workers+D(k.ai_colonist):e.civic.titan_colonist.workers);return e.race.high_pop&&(n=ke(n)),n}}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 s=.18;return e.civic.govern.type==="corpocracy"&&(s*=e.tech.high_tech&&e.tech.high_tech>=16?1.4:1.3),e.civic.govern.type==="socialist"&&(s*=1.1),s}case"infernite_mine":return .5*Br("gate",0,i).supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return ke(.02)*(e.space.titan_mine?e.space.titan_mine.ratio:50)/100;case"aluminium":return ke(.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 s=0;switch(a){case"materials":{s=e.tech.isolation?.12:.09;break}case"bolognium":{s=e.tech.isolation?.0288:.0216;break}case"stone":{s=e.tech.isolation?.8:.6;break}case"adamantite":{s=e.tech.isolation?.448:.336;break}case"copper":{s=.58;break}case"coal":{s=.13;break}case"iron":{s=.74;break}case"aluminium":{s=.88;break}case"chrysotile":{s=1.44;break}}e.race.tough&&(s*=1+w.tough.vars()[0]/100);let n=ve("ogre");return n>0&&(s*=1+w.tough.vars(1)[0]/100*n),e.tech.tau_pit_mining&&(s*=1.18),s}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 s=1;switch(e.tech.womling_mining&&(s+=e.tech.womling_mining*.15),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&(s*=1.1),e.tech.womling_gene&&(s*=1.25),a){case"unobtainium":return .0305*s;case"uranium":return .047*s;case"titanium":return .616*s;case"copper":return 1.191*s;case"iron":return 1.377*s;case"aluminium":return 1.544*s;case"neutronium":return .382*s;case"iridium":return .535*s}}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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=at("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)*s}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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=at("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),8*s}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 s=0;if(e.race.psychicPowers.boostTime>0&&(s+=w.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(w.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.boost).toFixed(3)}return 1+s}return 1}case"psychic_cash":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("cash")){let s=0;if(e.race.psychicPowers.cash>0&&(s+=w.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(w.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.cash).toFixed(3)}return 1+s}return 1}}}function Ue(r){switch(r){case"Physics":ro();break;case"Genetics":Ua();break;case"Monument":return to();case"PhysicsTech":return ft;case"GeneTech":return Yc;case"BloodTech":return Wl;case"Crispr":ao();break;case"Blood":In();break}}var ft={lhc:{title(){return Ze("fool",2022)?t("arpa_projects_railway_title"):t("arpa_projects_lhc_title")},desc(){return Ze("fool",2022)?t("arpa_projects_railway_desc"):t("arpa_projects_lhc_desc")},reqs:{high_tech:6},grant:"supercollider",effect(r){if(Ze("fool",2022)&&!r)return ft.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"):ur()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm2",[a]):t("arpa_projects_lhc_effect2",[a,e.race.orbit_decayed?t("space_home_satellite_title"):ur()]):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"):ur()])},cost:{Money(r,a){return Ve("lhc",r,25e5,1.05,a)},Knowledge(r,a){return Ve("lhc",r,5e5,1.05,a)},Copper(r,a){return Ve("lhc",r,125e3,1.05,a)},Cement(r,a){return Ve("lhc",r,25e4,1.05,a)},Aluminium(r,a){return Ve("lhc",r,35e4,1.05,a)},Titanium(r,a){return Ve("lhc",r,5e4,1.05,a)},Polymer(r,a){return Ve("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 Ve("stock_exchange",r,3e6,1.06,a)},Plywood(r,a){return Ve("stock_exchange",r,25e3,1.06,a)},Brick(r,a){return Ve("stock_exchange",r,2e4,1.06,a)},Wrought_Iron(r,a){return Ve("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 Ve("tp_depot",r,18e5,1.08,a)},Stone(r,a){return Ve("tp_depot",r,75e4,1.08,a)},Iron(r,a){return Ve("tp_depot",r,25e4,1.08,a)},Alloy(r,a){return Ve("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 Ve("launch_facility",r,2e6,1.1)},Knowledge(r){return Ve("launch_facility",r,5e5,1.1)},Cement(r){return Ve("launch_facility",r,15e4,1.1)},Oil(r){return Ve("launch_facility",r,2e4,1.1)},Sheet_Metal(r){return Ve("launch_facility",r,15e3,1.1)},Alloy(r){return Ve("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=me("gaslighter",2),a=r?2-r:2;return t("arpa_projects_monument_effect1",[a])},cost:{Stone(r,a){return Ki("Stone",r,a)},Aluminium(r,a){return Ki("Aluminium",r,a)},Cement(r,a){return Ki("Cement",r,a)},Steel(r,a){return Ki("Steel",r,a)},Lumber(r,a){return Ki("Lumber",r,a)},Crystal(r,a){return Ki("Crystal",r,a)}}},railway:{title(){return Ze("fool",2022)?t("arpa_projects_lhc_title"):t("arpa_projects_railway_title")},desc(){return Ze("fool",2022)?t("arpa_projects_lhc_desc"):t("arpa_projects_railway_desc")},reqs:{high_tech:6,trade:3},grant:"railway",effect(r){if(Ze("fool",2022)&&!r)return ft.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 Ve("railway",r,25e5,1.08,a)},Lumber(r,a){return Ve("railway",r,75e4,1.08,a)},Iron(r,a){return Ve("railway",r,3e5,1.08,a)},Steel(r,a){return Ve("railway",r,45e4,1.08,a)}}},roid_eject:{title(){return t("arpa_projects_roid_eject_title",[zn()])},desc(){return t(e.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[zn()])},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),zn()])}
`},cost:{Money(r,a){return Ve("roid_eject",r,1875e4,1.075,a)},Deuterium(r,a){return Ve("roid_eject",r,375e3,1.075,a)},Bolognium(r,a){return Ve("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 Ve("nexus",r,5e6,1.12,a)},Crystal(r,a){return Ve("nexus",r,6e4,1.12,a)},Iridium(r,a){return Ve("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*gt("magic")).toFixed(3);if(e.tech.syphon&&e.tech.syphon>=60){let a=st("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 Ve("syphon",r,75e5,1.025,a)},Mana(r,a){return Ve("syphon",r,5e3,1.025,a)},Crystal(r,a){return Ve("syphon",r,1e5,1.025,a)},Infernite(r,a){return Ve("syphon",r,1e4,1.025,a)}}}};function zn(){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 Yc={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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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 Ke("mutation")?(e.genes.mutation=1,Ua(),!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 Ke("transformation")?(e.genes.mutation=2,Ua(),!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 Ke("metamorphosis")?(e.genes.mutation=3,Ua(),!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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("architect")},post(){Er(),na()}},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!!Ke("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!!Ke("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!!Ke("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");kt()}},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!!Ke("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!!Ke("unlocked")},post(){Kt(!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!!Ke("universal")},post(){Kt(!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!!Ke("standard")},post(){Kt(!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!!Ke("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 Ke("negotiator")?(e.genes.trader=1,Tn(),!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 Ke("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 Ke("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!!Ke("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!!Ke("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!!Ke("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 Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("essence_absorber")},post(){In()}}},Wl={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(){Ni()}},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 Ke(r){let a=!0,i=Yc[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 ds(r,a,i){return r=tu(r,a,i),Ar({cost:r},a,i)}function tu(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-w.creative.vars()[1]/100),s>0&&(l*=1-w.creative.vars(1)[1]/100*s),l}}),n}return r}function Ve(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-=w.creative.vars()[0]),a&&(c+=a),Math.round(s**c*i)}function ro(){if(e.tech.high_tech&&e.tech.high_tech>=6){let r=$("#arpaPhysics");le(r),Object.keys(ft).forEach(function(a){iu(r,a)})}}function En(){let r=$("#geneticMinor")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function ru(){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,Ua()}})}function Ua(){let r=$("#arpaGenetics");if(En(),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"),B({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=pe(),d=2e5;if(e.resource.Knowledge.amount>=d){let h=Math.floor(e.resource.Knowledge.amount/d),p=Math.min(o,h);e.resource.Knowledge.amount-=d*p,e.resource.Genes.amount+=p}},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?xt(o/(e.arpa.sequence.labs*2)):xt(o/e.arpa.sequence.labs);{let d=jt(14,12);return d.length>0?d:t("time_never")}}}}),_e("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){w[x]&&w[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){(w[x]&&w[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,au(i,x),n.push(x))}),a.append(`
${t("arpa_race_genetic_traids",[at("name")])}
`);let c=sa("name"),l=[],o=[],d=$('
');a.append(d);let h=Le(e.race);Ze("fool",2023)&&(h.hooved=1),Object.keys(h).forEach(function(x){if(w[x]&&w[x].type!=="minor"&&w[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&&(w[x].type==="major"&&e.genes.mutation||w[x].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let R=$('
'),S=$(`${t("arpa_remove_button")}`);l.push(x),R.append(S),R.append($(`${c[x]?c[x]:w[x].name} (${t("arpa_genepool_rank",[h[x]])})`)),d.append(R)}else o.push(x),d.append(`
${c[x]?c[x]:w[x].name} (${t("arpa_genepool_rank",[h[x]])})
`)}});let p=[];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(z).forEach(function(R){R!=="junker"&&R!=="sludge"&&R!=="custom"&&z[R].type===z[e.race.species].type&&Object.keys(z[R].traits).forEach(function(S){if(!e.race[S]&&S!=="soul_eater"){let Q=x.indexOf(S);if(Q===-1)p.push(S);else{let Z=!1;switch(Q%2){case 0:e.race[x[Q+1]]&&(Z=!0);break;case 1:e.race[x[Q-1]]&&(Z=!0);break}Z||p.push(S)}}})});let j=$('
');a.append(j);for(let R=0;R'),Z=$(`${t("arpa_gain_button")}`);Q.append(Z),Q.append($(`${c[S]?c[S]:w[S].name}`)),j.append(Q)}}s&&a.prepend(`
${t("arpa_race_genetic_minor_traits",[at("name")])}
`);let m=function(x){let j=w[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")])},b=function(x){let j=w[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=Ha(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),t("arpa_gene_buy",[sa("name",x),Te(j),e.resource.Genes.name])},F=function(x){let j=Ha(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),t("arpa_phage_buy",[sa("name",x),Te(j),t("resource_Phage_name")])};B({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(x){let j=0,R=pe(),S=!0,Q=!1;for(;j=Z?(e.resource.Genes.amount-=Z,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"&&Kt(!0),Ua(),x==="persuasive"&&Tn())},phage(x){let j=0,R=pe(),S=!0,Q=!1;for(;j=Z?(e.prestige.Phage.count-=Z,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"&&Kt(!0),Ua(),x==="persuasive"&&Tn())},purge(x){if(e.race.species==="sludge"&&(e.race.modified||x==="ooze"))return;let j=w[x].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1);let R=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[R].count>=j){e.prestige[R].count-=j;let S=e.race[x];delete e.race[x],e.race.modified?e.race.modified++:e.race.modified=1,Bs(x,S),Ua(),ue(),Tt();let Q=0;Object.keys(e.race).forEach(function(Z){w[Z]&&(w[Z].type=="major"||w[Z].type=="genus")&&Z!=="evil"&&Q++}),Q===0&&Be("blank_slate")}},gain(x){if(e.race.species==="sludge"&&e.race.modified)return;let j=w[x].val*5;e.race.species==="sludge"&&(j*=2),e.race.species==="custom"&&(j*=10),j<0&&(j*=-1);let R=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[R].count>=j&&(e.prestige[R].count-=j,e.race[x]=1,e.race.modified?e.race.modified++:e.race.modified=1,Di(x),Ua(),ue(),Tt())},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 b(x)},genePurchasable(x){let j=Ha(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),e.resource.Genes.amount>=j},phagePurchasable(x){let j=Ha(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),e.prestige.Phage.count>=j}}}),n.forEach(function(x){_e(`popGenetrait${x}`,function(){return M(x)},{elm:`#geneticBreakdown .t-${x} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&_e(`popGenetrait${x}`,function(){return F(x)},{elm:`#geneticBreakdown .t-${x} .pbuy`,classes:"has-background-light has-text-dark"}),_e(`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){_e(`popRemoveBkdwn${x}`,function(){return m(x)},{elm:`#geneticBreakdown .remove${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{wide:!0,classes:"w30"})}),o.forEach(function(x){let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{elm:`#geneticBreakdown .trait${x}`,wide:!0,classes:"w30"})}),p.forEach(function(x){_e(`popAddBkdwn${x}`,function(){return b(x)},{elm:`#geneticBreakdown .add${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{wide:!0,classes:"w30"})}),ru()}}function au(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 ao(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(le($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),Ql())}function In(){e.tech.b_stone&&e.tech.b_stone>=2&&(le($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),Vl())}function iu(r,a){if(Yl(a)){if(e.arpa[a]||(e.arpa[a]={complete:0,rank:0}),ft[a].rank&&e.arpa[a].rank>=ft[a].rank)return;let i=$(`
`);r.append(i);let s=typeof ft[a].title=="string"?ft[a].title:ft[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($(``)),B({el:`#arpa${a}`,data:e.arpa[a],methods:{queue(d){if(e.tech.queue){let p=pe();for(let m=0;m0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===b)e.queue.queue[e.queue.queue.length-1].q++;else{let x=typeof ft[d].title=="string"?ft[d].title:ft[d].title();e.queue.queue.push({id:b,action:"arpa",type:d,label:x,cna:!1,time:0,q:1,qs:1,t_max:0})}ca()}else break}}},build(d,h){Ks(d,h,!0)},srDesc(){return os(typeof ft[a].desc=="string"?ft[a].desc:ft[a].desc())},srLevel(){return os(ft[a].effect())},arpaProjectSRCosts(d,h){let p=d==="100"?100-e.arpa[h].complete:d;var m=`Construct ${p}%. Costs:`,b=ds(ft[h].cost);return Object.keys(b).forEach(function(M){var F=+(b[M]()*(p/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} ${Te(F,2)}.${j}`}}),m}},filters:{remain(d){return 100-d},level(d){return t("arpa_level",[d])}}}),_e(`popArpa${a}`,function(){return ft[a].desc},{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),_e(`popArpa${a}`,function(){return ft[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[ft[r].grant]=e.arpa[r].rank,n=!0,r==="monument"&&(e.arpa.m_type=to(),$(`#arpa${r} .head .desc`).html(ft[r].title()),Zr(!1,["arpamonument"])),r==="roid_eject"&&($(`#arpa${r} .head .desc`).html(ft[r].title()),Zr(!1,["arparoid_eject"])),r==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,Ee("popArpalaunch_facility"),[1,10,25,100].forEach(function(l){Ee(`popArpalaunch_facility${l}`)}),s||Jr(["arpalaunch_facility"]),ro(),Mt(),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=ds(ft[a].cost);let c=ii(ft[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}${Te(o,2)}
`))}}),s}function Tn(){Object.keys(e.resource).forEach(function(r){B({el:`#market-${r}`},"update")}),B({el:"#galaxyTrade"},"update")}function io(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),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=st("mad");e.stats.mad++,Yr(),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"&&z[e.race.species].type!=="demonic"&&Be("take_no_advice"),e.race.truepath&&ie("ashanddust"),Ir();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),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function so(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"bioseed"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=st("bioseed");e.stats.bioseed++,Yr(),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"&&Be("organ_harvester"),e.city.biome==="hellscape"&&z[e.race.species].type!=="demonic"&&Be("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&&Be("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}Ir();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,p=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,m=e.starDock.probes.count+1,b=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:b,seed:Math.floor(X(1e4)),ascended:!1},p>0&&(e.race.corruption=p),h&&(e.race.srace=h),oa({orbit:s,biome:n,ptrait:c,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function no(){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"}),Dr();let r=st("cataclysm");e.stats.cataclysm++,Yr(),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"&&z[e.race.species].type!=="demonic"&&Be("take_no_advice"),Ir(),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),oa({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(X(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),oa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oo(){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))),Dr(),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"&&Be("the_misery"),e.race.decay&&ie("dissipated"),e.race.steelen&&Be("steelem");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=st("vacuum");Ir(),e.stats.blackhole++,Yr(),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(X(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),oa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function lo(){Dr(),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=st("ascend");e.stats.ascend++,Yr(),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(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let o=0;Object.keys(e.city.geology).forEach(function(p){e.city.geology[p]>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&&Be("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Ir();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(X(1e4)),ascended:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),Object.keys(c).forEach(function(p){c[p]+=.02}),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function _s(){if(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"descension"}),ie("squished",!0),ie(`extinct_${e.race.species}`),e.race.witch_hunter&&e.tech.forbidden>=5&&e.race.universe==="magic"?ie("nightmare"):ie("corrupted"),e.race.fasting&&e.tech.dish_reset){let h=ot();e.stats.endless_hunger.b5[h]=!0,h!=="m"&&h!=="l"&&(e.stats.endless_hunger.b5.l=!0)}z[e.race.species].type==="angelic"&&Be("twisted"),e.race.junker&&e.race.species==="junker"&&Be("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&Be("garbage_pie"),e.race.cataclysm&&Be("finish_line"),e.race.ooze&&e.race.species==="sludge"&&Be("slime_lord");let r=st("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++,Yr(),Ir();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(X(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d&&(e.race.srace=d),oa({orbit:n,biome:c,ptrait:l,geology:o}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function uo(r){Dr(),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=st("terraform");e.stats.terraform++,Yr(),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"),Ir();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,p=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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},p>0&&(e.race.corruption=p),h&&(e.race.srace=h),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function _o(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"ai apocalypse"}),ie(`extinct_${e.race.species}`),ie("obsolete"),ie("squished",!0),e.race.junker&&e.race.species==="junker"&&Be("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=st("ai");Ir(),e.stats.aiappoc++,Yr(),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=z[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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function po(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"matrix"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("matrix");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("bluepill"),Ln(),Ir(),e.stats.matrix++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function ho(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"retired"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("retired");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("retired"),Ln(),Ir(),e.stats.retire++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function fo(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"eden"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("eden");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("adam_eve"),Ln(),Ir(),e.stats.eden++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oa(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},jn(),e.new=!0,e.seed=Math.rand(0,1e4)}function Ln(){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",Zt(),"l"),e.stats.womling.friend[r]>0&&e.stats.womling.lord[r]>0&&e.stats.womling.god[r]>0&&ie("overlord",r==="m",Zt(),r)}var Gn={spc_titan:{info:{name(){return U().titan},desc(){return t("space_titan_info_desc",[U().titan,z[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",[U().titan])},desc(){return t("space_mission_desc",[U().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",[U().titan])},action(){return u($(this)[0])?(I(t("space_titan_mission_action",[U().titan,z[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",[Te(H(250)),e.resource.Water.name])}
`:"",a=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),U().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 de(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(r){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(r),U().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(r){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(r?e.space.ai_core2.on:k.ai_core2)?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return de(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 ut(-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",[U().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=D(1);return`
${t("space_used_support",[U().titan])}
${t("plus_max_resource",[D(1),e.race.truepath?t("job_colonist_tp",[U().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+=D(1);let r=D(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*=w.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",[U().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",[U().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(r){let a='
',i=Ea("storehouse",!1,r),s=Ea("storehouse",!0,r);for(let n of $(this)[0].res())if(e.resource[n].display){let c=$(this)[0].heavy(n),l=Te(+(H($(this)[0].val(n))*(c?s:i)).toFixed(0),1);a=a+`${t("plus_max_resource",[l,e.resource[n].name])}`}return a=a+"
",a},action(){if(u($(this)[0])){e.space.storehouse.count++;let r=Ea("storehouse",!1),a=Ea("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",[U().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=Tr()*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",[U().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=+ke(r).toFixed(3)),`
${t("space_used_support",[U().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,tt(),!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 de(5)},action(){return u($(this)[0])?(e.space.sam.count++,re($(this)[0]),!0):!1},post(){B({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[U().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(r){let a=$(this)[0].support_fuel().a,i=2500;e.race.high_pop&&(i=ke(i)),(r?e.space?.ai_core2?.on??0:k.ai_core2)&&(i*=1.25);let s=`
${t("space_used_support",[U().titan])}
`;return s+=`
${t("space_red_exotic_lab_effect1",[i])}
`,s+`
${t("spend",[a,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?.count??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 Gn.spc_titan.ai_core2.effect(r);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},re($(Gn.spc_titan.ai_core2)[0]),Mt(),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 de(100)},p_fuel(){return{r:"Water",a:1e3}},effect(r){let a=25,i=`
${t("interstellar_citadel_stat",[+la(r).toFixed(1)])}
`;if(i+=`
${t("interstellar_citadel_effect",[a])}
${t("space_ai_core_effect2",[a])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(i+=`
${t("space_ai_core_effect3",[50])}
`),i+=`
${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 s=+Wn(r).toFixed(1);i+=`
${t("space_ai_core_effect4",[s])}
`}return i},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",[D(1),e.race.truepath?t("job_colonist_tp",[U().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[D(1),U().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return de(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 U().enceladus},desc(){return t("space_enceladus_info_desc",[U().enceladus,z[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",[U().enceladus])},desc(){return t("space_mission_desc",[U().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",[U().enceladus])},action(){return u($(this)[0])?(I(t("space_enceladus_mission_action",[U().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",[U().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",[U().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",[U().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=vt("spc_enceladus"),a=Math.round(1e4*r),i=`
${t("space_used_support",[U().enceladus])}
${t("city_max_knowledge",[a])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[D(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 de(12)},action(){return u($(this)[0])?(e.space.zero_g_lab.count++,re($(this)[0]),!0):!1},post(){It()},postPower(r){xi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[U().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",[U().enceladus])}
`;if(r+=`
${t("galaxy_defense_platform_effect",[50])}
`,r+=t("plus_max_resource",[D(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 de(10)},action(){return u($(this)[0])?(e.space.operating_base.count++,re($(this)[0]),!0):!1},post(){B({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||ea(),!0):!1}}},spc_triton:{info:{name(){return U().triton},desc(){return t("space_triton_info_desc",[U().triton,z[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")}
`),B({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-yt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[U().triton])},desc(){return t("space_mission_desc",[U().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",[U().triton])},action(){return u($(this)[0])?(I(t("space_triton_mission_action",[U().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",[D(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 de(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(),Mt(),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",[U().triton])}
${i}
${t("space_lander_effect2",[D(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 de(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 de(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 de(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 de(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 U().eris},desc(){return t("space_eris_info_desc",[U().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 }}%
`),B({el:`#${r}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[U().eris])},desc(){return t("space_mission_desc",[U().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",[U().eris])},action(){return u($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[U().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[U().titan])},desc(){return`
${t("space_drone_control",[U().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(),U().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),r,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return de(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",[U().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(yt(1,"army",0)*vt("spc_eris")),a=`
${t("space_used_support",[U().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",[U().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*vt("spc_eris")),a=`
${t("space_used_support",[U().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?Xr(e.race.lone_survivor?10100:101e3):0}},effect(r){let a="",i=(r?.count??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}),zr(),Ee()),!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,zr()},250):(e.tech.matrix=3,zr())},effect(){let r=mo(),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=mo();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)),p=d*20;a.fillText(h,p,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(){po()},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=nu();return`
${t("tau_star_goe_facility_effect")}
${r}`},action(){if(u($(this)[0])){let r=Ar(Ye.tau_star.goe_facility);return Object.keys(r).forEach(function(a){e.resource[a].amount+=r[a]()}),fo(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[z[e.race.species].home])},desc(){return t("tau_home",[z[e.race.species].home])},support:"orbital_station",extra(r){e.tech.tau_home&&e.tech.tau_home>=2&&!wr()&&($(`#${r}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),B({el:`#${r}Mats`,data:e.resource.Materials,methods:{tauShow(){return!wr()}},filters:{round(a){return+a.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[z[e.race.species].home])},desc(){return t("tau_new_mission_title",[z[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",[z[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",[z[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,re($(Ye.tau_home.orbital_station)[0])){e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let a=$(Ye.tau_home.mining_pit)[0].workers();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&&$i(),!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 wr()?0:f("orbital_station",r,5e5,1.3,"tauceti")},Helium_3(r){return wr()?f("orbital_station",r,Ae(25e4),1.3,"tauceti"):0},Copper(r){return wr()?f("orbital_station",r,125e4,1.3,"tauceti"):0},Adamantite(r){return wr()?f("orbital_station",r,9e5,1.3,"tauceti"):0}},effect(){let r=H(15e3),a=+Ae($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[z[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 de(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",[z[e.race.species].home])}
${t("requires_power_support_combo",[z[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 wr()?0:f("colony",r,65e4,1.225,"tauceti")},Furs(r){return wr()?f("colony",r,72e4,1.225,"tauceti"):0},Graphene(r){return wr()?f("colony",r,485e3,1.225,"tauceti"):0},Brick(r){return wr()?f("colony",r,Xr(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(),z[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[r])}
`),e.tech.isolation){let n=Tr()*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,z[e.race.species].home])}
`,e.tech.isolation){let n=me("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||ea(),!0):!1},citizens(){let r=e.tech.isolation?8:5;return e.race.high_pop&&(r*=w.high_pop.vars()[0]),e.race.lone_survivor?0:r}},tau_housing:{id:"tauceti-tau_housing",title(){return Ft("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*=w.high_pop.vars()[0]),r}},captive_housing:pr("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*gt("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",[z[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)/D(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/D(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/D(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/D(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",[z[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:pr("horseshoe","tauceti"),bonfire:pr("bonfire","tauceti"),firework:pr("firework","tauceti"),assembly:pr("assembly","tauceti"),nanite_factory:pr("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",[z[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 de(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",[z[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 wr()?0:f("mining_pit",r,35e4,1.225,"tauceti")},Lumber(r){return wr()?f("mining_pit",r,235e4,1.225,"tauceti"):0},Iron(r){return wr()?f("mining_pit",r,835e3,1.225,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),z[e.race.species].home])}
`;if(r=r+`
${t("plus_max_resource",[$(this)[0].workers(),t("job_pit_miner")])}
`,!wr())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},workers(){return D(e.tech.isolation?6:8)},action(){if(u($(this)[0])){if(e.tauceti.mining_pit.count++,re($(this)[0])){let r=$(this)[0].workers();e.civic.pit_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.pit_miner.workers+=a}return!0}return!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",[D(1),e.civic.professor.name])}
`),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return de(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?.count??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,Xr(95e3),1.25,"tauceti")}},effect(){let r=+Ae($(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 ut(-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(r){let a='
',i=Ea("repository",!1,r),s=250;for(let n of $(this)[0].res())if(e.resource[n].display){let c=Te(+(H($(this)[0].val(n))*i).toFixed(0),1);a=a+`${t("plus_max_resource",[c,e.resource[n].name])}`}return e.tech.isolation&&(a=a+`${t("plus_max_resource",[s,t("resource_Crates_name")])}${t("plus_max_resource",[s,t("resource_Containers_name")])}`),a=a+"
",a},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||ea();let a=Ea("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",[z[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,Xr(425e3),1.25,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),z[e.race.species].home])}
`;return r=r+`
${t("tau_home_tau_factory_effect",[$(this)[0].manufacturing()])}
`,e.tech.isolation&&(e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[D(2)])}
`),r=r+`
${t("space_red_fabrication_effect1",[D(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 de(e.tech.isolation?2:5)},manufacturing(){return e.tech.isolation?5:3},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,re($(this)[0])&&(e.city.factory.Alloy+=$(this)[0].manufacturing(),tt()),!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",[z[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(),z[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",[D(2),e.civic.professor.name])}
`,a=a+`
${t("city_wardenclyffe_effect1",[D(1),e.civic.scientist.name])}
`,a=a+`
${t("space_zero_g_lab_effect",[D(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 de(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()),It()},postPower(r){xi("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,Xr(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+hs(),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return de(e.race.lone_survivor?1:2)},action(){return u($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=D(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=w.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 de(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",[U().red])},desc(){return t("tau_red",[U().red])},support:"orbital_platform",extra(r){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${r}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),B({el:`#${r}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[U().red])},desc(){return t("tau_new_mission_title",[U().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",[U().red])},action(){return u($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[U().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 wr()?f("orbital_platform",r,Ae(cu(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=+Ae($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[U().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 de(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return wr()&&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",[U().red]),t("tau_planet",[z[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,Kn(),!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,Kn(),!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,Kn(),!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",[U().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(),U().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",[U().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,Xr(125e4),1.28,"tauceti")},Wrought_Iron(r){return f("womling_village",r,Xr(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(),U().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",[U().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(),U().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",[U().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(),U().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",[U().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(),U().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",[U().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,Xr(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(),U().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",[U().gas]);case 2:return t("tau_gas_title0a",[U().gas]);default:return t("tau_gas_title0b",[U().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",[z[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[z[e.race.old_gods].name]);default:return t("tau_gas_title3c",[z[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[U().gas]);case 2:return t("tau_gas_title4b",[at("reverse",U().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,Xr(6e4),1.28,"tauceti")}},powered(){return de(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,Xr(118e3),1.28,"tauceti")}},powered(){return de(e.tech.isolation?2:8)},smelting(){return e.tech.isolation?12:4},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",[$(this)[0].smelting()])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){if(u($(this)[0])){if(e.tauceti.ore_refinery.count++,re($(this)[0])){let r=$(this)[0].smelting();e.city.smelter.cap+=r,e.city.smelter.Steel+=r,e.race.evil?e.city.smelter.Wood+=r:e.city.smelter.Oil+=r}return!0}return!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,zr(),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 de(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,zr())}},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 de(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",[D(1)])}
`),a=a+`
${t("space_red_fabrication_effect1",[D(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+Ae(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=+Ae($(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=+Ae($(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=+Ae($(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?Xr(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?.count??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),zr()}},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 ut(-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?Xr(64e3):0}},effect(r){let a="",i=(r?.count??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?Xr(8e6):0}},effect(r){let a="",i=(r?.count??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+=su()):r=r+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,r},action(){return e.tech.m_brain&&u($(this)[0])?(ho(),!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 mo(){let r=st("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 su(){let r=st("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 nu(){let r=st("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 Kn(){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 cu(r){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(r*=.94**e.tech.womling_tech),r}function Xr(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 Gi(){return Gn}function vo(){return Ye}function wr(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function yo(r,a,i){switch(r){case"tauceti":return Gr(Ye,a,i)}}function zr(){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}
`),B({el:`#sr${a}`,data:e.tauceti[c],filters:{filter(){return Ye[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);_e(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"&&Gr(Ye,a,c)){let l=Ye[a][c];Rr(l,"tauceti",c)}}),Ye[a].info.hasOwnProperty("extra")&&Ye[a].info.extra(a)}})}function Rn(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(Un(),Ri(),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:Nn()});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,p){d+=`${t(`outer_shipyard_${o}_${h}`)}`}),s.append(` +(()=>{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:{}},Rt={},k={},W={},bt={},xe={},ma={},br=0,Rl=0,Hl=0,ai={t:0};function Pn(r){br=r}function On(r){Rl=r}function Cn(r){Hl=r}var gr={},Aa={},ar={view:"all"},za=["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 X(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:Zc()}else Zc()}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={};za.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));be(e.version)<=103015&&e.portal.hasOwnProperty("harbour")&&(e.portal.harbor=e.portal.harbour,delete e.portal.harbour);e.version="1.3.15";delete e.revision;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);Jc(!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})});za.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 Sn(){["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}})}Sn();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 Zc(){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 qr={x10:!1,x25:!1,x100:!1,q:!1};function pe(){let r=1;return e.settings.mKeys&&(qr.x10&&(r*=10),qr.x25&&(r*=25),qr.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 Li(){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 ri={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 Te(r,a,i){let s=0,n="",c=r<0;return c&&(r*=-1),r<=9999?s=+r.toFixed(a):r<1e6?(n=ri[e.settings.affix][0],s=i?+(r/1e3).toFixed(1):Math.floor(r/100)/10):r<1e9?(n=ri[e.settings.affix][1],s=i?+(r/1e6).toFixed(1):Math.floor(r/1e4)/100):r<1e12?(n=ri[e.settings.affix][2],s=i?+(r/1e9).toFixed(1):Math.floor(r/1e7)/100):r<1e15?(n=ri[e.settings.affix][3],s=i?+(r/1e12).toFixed(1):Math.floor(r/1e10)/100):r<1e18?(n=ri[e.settings.affix][4],s=i?+(r/1e15).toFixed(1):Math.floor(r/1e13)/100):r<1e21?(n=ri[e.settings.affix][5],s=i?+(r/1e18).toFixed(1):Math.floor(r/1e16)/100):r<1e24?(n=ri[e.settings.affix][6],s=i?+(r/1e21).toFixed(1):Math.floor(r/1e19)/100):(n=ri[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(){Li()});function os(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||Dr();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={},jn(),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},Ra={};function Dr(){za.forEach(function(r){r!=="achievements"&&(e.lastMsg[r]=[])})}function Jc(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 jn(){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(X(80,100)),mil:Math.floor(X(75,125)),eco:Math.floor(X(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(X(0,20)),mil:Math.floor(X(125,175)),eco:Math.floor(X(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(X(40,60)),mil:Math.floor(X(200,300)),eco:Math.floor(X(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,Jc(!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 Fn;Ul(e.settings.locale);function t(r,a){let i=Fn[r];if(!i)return e.settings.expose&&(console.error(`string ${r} not found`),console.log(Fn)),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}),Fn=a}var ls={"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"};function ke(r){return e.race.high_pop&&(r*=w.high_pop.vars()[1]/100),r}function et(r){if(e.race.gravity_well&&e.race.teamster&&e.race.teamster>0){let a=An(),i=e.civic.teamster.workers>a?a:e.civic.teamster.workers;r*=i/a}return r}function T(r,a,i){switch(r){case"transmitter":return 2.5;case"oil_well":{let s=e.tech.oil>=4?.48:.4;e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),e.city.geology.Oil&&(s*=e.city.geology.Oil+1),e.city.biome==="desert"?s*=qe.desert.vars()[1]:e.city.biome==="tundra"?s*=qe.tundra.vars()[1]:e.city.biome==="taiga"&&(s*=qe.taiga.vars()[2]);let n=me("dirty_jobs",2);return n&&(s*=1+n/100),s}case"iridium_mine":switch(a){case"iridium":{let s=.035;e.city.geology.Iridium&&(s*=e.city.geology.Iridium+1);let n=s,c=us(3);return{b:n,g:c-1,f:n*c}}case"coal":return .55}case"helium_mine":{let s=.18,n=us(3);return{b:s,g:n-1,f:s*n}}case"red_mine":switch(a){case"copper":{let s=ke(.25),n=us(3);return{b:s,g:n-1,f:s*n}}case"titanium":{let s=ke(.02),n=us(3);return{b:s,g:n-1,f:s*n}}case"stone":return ke(.75);case"asbestos":return ke(1.25);case"aluminium":return ke(.066)}case"biodome":switch(a){case"food":return ke(.25);case"cat_food":return 2;case"lumber":return ke(1.5)}case"gas_mining":return e.tech.helium?.65:.5;case"outpost":{let s={b:.025,d:0,n:0};if(e.tech.drone){let n=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?.12:.06;s.d=e.space.drone.count*n,s.n=s.b*(1+s.d)}else s.n=s.b;return a?s:s.n}case"oil_extractor":{let s=e.tech.oil>=4?.48:.4;return e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),s}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 n=.05*(k.ai_colonist?e.civic.titan_colonist.workers+D(k.ai_colonist):e.civic.titan_colonist.workers);return e.race.high_pop&&(n=ke(n)),n}}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 s=.18;return e.civic.govern.type==="corpocracy"&&(s*=e.tech.high_tech&&e.tech.high_tech>=16?1.4:1.3),e.civic.govern.type==="socialist"&&(s*=1.1),s}case"infernite_mine":return .5*Br("gate",0,i).supress;case"water_freighter":return 1.25;case"titan_mine":switch(a){case"adamantite":return ke(.02)*(e.space.titan_mine?e.space.titan_mine.ratio:50)/100;case"aluminium":return ke(.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 s=0;switch(a){case"materials":{s=e.tech.isolation?.12:.09;break}case"bolognium":{s=e.tech.isolation?.0288:.0216;break}case"stone":{s=e.tech.isolation?.8:.6;break}case"adamantite":{s=e.tech.isolation?.448:.336;break}case"copper":{s=.58;break}case"coal":{s=.13;break}case"iron":{s=.74;break}case"aluminium":{s=.88;break}case"chrysotile":{s=1.44;break}}e.race.tough&&(s*=1+w.tough.vars()[0]/100);let n=ve("ogre");return n>0&&(s*=1+w.tough.vars(1)[0]/100*n),e.tech.tau_pit_mining&&(s*=1.18),s}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 s=1;switch(e.tech.womling_mining&&(s+=e.tech.womling_mining*.15),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&(s*=1.1),e.tech.womling_gene&&(s*=1.25),a){case"unobtainium":return .0305*s;case"uranium":return .047*s;case"titanium":return .616*s;case"copper":return 1.191*s;case"iron":return 1.377*s;case"aluminium":return 1.544*s;case"neutronium":return .382*s;case"iridium":return .535*s}}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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=at("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)*s}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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=at("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),8*s}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 s=0;if(e.race.psychicPowers.boostTime>0&&(s+=w.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(w.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.boost).toFixed(3)}return 1+s}return 1}case"psychic_cash":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("cash")){let s=0;if(e.race.psychicPowers.cash>0&&(s+=w.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(w.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.cash).toFixed(3)}return 1+s}return 1}}}function Ue(r){switch(r){case"Physics":ro();break;case"Genetics":Ua();break;case"Monument":return to();case"PhysicsTech":return ft;case"GeneTech":return Yc;case"BloodTech":return Wl;case"Crispr":ao();break;case"Blood":In();break}}var ft={lhc:{title(){return Ze("fool",2022)?t("arpa_projects_railway_title"):t("arpa_projects_lhc_title")},desc(){return Ze("fool",2022)?t("arpa_projects_railway_desc"):t("arpa_projects_lhc_desc")},reqs:{high_tech:6},grant:"supercollider",effect(r){if(Ze("fool",2022)&&!r)return ft.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"):ur()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm2",[a]):t("arpa_projects_lhc_effect2",[a,e.race.orbit_decayed?t("space_home_satellite_title"):ur()]):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"):ur()])},cost:{Money(r,a){return Ve("lhc",r,25e5,1.05,a)},Knowledge(r,a){return Ve("lhc",r,5e5,1.05,a)},Copper(r,a){return Ve("lhc",r,125e3,1.05,a)},Cement(r,a){return Ve("lhc",r,25e4,1.05,a)},Aluminium(r,a){return Ve("lhc",r,35e4,1.05,a)},Titanium(r,a){return Ve("lhc",r,5e4,1.05,a)},Polymer(r,a){return Ve("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 Ve("stock_exchange",r,3e6,1.06,a)},Plywood(r,a){return Ve("stock_exchange",r,25e3,1.06,a)},Brick(r,a){return Ve("stock_exchange",r,2e4,1.06,a)},Wrought_Iron(r,a){return Ve("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 Ve("tp_depot",r,18e5,1.08,a)},Stone(r,a){return Ve("tp_depot",r,75e4,1.08,a)},Iron(r,a){return Ve("tp_depot",r,25e4,1.08,a)},Alloy(r,a){return Ve("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 Ve("launch_facility",r,2e6,1.1)},Knowledge(r){return Ve("launch_facility",r,5e5,1.1)},Cement(r){return Ve("launch_facility",r,15e4,1.1)},Oil(r){return Ve("launch_facility",r,2e4,1.1)},Sheet_Metal(r){return Ve("launch_facility",r,15e3,1.1)},Alloy(r){return Ve("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=me("gaslighter",2),a=r?2-r:2;return t("arpa_projects_monument_effect1",[a])},cost:{Stone(r,a){return Ki("Stone",r,a)},Aluminium(r,a){return Ki("Aluminium",r,a)},Cement(r,a){return Ki("Cement",r,a)},Steel(r,a){return Ki("Steel",r,a)},Lumber(r,a){return Ki("Lumber",r,a)},Crystal(r,a){return Ki("Crystal",r,a)}}},railway:{title(){return Ze("fool",2022)?t("arpa_projects_lhc_title"):t("arpa_projects_railway_title")},desc(){return Ze("fool",2022)?t("arpa_projects_lhc_desc"):t("arpa_projects_railway_desc")},reqs:{high_tech:6,trade:3},grant:"railway",effect(r){if(Ze("fool",2022)&&!r)return ft.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 Ve("railway",r,25e5,1.08,a)},Lumber(r,a){return Ve("railway",r,75e4,1.08,a)},Iron(r,a){return Ve("railway",r,3e5,1.08,a)},Steel(r,a){return Ve("railway",r,45e4,1.08,a)}}},roid_eject:{title(){return t("arpa_projects_roid_eject_title",[zn()])},desc(){return t(e.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[zn()])},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),zn()])}
`},cost:{Money(r,a){return Ve("roid_eject",r,1875e4,1.075,a)},Deuterium(r,a){return Ve("roid_eject",r,375e3,1.075,a)},Bolognium(r,a){return Ve("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 Ve("nexus",r,5e6,1.12,a)},Crystal(r,a){return Ve("nexus",r,6e4,1.12,a)},Iridium(r,a){return Ve("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*gt("magic")).toFixed(3);if(e.tech.syphon&&e.tech.syphon>=60){let a=st("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 Ve("syphon",r,75e5,1.025,a)},Mana(r,a){return Ve("syphon",r,5e3,1.025,a)},Crystal(r,a){return Ve("syphon",r,1e5,1.025,a)},Infernite(r,a){return Ve("syphon",r,1e4,1.025,a)}}}};function zn(){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 Yc={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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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 Ke("mutation")?(e.genes.mutation=1,Ua(),!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 Ke("transformation")?(e.genes.mutation=2,Ua(),!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 Ke("metamorphosis")?(e.genes.mutation=3,Ua(),!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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("architect")},post(){Er(),na()}},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!!Ke("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!!Ke("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!!Ke("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");kt()}},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!!Ke("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!!Ke("unlocked")},post(){Kt(!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!!Ke("universal")},post(){Kt(!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!!Ke("standard")},post(){Kt(!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!!Ke("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 Ke("negotiator")?(e.genes.trader=1,Tn(),!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 Ke("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 Ke("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!!Ke("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!!Ke("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!!Ke("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 Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("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!!Ke("essence_absorber")},post(){In()}}},Wl={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(){Ni()}},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 Ke(r){let a=!0,i=Yc[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 ds(r,a,i){return r=tu(r,a,i),Ar({cost:r},a,i)}function tu(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-w.creative.vars()[1]/100),s>0&&(l*=1-w.creative.vars(1)[1]/100*s),l}}),n}return r}function Ve(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-=w.creative.vars()[0]),a&&(c+=a),Math.round(s**c*i)}function ro(){if(e.tech.high_tech&&e.tech.high_tech>=6){let r=$("#arpaPhysics");le(r),Object.keys(ft).forEach(function(a){iu(r,a)})}}function En(){let r=$("#geneticMinor")[0];if(r){let a=Sortable.get(r);a&&a.destroy()}}function ru(){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,Ua()}})}function Ua(){let r=$("#arpaGenetics");if(En(),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"),B({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=pe(),d=2e5;if(e.resource.Knowledge.amount>=d){let h=Math.floor(e.resource.Knowledge.amount/d),p=Math.min(o,h);e.resource.Knowledge.amount-=d*p,e.resource.Genes.amount+=p}},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?xt(o/(e.arpa.sequence.labs*2)):xt(o/e.arpa.sequence.labs);{let d=jt(14,12);return d.length>0?d:t("time_never")}}}}),_e("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){w[x]&&w[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){(w[x]&&w[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,au(i,x),n.push(x))}),a.append(`
${t("arpa_race_genetic_traids",[at("name")])}
`);let c=sa("name"),l=[],o=[],d=$('
');a.append(d);let h=Le(e.race);Ze("fool",2023)&&(h.hooved=1),Object.keys(h).forEach(function(x){if(w[x]&&w[x].type!=="minor"&&w[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&&(w[x].type==="major"&&e.genes.mutation||w[x].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let R=$('
'),S=$(`${t("arpa_remove_button")}`);l.push(x),R.append(S),R.append($(`${c[x]?c[x]:w[x].name} (${t("arpa_genepool_rank",[h[x]])})`)),d.append(R)}else o.push(x),d.append(`
${c[x]?c[x]:w[x].name} (${t("arpa_genepool_rank",[h[x]])})
`)}});let p=[];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(z).forEach(function(R){R!=="junker"&&R!=="sludge"&&R!=="custom"&&z[R].type===z[e.race.species].type&&Object.keys(z[R].traits).forEach(function(S){if(!e.race[S]&&S!=="soul_eater"){let Q=x.indexOf(S);if(Q===-1)p.push(S);else{let Z=!1;switch(Q%2){case 0:e.race[x[Q+1]]&&(Z=!0);break;case 1:e.race[x[Q-1]]&&(Z=!0);break}Z||p.push(S)}}})});let j=$('
');a.append(j);for(let R=0;R'),Z=$(`${t("arpa_gain_button")}`);Q.append(Z),Q.append($(`${c[S]?c[S]:w[S].name}`)),j.append(Q)}}s&&a.prepend(`
${t("arpa_race_genetic_minor_traits",[at("name")])}
`);let m=function(x){let j=w[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")])},b=function(x){let j=w[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=Ha(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),t("arpa_gene_buy",[sa("name",x),Te(j),e.resource.Genes.name])},F=function(x){let j=Ha(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),t("arpa_phage_buy",[sa("name",x),Te(j),t("resource_Phage_name")])};B({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(x){let j=0,R=pe(),S=!0,Q=!1;for(;j=Z?(e.resource.Genes.amount-=Z,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"&&Kt(!0),Ua(),x==="persuasive"&&Tn())},phage(x){let j=0,R=pe(),S=!0,Q=!1;for(;j=Z?(e.prestige.Phage.count-=Z,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"&&Kt(!0),Ua(),x==="persuasive"&&Tn())},purge(x){if(e.race.species==="sludge"&&(e.race.modified||x==="ooze"))return;let j=w[x].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(j*=10),j<0&&(j*=-1);let R=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[R].count>=j){e.prestige[R].count-=j;let S=e.race[x];delete e.race[x],e.race.modified?e.race.modified++:e.race.modified=1,Bs(x,S),Ua(),ue(),Tt();let Q=0;Object.keys(e.race).forEach(function(Z){w[Z]&&(w[Z].type=="major"||w[Z].type=="genus")&&Z!=="evil"&&Q++}),Q===0&&Be("blank_slate")}},gain(x){if(e.race.species==="sludge"&&e.race.modified)return;let j=w[x].val*5;e.race.species==="sludge"&&(j*=2),e.race.species==="custom"&&(j*=10),j<0&&(j*=-1);let R=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[R].count>=j&&(e.prestige[R].count-=j,e.race[x]=1,e.race.modified?e.race.modified++:e.race.modified=1,Di(x),Ua(),ue(),Tt())},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 b(x)},genePurchasable(x){let j=Ha(e.race.minor[x]?e.race.minor[x]+4:4);return x==="mastery"&&(j*=5),e.resource.Genes.amount>=j},phagePurchasable(x){let j=Ha(e.genes.minor[x]?e.genes.minor[x]+4:4);return x==="mastery"&&(j*=2),e.prestige.Phage.count>=j}}}),n.forEach(function(x){_e(`popGenetrait${x}`,function(){return M(x)},{elm:`#geneticBreakdown .t-${x} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&_e(`popGenetrait${x}`,function(){return F(x)},{elm:`#geneticBreakdown .t-${x} .pbuy`,classes:"has-background-light has-text-dark"}),_e(`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){_e(`popRemoveBkdwn${x}`,function(){return m(x)},{elm:`#geneticBreakdown .remove${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{wide:!0,classes:"w30"})}),o.forEach(function(x){let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{elm:`#geneticBreakdown .trait${x}`,wide:!0,classes:"w30"})}),p.forEach(function(x){_e(`popAddBkdwn${x}`,function(){return b(x)},{elm:`#geneticBreakdown .add${x}`,classes:"has-background-light has-text-dark"});let j=`raceTrait${x}`,R=$("
");wi(R,x,{trank:e.race[x]}),_e(j,R,{wide:!0,classes:"w30"})}),ru()}}function au(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 ao(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(le($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),Ql())}function In(){e.tech.b_stone&&e.tech.b_stone>=2&&(le($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),Vl())}function iu(r,a){if(Yl(a)){if(e.arpa[a]||(e.arpa[a]={complete:0,rank:0}),ft[a].rank&&e.arpa[a].rank>=ft[a].rank)return;let i=$(`
`);r.append(i);let s=typeof ft[a].title=="string"?ft[a].title:ft[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($(``)),B({el:`#arpa${a}`,data:e.arpa[a],methods:{queue(d){if(e.tech.queue){let p=pe();for(let m=0;m0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===b)e.queue.queue[e.queue.queue.length-1].q++;else{let x=typeof ft[d].title=="string"?ft[d].title:ft[d].title();e.queue.queue.push({id:b,action:"arpa",type:d,label:x,cna:!1,time:0,q:1,qs:1,t_max:0})}ca()}else break}}},build(d,h){Ks(d,h,!0)},srDesc(){return os(typeof ft[a].desc=="string"?ft[a].desc:ft[a].desc())},srLevel(){return os(ft[a].effect())},arpaProjectSRCosts(d,h){let p=d==="100"?100-e.arpa[h].complete:d;var m=`Construct ${p}%. Costs:`,b=ds(ft[h].cost);return Object.keys(b).forEach(function(M){var F=+(b[M]()*(p/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} ${Te(F,2)}.${j}`}}),m}},filters:{remain(d){return 100-d},level(d){return t("arpa_level",[d])}}}),_e(`popArpa${a}`,function(){return ft[a].desc},{elm:`#arpa${a} .head .desc`,classes:"has-background-light has-text-dark"}),_e(`popArpa${a}`,function(){return ft[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[ft[r].grant]=e.arpa[r].rank,n=!0,r==="monument"&&(e.arpa.m_type=to(),$(`#arpa${r} .head .desc`).html(ft[r].title()),Zr(!1,["arpamonument"])),r==="roid_eject"&&($(`#arpa${r} .head .desc`).html(ft[r].title()),Zr(!1,["arparoid_eject"])),r==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,Ee("popArpalaunch_facility"),[1,10,25,100].forEach(function(l){Ee(`popArpalaunch_facility${l}`)}),s||Jr(["arpalaunch_facility"]),ro(),Mt(),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=ds(ft[a].cost);let c=ii(ft[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}${Te(o,2)}
`))}}),s}function Tn(){Object.keys(e.resource).forEach(function(r){B({el:`#market-${r}`},"update")}),B({el:"#galaxyTrade"},"update")}function io(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),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=st("mad");e.stats.mad++,Yr(),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"&&z[e.race.species].type!=="demonic"&&Be("take_no_advice"),e.race.truepath&&ie("ashanddust"),Ir();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),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function so(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"bioseed"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=st("bioseed");e.stats.bioseed++,Yr(),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"&&Be("organ_harvester"),e.city.biome==="hellscape"&&z[e.race.species].type!=="demonic"&&Be("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&&Be("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}Ir();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,p=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,m=e.starDock.probes.count+1,b=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:b,seed:Math.floor(X(1e4)),ascended:!1},p>0&&(e.race.corruption=p),h&&(e.race.srace=h),oa({orbit:s,biome:n,ptrait:c,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function no(){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"}),Dr();let r=st("cataclysm");e.stats.cataclysm++,Yr(),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"&&z[e.race.species].type!=="demonic"&&Be("take_no_advice"),Ir(),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),oa({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(X(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),oa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oo(){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))),Dr(),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"&&Be("the_misery"),e.race.decay&&ie("dissipated"),e.race.steelen&&Be("steelem");let r=e.race.species,a=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=st("vacuum");Ir(),e.stats.blackhole++,Yr(),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(X(1e4)),ascended:!1},o>0&&(e.race.corruption=o),l&&(e.race.srace=l),oa({orbit:i,biome:s,ptrait:n,geology:!1}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function lo(){Dr(),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=st("ascend");e.stats.ascend++,Yr(),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(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),typeof e.tech.world_control>"u"&&ie("cult_of_personality");let o=0;Object.keys(e.city.geology).forEach(function(p){e.city.geology[p]>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&&Be("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),Ir();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(X(1e4)),ascended:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),Object.keys(c).forEach(function(p){c[p]+=.02}),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function _s(){if(Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"descension"}),ie("squished",!0),ie(`extinct_${e.race.species}`),e.race.witch_hunter&&e.tech.forbidden>=5&&e.race.universe==="magic"?ie("nightmare"):ie("corrupted"),e.race.fasting&&e.tech.dish_reset){let h=ot();e.stats.endless_hunger.b5[h]=!0,h!=="m"&&h!=="l"&&(e.stats.endless_hunger.b5.l=!0)}z[e.race.species].type==="angelic"&&Be("twisted"),e.race.junker&&e.race.species==="junker"&&Be("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&Be("garbage_pie"),e.race.cataclysm&&Be("finish_line"),e.race.ooze&&e.race.species==="sludge"&&Be("slime_lord");let r=st("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++,Yr(),Ir();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(X(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d&&(e.race.srace=d),oa({orbit:n,biome:c,ptrait:l,geology:o}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function uo(r){Dr(),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=st("terraform");e.stats.terraform++,Yr(),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"),Ir();let h=e.race.hasOwnProperty("srace")?e.race.srace:!1,p=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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},p>0&&(e.race.corruption=p),h&&(e.race.srace=h),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function _o(){e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"ai apocalypse"}),ie(`extinct_${e.race.species}`),ie("obsolete"),ie("squished",!0),e.race.junker&&e.race.species==="junker"&&Be("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=st("ai");Ir(),e.stats.aiappoc++,Yr(),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=z[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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),oa({orbit:i,biome:s,ptrait:n,geology:c}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function po(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"matrix"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("matrix");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("bluepill"),Ln(),Ir(),e.stats.matrix++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function ho(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"retired"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("retired");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("retired"),Ln(),Ir(),e.stats.retire++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function fo(){Pe.w&&Pe.w.terminate(),e.sim||Se.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Dr(),wt("reset",{end:"eden"});let r=e.race.species,a=e.race.gods,i=z[r].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,l=e.city.geology,o=st("eden");ie(`biome_${n}`),c.forEach(function(p){Re.hasOwnProperty(p)&&ie(`atmo_${p}`)}),ie(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&ie("gross"),ie("adam_eve"),Ln(),Ir(),e.stats.eden++,Yr(),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(X(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),oa({orbit:s,biome:n,ptrait:c,geology:l}),Se.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function oa(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},jn(),e.new=!0,e.seed=Math.rand(0,1e4)}function Ln(){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",Zt(),"l"),e.stats.womling.friend[r]>0&&e.stats.womling.lord[r]>0&&e.stats.womling.god[r]>0&&ie("overlord",r==="m",Zt(),r)}var Gn={spc_titan:{info:{name(){return U().titan},desc(){return t("space_titan_info_desc",[U().titan,z[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",[U().titan])},desc(){return t("space_mission_desc",[U().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",[U().titan])},action(){return u($(this)[0])?(I(t("space_titan_mission_action",[U().titan,z[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",[Te(H(250)),e.resource.Water.name])}
`:"",a=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),U().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 de(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(r){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(r),U().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(r){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(r?e.space.ai_core2.on:k.ai_core2)?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return de(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 ut(-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",[U().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=D(1);return`
${t("space_used_support",[U().titan])}
${t("plus_max_resource",[D(1),e.race.truepath?t("job_colonist_tp",[U().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+=D(1);let r=D(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*=w.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",[U().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",[U().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(r){let a='
',i=Ea("storehouse",!1,r),s=Ea("storehouse",!0,r);for(let n of $(this)[0].res())if(e.resource[n].display){let c=$(this)[0].heavy(n),l=Te(+(H($(this)[0].val(n))*(c?s:i)).toFixed(0),1);a=a+`${t("plus_max_resource",[l,e.resource[n].name])}`}return a=a+"
",a},action(){if(u($(this)[0])){e.space.storehouse.count++;let r=Ea("storehouse",!1),a=Ea("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",[U().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=Tr()*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",[U().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=+ke(r).toFixed(3)),`
${t("space_used_support",[U().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,tt(),!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 de(5)},action(){return u($(this)[0])?(e.space.sam.count++,re($(this)[0]),!0):!1},post(){B({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[U().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(r){let a=$(this)[0].support_fuel().a,i=2500;e.race.high_pop&&(i=ke(i)),(r?e.space?.ai_core2?.on??0:k.ai_core2)&&(i*=1.25);let s=`
${t("space_used_support",[U().titan])}
`;return s+=`
${t("space_red_exotic_lab_effect1",[i])}
`,s+`
${t("spend",[a,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?.count??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 Gn.spc_titan.ai_core2.effect(r);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},re($(Gn.spc_titan.ai_core2)[0]),Mt(),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 de(100)},p_fuel(){return{r:"Water",a:1e3}},effect(r){let a=25,i=`
${t("interstellar_citadel_stat",[+la(r).toFixed(1)])}
`;if(i+=`
${t("interstellar_citadel_effect",[a])}
${t("space_ai_core_effect2",[a])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(i+=`
${t("space_ai_core_effect3",[50])}
`),i+=`
${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 s=+Wn(r).toFixed(1);i+=`
${t("space_ai_core_effect4",[s])}
`}return i},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",[D(1),e.race.truepath?t("job_colonist_tp",[U().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[D(1),U().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return de(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 U().enceladus},desc(){return t("space_enceladus_info_desc",[U().enceladus,z[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",[U().enceladus])},desc(){return t("space_mission_desc",[U().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",[U().enceladus])},action(){return u($(this)[0])?(I(t("space_enceladus_mission_action",[U().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",[U().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",[U().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",[U().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=vt("spc_enceladus"),a=Math.round(1e4*r),i=`
${t("space_used_support",[U().enceladus])}
${t("city_max_knowledge",[a])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[D(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 de(12)},action(){return u($(this)[0])?(e.space.zero_g_lab.count++,re($(this)[0]),!0):!1},post(){It()},postPower(r){xi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[U().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",[U().enceladus])}
`;if(r+=`
${t("galaxy_defense_platform_effect",[50])}
`,r+=t("plus_max_resource",[D(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 de(10)},action(){return u($(this)[0])?(e.space.operating_base.count++,re($(this)[0]),!0):!1},post(){B({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||ea(),!0):!1}}},spc_triton:{info:{name(){return U().triton},desc(){return t("space_triton_info_desc",[U().triton,z[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")}
`),B({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-yt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[U().triton])},desc(){return t("space_mission_desc",[U().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",[U().triton])},action(){return u($(this)[0])?(I(t("space_triton_mission_action",[U().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",[D(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 de(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(),Mt(),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",[U().triton])}
${i}
${t("space_lander_effect2",[D(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 de(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 de(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 de(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 de(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 U().eris},desc(){return t("space_eris_info_desc",[U().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 }}%
`),B({el:`#${r}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[U().eris])},desc(){return t("space_mission_desc",[U().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",[U().eris])},action(){return u($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[U().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[U().titan])},desc(){return`
${t("space_drone_control",[U().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(),U().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),r,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return de(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",[U().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(yt(1,"army",0)*vt("spc_eris")),a=`
${t("space_used_support",[U().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",[U().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*vt("spc_eris")),a=`
${t("space_used_support",[U().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?Xr(e.race.lone_survivor?10100:101e3):0}},effect(r){let a="",i=(r?.count??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}),zr(),Ee()),!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,zr()},250):(e.tech.matrix=3,zr())},effect(){let r=mo(),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=mo();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)),p=d*20;a.fillText(h,p,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(){po()},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=nu();return`
${t("tau_star_goe_facility_effect")}
${r}`},action(){if(u($(this)[0])){let r=Ar(Ye.tau_star.goe_facility);return Object.keys(r).forEach(function(a){e.resource[a].amount+=r[a]()}),fo(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[z[e.race.species].home])},desc(){return t("tau_home",[z[e.race.species].home])},support:"orbital_station",extra(r){e.tech.tau_home&&e.tech.tau_home>=2&&!wr()&&($(`#${r}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),B({el:`#${r}Mats`,data:e.resource.Materials,methods:{tauShow(){return!wr()}},filters:{round(a){return+a.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[z[e.race.species].home])},desc(){return t("tau_new_mission_title",[z[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",[z[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",[z[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,re($(Ye.tau_home.orbital_station)[0])){e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let a=$(Ye.tau_home.mining_pit)[0].workers();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&&$i(),!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 wr()?0:f("orbital_station",r,5e5,1.3,"tauceti")},Helium_3(r){return wr()?f("orbital_station",r,Ae(25e4),1.3,"tauceti"):0},Copper(r){return wr()?f("orbital_station",r,125e4,1.3,"tauceti"):0},Adamantite(r){return wr()?f("orbital_station",r,9e5,1.3,"tauceti"):0}},effect(){let r=H(15e3),a=+Ae($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[z[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 de(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",[z[e.race.species].home])}
${t("requires_power_support_combo",[z[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 wr()?0:f("colony",r,65e4,1.225,"tauceti")},Furs(r){return wr()?f("colony",r,72e4,1.225,"tauceti"):0},Graphene(r){return wr()?f("colony",r,485e3,1.225,"tauceti"):0},Brick(r){return wr()?f("colony",r,Xr(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(),z[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[r])}
`),e.tech.isolation){let n=Tr()*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,z[e.race.species].home])}
`,e.tech.isolation){let n=me("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||ea(),!0):!1},citizens(){let r=e.tech.isolation?8:5;return e.race.high_pop&&(r*=w.high_pop.vars()[0]),e.race.lone_survivor?0:r}},tau_housing:{id:"tauceti-tau_housing",title(){return Ft("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*=w.high_pop.vars()[0]),r}},captive_housing:pr("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*gt("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",[z[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)/D(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/D(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/D(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/D(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",[z[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:pr("horseshoe","tauceti"),bonfire:pr("bonfire","tauceti"),firework:pr("firework","tauceti"),assembly:pr("assembly","tauceti"),nanite_factory:pr("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",[z[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 de(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",[z[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 wr()?0:f("mining_pit",r,35e4,1.225,"tauceti")},Lumber(r){return wr()?f("mining_pit",r,235e4,1.225,"tauceti"):0},Iron(r){return wr()?f("mining_pit",r,835e3,1.225,"tauceti"):0}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),z[e.race.species].home])}
`;if(r=r+`
${t("plus_max_resource",[$(this)[0].workers(),t("job_pit_miner")])}
`,!wr())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},workers(){return D(e.tech.isolation?6:8)},action(){if(u($(this)[0])){if(e.tauceti.mining_pit.count++,re($(this)[0])){let r=$(this)[0].workers();e.civic.pit_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.pit_miner.workers+=a}return!0}return!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",[D(1),e.civic.professor.name])}
`),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return de(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?.count??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,Xr(95e3),1.25,"tauceti")}},effect(){let r=+Ae($(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 ut(-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(r){let a='
',i=Ea("repository",!1,r),s=250;for(let n of $(this)[0].res())if(e.resource[n].display){let c=Te(+(H($(this)[0].val(n))*i).toFixed(0),1);a=a+`${t("plus_max_resource",[c,e.resource[n].name])}`}return e.tech.isolation&&(a=a+`${t("plus_max_resource",[s,t("resource_Crates_name")])}${t("plus_max_resource",[s,t("resource_Containers_name")])}`),a=a+"
",a},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||ea();let a=Ea("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",[z[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,Xr(425e3),1.25,"tauceti")}},effect(){let r=`
${t("tau_new_support",[$(this)[0].support(),z[e.race.species].home])}
`;return r=r+`
${t("tau_home_tau_factory_effect",[$(this)[0].manufacturing()])}
`,e.tech.isolation&&(e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[D(2)])}
`),r=r+`
${t("space_red_fabrication_effect1",[D(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 de(e.tech.isolation?2:5)},manufacturing(){return e.tech.isolation?5:3},action(){return u($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,re($(this)[0])&&(e.city.factory.Alloy+=$(this)[0].manufacturing(),tt()),!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",[z[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(),z[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",[D(2),e.civic.professor.name])}
`,a=a+`
${t("city_wardenclyffe_effect1",[D(1),e.civic.scientist.name])}
`,a=a+`
${t("space_zero_g_lab_effect",[D(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 de(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()),It()},postPower(r){xi("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,Xr(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+hs(),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return de(e.race.lone_survivor?1:2)},action(){return u($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=D(1),e.civic.entertainer.display=!0),re($(this)[0]),!0):!1},citizens(){let r=1;return e.race.high_pop&&(r*=w.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 de(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",[U().red])},desc(){return t("tau_red",[U().red])},support:"orbital_platform",extra(r){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${r}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),B({el:`#${r}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[U().red])},desc(){return t("tau_new_mission_title",[U().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",[U().red])},action(){return u($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[U().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 wr()?f("orbital_platform",r,Ae(cu(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=+Ae($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[U().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 de(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return wr()&&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",[U().red]),t("tau_planet",[z[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,Kn(),!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,Kn(),!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,Kn(),!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",[U().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(),U().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",[U().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,Xr(125e4),1.28,"tauceti")},Wrought_Iron(r){return f("womling_village",r,Xr(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(),U().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",[U().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(),U().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",[U().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(),U().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",[U().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(),U().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",[U().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,Xr(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(),U().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",[U().gas]);case 2:return t("tau_gas_title0a",[U().gas]);default:return t("tau_gas_title0b",[U().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",[z[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[z[e.race.old_gods].name]);default:return t("tau_gas_title3c",[z[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[U().gas]);case 2:return t("tau_gas_title4b",[at("reverse",U().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,Xr(6e4),1.28,"tauceti")}},powered(){return de(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,Xr(118e3),1.28,"tauceti")}},powered(){return de(e.tech.isolation?2:8)},smelting(){return e.tech.isolation?12:4},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",[$(this)[0].smelting()])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){if(u($(this)[0])){if(e.tauceti.ore_refinery.count++,re($(this)[0])){let r=$(this)[0].smelting();e.city.smelter.cap+=r,e.city.smelter.Steel+=r,e.race.evil?e.city.smelter.Wood+=r:e.city.smelter.Oil+=r}return!0}return!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,zr(),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 de(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,zr())}},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 de(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",[D(1)])}
`),a=a+`
${t("space_red_fabrication_effect1",[D(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+Ae(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=+Ae($(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=+Ae($(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=+Ae($(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?Xr(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?.count??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),zr()}},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 ut(-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?Xr(64e3):0}},effect(r){let a="",i=(r?.count??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?Xr(8e6):0}},effect(r){let a="",i=(r?.count??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+=su()):r=r+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,r},action(){return e.tech.m_brain&&u($(this)[0])?(ho(),!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 mo(){let r=st("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 su(){let r=st("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 nu(){let r=st("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 Kn(){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 cu(r){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(r*=.94**e.tech.womling_tech),r}function Xr(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 Gi(){return Gn}function vo(){return Ye}function wr(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function yo(r,a,i){switch(r){case"tauceti":return Gr(Ye,a,i)}}function zr(){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}
`),B({el:`#sr${a}`,data:e.tauceti[c],filters:{filter(){return Ye[a].info.filter(...arguments)}}})}else r.append(`

${s}

${n}
`);_e(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"&&Gr(Ye,a,c)){let l=Ye[a][c];Rr(l,"tauceti",c)}}),Ye[a].info.hasOwnProperty("extra")&&Ye[a].info.extra(a)}})}function Rn(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(Un(),Ri(),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:Nn()});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,p){d+=`${t(`outer_shipyard_${o}_${h}`)}`}),s.append(` ${d} @@ -505,7 +505,7 @@
- `),m+="",a.append(m),B({el:"#celestialLab",data:{p,w:i},methods:{pEdit(){p.pts=en(p,r?i:!1)},setPlanet(){if(en(p)>=0){Object.keys(p.geology).forEach(function(F){p.geology[F]===0?delete p.geology[F]:p.geology[F]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let b=ot();e.custom.planet.hasOwnProperty(b)||(e.custom.planet[b]={s:!1});let M="s";e.custom.planet[b][M]=Le(p),delete e.custom.planet[b][M].pts,uo(p)}},reset(){p.traitlist=[],Object.keys(p.geology).forEach(function(b){p.geology[b]=0}),p.pts=en(p,r?i:!1)},less(b){p.geology[b]-=pe(),p.geology[b]<-20&&(p.geology[b]=-20)},more(b){p.geology[b]+=pe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),p.biome==="eden"&&(M+=5),p.geology[b]>M&&(p.geology[b]=M)}},filters:{res(b){return p.geology[b]}}})}function en(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}function Ur(r){return r?e.interstellar?.s_gate?.count?!!e.interstellar.s_gate.on:!0:!!k.s_gate}var yr={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 de(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,B({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++,B({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+=D(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 de(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 de(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 de(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 de(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 de(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/yt(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 de(30)},postPower(r){B({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?.count??0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6,c=r?e.portal.soul_attractor.on:k.soul_attractor;e.tech.hell_pit>=7&&c>0&&(n*=.97**c),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=Fi(r);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 de(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 de(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 de(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(){ji($(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?.count??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",[st("descend").artifact])}
`;{let i=tn();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?_s():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=Br("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 de(5)},support(){return 1},effect(){let r=e.race.holy?1+w.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+w.holy.vars(1)[1]/100*a);let i=Math.round(r*yt(D(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[D(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){B({el:"#srprtl_ruins"},"update"),B({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?.count??0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){return e.portal.vault.count<2&&u($(this)[0])?(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"])),!0):!1},post(){e.portal.vault.count===2&&(ue(),Yt(),Ee())}},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 de(8)},effect(){return`
${t("portal_archaeology_effect",[D(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=D(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 de(25)},effect(r){let a=Br("ruins",0,r),i=H(Tr()*8*a.supress);i=+i.toFixed(0);let s=Math.round(la(r))*10,n=`
${t("plus_max_resource",[s,t("resource_Crates_name")])}
${t("plus_max_resource",[s,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[D(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${n}
${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||ea(),!0):!1},post(){B({el:"#srprtl_ruins"},"update"),ue()},postPower(){B({el:"#srprtl_ruins"},"update"),B({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=w.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 de(12)},special:!0,effect(r){let i=+(75*Br("ruins",0,r).supress).toFixed(1),s=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[D(1)])}
${s}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[i])}
${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(){It()},postPower(r){xi("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(r){let a=20,i=r?e.portal?.hell_forge?.on??0:k.hell_forge;return i&&(a+=i*10),ut(-a)},fuel:{Infernite:5,Coal:100,Oil:80},effect(r){let a=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered(r)])}
${t("portal_inferno_power_effect",[a.Infernite,e.resource.Infernite.name,a.Coal,e.resource.Coal.name,a.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){B({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,a){return r!==void 0?r+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(z).length-1,a])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(z).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Zt(),e.tech.pillars=2,H(0,!1,!0),ra(!0),Ut(!0),ie("resonance"),B({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=Br("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=Ut();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 Ut()-e.portal.west_tower.count},cost:{Money(r,a){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=Ut()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),Yt()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Ut();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 Ut()-e.portal.east_tower.count},cost:{Money(r,a){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=Ut()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),Yt()))}},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 de(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+w.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+w.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},post(){B({el:"#srprtl_gate"},"update")},postPower(){B({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 de(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(r){let a=T("infernite_mine","",r);return`
${t("portal_infernite_mine_effect",[+a.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:"harbor"},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}},harbor:{id:"portal-harbor",title:t("portal_harbor_title"),desc(){return`
${t("portal_harbor_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(r){let i=(r?e.portal?.cooling_tower?.on??0:k.cooling_tower)||0;return+de(500*.92**i).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbor",r,225e6,Sr(1.18),"portal")},Cement(r){return f("harbor",r,5e7,Sr(1.18),"portal")},Iridium(r){return f("harbor",r,75e5,Sr(1.18),"portal")},Infernite(r){return f("harbor",r,8e5,Sr(1.18),"portal")},Stanene(r){return f("harbor",r,175e5,Sr(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(r){let a='
';for(let i of $(this)[0].res())if(e.resource[i].display){let s=Te(+H($(this)[0].val(i)).toFixed(0),1);a=a+`${t("plus_max_resource",[s,e.resource[i].name])}`}return a=a+"
",`
${t("portal_harbor_effect",[1])}
${a}
${t("minus_power",[$(this)[0].powered(r)])}
`},action(){if(u($(this)[0])){if(ne("harbor","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 de(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?w.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(r){let a=e.blood.spire&&e.blood.spire>=2?.8:.85,i=r?e.portal?.bireme?.on??0:xe.bireme,s=+(a**i*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[s])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(vr("mTabResource"),Ee("portal-transport"))},ship:{civ(){return e.race.high_pop?w.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"]),Yt()),!0):!1}},oven:{id:"portal-oven",title:t("portal_oven_title"),desc(r){if(!e.portal.hasOwnProperty("oven")||e.portal.oven.count<100||r)return`
${t("portal_oven_title")}
${t("requires_segments",[100])}
`+(e.portal.hasOwnProperty("oven")&&e.portal.oven.count>=100?`
${t("requires_power")}
`:"")},reqs:{dish:2},condition(){return e.portal.oven.count<100},queue_size:10,queue_complete(){return 100-e.portal.oven.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?19e7:0},Steel(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?2e6:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?6e5:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?1e6:0},Scarletite(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?15e3:0}},effect(r){let a=(r?.count??0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0);if(a<100){let i=100-a;return`
${t("portal_oven_effect1")}
${t("requires_segments",[i])}
`}else return yr.prtl_lake.oven_complete.effect()},action(){return e.portal.oven.count<100&&u($(this)[0])?(e.portal.oven.count++,e.portal.oven.count>=100&&(e.tech.dish=3,e.portal.oven_complete={count:1,on:0},e.portal.devilish_dish={count:0,done:0,time:0},Yt(),Ee()),!0):!1}},oven_complete:{id:"portal-oven_complete",title:t("portal_oven_title"),desc(){return`
${t("portal_oven_title")}
${t("requires_power")}
`},wiki:!1,reqs:{dish:3},condition(){return e.portal.oven.count>=100},queue_complete(){return 0},cost:{},effect(r){let a=$(this)[0].p_fuel();return`
${t("portal_oven_desc")}
${e.tech.dish===4?`
${t("portal_oven_desc2")}
`:""}
${t("minus_power",[$(this)[0].powered()])}, ${t("spend",[a.a,a.r])}
`},powered(){return de(3500)},p_fuel(){return{r:"Infernite",a:225}},action(){return!1}},devilish_dish:{id:"portal-devilish_dish",title:t("portal_devilish_dish_title"),desc:t("portal_devilish_dish_title"),reqs:{dish:3},queue_complete(){return 0},cost:{},effect(){let r=e.portal.devilish_dish?e.portal.devilish_dish.done:0;return`
${t("portal_devilish_dish_desc",[r.toFixed(1)])}
${t(`portal_devilish_dish_flavor${r>=100?6:Math.ceil(r/20)}`)}
`},action(){return!1}},dish_soul_steeper:{id:"portal-dish_soul_steeper",title:t("portal_dish_soul_steeper_title"),desc:t("portal_dish_soul_steeper_desc"),reqs:{dish:5},cost:{Money(r){return f("dish_soul_steeper",r,75e7,Sr(1.3),"portal")},Bolognium(r){return f("dish_soul_steeper",r,12e6,Sr(1.3),"portal")},Scarletite(r){return f("dish_soul_steeper",r,3e5,Sr(1.3),"portal")}},powered(){return 0},effect(){return`
${t("portal_dish_soul_steeper_effect1")}
${t("portal_dish_soul_steeper_effect2",[3+(e.race.malnutrition?1:0)+(e.race.angry?-1:0)])}
`},action(){return u($(this)[0])?(e.portal.dish_soul_steeper.count++,e.portal.dish_soul_steeper.on++,!0):!1},flair:t("portal_dish_soul_steeper_flair")},dish_life_infuser:{id:"portal-dish_life_infuser",title:t("portal_dish_life_infuser_title"),desc:t("portal_dish_life_infuser_desc"),reqs:{dish:5},cost:{Money(r){return f("dish_life_infuser",r,28e7,Sr(1.2),"portal")},Bolognium(r){return f("dish_life_infuser",r,8e6,Sr(1.2),"portal")},Orichalcum(r){return f("dish_life_infuser",r,8e6,Sr(1.2),"portal")},Species(r){return _i(10)}},powered(){return 0},effect(){return`
${t("portal_dish_life_infuser_effect1",[15])}
${t("portal_dish_life_infuser_effect2",[5])}
`},action(){return u($(this)[0])?(e.portal.dish_life_infuser.count++,e.portal.dish_life_infuser.on++,!0):!1},flair:t("portal_dish_life_infuser_flair")}},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 _i(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,Sr(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,Sr(1.2),"portal")}},powered(){return de(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,Sr(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,Sr(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(r){let a=1e4,i=r?e.portal?.base_camp?.on??0:ma.base_camp;return i>0&&(a*=1+i*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(a)])}
`},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},Yt()),!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,Sr(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,Sr(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"]),Yt()),!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?_i(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?.count??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,Yt()),!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?.count??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"]),Yt(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,Yt(),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(),Yt(),Ee("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&&(Yt(),Ee("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||(vr("mTabCivic"),Ee("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"]),Ni(),kt()),!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(p=>`${t(`portal_spire_status_${p}`)}`).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 p=mu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${p.w}`)),m>=5&&(d=t(`portal_mech_weapon_${p.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?_i(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?_i(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?.count??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,Yt()),!0):!1}}}};function Sr(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 Ut=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 pa(r,a){let i=Br("gate",0,a);return Math.round(r/(i.supress>.01?i.supress:.01))}function Fi(r){let a=Math.round(650/yt(1,"hellArmy")),i=r?e.portal?.gun_emplacement?.on??0:k.gun_emplacement;return i&&(a-=i*(e.tech.hell_gun>=2?2:1),a<0&&(a=0)),a}function an(){return yr}function Yt(){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(yr).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof yr[a].info.name=="string"?yr[a].info.name:yr[a].info.name(),n="";if(yr[a].info.hasOwnProperty("prop")&&(n=yr[a].info.prop()),yr[a].info.support){let c=yr[a].info.support;yr[a].info.hide_support?r.append(`

${s}

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

${s}

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

${s}

${n}
`);_e(a,function(){return typeof yr[a].info.desc=="string"?yr[a].info.desc:yr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Qs(r,!0),Object.keys(yr[a]).forEach(function(c){if(c!=="info"&&Gr(yr,a,c)){let l=yr[a][c];Rr(l,"portal",c)}})}})}function Eo(r,a){return Gr(yr,r,a)}function Vi(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($r("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Qs(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 p=$('
');h.append(p),p.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");p.append($(`${m} / {{ g.max | s_max }} | `)),p.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),p.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let b=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 }}%
`)),B({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Vi("hostiles")},threatLevel(){return Vi("threatLevel")},aNext(){let F=pe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,B({el:"#garrison"},"update"))},aLast(){let F=pe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=Fi()),e.portal.hasOwnProperty("guard_post")&&(x+=D(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=pe();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=pe(),x=!0;for(;x&&F>0;){let j=qs();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,B({el:"#garrison"},"update")):x=!1,F--}},hireLabel(){return Vi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(F){return Io(F)},patrolling(F){let x=F-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=Fi();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=D(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?xt(-1):xt((100-x)/(F*4))},stationed(){return We()},s_max(F){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(F){_e(`hf${i}${F}`,function(){switch(F){case"hostiles":return Vi("hostiles");case"threatLevel":return Vi("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 Vi("hireLabel")}},{elm:`#${i} span.${F}`})}),_e(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Io(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=Fi();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=D(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?D(n*2):D(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(yt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function zo(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*(w.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 Lo(){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+=w.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(w.armored.vars(1)[1]*i)),e.race.scales&&(a+=w.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;Fi()<=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 R=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);R=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-w.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-w.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,p=!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 b=+(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?D(2):D(1),h--);let Q=Math.round(yt(S,"hellArmy",R)),Z=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(Z/10)),e.race.blood_thirst_count>w.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=w.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?w.chameleon.vars()[1]:0,e.race.elusive?w.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=zo(Math.round(Z*(1+Math.random()*3)),0,!0,j);let ee=Math.round(Q/2);Z0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Oe=Math.round(ee/Ge);for(let xr=0;xre.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=Io(e.portal.fortress.garrison),R=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,Z=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let ee=Math.round(Math.rand(1,R+1));if(ee>S&&(ee=S),S-=ee,e.portal.fortress.threat-=ee,e.stats.dkills+=ee,s&&(e.portal.soul_forge.kills+=ee,di(ee)),Z+=ee,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=Z,r.stats.kills.sieges=Z,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",[Z,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=me("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+w.blurry.vars()[0]/100);let R=ve("yeti");R>0&&(x*=1+w.blurry.vars(1)[0]/100*R),e.race.instinct&&(x*=1+w.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,Z=10-Math.rand(0,Q+1);if(S>Z){let ce=Math.round(S),ee=Math.rand(0,ce+1);ee>e.civic.hell_surveyor.workers&&(ee=e.civic.hell_surveyor.workers),ee===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):ee>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[ee]),!1,!1,["hell"]),ee>0&&(r.surveyors=ee,r.stats.surveyors=ee,e.civic.hell_surveyor.workers-=ee,e.civic.hell_surveyor.max-=ee,e.resource[e.race.species].amount-=ee,e.portal.carport.damaged+=ee)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),ee.bodies=Ge,Ge>0){let Oe=25-Math.floor(k.attractor/5);Oe<5&&(Oe=5);let xr=Math.round(Ge/Oe);for(let jr=0;jr=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"]),Yt()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,R=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=R,r.soul_attractors=R,di(R)}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,di(j),e.stats.dkills+=j;let R=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(R*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,R)===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,R=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 Br(r,a,i){switch(r){case"ruins":{let s=i?e.portal?.guard_post?.on??0:k.guard_post,n=a||D(s),c=(i?e.portal?.arcology?.on??0:k.arcology)*75,l=yt(n,"hellArmy",0);e.race.holy&&(l*=1+w.holy.vars()[1]/100);let o=ve("unicorn");o>0&&(l*=1+w.holy.vars(1)[1]/100*o);let d=(l+c)/5e3;return{supress:d>1?1:d,rating:l+c}}case"gate":{let s=Br("ruins",a,i),n=(i?e.portal?.gate_turret?.on??0:k.gate_turret)*100;e.race.holy&&(n*=1+w.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+w.holy.vars(1)[1]/100*c);let l=(s.rating+n)/7500;return{supress:l>1?1:l,rating:s.rating+n}}default:return 0}}var wa={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 $a(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 mu(r){let a="laser",i="laser";return Object.keys(wa[r].weapon).forEach(function(s){wa[r].weapon[s]>wa[r].weapon[a]&&(a=s),wa[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,p){c+=`${t(`portal_mech_size_${h}`)}`}),n.append(` + `),m+="",a.append(m),B({el:"#celestialLab",data:{p,w:i},methods:{pEdit(){p.pts=en(p,r?i:!1)},setPlanet(){if(en(p)>=0){Object.keys(p.geology).forEach(function(F){p.geology[F]===0?delete p.geology[F]:p.geology[F]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let b=ot();e.custom.planet.hasOwnProperty(b)||(e.custom.planet[b]={s:!1});let M="s";e.custom.planet[b][M]=Le(p),delete e.custom.planet[b][M].pts,uo(p)}},reset(){p.traitlist=[],Object.keys(p.geology).forEach(function(b){p.geology[b]=0}),p.pts=en(p,r?i:!1)},less(b){p.geology[b]-=pe(),p.geology[b]<-20&&(p.geology[b]=-20)},more(b){p.geology[b]+=pe();let M=30;e.stats.achieve.whitehole&&(M+=e.stats.achieve.whitehole.l*5),p.biome==="eden"&&(M+=5),p.geology[b]>M&&(p.geology[b]=M)}},filters:{res(b){return p.geology[b]}}})}function en(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}function Ur(r){return r?e.interstellar?.s_gate?.count?!!e.interstellar.s_gate.on:!0:!!k.s_gate}var yr={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 de(e.tech.turret?4+e.tech.turret:4)},postPower(r){k.turret=e.portal.turret.on,B({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++,B({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+=D(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 de(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 de(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 de(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 de(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 de(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/yt(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 de(30)},postPower(r){B({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?.count??0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6,c=r?e.portal.soul_attractor.on:k.soul_attractor;e.tech.hell_pit>=7&&c>0&&(n*=.97**c),a=a+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=Fi(r);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 de(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 de(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 de(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(){ji($(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?.count??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",[st("descend").artifact])}
`;{let i=tn();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?_s():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=Br("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 de(5)},support(){return 1},effect(){let r=e.race.holy?1+w.holy.vars()[1]/100:1,a=ve("unicorn");a>0&&(r*=1+w.holy.vars(1)[1]/100*a);let i=Math.round(r*yt(D(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[D(1),$(this)[0].powered()])}
`},action(){return u($(this)[0])?(ne("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){B({el:"#srprtl_ruins"},"update"),B({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?.count??0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){return e.portal.vault.count<2&&u($(this)[0])?(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"])),!0):!1},post(){e.portal.vault.count===2&&(ue(),Yt(),Ee())}},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 de(8)},effect(){return`
${t("portal_archaeology_effect",[D(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=D(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 de(25)},effect(r){let a=Br("ruins",0,r),i=H(Tr()*8*a.supress);i=+i.toFixed(0);let s=Math.round(la(r))*10,n=`
${t("plus_max_resource",[s,t("resource_Crates_name")])}
${t("plus_max_resource",[s,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[D(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${n}
${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||ea(),!0):!1},post(){B({el:"#srprtl_ruins"},"update"),ue()},postPower(){B({el:"#srprtl_ruins"},"update"),B({el:"#srprtl_gate"},"update")},citizens(){let r=8;return e.race.high_pop&&(r*=w.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 de(12)},special:!0,effect(r){let i=+(75*Br("ruins",0,r).supress).toFixed(1),s=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[D(1)])}
${s}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[i])}
${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(){It()},postPower(r){xi("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(r){let a=20,i=r?e.portal?.hell_forge?.on??0:k.hell_forge;return i&&(a+=i*10),ut(-a)},fuel:{Infernite:5,Coal:100,Oil:80},effect(r){let a=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered(r)])}
${t("portal_inferno_power_effect",[a.Infernite,e.resource.Infernite.name,a.Coal,e.resource.Coal.name,a.Oil,e.resource.Oil.name])}
`},action(){return u($(this)[0])?(ne("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){B({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,a){return r!==void 0?r+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(z).length-1,a])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(z).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&u($(this)[0])?(e.pillars[e.race.species]=Zt(),e.tech.pillars=2,H(0,!1,!0),ra(!0),Ut(!0),ie("resonance"),B({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=Br("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=Ut();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 Ut()-e.portal.west_tower.count},cost:{Money(r,a){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=Ut()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),Yt()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(r){let a=Ut();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 Ut()-e.portal.east_tower.count},cost:{Money(r,a){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=Ut()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),Yt()))}},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 de(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+w.holy.vars()[1]/100);let a=ve("unicorn");a>0&&(r*=1+w.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},post(){B({el:"#srprtl_gate"},"update")},postPower(){B({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 de(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(r){let a=T("infernite_mine","",r);return`
${t("portal_infernite_mine_effect",[+a.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:"harbor"},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}},harbor:{id:"portal-harbor",title:t("portal_harbor_title"),desc(){return`
${t("portal_harbor_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(r){let i=(r?e.portal?.cooling_tower?.on??0:k.cooling_tower)||0;return+de(500*.92**i).toFixed(2)},support(){return 1},cost:{Money(r){return f("harbor",r,225e6,Sr(1.18),"portal")},Cement(r){return f("harbor",r,5e7,Sr(1.18),"portal")},Iridium(r){return f("harbor",r,75e5,Sr(1.18),"portal")},Infernite(r){return f("harbor",r,8e5,Sr(1.18),"portal")},Stanene(r){return f("harbor",r,175e5,Sr(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(r){let a='
';for(let i of $(this)[0].res())if(e.resource[i].display){let s=Te(+H($(this)[0].val(i)).toFixed(0),1);a=a+`${t("plus_max_resource",[s,e.resource[i].name])}`}return a=a+"
",`
${t("portal_harbor_effect",[1])}
${a}
${t("minus_power",[$(this)[0].powered(r)])}
`},action(){if(u($(this)[0])){if(ne("harbor","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 de(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?w.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(r){let a=e.blood.spire&&e.blood.spire>=2?.8:.85,i=r?e.portal?.bireme?.on??0:xe.bireme,s=+(a**i*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[s])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(vr("mTabResource"),Ee("portal-transport"))},ship:{civ(){return e.race.high_pop?w.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"]),Yt()),!0):!1}},oven:{id:"portal-oven",title:t("portal_oven_title"),desc(r){if(!e.portal.hasOwnProperty("oven")||e.portal.oven.count<100||r)return`
${t("portal_oven_title")}
${t("requires_segments",[100])}
`+(e.portal.hasOwnProperty("oven")&&e.portal.oven.count>=100?`
${t("requires_power")}
`:"")},reqs:{dish:2},condition(){return e.portal.oven.count<100},queue_size:10,queue_complete(){return 100-e.portal.oven.count},cost:{Money(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?19e7:0},Steel(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?2e6:0},Infernite(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?6e5:0},Bolognium(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?1e6:0},Scarletite(r){return(r||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?15e3:0}},effect(r){let a=(r?.count??0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0);if(a<100){let i=100-a;return`
${t("portal_oven_effect1")}
${t("requires_segments",[i])}
`}else return yr.prtl_lake.oven_complete.effect()},action(){return e.portal.oven.count<100&&u($(this)[0])?(e.portal.oven.count++,e.portal.oven.count>=100&&(e.tech.dish=3,e.portal.oven_complete={count:1,on:0},e.portal.devilish_dish={count:0,done:0,time:0},Yt(),Ee()),!0):!1}},oven_complete:{id:"portal-oven_complete",title:t("portal_oven_title"),desc(){return`
${t("portal_oven_title")}
${t("requires_power")}
`},wiki:!1,reqs:{dish:3},condition(){return e.portal.oven.count>=100},queue_complete(){return 0},cost:{},effect(r){let a=$(this)[0].p_fuel();return`
${t("portal_oven_desc")}
${e.tech.dish===4?`
${t("portal_oven_desc2")}
`:""}
${t("minus_power",[$(this)[0].powered()])}, ${t("spend",[a.a,a.r])}
`},powered(){return de(3500)},p_fuel(){return{r:"Infernite",a:225}},action(){return!1}},devilish_dish:{id:"portal-devilish_dish",title:t("portal_devilish_dish_title"),desc:t("portal_devilish_dish_title"),reqs:{dish:3},queue_complete(){return 0},cost:{},effect(){let r=e.portal.devilish_dish?e.portal.devilish_dish.done:0;return`
${t("portal_devilish_dish_desc",[r.toFixed(1)])}
${t(`portal_devilish_dish_flavor${r>=100?6:Math.ceil(r/20)}`)}
`},action(){return!1}},dish_soul_steeper:{id:"portal-dish_soul_steeper",title:t("portal_dish_soul_steeper_title"),desc:t("portal_dish_soul_steeper_desc"),reqs:{dish:5},cost:{Money(r){return f("dish_soul_steeper",r,75e7,Sr(1.3),"portal")},Bolognium(r){return f("dish_soul_steeper",r,12e6,Sr(1.3),"portal")},Scarletite(r){return f("dish_soul_steeper",r,3e5,Sr(1.3),"portal")}},powered(){return 0},effect(){return`
${t("portal_dish_soul_steeper_effect1")}
${t("portal_dish_soul_steeper_effect2",[3+(e.race.malnutrition?1:0)+(e.race.angry?-1:0)])}
`},action(){return u($(this)[0])?(e.portal.dish_soul_steeper.count++,e.portal.dish_soul_steeper.on++,!0):!1},flair:t("portal_dish_soul_steeper_flair")},dish_life_infuser:{id:"portal-dish_life_infuser",title:t("portal_dish_life_infuser_title"),desc:t("portal_dish_life_infuser_desc"),reqs:{dish:5},cost:{Money(r){return f("dish_life_infuser",r,28e7,Sr(1.2),"portal")},Bolognium(r){return f("dish_life_infuser",r,8e6,Sr(1.2),"portal")},Orichalcum(r){return f("dish_life_infuser",r,8e6,Sr(1.2),"portal")},Species(r){return _i(10)}},powered(){return 0},effect(){return`
${t("portal_dish_life_infuser_effect1",[15])}
${t("portal_dish_life_infuser_effect2",[5])}
`},action(){return u($(this)[0])?(e.portal.dish_life_infuser.count++,e.portal.dish_life_infuser.on++,!0):!1},flair:t("portal_dish_life_infuser_flair")}},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 _i(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,Sr(1.15),"portal")},Supply(r){return e.portal.purifier&&e.portal.purifier.count===0?100:f("purifier",r,4200,Sr(1.2),"portal")}},powered(){return de(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,Sr(1.2),"portal")},Supply(r){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:f("port",r,6250,Sr(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(r){let a=1e4,i=r?e.portal?.base_camp?.on??0:ma.base_camp;return i>0&&(a*=1+i*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(a)])}
`},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},Yt()),!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,Sr(1.2),"portal")},Supply(r){return f("base_camp",r,5e4,Sr(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"]),Yt()),!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?_i(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?.count??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,Yt()),!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?.count??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"]),Yt(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,Yt(),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(),Yt(),Ee("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&&(Yt(),Ee("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||(vr("mTabCivic"),Ee("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"]),Ni(),kt()),!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(p=>`${t(`portal_spire_status_${p}`)}`).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 p=mu(c),m=$(this)[0].mscan();m>0&&(o=t(`portal_mech_weapon_${p.w}`)),m>=5&&(d=t(`portal_mech_weapon_${p.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?_i(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?_i(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?.count??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,Yt(),ue()),!0):!1}}}};function Sr(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 Ut=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 pa(r,a){let i=Br("gate",0,a);return Math.round(r/(i.supress>.01?i.supress:.01))}function Fi(r){let a=Math.round(650/yt(1,"hellArmy")),i=r?e.portal?.gun_emplacement?.on??0:k.gun_emplacement;return i&&(a-=i*(e.tech.hell_gun>=2?2:1),a<0&&(a=0)),a}function an(){return yr}function Yt(){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(yr).forEach(function(a){let i=a.replace("prtl_","");if(e.settings.portal[`${i}`]){let s=typeof yr[a].info.name=="string"?yr[a].info.name:yr[a].info.name(),n="";if(yr[a].info.hasOwnProperty("prop")&&(n=yr[a].info.prop()),yr[a].info.support){let c=yr[a].info.support;yr[a].info.hide_support?r.append(`

${s}

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

${s}

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

${s}

${n}
`);_e(a,function(){return typeof yr[a].info.desc=="string"?yr[a].info.desc:yr[a].info.desc()},{elm:`#${a} h3.name`,classes:"has-background-light has-text-dark"}),a==="prtl_fortress"&&Qs(r,!0),Object.keys(yr[a]).forEach(function(c){if(c!=="info"&&Gr(yr,a,c)){let l=yr[a][c];Rr(l,"portal",c)}})}})}function Eo(r,a){return Gr(yr,r,a)}function Vi(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($r("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[a])}}}function Qs(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 p=$('
');h.append(p),p.append($(`${t("civics_garrison")}: `));let m=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");p.append($(`${m} / {{ g.max | s_max }} | `)),p.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),p.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let b=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 }}%
`)),B({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Vi("hostiles")},threatLevel(){return Vi("threatLevel")},aNext(){let F=pe();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,B({el:"#garrison"},"update"))},aLast(){let F=pe(),x=e.portal.fortress.patrols*e.portal.fortress.patrol_size;k.soul_forge&&(x+=Fi()),e.portal.hasOwnProperty("guard_post")&&(x+=D(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=pe();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=pe(),x=!0;for(;x&&F>0;){let j=qs();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,B({el:"#garrison"},"update")):x=!1,F--}},hireLabel(){return Vi("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||ys()}},filters:{defensive(F){return Io(F)},patrolling(F){let x=F-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let j=Fi();j<=x&&(x-=j)}return e.portal.hasOwnProperty("guard_post")&&(x-=D(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?xt(-1):xt((100-x)/(F*4))},stationed(){return We()},s_max(F){return We(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(F){_e(`hf${i}${F}`,function(){switch(F){case"hostiles":return Vi("hostiles");case"threatLevel":return Vi("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 Vi("hireLabel")}},{elm:`#${i} span.${F}`})}),_e(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Io(r){let a=r-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(k.soul_forge){let n=Fi();n<=a&&(a-=n)}e.portal.hasOwnProperty("guard_post")&&(a-=D(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?D(n*2):D(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(yt(a,"hellArmy",i))+(k.turret?k.turret*s:0)}function zo(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*(w.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 Lo(){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+=w.armored.vars()[1]);let i=ve("tortoisan");i>0&&(a+=Math.floor(w.armored.vars(1)[1]*i)),e.race.scales&&(a+=w.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;Fi()<=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 R=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);R=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-w.ghostly.vars()[2])/100)));let o=ve("wendigo");o>0&&(l=Math.round(l*((100-w.ghostly.vars(1)[2]*o)/100))),l<12&&(l=12);let d=0,h=k.war_droid?k.war_droid:0,p=!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 b=+(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?D(2):D(1),h--);let Q=Math.round(yt(S,"hellArmy",R)),Z=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(Z/10)),e.race.blood_thirst_count>w.blood_thirst.vars()[0]&&(e.race.blood_thirst_count=w.blood_thirst.vars()[0]));let ce=30+Math.max(e.race.chameleon?w.chameleon.vars()[1]:0,e.race.elusive?w.elusive.vars()[0]:0);if(Math.rand(0,ce)===0){j.ambush=!0,d+=zo(Math.round(Z*(1+Math.random()*3)),0,!0,j);let ee=Math.round(Q/2);Z0){let Ge=35-Math.floor(k.attractor/3);Ge<5&&(Ge=5);let Oe=Math.round(ee/Ge);for(let xr=0;xre.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=Io(e.portal.fortress.garrison),R=j/35>1?j/35:1,S=Math.round(e.portal.fortress.threat/2),Q=0,Z=0,ce=!1;for(;S>0&&e.portal.fortress.walls>0;){let ee=Math.round(Math.rand(1,R+1));if(ee>S&&(ee=S),S-=ee,e.portal.fortress.threat-=ee,e.stats.dkills+=ee,s&&(e.portal.soul_forge.kills+=ee,di(ee)),Z+=ee,S>0&&(Q++,e.portal.fortress.walls--,e.portal.fortress.walls===0)){x.destroyed=!0,ce=!0;break}}x.damage=Q,x.kills=Z,r.stats.kills.sieges=Z,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",[Z,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=me("nopain",1);j&&(x*=1+j/100),e.race.blurry&&(x*=1+w.blurry.vars()[0]/100);let R=ve("yeti");R>0&&(x*=1+w.blurry.vars(1)[0]/100*R),e.race.instinct&&(x*=1+w.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,Z=10-Math.rand(0,Q+1);if(S>Z){let ce=Math.round(S),ee=Math.rand(0,ce+1);ee>e.civic.hell_surveyor.workers&&(ee=e.civic.hell_surveyor.workers),ee===1&&e.portal.fortress.s_ntfy==="Yes"?I(t("fortress_killed"),!1,!1,["hell"]):ee>1&&e.portal.fortress.s_ntfy==="Yes"&&I(t("fortress_eviscerated",[ee]),!1,!1,["hell"]),ee>0&&(r.surveyors=ee,r.stats.surveyors=ee,e.civic.hell_surveyor.workers-=ee,e.civic.hell_surveyor.max-=ee,e.resource[e.race.species].amount-=ee,e.portal.carport.damaged+=ee)}if(r.surveyor_finds={},e.civic.hell_surveyor.workers>0&&n>0)for(let ce=0;ce100&&(Ge=100),ee.bodies=Ge,Ge>0){let Oe=25-Math.floor(k.attractor/5);Oe<5&&(Oe=5);let xr=Math.round(Ge/Oe);for(let jr=0;jr=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"]),Yt()),e.tech.hell_pit){if(s&&e.tech.hell_pit>=5&&k.soul_attractor){let j=e.blood.attract?e.blood.attract*5:0,R=k.soul_attractor*Math.rand(40+j,120+j);e.portal.soul_forge.kills+=R,r.soul_attractors=R,di(R)}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,di(j),e.stats.dkills+=j;let R=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5?6750:7500;e.tech.hell_pit>=7&&k.soul_attractor>0&&(R*=.94**k.soul_attractor);for(let S=0;S=5?4500:5e3;Math.rand(0,R)===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,R=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 Br(r,a,i){switch(r){case"ruins":{let s=i?e.portal?.guard_post?.on??0:k.guard_post,n=a||D(s),c=(i?e.portal?.arcology?.on??0:k.arcology)*75,l=yt(n,"hellArmy",0);e.race.holy&&(l*=1+w.holy.vars()[1]/100);let o=ve("unicorn");o>0&&(l*=1+w.holy.vars(1)[1]/100*o);let d=(l+c)/5e3;return{supress:d>1?1:d,rating:l+c}}case"gate":{let s=Br("ruins",a,i),n=(i?e.portal?.gate_turret?.on??0:k.gate_turret)*100;e.race.holy&&(n*=1+w.holy.vars()[1]/100);let c=ve("unicorn");c>0&&(n*=1+w.holy.vars(1)[1]/100*c);let l=(s.rating+n)/7500;return{supress:l>1?1:l,rating:s.rating+n}}default:return 0}}var wa={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 $a(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 mu(r){let a="laser",i="laser";return Object.keys(wa[r].weapon).forEach(function(s){wa[r].weapon[s]>wa[r].weapon[a]&&(a=s),wa[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,p){c+=`${t(`portal_mech_size_${h}`)}`}),n.append(` `);if(r.append(o),e.tech.genetics>=5){let l=$(``);r.append(l)}if(e.tech.genetics>=6){let l=$(``);r.append(l)}if(e.tech.genetics>=7){let l=$(``);r.append(l)}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"),C({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(l){return t(e.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(l?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")},novo(){let l=V(),u=2e5;if(e.resource.Knowledge.amount>=u){let d=Math.floor(e.resource.Knowledge.amount/u),h=Math.min(l,d);e.resource.Knowledge.amount-=u*h,e.resource.Genes.amount+=h}},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(l){return t(e.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(l?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")}},filters:{timer(l){if(e.arpa.sequence.on&&e.arpa.sequence.labs>0)return e.arpa.sequence.boost?lt(l/(e.arpa.sequence.labs*2)):lt(l/e.arpa.sequence.labs);{let u=Ze(14,12);return u.length>0?u:t("time_never")}}}}),B("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 r=$('
');$("#arpaGenetics").append(r);let i=$('
');r.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(v){b[v]&&b[v].type==="minor"&&(e.settings.mtorder.includes(v)||e.settings.mtorder.push(v))}),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(v){(b[v]&&b[v].type==="minor"||v==="mastery"||v==="fortify")&&(v!=="fortify"||e.tech.decay&&e.tech.decay>=2)&&(!["promiscuous","content","resilient","industrious","tactical","fibroblast"].includes(v)&&e.race.lone_survivor||!e.race.lone_survivor)&&(s=!0,xl(i,v),n.push(v))}),r.append(`
${t("arpa_race_genetic_traids",[We("name")])}
`);let c=Tt("name"),o=[],l=[],u=$('
');r.append(u);let d=Be(e.race);xe("fool",2023)&&(d.hooved=1),Object.keys(d).forEach(function(v){if(b[v]&&b[v].type!=="minor"&&b[v].type!=="special"&&v!=="evil"&&v!=="soul_eater"&&v!=="artifical"){let k=!1;if(e.race.ss_traits&&e.race.ss_traits.includes(v)||e.race.iTraits&&e.race.iTraits.hasOwnProperty(v)||e.race.species==="sludge"&&(v==="ooze"||e.race.modified)?k=!0:e.race.hasOwnProperty(v)||(k=!0),!k&&(b[v].type==="major"&&e.genes.mutation||b[v].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let P=$('
'),j=$(`${t("arpa_remove_button")}`);o.push(v),P.append(j),P.append($(`${c[v]?c[v]:b[v].name} (${t("arpa_genepool_rank",[d[v]])})`)),u.append(P)}else l.push(v),u.append(`
${c[v]?c[v]:b[v].name} (${t("arpa_genepool_rank",[d[v]])})
`)}});let h=[];if(e.genes.mutation&&e.genes.mutation>=3&&(e.race.species!=="sludge"||!e.race.modified)){r.append(`
${t("arpa_race_genetic_gain")}
`);let v=["dumb","smart"];Object.keys(x).forEach(function(P){P!=="junker"&&P!=="sludge"&&P!=="custom"&&x[P].type===x[e.race.species].type&&Object.keys(x[P].traits).forEach(function(j){if(!e.race[j]&&j!=="soul_eater"){let D=v.indexOf(j);if(D===-1)h.push(j);else{let U=!1;switch(D%2){case 0:e.race[v[D+1]]&&(U=!0);break;case 1:e.race[v[D-1]]&&(U=!0);break}U||h.push(j)}}})});let k=$('
');r.append(k);for(let P=0;P'),U=$(`${t("arpa_gain_button")}`);D.append(U),D.append($(`${c[j]?c[j]:b[j].name}`)),k.append(D)}}s&&r.prepend(`
${t("arpa_race_genetic_minor_traits",[We("name")])}
`);let p=function(v){let k=b[v].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1),t("arpa_remove",[Tt("name",v),k,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},f=function(v){let k=b[v].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1),t("arpa_gain",[Tt("name",v),k,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},g=function(v){let k=Ka(e.race.minor[v]?e.race.minor[v]+4:4);return v==="mastery"&&(k*=5),t("arpa_gene_buy",[Tt("name",v),Y(k),e.resource.Genes.name])},w=function(v){let k=Ka(e.genes.minor[v]?e.genes.minor[v]+4:4);return v==="mastery"&&(k*=2),t("arpa_phage_buy",[Tt("name",v),Y(k),t("resource_Phage_name")])};C({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(v){let k=0,P=V(),j=!0,D=!1;for(;k=U?(e.resource.Genes.amount-=U,e.race.minor[v]?e.race.minor[v]++:e.race.minor[v]=1,e.race[v]?e.race[v]++:e.race[v]=1,D=!0):j=!1,k++}D&&(v==="mastery"&&mt(!0),Ga(),v==="persuasive"&&Ys())},phage(v){let k=0,P=V(),j=!0,D=!1;for(;k=U?(e.prestige.Phage.count-=U,e.genes.minor[v]?e.genes.minor[v]++:e.genes.minor[v]=1,e.race[v]?e.race[v]++:e.race[v]=1,D=!0):j=!1,k++}D&&(v==="mastery"&&mt(!0),Ga(),v==="persuasive"&&Ys())},purge(v){if(e.race.species==="sludge"&&(e.race.modified||v==="ooze"))return;let k=b[v].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1);let P=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[P].count>=k){e.prestige[P].count-=k;let j=e.race[v];delete e.race[v],e.race.modified?e.race.modified++:e.race.modified=1,Qi(v,j),Ga(),pe(),Rt();let D=0;Object.keys(e.race).forEach(function(U){b[U]&&(b[U].type=="major"||b[U].type=="genus")&&U!=="evil"&&D++}),D===0&&se("blank_slate")}},gain(v){if(e.race.species==="sludge"&&e.race.modified)return;let k=b[v].val*5;e.race.species==="sludge"&&(k*=2),e.race.species==="custom"&&(k*=10),k<0&&(k*=-1);let P=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[P].count>=k&&(e.prestige[P].count-=k,e.race[v]=1,e.race.modified?e.race.modified++:e.race.modified=1,Ar(v),Ga(),pe(),Rt())},geneCost(v){return g(v)},phageCost(v){return w(v)},traitEffect(v){return t(`trait_${v}_effect`)},removeCost(v){return p(v)},addCost(v){return f(v)},genePurchasable(v){let k=Ka(e.race.minor[v]?e.race.minor[v]+4:4);return v==="mastery"&&(k*=5),e.resource.Genes.amount>=k},phagePurchasable(v){let k=Ka(e.genes.minor[v]?e.genes.minor[v]+4:4);return v==="mastery"&&(k*=2),e.prestige.Phage.count>=k}}}),n.forEach(function(v){B(`popGenetrait${v}`,function(){return g(v)},{elm:`#geneticBreakdown .t-${v} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&B(`popGenetrait${v}`,function(){return w(v)},{elm:`#geneticBreakdown .t-${v} .pbuy`,classes:"has-background-light has-text-dark"}),B(`popGenetrait${v}`,function(){return e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?`
${Tt("desc",v)}
${t(`trait_${v}_effect`)}
`:Tt("desc",v)},{elm:`#geneticBreakdown .t-${v} .name`,classes:"has-background-light has-text-dark"})}),o.forEach(function(v){B(`popRemoveBkdwn${v}`,function(){return p(v)},{elm:`#geneticBreakdown .remove${v}`,classes:"has-background-light has-text-dark"});let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{wide:!0,classes:"w30"})}),l.forEach(function(v){let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{elm:`#geneticBreakdown .trait${v}`,wide:!0,classes:"w30"})}),h.forEach(function(v){B(`popAddBkdwn${v}`,function(){return f(v)},{elm:`#geneticBreakdown .add${v}`,classes:"has-background-light has-text-dark"});let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{wide:!0,classes:"w30"})}),$l()}}function xl(a,r){let i=$(`
`),s=$(`${e.resource.Genes.name} (${e.race.minor[r]||0})`);if(i.append(s),e.prestige.Phage.count>0){let c=$(`${t("resource_Phage_name")} (${e.genes.minor[r]||0})`);i.append(c)}let n=e.race[r]>1?`(${e.race[r]}) `:"";i.append(`${n}${Tt("name",r)}`),a.append(i)}function gc(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(A($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),ml())}function tn(){e.tech.b_stone&&e.tech.b_stone>=2&&(A($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),fl())}function ql(a,r){if(yl(r)){if(e.arpa[r]||(e.arpa[r]={complete:0,rank:0}),re[r].rank&&e.arpa[r].rank>=re[r].rank)return;let i=$(`
`);a.append(i);let s=typeof re[r].title=="string"?re[r].title:re[r].title(),n=$(`
${s}{{ rank | level }}
`);i.append(n);let c=$('
{{ complete }}%
');n.append(c);let o=$('
');i.append(o),o.append($(``)),o.append($(``)),o.append($(``)),o.append($(``)),o.append($(``)),C({el:`#arpa${r}`,data:e.arpa[r],methods:{queue(u){if(e.tech.queue){let h=V();for(let p=0;p0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===f)e.queue.queue[e.queue.queue.length-1].q++;else{let v=typeof re[u].title=="string"?re[u].title:re[u].title();e.queue.queue.push({id:f,action:"arpa",type:u,label:v,cna:!1,time:0,q:1,qs:1,t_max:0})}Tr()}else break}}},build(u,d){Pl(u,d,!0)},srDesc(){return pi(typeof re[r].desc=="string"?re[r].desc:re[r].desc())},srLevel(){return pi(re[r].effect())},arpaProjectSRCosts(u,d){let h=u==="100"?100-e.arpa[d].complete:u;var p=`Construct ${h}%. Costs:`,f=Ca(re[d].cost);return Object.keys(f).forEach(function(g){var w=+(f[g]()*(h/100)).toFixed(0);if(w>0){var v=g==="Money"?"$":e.resource[g].name+": ",k=e.resource[g].amount>=w?"":` ${t("insufficient")} ${e.resource[g].name}.`;p=p+` ${v} ${Y(w,2)}.${k}`}}),p}},filters:{remain(u){return 100-u},level(u){return t("arpa_level",[u])}}}),B(`popArpa${r}`,function(){return re[r].desc},{elm:`#arpa${r} .head .desc`,classes:"has-background-light has-text-dark"}),B(`popArpa${r}`,function(){return re[r].effect()},{elm:`#arpa${r} .head .rank`,classes:"has-background-light has-text-dark"});let l=[1,10,25,100];for(let u=0;u=100&&(e.arpa[a].rank++,e.arpa[a].complete=0,e.tech[re[a].grant]=e.arpa[a].rank,n=!0,a==="monument"&&(e.arpa.m_type=mc(),$(`#arpa${a} .head .desc`).html(re[a].title()),ba(!1,["arpamonument"])),a==="roid_eject"&&($(`#arpa${a} .head .desc`).html(re[a].title()),ba(!1,["arparoid_eject"])),a==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,ie("popArpalaunch_facility"),[1,10,25,100].forEach(function(o){ie(`popArpalaunch_facility${o}`)}),s||aa(["arpalaunch_facility"]),fc(),ut(),I(t("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),e.race.inflation&&(e.race.inflation+=10),pe()));if(i){let c=[1,10,25,100],o=$("#popper"),l=o.data("id");for(let u=0;u"),n=Ca(re[r].cost);let c=Ji(re[r],i/100,!1,!0);return Object.keys(n).forEach(function(o){var l=+(n[o]()*(i/100)).toFixed(0);if(l>0){var u=o==="Money"?"$":e.resource[o].name+": ",d=e.resource[o].amount>=l?"has-text-dark":o===c.r?"has-text-danger":"has-text-alert";s.append($(`
${u}${Y(l,2)}
`))}}),s}function Ys(){Object.keys(e.resource).forEach(function(a){C({el:`#market-${a}`},"update")}),C({el:"#galaxyTrade"},"update")}function vc(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"mad"});let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("mad");e.stats.mad++,_a(),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),L("apocalypse"),L("squished",!0),L(`extinct_${a}`),e.civic.govern.type==="anarchy"&&L("anarchist"),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("take_no_advice"),e.race.truepath&&L("ashanddust"),da();let l=e.race.hasOwnProperty("srace")?e.race.srace:!1,u=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u>0&&(e.race.corruption=u),l&&(e.race.srace=l),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function yc(){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"bioseed"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=ke("bioseed");e.stats.bioseed++,_a(),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),L("seeder"),L(`biome_${n}`),c.forEach(function(g){Fe.hasOwnProperty(g)&&L(`atmo_${g}`)}),L(`genus_${i}`),e.race.gravity_well&&L("escape_velocity"),e.race.truepath&&L("exodus"),c.includes("dense")&&e.race.universe==="heavy"&&L("double_density"),e.race.junker&&e.race.species==="junker"&&se("organ_harvester"),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("ill_advised"),typeof e.tech.world_control>"u"&&L("cult_of_personality"),e.race.cataclysm&&L("iron_will",!1,5),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross");let l=0,u=0;switch(Object.keys(e.city.geology).forEach(function(g){e.city.geology[g]>0?l++:e.city.geology[g]<0&&u++}),l>=4&&L("miners_dream"),u>=3&&se("rocky_road"),e.race.steelen&&e.race.steelen>=1&&L("steelen"),e.race.universe){case"micro":e.race.small||e.race.compact?L("macro",!0):L("marble",!0);break;default:break}da();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,p=e.starDock.probes.count+1,f=e.starDock.hasOwnProperty("geck")?e.starDock.geck.count:0;e.stats.achieve.explorer&&(p+=e.stats.achieve.explorer.l),e.race={species:"protoplasm",gods:a,old_gods:r,universe:e.race.universe,seeded:!0,probes:p,geck:f,seed:Math.floor(K(1e4)),ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),wa({orbit:s,biome:n,ptrait:c,geology:!1}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function bc(){if(e.city.ptrait.includes("unstable")&&e.tech.quaked){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Ie("reset",{end:"cataclysm"}),ta();let a=ke("cataclysm");e.stats.cataclysm++,_a(),e.prestige.Phage.count+=a.phage,e.stats.phage+=a.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=a.plasmid,e.stats.antiplasmid+=a.plasmid):(e.prestige.Plasmid.count+=a.plasmid,e.stats.plasmid+=a.plasmid),L("squished",!0),L(`extinct_${e.race.species}`),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("take_no_advice"),da(),L("shaken"),e.race.cataclysm&&L("failed_history");let r=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),r&&(e.race.srace=r),wa({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:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(K(1e4)),ascended:!1},l>0&&(e.race.corruption=l),o&&(e.race.srace=o),wa({orbit:i,biome:s,ptrait:n,geology:!1}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function kc(){ta(),Ie("reset",{end:"ascend"});let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("ascend");e.stats.ascend++,_a(),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)),n.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),typeof e.tech.world_control>"u"&&L("cult_of_personality");let l=0;Object.keys(e.city.geology).forEach(function(h){e.city.geology[h]>0&&l++}),l>=4&&L("miners_dream"),(!e.galaxy.hasOwnProperty("dreadnought")||e.galaxy.dreadnought.count===0)&&L("dreaded"),!e.race.modified&&(e.race.species==="synth"||e.race.species==="nano")&&e.race.emfield&&se("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),da();let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:!0},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),Object.keys(c).forEach(function(h){c[h]+=.02}),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function mi(){if(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"descension"}),L("squished",!0),L(`extinct_${e.race.species}`),e.race.witch_hunter&&e.tech.forbidden>=5&&e.race.universe==="magic"?L("nightmare"):L("corrupted"),e.race.fasting&&e.tech.dish_reset){let d=le();e.stats.endless_hunger.b5[d]=!0,d!=="m"&&d!=="l"&&(e.stats.endless_hunger.b5.l=!0)}x[e.race.species].type==="angelic"&&se("twisted"),e.race.junker&&e.race.species==="junker"&&se("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&se("garbage_pie"),e.race.cataclysm&&se("finish_line"),e.race.ooze&&e.race.species==="sludge"&&se("slime_lord");let a=ke("descend");e.prestige.Artifact.count+=a.artifact,e.stats.artifact+=a.artifact;let r=le();e.stats.spire.hasOwnProperty(r)&&(e.stats.spire[r].hasOwnProperty("lord")?e.stats.spire[r].lord++:e.stats.spire[r].lord=1,e.tech.dl_reset?e.stats.spire[r].dlstr=0:e.stats.spire[r].hasOwnProperty("dlstr")?e.stats.spire[r].dlstr++:e.stats.spire[r].dlstr=1);let i=e.race.species,s=e.race.gods,n=e.city.calendar.orbit,c=e.city.biome,o=e.city.ptrait,l=e.city.geology;e.stats.descend++,_a(),da();let u=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(K(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u&&(e.race.srace=u),wa({orbit:n,biome:c,ptrait:o,geology:l}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function $c(a){ta(),Ie("reset",{end:"terraform"});let r=e.race.species,i=e.race.gods,s=e.city.calendar.orbit,n=a.biome,c=a.traitlist,o=a.geology,l=ke("terraform");e.stats.terraform++,_a(),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)),c.forEach(function(p){Fe.hasOwnProperty(p)&&L(`atmo_${p}`)}),typeof e.tech.world_control>"u"&&L("cult_of_personality");let u=0;Object.keys(e.city.geology).forEach(function(p){e.city.geology[p]>0&&u++}),u>=4&&L("miners_dream"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),da();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:i,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function xc(){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"ai apocalypse"}),L(`extinct_${e.race.species}`),L("obsolete"),L("squished",!0),e.race.junker&&e.race.species==="junker"&&se("the_misery");let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("ai");da(),e.stats.aiappoc++,_a(),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.AICore.count+=o.cores,e.stats.cores+=o.cores;let l=x[a].type!=="synthetic"?a:e.race.hasOwnProperty("srace")?e.race.srace:a;e.stats.synth[l]=!0;let u=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:r,srace:l,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u>0&&(e.race.corruption=u),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function qc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"matrix"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("matrix");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("bluepill"),an(),da(),e.stats.matrix++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Pc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"retired"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("retired");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("retired"),an(),da(),e.stats.retire++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Mc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"eden"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("eden");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("adam_eve"),an(),da(),e.stats.eden++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function wa(a){e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:a.orbit},biome:a.biome,ptrait:a.ptrait},a.geology&&(e.city.geology=a.geology),e.tech={theology:1},Qs(),e.new=!0,e.seed=Math.rand(0,1e4)}function an(){let a=le();e.race.womling_friend?(a!=="m"&&e.stats.womling.friend.l++,a!=="l"&&(e.stats.womling.friend.hasOwnProperty(a)||(e.stats.womling.friend[a]=0),e.stats.womling.friend[a]++)):e.race.womling_lord?(a!=="m"&&e.stats.womling.lord.l++,a!=="l"&&(e.stats.womling.lord.hasOwnProperty(a)||(e.stats.womling.lord[a]=0),e.stats.womling.lord[a]++)):e.race.womling_god&&(a!=="m"&&e.stats.womling.god.l++,a!=="l"&&(e.stats.womling.god.hasOwnProperty(a)||(e.stats.womling.god[a]=0),e.stats.womling.god[a]++)),e.stats.womling.friend.l>0&&e.stats.womling.lord.l>0&&e.stats.womling.god.l>0&&L("overlord",a==="m",dt(),"l"),e.stats.womling.friend[a]>0&&e.stats.womling.lord[a]>0&&e.stats.womling.god[a]>0&&L("overlord",a==="m",dt(),a)}var on={spc_titan:{info:{name(){return S().titan},desc(){return t("space_titan_info_desc",[S().titan,x[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",[S().titan])},desc(){return t("space_mission_desc",[S().titan])},reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete(){return e.tech.titan>=1?0:1},cost:{Helium_3(a,r){return+ue(25e4,!1,r).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[S().titan])},action(){return _($(this)[0])?(I(t("space_titan_mission_action",[S().titan,x[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(a){return m("titan_spaceport",a,25e5,1.32)},Lumber(a){return m("titan_spaceport",a,75e4,1.32)},Cement(a){return m("titan_spaceport",a,35e4,1.32)},Mythril(a){return m("titan_spaceport",a,1e4,1.32)}},effect(){let a=e.resource.Water.display?`
${t("plus_max_resource",[Y(E(250)),e.resource.Water.name])}
`:"",r=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),S().enceladus])}
`:"",i=e.tech.titan&&e.tech.titan>=5?`
${t("space_titan_spaceport_storage",[25])}
`:"";return`${r}${a}${i}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 2},powered(){return N(10)},action(){return _($(this)[0])?(e.space.titan_spaceport.count++,z($(this)[0]),!0):!1},post(){e.tech.titan===1&&(e.tech.titan=2,pe())}},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(a){return m("electrolysis",a,1e6,1.25)},Copper(a){return m("electrolysis",a,185e3,1.25)},Steel(a){return m("electrolysis",a,22e4,1.25)},Polymer(a){return m("electrolysis",a,38e4,1.25)}},effect(a){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(a),S().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(a){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(a?e.space.ai_core2.on:G.ai_core2)?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return N(8)},action(){return _($(this)[0])?(e.space.electrolysis.count++,z($(this)[0]),!0):!1},post(){e.tech.titan===3&&(e.tech.titan=4,pe())}},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(a){return m("hydrogen_plant",a,15e5,1.28)},Iridium(a){return m("hydrogen_plant",a,292e3,1.28)},Stanene(a){return m("hydrogen_plant",a,599e3,1.28)},Cement(a){return m("hydrogen_plant",a,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 at(-22)},action(){return _($(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",[S().titan,e.resource.Food.name,e.resource.Water.name])}
`},reqs:{titan:4},path:["truepath"],cost:{Money(a){return m("titan_quarters",a,12e5,1.28)},Furs(a){return m("titan_quarters",a,85e3,1.28)},Plywood(a){return m("titan_quarters",a,1e5,1.28)},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=F(1);return`
${t("space_used_support",[S().titan])}
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().titan]):t("colonist")])}
${t("plus_max_resource",[a,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(_($(this)[0])){if(e.space.titan_quarters.count++,e.civic.titan_colonist.display=!0,z($(this)[0])){e.resource[e.race.species].max+=F(1);let a=F(1);e.civic.titan_colonist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.titan_colonist.workers+=r}return!0}return!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},titan_mine:{id:"space-titan_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[S().titan])}
`},reqs:{titan:4},condition(){return!!(e.space.titan_quarters&&e.space.titan_quarters.count>0)},path:["truepath"],cost:{Money(a){return m("titan_mine",a,475e3,1.28)},Lumber(a){return m("titan_mine",a,568e3,1.28)},Wrought_Iron(a){return m("titan_mine",a,25e4,1.28)}},effect(){let a=te("titan_mine","adamantite"),r=te("titan_mine","aluminium"),i=+a.toFixed(3),s=+r.toFixed(3);return`
${t("space_used_support",[S().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 _($(this)[0])?(e.space.titan_mine.count++,e.resource.Adamantite.display=!0,z($(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(a){return m("storehouse",a,175e3,1.28)},Lumber(a){return m("storehouse",a,1e5,1.28)},Aluminium(a){return m("storehouse",a,12e4,1.28)},Cement(a){return m("storehouse",a,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(a){return!!["Copper","Iron","Steel","Titanium","Iridium","Neutronium","Adamantite"].includes(a)},val(a){switch(a){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(a){let r='
',i=Lr("storehouse",!1,a),s=Lr("storehouse",!0,a);for(let n of $(this)[0].res())if(e.resource[n].display){let c=$(this)[0].heavy(n),o=Y(+(E($(this)[0].val(n))*(c?s:i)).toFixed(0),1);r=r+`${t("plus_max_resource",[o,e.resource[n].name])}`}return r=r+"
",r},action(){if(_($(this)[0])){e.space.storehouse.count++;let a=Lr("storehouse",!1),r=Lr("storehouse",!0);for(let i of $(this)[0].res())if(e.resource[i].display){let s=$(this)[0].heavy(i);e.resource[i].max+=E($(this)[0].val(i))*(s?r:a)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:t("city_bank"),desc(){return t("city_bank_desc",[S().titan])},reqs:{titan:6},path:["truepath"],cost:{Money(a){return m("titan_bank",a,25e5,1.32)},Titanium(a){return m("titan_bank",a,38e4,1.32)},Neutronium(a){return m("titan_bank",a,5e3,1.32)}},effect(){let a=ja()*2;return a=E(a),a=(+a.toFixed(0)).toLocaleString(),t("plus_max_resource",[`$${a}`,t("resource_Money_name")])},action(){return _($(this)[0])?(e.resource.Money.max+=E(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",[S().titan])}
`},reqs:{graphene:1},path:["truepath"],cost:{Money(a){return m("g_factory",a,95e4,1.28)},Copper(a){return m("g_factory",a,165e3,1.28)},Stone(a){return m("g_factory",a,22e4,1.28)},Adamantite(a){return m("g_factory",a,12500,1.28)}},effect(){let a=.05;return e.race.high_pop&&(a=+ve(a).toFixed(3)),`
${t("space_used_support",[S().titan])}
${t("space_red_mine_effect",[a,e.resource.Graphene.name])}
${t("interstellar_g_factory_effect")}
`},s_type:"titan",support(){return-1},powered(){return 0},special:!0,action(){return _($(this)[0])?(e.space.g_factory.count++,e.resource.Graphene.display=!0,z($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.space.g_factory.Oil++:e.space.g_factory.Lumber++),e.settings.showIndustry=!0,Pe(),!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(a){return m("sam",a,25e5,1.28)},Steel(a){return m("sam",a,45e4,1.28)},Elerium(a){return m("sam",a,120,1.28)},Brick(a){return m("sam",a,16e4,1.28)}},effect(){return`
${t("galaxy_defense_platform_effect",[25])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(e.space.sam.count++,z($(this)[0]),!0):!1},post(){C({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[S().titan,e.resource.Cipher.name])}
`},reqs:{titan:8},path:["truepath"],cost:{Money(a){return m("decoder",a,125e5,1.275)},Elerium(a){return m("decoder",a,750,1.275)},Orichalcum(a){return m("decoder",a,33e4,1.275)},Quantium(a){return m("decoder",a,18e4,1.275)}},effect(a){let r=$(this)[0].support_fuel().a,i=2500;e.race.high_pop&&(i=ve(i)),(a?e.space?.ai_core2?.on??0:G.ai_core2)&&(i*=1.25);let s=`
${t("space_used_support",[S().titan])}
`;return s+=`
${t("space_red_exotic_lab_effect1",[i])}
`,s+`
${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 _($(this)[0])?(e.space.decoder.count++,z($(this)[0]),!0):!1}},ai_core:{id:"space-ai_core",title:t("space_ai_core"),desc(a){return!e.space.hasOwnProperty("ai_core")||e.space.ai_core.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e5:0},Cement(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?18e4:0},Aluminium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e4:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?250:0},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?125e3:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?5e4:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?1e5:0},Cipher(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?750:0}},effect(a){let r=`
${t("space_ai_core_effect")}
`,i=(a?.count??0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}else return on.spc_titan.ai_core2.effect(a);return r},action(){return _($(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},z($(on.spc_titan.ai_core2)[0]),ut(),pe()),!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 N(100)},p_fuel(){return{r:"Water",a:1e3}},effect(a){let r=25,i=`
${t("interstellar_citadel_stat",[+pa(a).toFixed(1)])}
`;if(i+=`
${t("interstellar_citadel_effect",[r])}
${t("space_ai_core_effect2",[r])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(i+=`
${t("space_ai_core_effect3",[50])}
`),i+=`
${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 s=+zl(a).toFixed(1);i+=`
${t("space_ai_core_effect4",[s])}
`}return i},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(a){return m("ai_colonist",a,112e6,1.35)},Alloy(a){return m("ai_colonist",a,75e4,1.35)},Elerium(a){return m("ai_colonist",a,500,1.35)},Nano_Tube(a){return m("ai_colonist",a,525e3,1.35)},Quantium(a){return m("ai_colonist",a,15e4,1.35)},Cipher(a){return m("ai_colonist",a,1e4,1.35)}},effect(){return`
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[F(1),S().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(10)},action(){return _($(this)[0])?(e.space.ai_colonist.count++,z($(this)[0]),!0):!1},flair:t("tech_combat_droids_flair")}},spc_enceladus:{info:{name(){return S().enceladus},desc(){return t("space_enceladus_info_desc",[S().enceladus,x[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",[S().enceladus])},desc(){return t("space_mission_desc",[S().enceladus])},reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete(){return e.tech.enceladus>=1?0:1},cost:{Helium_3(a,r){return+ue(25e4,!1,r).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[S().enceladus])},action(){return _($(this)[0])?(I(t("space_enceladus_mission_action",[S().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",[S().enceladus])}
`},reqs:{enceladus:2},path:["truepath"],cost:{Money(a){return m("water_freighter",a,45e4,1.25)},Iron(a){return m("water_freighter",a,362e3,1.25)},Nano_Tube(a){return m("water_freighter",a,125e3,1.25)},Sheet_Metal(a){return m("water_freighter",a,75e3,1.25)}},effect(a){let r=+ue(5,!0,a).toFixed(2),i=+te("water_freighter").toFixed(2);return`
${t("space_used_support",[S().enceladus])}
${t("produce",[i,e.resource.Water.name])}
${t("space_belt_station_effect3",[r])}
`},s_type:"enceladus",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.water_freighter.count++,z($(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",[S().enceladus])}
`},reqs:{enceladus:3},path:["truepath"],cost:{Money(a){return m("zero_g_lab",a,5e6,1.25)},Alloy(a){return m("zero_g_lab",a,125e3,1.25)},Graphene(a){return m("zero_g_lab",a,225e3,1.25)},Stanene(a){return m("zero_g_lab",a,6e5,1.25)}},effect(){let a=Sa("spc_enceladus"),r=Math.round(1e4*a),i=`
${t("space_used_support",[S().enceladus])}
${t("city_max_knowledge",[r])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[F(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 N(12)},action(){return _($(this)[0])?(e.space.zero_g_lab.count++,z($(this)[0]),!0):!1},post(){Xe()},postPower(a){gi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[S().enceladus])}
`},reqs:{enceladus:4},path:["truepath"],cost:{Money(a){return m("operating_base",a,75e5,1.3)},Furs(a){return m("operating_base",a,5e5,1.3)},Adamantite(a){return m("operating_base",a,375e3,1.3)},Stanene(a){return m("operating_base",a,75e4,1.3)},Mythril(a){return m("operating_base",a,225e3,1.3)},Horseshoe(){return e.race.hooved?4:0}},effect(){let a=`
${t("space_used_support",[S().enceladus])}
`;if(a+=`
${t("galaxy_defense_platform_effect",[50])}
`,a+=t("plus_max_resource",[F(4),t("civics_garrison_soldiers")]),e.race.orbit_decayed){let r=e.tech.medic*5;a+=`
${t("city_hospital_effect",[r])}
`}return a+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return N(10)},action(){return _($(this)[0])?(e.space.operating_base.count++,z($(this)[0]),!0):!1},post(){C({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(a){return m("munitions_depot",a,5e6,1.22)},Iron(a){return m("munitions_depot",a,185e3,1.22)},Sheet_Metal(a){return m("munitions_depot",a,1e5,1.22)}},effect(){let a=25;return`
${t("plus_max_crates",[a])}
${t("plus_max_containers",[a])}
`},action(){return _($(this)[0])?(e.space.munitions_depot.count++,e.resource.Crates.max+=25,e.resource.Containers.max+=25,e.resource.Containers.display||sa(),!0):!1}}},spc_triton:{info:{name(){return S().triton},desc(){return t("space_triton_info_desc",[S().triton,x[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(a){e.tech.triton&&e.tech.triton>=3&&($(`#${a}`).append(`
${t("space_ground_resist")}
`),C({el:`#${a}resist`,data:e.space.fob,methods:{threat(r,i){let s=e.civic.garrison.wounded-gt();s<0&&(s=0);let n=+(r-Pt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[S().triton])},desc(){return t("space_mission_desc",[S().triton])},reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete(){return e.tech.triton>=1?0:1},cost:{Helium_3(a,r){return+ue(6e5,!1,r).toFixed(0)},Elerium(){return 2500}},effect(){return t("space_triton_mission_effect",[S().triton])},action(){return _($(this)[0])?(I(t("space_triton_mission_action",[S().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(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,25e7,1.1)},Copper(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,8e6,1.1)},Uranium(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,5e4,1.1)},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,25e5,1.1)},Graphene(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,3e6,1.1)},Sheet_Metal(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,75e5,1.1)},Quantium(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,5e5,1.1)},Horseshoe(a){return e.race.hooved&&(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)<1?10:0}},effect(a){let r=gt(),i=gt(!0),s=`
${t("galaxy_defense_platform_effect",[500])}
`;s+=t("plus_max_resource",[F(10),t("civics_garrison_soldiers")]),s+=`
${t("civics_garrison_soldiers")}: ${r} / ${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=+ue(125,!0,a).toFixed(2);return s+`
${t("requires_power_combo_effect",[$(this)[0].powered(),n,e.resource.Helium_3.name])}
`},powered(){return N(50)},action(){return e.space.fob.count<1&&_($(this)[0])?(e.space.fob.count++,z($(this)[0]),!0):!1},post(){e.tech.triton===2&&(e.tech.triton=3,pe(),ut(),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(a){return m("lander",a,24e5,1.15)},Aluminium(a){return m("lander",a,185e3,1.15)},Neutronium(a){return m("lander",a,1e4,1.15)},Nano_Tube(a){return m("lander",a,158e3,1.15)}},powered(){return 0},effect(a){let r=+ue(50,!0,a).toFixed(2),i="";return e.space.crashed_ship&&e.space.crashed_ship.count===100&&(i=`
${t("space_lander_effect3",[te("lander"),e.resource.Cipher.name])}
`),`
${t("space_lander_effect",[S().triton])}
${i}
${t("space_lander_effect2",[F(3)])}
${t("space_red_space_barracks_effect2",[r])}
`},action(){return _($(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 a=e.space.crashed_ship?e.space.crashed_ship.count:0;return`
${t("space_crashed_ship_effect",[a])}
`},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(a,r){return+ue(1e6,!1,r).toFixed(0)},Elerium(){return 1e3}},effect(){return t("space_kuiper_mission_effect")},action(){return _($(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(a){return m("orichalcum_mine",a,25e6,1.25)},Graphene(a){return m("orichalcum_mine",a,9e5,1.25)},Elerium(a){return m("orichalcum_mine",a,200,1.25)},Mythril(a){return m("orichalcum_mine",a,45e4,1.25)},Quantium(a){return m("orichalcum_mine",a,15e4,1.25)}},effect(a){let r=+te("orichalcum_mine").toFixed(3),i=+ue($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Orichalcum_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(10)},p_fuel(){return{r:"Oil",a:200}},action(){return _($(this)[0])?(e.space.orichalcum_mine.count++,e.resource.Orichalcum.display=!0,z($(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(a){return m("uranium_mine",a,5e6,1.25)},Iridium(a){return m("uranium_mine",a,25e4,1.25)},Steel(a){return m("uranium_mine",a,62e4,1.25)}},effect(a){let r=+te("uranium_mine").toFixed(3),i=+ue($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Uranium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(5)},p_fuel(){return{r:"Oil",a:60}},action(){return _($(this)[0])?(e.space.uranium_mine.count++,z($(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(a){return m("neutronium_mine",a,8e6,1.25)},Adamantite(a){return m("neutronium_mine",a,65e4,1.25)},Stanene(a){return m("neutronium_mine",a,125e4,1.25)}},effect(a){let r=+te("neutronium_mine").toFixed(3),i=+ue($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Neutronium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(8)},p_fuel(){return{r:"Oil",a:60}},action(){return _($(this)[0])?(e.space.neutronium_mine.count++,z($(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(a){return m("elerium_mine",a,2e7,1.25)},Titanium(a){return m("elerium_mine",a,25e4,1.25)},Neutronium(a){return m("elerium_mine",a,12e4,1.25)},Orichalcum(a){return m("elerium_mine",a,175e3,1.25)}},effect(a){let r=+te("elerium_mine").toFixed(3),i=+ue($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Elerium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(12)},p_fuel(){return{r:"Oil",a:125}},action(){return _($(this)[0])?(e.space.elerium_mine.count++,z($(this)[0]),!0):!1}}},spc_eris:{info:{name(){return S().eris},desc(){return t("space_eris_info_desc",[S().eris])},support:"drone_control",zone:"outer",syndicate(){return!!e.tech.eris},syndicate_cap(){return 7500},extra(a){e.tech.eris&&e.tech.eris===1&&($(`#${a}`).append(`
${t("space_scanned")} {{ eris_scan }}%
`),C({el:`#${a}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[S().eris])},desc(){return t("space_mission_desc",[S().eris])},reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete(){return e.tech.eris>=1?0:1},cost:{Helium_3(a,r){return+ue(125e4,!1,r).toFixed(0)},Elerium(){return 1250}},effect(){return t("space_eris_mission_effect",[S().eris])},action(){return _($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[S().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[S().titan])},desc(){return`
${t("space_drone_control",[S().titan])}
${t("requires_power_combo",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(a){return m("drone_control",a,75e6,1.3)},Neutronium(a){return m("drone_control",a,1e5,1.3)},Stanene(a){return m("drone_control",a,45e4,1.3)},Quantium(a){return m("drone_control",a,3e5,1.3)}},effect(){let a=$(this)[0].p_fuel().a;return`
+${t("galaxy_alien2_support",[$(this)[0].support(),S().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),a,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return N(25)},p_fuel(){return{r:"Uranium",a:5}},action(){return _($(this)[0])?(e.space.drone_control.count++,z($(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",[S().eris])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(a){return m("shock_trooper",a,425e4,1.225)},Polymer(a){return m("shock_trooper",a,375e3,1.225)},Adamantite(a){return m("shock_trooper",a,5e5,1.225)},Graphene(a){return m("shock_trooper",a,22e4,1.225)},Elerium(a){return m("shock_trooper",a,350,1.225)}},effect(){let a=Math.round(Pt(1,"army",0)*Sa("spc_eris")),r=`
${t("space_used_support",[S().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(r=`
${t("space_lander_effect3",[te("shock_trooper"),e.resource.Cipher.name])}
`),r+`
${t("space_digsite_offense",[a])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.shock_trooper.count++,z($(this)[0]),!0):!1}},tank:{id:"space-tank",title:t("space_tank_title"),desc(){return`
${t("space_tank_title")}
${t("space_support",[S().eris])}
`},reqs:{eris:4},path:["truepath"],cost:{Money(a){return m("tank",a,1e8,1.25)},Alloy(a){return m("tank",a,125e4,1.25)},Orichalcum(a){return m("tank",a,6e5,1.25)},Mythril(a){return m("tank",a,5e5,1.25)},Uranium(a){return m("tank",a,25e3,1.25)}},effect(){let a=Math.round(100*Sa("spc_eris")),r=`
${t("space_used_support",[S().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(r=`
${t("space_lander_effect3",[te("tank"),e.resource.Cipher.name])}
`),r+`
${t("space_digsite_offense",[a])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.tank.count++,z($(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 a=e.space.digsite?e.space.digsite.count:0;return`
${t("space_crashed_ship_effect",[a])}
`},action(){return!1}}}},be={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(a){return!e.tauceti.hasOwnProperty("ringworld")||e.tauceti.ringworld.count<1e3||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?1e7:1e8:0},Neutronium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e4:1e5:0},Nano_Tube(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?7e4:35e4:0},Adamantite(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e5:1e6:0},Bolognium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?17600:88e3:0},Orichalcum(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?25e3:125e3:0},Unobtainium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?360:1800:0},Quantium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?ra(e.race.lone_survivor?10100:101e3):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0);if(i<1e3){let s=1e3-i;r+=`
${t("tau_star_ringworld_effect")}
`,r+=`
${t("space_dwarf_collider_effect2",[s])}
`}else r+=`
${t("space_dwarf_reactor_effect1",[e.race.lone_survivor?100:1e4])}
`;return r},action(){return _($(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}),ia(),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(a){a?setTimeout(function(){e.tech.matrix=G.matrix?4:3,ia()},250):(e.tech.matrix=3,ia())},effect(){let a=Cc(),r=$(this)[0].powered(),i=r>0?`
${t("minus_power",[r])}
`:"";return`
${t("tau_star_matrix_effect")}
${a}${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 a=Cc();return`
${t("tau_star_blue_pill_effect")}
${a}`},action(){if(_($(this)[0])){let o=function(){r.fillStyle="#0001",r.fillRect(0,0,i,s),r.fillStyle="#0f0",r.font="15pt monospace",c.forEach((l,u)=>{let d=String.fromCharCode(Math.rand(65382,65438)),h=u*20;r.fillText(d,h,l),l>100+Math.random()*1e4?c[u]=0:c[u]=l+20})};$("body").append('');let a=document.getElementById("matrix"),r=a.getContext("2d"),i=a.width=document.body.offsetWidth,s=a.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);return setInterval(o,50),setTimeout(function(){qc()},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(a){return 1e6},Copper(a){return 1e7},Graphene(a){return 5e6},Stanene(a){return 8e6},Elerium(a){return 1e4}},effect(){let a=Cl();return`
${t("tau_star_goe_facility_effect")}
${a}`},action(){if(_($(this)[0])){let a=_t(be.tau_star.goe_facility);return Object.keys(a).forEach(function(r){e.resource[r].amount+=a[r]()}),Mc(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[x[e.race.species].home])},desc(){return t("tau_home",[x[e.race.species].home])},support:"orbital_station",extra(a){e.tech.tau_home&&e.tech.tau_home>=2&&!It()&&($(`#${a}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),C({el:`#${a}Mats`,data:e.resource.Materials,methods:{tauShow(){return!It()}},filters:{round(r){return+r.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[x[e.race.species].home])},desc(){return t("tau_new_mission_title",[x[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",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.colony={count:0,on:0},e.tauceti.mining_pit={count:0,on:0},I(t("tau_home_mission_result",[x[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 a="Explorer";if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let r=e.space.shipyard.ships.findIndex(i=>i.location==="tauceti"&&i.class==="explorer");r!==-1&&(a=e.space.shipyard.ships[r].name)}return t("tau_home_dismantle_effect",[a])},action(){let a=-1;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")&&(a=e.space.shipyard.ships.findIndex(r=>r.location==="tauceti"&&r.class==="explorer")),a>=0&&_($(this)[0])){if(e.space.shipyard.ships.splice(a,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,z($(be.tau_home.orbital_station)[0])){e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let r=$(be.tau_home.mining_pit)[0].workers();e.civic.pit_miner.max+=r;let i=Math.min(r,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&&yr(),!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(a){return m("orbital_station",a,8e7,1.3,"tauceti")},Materials(a){return It()?0:m("orbital_station",a,5e5,1.3,"tauceti")},Helium_3(a){return It()?m("orbital_station",a,_e(25e4),1.3,"tauceti"):0},Copper(a){return It()?m("orbital_station",a,125e4,1.3,"tauceti"):0},Adamantite(a){return It()?m("orbital_station",a,9e5,1.3,"tauceti"):0}},effect(){let a=E(15e3),r=+_e($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[x[e.race.species].home]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Helium_3.name])}
`,i=i+`
${t("spend_power",[r,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 N(e.tech.isolation?e.race.lone_survivor?4:6:30)},refresh:!0,action(){return _($(this)[0])?(e.tauceti.orbital_station.count++,z($(this)[0]),!0):!1}},colony:{id:"tauceti-colony",title:t("tau_home_colony"),desc(){return`
${t("tau_home_colony_desc",[x[e.race.species].home])}
${t("requires_power_support_combo",[x[e.race.species].home,e.resource.Food.name])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(a){return m("colony",a,1575e4,1.225,"tauceti")},Materials(a){return It()?0:m("colony",a,65e4,1.225,"tauceti")},Furs(a){return It()?m("colony",a,72e4,1.225,"tauceti"):0},Graphene(a){return It()?m("colony",a,485e3,1.225,"tauceti"):0},Brick(a){return It()?m("colony",a,ra(88e4),1.225,"tauceti"):0}},effect(){let a=$(this)[0].citizens(),r=e.tech.isolation?900:250,i=+$(this)[0].support_fuel().a.toFixed(1),s=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[a])}
`),e.tech.isolation){let n=ja()*25;n=E(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,x[e.race.species].home])}
`,e.tech.isolation){let n=J("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",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,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 _($(this)[0])?(e.tauceti.colony.count++,z($(this)[0]),e.resource.Containers.display||sa(),!0):!1},citizens(){let a=e.tech.isolation?8:5;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),e.race.lone_survivor?0:a}},tau_housing:{id:"tauceti-tau_housing",title(){return $e("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(a){return m("tau_housing",a,15e4,1.15,"tauceti")},Lumber(a){return e.race.kindling_kindred||e.race.smoldering?0:m("tau_housing",a,125e3,1.25,"tauceti")},Stone(a){return e.race.kindling_kindred?m("tau_housing",a,125e3,1.25,"tauceti"):0},Chrysotile(a){return e.race.smoldering?m("tau_housing",a,5e4,1.25,"tauceti"):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.tauceti.tau_housing.count++,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},captive_housing:ft("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(a){return m("pylon",a,50,1.48,"tauceti")},Stone(a){return m("pylon",a,100,1.42,"tauceti")},Crystal(a){return m("pylon",a,8,1.42,"tauceti")-3}},effect(){let a=E(2),r=+(.0125*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.tauceti.pylon.count++,e.resource.Mana.max+=E(2),!0):!1}},cloning_facility:{id:"tauceti-cloning_facility",title:t("tau_home_cloning"),desc(){return t("tau_home_cloning_desc",[x[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(a){return e.resource[e.race.species].amount?m("citizen",a,Math.round((e.race.high_pop?1e5:125e3)/F(1)),e.race.high_pop?1.01:1.02,"tauceti",e.race.high_pop?1.003:1.005):0},Copper(a){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?m("citizen",a,Math.round(50/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Aluminium(a){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?m("citizen",a,Math.round(50/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Nanite(a){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?m("citizen",a,Math.round(500/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0}},effect(){let a="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(a=`
${t("city_assembly_effect_warn")}
`),`
${t("tau_home_cloning_effect",[x[e.race.species].name])}
${a}`},action(){return e.resource[e.race.species].max>e.resource[e.race.species].amount&&_($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}},horseshoe:ft("horseshoe","tauceti"),bonfire:ft("bonfire","tauceti"),firework:ft("firework","tauceti"),assembly:ft("assembly","tauceti"),nanite_factory:ft("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(a){return m("tau_farm",a,135e6,1.25,"tauceti")},Stone(a){return m("tau_farm",a,921e4,1.25,"tauceti")},Steel(a){return m("tau_farm",a,6295e3,1.25,"tauceti")},Water(a){return m("tau_farm",a,1e4,1.25,"tauceti")}},effect(){let a=`
${t("space_red_spaceport_effect1",[t("tau_planet",[x[e.race.species].home]),$(this)[0].support()])}
`;if(a=a+`
${t("produce",[+te("tau_farm","food").toFixed(2),e.resource.Food.name])}
`,!e.race.kindling_kindred&&!e.race.smoldering&&(a=a+`
${t("produce",[+te("tau_farm","lumber").toFixed(2),e.resource.Lumber.name])}
`),e.tech.isolation){let r=+te("tau_farm","water").toFixed(2);if(a=a+`
${t("produce",[r,e.resource.Water.name])}
`,e.race.artifical){let i=E(350);a=a+`
${t("city_transmitter_effect",[i])}
`}}return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},support(){return 1},powered(){return N(e.tech.isolation?1:4)},action(){return _($(this)[0])?(e.tauceti.tau_farm.count++,z($(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",[x[e.race.species].home])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(a){return m("mining_pit",a,425e4,1.225,"tauceti")},Materials(a){return It()?0:m("mining_pit",a,35e4,1.225,"tauceti")},Lumber(a){return It()?m("mining_pit",a,235e4,1.225,"tauceti"):0},Iron(a){return It()?m("mining_pit",a,835e3,1.225,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(a=a+`
${t("plus_max_resource",[$(this)[0].workers(),t("job_pit_miner")])}
`,!It())a=a+`
${t("plus_max_resource",[1e6,t("resource_Materials_name")])}
`,a=a+`
${t("tau_home_mining_pit_effect",[e.resource.Materials.name])}
`;else if(e.tech.isolation){if(e.race.lone_survivor){let r=[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?(r.push(e.resource.Chrysotile.name),a=a+`
${t("tau_home_mining_pit_effect2cs",r)}
`):a=a+`
${t("tau_home_mining_pit_effect2c",r)}
`}else{let r=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Coal.name];e.race.smoldering?(r.push(e.resource.Chrysotile.name),a=a+`
${t("tau_home_mining_pit_effect2bs",r)}
`):a=a+`
${t("tau_home_mining_pit_effect2b",r)}
`}a=a+`
${t("tau_gas_womling_station_effect",[8,e.resource.Cement.name])}
`}else a=a+`
${t("tau_home_mining_pit_effect2",[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name])}
`;return a},s_type:"tau_home",support(){return-1},powered(){return 0},workers(){return F(e.tech.isolation?6:8)},action(){if(_($(this)[0])){if(e.tauceti.mining_pit.count++,z($(this)[0])){let a=$(this)[0].workers();e.civic.pit_miner.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.pit_miner.workers+=r}return!0}return!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(a){return 165e7},Materials(a){return 75e4}},effect(){return t("tau_home_excavate_effect")},action(){return _($(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 a=`
${t("plus_max_resource",["20%",t("resource_Knowledge_name")])}
`;return e.tech.isolation&&(a=a+`
${t("plus_max_resource",[(e.race.lone_survivor?35e5:65e5).toLocaleString(),t("resource_Knowledge_name")])}
`,a=a+`
${t("plus_max_resource",[2e5.toLocaleString(),e.resource.Cipher.name])}
`,a=a+`
${t("space_lander_effect3",[te("alien_outpost"),e.resource.Cipher.name])}
`),e.tech.outpost_boost&&(a=a+`
${t("tech_alien_outpost_effect2")}
`),e.race.lone_survivor&&(a=a+`
${t("city_wardenclyffe_effect1",[F(1),e.civic.professor.name])}
`),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(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(a){return!e.tauceti.hasOwnProperty("jump_gate")||e.tauceti.jump_gate.count<100||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?1e6:0},Materials(a){return(a||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?12500:0}},effect(a){let r=(a?.count??0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0);if(r<100){let i=100-r;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return _($(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(a){return m("fusion_generator",a,188e6,1.25,"tauceti")},Iridium(a){return m("fusion_generator",a,555e4,1.25,"tauceti")},Stanene(a){return m("fusion_generator",a,7003500,1.25,"tauceti")},Sheet_Metal(a){return m("fusion_generator",a,ra(95e3),1.25,"tauceti")}},effect(){let a=+_e($(this)[0].p_fuel().a).toFixed(1),r=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;return e.race.lone_survivor?r=r+`
${t("gain",[-a,e.resource[$(this)[0].p_fuel().r].name])}
`:r=r+`
${t("spend",[a,e.resource[$(this)[0].p_fuel().r].name])}
`,r},p_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?-15:75:500}},powered(){return at(-32)},action(){return _($(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(a){return m("repository",a,1028e4,1.28,"tauceti")},Iron(a){return m("repository",a,18e5,1.28,"tauceti")},Cement(a){return m("repository",a,15e5,1.28,"tauceti")},Neutronium(a){return m("repository",a,215e3,1.28,"tauceti")}},wide:!0,res(){let a=["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Crystal","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite","Unobtainium"];return e.tech.isolation&&(a.push("Oil"),a.push("Helium_3"),a.push("Uranium"),a.push("Water")),a},val(a){switch(a){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(a){let r='
',i=Lr("repository",!1,a),s=250;for(let n of $(this)[0].res())if(e.resource[n].display){let c=Y(+(E($(this)[0].val(n))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[c,e.resource[n].name])}`}return e.tech.isolation&&(r=r+`${t("plus_max_resource",[s,t("resource_Crates_name")])}${t("plus_max_resource",[s,t("resource_Containers_name")])}`),r=r+"
",r},action(){if(_($(this)[0])){e.tauceti.repository.count++;let a=250;e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=Lr("repository");for(let i of $(this)[0].res())e.resource[i].display&&(e.resource[i].max+=E($(this)[0].val(i))*r);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",[x[e.race.species].home])}
`},reqs:{tau_home:8},path:["truepath"],cost:{Money(a){return m("tau_factory",a,269e6,1.25,"tauceti")},Titanium(a){return m("tau_factory",a,3e6,1.25,"tauceti")},Elerium(a){return m("tau_factory",a,850,1.25,"tauceti")},Bolognium(a){return m("tau_factory",a,25e4,1.25,"tauceti")},Quantium(a){return m("tau_factory",a,ra(425e3),1.25,"tauceti")}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;return a=a+`
${t("tau_home_tau_factory_effect",[$(this)[0].manufacturing()])}
`,e.tech.isolation&&(e.race.flier||(a=a+`
${t("city_cement_plant_effect1",[F(2)])}
`),a=a+`
${t("space_red_fabrication_effect1",[F(5)])}
`),a=a+`
${t("city_crafted_mats",[e.tech.isolation?275:90])}
`,a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},special:!0,s_type:"tau_home",support(){return-1},powered(){return N(e.tech.isolation?2:5)},manufacturing(){return e.tech.isolation?5:3},action(){return _($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,z($(this)[0])&&(e.city.factory.Alloy+=$(this)[0].manufacturing(),Pe()),!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",[x[e.race.species].home])}
`},reqs:{disease:1},path:["truepath"],cost:{Money(a){return m("infectious_disease_lab",a,1e9,1.25,"tauceti")},Alloy(a){return m("infectious_disease_lab",a,325e5,1.25,"tauceti")},Polymer(a){return m("infectious_disease_lab",a,5e7,1.25,"tauceti")},Bolognium(a){return m("infectious_disease_lab",a,25e5,1.25,"tauceti")},Unobtainium(a){return m("infectious_disease_lab",a,64e3,1.25,"tauceti")}},effect(){let a=39616;if(e.tech.supercollider&&e.tech.isolation){let i=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/i+1}let r=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(r=r+`
${t("city_max_knowledge",[Math.round(a).toLocaleString()])}
`,e.tech.isolation){let i=E(375);r=r+`
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
`,r=r+`
${t("city_wardenclyffe_effect1",[F(2),e.civic.professor.name])}
`,r=r+`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`,r=r+`
${t("space_zero_g_lab_effect",[F(1)])}
`,r=r+`
${t("city_library_effect",[75])}
`}return e.tech.alien_crafting&&(r=r+`
${t("tau_gas_womling_station_effect",[65,e.resource.Quantium.name])}
`),e.tech.focus_cure&&(r=r+`
${t("tau_home_disease_lab_cure",[+e.tauceti.infectious_disease_lab.cure.toFixed(1)])}
`,e.race.hasOwnProperty("vax")&&(r=r+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`)),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},s_type:"tau_home",support(){return-1},powered(){return N(e.tech.isolation?e.race.lone_survivor?2:8:35)},action(){return _($(this)[0])?(e.tauceti.infectious_disease_lab.count++,z($(this)[0]),!0):!1},post(){e.tech.disease===1&&(e.tech.disease=2,I(t("tau_plague4",[t("tab_tauceti")]),"info",!1,["progress"]),pe()),Xe()},postPower(a){gi("Quantium")}},tauceti_casino:{id:"tauceti-tauceti_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money(a){return m("tauceti_casino",a,145e4,1.35,"tauceti")},Furs(a){return m("tauceti_casino",a,95e3,1.35,"tauceti")},Cement(a){return m("tauceti_casino",a,12e4,1.35,"tauceti")},Plywood(a){return m("tauceti_casino",a,ra(55e3),1.35,"tauceti")}},effect(){let a=$(this)[0].citizens(),r=e.race.lone_survivor?"":`
${t("plus_max_resource",[a,t("citizen")])}
`;return r=r+vi(),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return N(e.race.lone_survivor?1:2)},action(){return _($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(this)[0]),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),e.race.lone_survivor?0:a},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(a){return m("tau_cultural_center",a,9145e4,1.35,"tauceti")},Copper(a){return m("tau_cultural_center",a,585e4,1.35,"tauceti")},Coal(a){return m("tau_cultural_center",a,465e3,1.35,"tauceti")},Polymer(a){return m("tau_cultural_center",a,3792e3,1.35,"tauceti")}},effect(){let a=8,r=1;e.civic.govern.type==="corpocracy"?r=2:e.civic.govern.type==="socialist"&&(r=.8);let i=20*r,s=5*r,n=15*r,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",[a,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 N(1)},p_fuel(){return{r:"Food",a:e.race.lone_survivor?25:500}},action(){return _($(this)[0])?(e.tauceti.tau_cultural_center.count++,e.tauceti.tau_cultural_center.on++,!0):!1}}},tau_red:{info:{name(){return t("tau_planet",[S().red])},desc(){return t("tau_red",[S().red])},support:"orbital_platform",extra(a){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${a}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),C({el:`#${a}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[S().red])},desc(){return t("tau_new_mission_title",[S().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",[S().red])},action(){return _($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[S().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(a){return m("orbital_platform",a,5e7,1.3,"tauceti")},Oil(a){return It()?m("orbital_platform",a,_e(Ol(275e3)),1.3,"tauceti"):0},Aluminium(a){return m("orbital_platform",a,178e4,1.3,"tauceti")},Bolognium(a){return m("orbital_platform",a,45e4,1.3,"tauceti")}},effect(){let a=E(17500),r=+_e($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[S().red]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Oil.name])}
`,i=i+`
${t("spend_power",[r,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 a=e.tech.womling_logistics?2.5:2;return e.race.lone_survivor&&(a*=2),a},powered(){return N(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return It()&&_($(this)[0])?(e.tauceti.orbital_platform.count++,z($(this)[0]),e.tech.tau_red===1&&(e.tech.tau_red=2,I(t("tau_red_orbital_platform_msg",[t("tau_planet",[S().red]),t("tau_planet",[x[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 _($(this)[0])?(e.race.womling_friend=1,rn(),!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 _($(this)[0])?(e.race.womling_god=1,rn(),!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 _($(this)[0])?(e.race.womling_lord=1,rn(),!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 a=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 r=r+`
${t("tau_red_jeff_effect2",[e.tauceti.overseer?e.tauceti.overseer.working:0])}
`,r=r+`
${t("tau_red_jeff_effect3",[a])}
`,r=r+`
${t("tau_red_jeff_effect4",[e.tauceti.overseer?e.tauceti.overseer.loyal:0])}
`,r=r+`
${t("tau_red_jeff_effect5",[e.tauceti.overseer?e.tauceti.overseer.morale:0])}
`,e.tech.hasOwnProperty("womling_tech")&&(r=r+`
${t("tau_red_jeff_effect6",[e.tech.womling_tech])}
`),r=r+`
${t("job_farmer")}: ${e.tauceti.womling_farm?e.tauceti.womling_farm.farmers:0}
`,r=r+`
${t("job_miner")}: ${e.tauceti.womling_mine?e.tauceti.womling_mine.miners:0}
`,e.tauceti.womling_lab&&(r=r+`
${t("job_scientist")}: ${e.tauceti.womling_lab?e.tauceti.womling_lab.scientist:0}
`),r},action(){return!1}},overseer:{id:"tauceti-overseer",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[S().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(a){return m("overseer",a,6e6,1.28,"tauceti")},Cement(a){return m("overseer",a,245e4,1.28,"tauceti")},Alloy(a){return e.race.womling_friend?m("overseer",a,185e4,1.28,"tauceti"):0},Neutronium(a){return e.race.womling_lord?m("overseer",a,165e3,1.28,"tauceti"):0},Titanium(a){return e.race.womling_god?m("overseer",a,225e4,1.28,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return a=a+`
${t("tau_red_overseer_effect",[$(this)[0].val()])}
`,a},val(){let a=0;return e.race.womling_lord?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_god?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?6:5:e.race.womling_friend&&(a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?10:8),e.race.lone_survivor&&(a*=2),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.overseer.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_village",a,1e7,1.28,"tauceti")},Stone(a){return m("womling_village",a,225e4,1.28,"tauceti")},Plywood(a){return m("womling_village",a,ra(125e4),1.28,"tauceti")},Wrought_Iron(a){return m("womling_village",a,ra(4e5),1.28,"tauceti")}},effect(){let a=e.tech.womling_pop&&e.tech.womling_pop>=2?6:5,r=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return r=r+`
${t("tau_red_womling_village_effect",[a])}
`,e.tech.tau_junksale&&(r=r+`
${t("tau_red_womling_village_effect2",[40,t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`)])}
`),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_village.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_farm",a,24e6,1.28,"tauceti")},Iron(a){return m("womling_farm",a,95e5,1.28,"tauceti")},Water(a){return m("womling_farm",a,5e3,1.28,"tauceti")}},effect(){let a=e.tech.womling_pop?16:12;e.tech.womling_gene&&(a+=4);let r=e.tauceti.hasOwnProperty("womling_farm")?e.tauceti.womling_farm.farmers:0,i=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return i=i+`
${t("tau_red_womling_farm_effect",[a])}
`,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",[a/2*r])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_farm.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_mine",a,125e5,1.28,"tauceti")},Lumber(a){return m("womling_mine",a,128e5,1.28,"tauceti")},Steel(a){return m("womling_mine",a,45e5,1.28,"tauceti")}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return e.tech.isolation?e.race.lone_survivor?a=a+`
${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])}
`:a=a+`
${t("tau_red_womling_mine_effect_b",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name])}
`:a=a+`
${t("tau_red_womling_mine_effect_a",[e.resource.Unobtainium.name])}
`,a=a+`
${t("tau_red_womling_employ",[6])}
`,a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_mine.count++,e.resource.Unobtainium.display=!0,z($(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",[S().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(a){return m("womling_fun",a,38e5,1.28,"tauceti")},Food(a){return e.race.womling_friend?m("womling_fun",a,175e3,1.28,"tauceti"):0},Lumber(a){return m("womling_fun",a,5e5,1.28,"tauceti")},Stone(a){return m("womling_fun",a,5e5,1.28,"tauceti")},Furs(a){return e.race.womling_lord||e.race.womling_god?m("womling_fun",a,835e3,1.28,"tauceti"):0},Copper(a){return e.race.womling_lord?m("womling_fun",a,1125e3,1.28,"tauceti"):0},Alloy(a){return e.race.womling_god?m("womling_fun",a,656e3,1.28,"tauceti"):0},Water(a){return e.race.womling_friend?m("womling_fun",a,3500,1.28,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return a=a+`
${t("tau_red_womling_fun_effect",[$(this)[0].val()])}
`,a},val(){let a=0;return e.race.womling_lord?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?24:20:e.race.womling_god?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_friend&&(a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?18:15),e.race.lone_survivor&&(a*=2),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_fun.count++,z($(this)[0]),!0):!1}},womling_lab:{id:"tauceti-womling_lab",title:t("interstellar_laboratory_title"),desc(){return`
${t("interstellar_laboratory_title")}
${t("space_support",[S().red])}
`},reqs:{tau_red:7},path:["truepath"],cost:{Money(a){return m("womling_lab",a,65e6,1.28,"tauceti")},Elerium(a){return m("womling_lab",a,1200,1.28,"tauceti")},Orichalcum(a){return m("womling_lab",a,25e5,1.28,"tauceti")},Unobtainium(a){return m("womling_lab",a,1e4,1.28,"tauceti")},Quantium(a){return m("womling_lab",a,ra(95e3),1.28,"tauceti")}},effect(){let a=e.tauceti.hasOwnProperty("overseer")?e.tauceti.overseer.prod:100,r=Math.round(25e3*a/100),i=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return i=i+`
${t("tau_red_womling_lab_effect",[r])}
`,i=i+`
${t("tau_red_womling_employ_single",[1])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_lab.count++,z($(this)[0]),!0):!1}}},tau_gas:{info:{name(a,r){let i=r||"gas_name",s=i==="gas_name"?0:1;if(a||e.race[i])switch(a||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",[S().gas]);case 2:return t("tau_gas_title0a",[S().gas]);default:return t("tau_gas_title0b",[S().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",[x[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[x[e.race.old_gods].name]);default:return t("tau_gas_title3c",[x[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[S().gas]);case 2:return t("tau_gas_title4b",[We("reverse",S().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!!_($(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(a){return m("refueling_station",a,68e6,1.28,"tauceti")},Graphene(a){return m("refueling_station",a,25e5,1.28,"tauceti")},Unobtainium(a){return m("refueling_station",a,5500,1.28,"tauceti")},Mythril(a){return m("refueling_station",a,ra(6e4),1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:5)},effect(){let a=+te("refueling_station").toFixed(2),r=E(1e4),i=`
${t("space_gas_mining_effect1",[a])}
`;if(i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Helium_3.name])}
`,e.tech.tau_whale>=2){let s=E(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 _($(this)[0])?(e.tauceti.refueling_station.count++,z($(this)[0]),!0):!1},post(){e.tech.tau_gas===2&&(e.tech.tau_gas=3,pe())}},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(a){return m("ore_refinery",a,52e6,1.28,"tauceti")},Iridium(a){return m("ore_refinery",a,16e5,1.28,"tauceti")},Unobtainium(a){return m("ore_refinery",a,800,1.28,"tauceti")},Sheet_Metal(a){return m("ore_refinery",a,ra(118e3),1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:8)},smelting(){return e.tech.isolation?12:4},effect(){let a=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.fill:0,r=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.max:0,i=+te("ore_refinery").toFixed(2),s=`
${t("tau_gas_ore_refinery_effect",[+a.toFixed(2)])}
`;return s=s+`
${t("tau_gas_ore_refinery_effect2",[r])}
`,s=s+`
${t("tau_gas_ore_refinery_effect3",[i])}
`,s=s+`
${t("interstellar_stellar_forge_effect3",[$(this)[0].smelting()])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){if(_($(this)[0])){if(e.tauceti.ore_refinery.count++,z($(this)[0])){let a=$(this)[0].smelting();e.city.smelter.cap+=a,e.city.smelter.Steel+=a,e.race.evil?e.city.smelter.Wood+=a:e.city.smelter.Oil+=a}return!0}return!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,ia(),pe())}},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(a){return m("whaling_station",a,72e6,1.28,"tauceti")},Steel(a){return m("whaling_station",a,18e5,1.28,"tauceti")},Polymer(a){return m("whaling_station",a,955e3,1.28,"tauceti")},Orichalcum(a){return m("whaling_station",a,268e3,1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:6)},effect(){let a=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.fill:0,r=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.max:0,i=+te("whaling_station").toFixed(2),s=`
${t("tau_gas_whaling_station_effect",[+a.toFixed(2)])}
`;return s=s+`
${t("tau_gas_whaling_station_effect2",[r])}
`,s=s+`
${t("tau_gas_whaling_station_effect3",[i])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return _($(this)[0])?(e.tauceti.whaling_station.count++,z($(this)[0]),!0):!1},post(){e.tech.tau_whale===1&&(e.tech.tau_whale=2,ia())}},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(a){return m("womling_station",a,1334e5,1.26,"tauceti")},Furs(a){return m("womling_station",a,3805e3,1.26,"tauceti")},Aluminium(a){return m("womling_station",a,85e5,1.26,"tauceti")},Nano_Tube(a){return m("womling_station",a,909e3,1.26,"tauceti")}},powered(){return N(e.tech.isolation?3:6)},effect(){let a=e.tech.isolation?30:8;e.tech.womling_gene&&(a*=1.25);let r=`
${t("tau_gas_womling_station_effect",[a,be.tau_gas.info.name()])}
`;return e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[F(1)])}
`),r=r+`
${t("space_red_fabrication_effect1",[F(1)])}
`,r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},action(){return _($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.womling_station.count++,z($(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(a,r){return+_e(125e4,!1,r).toFixed(0)}},effect(){return t("tau_roid_mission_effect",[t("tau_roid_title")])},action(){return _($(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(a){return m("patrol_ship",a,45e6,1.25,"tauceti")},Adamantite(a){return m("patrol_ship",a,18e5,1.25,"tauceti")},Elerium(a){return m("patrol_ship",a,520,1.25,"tauceti")},Stanene(a){return m("patrol_ship",a,2675e3,1.25,"tauceti")},Bolognium(a){return m("patrol_ship",a,115e4,1.25,"tauceti")}},effect(){let a=+_e($(this)[0].support_fuel().a).toFixed(1),r=`
${t("tau_roid_patrol_ship_security",[$(this)[0].support()])}
`;return r=r+`
${t("tau_roid_patrol_ship_effect")}
`,r=r+`
${t("spend",[a,e.resource[$(this)[0].support_fuel().r].name])}
`,r},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?15:250}},support(){return 1},powered(){return 0},refresh:!0,action(){return _($(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(a){return m("mining_ship",a,28e6,1.28,"tauceti")},Uranium(a){return m("mining_ship",a,12500,1.28,"tauceti")},Titanium(a){return m("mining_ship",a,22e5,1.28,"tauceti")},Alloy(a){return m("mining_ship",a,175e4,1.28,"tauceti")}},effect(){let a=+_e($(this)[0].support_fuel().a).toFixed(1),r=+te("mining_ship").toFixed(2),i=`
${t("tau_roid_mining_ship_effect",[r])}
`;return i=i+`
${t("spend",[a,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 _($(this)[0])?(e.tauceti.mining_ship.count++,z($(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(a){return m("whaling_ship",a,35e6,1.28,"tauceti")},Aluminium(a){return m("whaling_ship",a,34e5,1.28,"tauceti")},Neutronium(a){return m("whaling_ship",a,168e3,1.28,"tauceti")},Nano_Tube(a){return m("whaling_ship",a,8e5,1.28,"tauceti")}},effect(){let a=+_e($(this)[0].support_fuel().a).toFixed(1),r=+te("whaling_ship").toFixed(2),i=`
${t("tau_roid_whaling_ship_effect",[r])}
`;return i=i+`
${t("spend",[a,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 _($(this)[0])?(e.tauceti.whaling_ship.count++,z($(this)[0]),!0):!1}}},tau_gas2:{info:{name(a){return be.tau_gas.info.name(a||e.race.gas_name2||!1,"gas_name2")},desc(){return t("tau_gas2_desc",[be.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!!_($(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",[be.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.alien_station={count:0},I(t("tau_gas2_alien_station_msg",[be.tau_gas2.info.name()]),"info",!1,["progress"]),!0):!1}},alien_station:{id:"tauceti-alien_station",title:t("tau_gas2_alien_station"),desc(a){return!e.tauceti.hasOwnProperty("alien_station")||e.tauceti.alien_station.count<100||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?12e6:5e7:0},Aluminium(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256e3:256e4:0},Polymer(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?198900:989e3:0},Mythril(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?ra(125e3):0},Cipher(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256:2001:0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0);return i<100?(r+=`
${t("tau_gas2_alien_station_repaired",[i])}
`,r):be.tau_gas2.alien_space_station.effect(a)},action(){return _($(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),ia()}},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 a=$(this)[0].p_fuel().a,r=`
${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),r=r+`
${t("tau_gas2_alien_station_effect",[s])}
`}return r=r+`
${t("spend",[a,e.resource[$(this)[0].p_fuel().r].name])}
`,r},p_fuel(){return{r:"Elerium",a:e.race.lone_survivor?1:10}},powered(){return at(-75)},action(){return!1}},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:t("tech_matrioshka_brain"),desc(a){return!e.tauceti.hasOwnProperty("matrioshka_brain")||e.tauceti.matrioshka_brain.count<1e3||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?2e7:0},Neutronium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?45e3:0},Nano_Tube(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?16e4:0},Adamantite(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?666e3:0},Stanene(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?61600:0},Bolognium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?44e3:0},Unobtainium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?1200:0},Mythril(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?ra(64e3):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0);return i<1e3&&(r+=`
${t("tau_gas2_matrioshka_brain_seg",[1e3-i])}
`),r},action(){return _($(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(a){return!e.tauceti.hasOwnProperty("ignition_device")||e.tauceti.ignition_device.count<10||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e7:0},Uranium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?5e4:0},Elerium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e3:0},Graphene(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?225e5:0},Orichalcum(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?15e6:0},Quantium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?ra(8e6):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0);return i<10&&(r+=`
${t("tau_gas2_ignition_device_seg",[10-i])}
`),r},action(){return _($(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",[be.tau_gas2.info.name()])},desc(){return t("tau_gas2_ignite_gas_giant",[be.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 a=`
${t("tau_gas2_ignite_gas_giant_effect",[t("tech_matrioshka_brain")])}
`;return e.tech.m_brain?(a=a+`
${t("tau_gas2_ignite_gas_giant_effect3")}
`,a+=Ml()):a=a+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,a},action(){return e.tech.m_brain&&_($(this)[0])?(Pc(),!0):!1}}}};for(let a=1;a<9;a++)be.tau_gas[`gas_contest-a${a}`]={id:`tauceti-gas_contest-a${a}`,title(){return be.tau_gas.info.name(a)},desc(){return be.tau_gas.info.name(a)},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(a===8?"tau_gas_contest_reject":"tau_gas_contest_pick",[be.tau_gas.info.name(a)])},action(){return _($(this)[0])?(e.race.gas_name=a,e.tauceti.refueling_station={count:0,on:0},!0):!1}},be.tau_gas2[`gas_contest-b${a}`]={id:`tauceti-gas_contest-b${a}`,title(){return be.tau_gas2.info.name(a)},desc(){return be.tau_gas2.info.name(a)},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(a===8?"tau_gas2_contest_reject":"tau_gas_contest_pick",[be.tau_gas2.info.name(a)])},action(){return _($(this)[0])?(e.race.gas_name2=a,!0):!1}};function Cc(){let a=ke("matrix"),r=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",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function Ml(){let a=ke("retired"),r=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",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function Cl(){let a=ke("eden"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
`}function rn(){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 Ol(a){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(a*=.94**e.tech.womling_tech),a}function ra(a){return e.tech.womling_tech&&e.tech.womling_recycling&&e.tech.womling_recycling>=1&&(a*=(e.tech.isolation?.97:.98)**e.tech.womling_tech),a}function Br(){return on}function Oc(){return be}function It(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function Sc(a,r,i){switch(a){case"tauceti":return Vt(be,r,i)}}function ia(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==6))return;let a=$("#tauceti");A(a),a.append($(`

${t("tab_tauceti")}

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

${s}

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

${s}

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

${s}

${n}
`);B(r,function(){return typeof be[r].info.desc=="string"?be[r].info.desc:be[r].info.desc()},{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(be[r]).forEach(function(c){if(c!=="info"&&Vt(be,r,c)){let o=be[r][c];Ut(o,"tauceti",c)}}),be[r].info.hasOwnProperty("extra")&&be[r].info.extra(r)}})}function ln(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(un(),Gr(),A($("#dwarfShipYard")),e.space.hasOwnProperty("shipyard")&&e.settings.showShipYard)){let a=$("#dwarfShipYard");e.space.shipyard.hasOwnProperty("blueprint")||(e.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:sn()});let r=$('
');a.append(r);let i=$('
');r.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")}
`),r.append('
');let s=$('
');r.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(l){let u="";n[l].forEach(function(d,h){u+=`${t(`outer_shipyard_${l}_${d}`)}`}),s.append(` +(()=>{var oe=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}},ge={},Ce={c:{},p:{}},mr={},G={},we={},Hs={},la={},Ri={},_i=0,dl=0,pl=0,Hi={t:0};function Vs(a){dl=a}function Us(a){pl=a}var At={},fr={},gr={view:"all"},di=["all","progress","queue","building_queue","research_queue","combat","spy","events","major_events","minor_events","achievements","hell"];Math.rand=function(a,r){return Math.floor(Math.random()*(r-a))+a};e.seed=2;e.warseed=2;function K(a,r,i){r=r||1,a=a||0,e[i?"warseed":"seed"]=(e[i?"warseed":"seed"]*9301+49297)%233280;let s=e[i?"warseed":"seed"]/233280;return a+s*(r-a)}{let a=oe.getItem("evolved")||!1;if(a){let r=JSON.parse(LZString.decompressFromUTF16(a));r?e=r:uc()}else uc()}function _c(a){e=a}e.version||(e.version="0.2.0");W(e.version)<2060&&Object.keys(e.resource).forEach(function(a){e.resource[a].crates&&(e.resource[a].crates=Math.ceil(e.resource[a].crates/5)),e.resource[a].containers&&(e.resource[a].containers=Math.ceil(e.resource[a].containers/5))});if(W(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}W(e.version)===2062&&e.civic.taxes!==void 0&&e.civic.taxes.tax_rate==2&&(e.civic.taxes.tax_rate=20);W(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}));W(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})));W(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});W(e.version)<4001&&e.city&&e.city.factory&&!e.city.factory.Nano&&(e.city.factory.Nano=0);W(e.version)<4003&&e.stats.achieve&&Object.keys(e.stats.achieve).forEach(function(a){e.stats.achieve[a]=1});W(e.version)<4010&&e.stats.achieve&&e.stats.achieve.doomed&&(e.stats.portals=1);W(e.version)<4028&&e.stats.achieve&&e.stats.achieve.genus_demonic&&(e.stats.achieve.biome_hellscape=e.stats.achieve.genus_demonic);if(W(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 a=0;a=3&&(e.tech.wind_plant=1,e.tech.hunting=2);let a=["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 r=0;r0){let a=1;e.race.no_trade&&a++,e.race.no_craft&&a++,e.race.no_crispr&&a++,e.race.weak_mastery&&a++,e.stats.achieve.cross={l:a,a}}W(e.version)<7e3&&(e.civic.govern||(e.civic.govern={type:"oligarchy",rev:0,fr:0}));if(W(e.version)<7004&&e.queue&&e.queue.queue)for(let a=0;a"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));W(e.version)<8e3&&e.settings&&e.settings.hasOwnProperty("tLabels")&&delete e.settings.tLabels;W(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)));W(e.version)<8017&&e.city.garrison&&(e.city.garrison.on=e.city.garrison.count);W(e.version)<9e3&&e.settings&&e.settings.showCity&&(e.settings.showCiv=e.settings.showCity);W(e.version)<9005&&e.race.hasOwnProperty("terrifying")&&e.tech.hasOwnProperty("gambling")&&!e.space.hasOwnProperty("spc_casino")&&(e.space.spc_casino={count:0,on:0});W(e.version)<9009&&e.genes.hasOwnProperty("ancients")&&e.genes.ancients>=3&&(e.genes.ancients===4?e.genes.ancients=5:e.race.Plasmid.count+=300);W(e.version)<9010&&(["species","gods","old_gods"].forEach(a=>{e.race[a]==="orge"&&(e.race[a]="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));W(e.version)<9014&&(["seraph","unicorn","custom"].forEach(a=>{e.race.species===a&&(a==="custom"&&e.hasOwnProperty("custom")&&e.custom.race0.genus==="angelic"||a!=="custom")&&(e.race.holy=1)}),e.hasOwnProperty("arpa")&&e.arpa.hasOwnProperty("sequence")&&(e.arpa.sequence.labs=0));W(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={}));W(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(W(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 a=0;a=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(a){e.tech.hasOwnProperty(a)&&(e.race.inflation+=e.tech[a]*10)}));W(e.version)<101012&&e.civic.garrison&&(e.civic.garrison.rate=0);if(W(e.version)<101014&&(e.hasOwnProperty("settings")&&e.settings.hasOwnProperty("msgFilters")&&Object.keys(e.settings.msgFilters).forEach(function(a){e.settings.msgFilters[a]={unlocked:!!e.settings.msgFilters[a],vis:!!e.settings.msgFilters[a],max:60,save:3}}),e.hasOwnProperty("lastMsg")&&e.lastMsg)){let a={};di.forEach(function(r){a[r]=[]}),e.lastMsg.forEach(function(r){r.t?r.t.forEach(function(i){a[i].push({m:r.m,c:r.c})}):a.all.push({m:r.m,c:r.c})}),e.lastMsg=a}W(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});W(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);W(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));W(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));W(e.version)<102005&&!e.stats.cores&&e.race.hasOwnProperty("AICore")&&(e.stats.cores=e.race.AICore.count);W(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}));W(e.version)<102007&&e.stats.hasOwnProperty("achieve")&&delete e.stats.achieve.extinct_sludge;W(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(W(e.version)<102015){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let a in e.race.governor.tasks)e.race.governor.tasks[a]==="asssemble"&&(e.race.governor.tasks[a]="assemble");e.settings&&e.settings.hasOwnProperty("restoreCheck")&&delete e.settings.restoreCheck}W(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(W(e.version)<102021&&e.hasOwnProperty("custom")&&!e.custom.hasOwnProperty("race0")){let a=e.race.hasOwnProperty("species")?e.race.species:"protoplasm";e.galaxy.hasOwnProperty("alien1")&&e.galaxy.alien1.id==="custom"&&(e.galaxy.alien1.id=a==="human"?"elven":"human"),e.galaxy.hasOwnProperty("alien2")&&e.galaxy.alien2.id==="custom"&&(e.galaxy.alien2.id=a==="orc"||e.galaxy.alien1.id==="orc"?"cath":"orc")}W(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(a){if(e.evolution.hasOwnProperty(a[0])&&e.evolution[a[0]].count>0)for(let[r,i]of Object.entries(a[1]))e.tech[r]=i;delete e.evolution[a[0]]}),e.evolution.mloaded=1,e.evolution.gmloaded=1));W(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(a){e.race.hasOwnProperty(a)&&(e.prestige[a]={count:e.race[a].count},delete e.race[a])}),["Artifact","Blood_Stone"].forEach(function(a){e.resource.hasOwnProperty(a)&&(e.prestige[a]={count:e.resource[a].amount},delete e.resource[a])}),!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(a){e.race.governor.config.trash.hasOwnProperty(a)&&typeof e.race.governor.config.trash[a]=="number"&&(e.race.governor.config.trash[a]={v:e.race.governor.config.trash[a],s:!0})}));W(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);W(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);W(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));W(e.version)<=103015&&e.portal.hasOwnProperty("harbour")&&(e.portal.harbor=e.portal.harbour,delete e.portal.harbour);e.version="1.3.15";delete e.revision;delete e.beta;e.hasOwnProperty("prestige")||(e.prestige={});["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(a){e.prestige.hasOwnProperty(a)||(e.prestige[a]={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(a){e.support.hasOwnProperty(a)||(e.support[a]=[])});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);dc(!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(a){e.settings.msgFilters[a]||(e.settings.msgFilters[a]={unlocked:!0,vis:!0,max:60,save:3})});di.forEach(function(a){e.lastMsg[a]||(e.lastMsg[a]=[]),e.settings.msgFilters[a]||(e.settings.msgFilters[a]={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 Ws(){["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(a){e.stats.hasOwnProperty(a)||(e.stats[a]=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}})}Ws();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 a=new Date;e.settings.hasOwnProperty("boring")&&!e.settings.boring&&a.getMonth()===11&&a.getDate()>=17&&(e.race.immoral=3)}if(e.hasOwnProperty("special")&&e.special.hasOwnProperty("gift")){let a=new Date(e.stats.start),r=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 uc(){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 tr={x10:!1,x25:!1,x100:!1,q:!1};function V(){let a=1;return e.settings.mKeys&&(tr.x10&&(a*=10),tr.x25&&(a*=25),tr.x100&&(a*=100)),a}function W(a){let r=a.split(".",3);return r[0]*=1e5,r[1]*=1e3,Number(r[0])+Number(r[1])+Number(r[2])}function Vi(){if($(window).width()>=1400&&$("#msgQueue:not(.right)")){let a=$("#buildQueue").detach();a.addClass("right"),a.removeClass("has-text-info");let r=$("#msgQueue").detach();r.addClass("right"),r.removeClass("has-text-info"),r.css("resize","none"),$("#queueColumn").addClass("is-one-quarter"),$("#queueColumn").append(a),$("#queueColumn").append(r),$("#mainColumn").removeClass("is-three-quarters"),$("#mainColumn").addClass("is-half")}else if($(window).width()<1400&&$("#msgQueue").hasClass("right")){let a=$("#buildQueue").detach();a.removeClass("right"),a.addClass("has-text-info");let r=$("#msgQueue").detach();r.removeClass("right"),r.addClass("has-text-info"),r.css("resize","vertical"),$("#queueColumn").removeClass("is-one-quarter"),$("#sideQueue").append(a),$("#sideQueue").append(r),$("#mainColumn").removeClass("is-half"),$("#mainColumn").addClass("is-three-quarters")}}var er={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 Y(a,r,i){let s=0,n="",c=a<0;return c&&(a*=-1),a<=9999?s=+a.toFixed(r):a<1e6?(n=er[e.settings.affix][0],s=i?+(a/1e3).toFixed(1):Math.floor(a/100)/10):a<1e9?(n=er[e.settings.affix][1],s=i?+(a/1e6).toFixed(1):Math.floor(a/1e4)/100):a<1e12?(n=er[e.settings.affix][2],s=i?+(a/1e9).toFixed(1):Math.floor(a/1e7)/100):a<1e15?(n=er[e.settings.affix][3],s=i?+(a/1e12).toFixed(1):Math.floor(a/1e10)/100):a<1e18?(n=er[e.settings.affix][4],s=i?+(a/1e15).toFixed(1):Math.floor(a/1e13)/100):a<1e21?(n=er[e.settings.affix][5],s=i?+(a/1e18).toFixed(1):Math.floor(a/1e16)/100):a<1e24?(n=er[e.settings.affix][6],s=i?+(a/1e21).toFixed(1):Math.floor(a/1e19)/100):(n=er[e.settings.affix][7],s=i?+(a/1e24).toFixed(1):Math.floor(a/1e22)/100),s>=100&&(s=+s.toFixed(1)),c&&(s*=-1),s+n}$(window).resize(function(){Vi()});function pi(a,r){var i=document.createElement("div"),s="speak-"+Date.now();i.setAttribute("id",s),i.setAttribute("aria-live",r||"polite"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout(function(){document.getElementById(s).innerHTML=a},100),window.setTimeout(function(){document.body.removeChild(document.getElementById(s))},1e3)}window.soft_reset=function(r){try{r=r&&r==="replicator"?"replicator":"soft",gtag("event","reset",{end:r})}catch{}r||ta();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,o=e.city.biome,l=e.city.ptrait,u=e.city.geology;e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:c},biome:o,ptrait:l,geology:u},e.tech.theology&&e.tech.theology>=1?e.tech={theology:1}:e.tech={},Qs(),e.new=!0,e.seed=Math.rand(0,1e4),e.warseed=Math.rand(0,1e4),e.stats.current=Date.now(),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()};var ce={w:!1,s:!1,mt:250},vr={};function ta(){di.forEach(function(a){a!=="achievements"&&(e.lastMsg[a]=[])})}function dc(a){let r={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(r).forEach(function(i){i==="base"?r[i].forEach(function(s){(!e.settings.hasOwnProperty(s)||a)&&(e.settings[s]=!1)}):(e.settings.hasOwnProperty(i)||(e.settings[i]={}),r[i].forEach(function(s){(!e.settings[i].hasOwnProperty(s)||a)&&(e.settings[i][s]=!1)}))}),["civTabs","govTabs","govTabs2","hellTabs","resTabs","spaceTabs","marketTabs","statsTabs"].forEach(function(i){(!e.settings.hasOwnProperty(i)||a)&&(e.settings[i]=0)})}function Qs(){ce.w&&ce.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(K(80,100)),mil:Math.floor(K(75,125)),eco:Math.floor(K(60,90)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov1:{unrest:0,hstl:Math.floor(K(0,20)),mil:Math.floor(K(125,175)),eco:Math.floor(K(80,120)),spy:0,esp:0,trn:0,sab:0,act:"none",occ:!1,anx:!1,buy:!1},gov2:{unrest:0,hstl:Math.floor(K(40,60)),mil:Math.floor(K(200,300)),eco:Math.floor(K(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,dc(!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,ce.w&&ce.w.terminate(),window.location.reload()};var Js;hl(e.settings.locale);function t(a,r){let i=Js[a];if(!i)return e.settings.expose&&(console.error(`string ${a} not found`),console.log(Js)),a;if(r)if(r instanceof Array){for(let c=0;c{r=s}),a!="en-US"){let s;try{$.getJSON(`strings/strings.${a}.json`,c=>{s=c})}catch(c){console.error(c,c.stack)}let n=r.length;s&&Object.assign(r,s),r.length!=n&&e.settings.expose&&console.error(`string.${a}.json has extra keys.`)}let i=oe.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=r.length;s&&Object.assign(r,s),r.length!=n&&e.settings.expose&&console.error("string pack has extra keys.")}$.ajaxSetup({async:!0}),Js=r}function ve(a){return e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),a}function jr(a){if(e.race.gravity_well&&e.race.teamster&&e.race.teamster>0){let r=Zs(),i=e.civic.teamster.workers>r?r:e.civic.teamster.workers;a*=i/r}return a}function te(a,r,i){switch(a){case"transmitter":return 2.5;case"oil_well":{let s=e.tech.oil>=4?.48:.4;e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),e.city.geology.Oil&&(s*=e.city.geology.Oil+1),e.city.biome==="desert"?s*=he.desert.vars()[1]:e.city.biome==="tundra"?s*=he.tundra.vars()[1]:e.city.biome==="taiga"&&(s*=he.taiga.vars()[2]);let n=J("dirty_jobs",2);return n&&(s*=1+n/100),s}case"iridium_mine":switch(r){case"iridium":{let s=.035;e.city.geology.Iridium&&(s*=e.city.geology.Iridium+1);let n=s,c=hi(3);return{b:n,g:c-1,f:n*c}}case"coal":return .55}case"helium_mine":{let s=.18,n=hi(3);return{b:s,g:n-1,f:s*n}}case"red_mine":switch(r){case"copper":{let s=ve(.25),n=hi(3);return{b:s,g:n-1,f:s*n}}case"titanium":{let s=ve(.02),n=hi(3);return{b:s,g:n-1,f:s*n}}case"stone":return ve(.75);case"asbestos":return ve(1.25);case"aluminium":return ve(.066)}case"biodome":switch(r){case"food":return ve(.25);case"cat_food":return 2;case"lumber":return ve(1.5)}case"gas_mining":return e.tech.helium?.65:.5;case"outpost":{let s={b:.025,d:0,n:0};if(e.tech.drone){let n=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?.12:.06;s.d=e.space.drone.count*n,s.n=s.b*(1+s.d)}else s.n=s.b;return r?s:s.n}case"oil_extractor":{let s=e.tech.oil>=4?.48:.4;return e.tech.oil>=7?s*=2:e.tech.oil>=5&&(s*=e.tech.oil>=6?1.75:1.25),s}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 n=.05*(G.ai_colonist?e.civic.titan_colonist.workers+F(G.ai_colonist):e.civic.titan_colonist.workers);return e.race.high_pop&&(n=ve(n)),n}}else return .6;case"harvester":switch(r){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 s=.18;return e.civic.govern.type==="corpocracy"&&(s*=e.tech.high_tech&&e.tech.high_tech>=16?1.4:1.3),e.civic.govern.type==="socialist"&&(s*=1.1),s}case"infernite_mine":return .5*Pa("gate",0,i).supress;case"water_freighter":return 1.25;case"titan_mine":switch(r){case"adamantite":return ve(.02)*(e.space.titan_mine?e.space.titan_mine.ratio:50)/100;case"aluminium":return ve(.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 s=0;switch(r){case"materials":{s=e.tech.isolation?.12:.09;break}case"bolognium":{s=e.tech.isolation?.0288:.0216;break}case"stone":{s=e.tech.isolation?.8:.6;break}case"adamantite":{s=e.tech.isolation?.448:.336;break}case"copper":{s=.58;break}case"coal":{s=.13;break}case"iron":{s=.74;break}case"aluminium":{s=.88;break}case"chrysotile":{s=1.44;break}}e.race.tough&&(s*=1+b.tough.vars()[0]/100);let n=X("ogre");return n>0&&(s*=1+b.tough.vars(1)[0]/100*n),e.tech.tau_pit_mining&&(s*=1.18),s}case"tau_farm":switch(r){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 s=1;switch(e.tech.womling_mining&&(s+=e.tech.womling_mining*.15),e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5&&(s*=1.1),e.tech.womling_gene&&(s*=1.25),r){case"unobtainium":return .0305*s;case"uranium":return .047*s;case"titanium":return .616*s;case"copper":return 1.191*s;case"iron":return 1.377*s;case"aluminium":return 1.544*s;case"neutronium":return .382*s;case"iridium":return .535*s}}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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=We("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)*s}return 0}case"mining_ship_ore":switch(r){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 s=1;return e.tauceti.patrol_ship.support>e.tauceti.patrol_ship.s_max&&(s=We("curve",e.tauceti.patrol_ship.s_max/e.tauceti.patrol_ship.support,1.4)),8*s}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===r&&e.race.psychicPowers.hasOwnProperty("boostTime")){let s=0;if(e.race.psychicPowers.boostTime>0&&(s+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(b.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.boost).toFixed(3)}return 1+s}return 1}case"psychic_cash":{if(e.tech.psychic&&e.race.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("cash")){let s=0;if(e.race.psychicPowers.cash>0&&(s+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let n=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;s+=+(b.psychic.vars()[3]/5e4*n*e.race.psychicPowers.channel.cash).toFixed(3)}return 1+s}return 1}}}function ye(a){switch(a){case"Physics":fc();break;case"Genetics":Ga();break;case"Monument":return mc();case"PhysicsTech":return re;case"GeneTech":return Qe;case"BloodTech":return Ae;case"Crispr":gc();break;case"Blood":tn();break}}var re={lhc:{title(){return xe("fool",2022)?t("arpa_projects_railway_title"):t("arpa_projects_lhc_title")},desc(){return xe("fool",2022)?t("arpa_projects_railway_desc"):t("arpa_projects_lhc_desc")},reqs:{high_tech:6},grant:"supercollider",effect(a){if(xe("fool",2022)&&!a)return re.railway.effect(!0);let r=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",[r]):t("arpa_projects_lhc_effect3",[r,e.race.orbit_decayed?t("space_home_satellite_title"):qt()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm2",[r]):t("arpa_projects_lhc_effect2",[r,e.race.orbit_decayed?t("space_home_satellite_title"):qt()]):e.race.cataclysm?t("arpa_projects_lhc_cataclysm1",[r]):e.tech.isolation?t("arpa_projects_lhc_iso1",[r,t("tech_infectious_disease_lab_alt")]):t("arpa_projects_lhc_effect1",[r,e.race.orbit_decayed?t("space_home_satellite_title"):qt()])},cost:{Money(a,r){return me("lhc",a,25e5,1.05,r)},Knowledge(a,r){return me("lhc",a,5e5,1.05,r)},Copper(a,r){return me("lhc",a,125e3,1.05,r)},Cement(a,r){return me("lhc",a,25e4,1.05,r)},Aluminium(a,r){return me("lhc",a,35e4,1.05,r)},Titanium(a,r){return me("lhc",a,5e4,1.05,r)},Polymer(a,r){return me("lhc",a,12e3,1.05,r)}}},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(a,r){return me("stock_exchange",a,3e6,1.06,r)},Plywood(a,r){return me("stock_exchange",a,25e3,1.06,r)},Brick(a,r){return me("stock_exchange",a,2e4,1.06,r)},Wrought_Iron(a,r){return me("stock_exchange",a,1e4,1.06,r)}}},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(a,r){return me("tp_depot",a,18e5,1.08,r)},Stone(a,r){return me("tp_depot",a,75e4,1.08,r)},Iron(a,r){return me("tp_depot",a,25e4,1.08,r)},Alloy(a,r){return me("tp_depot",a,3e4,1.08,r)}}},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(a){return me("launch_facility",a,2e6,1.1)},Knowledge(a){return me("launch_facility",a,5e5,1.1)},Cement(a){return me("launch_facility",a,15e4,1.1)},Oil(a){return me("launch_facility",a,2e4,1.1)},Sheet_Metal(a){return me("launch_facility",a,15e3,1.1)},Alloy(a){return me("launch_facility",a,25e3,1.1)}}},monument:{title(a){if(a)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 a=J("gaslighter",2),r=a?2-a:2;return t("arpa_projects_monument_effect1",[r])},cost:{Stone(a,r){return Fr("Stone",a,r)},Aluminium(a,r){return Fr("Aluminium",a,r)},Cement(a,r){return Fr("Cement",a,r)},Steel(a,r){return Fr("Steel",a,r)},Lumber(a,r){return Fr("Lumber",a,r)},Crystal(a,r){return Fr("Crystal",a,r)}}},railway:{title(){return xe("fool",2022)?t("arpa_projects_lhc_title"):t("arpa_projects_railway_title")},desc(){return xe("fool",2022)?t("arpa_projects_lhc_desc"):t("arpa_projects_railway_desc")},reqs:{high_tech:6,trade:3},grant:"railway",effect(a){if(xe("fool",2022)&&!a)return re.lhc.effect(!0);let r=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?(r+=e.space.gps?Math.floor(e.space.gps.count/3):0,t("arpa_projects_railway_cataclysm1",[r,i,3,1])):(r+=e.city.storage_yard?Math.floor(e.city.storage_yard.count/6):0,t("arpa_projects_railway_effect1",[r,i,6,1]))},cost:{Money(a,r){return me("railway",a,25e5,1.08,r)},Lumber(a,r){return me("railway",a,75e4,1.08,r)},Iron(a,r){return me("railway",a,3e5,1.08,r)},Steel(a,r){return me("railway",a,45e4,1.08,r)}}},roid_eject:{title(){return t("arpa_projects_roid_eject_title",[Xs()])},desc(){return t(e.tech.roid_eject<=10?"arpa_projects_roid_eject_desc":"arpa_projects_roid_eject_desc2",[Xs()])},reqs:{blackhole:6,gateway:3},grant:"roid_eject",effect(){let a=0,r=0;return e.tech.roid_eject&&(a+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12),r=.225*(e.tech.roid_eject+1)*(1+(e.tech.roid_eject+1)/12)-a),`
${t("arpa_projects_roid_eject_effect1")}
${t("arpa_projects_roid_eject_effect2",[+a.toFixed(3),+r.toFixed(3),Xs()])}
`},cost:{Money(a,r){return me("roid_eject",a,1875e4,1.075,r)},Deuterium(a,r){return me("roid_eject",a,375e3,1.075,r)},Bolognium(a,r){return me("roid_eject",a,15e3,1.075,r)}}},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(a,r){return me("nexus",a,5e6,1.12,r)},Crystal(a,r){return me("nexus",a,6e4,1.12,r)},Iridium(a,r){return me("nexus",a,35e3,1.12,r)}}},syphon:{title:t("arpa_syphon_title"),desc(){let a="";return e.tech.syphon&&e.tech.syphon>=0?a=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn2")}
`:a=`
${t("arpa_syphon_desc")}
${t("arpa_syphon_desc_warn1")}
`,e.race.witch_hunter&&(a+=`
${t("witch_hunter_suspicion")}
`),a},reqs:{veil:2},grant:"syphon",effect(){let a=+(.3333333333333333*fe("magic")).toFixed(3);if(e.tech.syphon&&e.tech.syphon>=60){let r=ke("vacuum"),i=t("resource_Plasmid_plural_name");return`
${t("arpa_syphon_effect_main",[a])}
${t("arpa_syphon_effect4")}
${t("arpa_syphon_effect_reward",[r.plasmid,r.phage,r.dark,i,80])}
`}else return e.tech.syphon&&e.tech.syphon>=40?`
${t("arpa_syphon_effect_main",[a])}
${t("arpa_syphon_effect3")}
`:e.tech.syphon&&e.tech.syphon>=20?`
${t("arpa_syphon_effect_main",[a])}
${t("arpa_syphon_effect2")}
`:`
${t("arpa_syphon_effect_main",[a])}
${t("arpa_syphon_effect1")}
`},cost:{Money(a,r){return me("syphon",a,75e5,1.025,r)},Mana(a,r){return me("syphon",a,5e3,1.025,r)},Crystal(a,r){return me("syphon",a,1e5,1.025,r)},Infernite(a,r){return me("syphon",a,1e4,1.025,r)}}}};function Xs(){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 Qe={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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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 ae("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 ae("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 ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("architect")},post(){ua(),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!!ae("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!!ae("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!!ae("civil_service")},post(){if(e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks"))for(let a=0;a<6;a++)e.race.governor.tasks.hasOwnProperty(`t${a}`)||(e.race.governor.tasks[`t${a}`]="none");Te()}},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!!ae("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!!ae("unlocked")},post(){mt(!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!!ae("universal")},post(){mt(!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!!ae("standard")},post(){mt(!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!!ae("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 ae("negotiator")?(e.genes.trader=1,Ys(),!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 ae("ancients")?(e.genes.ancients=1,le(),!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 ae("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!!ae("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!!ae("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!!ae("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 ae("transcendence")?(e.genes.transcendence=1,le(),!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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("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!!ae("essence_absorber")},post(){tn()}}},Ae={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!!Ct($(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!!Ct($(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(a){return((a||0)+(e.blood.lust||0))*15+15},Artifact(a){return((a||0)+(e.blood.lust||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.illuminate||0))*12+12},Artifact(a){return((a||0)+(e.blood.illuminate||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.greed||0))*16+16},Artifact(a){return((a||0)+(e.blood.greed||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.hoarder||0))*14+14},Artifact(a){return((a||0)+(e.blood.hoarder||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.artisan||0))*8+8},Artifact(a){return((a||0)+(e.blood.artisan||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.attract||0))*4+4},Artifact(a){return((a||0)+(e.blood.attract||0))%5===0?1:0}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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(a){return((a||0)+(e.blood.wrath||0))*2+2},Artifact(){return 1}},effect(){return`${t("arpa_blood_repeat")}`},action(){return!!Ct($(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!!Ct($(this)[0].cost)},post(){zr()}},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!!Ct($(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!!Ct($(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!!Ct($(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!!Ct($(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!!Ct($(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!!Ct($(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!!Ct($(this)[0].cost)}}};function ae(a){let r=!0,i=Qe[a].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 r=!1,!1}),r}function Ca(a,r,i){return a=kl(a,r,i),_t({cost:a},r,i)}function kl(a,r,i){let s=X("human");if(i&&i.creative||!i&&e.race.creative||!i&&s>0){var n={};return Object.keys(a).forEach(function(c){n[c]=function(){let o=a[c](r,i);return(i&&i.creative||!i&&e.race.creative)&&(o*=1-b.creative.vars()[1]/100),s>0&&(o*=1-b.creative.vars(1)[1]/100*s),o}}),n}return a}function me(a,r,i,s,n){var c=e.arpa[a]?e.arpa[a].rank:0;return(n&&n.creative||!n&&e.race.creative)&&a!=="syphon"&&(s-=b.creative.vars()[0]),r&&(c+=r),Math.round(s**c*i)}function fc(){if(e.tech.high_tech&&e.tech.high_tech>=6){let a=$("#arpaPhysics");A(a),Object.keys(re).forEach(function(r){ql(a,r)})}}function en(){let a=$("#geneticMinor")[0];if(a){let r=Sortable.get(a);r&&r.destroy()}}function $l(){let a=$("#geneticMinor")[0];a&&Sortable.create(a,{onEnd(r){let i=e.settings.mtorder;i.splice(r.newDraggableIndex,0,i.splice(r.oldDraggableIndex,1)[0]),e.settings.mtorder=i,Ga()}})}function Ga(){let a=$("#arpaGenetics");if(en(),A(a),!e.settings.arpa.genetics)return!1;if(e.tech.genetics>1){let r=$('
');a.append(r);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")}
`);r.append(s);let n=$(`{{ progress }}%`);r.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 o=$(``);if(r.append(o),e.tech.genetics>=5){let l=$(``);r.append(l)}if(e.tech.genetics>=6){let l=$(``);r.append(l)}if(e.tech.genetics>=7){let l=$(``);r.append(l)}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"),C({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(l){return t(e.race.artifical?"arpa_boost_artifical_label":"arpa_boost_label")+(l?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")},novo(){let l=V(),u=2e5;if(e.resource.Knowledge.amount>=u){let d=Math.floor(e.resource.Knowledge.amount/u),h=Math.min(l,d);e.resource.Knowledge.amount-=u*h,e.resource.Genes.amount+=h}},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(l){return t(e.race.artifical?"arpa_auto_compile_label":"arpa_auto_seq_label")+(l?e.arpa.sequence.boost?t("city_on"):t("city_off"):"")}},filters:{timer(l){if(e.arpa.sequence.on&&e.arpa.sequence.labs>0)return e.arpa.sequence.boost?lt(l/(e.arpa.sequence.labs*2)):lt(l/e.arpa.sequence.labs);{let u=Ze(14,12);return u.length>0?u:t("time_never")}}}}),B("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 r=$('
');$("#arpaGenetics").append(r);let i=$('
');r.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(v){b[v]&&b[v].type==="minor"&&(e.settings.mtorder.includes(v)||e.settings.mtorder.push(v))}),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(v){(b[v]&&b[v].type==="minor"||v==="mastery"||v==="fortify")&&(v!=="fortify"||e.tech.decay&&e.tech.decay>=2)&&(!["promiscuous","content","resilient","industrious","tactical","fibroblast"].includes(v)&&e.race.lone_survivor||!e.race.lone_survivor)&&(s=!0,xl(i,v),n.push(v))}),r.append(`
${t("arpa_race_genetic_traids",[We("name")])}
`);let c=Tt("name"),o=[],l=[],u=$('
');r.append(u);let d=Be(e.race);xe("fool",2023)&&(d.hooved=1),Object.keys(d).forEach(function(v){if(b[v]&&b[v].type!=="minor"&&b[v].type!=="special"&&v!=="evil"&&v!=="soul_eater"&&v!=="artifical"){let k=!1;if(e.race.ss_traits&&e.race.ss_traits.includes(v)||e.race.iTraits&&e.race.iTraits.hasOwnProperty(v)||e.race.species==="sludge"&&(v==="ooze"||e.race.modified)?k=!0:e.race.hasOwnProperty(v)||(k=!0),!k&&(b[v].type==="major"&&e.genes.mutation||b[v].type==="genus"&&e.genes.mutation&&e.genes.mutation>=2)){let P=$('
'),j=$(`${t("arpa_remove_button")}`);o.push(v),P.append(j),P.append($(`${c[v]?c[v]:b[v].name} (${t("arpa_genepool_rank",[d[v]])})`)),u.append(P)}else l.push(v),u.append(`
${c[v]?c[v]:b[v].name} (${t("arpa_genepool_rank",[d[v]])})
`)}});let h=[];if(e.genes.mutation&&e.genes.mutation>=3&&(e.race.species!=="sludge"||!e.race.modified)){r.append(`
${t("arpa_race_genetic_gain")}
`);let v=["dumb","smart"];Object.keys(x).forEach(function(P){P!=="junker"&&P!=="sludge"&&P!=="custom"&&x[P].type===x[e.race.species].type&&Object.keys(x[P].traits).forEach(function(j){if(!e.race[j]&&j!=="soul_eater"){let D=v.indexOf(j);if(D===-1)h.push(j);else{let U=!1;switch(D%2){case 0:e.race[v[D+1]]&&(U=!0);break;case 1:e.race[v[D-1]]&&(U=!0);break}U||h.push(j)}}})});let k=$('
');r.append(k);for(let P=0;P'),U=$(`${t("arpa_gain_button")}`);D.append(U),D.append($(`${c[j]?c[j]:b[j].name}`)),k.append(D)}}s&&r.prepend(`
${t("arpa_race_genetic_minor_traits",[We("name")])}
`);let p=function(v){let k=b[v].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1),t("arpa_remove",[Tt("name",v),k,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},f=function(v){let k=b[v].val*5;return(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1),t("arpa_gain",[Tt("name",v),k,e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name")])},g=function(v){let k=Ka(e.race.minor[v]?e.race.minor[v]+4:4);return v==="mastery"&&(k*=5),t("arpa_gene_buy",[Tt("name",v),Y(k),e.resource.Genes.name])},w=function(v){let k=Ka(e.genes.minor[v]?e.genes.minor[v]+4:4);return v==="mastery"&&(k*=2),t("arpa_phage_buy",[Tt("name",v),Y(k),t("resource_Phage_name")])};C({el:"#geneticBreakdown",data:{genes:e.genes,race:e.race},methods:{gene(v){let k=0,P=V(),j=!0,D=!1;for(;k=U?(e.resource.Genes.amount-=U,e.race.minor[v]?e.race.minor[v]++:e.race.minor[v]=1,e.race[v]?e.race[v]++:e.race[v]=1,D=!0):j=!1,k++}D&&(v==="mastery"&&mt(!0),Ga(),v==="persuasive"&&Ys())},phage(v){let k=0,P=V(),j=!0,D=!1;for(;k=U?(e.prestige.Phage.count-=U,e.genes.minor[v]?e.genes.minor[v]++:e.genes.minor[v]=1,e.race[v]?e.race[v]++:e.race[v]=1,D=!0):j=!1,k++}D&&(v==="mastery"&&mt(!0),Ga(),v==="persuasive"&&Ys())},purge(v){if(e.race.species==="sludge"&&(e.race.modified||v==="ooze"))return;let k=b[v].val*5;(e.race.species==="custom"||e.race.species==="sludge")&&(k*=10),k<0&&(k*=-1);let P=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";if(e.prestige[P].count>=k){e.prestige[P].count-=k;let j=e.race[v];delete e.race[v],e.race.modified?e.race.modified++:e.race.modified=1,Qi(v,j),Ga(),le(),Rt();let D=0;Object.keys(e.race).forEach(function(U){b[U]&&(b[U].type=="major"||b[U].type=="genus")&&U!=="evil"&&D++}),D===0&&se("blank_slate")}},gain(v){if(e.race.species==="sludge"&&e.race.modified)return;let k=b[v].val*5;e.race.species==="sludge"&&(k*=2),e.race.species==="custom"&&(k*=10),k<0&&(k*=-1);let P=e.race.universe==="antimatter"?"AntiPlasmid":"Plasmid";e.prestige[P].count>=k&&(e.prestige[P].count-=k,e.race[v]=1,e.race.modified?e.race.modified++:e.race.modified=1,Ar(v),Ga(),le(),Rt())},geneCost(v){return g(v)},phageCost(v){return w(v)},traitEffect(v){return t(`trait_${v}_effect`)},removeCost(v){return p(v)},addCost(v){return f(v)},genePurchasable(v){let k=Ka(e.race.minor[v]?e.race.minor[v]+4:4);return v==="mastery"&&(k*=5),e.resource.Genes.amount>=k},phagePurchasable(v){let k=Ka(e.genes.minor[v]?e.genes.minor[v]+4:4);return v==="mastery"&&(k*=2),e.prestige.Phage.count>=k}}}),n.forEach(function(v){B(`popGenetrait${v}`,function(){return g(v)},{elm:`#geneticBreakdown .t-${v} .gbuy`,classes:"has-background-light has-text-dark"}),e.prestige.Phage.count>0&&B(`popGenetrait${v}`,function(){return w(v)},{elm:`#geneticBreakdown .t-${v} .pbuy`,classes:"has-background-light has-text-dark"}),B(`popGenetrait${v}`,function(){return e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?`
${Tt("desc",v)}
${t(`trait_${v}_effect`)}
`:Tt("desc",v)},{elm:`#geneticBreakdown .t-${v} .name`,classes:"has-background-light has-text-dark"})}),o.forEach(function(v){B(`popRemoveBkdwn${v}`,function(){return p(v)},{elm:`#geneticBreakdown .remove${v}`,classes:"has-background-light has-text-dark"});let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{wide:!0,classes:"w30"})}),l.forEach(function(v){let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{elm:`#geneticBreakdown .trait${v}`,wide:!0,classes:"w30"})}),h.forEach(function(v){B(`popAddBkdwn${v}`,function(){return f(v)},{elm:`#geneticBreakdown .add${v}`,classes:"has-background-light has-text-dark"});let k=`raceTrait${v}`,P=$("
");Ma(P,v,{trank:e.race[v]}),B(k,P,{wide:!0,classes:"w30"})}),$l()}}function xl(a,r){let i=$(`
`),s=$(`${e.resource.Genes.name} (${e.race.minor[r]||0})`);if(i.append(s),e.prestige.Phage.count>0){let c=$(`${t("resource_Phage_name")} (${e.genes.minor[r]||0})`);i.append(c)}let n=e.race[r]>1?`(${e.race[r]}) `:"";i.append(`${n}${Tt("name",r)}`),a.append(i)}function gc(){(e.tech.genetics&&e.tech.genetics>3||e.sim)&&(A($("#arpaCrispr")),$("#arpaCrispr").append(`
${t("arpa_crispr_desc")}
`),$("#arpaCrispr").append('
'),ml())}function tn(){e.tech.b_stone&&e.tech.b_stone>=2&&(A($("#arpaBlood")),$("#arpaBlood").append(`
${t("arpa_blood_desc")}
`),$("#arpaBlood").append('
'),fl())}function ql(a,r){if(yl(r)){if(e.arpa[r]||(e.arpa[r]={complete:0,rank:0}),re[r].rank&&e.arpa[r].rank>=re[r].rank)return;let i=$(`
`);a.append(i);let s=typeof re[r].title=="string"?re[r].title:re[r].title(),n=$(`
${s}{{ rank | level }}
`);i.append(n);let c=$('
{{ complete }}%
');n.append(c);let o=$('
');i.append(o),o.append($(``)),o.append($(``)),o.append($(``)),o.append($(``)),o.append($(``)),C({el:`#arpa${r}`,data:e.arpa[r],methods:{queue(u){if(e.tech.queue){let h=V();for(let p=0;p0){if(e.settings.q_merge!=="merge_never"&&e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===f)e.queue.queue[e.queue.queue.length-1].q++;else{let v=typeof re[u].title=="string"?re[u].title:re[u].title();e.queue.queue.push({id:f,action:"arpa",type:u,label:v,cna:!1,time:0,q:1,qs:1,t_max:0})}Tr()}else break}}},build(u,d){Pl(u,d,!0)},srDesc(){return pi(typeof re[r].desc=="string"?re[r].desc:re[r].desc())},srLevel(){return pi(re[r].effect())},arpaProjectSRCosts(u,d){let h=u==="100"?100-e.arpa[d].complete:u;var p=`Construct ${h}%. Costs:`,f=Ca(re[d].cost);return Object.keys(f).forEach(function(g){var w=+(f[g]()*(h/100)).toFixed(0);if(w>0){var v=g==="Money"?"$":e.resource[g].name+": ",k=e.resource[g].amount>=w?"":` ${t("insufficient")} ${e.resource[g].name}.`;p=p+` ${v} ${Y(w,2)}.${k}`}}),p}},filters:{remain(u){return 100-u},level(u){return t("arpa_level",[u])}}}),B(`popArpa${r}`,function(){return re[r].desc},{elm:`#arpa${r} .head .desc`,classes:"has-background-light has-text-dark"}),B(`popArpa${r}`,function(){return re[r].effect()},{elm:`#arpa${r} .head .rank`,classes:"has-background-light has-text-dark"});let l=[1,10,25,100];for(let u=0;u=100&&(e.arpa[a].rank++,e.arpa[a].complete=0,e.tech[re[a].grant]=e.arpa[a].rank,n=!0,a==="monument"&&(e.arpa.m_type=mc(),$(`#arpa${a} .head .desc`).html(re[a].title()),ba(!1,["arpamonument"])),a==="roid_eject"&&($(`#arpa${a} .head .desc`).html(re[a].title()),ba(!1,["arparoid_eject"])),a==="launch_facility"&&(e.settings.showSpace=!0,e.tech.space=1,ie("popArpalaunch_facility"),[1,10,25,100].forEach(function(o){ie(`popArpalaunch_facility${o}`)}),s||aa(["arpalaunch_facility"]),fc(),ut(),I(t("arpa_projects_launch_facility_msg"),"info",!1,["progress"])),e.race.inflation&&(e.race.inflation+=10),le()));if(i){let c=[1,10,25,100],o=$("#popper"),l=o.data("id");for(let u=0;u"),n=Ca(re[r].cost);let c=Ji(re[r],i/100,!1,!0);return Object.keys(n).forEach(function(o){var l=+(n[o]()*(i/100)).toFixed(0);if(l>0){var u=o==="Money"?"$":e.resource[o].name+": ",d=e.resource[o].amount>=l?"has-text-dark":o===c.r?"has-text-danger":"has-text-alert";s.append($(`
${u}${Y(l,2)}
`))}}),s}function Ys(){Object.keys(e.resource).forEach(function(a){C({el:`#market-${a}`},"update")}),C({el:"#galaxyTrade"},"update")}function vc(){if(!e.civic.mad.armed&&!e.race.cataclysm){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"mad"});let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("mad");e.stats.mad++,_a(),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),L("apocalypse"),L("squished",!0),L(`extinct_${a}`),e.civic.govern.type==="anarchy"&&L("anarchist"),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("take_no_advice"),e.race.truepath&&L("ashanddust"),da();let l=e.race.hasOwnProperty("srace")?e.race.srace:!1,u=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:r,rapid_mutation:1,ancient_ruins:1,universe:e.race.universe,seeded:!1,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u>0&&(e.race.corruption=u),l&&(e.race.srace=l),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}}function yc(){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"bioseed"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=ke("bioseed");e.stats.bioseed++,_a(),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),L("seeder"),L(`biome_${n}`),c.forEach(function(g){Fe.hasOwnProperty(g)&&L(`atmo_${g}`)}),L(`genus_${i}`),e.race.gravity_well&&L("escape_velocity"),e.race.truepath&&L("exodus"),c.includes("dense")&&e.race.universe==="heavy"&&L("double_density"),e.race.junker&&e.race.species==="junker"&&se("organ_harvester"),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("ill_advised"),typeof e.tech.world_control>"u"&&L("cult_of_personality"),e.race.cataclysm&&L("iron_will",!1,5),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross");let l=0,u=0;switch(Object.keys(e.city.geology).forEach(function(g){e.city.geology[g]>0?l++:e.city.geology[g]<0&&u++}),l>=4&&L("miners_dream"),u>=3&&se("rocky_road"),e.race.steelen&&e.race.steelen>=1&&L("steelen"),e.race.universe){case"micro":e.race.small||e.race.compact?L("macro",!0):L("marble",!0);break;default:break}da();let d=e.race.hasOwnProperty("srace")?e.race.srace:!1,h=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0,p=e.starDock.probes.count+1,f=e.starDock.hasOwnProperty("geck")?e.starDock.geck.count:0;e.stats.achieve.explorer&&(p+=e.stats.achieve.explorer.l),e.race={species:"protoplasm",gods:a,old_gods:r,universe:e.race.universe,seeded:!0,probes:p,geck:f,seed:Math.floor(K(1e4)),ascended:!1},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),wa({orbit:s,biome:n,ptrait:c,geology:!1}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function bc(){if(e.city.ptrait.includes("unstable")&&e.tech.quaked){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),Ie("reset",{end:"cataclysm"}),ta();let a=ke("cataclysm");e.stats.cataclysm++,_a(),e.prestige.Phage.count+=a.phage,e.stats.phage+=a.phage,e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=a.plasmid,e.stats.antiplasmid+=a.plasmid):(e.prestige.Plasmid.count+=a.plasmid,e.stats.plasmid+=a.plasmid),L("squished",!0),L(`extinct_${e.race.species}`),e.city.biome==="hellscape"&&x[e.race.species].type!=="demonic"&&se("take_no_advice"),da(),L("shaken"),e.race.cataclysm&&L("failed_history");let r=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),r&&(e.race.srace=r),wa({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:a,old_gods:r,universe:"bigbang",seeded:!0,bigbang:!0,probes:4,seed:Math.floor(K(1e4)),ascended:!1},l>0&&(e.race.corruption=l),o&&(e.race.srace=o),wa({orbit:i,biome:s,ptrait:n,geology:!1}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function kc(){ta(),Ie("reset",{end:"ascend"});let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("ascend");e.stats.ascend++,_a(),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)),n.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),typeof e.tech.world_control>"u"&&L("cult_of_personality");let l=0;Object.keys(e.city.geology).forEach(function(h){e.city.geology[h]>0&&l++}),l>=4&&L("miners_dream"),(!e.galaxy.hasOwnProperty("dreadnought")||e.galaxy.dreadnought.count===0)&&L("dreaded"),!e.race.modified&&(e.race.species==="synth"||e.race.species==="nano")&&e.race.emfield&&se("digital_ascension"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),da();let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:!0},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),Object.keys(c).forEach(function(h){c[h]+=.02}),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function mi(){if(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"descension"}),L("squished",!0),L(`extinct_${e.race.species}`),e.race.witch_hunter&&e.tech.forbidden>=5&&e.race.universe==="magic"?L("nightmare"):L("corrupted"),e.race.fasting&&e.tech.dish_reset){let d=ue();e.stats.endless_hunger.b5[d]=!0,d!=="m"&&d!=="l"&&(e.stats.endless_hunger.b5.l=!0)}x[e.race.species].type==="angelic"&&se("twisted"),e.race.junker&&e.race.species==="junker"&&se("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&se("garbage_pie"),e.race.cataclysm&&se("finish_line"),e.race.ooze&&e.race.species==="sludge"&&se("slime_lord");let a=ke("descend");e.prestige.Artifact.count+=a.artifact,e.stats.artifact+=a.artifact;let r=ue();e.stats.spire.hasOwnProperty(r)&&(e.stats.spire[r].hasOwnProperty("lord")?e.stats.spire[r].lord++:e.stats.spire[r].lord=1,e.tech.dl_reset?e.stats.spire[r].dlstr=0:e.stats.spire[r].hasOwnProperty("dlstr")?e.stats.spire[r].dlstr++:e.stats.spire[r].dlstr=1);let i=e.race.species,s=e.race.gods,n=e.city.calendar.orbit,c=e.city.biome,o=e.city.ptrait,l=e.city.geology;e.stats.descend++,_a(),da();let u=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(K(1e4)),corruption:5,ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u&&(e.race.srace=u),wa({orbit:n,biome:c,ptrait:o,geology:l}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function $c(a){ta(),Ie("reset",{end:"terraform"});let r=e.race.species,i=e.race.gods,s=e.city.calendar.orbit,n=a.biome,c=a.traitlist,o=a.geology,l=ke("terraform");e.stats.terraform++,_a(),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)),c.forEach(function(p){Fe.hasOwnProperty(p)&&L(`atmo_${p}`)}),typeof e.tech.world_control>"u"&&L("cult_of_personality");let u=0;Object.keys(e.city.geology).forEach(function(p){e.city.geology[p]>0&&u++}),u>=4&&L("miners_dream"),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),da();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:i,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1,rejuvenated:!0},h>0&&(e.race.corruption=h),d&&(e.race.srace=d),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function xc(){e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"ai apocalypse"}),L(`extinct_${e.race.species}`),L("obsolete"),L("squished",!0),e.race.junker&&e.race.species==="junker"&&se("the_misery");let a=e.race.species,r=e.race.gods,i=e.city.calendar.orbit,s=e.city.biome,n=e.city.ptrait,c=e.city.geology,o=ke("ai");da(),e.stats.aiappoc++,_a(),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.AICore.count+=o.cores,e.stats.cores+=o.cores;let l=x[a].type!=="synthetic"?a:e.race.hasOwnProperty("srace")?e.race.srace:a;e.stats.synth[l]=!0;let u=e.race.hasOwnProperty("corruption")&&e.race.corruption>1?e.race.corruption-1:0;e.race={species:"protoplasm",gods:a,old_gods:r,srace:l,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},u>0&&(e.race.corruption=u),wa({orbit:i,biome:s,ptrait:n,geology:c}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function qc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"matrix"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("matrix");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("bluepill"),an(),da(),e.stats.matrix++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Pc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"retired"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("retired");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("retired"),an(),da(),e.stats.retire++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function Mc(){ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),ta(),Ie("reset",{end:"eden"});let a=e.race.species,r=e.race.gods,i=x[a].type,s=e.city.calendar.orbit,n=e.city.biome,c=e.city.ptrait,o=e.city.geology,l=ke("eden");L(`biome_${n}`),c.forEach(function(h){Fe.hasOwnProperty(h)&&L(`atmo_${h}`)}),L(`genus_${i}`),e.race.gross_enabled&&e.race.ooze&&e.race.species!=="custom"&&e.race.species!=="sludge"&&L("gross"),L("adam_eve"),an(),da(),e.stats.eden++,_a(),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.Phage.count+=l.phage,e.stats.phage+=l.phage,e.prestige.AICore.count+=l.cores,e.stats.cores+=l.cores;let u=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:a,old_gods:r,universe:e.race.universe,seeded:!1,seed:Math.floor(K(1e4)),ascended:e.race.hasOwnProperty("ascended")?e.race.ascended:!1},d>0&&(e.race.corruption=d),u&&(e.race.srace=u),wa({orbit:s,biome:n,ptrait:c,geology:o}),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),window.location.reload()}function wa(a){e.city={calendar:{day:0,year:0,weather:2,temp:1,moon:0,wind:0,orbit:a.orbit},biome:a.biome,ptrait:a.ptrait},a.geology&&(e.city.geology=a.geology),e.tech={theology:1},Qs(),e.new=!0,e.seed=Math.rand(0,1e4)}function an(){let a=ue();e.race.womling_friend?(a!=="m"&&e.stats.womling.friend.l++,a!=="l"&&(e.stats.womling.friend.hasOwnProperty(a)||(e.stats.womling.friend[a]=0),e.stats.womling.friend[a]++)):e.race.womling_lord?(a!=="m"&&e.stats.womling.lord.l++,a!=="l"&&(e.stats.womling.lord.hasOwnProperty(a)||(e.stats.womling.lord[a]=0),e.stats.womling.lord[a]++)):e.race.womling_god&&(a!=="m"&&e.stats.womling.god.l++,a!=="l"&&(e.stats.womling.god.hasOwnProperty(a)||(e.stats.womling.god[a]=0),e.stats.womling.god[a]++)),e.stats.womling.friend.l>0&&e.stats.womling.lord.l>0&&e.stats.womling.god.l>0&&L("overlord",a==="m",dt(),"l"),e.stats.womling.friend[a]>0&&e.stats.womling.lord[a]>0&&e.stats.womling.god[a]>0&&L("overlord",a==="m",dt(),a)}var on={spc_titan:{info:{name(){return S().titan},desc(){return t("space_titan_info_desc",[S().titan,x[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",[S().titan])},desc(){return t("space_mission_desc",[S().titan])},reqs:{outer:1},grant:["titan",1],path:["truepath"],queue_complete(){return e.tech.titan>=1?0:1},cost:{Helium_3(a,r){return+_e(25e4,!1,r).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[S().titan])},action(){return _($(this)[0])?(I(t("space_titan_mission_action",[S().titan,x[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(a){return m("titan_spaceport",a,25e5,1.32)},Lumber(a){return m("titan_spaceport",a,75e4,1.32)},Cement(a){return m("titan_spaceport",a,35e4,1.32)},Mythril(a){return m("titan_spaceport",a,1e4,1.32)}},effect(){let a=e.resource.Water.display?`
${t("plus_max_resource",[Y(E(250)),e.resource.Water.name])}
`:"",r=e.tech.enceladus&&e.tech.enceladus>=2?`
+${t("galaxy_alien2_support",[$(this)[0].support(),S().enceladus])}
`:"",i=e.tech.titan&&e.tech.titan>=5?`
${t("space_titan_spaceport_storage",[25])}
`:"";return`${r}${a}${i}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 2},powered(){return N(10)},action(){return _($(this)[0])?(e.space.titan_spaceport.count++,z($(this)[0]),!0):!1},post(){e.tech.titan===1&&(e.tech.titan=2,le())}},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(a){return m("electrolysis",a,1e6,1.25)},Copper(a){return m("electrolysis",a,185e3,1.25)},Steel(a){return m("electrolysis",a,22e4,1.25)},Polymer(a){return m("electrolysis",a,38e4,1.25)}},effect(a){return`${`
+${t("galaxy_alien2_support",[$(this)[0].support(a),S().titan])}
`}
${t("space_electrolysis_use",[$(this)[0].support_fuel().a,e.resource.Water.name,$(this)[0].powered()])}
`},support(a){return e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(a?e.space.ai_core2.on:G.ai_core2)?3:2},support_fuel(){return{r:"Water",a:35}},powered(){return N(8)},action(){return _($(this)[0])?(e.space.electrolysis.count++,z($(this)[0]),!0):!1},post(){e.tech.titan===3&&(e.tech.titan=4,le())}},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(a){return m("hydrogen_plant",a,15e5,1.28)},Iridium(a){return m("hydrogen_plant",a,292e3,1.28)},Stanene(a){return m("hydrogen_plant",a,599e3,1.28)},Cement(a){return m("hydrogen_plant",a,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 at(-22)},action(){return _($(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",[S().titan,e.resource.Food.name,e.resource.Water.name])}
`},reqs:{titan:4},path:["truepath"],cost:{Money(a){return m("titan_quarters",a,12e5,1.28)},Furs(a){return m("titan_quarters",a,85e3,1.28)},Plywood(a){return m("titan_quarters",a,1e5,1.28)},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=F(1);return`
${t("space_used_support",[S().titan])}
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().titan]):t("colonist")])}
${t("plus_max_resource",[a,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(_($(this)[0])){if(e.space.titan_quarters.count++,e.civic.titan_colonist.display=!0,z($(this)[0])){e.resource[e.race.species].max+=F(1);let a=F(1);e.civic.titan_colonist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.titan_colonist.workers+=r}return!0}return!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},titan_mine:{id:"space-titan_mine",title:t("space_red_mine_title"),desc(){return`
${t("space_red_mine_desc")}
${t("space_support",[S().titan])}
`},reqs:{titan:4},condition(){return!!(e.space.titan_quarters&&e.space.titan_quarters.count>0)},path:["truepath"],cost:{Money(a){return m("titan_mine",a,475e3,1.28)},Lumber(a){return m("titan_mine",a,568e3,1.28)},Wrought_Iron(a){return m("titan_mine",a,25e4,1.28)}},effect(){let a=te("titan_mine","adamantite"),r=te("titan_mine","aluminium"),i=+a.toFixed(3),s=+r.toFixed(3);return`
${t("space_used_support",[S().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 _($(this)[0])?(e.space.titan_mine.count++,e.resource.Adamantite.display=!0,z($(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(a){return m("storehouse",a,175e3,1.28)},Lumber(a){return m("storehouse",a,1e5,1.28)},Aluminium(a){return m("storehouse",a,12e4,1.28)},Cement(a){return m("storehouse",a,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(a){return!!["Copper","Iron","Steel","Titanium","Iridium","Neutronium","Adamantite"].includes(a)},val(a){switch(a){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(a){let r='
',i=Lr("storehouse",!1,a),s=Lr("storehouse",!0,a);for(let n of $(this)[0].res())if(e.resource[n].display){let c=$(this)[0].heavy(n),o=Y(+(E($(this)[0].val(n))*(c?s:i)).toFixed(0),1);r=r+`${t("plus_max_resource",[o,e.resource[n].name])}`}return r=r+"
",r},action(){if(_($(this)[0])){e.space.storehouse.count++;let a=Lr("storehouse",!1),r=Lr("storehouse",!0);for(let i of $(this)[0].res())if(e.resource[i].display){let s=$(this)[0].heavy(i);e.resource[i].max+=E($(this)[0].val(i))*(s?r:a)}return!0}return!1}},titan_bank:{id:"space-titan_bank",title:t("city_bank"),desc(){return t("city_bank_desc",[S().titan])},reqs:{titan:6},path:["truepath"],cost:{Money(a){return m("titan_bank",a,25e5,1.32)},Titanium(a){return m("titan_bank",a,38e4,1.32)},Neutronium(a){return m("titan_bank",a,5e3,1.32)}},effect(){let a=ja()*2;return a=E(a),a=(+a.toFixed(0)).toLocaleString(),t("plus_max_resource",[`$${a}`,t("resource_Money_name")])},action(){return _($(this)[0])?(e.resource.Money.max+=E(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",[S().titan])}
`},reqs:{graphene:1},path:["truepath"],cost:{Money(a){return m("g_factory",a,95e4,1.28)},Copper(a){return m("g_factory",a,165e3,1.28)},Stone(a){return m("g_factory",a,22e4,1.28)},Adamantite(a){return m("g_factory",a,12500,1.28)}},effect(){let a=.05;return e.race.high_pop&&(a=+ve(a).toFixed(3)),`
${t("space_used_support",[S().titan])}
${t("space_red_mine_effect",[a,e.resource.Graphene.name])}
${t("interstellar_g_factory_effect")}
`},s_type:"titan",support(){return-1},powered(){return 0},special:!0,action(){return _($(this)[0])?(e.space.g_factory.count++,e.resource.Graphene.display=!0,z($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.space.g_factory.Oil++:e.space.g_factory.Lumber++),e.settings.showIndustry=!0,Pe(),!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(a){return m("sam",a,25e5,1.28)},Steel(a){return m("sam",a,45e4,1.28)},Elerium(a){return m("sam",a,120,1.28)},Brick(a){return m("sam",a,16e4,1.28)}},effect(){return`
${t("galaxy_defense_platform_effect",[25])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(e.space.sam.count++,z($(this)[0]),!0):!1},post(){C({el:"#spc_titansynd"},"update")}},decoder:{id:"space-decoder",title:t("space_decoder_title"),desc(){return`
${t("space_decoder_title")}
${t("requires_power_support_combo",[S().titan,e.resource.Cipher.name])}
`},reqs:{titan:8},path:["truepath"],cost:{Money(a){return m("decoder",a,125e5,1.275)},Elerium(a){return m("decoder",a,750,1.275)},Orichalcum(a){return m("decoder",a,33e4,1.275)},Quantium(a){return m("decoder",a,18e4,1.275)}},effect(a){let r=$(this)[0].support_fuel().a,i=2500;e.race.high_pop&&(i=ve(i)),(a?e.space?.ai_core2?.on??0:G.ai_core2)&&(i*=1.25);let s=`
${t("space_used_support",[S().titan])}
`;return s+=`
${t("space_red_exotic_lab_effect1",[i])}
`,s+`
${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 _($(this)[0])?(e.space.decoder.count++,z($(this)[0]),!0):!1}},ai_core:{id:"space-ai_core",title:t("space_ai_core"),desc(a){return!e.space.hasOwnProperty("ai_core")||e.space.ai_core.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e5:0},Cement(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?18e4:0},Aluminium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?25e4:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?250:0},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?125e3:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?5e4:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?1e5:0},Cipher(a){return(a||0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0)<100?750:0}},effect(a){let r=`
${t("space_ai_core_effect")}
`,i=(a?.count??0)+(e.space.hasOwnProperty("ai_core")?e.space.ai_core.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}else return on.spc_titan.ai_core2.effect(a);return r},action(){return _($(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},z($(on.spc_titan.ai_core2)[0]),ut(),le()),!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 N(100)},p_fuel(){return{r:"Water",a:1e3}},effect(a){let r=25,i=`
${t("interstellar_citadel_stat",[+pa(a).toFixed(1)])}
`;if(i+=`
${t("interstellar_citadel_effect",[r])}
${t("space_ai_core_effect2",[r])}
`,e.tech.titan_ai_core&&e.tech.titan_ai_core>=2&&(i+=`
${t("space_ai_core_effect3",[50])}
`),i+=`
${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 s=+zl(a).toFixed(1);i+=`
${t("space_ai_core_effect4",[s])}
`}return i},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(a){return m("ai_colonist",a,112e6,1.35)},Alloy(a){return m("ai_colonist",a,75e4,1.35)},Elerium(a){return m("ai_colonist",a,500,1.35)},Nano_Tube(a){return m("ai_colonist",a,525e3,1.35)},Quantium(a){return m("ai_colonist",a,15e4,1.35)},Cipher(a){return m("ai_colonist",a,1e4,1.35)}},effect(){return`
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().titan]):t("colonist")])}
${t("space_ai_colonist_effect",[F(1),S().titan])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(10)},action(){return _($(this)[0])?(e.space.ai_colonist.count++,z($(this)[0]),!0):!1},flair:t("tech_combat_droids_flair")}},spc_enceladus:{info:{name(){return S().enceladus},desc(){return t("space_enceladus_info_desc",[S().enceladus,x[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",[S().enceladus])},desc(){return t("space_mission_desc",[S().enceladus])},reqs:{outer:1},grant:["enceladus",1],path:["truepath"],queue_complete(){return e.tech.enceladus>=1?0:1},cost:{Helium_3(a,r){return+_e(25e4,!1,r).toFixed(0)},Elerium(){return 100}},effect(){return t("space_titan_mission_effect",[S().enceladus])},action(){return _($(this)[0])?(I(t("space_enceladus_mission_action",[S().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",[S().enceladus])}
`},reqs:{enceladus:2},path:["truepath"],cost:{Money(a){return m("water_freighter",a,45e4,1.25)},Iron(a){return m("water_freighter",a,362e3,1.25)},Nano_Tube(a){return m("water_freighter",a,125e3,1.25)},Sheet_Metal(a){return m("water_freighter",a,75e3,1.25)}},effect(a){let r=+_e(5,!0,a).toFixed(2),i=+te("water_freighter").toFixed(2);return`
${t("space_used_support",[S().enceladus])}
${t("produce",[i,e.resource.Water.name])}
${t("space_belt_station_effect3",[r])}
`},s_type:"enceladus",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.water_freighter.count++,z($(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",[S().enceladus])}
`},reqs:{enceladus:3},path:["truepath"],cost:{Money(a){return m("zero_g_lab",a,5e6,1.25)},Alloy(a){return m("zero_g_lab",a,125e3,1.25)},Graphene(a){return m("zero_g_lab",a,225e3,1.25)},Stanene(a){return m("zero_g_lab",a,6e5,1.25)}},effect(){let a=Sa("spc_enceladus"),r=Math.round(1e4*a),i=`
${t("space_used_support",[S().enceladus])}
${t("city_max_knowledge",[r])}
`;return e.resource.Quantium.display&&(i=i+`
${t("space_zero_g_lab_effect",[F(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 N(12)},action(){return _($(this)[0])?(e.space.zero_g_lab.count++,z($(this)[0]),!0):!1},post(){Xe()},postPower(a){gi("Quantium")}},operating_base:{id:"space-operating_base",title:t("tech_operating_base"),desc(){return`
${t("tech_operating_base")}
${t("requires_power_support",[S().enceladus])}
`},reqs:{enceladus:4},path:["truepath"],cost:{Money(a){return m("operating_base",a,75e5,1.3)},Furs(a){return m("operating_base",a,5e5,1.3)},Adamantite(a){return m("operating_base",a,375e3,1.3)},Stanene(a){return m("operating_base",a,75e4,1.3)},Mythril(a){return m("operating_base",a,225e3,1.3)},Horseshoe(){return e.race.hooved?4:0}},effect(){let a=`
${t("space_used_support",[S().enceladus])}
`;if(a+=`
${t("galaxy_defense_platform_effect",[50])}
`,a+=t("plus_max_resource",[F(4),t("civics_garrison_soldiers")]),e.race.orbit_decayed){let r=e.tech.medic*5;a+=`
${t("city_hospital_effect",[r])}
`}return a+`
${t("minus_power",[$(this)[0].powered()])}
`},s_type:"enceladus",support(){return-1},powered(){return N(10)},action(){return _($(this)[0])?(e.space.operating_base.count++,z($(this)[0]),!0):!1},post(){C({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(a){return m("munitions_depot",a,5e6,1.22)},Iron(a){return m("munitions_depot",a,185e3,1.22)},Sheet_Metal(a){return m("munitions_depot",a,1e5,1.22)}},effect(){let a=25;return`
${t("plus_max_crates",[a])}
${t("plus_max_containers",[a])}
`},action(){return _($(this)[0])?(e.space.munitions_depot.count++,e.resource.Crates.max+=25,e.resource.Containers.max+=25,e.resource.Containers.display||sa(),!0):!1}}},spc_triton:{info:{name(){return S().triton},desc(){return t("space_triton_info_desc",[S().triton,x[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(a){e.tech.triton&&e.tech.triton>=3&&($(`#${a}`).append(`
${t("space_ground_resist")}
`),C({el:`#${a}resist`,data:e.space.fob,methods:{threat(r,i){let s=e.civic.garrison.wounded-gt();s<0&&(s=0);let n=+(r-Pt(i,"army",s)).toFixed(0);return n<0?0:n}}}))}},triton_mission:{id:"space-triton_mission",title(){return t("space_mission_title",[S().triton])},desc(){return t("space_mission_desc",[S().triton])},reqs:{outer:2},grant:["triton",1],path:["truepath"],queue_complete(){return e.tech.triton>=1?0:1},cost:{Helium_3(a,r){return+_e(6e5,!1,r).toFixed(0)},Elerium(){return 2500}},effect(){return t("space_triton_mission_effect",[S().triton])},action(){return _($(this)[0])?(I(t("space_triton_mission_action",[S().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(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,25e7,1.1)},Copper(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,8e6,1.1)},Uranium(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,5e4,1.1)},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,25e5,1.1)},Graphene(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,3e6,1.1)},Sheet_Metal(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,75e5,1.1)},Quantium(a){return(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)>=1?0:m("fob",a,5e5,1.1)},Horseshoe(a){return e.race.hooved&&(a||0)+(e.space.hasOwnProperty("fob")?e.space.fob.count:0)<1?10:0}},effect(a){let r=gt(),i=gt(!0),s=`
${t("galaxy_defense_platform_effect",[500])}
`;s+=t("plus_max_resource",[F(10),t("civics_garrison_soldiers")]),s+=`
${t("civics_garrison_soldiers")}: ${r} / ${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=+_e(125,!0,a).toFixed(2);return s+`
${t("requires_power_combo_effect",[$(this)[0].powered(),n,e.resource.Helium_3.name])}
`},powered(){return N(50)},action(){return e.space.fob.count<1&&_($(this)[0])?(e.space.fob.count++,z($(this)[0]),!0):!1},post(){e.tech.triton===2&&(e.tech.triton=3,le(),ut(),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(a){return m("lander",a,24e5,1.15)},Aluminium(a){return m("lander",a,185e3,1.15)},Neutronium(a){return m("lander",a,1e4,1.15)},Nano_Tube(a){return m("lander",a,158e3,1.15)}},powered(){return 0},effect(a){let r=+_e(50,!0,a).toFixed(2),i="";return e.space.crashed_ship&&e.space.crashed_ship.count===100&&(i=`
${t("space_lander_effect3",[te("lander"),e.resource.Cipher.name])}
`),`
${t("space_lander_effect",[S().triton])}
${i}
${t("space_lander_effect2",[F(3)])}
${t("space_red_space_barracks_effect2",[r])}
`},action(){return _($(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 a=e.space.crashed_ship?e.space.crashed_ship.count:0;return`
${t("space_crashed_ship_effect",[a])}
`},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(a,r){return+_e(1e6,!1,r).toFixed(0)},Elerium(){return 1e3}},effect(){return t("space_kuiper_mission_effect")},action(){return _($(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(a){return m("orichalcum_mine",a,25e6,1.25)},Graphene(a){return m("orichalcum_mine",a,9e5,1.25)},Elerium(a){return m("orichalcum_mine",a,200,1.25)},Mythril(a){return m("orichalcum_mine",a,45e4,1.25)},Quantium(a){return m("orichalcum_mine",a,15e4,1.25)}},effect(a){let r=+te("orichalcum_mine").toFixed(3),i=+_e($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Orichalcum_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(10)},p_fuel(){return{r:"Oil",a:200}},action(){return _($(this)[0])?(e.space.orichalcum_mine.count++,e.resource.Orichalcum.display=!0,z($(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(a){return m("uranium_mine",a,5e6,1.25)},Iridium(a){return m("uranium_mine",a,25e4,1.25)},Steel(a){return m("uranium_mine",a,62e4,1.25)}},effect(a){let r=+te("uranium_mine").toFixed(3),i=+_e($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Uranium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(5)},p_fuel(){return{r:"Oil",a:60}},action(){return _($(this)[0])?(e.space.uranium_mine.count++,z($(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(a){return m("neutronium_mine",a,8e6,1.25)},Adamantite(a){return m("neutronium_mine",a,65e4,1.25)},Stanene(a){return m("neutronium_mine",a,125e4,1.25)}},effect(a){let r=+te("neutronium_mine").toFixed(3),i=+_e($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Neutronium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(8)},p_fuel(){return{r:"Oil",a:60}},action(){return _($(this)[0])?(e.space.neutronium_mine.count++,z($(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(a){return m("elerium_mine",a,2e7,1.25)},Titanium(a){return m("elerium_mine",a,25e4,1.25)},Neutronium(a){return m("elerium_mine",a,12e4,1.25)},Orichalcum(a){return m("elerium_mine",a,175e3,1.25)}},effect(a){let r=+te("elerium_mine").toFixed(3),i=+_e($(this)[0].p_fuel().a,!0,a).toFixed(1);return`
${t("gain",[r,t("resource_Elerium_name")])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),i,e.resource[$(this)[0].p_fuel().r].name])}
`},powered(){return N(12)},p_fuel(){return{r:"Oil",a:125}},action(){return _($(this)[0])?(e.space.elerium_mine.count++,z($(this)[0]),!0):!1}}},spc_eris:{info:{name(){return S().eris},desc(){return t("space_eris_info_desc",[S().eris])},support:"drone_control",zone:"outer",syndicate(){return!!e.tech.eris},syndicate_cap(){return 7500},extra(a){e.tech.eris&&e.tech.eris===1&&($(`#${a}`).append(`
${t("space_scanned")} {{ eris_scan }}%
`),C({el:`#${a}scanned`,data:e.tech}))}},eris_mission:{id:"space-eris_mission",title(){return t("space_mission_title",[S().eris])},desc(){return t("space_mission_desc",[S().eris])},reqs:{outer:7},grant:["eris",1],path:["truepath"],queue_complete(){return e.tech.eris>=1?0:1},cost:{Helium_3(a,r){return+_e(125e4,!1,r).toFixed(0)},Elerium(){return 1250}},effect(){return t("space_eris_mission_effect",[S().eris])},action(){return _($(this)[0])?(e.space.syndicate.spc_eris=4e3,I(t("space_eris_mission_action",[S().eris]),"info",!1,["progress"]),!0):!1}},drone_control:{id:"space-drone_control",title(){return t("space_drone_control",[S().titan])},desc(){return`
${t("space_drone_control",[S().titan])}
${t("requires_power_combo",[e.resource[$(this)[0].p_fuel().r].name])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(a){return m("drone_control",a,75e6,1.3)},Neutronium(a){return m("drone_control",a,1e5,1.3)},Stanene(a){return m("drone_control",a,45e4,1.3)},Quantium(a){return m("drone_control",a,3e5,1.3)}},effect(){let a=$(this)[0].p_fuel().a;return`
+${t("galaxy_alien2_support",[$(this)[0].support(),S().eris])}
`+`
${t("requires_power_combo_effect",[$(this)[0].powered(),a,e.resource[$(this)[0].p_fuel().r].name])}
`},support(){return 5},powered(){return N(25)},p_fuel(){return{r:"Uranium",a:5}},action(){return _($(this)[0])?(e.space.drone_control.count++,z($(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",[S().eris])}
`},reqs:{eris:3},path:["truepath"],cost:{Money(a){return m("shock_trooper",a,425e4,1.225)},Polymer(a){return m("shock_trooper",a,375e3,1.225)},Adamantite(a){return m("shock_trooper",a,5e5,1.225)},Graphene(a){return m("shock_trooper",a,22e4,1.225)},Elerium(a){return m("shock_trooper",a,350,1.225)}},effect(){let a=Math.round(Pt(1,"army",0)*Sa("spc_eris")),r=`
${t("space_used_support",[S().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(r=`
${t("space_lander_effect3",[te("shock_trooper"),e.resource.Cipher.name])}
`),r+`
${t("space_digsite_offense",[a])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.shock_trooper.count++,z($(this)[0]),!0):!1}},tank:{id:"space-tank",title:t("space_tank_title"),desc(){return`
${t("space_tank_title")}
${t("space_support",[S().eris])}
`},reqs:{eris:4},path:["truepath"],cost:{Money(a){return m("tank",a,1e8,1.25)},Alloy(a){return m("tank",a,125e4,1.25)},Orichalcum(a){return m("tank",a,6e5,1.25)},Mythril(a){return m("tank",a,5e5,1.25)},Uranium(a){return m("tank",a,25e3,1.25)}},effect(){let a=Math.round(100*Sa("spc_eris")),r=`
${t("space_used_support",[S().eris])}
`;return e.space.digsite&&e.space.digsite.count===100&&(r=`
${t("space_lander_effect3",[te("tank"),e.resource.Cipher.name])}
`),r+`
${t("space_digsite_offense",[a])}
`},s_type:"eris",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.space.tank.count++,z($(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 a=e.space.digsite?e.space.digsite.count:0;return`
${t("space_crashed_ship_effect",[a])}
`},action(){return!1}}}},be={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(a){return!e.tauceti.hasOwnProperty("ringworld")||e.tauceti.ringworld.count<1e3||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?1e7:1e8:0},Neutronium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e4:1e5:0},Nano_Tube(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?7e4:35e4:0},Adamantite(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?2e5:1e6:0},Bolognium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?17600:88e3:0},Orichalcum(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?25e3:125e3:0},Unobtainium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?e.race.lone_survivor?360:1800:0},Quantium(a){return(a||0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0)<1e3?ra(e.race.lone_survivor?10100:101e3):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("ringworld")?e.tauceti.ringworld.count:0);if(i<1e3){let s=1e3-i;r+=`
${t("tau_star_ringworld_effect")}
`,r+=`
${t("space_dwarf_collider_effect2",[s])}
`}else r+=`
${t("space_dwarf_reactor_effect1",[e.race.lone_survivor?100:1e4])}
`;return r},action(){return _($(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}),ia(),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(a){a?setTimeout(function(){e.tech.matrix=G.matrix?4:3,ia()},250):(e.tech.matrix=3,ia())},effect(){let a=Cc(),r=$(this)[0].powered(),i=r>0?`
${t("minus_power",[r])}
`:"";return`
${t("tau_star_matrix_effect")}
${a}${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 a=Cc();return`
${t("tau_star_blue_pill_effect")}
${a}`},action(){if(_($(this)[0])){let o=function(){r.fillStyle="#0001",r.fillRect(0,0,i,s),r.fillStyle="#0f0",r.font="15pt monospace",c.forEach((l,u)=>{let d=String.fromCharCode(Math.rand(65382,65438)),h=u*20;r.fillText(d,h,l),l>100+Math.random()*1e4?c[u]=0:c[u]=l+20})};$("body").append('');let a=document.getElementById("matrix"),r=a.getContext("2d"),i=a.width=document.body.offsetWidth,s=a.height=document.body.offsetHeight,n=Math.floor(i/20)+1,c=Array(n).fill(0);return setInterval(o,50),setTimeout(function(){qc()},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(a){return 1e6},Copper(a){return 1e7},Graphene(a){return 5e6},Stanene(a){return 8e6},Elerium(a){return 1e4}},effect(){let a=Cl();return`
${t("tau_star_goe_facility_effect")}
${a}`},action(){if(_($(this)[0])){let a=_t(be.tau_star.goe_facility);return Object.keys(a).forEach(function(r){e.resource[r].amount+=a[r]()}),Mc(),!1}return!1}}},tau_home:{info:{name(){return t("tau_planet",[x[e.race.species].home])},desc(){return t("tau_home",[x[e.race.species].home])},support:"orbital_station",extra(a){e.tech.tau_home&&e.tech.tau_home>=2&&!It()&&($(`#${a}`).append(`
${t("resource_Materials_name")} {{ amount | round }} / {{ max }}
`),C({el:`#${a}Mats`,data:e.resource.Materials,methods:{tauShow(){return!It()}},filters:{round(r){return+r.toFixed(0)}}}))}},home_mission:{id:"tauceti-home_mission",title(){return t("tau_new_mission_title",[x[e.race.species].home])},desc(){return t("tau_new_mission_title",[x[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",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.colony={count:0,on:0},e.tauceti.mining_pit={count:0,on:0},I(t("tau_home_mission_result",[x[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 a="Explorer";if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let r=e.space.shipyard.ships.findIndex(i=>i.location==="tauceti"&&i.class==="explorer");r!==-1&&(a=e.space.shipyard.ships[r].name)}return t("tau_home_dismantle_effect",[a])},action(){let a=-1;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")&&(a=e.space.shipyard.ships.findIndex(r=>r.location==="tauceti"&&r.class==="explorer")),a>=0&&_($(this)[0])){if(e.space.shipyard.ships.splice(a,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,z($(be.tau_home.orbital_station)[0])){e.tauceti.colony.on++,e.tauceti.mining_pit.on++;let r=$(be.tau_home.mining_pit)[0].workers();e.civic.pit_miner.max+=r;let i=Math.min(r,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&&yr(),!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(a){return m("orbital_station",a,8e7,1.3,"tauceti")},Materials(a){return It()?0:m("orbital_station",a,5e5,1.3,"tauceti")},Helium_3(a){return It()?m("orbital_station",a,de(25e4),1.3,"tauceti"):0},Copper(a){return It()?m("orbital_station",a,125e4,1.3,"tauceti"):0},Adamantite(a){return It()?m("orbital_station",a,9e5,1.3,"tauceti"):0}},effect(){let a=E(15e3),r=+de($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[x[e.race.species].home]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Helium_3.name])}
`,i=i+`
${t("spend_power",[r,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 N(e.tech.isolation?e.race.lone_survivor?4:6:30)},refresh:!0,action(){return _($(this)[0])?(e.tauceti.orbital_station.count++,z($(this)[0]),!0):!1}},colony:{id:"tauceti-colony",title:t("tau_home_colony"),desc(){return`
${t("tau_home_colony_desc",[x[e.race.species].home])}
${t("requires_power_support_combo",[x[e.race.species].home,e.resource.Food.name])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(a){return m("colony",a,1575e4,1.225,"tauceti")},Materials(a){return It()?0:m("colony",a,65e4,1.225,"tauceti")},Furs(a){return It()?m("colony",a,72e4,1.225,"tauceti"):0},Graphene(a){return It()?m("colony",a,485e3,1.225,"tauceti"):0},Brick(a){return It()?m("colony",a,ra(88e4),1.225,"tauceti"):0}},effect(){let a=$(this)[0].citizens(),r=e.tech.isolation?900:250,i=+$(this)[0].support_fuel().a.toFixed(1),s=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(e.race.lone_survivor||(s=s+`
${t("plus_max_citizens",[a])}
`),e.tech.isolation){let n=ja()*25;n=E(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,x[e.race.species].home])}
`,e.tech.isolation){let n=J("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",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,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 _($(this)[0])?(e.tauceti.colony.count++,z($(this)[0]),e.resource.Containers.display||sa(),!0):!1},citizens(){let a=e.tech.isolation?8:5;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),e.race.lone_survivor?0:a}},tau_housing:{id:"tauceti-tau_housing",title(){return $e("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(a){return m("tau_housing",a,15e4,1.15,"tauceti")},Lumber(a){return e.race.kindling_kindred||e.race.smoldering?0:m("tau_housing",a,125e3,1.25,"tauceti")},Stone(a){return e.race.kindling_kindred?m("tau_housing",a,125e3,1.25,"tauceti"):0},Chrysotile(a){return e.race.smoldering?m("tau_housing",a,5e4,1.25,"tauceti"):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.tauceti.tau_housing.count++,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},captive_housing:ft("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(a){return m("pylon",a,50,1.48,"tauceti")},Stone(a){return m("pylon",a,100,1.42,"tauceti")},Crystal(a){return m("pylon",a,8,1.42,"tauceti")-3}},effect(){let a=E(2),r=+(.0125*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.tauceti.pylon.count++,e.resource.Mana.max+=E(2),!0):!1}},cloning_facility:{id:"tauceti-cloning_facility",title:t("tau_home_cloning"),desc(){return t("tau_home_cloning_desc",[x[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(a){return e.resource[e.race.species].amount?m("citizen",a,Math.round((e.race.high_pop?1e5:125e3)/F(1)),e.race.high_pop?1.01:1.02,"tauceti",e.race.high_pop?1.003:1.005):0},Copper(a){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?m("citizen",a,Math.round(50/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Aluminium(a){return!e.race.artifical||e.race.deconstructor?0:e.resource[e.race.species].amount>=5?m("citizen",a,Math.round(50/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0},Nanite(a){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?m("citizen",a,Math.round(500/F(1)),1.01,"tauceti",e.race.high_pop?1.0032:1.005):0}},effect(){let a="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(a=`
${t("city_assembly_effect_warn")}
`),`
${t("tau_home_cloning_effect",[x[e.race.species].name])}
${a}`},action(){return e.resource[e.race.species].max>e.resource[e.race.species].amount&&_($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}},horseshoe:ft("horseshoe","tauceti"),bonfire:ft("bonfire","tauceti"),firework:ft("firework","tauceti"),assembly:ft("assembly","tauceti"),nanite_factory:ft("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(a){return m("tau_farm",a,135e6,1.25,"tauceti")},Stone(a){return m("tau_farm",a,921e4,1.25,"tauceti")},Steel(a){return m("tau_farm",a,6295e3,1.25,"tauceti")},Water(a){return m("tau_farm",a,1e4,1.25,"tauceti")}},effect(){let a=`
${t("space_red_spaceport_effect1",[t("tau_planet",[x[e.race.species].home]),$(this)[0].support()])}
`;if(a=a+`
${t("produce",[+te("tau_farm","food").toFixed(2),e.resource.Food.name])}
`,!e.race.kindling_kindred&&!e.race.smoldering&&(a=a+`
${t("produce",[+te("tau_farm","lumber").toFixed(2),e.resource.Lumber.name])}
`),e.tech.isolation){let r=+te("tau_farm","water").toFixed(2);if(a=a+`
${t("produce",[r,e.resource.Water.name])}
`,e.race.artifical){let i=E(350);a=a+`
${t("city_transmitter_effect",[i])}
`}}return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},support(){return 1},powered(){return N(e.tech.isolation?1:4)},action(){return _($(this)[0])?(e.tauceti.tau_farm.count++,z($(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",[x[e.race.species].home])}
`},reqs:{tau_home:2},path:["truepath"],cost:{Money(a){return m("mining_pit",a,425e4,1.225,"tauceti")},Materials(a){return It()?0:m("mining_pit",a,35e4,1.225,"tauceti")},Lumber(a){return It()?m("mining_pit",a,235e4,1.225,"tauceti"):0},Iron(a){return It()?m("mining_pit",a,835e3,1.225,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(a=a+`
${t("plus_max_resource",[$(this)[0].workers(),t("job_pit_miner")])}
`,!It())a=a+`
${t("plus_max_resource",[1e6,t("resource_Materials_name")])}
`,a=a+`
${t("tau_home_mining_pit_effect",[e.resource.Materials.name])}
`;else if(e.tech.isolation){if(e.race.lone_survivor){let r=[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?(r.push(e.resource.Chrysotile.name),a=a+`
${t("tau_home_mining_pit_effect2cs",r)}
`):a=a+`
${t("tau_home_mining_pit_effect2c",r)}
`}else{let r=[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name,e.resource.Copper.name,e.resource.Coal.name];e.race.smoldering?(r.push(e.resource.Chrysotile.name),a=a+`
${t("tau_home_mining_pit_effect2bs",r)}
`):a=a+`
${t("tau_home_mining_pit_effect2b",r)}
`}a=a+`
${t("tau_gas_womling_station_effect",[8,e.resource.Cement.name])}
`}else a=a+`
${t("tau_home_mining_pit_effect2",[e.resource.Bolognium.name,e.resource.Adamantite.name,e.resource.Stone.name])}
`;return a},s_type:"tau_home",support(){return-1},powered(){return 0},workers(){return F(e.tech.isolation?6:8)},action(){if(_($(this)[0])){if(e.tauceti.mining_pit.count++,z($(this)[0])){let a=$(this)[0].workers();e.civic.pit_miner.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.pit_miner.workers+=r}return!0}return!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(a){return 165e7},Materials(a){return 75e4}},effect(){return t("tau_home_excavate_effect")},action(){return _($(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 a=`
${t("plus_max_resource",["20%",t("resource_Knowledge_name")])}
`;return e.tech.isolation&&(a=a+`
${t("plus_max_resource",[(e.race.lone_survivor?35e5:65e5).toLocaleString(),t("resource_Knowledge_name")])}
`,a=a+`
${t("plus_max_resource",[2e5.toLocaleString(),e.resource.Cipher.name])}
`,a=a+`
${t("space_lander_effect3",[te("alien_outpost"),e.resource.Cipher.name])}
`),e.tech.outpost_boost&&(a=a+`
${t("tech_alien_outpost_effect2")}
`),e.race.lone_survivor&&(a=a+`
${t("city_wardenclyffe_effect1",[F(1),e.civic.professor.name])}
`),a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(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(a){return!e.tauceti.hasOwnProperty("jump_gate")||e.tauceti.jump_gate.count<100||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?1e6:0},Materials(a){return(a||0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0)<100?12500:0}},effect(a){let r=(a?.count??0)+(e.tauceti.hasOwnProperty("jump_gate")?e.tauceti.jump_gate.count:0);if(r<100){let i=100-r;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return _($(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(a){return m("fusion_generator",a,188e6,1.25,"tauceti")},Iridium(a){return m("fusion_generator",a,555e4,1.25,"tauceti")},Stanene(a){return m("fusion_generator",a,7003500,1.25,"tauceti")},Sheet_Metal(a){return m("fusion_generator",a,ra(95e3),1.25,"tauceti")}},effect(){let a=+de($(this)[0].p_fuel().a).toFixed(1),r=`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}
`;return e.race.lone_survivor?r=r+`
${t("gain",[-a,e.resource[$(this)[0].p_fuel().r].name])}
`:r=r+`
${t("spend",[a,e.resource[$(this)[0].p_fuel().r].name])}
`,r},p_fuel(){return{r:"Helium_3",a:e.tech.isolation?e.race.lone_survivor?-15:75:500}},powered(){return at(-32)},action(){return _($(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(a){return m("repository",a,1028e4,1.28,"tauceti")},Iron(a){return m("repository",a,18e5,1.28,"tauceti")},Cement(a){return m("repository",a,15e5,1.28,"tauceti")},Neutronium(a){return m("repository",a,215e3,1.28,"tauceti")}},wide:!0,res(){let a=["Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Crystal","Alloy","Polymer","Iridium","Chrysotile","Nano_Tube","Neutronium","Adamantite","Unobtainium"];return e.tech.isolation&&(a.push("Oil"),a.push("Helium_3"),a.push("Uranium"),a.push("Water")),a},val(a){switch(a){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(a){let r='
',i=Lr("repository",!1,a),s=250;for(let n of $(this)[0].res())if(e.resource[n].display){let c=Y(+(E($(this)[0].val(n))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[c,e.resource[n].name])}`}return e.tech.isolation&&(r=r+`${t("plus_max_resource",[s,t("resource_Crates_name")])}${t("plus_max_resource",[s,t("resource_Containers_name")])}`),r=r+"
",r},action(){if(_($(this)[0])){e.tauceti.repository.count++;let a=250;e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=Lr("repository");for(let i of $(this)[0].res())e.resource[i].display&&(e.resource[i].max+=E($(this)[0].val(i))*r);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",[x[e.race.species].home])}
`},reqs:{tau_home:8},path:["truepath"],cost:{Money(a){return m("tau_factory",a,269e6,1.25,"tauceti")},Titanium(a){return m("tau_factory",a,3e6,1.25,"tauceti")},Elerium(a){return m("tau_factory",a,850,1.25,"tauceti")},Bolognium(a){return m("tau_factory",a,25e4,1.25,"tauceti")},Quantium(a){return m("tau_factory",a,ra(425e3),1.25,"tauceti")}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;return a=a+`
${t("tau_home_tau_factory_effect",[$(this)[0].manufacturing()])}
`,e.tech.isolation&&(e.race.flier||(a=a+`
${t("city_cement_plant_effect1",[F(2)])}
`),a=a+`
${t("space_red_fabrication_effect1",[F(5)])}
`),a=a+`
${t("city_crafted_mats",[e.tech.isolation?275:90])}
`,a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},special:!0,s_type:"tau_home",support(){return-1},powered(){return N(e.tech.isolation?2:5)},manufacturing(){return e.tech.isolation?5:3},action(){return _($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.tau_factory.count++,z($(this)[0])&&(e.city.factory.Alloy+=$(this)[0].manufacturing(),Pe()),!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",[x[e.race.species].home])}
`},reqs:{disease:1},path:["truepath"],cost:{Money(a){return m("infectious_disease_lab",a,1e9,1.25,"tauceti")},Alloy(a){return m("infectious_disease_lab",a,325e5,1.25,"tauceti")},Polymer(a){return m("infectious_disease_lab",a,5e7,1.25,"tauceti")},Bolognium(a){return m("infectious_disease_lab",a,25e5,1.25,"tauceti")},Unobtainium(a){return m("infectious_disease_lab",a,64e3,1.25,"tauceti")}},effect(){let a=39616;if(e.tech.supercollider&&e.tech.isolation){let i=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/i+1}let r=`
${t("tau_new_support",[$(this)[0].support(),x[e.race.species].home])}
`;if(r=r+`
${t("city_max_knowledge",[Math.round(a).toLocaleString()])}
`,e.tech.isolation){let i=E(375);r=r+`
${t("plus_max_resource",[i,t("resource_Elerium_name")])}
`,r=r+`
${t("city_wardenclyffe_effect1",[F(2),e.civic.professor.name])}
`,r=r+`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`,r=r+`
${t("space_zero_g_lab_effect",[F(1)])}
`,r=r+`
${t("city_library_effect",[75])}
`}return e.tech.alien_crafting&&(r=r+`
${t("tau_gas_womling_station_effect",[65,e.resource.Quantium.name])}
`),e.tech.focus_cure&&(r=r+`
${t("tau_home_disease_lab_cure",[+e.tauceti.infectious_disease_lab.cure.toFixed(1)])}
`,e.race.hasOwnProperty("vax")&&(r=r+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`)),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},s_type:"tau_home",support(){return-1},powered(){return N(e.tech.isolation?e.race.lone_survivor?2:8:35)},action(){return _($(this)[0])?(e.tauceti.infectious_disease_lab.count++,z($(this)[0]),!0):!1},post(){e.tech.disease===1&&(e.tech.disease=2,I(t("tau_plague4",[t("tab_tauceti")]),"info",!1,["progress"]),le()),Xe()},postPower(a){gi("Quantium")}},tauceti_casino:{id:"tauceti-tauceti_casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1,isolation:1},cost:{Money(a){return m("tauceti_casino",a,145e4,1.35,"tauceti")},Furs(a){return m("tauceti_casino",a,95e3,1.35,"tauceti")},Cement(a){return m("tauceti_casino",a,12e4,1.35,"tauceti")},Plywood(a){return m("tauceti_casino",a,ra(55e3),1.35,"tauceti")}},effect(){let a=$(this)[0].citizens(),r=e.race.lone_survivor?"":`
${t("plus_max_resource",[a,t("citizen")])}
`;return r=r+vi(),r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},powered(){return N(e.race.lone_survivor?1:2)},action(){return _($(this)[0])?(e.tauceti.tauceti_casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(this)[0]),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),e.race.lone_survivor?0:a},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(a){return m("tau_cultural_center",a,9145e4,1.35,"tauceti")},Copper(a){return m("tau_cultural_center",a,585e4,1.35,"tauceti")},Coal(a){return m("tau_cultural_center",a,465e3,1.35,"tauceti")},Polymer(a){return m("tau_cultural_center",a,3792e3,1.35,"tauceti")}},effect(){let a=8,r=1;e.civic.govern.type==="corpocracy"?r=2:e.civic.govern.type==="socialist"&&(r=.8);let i=20*r,s=5*r,n=15*r,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",[a,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 N(1)},p_fuel(){return{r:"Food",a:e.race.lone_survivor?25:500}},action(){return _($(this)[0])?(e.tauceti.tau_cultural_center.count++,e.tauceti.tau_cultural_center.on++,!0):!1}}},tau_red:{info:{name(){return t("tau_planet",[S().red])},desc(){return t("tau_red",[S().red])},support:"orbital_platform",extra(a){e.tech.tau_red&&e.tech.tau_red>=5&&($(`#${a}`).append(`
${t("tau_red_womling_prod")} {{ prod }}%
`),C({el:`#${a}Womlings`,data:e.tauceti.overseer}))}},red_mission:{id:"tauceti-red_mission",title(){return t("tau_new_mission_title",[S().red])},desc(){return t("tau_new_mission_title",[S().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",[S().red])},action(){return _($(this)[0])?(e.tauceti.settlement={count:0,on:0},I(t("tau_red_mission_result",[S().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(a){return m("orbital_platform",a,5e7,1.3,"tauceti")},Oil(a){return It()?m("orbital_platform",a,de(Ol(275e3)),1.3,"tauceti"):0},Aluminium(a){return m("orbital_platform",a,178e4,1.3,"tauceti")},Bolognium(a){return m("orbital_platform",a,45e4,1.3,"tauceti")}},effect(){let a=E(17500),r=+de($(this)[0].support_fuel().a).toFixed(1),i=`
${t("space_red_spaceport_effect1",[t("tau_planet",[S().red]),$(this)[0].support()])}
`;return i=i+`
${t("plus_max_resource",[a.toLocaleString(),e.resource.Oil.name])}
`,i=i+`
${t("spend_power",[r,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 a=e.tech.womling_logistics?2.5:2;return e.race.lone_survivor&&(a*=2),a},powered(){return N(e.tech.isolation?e.race.lone_survivor?2:3:18)},refresh:!0,action(){return It()&&_($(this)[0])?(e.tauceti.orbital_platform.count++,z($(this)[0]),e.tech.tau_red===1&&(e.tech.tau_red=2,I(t("tau_red_orbital_platform_msg",[t("tau_planet",[S().red]),t("tau_planet",[x[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 _($(this)[0])?(e.race.womling_friend=1,rn(),!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 _($(this)[0])?(e.race.womling_god=1,rn(),!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 _($(this)[0])?(e.race.womling_lord=1,rn(),!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 a=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 r=r+`
${t("tau_red_jeff_effect2",[e.tauceti.overseer?e.tauceti.overseer.working:0])}
`,r=r+`
${t("tau_red_jeff_effect3",[a])}
`,r=r+`
${t("tau_red_jeff_effect4",[e.tauceti.overseer?e.tauceti.overseer.loyal:0])}
`,r=r+`
${t("tau_red_jeff_effect5",[e.tauceti.overseer?e.tauceti.overseer.morale:0])}
`,e.tech.hasOwnProperty("womling_tech")&&(r=r+`
${t("tau_red_jeff_effect6",[e.tech.womling_tech])}
`),r=r+`
${t("job_farmer")}: ${e.tauceti.womling_farm?e.tauceti.womling_farm.farmers:0}
`,r=r+`
${t("job_miner")}: ${e.tauceti.womling_mine?e.tauceti.womling_mine.miners:0}
`,e.tauceti.womling_lab&&(r=r+`
${t("job_scientist")}: ${e.tauceti.womling_lab?e.tauceti.womling_lab.scientist:0}
`),r},action(){return!1}},overseer:{id:"tauceti-overseer",title(){return $(this)[0].name()},desc(){return`
${$(this)[0].name()}
${t("space_support",[S().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(a){return m("overseer",a,6e6,1.28,"tauceti")},Cement(a){return m("overseer",a,245e4,1.28,"tauceti")},Alloy(a){return e.race.womling_friend?m("overseer",a,185e4,1.28,"tauceti"):0},Neutronium(a){return e.race.womling_lord?m("overseer",a,165e3,1.28,"tauceti"):0},Titanium(a){return e.race.womling_god?m("overseer",a,225e4,1.28,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return a=a+`
${t("tau_red_overseer_effect",[$(this)[0].val()])}
`,a},val(){let a=0;return e.race.womling_lord?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_god?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?6:5:e.race.womling_friend&&(a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?10:8),e.race.lone_survivor&&(a*=2),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.overseer.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_village",a,1e7,1.28,"tauceti")},Stone(a){return m("womling_village",a,225e4,1.28,"tauceti")},Plywood(a){return m("womling_village",a,ra(125e4),1.28,"tauceti")},Wrought_Iron(a){return m("womling_village",a,ra(4e5),1.28,"tauceti")}},effect(){let a=e.tech.womling_pop&&e.tech.womling_pop>=2?6:5,r=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return r=r+`
${t("tau_red_womling_village_effect",[a])}
`,e.tech.tau_junksale&&(r=r+`
${t("tau_red_womling_village_effect2",[40,t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`)])}
`),r},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_village.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_farm",a,24e6,1.28,"tauceti")},Iron(a){return m("womling_farm",a,95e5,1.28,"tauceti")},Water(a){return m("womling_farm",a,5e3,1.28,"tauceti")}},effect(){let a=e.tech.womling_pop?16:12;e.tech.womling_gene&&(a+=4);let r=e.tauceti.hasOwnProperty("womling_farm")?e.tauceti.womling_farm.farmers:0,i=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return i=i+`
${t("tau_red_womling_farm_effect",[a])}
`,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",[a/2*r])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_farm.count++,z($(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",[S().red])}
`},reqs:{tau_red:5},path:["truepath"],cost:{Money(a){return m("womling_mine",a,125e5,1.28,"tauceti")},Lumber(a){return m("womling_mine",a,128e5,1.28,"tauceti")},Steel(a){return m("womling_mine",a,45e5,1.28,"tauceti")}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return e.tech.isolation?e.race.lone_survivor?a=a+`
${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])}
`:a=a+`
${t("tau_red_womling_mine_effect_b",[e.resource.Unobtainium.name,e.resource.Uranium.name,e.resource.Titanium.name])}
`:a=a+`
${t("tau_red_womling_mine_effect_a",[e.resource.Unobtainium.name])}
`,a=a+`
${t("tau_red_womling_employ",[6])}
`,a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_mine.count++,e.resource.Unobtainium.display=!0,z($(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",[S().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(a){return m("womling_fun",a,38e5,1.28,"tauceti")},Food(a){return e.race.womling_friend?m("womling_fun",a,175e3,1.28,"tauceti"):0},Lumber(a){return m("womling_fun",a,5e5,1.28,"tauceti")},Stone(a){return m("womling_fun",a,5e5,1.28,"tauceti")},Furs(a){return e.race.womling_lord||e.race.womling_god?m("womling_fun",a,835e3,1.28,"tauceti"):0},Copper(a){return e.race.womling_lord?m("womling_fun",a,1125e3,1.28,"tauceti"):0},Alloy(a){return e.race.womling_god?m("womling_fun",a,656e3,1.28,"tauceti"):0},Water(a){return e.race.womling_friend?m("womling_fun",a,3500,1.28,"tauceti"):0}},effect(){let a=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return a=a+`
${t("tau_red_womling_fun_effect",[$(this)[0].val()])}
`,a},val(){let a=0;return e.race.womling_lord?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?24:20:e.race.womling_god?a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?12:10:e.race.womling_friend&&(a=e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5?18:15),e.race.lone_survivor&&(a*=2),a},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_fun.count++,z($(this)[0]),!0):!1}},womling_lab:{id:"tauceti-womling_lab",title:t("interstellar_laboratory_title"),desc(){return`
${t("interstellar_laboratory_title")}
${t("space_support",[S().red])}
`},reqs:{tau_red:7},path:["truepath"],cost:{Money(a){return m("womling_lab",a,65e6,1.28,"tauceti")},Elerium(a){return m("womling_lab",a,1200,1.28,"tauceti")},Orichalcum(a){return m("womling_lab",a,25e5,1.28,"tauceti")},Unobtainium(a){return m("womling_lab",a,1e4,1.28,"tauceti")},Quantium(a){return m("womling_lab",a,ra(95e3),1.28,"tauceti")}},effect(){let a=e.tauceti.hasOwnProperty("overseer")?e.tauceti.overseer.prod:100,r=Math.round(25e3*a/100),i=`
${t("tau_new_support",[$(this)[0].support(),S().red])}
`;return i=i+`
${t("tau_red_womling_lab_effect",[r])}
`,i=i+`
${t("tau_red_womling_employ_single",[1])}
`,i},s_type:"tau_red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.tauceti.womling_lab.count++,z($(this)[0]),!0):!1}}},tau_gas:{info:{name(a,r){let i=r||"gas_name",s=i==="gas_name"?0:1;if(a||e.race[i])switch(a||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",[S().gas]);case 2:return t("tau_gas_title0a",[S().gas]);default:return t("tau_gas_title0b",[S().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",[x[e.race.gods].solar.gas]);case 2:return t("tau_gas_title3b",[x[e.race.old_gods].name]);default:return t("tau_gas_title3c",[x[e.race.species].name])}case 5:switch(Math.round(e.stats.portals+s)%3){case 1:return t("tau_gas_title4a",[S().gas]);case 2:return t("tau_gas_title4b",[We("reverse",S().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!!_($(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(a){return m("refueling_station",a,68e6,1.28,"tauceti")},Graphene(a){return m("refueling_station",a,25e5,1.28,"tauceti")},Unobtainium(a){return m("refueling_station",a,5500,1.28,"tauceti")},Mythril(a){return m("refueling_station",a,ra(6e4),1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:5)},effect(){let a=+te("refueling_station").toFixed(2),r=E(1e4),i=`
${t("space_gas_mining_effect1",[a])}
`;if(i=i+`
${t("plus_max_resource",[r.toLocaleString(),e.resource.Helium_3.name])}
`,e.tech.tau_whale>=2){let s=E(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 _($(this)[0])?(e.tauceti.refueling_station.count++,z($(this)[0]),!0):!1},post(){e.tech.tau_gas===2&&(e.tech.tau_gas=3,le())}},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(a){return m("ore_refinery",a,52e6,1.28,"tauceti")},Iridium(a){return m("ore_refinery",a,16e5,1.28,"tauceti")},Unobtainium(a){return m("ore_refinery",a,800,1.28,"tauceti")},Sheet_Metal(a){return m("ore_refinery",a,ra(118e3),1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:8)},smelting(){return e.tech.isolation?12:4},effect(){let a=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.fill:0,r=e.tauceti.hasOwnProperty("ore_refinery")?e.tauceti.ore_refinery.max:0,i=+te("ore_refinery").toFixed(2),s=`
${t("tau_gas_ore_refinery_effect",[+a.toFixed(2)])}
`;return s=s+`
${t("tau_gas_ore_refinery_effect2",[r])}
`,s=s+`
${t("tau_gas_ore_refinery_effect3",[i])}
`,s=s+`
${t("interstellar_stellar_forge_effect3",[$(this)[0].smelting()])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},special:!0,action(){if(_($(this)[0])){if(e.tauceti.ore_refinery.count++,z($(this)[0])){let a=$(this)[0].smelting();e.city.smelter.cap+=a,e.city.smelter.Steel+=a,e.race.evil?e.city.smelter.Wood+=a:e.city.smelter.Oil+=a}return!0}return!1},post(){e.tech.tau_roid===3&&(e.tech.tau_roid=4,ia(),le())}},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(a){return m("whaling_station",a,72e6,1.28,"tauceti")},Steel(a){return m("whaling_station",a,18e5,1.28,"tauceti")},Polymer(a){return m("whaling_station",a,955e3,1.28,"tauceti")},Orichalcum(a){return m("whaling_station",a,268e3,1.28,"tauceti")}},powered(){return N(e.tech.isolation?2:6)},effect(){let a=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.fill:0,r=e.tauceti.hasOwnProperty("whaling_station")?e.tauceti.whaling_station.max:0,i=+te("whaling_station").toFixed(2),s=`
${t("tau_gas_whaling_station_effect",[+a.toFixed(2)])}
`;return s=s+`
${t("tau_gas_whaling_station_effect2",[r])}
`,s=s+`
${t("tau_gas_whaling_station_effect3",[i])}
`,s=s+`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return _($(this)[0])?(e.tauceti.whaling_station.count++,z($(this)[0]),!0):!1},post(){e.tech.tau_whale===1&&(e.tech.tau_whale=2,ia())}},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(a){return m("womling_station",a,1334e5,1.26,"tauceti")},Furs(a){return m("womling_station",a,3805e3,1.26,"tauceti")},Aluminium(a){return m("womling_station",a,85e5,1.26,"tauceti")},Nano_Tube(a){return m("womling_station",a,909e3,1.26,"tauceti")}},powered(){return N(e.tech.isolation?3:6)},effect(){let a=e.tech.isolation?30:8;e.tech.womling_gene&&(a*=1.25);let r=`
${t("tau_gas_womling_station_effect",[a,be.tau_gas.info.name()])}
`;return e.race.flier||(r=r+`
${t("city_cement_plant_effect1",[F(1)])}
`),r=r+`
${t("space_red_fabrication_effect1",[F(1)])}
`,r=r+`
${t("minus_power",[$(this)[0].powered()])}
`,r},action(){return _($(this)[0])?(e.civic.craftsman.display=!0,e.tauceti.womling_station.count++,z($(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(a,r){return+de(125e4,!1,r).toFixed(0)}},effect(){return t("tau_roid_mission_effect",[t("tau_roid_title")])},action(){return _($(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(a){return m("patrol_ship",a,45e6,1.25,"tauceti")},Adamantite(a){return m("patrol_ship",a,18e5,1.25,"tauceti")},Elerium(a){return m("patrol_ship",a,520,1.25,"tauceti")},Stanene(a){return m("patrol_ship",a,2675e3,1.25,"tauceti")},Bolognium(a){return m("patrol_ship",a,115e4,1.25,"tauceti")}},effect(){let a=+de($(this)[0].support_fuel().a).toFixed(1),r=`
${t("tau_roid_patrol_ship_security",[$(this)[0].support()])}
`;return r=r+`
${t("tau_roid_patrol_ship_effect")}
`,r=r+`
${t("spend",[a,e.resource[$(this)[0].support_fuel().r].name])}
`,r},support_fuel(){return{r:"Helium_3",a:e.tech.isolation?15:250}},support(){return 1},powered(){return 0},refresh:!0,action(){return _($(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(a){return m("mining_ship",a,28e6,1.28,"tauceti")},Uranium(a){return m("mining_ship",a,12500,1.28,"tauceti")},Titanium(a){return m("mining_ship",a,22e5,1.28,"tauceti")},Alloy(a){return m("mining_ship",a,175e4,1.28,"tauceti")}},effect(){let a=+de($(this)[0].support_fuel().a).toFixed(1),r=+te("mining_ship").toFixed(2),i=`
${t("tau_roid_mining_ship_effect",[r])}
`;return i=i+`
${t("spend",[a,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 _($(this)[0])?(e.tauceti.mining_ship.count++,z($(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(a){return m("whaling_ship",a,35e6,1.28,"tauceti")},Aluminium(a){return m("whaling_ship",a,34e5,1.28,"tauceti")},Neutronium(a){return m("whaling_ship",a,168e3,1.28,"tauceti")},Nano_Tube(a){return m("whaling_ship",a,8e5,1.28,"tauceti")}},effect(){let a=+de($(this)[0].support_fuel().a).toFixed(1),r=+te("whaling_ship").toFixed(2),i=`
${t("tau_roid_whaling_ship_effect",[r])}
`;return i=i+`
${t("spend",[a,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 _($(this)[0])?(e.tauceti.whaling_ship.count++,z($(this)[0]),!0):!1}}},tau_gas2:{info:{name(a){return be.tau_gas.info.name(a||e.race.gas_name2||!1,"gas_name2")},desc(){return t("tau_gas2_desc",[be.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!!_($(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",[be.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.alien_station={count:0},I(t("tau_gas2_alien_station_msg",[be.tau_gas2.info.name()]),"info",!1,["progress"]),!0):!1}},alien_station:{id:"tauceti-alien_station",title:t("tau_gas2_alien_station"),desc(a){return!e.tauceti.hasOwnProperty("alien_station")||e.tauceti.alien_station.count<100||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?12e6:5e7:0},Aluminium(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256e3:256e4:0},Polymer(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?198900:989e3:0},Mythril(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?ra(125e3):0},Cipher(a){return(a||0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0)<100?e.race.lone_survivor?256:2001:0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("alien_station")?e.tauceti.alien_station.count:0);return i<100?(r+=`
${t("tau_gas2_alien_station_repaired",[i])}
`,r):be.tau_gas2.alien_space_station.effect(a)},action(){return _($(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),ia()}},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 a=$(this)[0].p_fuel().a,r=`
${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),r=r+`
${t("tau_gas2_alien_station_effect",[s])}
`}return r=r+`
${t("spend",[a,e.resource[$(this)[0].p_fuel().r].name])}
`,r},p_fuel(){return{r:"Elerium",a:e.race.lone_survivor?1:10}},powered(){return at(-75)},action(){return!1}},matrioshka_brain:{id:"tauceti-matrioshka_brain",title:t("tech_matrioshka_brain"),desc(a){return!e.tauceti.hasOwnProperty("matrioshka_brain")||e.tauceti.matrioshka_brain.count<1e3||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?2e7:0},Neutronium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?45e3:0},Nano_Tube(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?16e4:0},Adamantite(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?666e3:0},Stanene(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?61600:0},Bolognium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?44e3:0},Unobtainium(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?1200:0},Mythril(a){return(a||0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0)<1e3?ra(64e3):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("matrioshka_brain")?e.tauceti.matrioshka_brain.count:0);return i<1e3&&(r+=`
${t("tau_gas2_matrioshka_brain_seg",[1e3-i])}
`),r},action(){return _($(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(a){return!e.tauceti.hasOwnProperty("ignition_device")||e.tauceti.ignition_device.count<10||a?`
${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(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e7:0},Uranium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?5e4:0},Elerium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?25e3:0},Graphene(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?225e5:0},Orichalcum(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?15e6:0},Quantium(a){return(a||0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0)<10?ra(8e6):0}},effect(a){let r="",i=(a?.count??0)+(e.tauceti.hasOwnProperty("ignition_device")?e.tauceti.ignition_device.count:0);return i<10&&(r+=`
${t("tau_gas2_ignition_device_seg",[10-i])}
`),r},action(){return _($(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",[be.tau_gas2.info.name()])},desc(){return t("tau_gas2_ignite_gas_giant",[be.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 a=`
${t("tau_gas2_ignite_gas_giant_effect",[t("tech_matrioshka_brain")])}
`;return e.tech.m_brain?(a=a+`
${t("tau_gas2_ignite_gas_giant_effect3")}
`,a+=Ml()):a=a+`
${t("tau_gas2_ignite_gas_giant_effect2",[t("tech_matrioshka_brain")])}
`,a},action(){return e.tech.m_brain&&_($(this)[0])?(Pc(),!0):!1}}}};for(let a=1;a<9;a++)be.tau_gas[`gas_contest-a${a}`]={id:`tauceti-gas_contest-a${a}`,title(){return be.tau_gas.info.name(a)},desc(){return be.tau_gas.info.name(a)},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(a===8?"tau_gas_contest_reject":"tau_gas_contest_pick",[be.tau_gas.info.name(a)])},action(){return _($(this)[0])?(e.race.gas_name=a,e.tauceti.refueling_station={count:0,on:0},!0):!1}},be.tau_gas2[`gas_contest-b${a}`]={id:`tauceti-gas_contest-b${a}`,title(){return be.tau_gas2.info.name(a)},desc(){return be.tau_gas2.info.name(a)},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(a===8?"tau_gas2_contest_reject":"tau_gas_contest_pick",[be.tau_gas2.info.name(a)])},action(){return _($(this)[0])?(e.race.gas_name2=a,!0):!1}};function Cc(){let a=ke("matrix"),r=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",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function Ml(){let a=ke("retired"),r=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",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
${i}`}function Cl(){let a=ke("eden"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("tau_star_matrix_servants",[1])}
`}function rn(){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 Ol(a){return e.tech.womling_tech&&e.tech.womling_logistics&&e.tech.womling_logistics>=2&&(a*=.94**e.tech.womling_tech),a}function ra(a){return e.tech.womling_tech&&e.tech.womling_recycling&&e.tech.womling_recycling>=1&&(a*=(e.tech.isolation?.97:.98)**e.tech.womling_tech),a}function Br(){return on}function Oc(){return be}function It(){return!!(e.tech.tauceti&&e.tech.tauceti>=4)}function Sc(a,r,i){switch(a){case"tauceti":return Vt(be,r,i)}}function ia(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==6))return;let a=$("#tauceti");A(a),a.append($(`

${t("tab_tauceti")}

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

${s}

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

${s}

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

${s}

${n}
`);B(r,function(){return typeof be[r].info.desc=="string"?be[r].info.desc:be[r].info.desc()},{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(be[r]).forEach(function(c){if(c!=="info"&&Vt(be,r,c)){let o=be[r][c];Ut(o,"tauceti",c)}}),be[r].info.hasOwnProperty("extra")&&be[r].info.extra(r)}})}function ln(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==5))&&(un(),Gr(),A($("#dwarfShipYard")),e.space.hasOwnProperty("shipyard")&&e.settings.showShipYard)){let a=$("#dwarfShipYard");e.space.shipyard.hasOwnProperty("blueprint")||(e.space.shipyard.blueprint={class:"corvette",armor:"steel",weapon:"railgun",engine:"ion",power:"diesel",sensor:"radar",name:sn()});let r=$('
');a.append(r);let i=$('
');r.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")}
`),r.append('
');let s=$('
');r.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(l){let u="";n[l].forEach(function(d,h){u+=`${t(`outer_shipyard_${l}_${d}`)}`}),s.append(` ${u} @@ -6,7 +6,7 @@ ${n} - `;if(e.space.shipyard.expand){let l=`${t(`outer_shipyard_engine_${s.engine}`)} ${t(`outer_shipyard_class_${s.class}`)}`,u=$(`
`),d=$(`
${s.name} | ${t("outer_shipyard_scrap")} | ${l} | ${t(`outer_shipyard_weapon_${s.weapon}`)} | ${t(`outer_shipyard_power_${s.power}`)} | ${t(`outer_shipyard_armor_${s.armor}`)} | ${t(`outer_shipyard_sensor_${s.sensor}`)}
`),h=$('
'),p=$('
'),f=$(`
${o}
`);h.append(`${t("crew")} `),h.append(`${t("firepower")} `),h.append(`${t("outer_shipyard_sensors")} `),h.append(`${t("speed")} `),h.append(`${t("outer_shipyard_fuel")} `),h.append(`${t("outer_shipyard_hull")} `),p.append(``),u.append(d),u.append(h),u.append(p),u.append(f),a.append(u)}else{let l=$(`
`),u=$('
'),d=$('
'),h=$(`
${o}
`);u.append(`${s.name} | `),u.append(`${t("firepower")} `),u.append(`${t("outer_shipyard_sensors")} `),u.append(`${t("speed")} `),u.append(`${t("outer_shipyard_fuel")} `),u.append(`${t("outer_shipyard_hull")} `),d.append(``),l.append(u),l.append(d),l.append(h),a.append(l)}C({el:`#shipReg${i}`,data:e.space.shipyard.ships[i],methods:{scrap(l){e.space.shipyard.ships[l]&&e.space.shipyard.ships[l].location==="spc_dwarf"&&(e.space.shipyard.ships.splice(l,1),yr(),Zi())},scrapAllowed(l){return!!(e.space.shipyard.ships[l]&&e.space.shipyard.ships[l].location==="spc_dwarf")},setLoc(l,u){let d=e.space.shipyard.ships[u];if(l!==d.location){let h=fi(d),p=d.transit>0||d.location!=="spc_dwarf";if(p||e.civic.garrison.workers-e.civic.garrison.crew>=h){let f=nn(d,l),g=cn(d.xy,f),w=Er(d);d.location=l,d.transit=Math.round(g/w),d.dist=Math.round(g/w),d.origin=Be(d.xy),d.destination={x:f.x,y:f.y},p||(e.civic.garrison.crew+=h),yr(),ie(`ship${u}loc${l}`)}}},crewText(l){return fi(e.space.shipyard.ships[l])},fireText(l){return Kr(e.space.shipyard.ships[l])},sensorText(l){return Nr(e.space.shipyard.ships[l])+"km"},speedText(l){let u=7.695363719135802*Er(e.space.shipyard.ships[l]);return Math.round(u)+"km/s"},fuelText(l){let u=jc(e.space.shipyard.ships[l]);return u.res?`${u.burn} ${e.resource[u.res].name}/s`:"N/A"},hullText(l){return`${100-e.space.shipyard.ships[l].damage}%`},hullDamage(l){return e.space.shipyard.ships[l].damage<=10?"has-text-success":e.space.shipyard.ships[l].damage>=40&&e.space.shipyard.ships[l].damage<65?"has-text-caution":e.space.shipyard.ships[l].damage>=65?"has-text-danger":""},dest(l){let u=s.class==="explorer"?t("tech_era_tauceti"):typeof r[e.space.shipyard.ships[l].location].info.name=="string"?r[e.space.shipyard.ships[l].location].info.name:r[e.space.shipyard.ships[l].location].info.name();return t("outer_shipyard_arrive",[u,e.space.shipyard.ships[l].transit])},show(l){return e.space.shipyard.ships[l].transit>0}}}),s.class==="explorer"?s.location!=="tauceti"&&B(`ship${i}loctauceti`,function(){return t("transit_time",[Math.round(cn(s.xy,nn(s,"tauceti"))/Er(s))])},{elm:`#ship${i}loc .tauceti`,placement:"left"}):Object.keys(r).forEach(function(l){(r[l].info.syndicate()||l==="spc_dwarf")&&s.location!==l&&B(`ship${i}loc${l}`,function(){return t("transit_time",[Math.round(cn(s.xy,nn(s,l))/Er(s))])},{elm:`#ship${i}loc .${l}`,placement:"left"})})}jl()}function nn(a,r){if(tt[r].orbit===-2)return Dr(r);let i=Math.sqrt((a.xy.x-Yi(r))**2+a.xy.y**2),s=Er(a)/225,n=Xi(1,r),c=Math.abs(i-tt[r].dist),o=Math.abs(i+tt[r].dist),l=Math.abs(i-tt[r].dist*n),u=Math.abs(i+tt[r].dist*n),d=Math.floor(Math.min(c,l,o,u)/s),h=Math.ceil(Math.max(c,l,o,u)/s);i>=tt[r].dist&&i<=tt[r].dist*n&&(d=0);let f=360/(tt[r].orbit===-1?e.city.calendar.orbit:tt[r].orbit),g=(e.space.position[r]+d*f)%360,w=Math.PI/180;for(let v=d;v<=h;v++){let k=Xi(Math.cos(g*w)*tt[r].dist,r);k+=Yi(r);let P=Math.sin(g*w)*tt[r].dist;if(Math.sqrt((k-a.xy.x)**2+(P-a.xy.y)**2)/s<=v)return{x:k,y:P};g=(g+f)%360}return Dr(r)}function Sa(a,r){if(!e.tech.isolation&&e.tech.syndicate&&e.race.truepath&&e.space.syndicate&&e.space.syndicate.hasOwnProperty(a)){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)),a){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=q.space[a].info.syndicate_cap();break;case"spc_triton":case"spc_kuiper":case"spc_eris":i=q.space[a].info.syndicate_cap();break}let n=e.space.syndicate[a],c=0,o=0,l=0;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){if(e.space.shipyard.ships.forEach(function(u){if(u.location===a&&u.transit===0&&u.fueled){let d=Kr(u);c+=u.damage>0?Math.round(d*(100-u.damage)/100):d,o+=Nr(u)}}),a==="spc_enceladus"&&Math.min(we.operating_base,G.operating_base)>0){let u=Math.min(we.operating_base,G.operating_base);c+=u*50}else a==="spc_titan"&&G.sam>0?c+=G.sam*25:a==="spc_triton"&&G.fob>0&&(c+=500,o+=10);o>100&&(o=Math.round((o-100)/(o-100+200)*100)+100),c=Math.round(c*((o+25)/125)),c>n&&(l=c-n),n=n-c>0?n-c:0}return r?{p:1-+(n/i).toFixed(4),r:n,s:o,o:l}:1-+(n/i).toFixed(4)}return r?{p:1,r:0,s:0,o:0}:1}function Nr(a){let r=1;switch(a.class){case"corvette":case"frigate":r=2;break;case"destroyer":case"cruiser":r=1.5;break;case"explorer":r=5;break;default:r=1;break}switch(a.sensor){case"visual":return 1;case"radar":return 10*r;case"lidar":return 18*r;case"quantum":return 32*r}}var tt={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 un(){e.space.position||(e.space.position={}),Object.keys(tt).forEach(function(a){e.space.position.hasOwnProperty(a)||(e.space.position[a]=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 Dr(a){let r=Xi(+Math.cos(e.space.position[a]*(Math.PI/180)).toFixed(5)*tt[a].dist,a),i=+Math.sin(e.space.position[a]*(Math.PI/180)).toFixed(5)*tt[a].dist;return r+=Yi(a),{x:r,y:i}}function cn(a,r){return Math.ceil(Math.sqrt((r.x-a.x)**2+(r.y-a.y)**2)*225)}function Lr(a,r,i){let s=1;switch(e.race.pack_rat&&(s*=1+b.pack_rat.vars()[1]/100),e.stats.achieve.blackhole&&(s*=1+e.stats.achieve.blackhole.l*.05),e.tech.world_control&&(s*=3),a){case"storehouse":{let n=i?e.space?.titan_spaceport?.on??0:G.titan_spaceport;n&&(s*=1+n*.25),r&&e.tech.shelving&&(s*=2),e.tech.shelving&&e.tech.shelving>=3&&(s*=1.5)}case"repository":e.tech.isolation&&(s*=3,e.tech.tp_depot&&(s*=1+e.tech.tp_depot/20));break}return s}function zc(){let a={city:{},space:{},ships:[]};a.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),Gr(),A($("#shipList")),Object.keys(q.city).forEach(function(i){e.city.hasOwnProperty(i)&&e.city[i].hasOwnProperty("count")&&(e.race.hooved&&q.city[i].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=q.city[i].cost.Horseshoe()*e.city[i].count),a.city[i]={c:e.city[i].count},e.city[i].count=0,e.city[i].hasOwnProperty("on")&&(a.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(q.space[i]).forEach(function(s){e.space.hasOwnProperty(s)&&e.space[s].hasOwnProperty("count")&&(e.race.hooved&&q.space[i][s].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=q.space[i][s].cost.Horseshoe()*e.space[s].count),a.space[s]={c:e.space[s].count},e.space[s].count=0,e.space[s].hasOwnProperty("on")&&(a.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,Ht("slave")),e.race.deconstructor&&rr.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(Rr).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 r=we.colony*be.tau_home.colony.citizens();e.resource[e.race.species].amount>r&&(e.resource[e.race.species].amount=r),Ht("spy"),Ht("spyop"),A($("#infoTimer")),e.race.inactive=a}function Ac(){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=ye("Monument"),pe(),ia(),ye("Physics"),Xe())}function zl(a){let r=0,i=a?e.space.ai_colonist.on:G.ai_colonist,s=a?e.space.decoder.on:we.decoder,n=a?e.space.shock_trooper.on:we.shock_trooper,c=a?e.space.tank.on:we.tank;return i&&s&&(r+=i*s*.35),n&&(r+=n*2),c&&(r+=c*2),r>100&&(r=100),r}function Xi(a,r){if(tt[r].orbit!==-2){let i=1.075+tt[r].dist/100;if(e.city.ptrait.includes("elliptical"))switch(r){case"spc_home":i=1.5;break;default:i=1.275+tt[r].dist/100;break}a*=i}return a}function Yi(a){if(tt[a].orbit!==-2){let r=tt[a].dist/3;return e.city.ptrait.includes("elliptical")&&a==="spc_home"&&(r+=.15),a==="spc_eris"&&(r+=25),r}return 0}var Oa,Je;function Ir(){let a=document.getElementById("mapCanvas"),r=a.getContext("2d");a.width=a.getBoundingClientRect().width,a.height=a.getBoundingClientRect().height,r.save(),r.fillStyle="#000000",r.fillRect(0,0,a.width,a.height),r.translate(Je.x,Je.y),r.scale(Oa,Oa);let i={};for(let[s,n]of Object.entries(tt))i[s]=Dr(s);r.lineWidth=1/Oa,r.strokeStyle="#c0c0c0";for(let[s,n]of Object.entries(tt))if(!n.moon&&n.orbit!==-2){r.beginPath(),n.belt||e.race.orbit_decayed&&s==="spc_home"?r.setLineDash([.01,.01]):r.setLineDash([]);let c=Yi(s);r.ellipse(c,0,Xi(n.dist,s),n.dist,0,0,Math.PI*2,!0),r.stroke()}r.fillStyle="#0000ff",r.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(r.beginPath(),r.setLineDash([.1,.4]),r.moveTo(s.xy.x,s.xy.y),r.lineTo(s.destination.x,s.destination.y),r.stroke());for(let[s,n]of Object.entries(tt)){if(e.race.orbit_decayed&&["spc_home","spc_moon"].includes(s))continue;let c="558888";if(q.space[s]&&q.space[s].info.syndicate()&&e.settings.space[s.substring(4)]){let l=Sa(s);c=((Math.round(255*(1-l))<<16)+(Math.round(255*l)<<8)).toString(16).padStart(6,0)}s==="spc_dwarf"?c="7132a8":(s==="spc_sun"||s==="tauceti")&&(c="f8ff2b"),r.fillStyle="#"+c,r.beginPath();let o=n.size/10;if(n.moon)switch(s){case"spc_moon":r.arc(i[s].x+.05,i[s].y+.05,o,0,Math.PI*2,!0);break;case"spc_titan":r.arc(i[s].x-.2,i[s].y-.2,o,0,Math.PI*2,!0);break;default:r.arc(i[s].x+.2,i[s].y+.2,o,0,Math.PI*2,!0);break}else{let l=n.size/10;switch(s){case"spc_sun":r.arc(i[s].x,i[s].y,l,0,Math.PI*2,!0);break;default:r.arc(i[s].x,i[s].y,l,0,Math.PI*2,!0);break}}r.fill()}r.fillStyle="#0000ff",r.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(r.beginPath(),r.arc(s.xy.x,s.xy.y,.1,0,Math.PI*2,!0),r.fill());r.shadowOffsetX=2,r.shadowOffsetY=2,r.shadowBlur=2,r.shadowColor="rgba(0, 0, 0, 0.5)",r.fillStyle="#009aff",r.font=`${20/Oa}px serif`;for(let s of e.space.shipyard.ships)s.transit>0&&r.fillText(s.name,s.xy.x+.15,s.xy.y-.15);r.fillStyle="#ffa500",r.font=`${25/Oa}px serif`;for(let[s,n]of Object.entries(tt))if(q.space[s]&&e.settings.space[s.substring(4)]){if(e.race.orbit_decayed&&["spc_home"].includes(s))continue;let c=q.space[s].info.name,o=typeof c=="function"?c():c;if(n.moon)switch(s){case"spc_moon":r.fillText(o,i[s].x+.1,i[s].y+.1);break;case"spc_titan":r.fillText(o,i[s].x-.3,i[s].y-.3);break;default:r.fillText(o,i[s].x+.25,i[s].y+.2);break}else switch(s){case"spc_sun":break;default:r.fillText(o,i[s].x,i[s].y-.2*n.size);break}}r.restore()}function Al(a){let r=$('
').appendTo(a),i={},s={},n=!1;Je={},Oa=20,r.append($('').on("mouseup mouseover mouseout",()=>n=!1).on("mousedown",o=>{n=!0,s.x=o.clientX-Je.x,s.y=o.clientY-Je.y}).on("mousemove",o=>{n&&(Je.x=o.clientX-s.x,Je.y=o.clientY-s.y,Ir())}).on("wheel",o=>(o.originalEvent.deltaY<0?(Oa/=.8,Je.x=i.x+(Je.x-i.x)/.8,Je.y=i.y+(Je.y-i.y)/.8,Ir()):(Oa*=.8,Je.x=i.x+(Je.x-i.x)*.8,Je.y=i.y+(Je.y-i.y)*.8,Ir()),!1)),$('').on("click",()=>{Oa/=.8,Je.x=i.x+(Je.x-i.x)/.8,Je.y=i.y+(Je.y-i.y)/.8,Ir()}),$('').on("click",()=>{Oa*=.8,Je.x=i.x+(Je.x-i.x)*.8,Je.y=i.y+(Je.y-i.y)*.8,Ir()}));let c=document.getElementById("mapCanvas").getBoundingClientRect();i.x=c.width/2,i.y=c.height/2,Je.x=i.x,Je.y=i.y,Ir()}function Tl(){$("#modalBox").append($('

Solar System

')),Al($("#modalBox"))}function Hr(a){switch(a){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?x[e.race.species].home:We("name")]);case"outer_local_space":return t("outer_sol_system",[e.race.truepath?x[e.race.species].home:We("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(a)}}function ir(a){switch(e.settings.tabLoad?Ie("page_view",{page_title:"Evolve - All Tabs"}):(mn(),is(),as(),en(),rs(),Gr(),A($("#mTabCivil")),A($("#mTabCivic")),A($("#mTabResearch")),A($("#mTabResource")),A($("#mTabArpa")),A($("#mTabStats")),A($("#mTabObserve"))),a){case 0:e.settings.tabLoad||(Ie("page_view",{page_title:"Evolve - Evolution"}),ss());break;case 1:case"mTabCivil":e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append(` +
`;if(e.space.shipyard.expand){let l=`${t(`outer_shipyard_engine_${s.engine}`)} ${t(`outer_shipyard_class_${s.class}`)}`,u=$(`
`),d=$(`
${s.name} | ${t("outer_shipyard_scrap")} | ${l} | ${t(`outer_shipyard_weapon_${s.weapon}`)} | ${t(`outer_shipyard_power_${s.power}`)} | ${t(`outer_shipyard_armor_${s.armor}`)} | ${t(`outer_shipyard_sensor_${s.sensor}`)}
`),h=$('
'),p=$('
'),f=$(`
${o}
`);h.append(`${t("crew")} `),h.append(`${t("firepower")} `),h.append(`${t("outer_shipyard_sensors")} `),h.append(`${t("speed")} `),h.append(`${t("outer_shipyard_fuel")} `),h.append(`${t("outer_shipyard_hull")} `),p.append(``),u.append(d),u.append(h),u.append(p),u.append(f),a.append(u)}else{let l=$(`
`),u=$('
'),d=$('
'),h=$(`
${o}
`);u.append(`${s.name} | `),u.append(`${t("firepower")} `),u.append(`${t("outer_shipyard_sensors")} `),u.append(`${t("speed")} `),u.append(`${t("outer_shipyard_fuel")} `),u.append(`${t("outer_shipyard_hull")} `),d.append(``),l.append(u),l.append(d),l.append(h),a.append(l)}C({el:`#shipReg${i}`,data:e.space.shipyard.ships[i],methods:{scrap(l){e.space.shipyard.ships[l]&&e.space.shipyard.ships[l].location==="spc_dwarf"&&(e.space.shipyard.ships.splice(l,1),yr(),Zi())},scrapAllowed(l){return!!(e.space.shipyard.ships[l]&&e.space.shipyard.ships[l].location==="spc_dwarf")},setLoc(l,u){let d=e.space.shipyard.ships[u];if(l!==d.location){let h=fi(d),p=d.transit>0||d.location!=="spc_dwarf";if(p||e.civic.garrison.workers-e.civic.garrison.crew>=h){let f=nn(d,l),g=cn(d.xy,f),w=Er(d);d.location=l,d.transit=Math.round(g/w),d.dist=Math.round(g/w),d.origin=Be(d.xy),d.destination={x:f.x,y:f.y},p||(e.civic.garrison.crew+=h),yr(),ie(`ship${u}loc${l}`)}}},crewText(l){return fi(e.space.shipyard.ships[l])},fireText(l){return Kr(e.space.shipyard.ships[l])},sensorText(l){return Nr(e.space.shipyard.ships[l])+"km"},speedText(l){let u=7.695363719135802*Er(e.space.shipyard.ships[l]);return Math.round(u)+"km/s"},fuelText(l){let u=jc(e.space.shipyard.ships[l]);return u.res?`${u.burn} ${e.resource[u.res].name}/s`:"N/A"},hullText(l){return`${100-e.space.shipyard.ships[l].damage}%`},hullDamage(l){return e.space.shipyard.ships[l].damage<=10?"has-text-success":e.space.shipyard.ships[l].damage>=40&&e.space.shipyard.ships[l].damage<65?"has-text-caution":e.space.shipyard.ships[l].damage>=65?"has-text-danger":""},dest(l){let u=s.class==="explorer"?t("tech_era_tauceti"):typeof r[e.space.shipyard.ships[l].location].info.name=="string"?r[e.space.shipyard.ships[l].location].info.name:r[e.space.shipyard.ships[l].location].info.name();return t("outer_shipyard_arrive",[u,e.space.shipyard.ships[l].transit])},show(l){return e.space.shipyard.ships[l].transit>0}}}),s.class==="explorer"?s.location!=="tauceti"&&B(`ship${i}loctauceti`,function(){return t("transit_time",[Math.round(cn(s.xy,nn(s,"tauceti"))/Er(s))])},{elm:`#ship${i}loc .tauceti`,placement:"left"}):Object.keys(r).forEach(function(l){(r[l].info.syndicate()||l==="spc_dwarf")&&s.location!==l&&B(`ship${i}loc${l}`,function(){return t("transit_time",[Math.round(cn(s.xy,nn(s,l))/Er(s))])},{elm:`#ship${i}loc .${l}`,placement:"left"})})}jl()}function nn(a,r){if(tt[r].orbit===-2)return Dr(r);let i=Math.sqrt((a.xy.x-Yi(r))**2+a.xy.y**2),s=Er(a)/225,n=Xi(1,r),c=Math.abs(i-tt[r].dist),o=Math.abs(i+tt[r].dist),l=Math.abs(i-tt[r].dist*n),u=Math.abs(i+tt[r].dist*n),d=Math.floor(Math.min(c,l,o,u)/s),h=Math.ceil(Math.max(c,l,o,u)/s);i>=tt[r].dist&&i<=tt[r].dist*n&&(d=0);let f=360/(tt[r].orbit===-1?e.city.calendar.orbit:tt[r].orbit),g=(e.space.position[r]+d*f)%360,w=Math.PI/180;for(let v=d;v<=h;v++){let k=Xi(Math.cos(g*w)*tt[r].dist,r);k+=Yi(r);let P=Math.sin(g*w)*tt[r].dist;if(Math.sqrt((k-a.xy.x)**2+(P-a.xy.y)**2)/s<=v)return{x:k,y:P};g=(g+f)%360}return Dr(r)}function Sa(a,r){if(!e.tech.isolation&&e.tech.syndicate&&e.race.truepath&&e.space.syndicate&&e.space.syndicate.hasOwnProperty(a)){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)),a){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=q.space[a].info.syndicate_cap();break;case"spc_triton":case"spc_kuiper":case"spc_eris":i=q.space[a].info.syndicate_cap();break}let n=e.space.syndicate[a],c=0,o=0,l=0;if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){if(e.space.shipyard.ships.forEach(function(u){if(u.location===a&&u.transit===0&&u.fueled){let d=Kr(u);c+=u.damage>0?Math.round(d*(100-u.damage)/100):d,o+=Nr(u)}}),a==="spc_enceladus"&&Math.min(we.operating_base,G.operating_base)>0){let u=Math.min(we.operating_base,G.operating_base);c+=u*50}else a==="spc_titan"&&G.sam>0?c+=G.sam*25:a==="spc_triton"&&G.fob>0&&(c+=500,o+=10);o>100&&(o=Math.round((o-100)/(o-100+200)*100)+100),c=Math.round(c*((o+25)/125)),c>n&&(l=c-n),n=n-c>0?n-c:0}return r?{p:1-+(n/i).toFixed(4),r:n,s:o,o:l}:1-+(n/i).toFixed(4)}return r?{p:1,r:0,s:0,o:0}:1}function Nr(a){let r=1;switch(a.class){case"corvette":case"frigate":r=2;break;case"destroyer":case"cruiser":r=1.5;break;case"explorer":r=5;break;default:r=1;break}switch(a.sensor){case"visual":return 1;case"radar":return 10*r;case"lidar":return 18*r;case"quantum":return 32*r}}var tt={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 un(){e.space.position||(e.space.position={}),Object.keys(tt).forEach(function(a){e.space.position.hasOwnProperty(a)||(e.space.position[a]=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 Dr(a){let r=Xi(+Math.cos(e.space.position[a]*(Math.PI/180)).toFixed(5)*tt[a].dist,a),i=+Math.sin(e.space.position[a]*(Math.PI/180)).toFixed(5)*tt[a].dist;return r+=Yi(a),{x:r,y:i}}function cn(a,r){return Math.ceil(Math.sqrt((r.x-a.x)**2+(r.y-a.y)**2)*225)}function Lr(a,r,i){let s=1;switch(e.race.pack_rat&&(s*=1+b.pack_rat.vars()[1]/100),e.stats.achieve.blackhole&&(s*=1+e.stats.achieve.blackhole.l*.05),e.tech.world_control&&(s*=3),a){case"storehouse":{let n=i?e.space?.titan_spaceport?.on??0:G.titan_spaceport;n&&(s*=1+n*.25),r&&e.tech.shelving&&(s*=2),e.tech.shelving&&e.tech.shelving>=3&&(s*=1.5)}case"repository":e.tech.isolation&&(s*=3,e.tech.tp_depot&&(s*=1+e.tech.tp_depot/20));break}return s}function zc(){let a={city:{},space:{},ships:[]};a.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),Gr(),A($("#shipList")),Object.keys(q.city).forEach(function(i){e.city.hasOwnProperty(i)&&e.city[i].hasOwnProperty("count")&&(e.race.hooved&&q.city[i].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=q.city[i].cost.Horseshoe()*e.city[i].count),a.city[i]={c:e.city[i].count},e.city[i].count=0,e.city[i].hasOwnProperty("on")&&(a.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(q.space[i]).forEach(function(s){e.space.hasOwnProperty(s)&&e.space[s].hasOwnProperty("count")&&(e.race.hooved&&q.space[i][s].cost.hasOwnProperty("Horseshoe")&&(e.race.shoecnt-=q.space[i][s].cost.Horseshoe()*e.space[s].count),a.space[s]={c:e.space[s].count},e.space[s].count=0,e.space[s].hasOwnProperty("on")&&(a.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,Ht("slave")),e.race.deconstructor&&rr.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(Rr).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 r=we.colony*be.tau_home.colony.citizens();e.resource[e.race.species].amount>r&&(e.resource[e.race.species].amount=r),Ht("spy"),Ht("spyop"),A($("#infoTimer")),e.race.inactive=a}function Ac(){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=ye("Monument"),le(),ia(),ye("Physics"),Xe())}function zl(a){let r=0,i=a?e.space.ai_colonist.on:G.ai_colonist,s=a?e.space.decoder.on:we.decoder,n=a?e.space.shock_trooper.on:we.shock_trooper,c=a?e.space.tank.on:we.tank;return i&&s&&(r+=i*s*.35),n&&(r+=n*2),c&&(r+=c*2),r>100&&(r=100),r}function Xi(a,r){if(tt[r].orbit!==-2){let i=1.075+tt[r].dist/100;if(e.city.ptrait.includes("elliptical"))switch(r){case"spc_home":i=1.5;break;default:i=1.275+tt[r].dist/100;break}a*=i}return a}function Yi(a){if(tt[a].orbit!==-2){let r=tt[a].dist/3;return e.city.ptrait.includes("elliptical")&&a==="spc_home"&&(r+=.15),a==="spc_eris"&&(r+=25),r}return 0}var Oa,Je;function Ir(){let a=document.getElementById("mapCanvas"),r=a.getContext("2d");a.width=a.getBoundingClientRect().width,a.height=a.getBoundingClientRect().height,r.save(),r.fillStyle="#000000",r.fillRect(0,0,a.width,a.height),r.translate(Je.x,Je.y),r.scale(Oa,Oa);let i={};for(let[s,n]of Object.entries(tt))i[s]=Dr(s);r.lineWidth=1/Oa,r.strokeStyle="#c0c0c0";for(let[s,n]of Object.entries(tt))if(!n.moon&&n.orbit!==-2){r.beginPath(),n.belt||e.race.orbit_decayed&&s==="spc_home"?r.setLineDash([.01,.01]):r.setLineDash([]);let c=Yi(s);r.ellipse(c,0,Xi(n.dist,s),n.dist,0,0,Math.PI*2,!0),r.stroke()}r.fillStyle="#0000ff",r.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(r.beginPath(),r.setLineDash([.1,.4]),r.moveTo(s.xy.x,s.xy.y),r.lineTo(s.destination.x,s.destination.y),r.stroke());for(let[s,n]of Object.entries(tt)){if(e.race.orbit_decayed&&["spc_home","spc_moon"].includes(s))continue;let c="558888";if(q.space[s]&&q.space[s].info.syndicate()&&e.settings.space[s.substring(4)]){let l=Sa(s);c=((Math.round(255*(1-l))<<16)+(Math.round(255*l)<<8)).toString(16).padStart(6,0)}s==="spc_dwarf"?c="7132a8":(s==="spc_sun"||s==="tauceti")&&(c="f8ff2b"),r.fillStyle="#"+c,r.beginPath();let o=n.size/10;if(n.moon)switch(s){case"spc_moon":r.arc(i[s].x+.05,i[s].y+.05,o,0,Math.PI*2,!0);break;case"spc_titan":r.arc(i[s].x-.2,i[s].y-.2,o,0,Math.PI*2,!0);break;default:r.arc(i[s].x+.2,i[s].y+.2,o,0,Math.PI*2,!0);break}else{let l=n.size/10;switch(s){case"spc_sun":r.arc(i[s].x,i[s].y,l,0,Math.PI*2,!0);break;default:r.arc(i[s].x,i[s].y,l,0,Math.PI*2,!0);break}}r.fill()}r.fillStyle="#0000ff",r.strokeStyle="#0000ff";for(let s of e.space.shipyard.ships)s.transit>0&&(r.beginPath(),r.arc(s.xy.x,s.xy.y,.1,0,Math.PI*2,!0),r.fill());r.shadowOffsetX=2,r.shadowOffsetY=2,r.shadowBlur=2,r.shadowColor="rgba(0, 0, 0, 0.5)",r.fillStyle="#009aff",r.font=`${20/Oa}px serif`;for(let s of e.space.shipyard.ships)s.transit>0&&r.fillText(s.name,s.xy.x+.15,s.xy.y-.15);r.fillStyle="#ffa500",r.font=`${25/Oa}px serif`;for(let[s,n]of Object.entries(tt))if(q.space[s]&&e.settings.space[s.substring(4)]){if(e.race.orbit_decayed&&["spc_home"].includes(s))continue;let c=q.space[s].info.name,o=typeof c=="function"?c():c;if(n.moon)switch(s){case"spc_moon":r.fillText(o,i[s].x+.1,i[s].y+.1);break;case"spc_titan":r.fillText(o,i[s].x-.3,i[s].y-.3);break;default:r.fillText(o,i[s].x+.25,i[s].y+.2);break}else switch(s){case"spc_sun":break;default:r.fillText(o,i[s].x,i[s].y-.2*n.size);break}}r.restore()}function Al(a){let r=$('
').appendTo(a),i={},s={},n=!1;Je={},Oa=20,r.append($('').on("mouseup mouseover mouseout",()=>n=!1).on("mousedown",o=>{n=!0,s.x=o.clientX-Je.x,s.y=o.clientY-Je.y}).on("mousemove",o=>{n&&(Je.x=o.clientX-s.x,Je.y=o.clientY-s.y,Ir())}).on("wheel",o=>(o.originalEvent.deltaY<0?(Oa/=.8,Je.x=i.x+(Je.x-i.x)/.8,Je.y=i.y+(Je.y-i.y)/.8,Ir()):(Oa*=.8,Je.x=i.x+(Je.x-i.x)*.8,Je.y=i.y+(Je.y-i.y)*.8,Ir()),!1)),$('').on("click",()=>{Oa/=.8,Je.x=i.x+(Je.x-i.x)/.8,Je.y=i.y+(Je.y-i.y)/.8,Ir()}),$('').on("click",()=>{Oa*=.8,Je.x=i.x+(Je.x-i.x)*.8,Je.y=i.y+(Je.y-i.y)*.8,Ir()}));let c=document.getElementById("mapCanvas").getBoundingClientRect();i.x=c.width/2,i.y=c.height/2,Je.x=i.x,Je.y=i.y,Ir()}function Tl(){$("#modalBox").append($('

Solar System

')),Al($("#modalBox"))}function Hr(a){switch(a){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?x[e.race.species].home:We("name")]);case"outer_local_space":return t("outer_sol_system",[e.race.truepath?x[e.race.species].home:We("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(a)}}function ir(a){switch(e.settings.tabLoad?Ie("page_view",{page_title:"Evolve - All Tabs"}):(mn(),is(),as(),en(),rs(),Gr(),A($("#mTabCivil")),A($("#mTabCivic")),A($("#mTabResearch")),A($("#mTabResource")),A($("#mTabArpa")),A($("#mTabStats")),A($("#mTabObserve"))),a){case 0:e.settings.tabLoad||(Ie("page_view",{page_title:"Evolve - Evolution"}),ss());break;case 1:case"mTabCivil":e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Civilization"}),$("#mTabCivil").append(` - `),C({el:"#mTabResearch",data:{s:e.settings,rq:e.r_queue},filters:{label(r){return Hr(r)}}}),Mi(),e.race.species!=="protoplasm"&&pe();break;case 4:case"mTabResource":e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append(` + `),C({el:"#mTabResearch",data:{s:e.settings,rq:e.r_queue},filters:{label(r){return Hr(r)}}}),Mi(),e.race.species!=="protoplasm"&&le();break;case 4:case"mTabResource":e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Resources"}),$("#mTabResource").append(` - `),C({el:"#mTabStats",data:{s:e.settings},filters:{label(r){return Hr(r)}}}),Tc();break;case 7:e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Settings"});break;case"mTabObserve":default:e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Hell Observation"}),e.portal.observe&&$i(!0);break}$("#popper").length>0&&$(`#${$("#popper").data("id")}`).length===0&&ie()}var rt={spc_home:{info:{name(){return x[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(a,r){return ue(7500,!1,r)}},effect:t("space_home_test_launch_effect"),action(){if(_($(this)[0])){if(e.race.truepath){let a=1;if(Ua("gov0")||a++,Ua("gov1")||a++,Ua("gov2")||a++,Math.floor(K(0,a))!==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(a){return m("satellite",a,72e3,1.22)},Knowledge(a){return m("satellite",a,28e3,1.22)},Oil(a,r){return m("satellite",a,ue(3200,!1,r),1.22)},Alloy(a){return m("satellite",a,8e3,1.22)}},effect(){let a=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;a*=e.tech.supercollider/n+1}let r=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):qt(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`
${t("space_home_satellite_effect2",[r,i])}
`;return`
${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${s}
${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return _($(this)[0])?(T("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(a){return m("gps",a,75e3,1.18)},Knowledge(a){return m("gps",a,5e4,1.18)},Copper(a){return m("gps",a,6500,1.18)},Oil(a,r){return m("gps",a,ue(3500,!1,r),1.18)},Titanium(a){return m("gps",a,8e3,1.18)}},effect(a){return(a?.count??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 _($(this)[0])?(T("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(a){return m("propellant_depot",a,55e3,1.35)},Aluminium(a){return m("propellant_depot",a,22e3,1.35)},Oil(a,r){return m("propellant_depot",a,ue(5500,!1,r),1.35)}},effect(){let a=E(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let r=E(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`}return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
`},action(){return _($(this)[0])?(T("propellant_depot"),e.resource.Oil.max+=E(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=E(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(a){return m("nav_beacon",a,75e3,1.32)},Copper(a){return m("nav_beacon",a,38e3,1.32)},Aluminium(a){return m("nav_beacon",a,44e3,1.32)},Oil(a,r){return m("nav_beacon",a,ue(12500,!1,r),1.32)},Iridium(a){return m("nav_beacon",a,1200,1.32)}},powered(){return N(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 a="";e.race.orbit_decayed&&e.tech.broadcast&&(a=`
${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let r=e.race.orbit_decayed?"":`
${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`
${t("space_red_spaceport_effect1",[S().red,1])}
`:"";return`${r}${i}${a}
${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("nav_beacon"),z($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let a=x[e.race.species].home;return t("space_moon_info_desc",[a])},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(a,r){return+ue(12e3,!1,r).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return _($(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(a){return m("moon_base",a,22e3,1.32)},Cement(a){return m("moon_base",a,18e3,1.32)},Alloy(a){return m("moon_base",a,7800,1.32)},Polymer(a){return m("moon_base",a,12500,1.32)}},effect(a){let r=E(500),i=+ue($(this)[0].support_fuel().a,!0,a).toFixed(2);return`
${t("space_moon_base_effect1")}
${t("plus_max_resource",[r,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 N(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(_($(this)[0])){if(T("moon_base"),z($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let a=t("space_moon_base_msg",[yt(3)]);e.civic.foreign.gov3.hstl<10?a=`${a} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(a=`${a} ${t("space_moon_base_msg_hstl")}`),I(a,"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(a){return m("iridium_mine",a,42e3,1.35)},Lumber(a){return m("iridium_mine",a,9e3,1.35)},Titanium(a){return m("iridium_mine",a,17500,1.35)}},effect(){let a=te("iridium_mine","iridium"),r=+a.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`
${t("produce",[+te("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`
${t("produce",[+(te("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",[r])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.resource.Iridium.display=!0,T("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Xe()),z($(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(a){return m("helium_mine",a,38e3,1.35)},Aluminium(a){return m("helium_mine",a,9e3,1.35)},Steel(a){return m("helium_mine",a,17500,1.35)}},effect(){let a=E(100),r=te("helium_mine"),i=+r.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`
${t("space_rival_war",[+(r.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",[a,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.resource.Helium_3.display=!0,T("helium_mine"),z($(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(a){return m("observatory",a,2e5,1.28)},Knowledge(a){return m("observatory",a,69e3,1.28)},Stone(a){return m("observatory",a,125e3,1.28)},Iron(a){return m("observatory",a,65e3,1.28)},Iridium(a){return m("observatory",a,1250,1.28)}},effect(){let a="";e.race.cataclysm&&(a=`
${t("city_university_effect",[F(1)])}
`);let r=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(r*=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")])}
${a}
${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("observatory"),z($(this)[0]),!0):!1}}},spc_red:{info:{name(){return S().red},desc(){return t("space_red_info_desc",[S().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[S().red])},desc(){return t("space_mission_desc",[S().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(a,r){return+ue(4500,!1,r).toFixed(0)}},effect(){return t("space_red_mission_effect",[S().red])},action(){return _($(this)[0])?(I(t("space_red_mission_action",[S().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(a){return m("spaceport",a,47500,1.32)},Iridium(a){return m("spaceport",a,1750,1.32)},Mythril(a){return m("spaceport",a,25,1.32)},Titanium(a){return m("spaceport",a,22500,1.32)}},effect(a){let r=+ue($(this)[0].support_fuel().a,!0,a).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=E(ja()*4);i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_red_spaceport_effect1",[S().red,$(this)[0].support()])}
${i}
${t("space_red_spaceport_effect2",[r,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let a=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&a++,a},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return N(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){return _($(this)[0])?(T("spaceport"),z($(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(a){return m("red_tower",a,225e3,1.28)},Iron(a){return m("red_tower",a,22e3,1.28)},Cement(a){return m("red_tower",a,15e3,1.28)},Alloy(a){return m("red_tower",a,8e3,1.28)}},effect(){return`
${t("space_red_spaceport_effect1",[S().red,e.race.cataclysm||e.race.fasting?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm||e.race.fasting?2:1},action(){return _($(this)[0])?(T("red_tower"),z($(this)[0]),!0):!1}},captive_housing:ft("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(a){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(r<100){let i=100-r;return`
${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_red.atmo_terraformer.effect(a)},action(){return _($(this)[0])&&e.space.terraformer.count<100?(T("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},ut(),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(a){return N((a?a.truepath:e.race.truepath)?500:5e3)},postPower(a){a?setTimeout(function(){e.tech.terraforming=G.atmo_terraformer?3:2,ut()},250):(e.tech.terraforming=2,ut())},effect(a){let r=Ic(),i=$(this)[0].powered(a),s=i>0?`
${t("minus_power",[i])}
`:"";return`
${t("space_terraformer_effect2")}
${r}${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 a=Ic();return`
${t("space_terraform_effect")}
${a}`},action(){return _($(this)[0])?(_n(),!0):!1}},assembly:ft("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",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("living_quarters",a,gn(38e3),1.28)},Steel(a){return m("living_quarters",a,gn(15e3),1.28)},Polymer(a){return m("living_quarters",a,gn(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(a){let r=$(this)[0].citizens(a),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=E(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_used_support",[S().red])}
${i}
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(_($(this)[0])){if(T("living_quarters"),e.civic.colonist.display=!0,z($(this)[0])){e.resource[e.race.species].max+=F(1);let a=F(1);e.civic.colonist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.colonist.workers+=r}return!0}return!1},citizens(a){let r=e.race.cataclysm||e.race.orbit_decayed?2:1,i=a?e.space?.biodome?.on??0:we.biodome;if(i){let s=e.tech.mars>=6?.1:.05;r+=s*i}return+F(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(a){return m("pylon",a,10,1.48)},Stone(a){return m("pylon",a,12,1.42)},Crystal(a){return m("pylon",a,8,1.42)-3}},effect(){let a=E(2),r=+(.005*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=E(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",[S().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(a){return m("vr_center",a,38e4,1.25)},Copper(a){return m("vr_center",a,55e3,1.25)},Stanene(a){return m("vr_center",a,1e5,1.25)},Soul_Gem(a){return m("vr_center",a,1,1.25)}},effect(){let a=J("gaslighter",1),r=a?a+1:1;return e.race.orbit_decayed&&(r+=2),`
${t("space_used_support",[S().red])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("vr_center"),z($(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(a){return m("garage",a,75e3,1.28)},Iron(a){return m("garage",a,12e3,1.28)},Brick(a){return m("garage",a,3e3,1.28)},Sheet_Metal(a){return m("garage",a,1500,1.28)}},wide:!0,res(){let a=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(a.push("Polymer"),a.push("Coal"),a.push("Lumber"),a.push("Chrysotile"),a.push("Stone"),a.push("Furs")),a},heavy(a){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(a)},val(a){switch(a){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(a){let r=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r*=2),e.tech.shelving&&e.tech.shelving>=3&&(r*=1.5),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,a&&e.tech.shelving&&e.tech.shelving>=2?r*3:r},effect(){let a=$(this)[0].multiplier(!1),r=$(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 o=$(this)[0].heavy(c),l=Y(+(E($(this)[0].val(c))*(o?r:a)).toFixed(0),1);n=n+`${t("plus_max_resource",[l,e.resource[c].name])}`}return n=n+"
",n},action(){if(_($(this)[0])){T("garage");let a=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a+=10),e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=$(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+=E($(this)[0].val(s))*(n?i:r)}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",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("red_mine",a,5e4,1.32)},Lumber(a){return m("red_mine",a,65e3,1.32)},Iron(a){return m("red_mine",a,33e3,1.32)}},effect(){let a=te("red_mine","copper"),r=te("red_mine","titanium"),i=+a.b.toFixed(3),s=+r.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`
${t("city_mine_effect1",[F(1)])}
${t("city_coal_mine_effect1",[F(1)])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`
${t("space_red_mine_effect",[+te("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`
${t("space_red_mine_effect",[+te("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",u=e.race.cataclysm||e.race.orbit_decayed?`
${t("space_red_mine_effect",[+te("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`
${t("space_used_support",[S().red])}
${c}
${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${l}${o}${u}`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("red_mine"),z($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`
${t("space_red_fabrication_desc")}
${t("space_support",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("fabrication",a,9e4,1.32)},Copper(a){return m("fabrication",a,25e3,1.32)},Cement(a){return m("fabrication",a,12e3,1.32)},Wrought_Iron(a){return m("fabrication",a,1200,1.32)}},effect(){let a=e.race.cataclysm&&!e.race.flier?`
${t("city_cement_plant_effect1",[F(1)])}
`:"",r=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(r=ve(r)),`
${t("space_used_support",[S().red])}
${t("space_red_fabrication_effect1",[F(1)])}
${a}
${t("space_red_fabrication_effect2",[r])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("fabrication"),z($(this)[0])&&(e.civic.craftsman.max+=F(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(a){return m("red_factory",a,75e3,1.32)},Brick(a){return m("red_factory",a,1e4,1.32)},Coal(a){return m("red_factory",a,7500,1.32)},Mythril(a){return m("red_factory",a,50,1.32)}},effect(a){let r=`
${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(r=r+`
${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(r=r+`
${t("city_cement_plant_effect1",[F(1)])}
`);let i=+ue(1,!0,a).toFixed(2);return r=r+`
${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,r},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(e.space.red_factory.count++,z($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,Pe(),!0):!1}},nanite_factory:ft("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 a;return e.race.artifical?a=`
${t("space_red_signal_tower_title")}
`:e.race.soul_eater?a=`
${t("space_red_asphodel_desc")}
`:e.race.carnivore?a=`
${t("space_red_biodome_desc_carn")}
`:a=`
${t("space_red_biodome_desc",[S().red])}
`,`
${a}
${t("space_support",[S().red])}
`},reqs:{mars:2},cost:{Money(a){return m("biodome",a,45e3,1.28)},Lumber(a){return m("biodome",a,65e3,1.28)},Brick(a){return m("biodome",a,1e3,1.28)},Nanite(a){return e.race.deconstructor?m("biodome",a,75,1.28):0}},effect(){let a=+te("biodome","food").toFixed(2),r=e.race.cataclysm||e.race.orbit_decayed?`
${t("produce",[+te("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",[+te("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[E(500)]):t("plus_max_resource",[E(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`
${n}${t("space_used_support",[S().red])}
${r}
${t("space_red_biodome_effect",[a,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+F(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("biodome"),e.race.cataclysm||(L("colonist"),e.race.joyless&&(L("joyless"),delete e.race.joyless,pe())),z($(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",[S().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(a){return m("university",a,900,1.5,"city")-500},Lumber(a){return m("university",a,500,1.36,"city")-200},Stone(a){return m("university",a,750,1.36,"city")-350},Crystal(a){return e.race.universe==="magic"?m("university",a,5,1.36,"city"):0}},wiki:!1,effect(){return q.city.university.effect()},action(){if(_($(this)[0])){let a=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=F(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",[S().red])}
`},reqs:{mars:5},cost:{Money(a){return m("exotic_lab",a,75e4,1.28)},Steel(a){return m("exotic_lab",a,1e5,1.28)},Mythril(a){return m("exotic_lab",a,1e3,1.28)},Elerium(a){return m("exotic_lab",a,20,1.28)-4}},effect(a){let r=500;if(e.tech.science>=13&&e.interstellar.laboratory){let o=a?e.interstellar.laboratory.on:Hs.laboratory;r+=o*25}e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15);let i=a?e.city?.mass_driver?.on??0:G.mass_driver;e.tech.mass>=2&&i>0&&(r+=ve(i*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=ve(r));let s=E(10),n="",c="";return(e.race.cataclysm||e.race.orbit_decayed)&&(n=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`,r*=1+(a?e.space.observatory.on:we.observatory)*.25,e.tech.science>=15&&(c=`
${t("city_wardenclyffe_effect4",[2])}
`)),`
${t("space_used_support",[S().red])}
${n}${c}
${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("exotic_lab"),z($(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 a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("space_red_ziggurat_desc",[a])}
`},reqs:{theology:4},cost:{Money(a){return m("ziggurat",a,6e5,1.28)},Stone(a){return m("ziggurat",a,25e4,1.28)},Aluminium(a){return m("ziggurat",a,7e4,1.28)},Mythril(a){return m("ziggurat",a,250,1.28)}},effect(a){let r=e.tech.ancient_study?.6:.4,i=a?e.space?.exotic_lab?.on??0:we.exotic_lab;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&i&&(r+=.01*i),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let c=.002;e.race.high_pop&&(c=ve(c)),r+=c*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=ve(r)),r=+r.toFixed(2);let s=e.race.truepath?[r,x[e.race.species].home]:[r],n=`
${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",s)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(n=n+`
${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(n=n+wn()),e.genes.ancients&&e.genes.ancients>=4&&(n=n+`
${t("city_temple_effect6",[F(1)])}
`),n},action(){return _($(this)[0])?(T("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=F(1)),e.race.cataclysm&&L("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(a){return m("space_barracks",a,35e4,1.28)},Alloy(a){return m("space_barracks",a,65e3,1.28)},Iridium(a){return m("space_barracks",a,22500,1.28)},Wrought_Iron(a){return m("space_barracks",a,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(a){let r=e.race.orbit_decayed?q.city.boot_camp.effect():"",i=+ue(2,!0,a).toFixed(2),s=e.tech.marines>=2?F(4):F(2),n=e.race.cataclysm?"":`
${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`
${t("plus_max_soldiers",[s])}
${r}
${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return _($(this)[0])?(T("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:ft("bonfire","space"),horseshoe:ft("horseshoe","space")},spc_hell:{info:{name(){return S().hell},desc(){return t("space_hell_info_desc",[S().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[S().hell])},desc(){return t("space_mission_desc",[S().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(a,r){return+ue(6500,!1,r).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[S().hell])},action(){return _($(this)[0])?(I(t("space_hell_mission_action",[S().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(a){return m("geothermal",a,38e3,1.35)},Steel(a){return m("geothermal",a,15e3,1.35)},Polymer(a){return m("geothermal",a,9500,1.35)}},effect(a){let r=+ue($(this)[0].p_fuel().a,!0,a).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",[r])}`},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let a=-8;return e.race.forge&&(a-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(a-=2),at(a)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return _($(this)[0])?(T("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[S().hell])},desc(){return t("space_hell_smelter_title",[S().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(a){return m("hell_smelter",a,25e4,1.24)},Adamantite(a){return m("hell_smelter",a,15e3,1.24)}},effect(){return`
${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return _($(this)[0])?(T("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(a){return m("spc_casino",a,4e5,1.35)},Furs(a){return m("spc_casino",a,75e3,1.35)},Cement(a){return m("spc_casino",a,1e5,1.35)},Plywood(a){return m("spc_casino",a,2e4,1.35)}},effect(){let a=vi();return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return _($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(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(a,r){return m("swarm_plant",a,Ci(75e3,r),1.28)},Iron(a,r){return m("swarm_plant",a,Ci(65e3,r),1.28)},Neutronium(a,r){return m("swarm_plant",a,Ci(75,r),1.28)},Brick(a,r){return m("swarm_plant",a,Ci(2500,r),1.28)},Mythril(a,r){return m("swarm_plant",a,Ci(100,r),1.28)}},effect(a){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=pa(a)/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return _($(this)[0])?(T("swarm_plant"),!0):!1}},firework:ft("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[x[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(a,r){return+ue(15e3,!1,r).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!_($(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(a){return m("swarm_control",a,1e5,1.3)},Knowledge(a){return m("swarm_control",a,6e4,1.3)},Alloy(a){return m("swarm_control",a,7500,1.3)},Helium_3(a,r){return m("swarm_control",a,ue(2e3,!1,r),1.3)},Mythril(a){return m("swarm_control",a,250,1.3)}},effect(a){return t("space_sun_swarm_control_effect1",[$(this)[0].support(a)])},support(a){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(pa(a)):12:10},action(){return _($(this)[0])?(T("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(a,r){return m("swarm_satellite",a,ns(5e3,r),1.1)},Copper(a,r){return m("swarm_satellite",a,ns(2500,r),1.1)},Iridium(a,r){return m("swarm_satellite",a,ns(150,r),1.1)},Helium_3(a,r){return m("swarm_satellite",a,ns(ue(50,!1,r),r),1.1)}},effect(){let a=.35;return e.tech.swarm>=4&&(a+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(a+=.15),e.blood.illuminate&&(a+=.01*e.blood.illuminate),a=+a.toFixed(2),`${t("space_dwarf_reactor_effect1",[at(a)])}, ${t("space_sun_swarm_satellite_effect1",[1])}`},support(){return-1},action(){return _($(this)[0])?(T("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(a){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(r<100){let i=100-r;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return _($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return S().gas},desc(){return t("space_gas_info_desc",[S().gas,x[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[S().gas])},desc(){return t("space_mission_desc",[S().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(a,r){return+ue(12500,!1,r).toFixed(0)}},effect(){return t("space_gas_mission_effect",[S().gas])},action(){return _($(this)[0])?(I(t("space_gas_mission_action",[S().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(a){return m("gas_mining",a,25e4,1.32)},Uranium(a){return m("gas_mining",a,500,1.32)},Alloy(a){return m("gas_mining",a,1e4,1.32)},Helium_3(a,r){return m("gas_mining",a,ue(2500,!1,r),1.32)},Mythril(a){return m("gas_mining",a,25,1.32)}},effect(){let a=+te("gas_mining").toFixed(2);return`
${t("space_gas_mining_effect1",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(2)},action(){return _($(this)[0])?(T("gas_mining"),z($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[S().gas])},desc(){return`
${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(a){return m("gas_storage",a,125e3,1.32)},Iridium(a){return m("gas_storage",a,3e3,1.32)},Sheet_Metal(a){return m("gas_storage",a,2e3,1.32)},Helium_3(a,r){return m("gas_storage",a,ue(1e3,!1,r),1.32)}},effect(){let a=E(3500)*(e.tech.world_control?1.5:1),r=E(2500)*(e.tech.world_control?1.5:1),i=E(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return _($(this)[0])?(T("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(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(a,r){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(ue(e.race.gravity_well?25e3:1e4,!1,r)):0},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(a){return(a||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&&_($(this)[0])?(T("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return S().gas_moon},desc(){return t("space_gas_moon_info_desc",[S().gas_moon,S().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[S().gas_moon])},desc(){return t("space_mission_desc",[S().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(a,r){return+ue(3e4,!1,r).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[S().gas_moon])},action(){return _($(this)[0])?(I(t("space_gas_moon_mission_action",[S().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(a){return m("outpost",a,666e3,1.3)},Titanium(a){return m("outpost",a,18e3,1.3)},Iridium(a){return m("outpost",a,2500,1.3)},Helium_3(a,r){return m("outpost",a,ue(6e3,!1,r),1.3)},Mythril(a){return m("outpost",a,300,1.3)}},effect(a){let r=+te("outpost").toFixed(3),i=E(500),s=+ue(2,!0,a).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return N(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return _($(this)[0])?(T("outpost"),e.resource.Neutronium.display=!0,z($(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(a){return m("drone",a,25e4,1.3)},Steel(a){return m("drone",a,2e4,1.3)},Neutronium(a){return m("drone",a,500,1.3)},Elerium(a){return m("drone",a,25,1.3)},Nano_Tube(a){return m("drone",a,45e3,1.3)}},effect(){let a=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`
${t("space_gas_moon_drone_effect1",[a])}
`},action(){return _($(this)[0])?(T("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(a){return m("oil_extractor",a,666e3,1.3)},Polymer(a){return m("oil_extractor",a,7500,1.3)},Helium_3(a,r){return m("oil_extractor",a,ue(2500,!1,r),1.3)},Wrought_Iron(a){return m("oil_extractor",a,5e3,1.3)}},effect(){let a=+te("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[a])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return N(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return _($(this)[0])?(T("oil_extractor"),z($(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",[S().red,S().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[S().red,S().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(a,r){return+ue(25e3,!1,r).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return _($(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(a){return m("space_station",a,25e4,1.3)},Iron(a){return m("space_station",a,85e3,1.3)},Polymer(a){return m("space_station",a,18e3,1.3)},Iridium(a){return m("space_station",a,2800,1.28)},Helium_3(a,r){return m("space_station",a,ue(2e3,!1,r),1.3)},Mythril(a){return m("space_station",a,75,1.25)}},effect(a){let r=+ue(2.5,!0,a).toFixed(2),i=e.race.cataclysm?1:10,s=E(5),n=e.tech.asteroid>=5?`
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`
${t("plus_max_space_miners",[F(3)])}
${n}
${t("space_belt_station_effect5",[r,$(this)[0].powered()])}
`:`
${t("plus_max_space_miners",[F(3)])}
${n}
${t("space_belt_station_effect3",[r])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return F(3)},powered(){return N(3)},refresh:!0,action(){if(_($(this)[0])){if(T("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),z($(this)[0])){let a=F(3);e.civic.space_miner.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.space_miner.workers+=r}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(a){return m("elerium_ship",a,5e5,1.3)},Uranium(a){return m("elerium_ship",a,2500,1.3)},Titanium(a){return m("elerium_ship",a,1e4,1.3)},Mythril(a){return m("elerium_ship",a,500,1.3)},Helium_3(a,r){return m("elerium_ship",a,ue(5e3,!1,r),1.3)}},effect(){let a=+te("elerium_ship").toFixed(4);return`
${t("space_belt_elerium_ship_effect1",[F(2)])}
${t("space_belt_elerium_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-2)},powered(){return 0},action(){return _($(this)[0])?(T("elerium_ship"),z($(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(a){return m("iridium_ship",a,12e4,1.3)},Uranium(a){return m("iridium_ship",a,1e3,1.3)},Alloy(a){return m("iridium_ship",a,48e3,1.3)},Iridium(a){return m("iridium_ship",a,2800,1.3)},Helium_3(a,r){return m("iridium_ship",a,ue(1800,!1,r),1.3)}},effect(){let a=+te("iridium_ship").toFixed(3);return`
${t("space_belt_iridium_ship_effect1",[F(1)])}
${t("space_belt_iridium_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-1)},powered(){return 0},action(){return _($(this)[0])?(T("iridium_ship"),z($(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(a){return m("iron_ship",a,8e4,1.3)},Steel(a){return m("iron_ship",a,42e3,1.3)},Aluminium(a){return m("iron_ship",a,38e3,1.3)},Polymer(a){return m("iron_ship",a,16e3,1.3)},Helium_3(a,r){return m("iron_ship",a,ue(1200,!1,r),1.3)}},effect(){let a=+te("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`
${t("space_belt_iron_ship_effect1",[F(1)])}
${t("space_belt_iron_ship_effect2",[a])}
${t("space_belt_iron_ship_effect3")}
`:`
${t("space_belt_iron_ship_effect1",[F(1)])}
${t("space_belt_iron_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-1)},powered(){return 0},action(){return _($(this)[0])?(T("iron_ship"),z($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return S().dwarf},desc(){return t("space_dwarf_info_desc",[S().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[S().dwarf])},desc(){return t("space_mission_desc",[S().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(a,r){return+ue(45e3,!1,r).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[S().dwarf])},action(){return _($(this)[0])?(I(t("space_dwarf_mission_action",[S().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(a){return m("elerium_contain",a,8e5,1.28)},Cement(a){return m("elerium_contain",a,12e4,1.28)},Iridium(a){return m("elerium_contain",a,5e4,1.28)},Neutronium(a){return m("elerium_contain",a,250,1.28)}},effect(){let a=E(100);return`
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(6)},action(){return _($(this)[0])?(T("elerium_contain"),z($(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(a){return m("e_reactor",a,125e4,1.28)},Steel(a){return m("e_reactor",a,35e4,1.28)},Neutronium(a){return m("e_reactor",a,1250,1.28)},Mythril(a){return m("e_reactor",a,2500,1.28)}},effect(){let a=$(this)[0].p_fuel().a,r=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[r])}
${t("space_dwarf_reactor_effect2",[a])}
`},powered(){return at(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return _($(this)[0])?(T("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(a){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||a)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(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(r<1859){let i=1859-r;return`
${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&_($(this)[0])){if(T("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},pe(),ut(),e.race.banana){let a=le();e.stats.banana.b2[a]=!0,a!=="m"&&a!=="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(a){let r=25;if(e.interstellar.far_reach){let i=a?e.interstellar.far_reach.on:G.far_reach;i>0&&(r+=i)}return 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 N(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(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(a){return(a||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 N(50)},special:!0,sAction(){G.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(ir("mTabCivic"),ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&_($(this)[0])?(T("shipyard"),z($(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(a){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||a)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(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(r<100){let i=100-r;return`
${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&_($(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},pe(),ut(),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 N(100)},effect(){let a=Math.floor(e.space.m_relay.charged/10)/10;return`
${t("space_dwarf_mass_relay_effect2",[S().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[a])}
`},action(){return!1}}},spc_titan:Br().spc_titan,spc_enceladus:Br().spc_enceladus,spc_triton:Br().spc_triton,spc_kuiper:Br().spc_kuiper,spc_eris:Br().spc_eris},Ot={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[x[e.race.species].home]):t("interstellar_alpha_desc1",[x[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+_e(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return _($(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(a){return m("starport",a,1e6,1.3,"interstellar")},Aluminium(a){return m("starport",a,4e5,1.3,"interstellar")},Neutronium(a){return m("starport",a,1e3,1.3,"interstellar")},Elerium(a){return m("starport",a,100,1.3,"interstellar")}},effect(){let a=+_e(5).toFixed(2),r=100;return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`},support(){return 5},powered(){return N(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return _($(this)[0])?(T("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,z($(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(a){return m("habitat",a,8e5,1.25,"interstellar")},Furs(a){return m("habitat",a,38e3,1.25,"interstellar")},Adamantite(a){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:m("habitat",a,3200,1.25,"interstellar")},Plywood(a){return m("habitat",a,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[a])}, ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return N(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return _($(this)[0])?(T("habitat","interstellar"),z($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("mining_droid",a,65e4,1.28,"interstellar")},Steel(a){return m("mining_droid",a,12e4,1.28,"interstellar")},Nano_Tube(a){return m("mining_droid",a,75e3,1.28,"interstellar")},Elerium(a){return m("mining_droid",a,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 _($(this)[0])?(T("mining_droid","interstellar"),e.resource.Adamantite.display=!0,z($(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,Pe(),!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(a){return m("processing",a,35e4,1.28,"interstellar")},Iron(a){return m("processing",a,18e4,1.28,"interstellar")},Aluminium(a){return m("processing",a,6e4,1.28,"interstellar")},Iridium(a){return m("processing",a,5e3,1.28,"interstellar")}},effect(a){let r=12,i=a?e.interstellar?.citadel?.on??0:G.citadel;return e.tech.ai_core&&e.tech.ai_core>=2&&i>0&&(r+=i*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 _($(this)[0])?(T("processing","interstellar"),z($(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(a){return m("fusion",a,99e4,1.28,"interstellar")},Iridium(a){return m("fusion",a,44e3,1.28,"interstellar")},Infernite(a){return m("fusion",a,350,1.28,"interstellar")},Brick(a){return m("fusion",a,18e3,1.28,"interstellar")}},effect(){let a=1.25;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("interstellar_fusion_effect",[a])}
`},s_type:"alpha",support(){return-1},powered(){return at(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return _($(this)[0])?(T("fusion","interstellar"),z($(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(a){return m("laboratory",a,75e4,1.28,"interstellar")},Crystal(a){return e.race.universe==="magic"?m("laboratory",a,1200,1.28,"interstellar"):0},Titanium(a){return m("laboratory",a,12e4,1.28,"interstellar")},Alloy(a){return m("laboratory",a,95e3,1.28,"interstellar")},Mythril(a){return m("laboratory",a,8500,1.28,"interstellar")}},effect(a){let r=1e4;if(e.tech.science>=15){let o=a?e.space.exotic_lab.on:we.exotic_lab;r*=1+(e.race.cataclysm||e.race.orbit_decayed?o:e.city.wardenclyffe.count)*.02}let s=Qt(a)?a?e.galaxy?.scavenger?.on??0:la.scavenger:0;(e.race.cataclysm||e.race.orbit_decayed)&&s>0&&(r*=1+s*+(Lt("gxy_alien2",!1,!1,a)*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let n="";e.tech.science>=16&&(n=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`);let c=`
${t("space_used_support",[t("interstellar_alpha_name")])}
${n}
${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(c=c+`
${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let o=E(12);c=c+`
${t("plus_max_resource",[o,e.resource.Mana.name])}
`}return c},s_type:"alpha",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("laboratory","interstellar"),z($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=F(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(a){return m("exchange",a,68e4,1.28,"interstellar")},Stone(a){return m("exchange",a,115e3,1.28,"interstellar")},Adamantite(a){return m("exchange",a,55e3,1.28,"interstellar")},Graphene(a){return m("exchange",a,78e3,1.28,"interstellar")}},effect(a){let r=e.race.cataclysm||e.race.orbit_decayed?a?e.space.spaceport.on:G.spaceport:e.city.bank?e.city.bank.count:0,i=e.race.cataclysm||e.race.orbit_decayed?ja()*4:ja(),s=E(e.city.bank?i*r/18:0);if(e.race.inflation&&(s*=2),e.tech.banking>=13){if(e.galaxy.freighter){let n=a?e.galaxy.freighter.on:la.freighter;s*=1+n*.03}if(e.galaxy.super_freighter){let n=a?e.galaxy.super_freighter.on:la.super_freighter;s*=1+n*.08}}return s=+s.toFixed(0),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${s.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("exchange","interstellar"),z($(this)[0])&&(e.resource.Money.max+=+E(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(a){return m("g_factory",a,95e4,1.28,"interstellar")},Copper(a){return m("g_factory",a,165e3,1.28,"interstellar")},Cement(a){return m("g_factory",a,22e4,1.28,"interstellar")},Infernite(a){return m("g_factory",a,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 _($(this)[0])?(T("g_factory","interstellar"),e.resource.Graphene.display=!0,z($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,Pe(),!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(a){return m("int_factory",a,25e6,1.26,"interstellar")},Coal(a){return m("int_factory",a,1e7,1.26,"interstellar")},Brick(a){return m("int_factory",a,75e4,1.26,"interstellar")},Bolognium(a){return m("int_factory",a,5e4,1.26,"interstellar")}},effect(){let a=+_e(5).toFixed(2);return`
${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[a])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},special:!0,action(){return _($(this)[0])?(T("int_factory","interstellar"),z($(this)[0])&&(e.city.factory.Alloy+=2,Pe()),!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(a){return m("luxury_condo",a,25e6,1.25,"interstellar")},Neutronium(a){return m("luxury_condo",a,75e3,1.25,"interstellar")},Stanene(a){return m("luxury_condo",a,23e4,1.25,"interstellar")},Orichalcum(a){return m("luxury_condo",a,65e3,1.25,"interstellar")},Nanoweave(a){return m("luxury_condo",a,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let a=$(this)[0].citizens(),r=E(75e4);return`
${t("plus_max_citizens",[a])}, ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return N(3)},action(){return _($(this)[0])?(T("luxury_condo","interstellar"),z($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let a=2;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("zoo",a,5e7,1.24,"interstellar")},Polymer(a){return m("zoo",a,6e6,1.24,"interstellar")},Infernite(a){return m("zoo",a,75e3,1.24,"interstellar")},Brick(a){return m("zoo",a,2e6,1.24,"interstellar")}},effect(){let a=5,r=2,i=12e3;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[r])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return _($(this)[0])?(T("zoo","interstellar"),z($(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 a=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",[a])},reqs:{alpha:2},cost:{Money(a){return m("warehouse",a,175e3,1.28,"interstellar")},Lumber(a){return m("warehouse",a,1e5,1.28,"interstellar")},Aluminium(a){return m("warehouse",a,12e4,1.28,"interstellar")},Cement(a){return m("warehouse",a,45e3,1.28,"interstellar")}},res(){let a=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&a.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&a.push("Titanium"),a},val(a){switch(a){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(a){let r='
',i=Oi(a);for(let s of $(this)[0].res())if(e.resource[s].display){let n=Y(+(E($(this)[0].val(s))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return r=r+"
",r},action(){if(_($(this)[0])){T("warehouse","interstellar");let a=Oi();for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=E($(this)[0].val(r)*a));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+_e(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return _($(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(a){return m("xfer_station",a,12e5,1.28,"interstellar")},Neutronium(a){return m("xfer_station",a,1500,1.28,"interstellar")},Adamantite(a){return m("xfer_station",a,6e3,1.28,"interstellar")},Polymer(a){return m("xfer_station",a,12e3,1.28,"interstellar")},Wrought_Iron(a){return m("xfer_station",a,3500,1.28,"interstellar")}},effect(){let a=.28,r=E(5e3),i=E(4e3),s=E(2500),n="";return e.resource.Deuterium.display&&(n=`
${t("plus_max_resource",[E(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",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}
${t("city_fission_power_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return N(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return _($(this)[0])?(T("xfer_station","interstellar"),z($(this)[0])&&(e.resource.Uranium.max+=E(2500),e.resource.Helium_3.max+=E(5e3),e.resource.Oil.max+=E(4e3),e.resource.Deuterium.max+=E(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(a){return m("cargo_yard",a,275e3,1.28,"interstellar")},Graphene(a){return m("cargo_yard",a,7500,1.28,"interstellar")},Mythril(a){return m("cargo_yard",a,6e3,1.28,"interstellar")}},effect(a){let r=50,i=E(200),s=E(150),n=`
${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(n=n+`
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("plus_max_resource",[s,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let c=+pa(a).toFixed(3);n=n+`
${t("interstellar_cargo_yard_effect",[c])}
`}return n},action(){if(_($(this)[0])){T("cargo_yard","interstellar");let a=50;return e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(a){return m("cruiser",a,875e3,1.28,"interstellar")},Aluminium(a){return m("cruiser",a,195e3,1.28,"interstellar")},Deuterium(a){return m("cruiser",a,+_e(1500).toFixed(0),1.28,"interstellar")},Neutronium(a){return m("cruiser",a,2e3,1.28,"interstellar")},Aerogel(a){return m("cruiser",a,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let a=+_e(6).toFixed(2),r=F(e.race.fasting?4:3);return`
${t("plus_max_soldiers",[r])}
${t("space_belt_station_effect3",[a])}
`},action(){return _($(this)[0])?(T("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(a){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(r<100){let i=r>0?`
${t("space_dwarf_reactor_effect1",[at(r*1.25)])}
`:"",s=100-r;return`
${t("interstellar_dyson_effect")}
${i}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[at(175)])},action(){return _($(this)[0])&&e.interstellar.dyson.count<100?(T("dyson","interstellar"),e.interstellar.dyson.count>=100&&pe(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(a){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(r<100){let i=175+r*5,s=100-r;return`
${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[at(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[at(750)])},action(){return _($(this)[0])&&e.interstellar.dyson_sphere.count<100?(T("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&pe(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(a){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(a){return(a||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(r<100){let i=750+r*8,s=100-r;return`
${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[at(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[at(1750)])},action(){return _($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(T("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&L("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+_e(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return _($(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(a){return m("nexus",a,9e5,1.24,"interstellar")},Adamantite(a){return m("nexus",a,7500,1.24,"interstellar")},Infernite(a){return m("nexus",a,250,1.24,"interstellar")},Sheet_Metal(a){return m("nexus",a,14e3,1.24,"interstellar")},Nano_Tube(a){return m("nexus",a,17500,1.24,"interstellar")}},effect(){let a=E(3500),r=E(4e3),i=E(3e3),s=E(25);return`
${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,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 N(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return _($(this)[0])?(T("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),z($(this)[0])&&(e.resource.Oil.max+=E(2500),e.resource.Helium_3.max+=E(4e3),e.resource.Deuterium.max+=E(3e3),e.resource.Elerium.max+=E(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(a){return m("harvester",a,65e4,1.28,"interstellar")},Copper(a){return m("harvester",a,8e4,1.28,"interstellar")},Alloy(a){return m("harvester",a,45e3,1.28,"interstellar")},Iridium(a){return m("harvester",a,8e3,1.28,"interstellar")}},effect(){let a=+te("harvester","helium").toFixed(3),r=+te("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`
${t("interstellar_harvester_effect",[r])}
`:"";return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[a])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("harvester","interstellar"),z($(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(a){return m("elerium_prospector",a,825e3,1.28,"interstellar")},Steel(a){return m("elerium_prospector",a,18e3,1.28,"interstellar")},Polymer(a){return m("elerium_prospector",a,22e3,1.28,"interstellar")},Graphene(a){return m("elerium_prospector",a,82e3,1.28,"interstellar")},Stanene(a){return m("elerium_prospector",a,57e3,1.28,"interstellar")}},effect(){let a=+te("elerium_prospector").toFixed(3);return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[a])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("elerium_prospector","interstellar"),z($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[x[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+_e(6e4).toFixed(0)},Deuterium(){return+_e(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return _($(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(a){return m("neutron_miner",a,1e6,1.32,"interstellar")},Titanium(a){return m("neutron_miner",a,45e3,1.32,"interstellar")},Stanene(a){return m("neutron_miner",a,88e3,1.32,"interstellar")},Elerium(a){return m("neutron_miner",a,20,1.32,"interstellar")},Aerogel(a){return m("neutron_miner",a,50,1.32,"interstellar")}},effect(){let a=+te("neutron_miner").toFixed(3),r=E(500),i=+_e(3).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[r,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return N(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return _($(this)[0])?(T("neutron_miner","interstellar"),z($(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(a){return m("citadel",a,5e6,1.25,"interstellar")},Knowledge(a){return m("citadel",a,15e5,1.15,"interstellar")},Graphene(a){return m("citadel",a,5e4,1.25,"interstellar")},Stanene(a){return m("citadel",a,1e5,1.25,"interstellar")},Elerium(a){return m("citadel",a,250,1.25,"interstellar")},Soul_Gem(a){return m("citadel",a,1,1.25,"interstellar")}},wide:!0,effect(a){let r=pa(a),i=`
${t("interstellar_citadel_stat",[+r.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let s=+(r/1.75).toFixed(1);if(e.race.flier||(i=i+`
${t("interstellar_citadel_effect2",[s])}
`),e.tech.ai_core>=2&&(i=i+`
${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let n=+(r/5).toFixed(1);i=i+`
${t("interstellar_citadel_effect4",[n])}
`}}return`${i}
${t("interstellar_citadel_power",[$(this)[0].powered(a),N(2.5)])}
`},powered(a){let r=a?0:G.citadel;return r>1?N(30+(r-1)*2.5):N(30)},action(){return _($(this)[0])?(T("citadel","interstellar"),z($(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(a){return m("stellar_forge",a,12e5,1.25,"interstellar")},Iridium(a){return m("stellar_forge",a,25e4,1.25,"interstellar")},Bolognium(a){return m("stellar_forge",a,35e3,1.25,"interstellar")},Aerogel(a){return m("stellar_forge",a,75e3,1.25,"interstellar")}},effect(){let a=`
${t("city_foundry_effect1",[F(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(a+=`
${t("interstellar_stellar_forge_effect3",[2])}
`),`${a}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(T("stellar_forge","interstellar"),z($(this)[0])&&(e.civic.craftsman.max+=F(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 a=x[e.race.species].home;if(e.tech.blackhole>=5){let r=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(r+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ke("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_blackhole_desc4",[a,r,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[a,r,i]):t("interstellar_blackhole_desc3",[a,r])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[a]):t("interstellar_blackhole_desc1",[a])}},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+_e(75e3).toFixed(0)},Deuterium(){return+_e(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return _($(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(a){return m("far_reach",a,1e6,1.32,"interstellar")},Knowledge(a){return m("far_reach",a,1e5,1.32,"interstellar")},Neutronium(a){return m("far_reach",a,2500,1.32,"interstellar")},Elerium(a){return m("far_reach",a,100,1.32,"interstellar")},Aerogel(a){return m("far_reach",a,1e3,1.32,"interstellar")}},effect(){return`
${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(T("far_reach","interstellar"),z($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,pe()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(a){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(r<100){let i=100-r;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=at((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 o=+e.interstellar.stellar_engine.exotic.toFixed(10),l=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,o]):t("interstellar_stellar_engine_effect2",[s]);return`
${t("interstellar_stellar_engine_complete",[+c.toFixed(2)])}
${l}
`}else return t("interstellar_stellar_engine_complete",[+c.toFixed(2)])}},action(){return _($(this)[0])&&e.interstellar.stellar_engine.count<100?(T("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,pe()),!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(a){return m("mass_ejector",a,75e4,1.25,"interstellar")},Adamantite(a){return m("mass_ejector",a,125e3,1.25,"interstellar")},Infernite(a){return m("mass_ejector",a,275,1.25,"interstellar")},Elerium(a){return m("mass_ejector",a,100,1.25,"interstellar")},Mythril(a){return m("mass_ejector",a,1e4,1.25,"interstellar")}},effect(){return`
${t("interstellar_mass_ejector_effect")}, ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(ir("mTabResource"),ie("interstellar-mass_ejector"))},action(){return _($(this)[0])?(T("mass_ejector","interstellar"),z($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,Te()),ka("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!!_($(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+_e(15e4).toFixed(0)},Deuterium(){return+_e(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return _($(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(a){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(r<200){let i=200-r;return`
${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Ot.int_blackhole.s_gate.effect()},action(){return _($(this)[0])&&e.interstellar.stargate.count<200?(T("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},z($(Ot.int_blackhole.s_gate)[0]),wr(),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 N(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",[x[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+_e(48e4).toFixed(0)},Deuterium(){return+_e(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[We("name"),x[e.race.species].home])},action(){return!!_($(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 _($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(a){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(a){let r=`
${t("interstellar_space_elevator_effect")}
`,i=(a?.count??0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}return r},action(){return _($(this)[0])&&e.interstellar.space_elevator.count<100?(T("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},wr(),ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(a){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(a){let r=`
${t("interstellar_gravity_dome_effect",[x[e.race.species].home])}
`,i=(a?.count??0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}return r},action(){return _($(this)[0])&&e.interstellar.gravity_dome.count<100?(T("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},wr(),ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(a){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(r<100){let i=100-r;return`
${t("interstellar_ascension_machine_effect",[We("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Ot.int_sirius.ascension_trigger.effect()},action(){return _($(this)[0])&&e.interstellar.ascension_machine.count<100?(T("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},wr(),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 a=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){a+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(a+=5)}let r=Math.round(N(1e4)-a*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return r<0&&(r=0),r},postPower(a){a?setTimeout(function(){e.tech.ascension=G.ascension_trigger?8:7,wr()},250):(e.tech.ascension=7,wr())},effect(){let a=os(),r=$(this)[0].powered(),i=r>0?`
${t("minus_power",[r])}
`:"";return`
${t("interstellar_ascension_trigger_effect")}
${a}${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 a=os();return`
${t("interstellar_ascend_effect")}
${a}`},action(){return _($(this)[0])?(br(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(a){return m("thermal_collector",a,5e6,1.08,"interstellar")},Infernite(a){return m("thermal_collector",a,25e3,1.08,"interstellar")},Stanene(a){return m("thermal_collector",a,1e6,1.08,"interstellar")},Vitreloy(a){return m("thermal_collector",a,1e5,1.08,"interstellar")}},effect(){let a=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){a+=e.stats.achieve.technophobe.l>=4?25:10;for(let r=1;r=5&&(a+=5)}return t("interstellar_thermal_collector_effect",[a])},action(){return _($(this)[0])?(T("thermal_collector","interstellar"),!0):!1}}}};function os(){let a=ke("ascend"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[a.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Ic(){let a=ke("terraform"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[a.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var de={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:We("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+_e(212e3).toFixed(0)},Deuterium(){return+_e(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return _($(this)[0])?(Ec(),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(a){return m("starbase",a,42e5,1.25,"galaxy")},Elerium(a){return m("starbase",a,1e3,1.25,"galaxy")},Mythril(a){return m("starbase",a,9e4,1.25,"galaxy")},Graphene(a){return m("starbase",a,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(a){let r=+_e(25).toFixed(2),i=250,s=e.tech.marines>=2?F(8):F(5);return`
${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[s])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered(a)])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},support(){return 2},powered(a){return N(Qt(a)?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return _($(this)[0])?(T("starbase","galaxy"),z($(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(a){return m("ship_dock",a,36e5,1.25,"galaxy")},Steel(a){return m("ship_dock",a,88e4,1.25,"galaxy")},Aluminium(a){return m("ship_dock",a,12e5,1.25,"galaxy")},Bolognium(a){return m("ship_dock",a,75e3,1.25,"galaxy")}},effect(a){return e.race.fasting?`
${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered(a)])}
`:`
${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(a){if(e.race.fasting){let r=a?e.galaxy.gateway_station.on:G.gateway_station;return r?.1*r:0}else{let r=a?e.galaxy.starbase.on:G.starbase;return r?.25*r:0}},powered(a){return N(Qt(a)?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 _($(this)[0])?(T("ship_dock","galaxy"),z($(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(a){return m("bolognium_ship",a,14e5,1.22,"galaxy")},Iron(a){return m("bolognium_ship",a,56e4,1.22,"galaxy")},Infernite(a){return m("bolognium_ship",a,1800,1.22,"galaxy")},Nano_Tube(a){return m("bolognium_ship",a,475e3,1.22,"galaxy")}},effect(){let a=+te("bolognium_ship").toFixed(3),r=+_e($(this)[0].ship.helium).toFixed(2);return`
${t("gain",[a,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${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 0},helium:5},powered(){return 0},action(){return _($(this)[0])?(T("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,z($(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(a){return m("scout_ship",a,16e5,1.25,"galaxy")},Titanium(a){return m("scout_ship",a,325e3,1.25,"galaxy")},Graphene(a){return m("scout_ship",a,118e3,1.25,"galaxy")},Soul_Gem(a){return m("scout_ship",a,1,1.02,"galaxy")}},effect(){let a=+_e($(this)[0].ship.helium).toFixed(2),r=e.tech.science>=17?`
${t("galaxy_scout_ship_effect2",[25])}
`:"";return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${r}
${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",[a,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 _($(this)[0])?(T("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,z($(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(a){return m("corvette_ship",a,45e5,1.25,"galaxy")},Steel(a){return m("corvette_ship",a,175e4,1.25,"galaxy")},Infernite(a){return m("corvette_ship",a,16e3,1.25,"galaxy")},Bolognium(a){return m("corvette_ship",a,35e3,1.25,"galaxy")},Soul_Gem(a){return m("corvette_ship",a,1,1.25,"galaxy")}},effect(){let a=+_e($(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",[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 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 _($(this)[0])?(T("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,z($(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(a){return m("frigate_ship",a,18e6,1.25,"galaxy")},Elerium(a){return m("frigate_ship",a,1250,1.25,"galaxy")},Mythril(a){return m("frigate_ship",a,35e4,1.25,"galaxy")},Sheet_Metal(a){return m("frigate_ship",a,8e5,1.25,"galaxy")},Soul_Gem(a){return m("frigate_ship",a,2,1.25,"galaxy")}},effect(){let a=+_e($(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",[a,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 _($(this)[0])?(T("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,z($(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(a){return m("cruiser_ship",a,75e6,1.25,"galaxy")},Copper(a){return m("cruiser_ship",a,6e6,1.25,"galaxy")},Adamantite(a){return m("cruiser_ship",a,1e6,1.25,"galaxy")},Vitreloy(a){return m("cruiser_ship",a,75e4,1.25,"galaxy")},Elerium(a){return m("cruiser_ship",a,1800,1.25,"galaxy")},Soul_Gem(a){return m("cruiser_ship",a,5,1.25,"galaxy")}},effect(){let a=+_e($(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",[a,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 _($(this)[0])?(T("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,z($(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(a){return m("dreadnought",a,225e6,1.25,"galaxy")},Neutronium(a){return m("dreadnought",a,25e4,1.25,"galaxy")},Bolognium(a){return m("dreadnought",a,15e5,1.25,"galaxy")},Vitreloy(a){return m("dreadnought",a,1e6,1.25,"galaxy")},Infernite(a){return m("dreadnought",a,4e5,1.25,"galaxy")},Aerogel(a){return m("dreadnought",a,8e5,1.25,"galaxy")},Soul_Gem(a){return m("dreadnought",a,25,1.25,"galaxy")}},effect(){let a=+_e($(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",[a,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 _($(this)[0])?(T("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,z($(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:We("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(a){return m("gateway_station",a,5e6,1.25,"galaxy")},Aluminium(a){return m("gateway_station",a,52e4,1.25,"galaxy")},Polymer(a){return m("gateway_station",a,35e4,1.25,"galaxy")},Neutronium(a){return m("gateway_station",a,17500,1.25,"galaxy")}},effect(a){let r=E(2e3),i=E(4500),s=E(50),n="";return e.tech.gateway&&e.tech.gateway>=2&&(n=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${n}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(){return .5},powered(a){return N(Qt(a)?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return _($(this)[0])?(T("gateway_station","galaxy"),e.resource.Helium_3.max+=E(2e3),e.resource.Deuterium.max+=E(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),z($(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(a){return m("telemetry_beacon",a,225e4,1.25,"galaxy")},Copper(a){return m("telemetry_beacon",a,685e3,1.25,"galaxy")},Alloy(a){return m("telemetry_beacon",a,425e3,1.25,"galaxy")},Iridium(a){return m("telemetry_beacon",a,177e3,1.25,"galaxy")}},effect(a){let r=e.tech.telemetry?1200:800;if(e.tech.science>=17){let c=a?e.galaxy.scout_ship.on:la.scout_ship;r+=c*25}let i=a?e.galaxy?.telemetry_beacon?.on??0:G.telemetry_beacon,s=i?r*i:0,n="";return e.tech.gateway&&e.tech.gateway>=2&&(n=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${n}
${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[s])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(){return e.tech.telemetry?.75:.5},powered(a){return N(Qt(a)?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(a){let r=a?G.telemetry_beacon+V():G.telemetry_beacon-V();r>e.galaxy.telemetry_beacon.count?r=e.galaxy.telemetry_beacon.count:r<0&&(r=0),G.telemetry_beacon=r,ji($(this)[0],"galaxy","telemetry_beacon")},action(){return _($(this)[0])?(T("telemetry_beacon","galaxy"),z($(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,vn()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`
${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(a){return m("gateway_depot",a,4e6,1.25,"galaxy")},Neutronium(a){return m("gateway_depot",a,8e4,1.25,"galaxy")},Stanene(a){return m("gateway_depot",a,5e5,1.25,"galaxy")},Vitreloy(a){return m("gateway_depot",a,2500,1.25,"galaxy")}},wide:!0,effect(a){let r=e.tech.world_control?150:100,i=E(200),s=Lc(),n=Y(+E(3e3*s).toFixed(0),1),c=Y(+E(25e4*s).toFixed(0),1),o=Y(+E(9001*s).toFixed(0),1),l=Y(+E(6660*s).toFixed(0),1),u='
';return u=u+`${t("plus_max_crates",[r])}${t("plus_max_containers",[r])}`,u=u+`${t("plus_max_resource",[n,e.resource.Uranium.name])}`,u=u+`${t("plus_max_resource",[c,e.resource.Nano_Tube.name])}`,u=u+`${t("plus_max_resource",[o,e.resource.Neutronium.name])}`,u=u+`${t("plus_max_resource",[l,e.resource.Infernite.name])}`,u=u+"
",`${u}
${t("galaxy_gateway_depot_effect",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?10:0)},action(){if(_($(this)[0])){T("gateway_depot","galaxy");let a=e.tech.world_control?150:100;e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=Lc();return e.resource.Uranium.max+=E(3e3*r),e.resource.Nano_Tube.max+=E(25e4*r),e.resource.Neutronium.max+=E(9001*r),e.resource.Infernite.max+=E(6660*r),z($(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(a){return m("defense_platform",a,75e4,1.25,"galaxy")},Adamantite(a){return m("defense_platform",a,425e3,1.25,"galaxy")},Elerium(a){return m("defense_platform",a,800,1.25,"galaxy")},Vitreloy(a){return m("defense_platform",a,1250,1.25,"galaxy")},Wrought_Iron(a){return m("defense_platform",a,75e3,1.25,"galaxy")}},effect(a){return`
${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?5:0)},postPower(a){C({el:"#gxy_stargate"},"update")},action(){return _($(this)[0])?(T("defense_platform","galaxy"),z($(this)[0]),!0):!1},post(){C({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:x[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+_e(23e4).toFixed(0)},Deuterium(){return+_e(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(_($(this)[0])){Ec(),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 a=x[e.galaxy.alien1.id].name,r=x[e.galaxy.alien1.id].entity,i=x[e.galaxy.alien2.id].name,s=x[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[r,a,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(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(a){let r=7500,i="";e.tech.xeno>=11&&(i=`
${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let s="";return e.race.fasting||(s=`
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`
${t("galaxy_embassy_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${i}${s}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&_($(this)[0])){if(T("embassy","galaxy"),z($(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",[x[e.galaxy.alien1.id].name,x[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let a=le();e.stats.endless_hunger.b1[a]=!0,a!=="m"&&a!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let a=20;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`
${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(a){return m("dormitory",a,1e7,1.25,"galaxy")},Furs(a){return m("dormitory",a,7e5,1.25,"galaxy")},Cement(a){return m("dormitory",a,12e5,1.25,"galaxy")},Plywood(a){return m("dormitory",a,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 N(3)},action(){return _($(this)[0])?(T("dormitory","galaxy"),z($(this)[0]),!0):!1},citizens(){let a=3;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`
${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(a){return m("symposium",a,8e6,1.25,"galaxy")},Food(a){return e.race.ravenous?0:m("symposium",a,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(a){return m("symposium",a,46e4,1.25,"galaxy")},Brick(a){return m("symposium",a,261600,1.25,"galaxy")}},effect(){let a="";return e.tech.xeno>=7&&(a=`
${t("galaxy_symposium_effect3",[+ve(300).toFixed(2)])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${a}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(4)},action(){return _($(this)[0])?(T("symposium","galaxy"),z($(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(a){return m("freighter",a,6e6,1.2,"galaxy")},Uranium(a){return m("freighter",a,1e4,1.2,"galaxy")},Adamantite(a){return m("freighter",a,46e4,1.2,"galaxy")},Stanene(a){return m("freighter",a,261600,1.2,"galaxy")},Bolognium(a){return m("freighter",a,66e3,1.2,"galaxy")}},effect(){let a=+_e($(this)[0].ship.helium).toFixed(2),r="";return e.tech.banking>=13&&(r=`
${t("interstellar_exchange_boost",[3])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${r}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[a,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 _($(this)[0])?(T("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:x[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[x[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(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(a){return e.race.hooved&&(a||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 _($(this)[0])&&e.galaxy.consulate.count<1?(T("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 a=10;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`
${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(a){return m("resort",a,33e6,1.25,"galaxy")},Stone(a){return m("resort",a,25e6,1.25,"galaxy")},Furs(a){return m("resort",a,1e7,1.25,"galaxy")},Oil(a){return m("resort",a,_e(125e3),1.25,"galaxy")}},effect(){let a=E(e.tech.world_control?1875e3:15e5),r=e.race.joyless?"":`
${t("city_max_entertainer",[F(2)])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${r}
${t("space_red_vr_center_effect2",[2])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(T("resort","galaxy"),z($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=F(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(a){return m("vitreloy_plant",a,35e6,1.25,"galaxy")},Cement(a){return m("vitreloy_plant",a,18e5,1.25,"galaxy")},Neutronium(a){return m("vitreloy_plant",a,25e4,1.25,"galaxy")},Iridium(a){return m("vitreloy_plant",a,85e4,1.25,"galaxy")},Aerogel(a){return m("vitreloy_plant",a,4e5,1.25,"galaxy")}},effect(){let a=+te("vitreloy_plant").toFixed(2),r=2.5,i=100,s=5e4;return`
${t("galaxy_vitreloy_plant_effect",[a])}
${t("galaxy_vitreloy_plant_effect2",[r,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return N(10)},action(){return _($(this)[0])?(T("vitreloy_plant","galaxy"),z($(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(a){return m("super_freighter",a,28e6,1.2,"galaxy")},Aluminium(a){return m("super_freighter",a,35e5,1.2,"galaxy")},Alloy(a){return m("super_freighter",a,1e6,1.2,"galaxy")},Graphene(a){return m("super_freighter",a,75e4,1.2,"galaxy")}},effect(){let a=+_e($(this)[0].ship.helium).toFixed(2),r="";return e.tech.banking>=13&&(r=`
${t("interstellar_exchange_boost",[8])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${r}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[a,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 _($(this)[0])?(T("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:x[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[x[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 a=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(r){a+=de.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_alien2[r]}),{label:t("galaxy_fleet_rating",[`400
`]),met:!(a<400)}}return{label:t("galaxy_fleet_rating",['400']),met:!1}}},effect(){let a=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){a+=de.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let r=a>=650?`${t("galaxy_piracy_low")}`:`${t("galaxy_piracy_avg")}`;return`
${t("galaxy_alien2_mission_effect2",[a])}
${t("galaxy_alien2_mission_effect3",[r])}
${t("galaxy_alien2_mission_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(_($(this)[0])){let a=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(r){a+=de.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_alien2[r]}),a>=400){if(I(t("galaxy_alien2_mission_result2",[x[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),a<650){let r=80;e.race.instinct&&(r/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(r-=de.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(a){return m("foothold",a,25e6,1.25,"galaxy")},Titanium(a){return m("foothold",a,3e6,1.25,"galaxy")},Polymer(a){return m("foothold",a,175e4,1.25,"galaxy")},Iridium(a){return m("foothold",a,9e5,1.25,"galaxy")},Bolognium(a){return m("foothold",a,5e4,1.25,"galaxy")}},effect(a){let r=2.5;return`
${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered(a)])}
`},support(){return 4},powered(a){return N(Qt(a)?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return _($(this)[0])?(T("foothold","galaxy"),z($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,vn(),pe()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`
${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(a){return m("armed_miner",a,5e6,1.25,"galaxy")},Steel(a){return m("armed_miner",a,18e5,1.25,"galaxy")},Stanene(a){return m("armed_miner",a,1975e3,1.25,"galaxy")},Vitreloy(a){return m("armed_miner",a,2e4,1.25,"galaxy")},Soul_Gem(a){return m("armed_miner",a,1,1.25,"galaxy")}},effect(){let a=.032,r=.23,i=.65,s=+_e($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[a,t("resource_Bolognium_name")])}
${t("gain",[r,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),x[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 _($(this)[0])?(T("armed_miner","galaxy"),z($(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(a){return m("ore_processor",a,3e6,1.25,"galaxy")},Iron(a){return m("ore_processor",a,5e6,1.25,"galaxy")},Coal(a){return m("ore_processor",a,375e4,1.25,"galaxy")},Graphene(a){return m("ore_processor",a,225e4,1.25,"galaxy")}},effect(){return`
${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("ore_processor","galaxy"),z($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(a){return m("scavenger",a,75e5,1.25,"galaxy")},Alloy(a){return m("scavenger",a,125e4,1.25,"galaxy")},Aluminium(a){return m("scavenger",a,68e5,1.25,"galaxy")},Neutronium(a){return m("scavenger",a,75e3,1.25,"galaxy")},Elerium(a){return m("scavenger",a,750,1.25,"galaxy")}},effect(a){let r=Lt("gxy_alien2",!1,!1,a),i=Math.round(r*25e3),s=+_e($(this)[0].ship.helium).toFixed(2),n=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",[i])}
${n}
${t("galaxy_alien2_support",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[s,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 _($(this)[0])?(T("scavenger","galaxy"),z($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:x[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 a=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(r){a+=de.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_chthonian[r]}),{label:t("galaxy_fleet_rating",[`1250
`]),met:!(a<1250)}}return{label:t("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let a=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){a+=de.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let r=a>=4500?`${t("galaxy_piracy_low")}`:a>=2500?`${t("galaxy_piracy_avg")}`:`${t("galaxy_piracy_high")}`;return`
${t("galaxy_alien2_mission_effect2",[a])}
${t("galaxy_alien2_mission_effect3",[r])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(_($(this)[0])){let a=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(r){a+=de.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_chthonian[r]}),a>=1250){let r=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),a>=2500&&(r=a>=4500?80:160),e.race.instinct&&(r/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(r-=de.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(a){return m("minelayer",a,9e6,1.25,"galaxy")},Iron(a){return m("minelayer",a,48e5,1.25,"galaxy")},Nano_Tube(a){return m("minelayer",a,125e4,1.25,"galaxy")},Nanoweave(a){return m("minelayer",a,1e5,1.25,"galaxy")}},effect(){let a=+_e($(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",[a,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 _($(this)[0])?(T("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){C({el:"#gxy_chthonian"},"update")},post(){C({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`
${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(a){return m("excavator",a,12e6,1.25,"galaxy")},Polymer(a){return m("excavator",a,44e5,1.25,"galaxy")},Iridium(a){return m("excavator",a,36e5,1.25,"galaxy")},Mythril(a){return m("excavator",a,18e4,1.25,"galaxy")}},effect(){let a=+te("excavator").toFixed(3);return`
${t("gain",[a,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(8)},powerBalancer(){return[{r:"Orichalcum",p:te("excavator")}]},action(){return _($(this)[0])?(T("excavator","galaxy"),z($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`
${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(a){return m("raider",a,12e6,1.25,"galaxy")},Titanium(a){return m("raider",a,125e4,1.25,"galaxy")},Bolognium(a){return m("raider",a,6e5,1.25,"galaxy")},Vitreloy(a){return m("raider",a,125e3,1.25,"galaxy")},Stanene(a){return m("raider",a,825e3,1.25,"galaxy")}},effect(){let a=+_e($(this)[0].ship.helium).toFixed(2),r=.65,i=.05,s=2.3,n=.8;return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Deuterium_name")])}
${t("gain",[i,t("resource_Vitreloy_name")])}
${t("gain",[s,t("resource_Polymer_name")])}
${t("gain",[n,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[a,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 _($(this)[0])?(T("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){C({el:"#gxy_chthonian"},"update")},post(){C({el:"#gxy_chthonian"},"update")}}}};function Bc(a){let r="space";return a.substr(0,4)==="int_"?r="interstellar":a.substr(0,5)==="prtl_"?r="portal":a.substr(0,4)==="gxy_"?r="galaxy":a.substr(0,4)==="tau_"&&(r="tauceti"),r}function Lt(a,r,i,s){if(e.tech.piracy&&!e.race.truepath){let n=0,c=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let p=0;po?o:n;return((1-(o-p)/o)*l+(1-l))*(r?1:Lt("gxy_stargate",!1,!1,s))}else{let p=n>o?o:n;return(1-(o-p)/o)*l+(1-l)}}else return 1}function Ec(){let a=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&a.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||a.push("custom");let r=Object.keys(x).filter(function(n){return!["demonic","eldritch"].includes(x[n].type)&&!a.includes(n)}),i=Si(r);e.galaxy.alien1={id:r[i]},a.push(r[i]),r=Object.keys(x).filter(function(n){return!["angelic"].includes(x[n].type)&&!a.includes(n)});let s=Si(r);e.galaxy.alien2={id:r[s]}}function Lc(){let a=1;return e.race.pack_rat&&(a*=1.05),e.stats.achieve.blackhole&&(a*=1+e.stats.achieve.blackhole.l*.05),a*=e.tech.world_control?2:1,a}var Il={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 T(a,r){r||(r="space"),e[r][a]||(e[r][a]=Il[a]),e[r][a].count++}function es(a,r){return a&&r?rt[a][r]:rt}function Kc(){return Ot}function Gc(){return de}function yn(a,r,i){switch(a){case"space":return Vt(rt,r,i);case"interstellar":return Vt(Ot,r,i);case"galaxy":return Vt(de,r,i)}}function Vt(a,r,i){let s=e.race.truepath?"truepath":"standard";if(a[r][i].hasOwnProperty("path")&&!a[r][i].path.includes(s))return!1;var n=!0;return Object.keys(a[r][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=a[r][i].grant[1]&&(n=!1),n}function ut(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Dc("inner"),e.race.truepath&&Dc("outer"),wr(),vn())}function Dc(a){if(a||(a=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&&a!=="inner"||e.settings.spaceTabs===5&&a!=="outer"))return;let r=a==="inner"?$("#space"):$("#outerSol");if(A(r),r.append($(`

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

`)),!e.settings.showSpace)return!1;let i=[];Object.keys(rt).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&&rt[s].info.zone!==a)return;let c=typeof rt[s].info.name=="string"?rt[s].info.name:rt[s].info.name(),o=!!(e.race.orbit_decayed||e.race.cataclysm);if(o&&s!=="spc_home"||!o){if(rt[s].info.support){let l=rt[s].info.support;e.space[l].hasOwnProperty("support")||(e.space[l].support=0,e.space[l].s_max=0),r.append(`

${c}

{{ support }}/{{ s_max }}
`),C({el:`#sr${s}`,data:e.space[l]})}else r.append(`

${c}

`);e.race.truepath&&rt[s].info.hasOwnProperty("syndicate")&&rt[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")} `),C({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(l){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let u=Sa(l,!0);if(u.s>=10)return u.s>=50?u.r:Math.round(u.r*u.s*.02)}return"???"},scan(l){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((Sa(l,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(l){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let u=Sa(l,!0);return u.s>=100?u.o:0}return 0}}}),rt[s].info.hasOwnProperty("extra")&&rt[s].info.extra(s))}B(s,function(){return typeof rt[s].info.desc=="string"?rt[s].info.desc:rt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(rt[s]).forEach(function(l){if(l!=="info"&&Vt(rt,s,l)){let u=rt[s][l];Ut(u,a==="inner"?"space":"outerSol",l)}})}})}function wr(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let a=$("#interstellar");if(A(a),a.append($(`

${t("tab_interstellar")}

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

${s}

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

${s}

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

${t("tab_galactic")}

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

${s}

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

${t("galaxy_armada")}

`);a.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 }}`)),C({el:`#h${r}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(l){return gt()},s_max(l){return gt(!0)}}}),["soldier","crew1","crew2"].forEach(function(l){B(`h${r}${l}`,function(){switch(l){case"soldier":return bn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${r} span.${l}`})});let n=$(`
`);a.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],o=[];for(let l=0;l<6;l++){let u=$('
');o.push(u),n.append(u)}for(let l=0;l${de.gxy_gateway[c[l]].title}
`);o[l+1].append(u)}o[0].append($("")),o[0].append($(`${de.gxy_gateway.info.name}`));for(let l=0;l{{ gateway.${c[l]} }}
`);o[l+1].append(u)}Object.keys(e.galaxy.defense).forEach(function(l){let u=l.substring(4);if(e.settings.space[u]&&u!=="gateway"){let d=$(`${typeof de[l].info.name=="string"?de[l].info.name:de[l].info.name()}`);o[0].append(d);for(let h=0;h'),f=$(`«`),g=$(`{{ ${u}.${c[h]} }}`),w=$(`»`);o[h+1].append(p),p.append(f),p.append(g),p.append(w)}}}),C({el:`#${r}`,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(l,u){if(e.galaxy.defense[l][u]>0){let d=V();d>e.galaxy.defense[l][u]&&(d=e.galaxy.defense[l][u]),e.galaxy.defense.gxy_gateway[u]+=d,e.galaxy.defense[l][u]-=d}},add(l,u){if(e.galaxy.defense.gxy_gateway[u]>0){let d=V();d>e.galaxy.defense.gxy_gateway[u]&&(d=e.galaxy.defense.gxy_gateway[u]),e.galaxy.defense.gxy_gateway[u]-=d,e.galaxy.defense[l][u]+=d}}}}),Object.keys(e.galaxy.defense).forEach(function(l){let u=l.substring(4);e.settings.space[u]&&B(`armada${u}`,function(){return`
${typeof de[l].info.desc=="string"?de[l].info.desc:de[l].info.desc()}
`})});for(let l=0;l=5&&i&&(a*=.95**i),a}function ns(a,r){if(e.space.swarm_plant){let i=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(i-=pa(r)/100),i<.05&&(i=.05),a*=i**e.space.swarm_plant.count}return a}function ue(a,r,i){e.race.universe==="heavy"&&(a*=1.25+.5*fe("heavy")),e.race.truepath&&(a*=r?2.5:1.25);let s=i?e.city?.mass_driver?.on??0:G.mass_driver;if(s){let n=(i?i.truepath:e.race.truepath)?.94:.95;a*=n**s}return e.stats.achieve.heavyweight&&(a*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(a*=Fe.dense.vars()[2]),e.race.cataclysm&&(a*=.2),e.race.heavy&&(a*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(a*=1.35+9.65*fe("heavy")),xe("launch_day")&&(a*=.95),a}function _e(a){return e.race.universe==="heavy"&&(a*=1.2+.3*fe("heavy")),e.stats.achieve.heavyweight&&(a*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(a*=1+b.heavy.vars()[0]/100),xe("launch_day")&&(a*=.95),a}function S(){let a={red:x[e.race.species].solar.red,hell:x[e.race.species].solar.hell,gas:x[e.race.species].solar.gas,gas_moon:x[e.race.species].solar.gas_moon,dwarf:x[e.race.species].solar.dwarf,titan:kr[x[e.race.species].type].solar.titan,enceladus:kr[x[e.race.species].type].solar.enceladus,triton:kr[x[e.race.species].type].solar.triton,eris:kr[x[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let r of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(r)&&(a[r]=e.custom.race0[r]);return a}var Ye=["l","h","a","e","m","mg"],ma={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 br(a){!a&&!e.race.noexport&&(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),L(`biome_${e.city.biome}`),L(`genus_${x[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?L("soul_sponge"):(L("ascended"),e.interstellar.thermal_collector.count===0&&se("energetic")),e.race.species==="junker"&&se("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&se("garbage_pie"),e.race.emfield&&L("technophobe"),e.race.cataclysm&&se("finish_line"),e.race.noexport="Race",A($("#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 r=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(a?a.append(r):$("#city").append(r),r.append(`

${t("genelab_title")}

- ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }}
`),a){r.append(` + `),C({el:"#mTabStats",data:{s:e.settings},filters:{label(r){return Hr(r)}}}),Tc();break;case 7:e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Settings"});break;case"mTabObserve":default:e.settings.tabLoad||Ie("page_view",{page_title:"Evolve - Hell Observation"}),e.portal.observe&&$i(!0);break}$("#popper").length>0&&$(`#${$("#popper").data("id")}`).length===0&&ie()}var rt={spc_home:{info:{name(){return x[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(a,r){return _e(7500,!1,r)}},effect:t("space_home_test_launch_effect"),action(){if(_($(this)[0])){if(e.race.truepath){let a=1;if(Ua("gov0")||a++,Ua("gov1")||a++,Ua("gov2")||a++,Math.floor(K(0,a))!==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(a){return m("satellite",a,72e3,1.22)},Knowledge(a){return m("satellite",a,28e3,1.22)},Oil(a,r){return m("satellite",a,_e(3200,!1,r),1.22)},Alloy(a){return m("satellite",a,8e3,1.22)}},effect(){let a=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;a*=e.tech.supercollider/n+1}let r=e.race.cataclysm?t("space_moon_observatory_title"):e.race.orbit_decayed?t("city_university"):qt(),i=e.race.cataclysm?25:e.race.orbit_decayed?12:4,s=`
${t("space_home_satellite_effect2",[r,i])}
`;return`
${t("plus_max_resource",[a,t("resource_Knowledge_name")])}
${s}
${t("space_home_satellite_effect3",[e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
`},action(){return _($(this)[0])?(T("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(a){return m("gps",a,75e3,1.18)},Knowledge(a){return m("gps",a,5e4,1.18)},Copper(a){return m("gps",a,6500,1.18)},Oil(a,r){return m("gps",a,_e(3500,!1,r),1.18)},Titanium(a){return m("gps",a,8e3,1.18)}},effect(a){return(a?.count??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 _($(this)[0])?(T("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(a){return m("propellant_depot",a,55e3,1.35)},Aluminium(a){return m("propellant_depot",a,22e3,1.35)},Oil(a,r){return m("propellant_depot",a,_e(5500,!1,r),1.35)}},effect(){let a=E(1250)*(e.tech.world_control?1.5:1);if(e.resource.Helium_3.display){let r=E(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
`}return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
`},action(){return _($(this)[0])?(T("propellant_depot"),e.resource.Oil.max+=E(1250)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=E(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(a){return m("nav_beacon",a,75e3,1.32)},Copper(a){return m("nav_beacon",a,38e3,1.32)},Aluminium(a){return m("nav_beacon",a,44e3,1.32)},Oil(a,r){return m("nav_beacon",a,_e(12500,!1,r),1.32)},Iridium(a){return m("nav_beacon",a,1200,1.32)}},powered(){return N(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 a="";e.race.orbit_decayed&&e.tech.broadcast&&(a=`
${t("space_red_vr_center_effect1",[e.tech.broadcast/2])}
`);let r=e.race.orbit_decayed?"":`
${t("space_home_nav_beacon_effect1")}
`,i=e.tech.luna>=3?`
${t("space_red_spaceport_effect1",[S().red,1])}
`:"";return`${r}${i}${a}
${t("space_home_nav_beacon_effect2",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("nav_beacon"),z($(this)[0]),!0):!1}}},spc_moon:{info:{name:t("space_moon_info_name"),desc(){let a=x[e.race.species].home;return t("space_moon_info_desc",[a])},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(a,r){return+_e(12e3,!1,r).toFixed(0)}},effect:t("space_moon_mission_effect"),action(){return _($(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(a){return m("moon_base",a,22e3,1.32)},Cement(a){return m("moon_base",a,18e3,1.32)},Alloy(a){return m("moon_base",a,7800,1.32)},Polymer(a){return m("moon_base",a,12500,1.32)}},effect(a){let r=E(500),i=+_e($(this)[0].support_fuel().a,!0,a).toFixed(2);return`
${t("space_moon_base_effect1")}
${t("plus_max_resource",[r,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 N(4)},powerBalancer(){return[{s:e.space.moon_base.s_max-e.space.moon_base.support}]},refresh:!0,action(){if(_($(this)[0])){if(T("moon_base"),z($(this)[0]),e.space.moon_base.count===1&&(e.tech.moon=1),!e.tech.luna&&(e.tech.luna=1,e.race.truepath)){let a=t("space_moon_base_msg",[yt(3)]);e.civic.foreign.gov3.hstl<10?a=`${a} ${t("space_moon_base_msg_ally")}`:e.civic.foreign.gov3.hstl>60&&(a=`${a} ${t("space_moon_base_msg_hstl")}`),I(a,"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(a){return m("iridium_mine",a,42e3,1.35)},Lumber(a){return m("iridium_mine",a,9e3,1.35)},Titanium(a){return m("iridium_mine",a,17500,1.35)}},effect(){let a=te("iridium_mine","iridium"),r=+a.b.toFixed(3),i="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?i=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(i=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`));let s=e.race.cataclysm?`
${t("produce",[+te("iridium_mine","coal").toFixed(2),e.resource.Coal.name])}
`:"",n=e.race.cataclysm?`
${t("produce",[+(te("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",[r])}
${i}${s}${n}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.resource.Iridium.display=!0,T("iridium_mine"),e.resource.Mythril.display||(e.resource.Mythril.display=!0,Xe()),z($(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(a){return m("helium_mine",a,38e3,1.35)},Aluminium(a){return m("helium_mine",a,9e3,1.35)},Steel(a){return m("helium_mine",a,17500,1.35)}},effect(){let a=E(100),r=te("helium_mine"),i=+r.b.toFixed(3),s="";return e.race.truepath&&(e.civic.foreign.gov3.hstl<10?s=`
${t("space_rival_ally",[+(r.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(s=`
${t("space_rival_war",[+(r.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",[a,t("resource_Helium_3_name")])}
`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(e.resource.Helium_3.display=!0,T("helium_mine"),z($(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(a){return m("observatory",a,2e5,1.28)},Knowledge(a){return m("observatory",a,69e3,1.28)},Stone(a){return m("observatory",a,125e3,1.28)},Iron(a){return m("observatory",a,65e3,1.28)},Iridium(a){return m("observatory",a,1250,1.28)}},effect(){let a="";e.race.cataclysm&&(a=`
${t("city_university_effect",[F(1)])}
`);let r=5e3;e.race.cataclysm&&e.space.satellite&&e.space.satellite.count>0&&(r*=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")])}
${a}
${t("plus_max_resource",[r,t("resource_Knowledge_name")])}
${i}`},s_type:"moon",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("observatory"),z($(this)[0]),!0):!1}}},spc_red:{info:{name(){return S().red},desc(){return t("space_red_info_desc",[S().red])},support:"spaceport",zone:"inner",syndicate(){return!0}},red_mission:{id:"space-red_mission",title(){return t("space_mission_title",[S().red])},desc(){return t("space_mission_desc",[S().red])},reqs:{space:3,space_explore:3},grant:["space",4],queue_complete(){return e.tech.space>=4?0:1},cost:{Helium_3(a,r){return+_e(4500,!1,r).toFixed(0)}},effect(){return t("space_red_mission_effect",[S().red])},action(){return _($(this)[0])?(I(t("space_red_mission_action",[S().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(a){return m("spaceport",a,47500,1.32)},Iridium(a){return m("spaceport",a,1750,1.32)},Mythril(a){return m("spaceport",a,25,1.32)},Titanium(a){return m("spaceport",a,22500,1.32)}},effect(a){let r=+_e($(this)[0].support_fuel().a,!0,a).toFixed(2),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=E(ja()*4);i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_red_spaceport_effect1",[S().red,$(this)[0].support()])}
${i}
${t("space_red_spaceport_effect2",[r,$(this)[0].powered()])}
${t("spend",[e.race.cataclysm?2:25,e.resource.Food.name])}
`},support(){let a=e.race.cataclysm||e.race.orbit_decayed?4:3;return e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4&&a++,a},support_fuel(){return{r:"Helium_3",a:1.25}},powered(){return N(5)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},refresh:!0,action(){return _($(this)[0])?(T("spaceport"),z($(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(a){return m("red_tower",a,225e3,1.28)},Iron(a){return m("red_tower",a,22e3,1.28)},Cement(a){return m("red_tower",a,15e3,1.28)},Alloy(a){return m("red_tower",a,8e3,1.28)}},effect(){return`
${t("space_red_spaceport_effect1",[S().red,e.race.cataclysm||e.race.fasting?2:1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(2)},powerBalancer(){return[{s:e.space.spaceport.s_max-e.space.spaceport.support}]},support(){return e.race.cataclysm||e.race.fasting?2:1},action(){return _($(this)[0])?(T("red_tower"),z($(this)[0]),!0):!1}},captive_housing:ft("captive_housing","space"),terraformer:{id:"space-terraformer",title:t("space_terraformer"),desc(a){return!e.space.hasOwnProperty("terraformer")||e.space.terraformer.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?75e5:75e6:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?25e4:75e4:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?1e3:0},Bolognium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1e5:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?12e3:25e4:0},Soul_Gem(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:1:0},Nanoweave(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100?e.race.truepath?0:75e3:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?75e3:0},Cipher(a){return(a||0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0)<100&&e.race.truepath?1e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("terraformer")?e.space.terraformer.count:0);if(r<100){let i=100-r;return`
${t("space_terraformer_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_red.atmo_terraformer.effect(a)},action(){return _($(this)[0])&&e.space.terraformer.count<100?(T("terraformer","space"),e.space.terraformer.count>=100&&(e.tech.terraforming=2,e.space.atmo_terraformer={count:1,on:0},ut(),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(a){return N((a?a.truepath:e.race.truepath)?500:5e3)},postPower(a){a?setTimeout(function(){e.tech.terraforming=G.atmo_terraformer?3:2,ut()},250):(e.tech.terraforming=2,ut())},effect(a){let r=Ic(),i=$(this)[0].powered(a),s=i>0?`
${t("minus_power",[i])}
`:"";return`
${t("space_terraformer_effect2")}
${r}${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 a=Ic();return`
${t("space_terraform_effect")}
${a}`},action(){return _($(this)[0])?(_n(),!0):!1}},assembly:ft("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",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("living_quarters",a,gn(38e3),1.28)},Steel(a){return m("living_quarters",a,gn(15e3),1.28)},Polymer(a){return m("living_quarters",a,gn(9500),1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(a){let r=$(this)[0].citizens(a),i="";if(e.race.cataclysm||e.race.orbit_decayed){let s=E(e.tech.home_safe>=2?e.tech.home_safe>=3?"100000":"50000":"25000");i=`
${t("plus_max_resource",[`$${s}`,t("resource_Money_name")])}
`}return`
${t("space_used_support",[S().red])}
${i}
${t("plus_max_resource",[F(1),e.race.truepath?t("job_colonist_tp",[S().red]):t("colonist")])}
${t("plus_max_resource",[r,t("citizen")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){if(_($(this)[0])){if(T("living_quarters"),e.civic.colonist.display=!0,z($(this)[0])){e.resource[e.race.species].max+=F(1);let a=F(1);e.civic.colonist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.colonist.workers+=r}return!0}return!1},citizens(a){let r=e.race.cataclysm||e.race.orbit_decayed?2:1,i=a?e.space?.biodome?.on??0:we.biodome;if(i){let s=e.tech.mars>=6?.1:.05;r+=s*i}return+F(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(a){return m("pylon",a,10,1.48)},Stone(a){return m("pylon",a,12,1.42)},Crystal(a){return m("pylon",a,8,1.42)-3}},effect(){let a=E(2),r=+(.005*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.space.pylon.count++,e.resource.Mana.max+=E(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",[S().red])}
`},reqs:{mars:1,broadcast:3},cost:{Money(a){return m("vr_center",a,38e4,1.25)},Copper(a){return m("vr_center",a,55e3,1.25)},Stanene(a){return m("vr_center",a,1e5,1.25)},Soul_Gem(a){return m("vr_center",a,1,1.25)}},effect(){let a=J("gaslighter",1),r=a?a+1:1;return e.race.orbit_decayed&&(r+=2),`
${t("space_used_support",[S().red])}
${t("space_red_vr_center_effect1",[r])}
${t("space_red_vr_center_effect2",[2])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("vr_center"),z($(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(a){return m("garage",a,75e3,1.28)},Iron(a){return m("garage",a,12e3,1.28)},Brick(a){return m("garage",a,3e3,1.28)},Sheet_Metal(a){return m("garage",a,1500,1.28)}},wide:!0,res(){let a=["Copper","Iron","Cement","Steel","Titanium","Alloy","Nano_Tube","Neutronium","Infernite"];return(e.race.cataclysm||e.race.orbit_decayed)&&(a.push("Polymer"),a.push("Coal"),a.push("Lumber"),a.push("Chrysotile"),a.push("Stone"),a.push("Furs")),a},heavy(a){return!!["Copper","Iron","Steel","Titanium","Neutronium","Infernite"].includes(a)},val(a){switch(a){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(a){let r=e.tech.particles>=4?1+e.tech.supercollider/20:1;return(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(r*=2),e.tech.shelving&&e.tech.shelving>=3&&(r*=1.5),r*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,a&&e.tech.shelving&&e.tech.shelving>=2?r*3:r},effect(){let a=$(this)[0].multiplier(!1),r=$(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 o=$(this)[0].heavy(c),l=Y(+(E($(this)[0].val(c))*(o?r:a)).toFixed(0),1);n=n+`${t("plus_max_resource",[l,e.resource[c].name])}`}return n=n+"
",n},action(){if(_($(this)[0])){T("garage");let a=e.tech.particles>=4?20+e.tech.supercollider:20;(e.tech.world_control||e.race.cataclysm||e.race.orbit_decayed)&&(a+=10),e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=$(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+=E($(this)[0].val(s))*(n?i:r)}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",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("red_mine",a,5e4,1.32)},Lumber(a){return m("red_mine",a,65e3,1.32)},Iron(a){return m("red_mine",a,33e3,1.32)}},effect(){let a=te("red_mine","copper"),r=te("red_mine","titanium"),i=+a.b.toFixed(3),s=+r.b.toFixed(3),n="";e.race.truepath&&(e.civic.foreign.gov3.hstl<10?n=`
${t("space_rival_ally",[+(a.g*100).toFixed(1)])}
`:e.civic.foreign.gov3.hstl>60&&(n=`
${t("space_rival_war",[+(a.g*100).toFixed(1)])}
`));let c=e.race.orbit_decayed?`
${t("city_mine_effect1",[F(1)])}
${t("city_coal_mine_effect1",[F(1)])}
`:"",o=(e.race.cataclysm||e.race.orbit_decayed)&&!e.race.sappy?`
${t("space_red_mine_effect",[+te("red_mine","stone").toFixed(2),e.resource.Stone.name])}
`:"",l=(e.race.cataclysm||e.race.orbit_decayed)&&e.race.smoldering?`
${t("space_red_mine_effect",[+te("red_mine","asbestos").toFixed(2),e.resource.Chrysotile.name])}
`:"",u=e.race.cataclysm||e.race.orbit_decayed?`
${t("space_red_mine_effect",[+te("red_mine","aluminium").toFixed(2),e.resource.Aluminium.name])}
`:"";return`
${t("space_used_support",[S().red])}
${c}
${t("space_red_mine_effect",[i,e.resource.Copper.name])}
${t("space_red_mine_effect",[s,e.resource.Titanium.name])}
${n}${l}${o}${u}`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("red_mine"),z($(this)[0]),!0):!1}},fabrication:{id:"space-fabrication",title:t("space_red_fabrication_title"),desc(){return`
${t("space_red_fabrication_desc")}
${t("space_support",[S().red])}
`},reqs:{mars:1},cost:{Money(a){return m("fabrication",a,9e4,1.32)},Copper(a){return m("fabrication",a,25e3,1.32)},Cement(a){return m("fabrication",a,12e3,1.32)},Wrought_Iron(a){return m("fabrication",a,1200,1.32)}},effect(){let a=e.race.cataclysm&&!e.race.flier?`
${t("city_cement_plant_effect1",[F(1)])}
`:"",r=e.race.cataclysm||e.race.orbit_decayed?5:2;return e.race.high_pop&&(r=ve(r)),`
${t("space_used_support",[S().red])}
${t("space_red_fabrication_effect1",[F(1)])}
${a}
${t("space_red_fabrication_effect2",[r])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("fabrication"),z($(this)[0])&&(e.civic.craftsman.max+=F(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(a){return m("red_factory",a,75e3,1.32)},Brick(a){return m("red_factory",a,1e4,1.32)},Coal(a){return m("red_factory",a,7500,1.32)},Mythril(a){return m("red_factory",a,50,1.32)}},effect(a){let r=`
${t("space_red_factory_effect1")}
`;e.tech.foundry>=7&&(r=r+`
${t("space_red_factory_effect2")}
`),e.race.orbit_decayed&&!e.race.flier&&(r=r+`
${t("city_cement_plant_effect1",[F(1)])}
`);let i=+_e(1,!0,a).toFixed(2);return r=r+`
${t("space_red_factory_effect3",[i,$(this)[0].powered()])}
`,r},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(e.space.red_factory.count++,z($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,Pe(),!0):!1}},nanite_factory:ft("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 a;return e.race.artifical?a=`
${t("space_red_signal_tower_title")}
`:e.race.soul_eater?a=`
${t("space_red_asphodel_desc")}
`:e.race.carnivore?a=`
${t("space_red_biodome_desc_carn")}
`:a=`
${t("space_red_biodome_desc",[S().red])}
`,`
${a}
${t("space_support",[S().red])}
`},reqs:{mars:2},cost:{Money(a){return m("biodome",a,45e3,1.28)},Lumber(a){return m("biodome",a,65e3,1.28)},Brick(a){return m("biodome",a,1e3,1.28)},Nanite(a){return e.race.deconstructor?m("biodome",a,75,1.28):0}},effect(){let a=+te("biodome","food").toFixed(2),r=e.race.cataclysm||e.race.orbit_decayed?`
${t("produce",[+te("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",[+te("biodome","lumber").toFixed(2),e.resource.Lumber.name])}
`:"",s=e.tech.mars>=6?.1:.05,n=e.race.artifical?t("city_transmitter_effect",[E(500)]):t("plus_max_resource",[E(100),t("resource_Food_name")]),c=e.race.artifical||e.race.orbit_decayed?`
${n}${t("space_used_support",[S().red])}
${r}
${t("space_red_biodome_effect",[a,e.resource.Food.name])}
${t("space_red_biodome_effect2",[+F(s).toFixed(2)])}
${i}${c}`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("biodome"),e.race.cataclysm||(L("colonist"),e.race.joyless&&(L("joyless"),delete e.race.joyless,le())),z($(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",[S().red])},reqs:{mars:1},trait:["orbit_decayed"],cost:{Money(a){return m("university",a,900,1.5,"city")-500},Lumber(a){return m("university",a,500,1.36,"city")-200},Stone(a){return m("university",a,750,1.36,"city")-350},Crystal(a){return e.race.universe==="magic"?m("university",a,5,1.36,"city"):0}},wiki:!1,effect(){return q.city.university.effect()},action(){if(_($(this)[0])){let a=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,e.city.university.count++,e.space.red_university.count=e.city.university.count,e.civic.professor.display=!0,e.civic.professor.max=F(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",[S().red])}
`},reqs:{mars:5},cost:{Money(a){return m("exotic_lab",a,75e4,1.28)},Steel(a){return m("exotic_lab",a,1e5,1.28)},Mythril(a){return m("exotic_lab",a,1e3,1.28)},Elerium(a){return m("exotic_lab",a,20,1.28)-4}},effect(a){let r=500;if(e.tech.science>=13&&e.interstellar.laboratory){let o=a?e.interstellar.laboratory.on:Hs.laboratory;r+=o*25}e.tech.ancient_study&&e.tech.ancient_study>=2&&(r+=e.space.ziggurat.count*15);let i=a?e.city?.mass_driver?.on??0:G.mass_driver;e.tech.mass>=2&&i>0&&(r+=ve(i*e.civic.scientist.workers)),e.tech.science>=21&&(r*=1.45),e.race.high_pop&&(r=ve(r));let s=E(10),n="",c="";return(e.race.cataclysm||e.race.orbit_decayed)&&(n=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`,r*=1+(a?e.space.observatory.on:we.observatory)*.25,e.tech.science>=15&&(c=`
${t("city_wardenclyffe_effect4",[2])}
`)),`
${t("space_used_support",[S().red])}
${n}${c}
${t("space_red_exotic_lab_effect1",[+r.toFixed(0)])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`},s_type:"red",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("exotic_lab"),z($(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 a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("space_red_ziggurat_desc",[a])}
`},reqs:{theology:4},cost:{Money(a){return m("ziggurat",a,6e5,1.28)},Stone(a){return m("ziggurat",a,25e4,1.28)},Aluminium(a){return m("ziggurat",a,7e4,1.28)},Mythril(a){return m("ziggurat",a,250,1.28)}},effect(a){let r=e.tech.ancient_study?.6:.4,i=a?e.space?.exotic_lab?.on??0:we.exotic_lab;if(e.tech.ancient_deify&&e.tech.ancient_deify>=2&&i&&(r+=.01*i),e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let c=.002;e.race.high_pop&&(c=ve(c)),r+=c*e.civic.priest.workers}e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.high_pop&&(r=ve(r)),r=+r.toFixed(2);let s=e.race.truepath?[r,x[e.race.species].home]:[r],n=`
${t(e.race.truepath?"space_red_ziggurat_effect_tp":"space_red_ziggurat_effect",s)}
`;return e.tech.ancient_study&&e.tech.ancient_study>=2&&(n=n+`
${t("interstellar_laboratory_effect",[3])}
`),(e.race.cataclysm||e.race.orbit_decayed)&&(n=n+wn()),e.genes.ancients&&e.genes.ancients>=4&&(n=n+`
${t("city_temple_effect6",[F(1)])}
`),n},action(){return _($(this)[0])?(T("ziggurat"),e.genes.ancients&&e.genes.ancients>=4&&(e.civic.priest.display=!0,e.civic.priest.max+=F(1)),e.race.cataclysm&&L("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(a){return m("space_barracks",a,35e4,1.28)},Alloy(a){return m("space_barracks",a,65e3,1.28)},Iridium(a){return m("space_barracks",a,22500,1.28)},Wrought_Iron(a){return m("space_barracks",a,12500,1.28)},Horseshoe(){return e.race.hooved?2:0}},effect(a){let r=e.race.orbit_decayed?q.city.boot_camp.effect():"",i=+_e(2,!0,a).toFixed(2),s=e.tech.marines>=2?F(4):F(2),n=e.race.cataclysm?"":`
${t("space_red_space_barracks_effect3",[e.resource.Food.name])}
`;return`
${t("plus_max_soldiers",[s])}
${r}
${t("space_red_space_barracks_effect2",[i])}
${n}`},powered(){return 0},action(){return _($(this)[0])?(T("space_barracks"),e.space.space_barracks.on++,!0):!1},flair(){return t("space_red_space_barracks_flair")}},bonfire:ft("bonfire","space"),horseshoe:ft("horseshoe","space")},spc_hell:{info:{name(){return S().hell},desc(){return t("space_hell_info_desc",[S().hell])},zone:"inner",syndicate(){return!1}},hell_mission:{id:"space-hell_mission",title(){return t("space_mission_title",[S().hell])},desc(){return t("space_mission_desc",[S().hell])},reqs:{space:3,space_explore:3},grant:["hell",1],queue_complete(){return e.tech.hell>=1?0:1},cost:{Helium_3(a,r){return+_e(6500,!1,r).toFixed(0)}},effect(){return t("space_hell_mission_effect1",[S().hell])},action(){return _($(this)[0])?(I(t("space_hell_mission_action",[S().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(a){return m("geothermal",a,38e3,1.35)},Steel(a){return m("geothermal",a,15e3,1.35)},Polymer(a){return m("geothermal",a,9500,1.35)}},effect(a){let r=+_e($(this)[0].p_fuel().a,!0,a).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",[r])}`},special(){return!!(e.race.cataclysm||e.race.orbit_decayed)},powered(){let a=-8;return e.race.forge&&(a-=b.forge.vars()[0]),e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5&&(a-=2),at(a)},p_fuel(){return{r:"Helium_3",a:.5}},action(){return _($(this)[0])?(T("geothermal"),e.space.geothermal.on++,!0):!1}},hell_smelter:{id:"space-hell_smelter",title(){return t("space_hell_smelter_title",[S().hell])},desc(){return t("space_hell_smelter_title",[S().hell])},reqs:{hell:1,m_smelting:1},path:["truepath"],cost:{Money(a){return m("hell_smelter",a,25e4,1.24)},Adamantite(a){return m("hell_smelter",a,15e3,1.24)}},effect(){return`
${t("interstellar_stellar_forge_effect3",[2])}
`},special:!0,action(){return _($(this)[0])?(T("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(a){return m("spc_casino",a,4e5,1.35)},Furs(a){return m("spc_casino",a,75e3,1.35)},Cement(a){return m("spc_casino",a,1e5,1.35)},Plywood(a){return m("spc_casino",a,2e4,1.35)}},effect(){let a=vi();return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return _($(this)[0])?(e.space.spc_casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(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(a,r){return m("swarm_plant",a,Ci(75e3,r),1.28)},Iron(a,r){return m("swarm_plant",a,Ci(65e3,r),1.28)},Neutronium(a,r){return m("swarm_plant",a,Ci(75,r),1.28)},Brick(a,r){return m("swarm_plant",a,Ci(2500,r),1.28)},Mythril(a,r){return m("swarm_plant",a,Ci(100,r),1.28)}},effect(a){let r=e.tech.swarm?.88:.94;return e.tech.swarm>=3&&(r-=pa(a)/100),r<.05&&(r=.05),r=+((1-r)*100).toFixed(2),t("space_hell_swarm_plant_effect1",[r])},action(){return _($(this)[0])?(T("swarm_plant"),!0):!1}},firework:ft("firework","space")},spc_sun:{info:{name(){return t("space_sun_info_name")},desc(){return t("space_sun_info_desc",[x[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(a,r){return+_e(15e3,!1,r).toFixed(0)}},effect(){return t("space_sun_mission_effect1")},action(){return!!_($(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(a){return m("swarm_control",a,1e5,1.3)},Knowledge(a){return m("swarm_control",a,6e4,1.3)},Alloy(a){return m("swarm_control",a,7500,1.3)},Helium_3(a,r){return m("swarm_control",a,_e(2e3,!1,r),1.3)},Mythril(a){return m("swarm_control",a,250,1.3)}},effect(a){return t("space_sun_swarm_control_effect1",[$(this)[0].support(a)])},support(a){return e.tech.swarm&&e.tech.swarm>=2?e.tech.high_tech>=11?11+Math.round(pa(a)):12:10},action(){return _($(this)[0])?(T("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(a,r){return m("swarm_satellite",a,ns(5e3,r),1.1)},Copper(a,r){return m("swarm_satellite",a,ns(2500,r),1.1)},Iridium(a,r){return m("swarm_satellite",a,ns(150,r),1.1)},Helium_3(a,r){return m("swarm_satellite",a,ns(_e(50,!1,r),r),1.1)}},effect(){let a=.35;return e.tech.swarm>=4&&(a+=.15*(e.tech.swarm-3)),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1&&(a+=.15),e.blood.illuminate&&(a+=.01*e.blood.illuminate),a=+a.toFixed(2),`${t("space_dwarf_reactor_effect1",[at(a)])}, ${t("space_sun_swarm_satellite_effect1",[1])}`},support(){return-1},action(){return _($(this)[0])?(T("swarm_satellite"),e.space.swarm_control.support++,!0):!1}},jump_gate:{id:"space-jump_gate",title:t("tau_jump_gate"),desc(a){return!e.space.hasOwnProperty("jump_gate")||e.space.jump_gate.count<100||a?`
${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(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?1e6:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?5e4:0},Adamantite(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?12500:0},Graphene(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?42e3:0},Orichalcum(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?35e3:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0)<100?25e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("jump_gate")?e.space.jump_gate.count:0);if(r<100){let i=100-r;return`
${t("tau_jump_gate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return t("tau_jump_gate_effect")},action(){return _($(this)[0])&&e.space.jump_gate.count<100?(e.space.jump_gate.count++,!0):!1}}},spc_gas:{info:{name(){return S().gas},desc(){return t("space_gas_info_desc",[S().gas,x[e.race.species].home])},zone:"outer",syndicate(){return!0}},gas_mission:{id:"space-gas_mission",title(){return t("space_mission_title",[S().gas])},desc(){return t("space_mission_desc",[S().gas])},reqs:{space:4,space_explore:4},grant:["space",5],queue_complete(){return e.tech.space>=5?0:1},cost:{Helium_3(a,r){return+_e(12500,!1,r).toFixed(0)}},effect(){return t("space_gas_mission_effect",[S().gas])},action(){return _($(this)[0])?(I(t("space_gas_mission_action",[S().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(a){return m("gas_mining",a,25e4,1.32)},Uranium(a){return m("gas_mining",a,500,1.32)},Alloy(a){return m("gas_mining",a,1e4,1.32)},Helium_3(a,r){return m("gas_mining",a,_e(2500,!1,r),1.32)},Mythril(a){return m("gas_mining",a,25,1.32)}},effect(){let a=+te("gas_mining").toFixed(2);return`
${t("space_gas_mining_effect1",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(2)},action(){return _($(this)[0])?(T("gas_mining"),z($(this)[0]),!0):!1}},gas_storage:{id:"space-gas_storage",title(){return t("space_gas_storage_title",[S().gas])},desc(){return`
${t("space_gas_storage_desc")}
`},reqs:{gas_giant:1},cost:{Money(a){return m("gas_storage",a,125e3,1.32)},Iridium(a){return m("gas_storage",a,3e3,1.32)},Sheet_Metal(a){return m("gas_storage",a,2e3,1.32)},Helium_3(a,r){return m("gas_storage",a,_e(1e3,!1,r),1.32)}},effect(){let a=E(3500)*(e.tech.world_control?1.5:1),r=E(2500)*(e.tech.world_control?1.5:1),i=E(1e3)*(e.tech.world_control?1.5:1);return`
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Uranium_name")])}
`},action(){return _($(this)[0])?(T("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(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?15e5:0},Steel(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?5e5:0},Helium_3(a,r){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?Math.round(_e(e.race.gravity_well?25e3:1e4,!1,r)):0},Nano_Tube(a){return(a||0)+(e.space.hasOwnProperty("star_dock")?e.space.star_dock.count:0)===0?25e4:0},Mythril(a){return(a||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&&_($(this)[0])?(T("star_dock"),!0):!1}}},spc_gas_moon:{info:{name(){return S().gas_moon},desc(){return t("space_gas_moon_info_desc",[S().gas_moon,S().gas])},zone:"outer",syndicate(){return!0}},gas_moon_mission:{id:"space-gas_moon_mission",title(){return t("space_mission_title",[S().gas_moon])},desc(){return t("space_mission_desc",[S().gas_moon])},reqs:{space:5},grant:["space",6],queue_complete(){return e.tech.space>=6?0:1},cost:{Helium_3(a,r){return+_e(3e4,!1,r).toFixed(0)}},effect(){return t("space_gas_moon_mission_effect",[S().gas_moon])},action(){return _($(this)[0])?(I(t("space_gas_moon_mission_action",[S().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(a){return m("outpost",a,666e3,1.3)},Titanium(a){return m("outpost",a,18e3,1.3)},Iridium(a){return m("outpost",a,2500,1.3)},Helium_3(a,r){return m("outpost",a,_e(6e3,!1,r),1.3)},Mythril(a){return m("outpost",a,300,1.3)}},effect(a){let r=+te("outpost").toFixed(3),i=E(500),s=+_e(2,!0,a).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[r])}
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("space_gas_moon_outpost_effect3",[s,$(this)[0].powered()])}
`},powered(){return N(3)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return _($(this)[0])?(T("outpost"),e.resource.Neutronium.display=!0,z($(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(a){return m("drone",a,25e4,1.3)},Steel(a){return m("drone",a,2e4,1.3)},Neutronium(a){return m("drone",a,500,1.3)},Elerium(a){return m("drone",a,25,1.3)},Nano_Tube(a){return m("drone",a,45e3,1.3)}},effect(){let a=e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3?12:6;return`
${t("space_gas_moon_drone_effect1",[a])}
`},action(){return _($(this)[0])?(T("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(a){return m("oil_extractor",a,666e3,1.3)},Polymer(a){return m("oil_extractor",a,7500,1.3)},Helium_3(a,r){return m("oil_extractor",a,_e(2500,!1,r),1.3)},Wrought_Iron(a){return m("oil_extractor",a,5e3,1.3)}},effect(){let a=+te("oil_extractor").toFixed(2);return`${t("space_gas_moon_oil_extractor_effect1",[a])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return N(1)},powerBalancer(){return[{r:"Oil",k:"lpmod"}]},action(){return _($(this)[0])?(T("oil_extractor"),z($(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",[S().red,S().gas])}
${t("space_belt_info_desc2")}
`:t("space_belt_info_desc",[S().red,S().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(a,r){return+_e(25e3,!1,r).toFixed(0)}},effect(){return t("space_belt_mission_effect1")},action(){return _($(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(a){return m("space_station",a,25e4,1.3)},Iron(a){return m("space_station",a,85e3,1.3)},Polymer(a){return m("space_station",a,18e3,1.3)},Iridium(a){return m("space_station",a,2800,1.28)},Helium_3(a,r){return m("space_station",a,_e(2e3,!1,r),1.3)},Mythril(a){return m("space_station",a,75,1.25)}},effect(a){let r=+_e(2.5,!0,a).toFixed(2),i=e.race.cataclysm?1:10,s=E(5),n=e.tech.asteroid>=5?`
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
`:"";return e.race.fasting?`
${t("plus_max_space_miners",[F(3)])}
${n}
${t("space_belt_station_effect5",[r,$(this)[0].powered()])}
`:`
${t("plus_max_space_miners",[F(3)])}
${n}
${t("space_belt_station_effect3",[r])}
${t("space_belt_station_effect4",[i,$(this)[0].powered(),e.resource.Food.name])}
`},support(){return F(3)},powered(){return N(3)},refresh:!0,action(){if(_($(this)[0])){if(T("space_station"),e.civic.space_miner.display=!0,e.tech.asteroid<3&&(e.tech.asteroid=3),z($(this)[0])){let a=F(3);e.civic.space_miner.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.space_miner.workers+=r}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(a){return m("elerium_ship",a,5e5,1.3)},Uranium(a){return m("elerium_ship",a,2500,1.3)},Titanium(a){return m("elerium_ship",a,1e4,1.3)},Mythril(a){return m("elerium_ship",a,500,1.3)},Helium_3(a,r){return m("elerium_ship",a,_e(5e3,!1,r),1.3)}},effect(){let a=+te("elerium_ship").toFixed(4);return`
${t("space_belt_elerium_ship_effect1",[F(2)])}
${t("space_belt_elerium_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-2)},powered(){return 0},action(){return _($(this)[0])?(T("elerium_ship"),z($(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(a){return m("iridium_ship",a,12e4,1.3)},Uranium(a){return m("iridium_ship",a,1e3,1.3)},Alloy(a){return m("iridium_ship",a,48e3,1.3)},Iridium(a){return m("iridium_ship",a,2800,1.3)},Helium_3(a,r){return m("iridium_ship",a,_e(1800,!1,r),1.3)}},effect(){let a=+te("iridium_ship").toFixed(3);return`
${t("space_belt_iridium_ship_effect1",[F(1)])}
${t("space_belt_iridium_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-1)},powered(){return 0},action(){return _($(this)[0])?(T("iridium_ship"),z($(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(a){return m("iron_ship",a,8e4,1.3)},Steel(a){return m("iron_ship",a,42e3,1.3)},Aluminium(a){return m("iron_ship",a,38e3,1.3)},Polymer(a){return m("iron_ship",a,16e3,1.3)},Helium_3(a,r){return m("iron_ship",a,_e(1200,!1,r),1.3)}},effect(){let a=+te("iron_ship").toFixed(2);return e.tech.solar&&e.tech.solar>=5?`
${t("space_belt_iron_ship_effect1",[F(1)])}
${t("space_belt_iron_ship_effect2",[a])}
${t("space_belt_iron_ship_effect3")}
`:`
${t("space_belt_iron_ship_effect1",[F(1)])}
${t("space_belt_iron_ship_effect2",[a])}
`},s_type:"belt",support(){return F(-1)},powered(){return 0},action(){return _($(this)[0])?(T("iron_ship"),z($(this)[0]),!0):!1}}},spc_dwarf:{info:{name(){return S().dwarf},desc(){return t("space_dwarf_info_desc",[S().dwarf])},zone:"inner",syndicate(){return!1}},dwarf_mission:{id:"space-dwarf_mission",title(){return t("space_mission_title",[S().dwarf])},desc(){return t("space_mission_desc",[S().dwarf])},reqs:{asteroid:1,elerium:1},grant:["dwarf",1],queue_complete(){return e.tech.dwarf>=1?0:1},cost:{Helium_3(a,r){return+_e(45e3,!1,r).toFixed(0)}},effect(){return t("space_dwarf_mission_effect1",[S().dwarf])},action(){return _($(this)[0])?(I(t("space_dwarf_mission_action",[S().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(a){return m("elerium_contain",a,8e5,1.28)},Cement(a){return m("elerium_contain",a,12e4,1.28)},Iridium(a){return m("elerium_contain",a,5e4,1.28)},Neutronium(a){return m("elerium_contain",a,250,1.28)}},effect(){let a=E(100);return`
${t("plus_max_resource",[a,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(6)},action(){return _($(this)[0])?(T("elerium_contain"),z($(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(a){return m("e_reactor",a,125e4,1.28)},Steel(a){return m("e_reactor",a,35e4,1.28)},Neutronium(a){return m("e_reactor",a,1250,1.28)},Mythril(a){return m("e_reactor",a,2500,1.28)}},effect(){let a=$(this)[0].p_fuel().a,r=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[r])}
${t("space_dwarf_reactor_effect2",[a])}
`},powered(){return at(-25)},p_fuel(){return{r:"Elerium",a:.05}},action(){return _($(this)[0])?(T("e_reactor"),e.space.e_reactor.on++,!0):!1}},world_collider:{id:"space-world_collider",title:t("space_dwarf_collider_title"),desc(a){if(!e.space.hasOwnProperty("world_collider")||e.space.world_collider.count<1859||a)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(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?25e3:0},Copper(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?750:0},Alloy(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?125:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?12:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?1:0},Mythril(a){return(a||0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0)<1859?10:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("world_collider")?e.space.world_collider.count:0);if(r<1859){let i=1859-r;return`
${t("space_dwarf_collider_effect1")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_dwarf.world_controller.effect()},action(){if(e.space.world_collider.count<1859&&_($(this)[0])){if(T("world_collider"),e.space.world_collider.count>=1859){if(e.tech.science=11,e.space.world_controller={count:1,on:0},le(),ut(),e.race.banana){let a=ue();e.stats.banana.b2[a]=!0,a!=="m"&&a!=="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(a){let r=25;if(e.interstellar.far_reach){let i=a?e.interstellar.far_reach.on:G.far_reach;i>0&&(r+=i)}return 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 N(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(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e7:0},Aluminium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e6:0},Titanium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?65e4:0},Iridium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?25e4:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("shipyard")?e.space.shipyard.count:0)<1?1e4:0},Mythril(a){return(a||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 N(50)},special:!0,sAction(){G.shipyard&&(e.settings.civTabs=2,e.settings.govTabs=5,e.settings.tabLoad||(ir("mTabCivic"),ie("space-shipyard")))},action(){return e.space.shipyard.count<1&&_($(this)[0])?(T("shipyard"),z($(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(a){if(!e.space.hasOwnProperty("mass_relay")||e.space.mass_relay.count<100||a)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(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e7:0},Neutronium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?7500:0},Adamantite(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?18e3:0},Elerium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?125:0},Stanene(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?1e5:0},Quantium(a){return(a||0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0)<100?25e3:0}},effect(a){let r=(a?.count??0)+(e.space.hasOwnProperty("mass_relay")?e.space.mass_relay.count:0);if(r<100){let i=100-r;return`
${t("space_dwarf_mass_relay_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return rt.spc_dwarf.m_relay.effect()},action(){return e.space.mass_relay.count<100&&_($(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},le(),ut(),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 N(100)},effect(){let a=Math.floor(e.space.m_relay.charged/10)/10;return`
${t("space_dwarf_mass_relay_effect2",[S().dwarf])}
${t("minus_power",[$(this)[0].powered()])}
${t("space_dwarf_mass_relay_charged",[a])}
`},action(){return!1}}},spc_titan:Br().spc_titan,spc_enceladus:Br().spc_enceladus,spc_triton:Br().spc_triton,spc_kuiper:Br().spc_kuiper,spc_eris:Br().spc_eris},Ot={int_alpha:{info:{name:t("interstellar_alpha_name"),desc(){return e.tech.alpha?t("interstellar_alpha_desc2",[x[e.race.species].home]):t("interstellar_alpha_desc1",[x[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+de(4e4).toFixed(0)}},effect:t("interstellar_alpha_mission_effect"),action(){return _($(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(a){return m("starport",a,1e6,1.3,"interstellar")},Aluminium(a){return m("starport",a,4e5,1.3,"interstellar")},Neutronium(a){return m("starport",a,1e3,1.3,"interstellar")},Elerium(a){return m("starport",a,100,1.3,"interstellar")}},effect(){let a=+de(5).toFixed(2),r=100;return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("interstellar_alpha_starport_effect2",[a,$(this)[0].powered()])}
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`},support(){return 5},powered(){return N(10)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return _($(this)[0])?(T("starport","interstellar"),e.settings.space.proxima=!0,e.settings.space.nebula=!0,z($(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(a){return m("habitat",a,8e5,1.25,"interstellar")},Furs(a){return m("habitat",a,38e3,1.25,"interstellar")},Adamantite(a){return e.race.fasting&&e.interstellar.habitat&&e.interstellar.habitat.count<5?0:m("habitat",a,3200,1.25,"interstellar")},Plywood(a){return m("habitat",a,1e4,1.25,"interstellar")},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return`
${t("interstellar_alpha_starport_effect1",[$(this)[0].support()])}
${t("plus_max_citizens",[a])}, ${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return N(2)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},action(){return _($(this)[0])?(T("habitat","interstellar"),z($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("mining_droid",a,65e4,1.28,"interstellar")},Steel(a){return m("mining_droid",a,12e4,1.28,"interstellar")},Nano_Tube(a){return m("mining_droid",a,75e3,1.28,"interstellar")},Elerium(a){return m("mining_droid",a,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 _($(this)[0])?(T("mining_droid","interstellar"),e.resource.Adamantite.display=!0,z($(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,Pe(),!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(a){return m("processing",a,35e4,1.28,"interstellar")},Iron(a){return m("processing",a,18e4,1.28,"interstellar")},Aluminium(a){return m("processing",a,6e4,1.28,"interstellar")},Iridium(a){return m("processing",a,5e3,1.28,"interstellar")}},effect(a){let r=12,i=a?e.interstellar?.citadel?.on??0:G.citadel;return e.tech.ai_core&&e.tech.ai_core>=2&&i>0&&(r+=i*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 _($(this)[0])?(T("processing","interstellar"),z($(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(a){return m("fusion",a,99e4,1.28,"interstellar")},Iridium(a){return m("fusion",a,44e3,1.28,"interstellar")},Infernite(a){return m("fusion",a,350,1.28,"interstellar")},Brick(a){return m("fusion",a,18e3,1.28,"interstellar")}},effect(){let a=1.25;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered()])}, ${t("interstellar_fusion_effect",[a])}
`},s_type:"alpha",support(){return-1},powered(){return at(-22)},p_fuel(){return{r:"Deuterium",a:1.25}},action(){return _($(this)[0])?(T("fusion","interstellar"),z($(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(a){return m("laboratory",a,75e4,1.28,"interstellar")},Crystal(a){return e.race.universe==="magic"?m("laboratory",a,1200,1.28,"interstellar"):0},Titanium(a){return m("laboratory",a,12e4,1.28,"interstellar")},Alloy(a){return m("laboratory",a,95e3,1.28,"interstellar")},Mythril(a){return m("laboratory",a,8500,1.28,"interstellar")}},effect(a){let r=1e4;if(e.tech.science>=15){let o=a?e.space.exotic_lab.on:we.exotic_lab;r*=1+(e.race.cataclysm||e.race.orbit_decayed?o:e.city.wardenclyffe.count)*.02}let s=Qt(a)?a?e.galaxy?.scavenger?.on??0:la.scavenger:0;(e.race.cataclysm||e.race.orbit_decayed)&&s>0&&(r*=1+s*+(Lt("gxy_alien2",!1,!1,a)*.75).toFixed(1)),e.tech.science>=21&&(r*=1.45),r=Math.round(r);let n="";e.tech.science>=16&&(n=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist.name])}
`);let c=`
${t("space_used_support",[t("interstellar_alpha_name")])}
${n}
${t("city_max_knowledge",[r])}
`;if(e.tech.science>=13&&(c=c+`
${t("interstellar_laboratory_effect",[5])}
`),e.race.universe==="magic"){let o=E(12);c=c+`
${t("plus_max_resource",[o,e.resource.Mana.name])}
`}return c},s_type:"alpha",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("laboratory","interstellar"),z($(this)[0])&&(e.resource.Knowledge.max+=1e4,e.tech.science>=16&&(e.civic.scientist.display=!0,e.civic.scientist.max+=F(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(a){return m("exchange",a,68e4,1.28,"interstellar")},Stone(a){return m("exchange",a,115e3,1.28,"interstellar")},Adamantite(a){return m("exchange",a,55e3,1.28,"interstellar")},Graphene(a){return m("exchange",a,78e3,1.28,"interstellar")}},effect(a){let r=e.race.cataclysm||e.race.orbit_decayed?a?e.space.spaceport.on:G.spaceport:e.city.bank?e.city.bank.count:0,i=e.race.cataclysm||e.race.orbit_decayed?ja()*4:ja(),s=E(e.city.bank?i*r/18:0);if(e.race.inflation&&(s*=2),e.tech.banking>=13){if(e.galaxy.freighter){let n=a?e.galaxy.freighter.on:la.freighter;s*=1+n*.03}if(e.galaxy.super_freighter){let n=a?e.galaxy.super_freighter.on:la.super_freighter;s*=1+n*.08}}return s=+s.toFixed(0),`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("plus_max_resource",[`$${s.toLocaleString()}`,t("resource_Money_name")])}
`},s_type:"alpha",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("exchange","interstellar"),z($(this)[0])&&(e.resource.Money.max+=+E(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(a){return m("g_factory",a,95e4,1.28,"interstellar")},Copper(a){return m("g_factory",a,165e3,1.28,"interstellar")},Cement(a){return m("g_factory",a,22e4,1.28,"interstellar")},Infernite(a){return m("g_factory",a,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 _($(this)[0])?(T("g_factory","interstellar"),e.resource.Graphene.display=!0,z($(this)[0])&&(e.race.kindling_kindred||e.race.smoldering?e.interstellar.g_factory.Oil++:e.interstellar.g_factory.Lumber++),e.settings.showIndustry=!0,Pe(),!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(a){return m("int_factory",a,25e6,1.26,"interstellar")},Coal(a){return m("int_factory",a,1e7,1.26,"interstellar")},Brick(a){return m("int_factory",a,75e4,1.26,"interstellar")},Bolognium(a){return m("int_factory",a,5e4,1.26,"interstellar")}},effect(){let a=+de(5).toFixed(2);return`
${t("interstellar_int_factory_effect")}
${t("city_crafted_mats",[10])}
${t("interstellar_fusion_effect",[a])} ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},special:!0,action(){return _($(this)[0])?(T("int_factory","interstellar"),z($(this)[0])&&(e.city.factory.Alloy+=2,Pe()),!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(a){return m("luxury_condo",a,25e6,1.25,"interstellar")},Neutronium(a){return m("luxury_condo",a,75e3,1.25,"interstellar")},Stanene(a){return m("luxury_condo",a,23e4,1.25,"interstellar")},Orichalcum(a){return m("luxury_condo",a,65e3,1.25,"interstellar")},Nanoweave(a){return m("luxury_condo",a,12500,1.25,"interstellar")},Horseshoe(){return e.race.hooved?2:0}},effect(){let a=$(this)[0].citizens(),r=E(75e4);return`
${t("plus_max_citizens",[a])}, ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
`},powered(){return N(3)},action(){return _($(this)[0])?(T("luxury_condo","interstellar"),z($(this)[0])&&(e.resource[e.race.species].max+=2),!0):!1},citizens(){let a=2;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("zoo",a,5e7,1.24,"interstellar")},Polymer(a){return m("zoo",a,6e6,1.24,"interstellar")},Infernite(a){return m("zoo",a,75e3,1.24,"interstellar")},Brick(a){return m("zoo",a,2e6,1.24,"interstellar")}},effect(){let a=5,r=2,i=12e3;return`
${t("space_used_support",[t("interstellar_alpha_name")])}
${t("space_red_vr_center_effect1",[a])}
${t("space_red_vr_center_effect2",[r])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},powered(){return 0},s_type:"alpha",support(){return-1},action(){return _($(this)[0])?(T("zoo","interstellar"),z($(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 a=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",[a])},reqs:{alpha:2},cost:{Money(a){return m("warehouse",a,175e3,1.28,"interstellar")},Lumber(a){return m("warehouse",a,1e5,1.28,"interstellar")},Aluminium(a){return m("warehouse",a,12e4,1.28,"interstellar")},Cement(a){return m("warehouse",a,45e3,1.28,"interstellar")}},res(){let a=["Lumber","Stone","Chrysotile","Furs","Copper","Iron","Aluminium","Cement","Coal","Nano_Tube","Neutronium","Adamantite","Infernite"];return e.tech.storage>=3&&e.resource.Steel.display&&a.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&a.push("Titanium"),a},val(a){switch(a){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(a){let r='
',i=Oi(a);for(let s of $(this)[0].res())if(e.resource[s].display){let n=Y(+(E($(this)[0].val(s))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return r=r+"
",r},action(){if(_($(this)[0])){T("warehouse","interstellar");let a=Oi();for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=E($(this)[0].val(r)*a));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+de(42e3).toFixed(0)}},effect:t("interstellar_proxima_mission_effect"),action(){return _($(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(a){return m("xfer_station",a,12e5,1.28,"interstellar")},Neutronium(a){return m("xfer_station",a,1500,1.28,"interstellar")},Adamantite(a){return m("xfer_station",a,6e3,1.28,"interstellar")},Polymer(a){return m("xfer_station",a,12e3,1.28,"interstellar")},Wrought_Iron(a){return m("xfer_station",a,3500,1.28,"interstellar")}},effect(){let a=.28,r=E(5e3),i=E(4e3),s=E(2500),n="";return e.resource.Deuterium.display&&(n=`
${t("plus_max_resource",[E(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",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[s,t("resource_Uranium_name")])}
${n}
${t("city_fission_power_effect",[a])}
${t("minus_power",[$(this)[0].powered()])}
`},support(){return 1},powered(){return N(1)},powerBalancer(){return[{s:e.interstellar.starport.s_max-e.interstellar.starport.support}]},refresh:!0,action(){return _($(this)[0])?(T("xfer_station","interstellar"),z($(this)[0])&&(e.resource.Uranium.max+=E(2500),e.resource.Helium_3.max+=E(5e3),e.resource.Oil.max+=E(4e3),e.resource.Deuterium.max+=E(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(a){return m("cargo_yard",a,275e3,1.28,"interstellar")},Graphene(a){return m("cargo_yard",a,7500,1.28,"interstellar")},Mythril(a){return m("cargo_yard",a,6e3,1.28,"interstellar")}},effect(a){let r=50,i=E(200),s=E(150),n=`
${t("plus_max_resource",[r,t("resource_Crates_name")])}
${t("plus_max_resource",[r,t("resource_Containers_name")])}
`;if(n=n+`
${t("plus_max_resource",[i,t("resource_Neutronium_name")])}
${t("plus_max_resource",[s,t("resource_Infernite_name")])}
`,e.tech.storage>=7){let c=+pa(a).toFixed(3);n=n+`
${t("interstellar_cargo_yard_effect",[c])}
`}return n},action(){if(_($(this)[0])){T("cargo_yard","interstellar");let a=50;return e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},cruiser:{id:"interstellar-cruiser",title:t("interstellar_cruiser_title"),desc:t("interstellar_cruiser_title"),reqs:{cruiser:1},cost:{Money(a){return m("cruiser",a,875e3,1.28,"interstellar")},Aluminium(a){return m("cruiser",a,195e3,1.28,"interstellar")},Deuterium(a){return m("cruiser",a,+de(1500).toFixed(0),1.28,"interstellar")},Neutronium(a){return m("cruiser",a,2e3,1.28,"interstellar")},Aerogel(a){return m("cruiser",a,250,1.28,"interstellar")},Horseshoe(){return e.race.hooved?3:0}},powered(){return 0},effect(){let a=+de(6).toFixed(2),r=F(e.race.fasting?4:3);return`
${t("plus_max_soldiers",[r])}
${t("space_belt_station_effect3",[a])}
`},action(){return _($(this)[0])?(T("cruiser","interstellar"),e.interstellar.cruiser.on++,!0):!1}},dyson:{id:"interstellar-dyson",title:t("interstellar_dyson_title"),desc(a){return!e.interstellar.hasOwnProperty("dyson")||e.interstellar.dyson.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25e4:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e4:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?25:0},Stanene(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0)<100?1e5:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("dyson")?e.interstellar.dyson.count:0);if(r<100){let i=r>0?`
${t("space_dwarf_reactor_effect1",[at(r*1.25)])}
`:"",s=100-r;return`
${t("interstellar_dyson_effect")}
${i}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_complete",[at(175)])},action(){return _($(this)[0])&&e.interstellar.dyson.count<100?(T("dyson","interstellar"),e.interstellar.dyson.count>=100&&le(),!0):!1}},dyson_sphere:{id:"interstellar-dyson_sphere",title:t("interstellar_dyson_sphere_title"),desc(a){return!e.interstellar.hasOwnProperty("dyson_sphere")||e.interstellar.dyson_sphere.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?5e6:0},Bolognium(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?25e3:0},Vitreloy(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?1250:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("dyson_sphere")?e.interstellar.dyson_sphere.count:0);if(r<100){let i=175+r*5,s=100-r;return`
${t("interstellar_dyson_sphere_effect")}
${t("space_dwarf_reactor_effect1",[at(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[at(750)])},action(){return _($(this)[0])&&e.interstellar.dyson_sphere.count<100?(T("dyson_sphere","interstellar"),e.interstellar.dyson_sphere.count>=100&&le(),!0):!1}},orichalcum_sphere:{id:"interstellar-orichalcum_sphere",title:t("interstellar_dyson_sphere_title"),desc(a){return!e.interstellar.hasOwnProperty("orichalcum_sphere")||e.interstellar.orichalcum_sphere.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?25e6:0},Orichalcum(a){return(a||0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("orichalcum_sphere")?e.interstellar.orichalcum_sphere.count:0);if(r<100){let i=750+r*8,s=100-r;return`
${t("interstellar_orichalcum_sphere_effect")}
${t("space_dwarf_reactor_effect1",[at(i)])}
${t("space_dwarf_collider_effect2",[s])}
`}else return t("interstellar_dyson_sphere_complete",[at(1750)])},action(){return _($(this)[0])&&e.interstellar.orichalcum_sphere.count<100?(T("orichalcum_sphere","interstellar"),e.interstellar.orichalcum_sphere.count>=100&&L("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+de(55e3).toFixed(0)}},effect:t("interstellar_nebula_mission_effect"),action(){return _($(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(a){return m("nexus",a,9e5,1.24,"interstellar")},Adamantite(a){return m("nexus",a,7500,1.24,"interstellar")},Infernite(a){return m("nexus",a,250,1.24,"interstellar")},Sheet_Metal(a){return m("nexus",a,14e3,1.24,"interstellar")},Nano_Tube(a){return m("nexus",a,17500,1.24,"interstellar")}},effect(){let a=E(3500),r=E(4e3),i=E(3e3),s=E(25);return`
${t("interstellar_nexus_effect1",[$(this)[0].support()])}
${t("plus_max_resource",[a,t("resource_Oil_name")])}
${t("plus_max_resource",[r,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 N(8)},powerBalancer(){return[{s:e.interstellar.nexus.s_max-e.interstellar.nexus.support}]},refresh:!0,action(){return _($(this)[0])?(T("nexus","interstellar"),e.resource.Deuterium.display=!0,e.tech.nebula===1&&(e.interstellar.harvester={count:0,on:0},e.tech.nebula=2),z($(this)[0])&&(e.resource.Oil.max+=E(2500),e.resource.Helium_3.max+=E(4e3),e.resource.Deuterium.max+=E(3e3),e.resource.Elerium.max+=E(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(a){return m("harvester",a,65e4,1.28,"interstellar")},Copper(a){return m("harvester",a,8e4,1.28,"interstellar")},Alloy(a){return m("harvester",a,45e3,1.28,"interstellar")},Iridium(a){return m("harvester",a,8e3,1.28,"interstellar")}},effect(){let a=+te("harvester","helium").toFixed(3),r=+te("harvester","deuterium").toFixed(3),i=e.tech.ram_scoop?`
${t("interstellar_harvester_effect",[r])}
`:"";return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_gas_mining_effect1",[a])}
${i}`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("harvester","interstellar"),z($(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(a){return m("elerium_prospector",a,825e3,1.28,"interstellar")},Steel(a){return m("elerium_prospector",a,18e3,1.28,"interstellar")},Polymer(a){return m("elerium_prospector",a,22e3,1.28,"interstellar")},Graphene(a){return m("elerium_prospector",a,82e3,1.28,"interstellar")},Stanene(a){return m("elerium_prospector",a,57e3,1.28,"interstellar")}},effect(){let a=+te("elerium_prospector").toFixed(3);return`
${t("space_used_support",[t("interstellar_nebula_name")])}
${t("space_belt_elerium_ship_effect2",[a])}
`},s_type:"nebula",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("elerium_prospector","interstellar"),z($(this)[0]),!0):!1}}},int_neutron:{info:{name:t("interstellar_neutron_name"),desc(){return e.tech.neutron?t("interstellar_neutron_desc2",[x[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+de(6e4).toFixed(0)},Deuterium(){return+de(1e4).toFixed(0)}},effect:t("interstellar_neutron_mission_effect"),action(){return _($(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(a){return m("neutron_miner",a,1e6,1.32,"interstellar")},Titanium(a){return m("neutron_miner",a,45e3,1.32,"interstellar")},Stanene(a){return m("neutron_miner",a,88e3,1.32,"interstellar")},Elerium(a){return m("neutron_miner",a,20,1.32,"interstellar")},Aerogel(a){return m("neutron_miner",a,50,1.32,"interstellar")}},effect(){let a=+te("neutron_miner").toFixed(3),r=E(500),i=+de(3).toFixed(2);return`
${t("space_gas_moon_outpost_effect1",[a])}
${t("plus_max_resource",[r,t("resource_Neutronium_name")])}
${t("interstellar_alpha_starport_effect2",[i,$(this)[0].powered()])}
`},powered(){return N(6)},powerBalancer(){return[{r:"Neutronium",k:"lpmod"}]},action(){return _($(this)[0])?(T("neutron_miner","interstellar"),z($(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(a){return m("citadel",a,5e6,1.25,"interstellar")},Knowledge(a){return m("citadel",a,15e5,1.15,"interstellar")},Graphene(a){return m("citadel",a,5e4,1.25,"interstellar")},Stanene(a){return m("citadel",a,1e5,1.25,"interstellar")},Elerium(a){return m("citadel",a,250,1.25,"interstellar")},Soul_Gem(a){return m("citadel",a,1,1.25,"interstellar")}},wide:!0,effect(a){let r=pa(a),i=`
${t("interstellar_citadel_stat",[+r.toFixed(1)])}
${t("interstellar_citadel_effect",[5])}
`;if(e.tech.ai_core){let s=+(r/1.75).toFixed(1);if(e.race.flier||(i=i+`
${t("interstellar_citadel_effect2",[s])}
`),e.tech.ai_core>=2&&(i=i+`
${t("interstellar_citadel_effect3",[2])}
`),e.tech.ai_core>=3){let n=+(r/5).toFixed(1);i=i+`
${t("interstellar_citadel_effect4",[n])}
`}}return`${i}
${t("interstellar_citadel_power",[$(this)[0].powered(a),N(2.5)])}
`},powered(a){let r=a?0:G.citadel;return r>1?N(30+(r-1)*2.5):N(30)},action(){return _($(this)[0])?(T("citadel","interstellar"),z($(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(a){return m("stellar_forge",a,12e5,1.25,"interstellar")},Iridium(a){return m("stellar_forge",a,25e4,1.25,"interstellar")},Bolognium(a){return m("stellar_forge",a,35e3,1.25,"interstellar")},Aerogel(a){return m("stellar_forge",a,75e3,1.25,"interstellar")}},effect(){let a=`
${t("city_foundry_effect1",[F(2)])}
${t("interstellar_stellar_forge_effect",[10])}
${t("interstellar_stellar_forge_effect2",[5])}
`;return e.tech.star_forge&&e.tech.star_forge>=2&&(a+=`
${t("interstellar_stellar_forge_effect3",[2])}
`),`${a}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(T("stellar_forge","interstellar"),z($(this)[0])&&(e.civic.craftsman.max+=F(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 a=x[e.race.species].home;if(e.tech.blackhole>=5){let r=+e.interstellar.stellar_engine.mass.toFixed(10),i=+e.interstellar.stellar_engine.exotic.toFixed(10);if(e.tech.roid_eject&&(r+=.225*e.tech.roid_eject*(1+e.tech.roid_eject/12)),e.tech.whitehole){let s=ke("bigbang"),n=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_blackhole_desc4",[a,r,i])}
${t("interstellar_blackhole_desc5",[s.plasmid,s.phage,s.dark,n])}
`}else return e.interstellar.stellar_engine.exotic>0?t("interstellar_blackhole_desc4",[a,r,i]):t("interstellar_blackhole_desc3",[a,r])}else return e.tech.blackhole?t("interstellar_blackhole_desc2",[a]):t("interstellar_blackhole_desc1",[a])}},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+de(75e3).toFixed(0)},Deuterium(){return+de(25e3).toFixed(0)}},effect:t("interstellar_blackhole_mission_effect"),action(){return _($(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(a){return m("far_reach",a,1e6,1.32,"interstellar")},Knowledge(a){return m("far_reach",a,1e5,1.32,"interstellar")},Neutronium(a){return m("far_reach",a,2500,1.32,"interstellar")},Elerium(a){return m("far_reach",a,100,1.32,"interstellar")},Aerogel(a){return m("far_reach",a,1e3,1.32,"interstellar")}},effect(){return`
${t("interstellar_far_reach_effect",[1])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(T("far_reach","interstellar"),z($(this)[0]),e.tech.blackhole===1&&(e.tech.blackhole=2,le()),!0):!1},flair:t("interstellar_far_reach_flair")},stellar_engine:{id:"interstellar-stellar_engine",title:t("interstellar_stellar_engine"),desc(a){return!e.interstellar.hasOwnProperty("stellar_engine")||e.interstellar.stellar_engine.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?5e5:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?450:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?17500:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?225:0},Graphene(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?45e3:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?250:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0)<100?75:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("stellar_engine")?e.interstellar.stellar_engine.count:0);if(r<100){let i=100-r;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=at((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 o=+e.interstellar.stellar_engine.exotic.toFixed(10),l=e.interstellar.stellar_engine.exotic>0?t("interstellar_stellar_engine_effect3",[s,o]):t("interstellar_stellar_engine_effect2",[s]);return`
${t("interstellar_stellar_engine_complete",[+c.toFixed(2)])}
${l}
`}else return t("interstellar_stellar_engine_complete",[+c.toFixed(2)])}},action(){return _($(this)[0])&&e.interstellar.stellar_engine.count<100?(T("stellar_engine","interstellar"),e.interstellar.stellar_engine.count>=100&&e.tech.blackhole===3&&(e.tech.blackhole=4,le()),!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(a){return m("mass_ejector",a,75e4,1.25,"interstellar")},Adamantite(a){return m("mass_ejector",a,125e3,1.25,"interstellar")},Infernite(a){return m("mass_ejector",a,275,1.25,"interstellar")},Elerium(a){return m("mass_ejector",a,100,1.25,"interstellar")},Mythril(a){return m("mass_ejector",a,1e4,1.25,"interstellar")}},effect(){return`
${t("interstellar_mass_ejector_effect")}, ${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(3)},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=2,e.settings.tabLoad||(ir("mTabResource"),ie("interstellar-mass_ejector"))},action(){return _($(this)[0])?(T("mass_ejector","interstellar"),z($(this)[0]),e.interstellar.mass_ejector.count===1&&(I(t("interstellar_mass_ejector_msg"),"info",!1,["progress"]),e.settings.showEjector=!0,Te()),ka("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!!_($(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+de(15e4).toFixed(0)},Deuterium(){return+de(75e3).toFixed(0)}},effect:t("interstellar_wormhole_mission_effect"),action(){return _($(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(a){return!e.interstellar.hasOwnProperty("stargate")||e.interstellar.stargate.count<200||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?1e6:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?4800:0},Infernite(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?666:0},Elerium(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?75:0},Nano_Tube(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?12e3:0},Stanene(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?6e4:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0)<200?3200:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("stargate")?e.interstellar.stargate.count:0);if(r<200){let i=200-r;return`
${t("interstellar_stargate_effect")}
${t("space_dwarf_collider_effect2",[i])}
`}else return Ot.int_blackhole.s_gate.effect()},action(){return _($(this)[0])&&e.interstellar.stargate.count<200?(T("stargate","interstellar"),e.interstellar.stargate.count>=200&&(e.tech.stargate=4,e.interstellar.s_gate={count:1,on:0},z($(Ot.int_blackhole.s_gate)[0]),wr(),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 N(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",[x[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+de(48e4).toFixed(0)},Deuterium(){return+de(225e3).toFixed(0)}},effect(){return t("interstellar_sirius_mission_effect",[We("name"),x[e.race.species].home])},action(){return!!_($(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 _($(this)[0])?(e.interstellar.space_elevator={count:0},!0):!1}},space_elevator:{id:"interstellar-space_elevator",title:t("interstellar_space_elevator"),desc(a){return!e.interstellar.hasOwnProperty("space_elevator")||e.interstellar.space_elevator.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?2e7:0},Nano_Tube(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?5e5:0},Bolognium(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?1e5:0},Mythril(a){return(a||0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0)<100?125e3:0}},effect(a){let r=`
${t("interstellar_space_elevator_effect")}
`,i=(a?.count??0)+(e.interstellar.hasOwnProperty("space_elevator")?e.interstellar.space_elevator.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}return r},action(){return _($(this)[0])&&e.interstellar.space_elevator.count<100?(T("space_elevator","interstellar"),e.interstellar.space_elevator.count>=100&&(e.tech.ascension=5,e.interstellar.gravity_dome={count:0},wr(),ie()),!0):!1}},gravity_dome:{id:"interstellar-gravity_dome",title:t("interstellar_gravity_dome"),desc(a){return!e.interstellar.hasOwnProperty("gravity_dome")||e.interstellar.gravity_dome.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?35e6:0},Cement(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?125e4:0},Adamantite(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?65e4:0},Aerogel(a){return(a||0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0)<100?18e4:0}},effect(a){let r=`
${t("interstellar_gravity_dome_effect",[x[e.race.species].home])}
`,i=(a?.count??0)+(e.interstellar.hasOwnProperty("gravity_dome")?e.interstellar.gravity_dome.count:0);if(i<100){let s=100-i;r+=`
${t("space_dwarf_collider_effect2",[s])}
`}return r},action(){return _($(this)[0])&&e.interstellar.gravity_dome.count<100?(T("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},wr(),ie()),!0):!1}},ascension_machine:{id:"interstellar-ascension_machine",title:t("interstellar_ascension_machine"),desc(a){return!e.interstellar.hasOwnProperty("ascension_machine")||e.interstellar.ascension_machine.count<100||a?`
${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(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e6:0},Alloy(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e4:0},Neutronium(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?1e3:0},Orichalcum(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?25e4:0},Nanoweave(a){return(a||0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.interstellar.hasOwnProperty("ascension_machine")?e.interstellar.ascension_machine.count:0);if(r<100){let i=100-r;return`
${t("interstellar_ascension_machine_effect",[We("name")])}
${t("space_dwarf_collider_effect2",[i])}
`}else return Ot.int_sirius.ascension_trigger.effect()},action(){return _($(this)[0])&&e.interstellar.ascension_machine.count<100?(T("ascension_machine","interstellar"),e.interstellar.ascension_machine.count>=100&&(e.tech.ascension=7,e.interstellar.ascension_trigger={count:1,on:0},wr(),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 a=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){a+=e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(a+=5)}let r=Math.round(N(1e4)-a*(e.interstellar.hasOwnProperty("thermal_collector")?e.interstellar.thermal_collector.count:0));return r<0&&(r=0),r},postPower(a){a?setTimeout(function(){e.tech.ascension=G.ascension_trigger?8:7,wr()},250):(e.tech.ascension=7,wr())},effect(){let a=os(),r=$(this)[0].powered(),i=r>0?`
${t("minus_power",[r])}
`:"";return`
${t("interstellar_ascension_trigger_effect")}
${a}${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 a=os();return`
${t("interstellar_ascend_effect")}
${a}`},action(){return _($(this)[0])?(br(),!0):!1}},thermal_collector:{id:"interstellar-thermal_collector",title:t("interstellar_thermal_collector"),desc:t("interstellar_thermal_collector"),reqs:{ascension:6},cost:{Money(a){return m("thermal_collector",a,5e6,1.08,"interstellar")},Infernite(a){return m("thermal_collector",a,25e3,1.08,"interstellar")},Stanene(a){return m("thermal_collector",a,1e6,1.08,"interstellar")},Vitreloy(a){return m("thermal_collector",a,1e5,1.08,"interstellar")}},effect(){let a=100;if(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2){a+=e.stats.achieve.technophobe.l>=4?25:10;for(let r=1;r=5&&(a+=5)}return t("interstellar_thermal_collector_effect",[a])},action(){return _($(this)[0])?(T("thermal_collector","interstellar"),!0):!1}}}};function os(){let a=ke("ascend"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[a.harmony,t("resource_Harmony_name")])}
${t("interstellar_ascension_trigger_effect3")}
`}function Ic(){let a=ke("terraform"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("interstellar_ascension_trigger_effect2",[a.plasmid,r])}
${t("interstellar_ascension_trigger_effect2",[a.phage,t("resource_Phage_name")])}
${t("interstellar_ascension_trigger_effect2",[a.harmony,t("resource_Harmony_name")])}
${t("space_terraformer_effect3")}
`}var pe={gxy_gateway:{info:{name:t("galaxy_gateway"),desc(){return t("galaxy_gateway_desc")},control(){return{name:We("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+de(212e3).toFixed(0)},Deuterium(){return+de(11e4).toFixed(0)}},effect:t("galaxy_gateway_mission_effect"),action(){return _($(this)[0])?(Ec(),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(a){return m("starbase",a,42e5,1.25,"galaxy")},Elerium(a){return m("starbase",a,1e3,1.25,"galaxy")},Mythril(a){return m("starbase",a,9e4,1.25,"galaxy")},Graphene(a){return m("starbase",a,32e4,1.25,"galaxy")},Horseshoe(){return e.race.hooved?5:0}},effect(a){let r=+de(25).toFixed(2),i=250,s=e.tech.marines>=2?F(8):F(5);return`
${t("galaxy_defense_platform_effect",[25])}
${t("galaxy_gateway_support",[$(this)[0].support()])}
${t("plus_max_soldiers",[s])}
${t("interstellar_alpha_starport_effect2",[r,$(this)[0].powered(a)])}
${t("interstellar_alpha_starport_effect3",[i,e.resource.Food.name])}
`},support(){return 2},powered(a){return N(Qt(a)?12:0)},powerBalancer(){return[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]},refresh:!0,action(){return _($(this)[0])?(T("starbase","galaxy"),z($(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(a){return m("ship_dock",a,36e5,1.25,"galaxy")},Steel(a){return m("ship_dock",a,88e4,1.25,"galaxy")},Aluminium(a){return m("ship_dock",a,12e5,1.25,"galaxy")},Bolognium(a){return m("ship_dock",a,75e3,1.25,"galaxy")}},effect(a){return e.race.fasting?`
${t("galaxy_ship_dock_effect_fasting",[.1])}
${t("minus_power",[$(this)[0].powered(a)])}
`:`
${t("galaxy_ship_dock_effect",[.25])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(a){if(e.race.fasting){let r=a?e.galaxy.gateway_station.on:G.gateway_station;return r?.1*r:0}else{let r=a?e.galaxy.starbase.on:G.starbase;return r?.25*r:0}},powered(a){return N(Qt(a)?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 _($(this)[0])?(T("ship_dock","galaxy"),z($(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(a){return m("bolognium_ship",a,14e5,1.22,"galaxy")},Iron(a){return m("bolognium_ship",a,56e4,1.22,"galaxy")},Infernite(a){return m("bolognium_ship",a,1800,1.22,"galaxy")},Nano_Tube(a){return m("bolognium_ship",a,475e3,1.22,"galaxy")}},effect(){let a=+te("bolognium_ship").toFixed(3),r=+de($(this)[0].ship.helium).toFixed(2);return`
${t("gain",[a,t("resource_Bolognium_name")])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${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 0},helium:5},powered(){return 0},action(){return _($(this)[0])?(T("bolognium_ship","galaxy"),e.resource.Bolognium.display=!0,e.civic.crew.display=!0,z($(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(a){return m("scout_ship",a,16e5,1.25,"galaxy")},Titanium(a){return m("scout_ship",a,325e3,1.25,"galaxy")},Graphene(a){return m("scout_ship",a,118e3,1.25,"galaxy")},Soul_Gem(a){return m("scout_ship",a,1,1.02,"galaxy")}},effect(){let a=+de($(this)[0].ship.helium).toFixed(2),r=e.tech.science>=17?`
${t("galaxy_scout_ship_effect2",[25])}
`:"";return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("galaxy_scout_ship_effect")}
${r}
${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",[a,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 _($(this)[0])?(T("scout_ship","galaxy"),e.galaxy.defense.gxy_gateway.scout_ship++,z($(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(a){return m("corvette_ship",a,45e5,1.25,"galaxy")},Steel(a){return m("corvette_ship",a,175e4,1.25,"galaxy")},Infernite(a){return m("corvette_ship",a,16e3,1.25,"galaxy")},Bolognium(a){return m("corvette_ship",a,35e3,1.25,"galaxy")},Soul_Gem(a){return m("corvette_ship",a,1,1.25,"galaxy")}},effect(){let a=+de($(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",[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 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 _($(this)[0])?(T("corvette_ship","galaxy"),e.galaxy.defense.gxy_gateway.corvette_ship++,z($(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(a){return m("frigate_ship",a,18e6,1.25,"galaxy")},Elerium(a){return m("frigate_ship",a,1250,1.25,"galaxy")},Mythril(a){return m("frigate_ship",a,35e4,1.25,"galaxy")},Sheet_Metal(a){return m("frigate_ship",a,8e5,1.25,"galaxy")},Soul_Gem(a){return m("frigate_ship",a,2,1.25,"galaxy")}},effect(){let a=+de($(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",[a,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 _($(this)[0])?(T("frigate_ship","galaxy"),e.galaxy.defense.gxy_gateway.frigate_ship++,z($(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(a){return m("cruiser_ship",a,75e6,1.25,"galaxy")},Copper(a){return m("cruiser_ship",a,6e6,1.25,"galaxy")},Adamantite(a){return m("cruiser_ship",a,1e6,1.25,"galaxy")},Vitreloy(a){return m("cruiser_ship",a,75e4,1.25,"galaxy")},Elerium(a){return m("cruiser_ship",a,1800,1.25,"galaxy")},Soul_Gem(a){return m("cruiser_ship",a,5,1.25,"galaxy")}},effect(){let a=+de($(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",[a,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 _($(this)[0])?(T("cruiser_ship","galaxy"),e.galaxy.defense.gxy_gateway.cruiser_ship++,z($(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(a){return m("dreadnought",a,225e6,1.25,"galaxy")},Neutronium(a){return m("dreadnought",a,25e4,1.25,"galaxy")},Bolognium(a){return m("dreadnought",a,15e5,1.25,"galaxy")},Vitreloy(a){return m("dreadnought",a,1e6,1.25,"galaxy")},Infernite(a){return m("dreadnought",a,4e5,1.25,"galaxy")},Aerogel(a){return m("dreadnought",a,8e5,1.25,"galaxy")},Soul_Gem(a){return m("dreadnought",a,25,1.25,"galaxy")}},effect(){let a=+de($(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",[a,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 _($(this)[0])?(T("dreadnought","galaxy"),e.galaxy.defense.gxy_gateway.dreadnought++,z($(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:We("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(a){return m("gateway_station",a,5e6,1.25,"galaxy")},Aluminium(a){return m("gateway_station",a,52e4,1.25,"galaxy")},Polymer(a){return m("gateway_station",a,35e4,1.25,"galaxy")},Neutronium(a){return m("gateway_station",a,17500,1.25,"galaxy")}},effect(a){let r=E(2e3),i=E(4500),s=E(50),n="";return e.tech.gateway&&e.tech.gateway>=2&&(n=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${n}
${t("plus_max_resource",[r,t("resource_Helium_3_name")])}
${t("plus_max_resource",[i,t("resource_Deuterium_name")])}
${t("plus_max_resource",[s,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(){return .5},powered(a){return N(Qt(a)?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},refresh:!0,action(){return _($(this)[0])?(T("gateway_station","galaxy"),e.resource.Helium_3.max+=E(2e3),e.resource.Deuterium.max+=E(4500),e.tech.stargate===4&&(e.galaxy.telemetry_beacon={count:0,on:0},e.tech.stargate=5),z($(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(a){return m("telemetry_beacon",a,225e4,1.25,"galaxy")},Copper(a){return m("telemetry_beacon",a,685e3,1.25,"galaxy")},Alloy(a){return m("telemetry_beacon",a,425e3,1.25,"galaxy")},Iridium(a){return m("telemetry_beacon",a,177e3,1.25,"galaxy")}},effect(a){let r=e.tech.telemetry?1200:800;if(e.tech.science>=17){let c=a?e.galaxy.scout_ship.on:la.scout_ship;r+=c*25}let i=a?e.galaxy?.telemetry_beacon?.on??0:G.telemetry_beacon,s=i?r*i:0,n="";return e.tech.gateway&&e.tech.gateway>=2&&(n=`
${t("galaxy_gateway_support",[$(this)[0].support()])}
`),`${n}
${t("galaxy_telemetry_beacon_effect1",[r])}
${t("galaxy_telemetry_beacon_effect2",[s])}
${t("minus_power",[$(this)[0].powered(a)])}
`},support(){return e.tech.telemetry?.75:.5},powered(a){return N(Qt(a)?4:0)},powerBalancer(){return e.galaxy.hasOwnProperty("starbase")?[{s:e.galaxy.starbase.s_max-e.galaxy.starbase.support}]:!1},postPower(a){let r=a?G.telemetry_beacon+V():G.telemetry_beacon-V();r>e.galaxy.telemetry_beacon.count?r=e.galaxy.telemetry_beacon.count:r<0&&(r=0),G.telemetry_beacon=r,ji($(this)[0],"galaxy","telemetry_beacon")},action(){return _($(this)[0])?(T("telemetry_beacon","galaxy"),z($(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,vn()),!0):!1}},gateway_depot:{id:"galaxy-gateway_depot",title:t("galaxy_gateway_depot"),desc:`
${t("galaxy_gateway_depot")}
`,reqs:{gateway:5},cost:{Money(a){return m("gateway_depot",a,4e6,1.25,"galaxy")},Neutronium(a){return m("gateway_depot",a,8e4,1.25,"galaxy")},Stanene(a){return m("gateway_depot",a,5e5,1.25,"galaxy")},Vitreloy(a){return m("gateway_depot",a,2500,1.25,"galaxy")}},wide:!0,effect(a){let r=e.tech.world_control?150:100,i=E(200),s=Lc(),n=Y(+E(3e3*s).toFixed(0),1),c=Y(+E(25e4*s).toFixed(0),1),o=Y(+E(9001*s).toFixed(0),1),l=Y(+E(6660*s).toFixed(0),1),u='
';return u=u+`${t("plus_max_crates",[r])}${t("plus_max_containers",[r])}`,u=u+`${t("plus_max_resource",[n,e.resource.Uranium.name])}`,u=u+`${t("plus_max_resource",[c,e.resource.Nano_Tube.name])}`,u=u+`${t("plus_max_resource",[o,e.resource.Neutronium.name])}`,u=u+`${t("plus_max_resource",[l,e.resource.Infernite.name])}`,u=u+"
",`${u}
${t("galaxy_gateway_depot_effect",[i,t("resource_Elerium_name")])}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?10:0)},action(){if(_($(this)[0])){T("gateway_depot","galaxy");let a=e.tech.world_control?150:100;e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa();let r=Lc();return e.resource.Uranium.max+=E(3e3*r),e.resource.Nano_Tube.max+=E(25e4*r),e.resource.Neutronium.max+=E(9001*r),e.resource.Infernite.max+=E(6660*r),z($(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(a){return m("defense_platform",a,75e4,1.25,"galaxy")},Adamantite(a){return m("defense_platform",a,425e3,1.25,"galaxy")},Elerium(a){return m("defense_platform",a,800,1.25,"galaxy")},Vitreloy(a){return m("defense_platform",a,1250,1.25,"galaxy")},Wrought_Iron(a){return m("defense_platform",a,75e3,1.25,"galaxy")}},effect(a){return`
${t("galaxy_defense_platform_effect",[20])}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?5:0)},postPower(a){C({el:"#gxy_stargate"},"update")},action(){return _($(this)[0])?(T("defense_platform","galaxy"),z($(this)[0]),!0):!1},post(){C({el:"#gxy_stargate"},"update")}}},gxy_gorddon:{info:{name:t("galaxy_gorddon"),desc(){return t("galaxy_gorddon_desc")},control(){return{name:x[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+de(23e4).toFixed(0)},Deuterium(){return+de(125e3).toFixed(0)}},effect:t("galaxy_gorddon_mission_effect"),action(){if(_($(this)[0])){Ec(),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 a=x[e.galaxy.alien1.id].name,r=x[e.galaxy.alien1.id].entity,i=x[e.galaxy.alien2.id].name,s=x[e.galaxy.alien2.id].entity;return I(t("galaxy_gorddon_mission_result",[r,a,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(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?3e7:0},Lumber(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?38e6:0},Stone(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?32e6:0},Furs(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?18e6:0},Wrought_Iron(a){return(a||0)+(e.galaxy.hasOwnProperty("embassy")?e.galaxy.embassy.count:0)<1?6e6:0}},effect(a){let r=7500,i="";e.tech.xeno>=11&&(i=`
${t("plus_max_citizens",[$(this)[0].citizens()])}
`);let s="";return e.race.fasting||(s=`
${t("interstellar_alpha_starport_effect3",[r,e.resource.Food.name])}
`),`
${t("galaxy_embassy_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${i}${s}
${t("minus_power",[$(this)[0].powered(a)])}
`},powered(a){return N(Qt(a)?25:0)},refresh:!0,action(){if(e.galaxy.embassy.count<1&&_($(this)[0])){if(T("embassy","galaxy"),z($(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",[x[e.galaxy.alien1.id].name,x[e.galaxy.alien2.id].name]),"info",!1,["progress"])),e.race.fasting){let a=ue();e.stats.endless_hunger.b1[a]=!0,a!=="m"&&a!=="l"&&(e.stats.endless_hunger.b1.l=!0)}return!0}return!1},citizens(){let a=20;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},dormitory:{id:"galaxy-dormitory",title:t("galaxy_dormitory"),desc(){return`
${t("galaxy_dormitory")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(a){return m("dormitory",a,1e7,1.25,"galaxy")},Furs(a){return m("dormitory",a,7e5,1.25,"galaxy")},Cement(a){return m("dormitory",a,12e5,1.25,"galaxy")},Plywood(a){return m("dormitory",a,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 N(3)},action(){return _($(this)[0])?(T("dormitory","galaxy"),z($(this)[0]),!0):!1},citizens(){let a=3;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},symposium:{id:"galaxy-symposium",title:t("galaxy_symposium"),desc(){return`
${t("galaxy_symposium")}
${t("requires_power")}
`},reqs:{xeno:6},cost:{Money(a){return m("symposium",a,8e6,1.25,"galaxy")},Food(a){return e.race.ravenous?0:m("symposium",a,e.race.artifical?45e3:125e3,1.25,"galaxy")},Lumber(a){return m("symposium",a,46e4,1.25,"galaxy")},Brick(a){return m("symposium",a,261600,1.25,"galaxy")}},effect(){let a="";return e.tech.xeno>=7&&(a=`
${t("galaxy_symposium_effect3",[+ve(300).toFixed(2)])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_symposium_effect",[1750])}
${t("galaxy_symposium_effect2",[650])}
${a}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(4)},action(){return _($(this)[0])?(T("symposium","galaxy"),z($(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(a){return m("freighter",a,6e6,1.2,"galaxy")},Uranium(a){return m("freighter",a,1e4,1.2,"galaxy")},Adamantite(a){return m("freighter",a,46e4,1.2,"galaxy")},Stanene(a){return m("freighter",a,261600,1.2,"galaxy")},Bolognium(a){return m("freighter",a,66e3,1.2,"galaxy")}},effect(){let a=+de($(this)[0].ship.helium).toFixed(2),r="";return e.tech.banking>=13&&(r=`
${t("interstellar_exchange_boost",[3])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[2,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${r}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[a,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 _($(this)[0])?(T("freighter","galaxy"),e.galaxy.freighter.on++,e.resource.Vitreloy.display=!0,!0):!1}}},gxy_alien1:{info:{name(){return t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home])},desc(){return t("galaxy_alien1_desc",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},control(){return{name:x[e.galaxy.alien1.id].name,color:"advanced"}}},consulate:{id:"galaxy-consulate",title:t("galaxy_consulate"),desc(){return t("galaxy_consulate_desc",[x[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(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?9e7:0},Stone(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?75e6:0},Furs(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?3e7:0},Iron(a){return(a||0)+(e.galaxy.hasOwnProperty("consulate")?e.galaxy.consulate.count:0)<1?45e6:0},Horseshoe(a){return e.race.hooved&&(a||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 _($(this)[0])&&e.galaxy.consulate.count<1?(T("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 a=10;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},resort:{id:"galaxy-resort",title:t("galaxy_resort"),desc(){return`
${t("galaxy_resort")}
${t("requires_power")}
`},reqs:{xeno:9},cost:{Money(a){return m("resort",a,33e6,1.25,"galaxy")},Stone(a){return m("resort",a,25e6,1.25,"galaxy")},Furs(a){return m("resort",a,1e7,1.25,"galaxy")},Oil(a){return m("resort",a,de(125e3),1.25,"galaxy")}},effect(){let a=E(e.tech.world_control?1875e3:15e5),r=e.race.joyless?"":`
${t("city_max_entertainer",[F(2)])}
`;return`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${r}
${t("space_red_vr_center_effect2",[2])}
`+`
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(5)},action(){return _($(this)[0])?(T("resort","galaxy"),z($(this)[0])&&(e.race.joyless||(e.civic.entertainer.max+=F(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(a){return m("vitreloy_plant",a,35e6,1.25,"galaxy")},Cement(a){return m("vitreloy_plant",a,18e5,1.25,"galaxy")},Neutronium(a){return m("vitreloy_plant",a,25e4,1.25,"galaxy")},Iridium(a){return m("vitreloy_plant",a,85e4,1.25,"galaxy")},Aerogel(a){return m("vitreloy_plant",a,4e5,1.25,"galaxy")}},effect(){let a=+te("vitreloy_plant").toFixed(2),r=2.5,i=100,s=5e4;return`
${t("galaxy_vitreloy_plant_effect",[a])}
${t("galaxy_vitreloy_plant_effect2",[r,i])}
${t("galaxy_vitreloy_plant_effect3",[s,$(this)[0].powered()])}
`},powered(){return N(10)},action(){return _($(this)[0])?(T("vitreloy_plant","galaxy"),z($(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(a){return m("super_freighter",a,28e6,1.2,"galaxy")},Aluminium(a){return m("super_freighter",a,35e5,1.2,"galaxy")},Alloy(a){return m("super_freighter",a,1e6,1.2,"galaxy")},Graphene(a){return m("super_freighter",a,75e4,1.2,"galaxy")}},effect(){let a=+de($(this)[0].ship.helium).toFixed(2),r="";return e.tech.banking>=13&&(r=`
${t("interstellar_exchange_boost",[8])}
`),`
${t("requires_res",[t("galaxy_embassy")])}
${t("galaxy_freighter_effect",[5,x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])}
${r}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[a,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 _($(this)[0])?(T("super_freighter","galaxy"),e.galaxy.super_freighter.on++,!0):!1}}},gxy_alien2:{info:{name(){return t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_desc",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red,x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:x[e.galaxy.alien2.id].name,color:"danger"}},support:"foothold"},alien2_mission:{id:"galaxy-alien2_mission",title(){return t("galaxy_alien2_mission",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])},desc(){return t("galaxy_alien2_mission_desc",[x[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 a=0;return Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(r){a+=pe.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_alien2[r]}),{label:t("galaxy_fleet_rating",[`400`]),met:!(a<400)}}return{label:t("galaxy_fleet_rating",['400']),met:!1}}},effect(){let a=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_alien2")&&Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(i){a+=pe.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_alien2[i]});let r=a>=650?`${t("galaxy_piracy_low")}`:`${t("galaxy_piracy_avg")}`;return`
${t("galaxy_alien2_mission_effect2",[a])}
${t("galaxy_alien2_mission_effect3",[r])}
${t("galaxy_alien2_mission_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])}
`},action(){if(_($(this)[0])){let a=0;if(Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(r){a+=pe.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_alien2[r]}),a>=400){if(I(t("galaxy_alien2_mission_result2",[x[e.galaxy.alien2.id].solar.red]),"info",!1,["progress"]),a<650){let r=80;e.race.instinct&&(r/=2);let i=[];Object.keys(e.galaxy.defense.gxy_alien2).forEach(function(s){for(let n=0;n0&&(r-=pe.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(a){return m("foothold",a,25e6,1.25,"galaxy")},Titanium(a){return m("foothold",a,3e6,1.25,"galaxy")},Polymer(a){return m("foothold",a,175e4,1.25,"galaxy")},Iridium(a){return m("foothold",a,9e5,1.25,"galaxy")},Bolognium(a){return m("foothold",a,5e4,1.25,"galaxy")}},effect(a){let r=2.5;return`
${t("galaxy_defense_platform_effect",[50])}
${t("galaxy_foothold_effect",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_foothold_effect2",[r,$(this)[0].powered(a)])}
`},support(){return 4},powered(a){return N(Qt(a)?20:0)},powerBalancer(){return[{s:e.galaxy.foothold.s_max-e.galaxy.foothold.support}]},action(){return _($(this)[0])?(T("foothold","galaxy"),z($(this)[0]),e.tech.conflict===1&&(e.galaxy.armed_miner={count:0,on:0,crew:0,mil:0},e.tech.conflict=2,vn(),le()),!0):!1}},armed_miner:{id:"galaxy-armed_miner",title:t("galaxy_armed_miner"),desc(){return`
${t("galaxy_armed_miner")}
`},reqs:{conflict:2},cost:{Money(a){return m("armed_miner",a,5e6,1.25,"galaxy")},Steel(a){return m("armed_miner",a,18e5,1.25,"galaxy")},Stanene(a){return m("armed_miner",a,1975e3,1.25,"galaxy")},Vitreloy(a){return m("armed_miner",a,2e4,1.25,"galaxy")},Soul_Gem(a){return m("armed_miner",a,1,1.25,"galaxy")}},effect(){let a=.032,r=.23,i=.65,s=+de($(this)[0].ship.helium).toFixed(2);return`
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[a,t("resource_Bolognium_name")])}
${t("gain",[r,t("resource_Adamantite_name")])}
${t("gain",[i,t("resource_Iridium_name")])}
${t("galaxy_alien2_support",[$(this)[0].support(),x[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 _($(this)[0])?(T("armed_miner","galaxy"),z($(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(a){return m("ore_processor",a,3e6,1.25,"galaxy")},Iron(a){return m("ore_processor",a,5e6,1.25,"galaxy")},Coal(a){return m("ore_processor",a,375e4,1.25,"galaxy")},Graphene(a){return m("ore_processor",a,225e4,1.25,"galaxy")}},effect(){return`
${t("galaxy_ore_processor_effect",[10])}
${t("galaxy_alien2_support",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
`},s_type:"alien2",support(){return-1},powered(){return 0},action(){return _($(this)[0])?(T("ore_processor","galaxy"),z($(this)[0]),!0):!1}},scavenger:{id:"galaxy-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger_desc"),reqs:{conflict:4},cost:{Money(a){return m("scavenger",a,75e5,1.25,"galaxy")},Alloy(a){return m("scavenger",a,125e4,1.25,"galaxy")},Aluminium(a){return m("scavenger",a,68e5,1.25,"galaxy")},Neutronium(a){return m("scavenger",a,75e3,1.25,"galaxy")},Elerium(a){return m("scavenger",a,750,1.25,"galaxy")}},effect(a){let r=Lt("gxy_alien2",!1,!1,a),i=Math.round(r*25e3),s=+de($(this)[0].ship.helium).toFixed(2),n=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",[i])}
${n}
${t("galaxy_alien2_support",[$(this)[0].support(),x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
${t("spend",[s,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 _($(this)[0])?(T("scavenger","galaxy"),z($(this)[0]),!0):!1}}},gxy_chthonian:{info:{name(){return t("galaxy_chthonian")},desc(){return t("galaxy_chthonian_desc",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},control(){return{name:x[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 a=0;return Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(r){a+=pe.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_chthonian[r]}),{label:t("galaxy_fleet_rating",[`1250`]),met:!(a<1250)}}return{label:t("galaxy_fleet_rating",['1250']),met:!1}}},effect(){let a=0;e.galaxy.hasOwnProperty("defense")&&e.galaxy.defense.hasOwnProperty("gxy_chthonian")&&Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(i){a+=pe.gxy_gateway[i].ship.rating()*e.galaxy.defense.gxy_chthonian[i]});let r=a>=4500?`${t("galaxy_piracy_low")}`:a>=2500?`${t("galaxy_piracy_avg")}`:`${t("galaxy_piracy_high")}`;return`
${t("galaxy_alien2_mission_effect2",[a])}
${t("galaxy_alien2_mission_effect3",[r])}
${t("galaxy_alien2_mission_effect",[t("galaxy_chthonian")])}
`},action(){if(_($(this)[0])){let a=0;if(Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(r){a+=pe.gxy_gateway[r].ship.rating()*e.galaxy.defense.gxy_chthonian[r]}),a>=1250){let r=500,i=[];I(t("galaxy_chthonian_mission_result"),"info",!1,["progress"]),a>=2500&&(r=a>=4500?80:160),e.race.instinct&&(r/=2),Object.keys(e.galaxy.defense.gxy_chthonian).forEach(function(s){for(let n=0;n0&&(r-=pe.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(a){return m("minelayer",a,9e6,1.25,"galaxy")},Iron(a){return m("minelayer",a,48e5,1.25,"galaxy")},Nano_Tube(a){return m("minelayer",a,125e4,1.25,"galaxy")},Nanoweave(a){return m("minelayer",a,1e5,1.25,"galaxy")}},effect(){let a=+de($(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",[a,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 _($(this)[0])?(T("minelayer","galaxy"),e.galaxy.minelayer.on++,!0):!1},postPower(){C({el:"#gxy_chthonian"},"update")},post(){C({el:"#gxy_chthonian"},"update")}},excavator:{id:"galaxy-excavator",title:t("galaxy_excavator"),desc(){return`
${t("galaxy_excavator")}
`},reqs:{chthonian:3},cost:{Money(a){return m("excavator",a,12e6,1.25,"galaxy")},Polymer(a){return m("excavator",a,44e5,1.25,"galaxy")},Iridium(a){return m("excavator",a,36e5,1.25,"galaxy")},Mythril(a){return m("excavator",a,18e4,1.25,"galaxy")}},effect(){let a=+te("excavator").toFixed(3);return`
${t("gain",[a,t("resource_Orichalcum_name")])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(8)},powerBalancer(){return[{r:"Orichalcum",p:te("excavator")}]},action(){return _($(this)[0])?(T("excavator","galaxy"),z($(this)[0]),!0):!1}},raider:{id:"galaxy-raider",title:t("galaxy_raider"),desc(){return`
${t("galaxy_raider")}
`},reqs:{chthonian:3},cost:{Money(a){return m("raider",a,12e6,1.25,"galaxy")},Titanium(a){return m("raider",a,125e4,1.25,"galaxy")},Bolognium(a){return m("raider",a,6e5,1.25,"galaxy")},Vitreloy(a){return m("raider",a,125e3,1.25,"galaxy")},Stanene(a){return m("raider",a,825e3,1.25,"galaxy")}},effect(){let a=+de($(this)[0].ship.helium).toFixed(2),r=.65,i=.05,s=2.3,n=.8;return`
${t("requires_res",[t("galaxy_starbase")])}
${t("galaxy_ship_rating",[$(this)[0].ship.rating()])}
${t("gain",[r,t("resource_Deuterium_name")])}
${t("gain",[i,t("resource_Vitreloy_name")])}
${t("gain",[s,t("resource_Polymer_name")])}
${t("gain",[n,t("resource_Neutronium_name")])}
${t("galaxy_starbase_mil_crew",[$(this)[0].ship.mil()])}
${t("spend",[a,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 _($(this)[0])?(T("raider","galaxy"),e.galaxy.raider.on++,!0):!1},postPower(){C({el:"#gxy_chthonian"},"update")},post(){C({el:"#gxy_chthonian"},"update")}}}};function Bc(a){let r="space";return a.substr(0,4)==="int_"?r="interstellar":a.substr(0,5)==="prtl_"?r="portal":a.substr(0,4)==="gxy_"?r="galaxy":a.substr(0,4)==="tau_"&&(r="tauceti"),r}function Lt(a,r,i,s){if(e.tech.piracy&&!e.race.truepath){let n=0,c=["dreadnought","cruiser_ship","frigate_ship","corvette_ship","scout_ship"];for(let p=0;po?o:n;return((1-(o-p)/o)*l+(1-l))*(r?1:Lt("gxy_stargate",!1,!1,s))}else{let p=n>o?o:n;return(1-(o-p)/o)*l+(1-l)}}else return 1}function Ec(){let a=["protoplasm",e.race.species];e.city.hasOwnProperty("surfaceDwellers")&&a.push(...e.city.surfaceDwellers),e.custom.hasOwnProperty("race0")||a.push("custom");let r=Object.keys(x).filter(function(n){return!["demonic","eldritch"].includes(x[n].type)&&!a.includes(n)}),i=Si(r);e.galaxy.alien1={id:r[i]},a.push(r[i]),r=Object.keys(x).filter(function(n){return!["angelic"].includes(x[n].type)&&!a.includes(n)});let s=Si(r);e.galaxy.alien2={id:r[s]}}function Lc(){let a=1;return e.race.pack_rat&&(a*=1.05),e.stats.achieve.blackhole&&(a*=1+e.stats.achieve.blackhole.l*.05),a*=e.tech.world_control?2:1,a}var Il={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 T(a,r){r||(r="space"),e[r][a]||(e[r][a]=Il[a]),e[r][a].count++}function es(a,r){return a&&r?rt[a][r]:rt}function Kc(){return Ot}function Gc(){return pe}function yn(a,r,i){switch(a){case"space":return Vt(rt,r,i);case"interstellar":return Vt(Ot,r,i);case"galaxy":return Vt(pe,r,i)}}function Vt(a,r,i){let s=e.race.truepath?"truepath":"standard";if(a[r][i].hasOwnProperty("path")&&!a[r][i].path.includes(s))return!1;var n=!0;return Object.keys(a[r][i].reqs).forEach(function(c){(!e.tech[c]||e.tech[c]=a[r][i].grant[1]&&(n=!1),n}function ut(){!e.settings.tabLoad&&e.settings.civTabs!==1||(Dc("inner"),e.race.truepath&&Dc("outer"),wr(),vn())}function Dc(a){if(a||(a=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&&a!=="inner"||e.settings.spaceTabs===5&&a!=="outer"))return;let r=a==="inner"?$("#space"):$("#outerSol");if(A(r),r.append($(`

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

`)),!e.settings.showSpace)return!1;let i=[];Object.keys(rt).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&&rt[s].info.zone!==a)return;let c=typeof rt[s].info.name=="string"?rt[s].info.name:rt[s].info.name(),o=!!(e.race.orbit_decayed||e.race.cataclysm);if(o&&s!=="spc_home"||!o){if(rt[s].info.support){let l=rt[s].info.support;e.space[l].hasOwnProperty("support")||(e.space[l].support=0,e.space[l].s_max=0),r.append(`

${c}

{{ support }}/{{ s_max }}
`),C({el:`#sr${s}`,data:e.space[l]})}else r.append(`

${c}

`);e.race.truepath&&rt[s].info.hasOwnProperty("syndicate")&&rt[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")} `),C({el:`#${s}synd`,data:e.space.syndicate,methods:{threat(l){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let u=Sa(l,!0);if(u.s>=10)return u.s>=50?u.r:Math.round(u.r*u.s*.02)}return"???"},scan(l){return e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")?+((Sa(l,!0).s+25)/1.25).toFixed(1)+"%":t("galaxy_piracy_none")},overkill(l){if(e.space.hasOwnProperty("shipyard")&&e.space.shipyard.hasOwnProperty("ships")){let u=Sa(l,!0);return u.s>=100?u.o:0}return 0}}}),rt[s].info.hasOwnProperty("extra")&&rt[s].info.extra(s))}B(s,function(){return typeof rt[s].info.desc=="string"?rt[s].info.desc:rt[s].info.desc()},{elm:`#${s} h3.name`,classes:"has-background-light has-text-dark"}),Object.keys(rt[s]).forEach(function(l){if(l!=="info"&&Vt(rt,s,l)){let u=rt[s][l];Ut(u,a==="inner"?"space":"outerSol",l)}})}})}function wr(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==2))return;let a=$("#interstellar");if(A(a),a.append($(`

${t("tab_interstellar")}

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

${s}

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

${s}

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

${t("tab_galactic")}

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

${s}

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

${t("galaxy_armada")}

`);a.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 }}`)),C({el:`#h${r}`,data:{g:e.civic.garrison,c:e.civic.crew},filters:{stationed(l){return gt()},s_max(l){return gt(!0)}}}),["soldier","crew1","crew2"].forEach(function(l){B(`h${r}${l}`,function(){switch(l){case"soldier":return bn();case"crew1":return t("civics_garrison_crew_desc");case"crew2":return t("job_crew_desc")}},{elm:`#h${r} span.${l}`})});let n=$(`
`);a.append(n);let c=["scout_ship","corvette_ship","frigate_ship","cruiser_ship","dreadnought"],o=[];for(let l=0;l<6;l++){let u=$('
');o.push(u),n.append(u)}for(let l=0;l${pe.gxy_gateway[c[l]].title}`);o[l+1].append(u)}o[0].append($("")),o[0].append($(`${pe.gxy_gateway.info.name}`));for(let l=0;l{{ gateway.${c[l]} }}`);o[l+1].append(u)}Object.keys(e.galaxy.defense).forEach(function(l){let u=l.substring(4);if(e.settings.space[u]&&u!=="gateway"){let d=$(`${typeof pe[l].info.name=="string"?pe[l].info.name:pe[l].info.name()}`);o[0].append(d);for(let h=0;h'),f=$(`«`),g=$(`{{ ${u}.${c[h]} }}`),w=$(`»`);o[h+1].append(p),p.append(f),p.append(g),p.append(w)}}}),C({el:`#${r}`,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(l,u){if(e.galaxy.defense[l][u]>0){let d=V();d>e.galaxy.defense[l][u]&&(d=e.galaxy.defense[l][u]),e.galaxy.defense.gxy_gateway[u]+=d,e.galaxy.defense[l][u]-=d}},add(l,u){if(e.galaxy.defense.gxy_gateway[u]>0){let d=V();d>e.galaxy.defense.gxy_gateway[u]&&(d=e.galaxy.defense.gxy_gateway[u]),e.galaxy.defense.gxy_gateway[u]-=d,e.galaxy.defense[l][u]+=d}}}}),Object.keys(e.galaxy.defense).forEach(function(l){let u=l.substring(4);e.settings.space[u]&&B(`armada${u}`,function(){return`
${typeof pe[l].info.desc=="string"?pe[l].info.desc:pe[l].info.desc()}
`})});for(let l=0;l=5&&i&&(a*=.95**i),a}function ns(a,r){if(e.space.swarm_plant){let i=e.tech.swarm?.88:.94;e.tech.swarm>=3&&(i-=pa(r)/100),i<.05&&(i=.05),a*=i**e.space.swarm_plant.count}return a}function _e(a,r,i){e.race.universe==="heavy"&&(a*=1.25+.5*fe("heavy")),e.race.truepath&&(a*=r?2.5:1.25);let s=i?e.city?.mass_driver?.on??0:G.mass_driver;if(s){let n=(i?i.truepath:e.race.truepath)?.94:.95;a*=n**s}return e.stats.achieve.heavyweight&&(a*=.96**e.stats.achieve.heavyweight.l),e.city.ptrait.includes("dense")&&(a*=Fe.dense.vars()[2]),e.race.cataclysm&&(a*=.2),e.race.heavy&&(a*=1+b.heavy.vars()[0]/100),e.race.gravity_well&&(a*=1.35+9.65*fe("heavy")),xe("launch_day")&&(a*=.95),a}function de(a){return e.race.universe==="heavy"&&(a*=1.2+.3*fe("heavy")),e.stats.achieve.heavyweight&&(a*=.96**e.stats.achieve.heavyweight.l),e.race.heavy&&(a*=1+b.heavy.vars()[0]/100),xe("launch_day")&&(a*=.95),a}function S(){let a={red:x[e.race.species].solar.red,hell:x[e.race.species].solar.hell,gas:x[e.race.species].solar.gas,gas_moon:x[e.race.species].solar.gas_moon,dwarf:x[e.race.species].solar.dwarf,titan:kr[x[e.race.species].type].solar.titan,enceladus:kr[x[e.race.species].type].solar.enceladus,triton:kr[x[e.race.species].type].solar.triton,eris:kr[x[e.race.species].type].solar.eris};if(e.race.species==="custom")for(let r of["titan","enceladus","triton","eris"])e.custom.race0.hasOwnProperty(r)&&(a[r]=e.custom.race0[r]);return a}var Ye=["l","h","a","e","m","mg"],ma={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 br(a){!a&&!e.race.noexport&&(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),L(`biome_${e.city.biome}`),L(`genus_${x[e.race.species].type}`),e.race.witch_hunter&&e.race.universe==="magic"?L("soul_sponge"):(L("ascended"),e.interstellar.thermal_collector.count===0&&se("energetic")),e.race.species==="junker"&&se("the_misery"),!e.race.modified&&e.race.junker&&e.race.species==="junker"&&se("garbage_pie"),e.race.emfield&&L("technophobe"),e.race.cataclysm&&se("finish_line"),e.race.noexport="Race",A($("#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 r=$('
'),i={ascended:{},technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l?e.stats.achieve.technophobe.l:0};if(a?a.append(r):$("#city").append(r),r.append(`

${t("genelab_title")}

- ${t("genelab_genes")} {{ g.genes }} - ${t("trait_untapped_name")}: {{ g.genes | untapped }}
`),a){r.append(`
${t("achieve_ascended_name")}
- `);let v=$("
");r.append(v),Object.keys(ma).forEach(function(k){i.ascended[k]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(le(k))?e.stats.achieve.ascended[le(k)]:0,v.append(` + `);let v=$("
");r.append(v),Object.keys(ma).forEach(function(k){i.ascended[k]=e.stats.achieve.ascended&&e.stats.achieve.ascended.hasOwnProperty(ue(k))?e.stats.achieve.ascended[ue(k)]:0,v.append(`
${t("universe_"+k)}
`)}),r.append(`
${t("achieve_technophobe_name")}
@@ -190,7 +190,7 @@
- `),r.append(f);var g=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||S().titan,enceladus:e.custom.race0.enceladus||S().enceladus,triton:e.custom.race0.triton||S().triton,eris:e.custom.race0.eris||S().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:l,traitlist:[]};for(let v=g.traitlist.length-1;v>=0;v--)(!b.hasOwnProperty(g.traitlist[v])||b[g.traitlist[v]].type!=="major")&&g.traitlist.splice(v,1);g.genes=Ia(g,a?i:!1);let w={msg:""};C({el:"#celestialLab",data:{g,w:i,err:w},methods:{val(v){v==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[v]<0?i.ascended[v]=0:i.ascended[v]>5&&(i.ascended[v]=5)},geneEdit(){g.genes=Ia(g,a?i:!1)},setRace(){Ia(g)>=0&&g.name.length>0&&g.desc.length>0&&g.entity.length>0&&g.home.length>0&&g.red.length>0&&g.hell.length>0&&g.gas.length>0&&g.gas_moon.length>0&&g.dwarf.length>0&&(e.custom.race0={name:g.name,desc:g.desc,entity:g.entity,home:g.home,red:g.red,hell:g.hell,gas:g.gas,gas_moon:g.gas_moon,dwarf:g.dwarf,titan:g.titan,enceladus:g.enceladus,triton:g.triton,eris:g.eris,genus:g.genus,traits:g.traitlist},kc())},allowed(v){return g.genus!=="synthetic"&&["deconstructor","imitation"].includes(v)?(g.traitlist.includes(v)&&g.traitlist.splice(g.traitlist.indexOf(v),1),!0):!1},reset(){g.name="",g.desc="",g.entity="",g.home="",g.red="",g.hell="",g.gas="",g.gas_moon="",g.dwarf="",g.titan="",g.enceladus="",g.triton="",g.eris="",g.genus=l,g.traitlist=[],g.genes=Ia(g,a?i:!1)},customImport(){let v=document.getElementById("customFile").files[0];if(v){let k=new FileReader;k.readAsText(v,"UTF-8"),k.onload=function(P){let j="";try{j=JSON.parse(P.target.result)}catch{w.msg=t("string_pack_error",[v.name]);return}let D=!1;if(Object.keys(g).forEach(function(Q){if(j[Q]&&typeof g[Q]!=typeof j[Q]){D=!0;return}}),D){w.msg=t("string_pack_error",[v.name]),console.log("format fail");return}Object.keys(g).forEach(function(Q){j[Q]&&(g[Q]=j[Q])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(Q){!j[Q]&&["titan","enceladus","triton","eris"].includes(Q)?g[Q]=t(`genus_${g.genus}_solar_${Q}`):g[Q].length>20&&(g[Q]=g[Q].substring(0,20))}),g.entity.length>40&&(g.entity=g.entity.substring(0,40)),g.desc.length>255&&(g.desc=g.desc.substring(0,255)),!a&&!(e.stats.achieve[`genus_${g.genus}`]&&e.stats.achieve[`genus_${g.genus}`].l>0)&&(g.genus=l);let U=[];for(let Q=0;Q{let D=document.createElement("a"),U=new Blob([k],{type:j});D.href=URL.createObjectURL(U),D.download=P,D.click(),URL.revokeObjectURL(D.href)})(JSON.stringify(g,null,4),`evolve-custom-${g.name}.txt`,"text/plain")}},filters:{cost(v){if(b[v].val>=0){let k=2;a?k+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(k+=e.stats.achieve.technophobe.l);let P=b[v].val,j=0;for(let D=0;D=0&&j++;return g.traitlist.includes(v)&&j--,j>k&&(P+=j-k),P}else return b[v].val},untapped(v){return`+${v>0?+((v/(v+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(vt).forEach(function(v){e.stats.achieve[`genus_${v}`]&&e.stats.achieve[`genus_${v}`].l>0&&B(`celestialLabgenusSelection${v}`,function(){let k=$(`
${t(`genelab_genus_${v}_desc`)}
`);return Object.keys(vt[v]).forEach(function(P){if(b[P]){let j=$("
");Ma(j,P,{trank:1}),k.append(j)}}),k},{elm:`#celestialLab .genus_selection .${v}`,classes:"w30",wide:!0})}),Object.keys(p).sort().forEach(function(v){b.hasOwnProperty(v)&&b[v].type==="major"&&B(`celestialLabtraitSelection${v}`,function(){let k=$("
");return Ma(k,v,{trank:1}),k},{elm:`#celestialLab .trait_selection .t${v}`,classes:"w30",wide:!0})})}function _n(a){!a&&!e.race.noexport&&(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),L(`biome_${e.city.biome}`),L(`genus_${x[e.race.species].type}`),L("lamentis"),e.race.species==="junker"&&se("the_misery"),e.race.noexport="Planet",A($("#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 r=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};a?a.append(r):$("#city").append(r),r.append(`

${t("planetlab_title")}

- ${t("planetlab_points")} {{ p.pts }}
`);let s=$('
');r.append(s);let n=!1,c=`
${t("wiki_planet_biome")}
",s.append($(c));let o=`
${t("wiki_planet_trait")}
",s.append($(o));let l={},u=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&u.push("Iridium");let d=`
${t("planetlab_res")}
",s.append($(d));let h={biome:n,pts:0,traitlist:[],geology:l,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let f=le();if(e.custom.planet.hasOwnProperty(f)){let g="s";e.custom.planet[f][g]&&(h=Be(e.custom.planet[f][g]),h.orbit=e.city.calendar.orbit,u.forEach(function(w){h.geology.hasOwnProperty(w)?h.geology[w]*=100:h.geology[w]=0}))}}h.pts=cs(h,a?i:!1);let p=`
+ `),r.append(f);var g=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||S().titan,enceladus:e.custom.race0.enceladus||S().enceladus,triton:e.custom.race0.triton||S().triton,eris:e.custom.race0.eris||S().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:l,traitlist:[]};for(let v=g.traitlist.length-1;v>=0;v--)(!b.hasOwnProperty(g.traitlist[v])||b[g.traitlist[v]].type!=="major")&&g.traitlist.splice(v,1);g.genes=Ia(g,a?i:!1);let w={msg:""};C({el:"#celestialLab",data:{g,w:i,err:w},methods:{val(v){v==="technophobe"?i.technophobe<0?i.technophobe=0:i.technophobe>5&&(i.technophobe=5):i.ascended[v]<0?i.ascended[v]=0:i.ascended[v]>5&&(i.ascended[v]=5)},geneEdit(){g.genes=Ia(g,a?i:!1)},setRace(){Ia(g)>=0&&g.name.length>0&&g.desc.length>0&&g.entity.length>0&&g.home.length>0&&g.red.length>0&&g.hell.length>0&&g.gas.length>0&&g.gas_moon.length>0&&g.dwarf.length>0&&(e.custom.race0={name:g.name,desc:g.desc,entity:g.entity,home:g.home,red:g.red,hell:g.hell,gas:g.gas,gas_moon:g.gas_moon,dwarf:g.dwarf,titan:g.titan,enceladus:g.enceladus,triton:g.triton,eris:g.eris,genus:g.genus,traits:g.traitlist},kc())},allowed(v){return g.genus!=="synthetic"&&["deconstructor","imitation"].includes(v)?(g.traitlist.includes(v)&&g.traitlist.splice(g.traitlist.indexOf(v),1),!0):!1},reset(){g.name="",g.desc="",g.entity="",g.home="",g.red="",g.hell="",g.gas="",g.gas_moon="",g.dwarf="",g.titan="",g.enceladus="",g.triton="",g.eris="",g.genus=l,g.traitlist=[],g.genes=Ia(g,a?i:!1)},customImport(){let v=document.getElementById("customFile").files[0];if(v){let k=new FileReader;k.readAsText(v,"UTF-8"),k.onload=function(P){let j="";try{j=JSON.parse(P.target.result)}catch{w.msg=t("string_pack_error",[v.name]);return}let D=!1;if(Object.keys(g).forEach(function(Q){if(j[Q]&&typeof g[Q]!=typeof j[Q]){D=!0;return}}),D){w.msg=t("string_pack_error",[v.name]),console.log("format fail");return}Object.keys(g).forEach(function(Q){j[Q]&&(g[Q]=j[Q])}),["name","home","red","hell","gas","gas_moon","dwarf","titan","enceladus","triton","eris"].forEach(function(Q){!j[Q]&&["titan","enceladus","triton","eris"].includes(Q)?g[Q]=t(`genus_${g.genus}_solar_${Q}`):g[Q].length>20&&(g[Q]=g[Q].substring(0,20))}),g.entity.length>40&&(g.entity=g.entity.substring(0,40)),g.desc.length>255&&(g.desc=g.desc.substring(0,255)),!a&&!(e.stats.achieve[`genus_${g.genus}`]&&e.stats.achieve[`genus_${g.genus}`].l>0)&&(g.genus=l);let U=[];for(let Q=0;Q{let D=document.createElement("a"),U=new Blob([k],{type:j});D.href=URL.createObjectURL(U),D.download=P,D.click(),URL.revokeObjectURL(D.href)})(JSON.stringify(g,null,4),`evolve-custom-${g.name}.txt`,"text/plain")}},filters:{cost(v){if(b[v].val>=0){let k=2;a?k+=i.technophobe:e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(k+=e.stats.achieve.technophobe.l);let P=b[v].val,j=0;for(let D=0;D=0&&j++;return g.traitlist.includes(v)&&j--,j>k&&(P+=j-k),P}else return b[v].val},untapped(v){return`+${v>0?+((v/(v+20)/10+24e-5)*100).toFixed(3):0}%`}}}),Object.keys(vt).forEach(function(v){e.stats.achieve[`genus_${v}`]&&e.stats.achieve[`genus_${v}`].l>0&&B(`celestialLabgenusSelection${v}`,function(){let k=$(`
${t(`genelab_genus_${v}_desc`)}
`);return Object.keys(vt[v]).forEach(function(P){if(b[P]){let j=$("
");Ma(j,P,{trank:1}),k.append(j)}}),k},{elm:`#celestialLab .genus_selection .${v}`,classes:"w30",wide:!0})}),Object.keys(p).sort().forEach(function(v){b.hasOwnProperty(v)&&b[v].type==="major"&&B(`celestialLabtraitSelection${v}`,function(){let k=$("
");return Ma(k,v,{trank:1}),k},{elm:`#celestialLab .trait_selection .t${v}`,classes:"w30",wide:!0})})}function _n(a){!a&&!e.race.noexport&&(ce.w&&ce.w.terminate(),e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),L(`biome_${e.city.biome}`),L(`genus_${x[e.race.species].type}`),L("lamentis"),e.race.species==="junker"&&se("the_misery"),e.race.noexport="Planet",A($("#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 r=$('
'),i={ascended:{},lamentis:e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l?e.stats.achieve.lamentis.l:0};a?a.append(r):$("#city").append(r),r.append(`

${t("planetlab_title")}

- ${t("planetlab_points")} {{ p.pts }}
`);let s=$('
');r.append(s);let n=!1,c=`
${t("wiki_planet_biome")}
",s.append($(c));let o=`
${t("wiki_planet_trait")}
",s.append($(o));let l={},u=["Copper","Iron","Aluminium","Coal","Oil","Titanium","Uranium"];e.stats.achieve.whitehole&&u.push("Iridium");let d=`
${t("planetlab_res")}
",s.append($(d));let h={biome:n,pts:0,traitlist:[],geology:l,orbit:e.city.calendar.orbit};if(e.custom.hasOwnProperty("planet")){let f=ue();if(e.custom.planet.hasOwnProperty(f)){let g="s";e.custom.planet[f][g]&&(h=Be(e.custom.planet[f][g]),h.orbit=e.city.calendar.orbit,u.forEach(function(w){h.geology.hasOwnProperty(w)?h.geology[w]*=100:h.geology[w]=0}))}}h.pts=cs(h,a?i:!1);let p=`
@@ -198,7 +198,7 @@
- `),p+="
",r.append(p),C({el:"#celestialLab",data:{p:h,w:i},methods:{pEdit(){h.pts=cs(h,a?i:!1)},setPlanet(){if(cs(h)>=0){Object.keys(h.geology).forEach(function(w){h.geology[w]===0?delete h.geology[w]:h.geology[w]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let f=le();e.custom.planet.hasOwnProperty(f)||(e.custom.planet[f]={s:!1});let g="s";e.custom.planet[f][g]=Be(h),delete e.custom.planet[f][g].pts,$c(h)}},reset(){h.traitlist=[],Object.keys(h.geology).forEach(function(f){h.geology[f]=0}),h.pts=cs(h,a?i:!1)},less(f){h.geology[f]-=V(),h.geology[f]<-20&&(h.geology[f]=-20)},more(f){h.geology[f]+=V();let g=30;e.stats.achieve.whitehole&&(g+=e.stats.achieve.whitehole.l*5),h.biome==="eden"&&(g+=5),h.geology[f]>g&&(h.geology[f]=g)}},filters:{res(f){return h.geology[f]}}})}function cs(a,r){let i=(a.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=a.traitlist.length**3;let s=0;return Object.keys(a.geology).forEach(function(n){a.geology[n]!==0&&(i-=a.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}function Qt(a){return a?e.interstellar?.s_gate?.count?!!e.interstellar.s_gate.on:!0:!!G.s_gate}var $t={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let a=200;return G.repair_droid&&(a*=.95**G.repair_droid),Math.round(a)}},turret:{id:"portal-turret",title(){let a=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(a)},desc(){let a=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(a)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(a){return m("turret",a,35e4,1.28,"portal")},Copper(a){return m("turret",a,5e4,1.28,"portal")},Adamantite(a){return m("turret",a,8e3,1.28,"portal")},Elerium(a){return m("turret",a,15,1.28,"portal")},Nano_Tube(a){return m("turret",a,28e3,1.28,"portal")}},powered(){return N(e.tech.turret?4+e.tech.turret:4)},postPower(a){G.turret=e.portal.turret.on,C({el:"#fort"},"update")},effect(){let a=e.tech.turret?e.tech.turret>=2?70:50:35,r=$(this)[0].powered();return`
${t("portal_turret_effect",[a])}
${t("minus_power",[r])}
`},action(){return _($(this)[0])?(T("turret","portal"),z($(this)[0])&&(G.turret++,C({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(a){return m("carport",a,25e4,1.3,"portal")},Cement(a){return m("carport",a,18e3,1.3,"portal")},Oil(a){return m("carport",a,6500,1.3,"portal")},Plywood(a){return m("carport",a,8500,1.3,"portal")}},repair(){let a=180;return G.repair_droid&&(a*=.92**G.repair_droid),Math.round(a)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return _($(this)[0])?(T("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=F(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,pe()),!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(a){return m("war_droid",a,495e3,1.26,"portal")},Neutronium(a){return m("war_droid",a,1250,1.26,"portal")},Elerium(a){return m("war_droid",a,18,1.26,"portal")},Stanene(a){return m("war_droid",a,37500,1.26,"portal")},Soul_Gem(a){return m("war_droid",a,1,1.26,"portal")}},powered(){return N(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("war_droid","portal"),z($(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(a){return m("repair_droid",a,444e3,1.26,"portal")},Iron(a){return m("repair_droid",a,88e3,1.26,"portal")},Iridium(a){return m("repair_droid",a,17616,1.26,"portal")},Infernite(a){return m("repair_droid",a,666,1.26,"portal")},Soul_Gem(a){return m("repair_droid",a,1,1.15,"portal")}},powered(){return N(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("repair_droid","portal"),z($(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 N(5)},cost:{Money(a){return m("war_drone",a,65e4,1.28,"portal")},Alloy(a){return m("war_drone",a,6e4,1.28,"portal")},Graphene(a){return m("war_drone",a,1e5,1.28,"portal")},Elerium(a){return m("war_drone",a,25,1.28,"portal")},Soul_Gem(a){return m("war_drone",a,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("war_drone","portal"),z($(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 N(3)},cost:{Money(a){return m("sensor_drone",a,5e5,1.25,"portal")},Polymer(a){return m("sensor_drone",a,25e3,1.25,"portal")},Adamantite(a){return m("sensor_drone",a,12500,1.25,"portal")},Infernite(a){return m("sensor_drone",a,100,1.25,"portal")}},effect(){let a=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,r=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",[r])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[a])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("sensor_drone","portal"),z($(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 N(3)},cost:{Money(a){return m("attractor",a,35e4,1.25,"portal")},Aluminium(a){return m("attractor",a,175e3,1.25,"portal")},Stanene(a){return m("attractor",a,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 _($(this)[0])?(T("attractor","portal"),z($(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 _($(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/Pt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return _($(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 N(30)},postPower(a){C({el:"#fort"},"update")},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(a){let r=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((a?.count??0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6,c=a?e.portal.soul_attractor.on:G.soul_attractor;e.tech.hell_pit>=7&&c>0&&(n*=.97**c),r=r+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ls(a);return`${r}
${t("portal_soul_forge_soldiers",[s])}, ${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])&&e.portal.soul_forge.count<1?(T("soul_forge","portal"),z($(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 N(3)},cost:{Money(a){return m("gun_emplacement",a,4e6,1.25,"portal")},Coal(a){return m("gun_emplacement",a,25e4,1.25,"portal")},Steel(a){return m("gun_emplacement",a,12e5,1.25,"portal")},Wrought_Iron(a){return m("gun_emplacement",a,2e5,1.25,"portal")}},effect(){let a=e.tech.hell_gun>=2?2:1,r=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[a])}
${t("portal_gun_emplacement_effect2",[r,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("gun_emplacement","portal"),z($(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 N(4)},cost:{Money(a){return m("soul_attractor",a,12e6,1.25,"portal")},Stone(a){return m("soul_attractor",a,23e6,1.25,"portal")},Nano_Tube(a){return m("soul_attractor",a,314159,1.25,"portal")},Vitreloy(a){return m("soul_attractor",a,1618,1.25,"portal")},Aerogel(a){return m("soul_attractor",a,18e4,1.25,"portal")}},effect(){let a=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",r=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+r,120+r])}
${a}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("soul_attractor","portal"),z($(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 N(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,75e7,1.01,"portal")},Crystal(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,125e4,1.01,"portal")},Adamantite(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,65e5,1.01,"portal")},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,1e4,1.01,"portal")},Stanene(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,25e5,1.01,"portal")},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,1e6,1.01,"portal")},Soul_Gem(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,3,1.01,"portal")},Mythril(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,125e4,1.01,"portal")}},effect(){let a=25e5,r=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",[r.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[a.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&_($(this)[0])?(e.portal.soul_capacitor.count++,z($(this)[0]),!0):!1},postPower(){ji($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(a){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||a?`
${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(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(r<100){let i=100-r;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",[ke("descend").artifact])}
`;{let i=os();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(_($(this)[0])){if(e.portal.absorption_chamber.count<100)return T("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?mi():br(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let a=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return a=a+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,a},filter(a,r){let i=Pa("ruins");switch(r){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 _($(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(a){return m("guard_post",a,8e6,1.06,"portal")},Lumber(a){return m("guard_post",a,65e5,1.06,"portal")},Sheet_Metal(a){return m("guard_post",a,3e5,1.06,"portal")}},powered(){return N(5)},support(){return 1},effect(){let a=e.race.holy?1+b.holy.vars()[1]/100:1,r=X("unicorn");r>0&&(a*=1+b.holy.vars(1)[1]/100*r);let i=Math.round(a*Pt(F(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[F(1),$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){C({el:"#srprtl_ruins"},"update"),C({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(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(a){return(a?.count??0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){return e.portal.vault.count<2&&_($(this)[0])?(T("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"])),!0):!1},post(){e.portal.vault.count===2&&(pe(),kt(),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(a){return m("archaeology",a,1e8,1.25,"portal")},Titanium(a){return m("archaeology",a,375e4,1.25,"portal")},Mythril(a){return m("archaeology",a,125e4,1.25,"portal")}},powered(){return N(8)},effect(){return`
${t("portal_archaeology_effect",[F(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(_($(this)[0])){if(T("archaeology","portal"),e.civic.archaeologist.display=!0,z($(this)[0])){let a=F(2);e.civic.archaeologist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.archaeologist.workers+=r}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(a){return m("arcology",a,18e7,1.22,"portal")},Graphene(a){return m("arcology",a,75e5,1.22,"portal")},Bolognium(a){return m("arcology",a,28e5,1.22,"portal")},Orichalcum(a){return m("arcology",a,55e5,1.22,"portal")},Nanoweave(a){return m("arcology",a,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return N(25)},effect(a){let r=Pa("ruins",0,a),i=E(ja()*8*r.supress);i=+i.toFixed(0);let s=Math.round(pa(a))*10,n=`
${t("plus_max_resource",[s,t("resource_Crates_name")])}
${t("plus_max_resource",[s,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[F(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${n}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("arcology","portal"),z($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||sa(),!0):!1},post(){C({el:"#srprtl_ruins"},"update"),pe()},postPower(){C({el:"#srprtl_ruins"},"update"),C({el:"#srprtl_gate"},"update")},citizens(){let a=8;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("hell_forge",a,25e7,1.15,"portal")},Coal(a){return m("hell_forge",a,165e4,1.22,"portal")},Steel(a){return m("hell_forge",a,38e5,1.22,"portal")},Iridium(a){return m("hell_forge",a,12e5,1.22,"portal")},Neutronium(a){return m("hell_forge",a,28e4,1.22,"portal")},Soul_Gem(a){return m("hell_forge",a,5,1.22,"portal")}},powered(){return N(12)},special:!0,effect(a){let i=+(75*Pa("ruins",0,a).supress).toFixed(1),s=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[F(1)])}
${s}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("hell_forge","portal"),z($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Xe()},postPower(a){gi("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(a){return m("inferno_power",a,275e6,1.16,"portal")},Neutronium(a){return m("inferno_power",a,375e4,1.18,"portal")},Stanene(a){return m("inferno_power",a,12e6,1.18,"portal")},Bolognium(a){return m("inferno_power",a,8e6,1.18,"portal")}},powered(a){let r=20,i=a?e.portal?.hell_forge?.on??0:G.hell_forge;return i&&(r+=i*10),at(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(a){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered(a)])}
${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 _($(this)[0])?(T("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){C({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(a,r){return a!==void 0?a+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(x).length-1,r])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(x).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&_($(this)[0])?(e.pillars[e.race.species]=dt(),e.tech.pillars=2,E(0,!1,!0),na(!0),Ke(!0),L("resonance"),C({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 a=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return a=a+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,a},filter(a,r){let i=Pa("gate");switch(r){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 _($(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(a){let r=Ke();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")}
${t("requires_segments",[r])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Ke()-e.portal.west_tower.count},cost:{Money(a,r){return(a||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=Ke()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),kt()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(a){let r=Ke();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}
${t("requires_segments",[r])}
`:`
${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Ke()-e.portal.east_tower.count},cost:{Money(a,r){return(a||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=Ke()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),kt()))}},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 N(6)},cost:{Money(a){return m("gate_turret",a,375e4,1.22,"portal")},Iron(a){return m("gate_turret",a,425e4,1.22,"portal")},Elerium(a){return m("gate_turret",a,275,1.22,"portal")},Stanene(a){return m("gate_turret",a,85e4,1.22,"portal")}},effect(){let a=100;e.race.holy&&(a*=1+b.holy.vars()[1]/100);let r=X("unicorn");r>0&&(a*=1+b.holy.vars(1)[1]/100*r);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(a)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("gate_turret","portal"),z($(this)[0]),!0):!1},post(){C({el:"#srprtl_gate"},"update")},postPower(){C({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 N(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(a){return m("infernite_mine",a,75e6,1.26,"portal")},Alloy(a){return m("infernite_mine",a,245e4,1.26,"portal")},Orichalcum(a){return m("infernite_mine",a,165e4,1.26,"portal")},Wrought_Iron(a){return m("infernite_mine",a,68e4,1.26,"portal")}},effect(a){let r=te("infernite_mine","",a);return`
${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("infernite_mine","portal"),z($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbor"},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 _($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbor:{id:"portal-harbor",title:t("portal_harbor_title"),desc(){return`
${t("portal_harbor_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(a){let i=(a?e.portal?.cooling_tower?.on??0:G.cooling_tower)||0;return+N(500*.92**i).toFixed(2)},support(){return 1},cost:{Money(a){return m("harbor",a,225e6,St(1.18),"portal")},Cement(a){return m("harbor",a,5e7,St(1.18),"portal")},Iridium(a){return m("harbor",a,75e5,St(1.18),"portal")},Infernite(a){return m("harbor",a,8e5,St(1.18),"portal")},Stanene(a){return m("harbor",a,175e5,St(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(a){switch(a){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(a){let r='
';for(let i of $(this)[0].res())if(e.resource[i].display){let s=Y(+E($(this)[0].val(i)).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])}`}return r=r+"
",`
${t("portal_harbor_effect",[1])}
${r}
${t("minus_power",[$(this)[0].powered(a)])}
`},action(){if(_($(this)[0])){if(T("harbor","portal"),z($(this)[0]))for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=E($(this)[0].val(a)));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 N(10)},cost:{Money(a){return m("cooling_tower",a,25e7,1.2,"portal")},Polymer(a){return m("cooling_tower",a,12e6,1.2,"portal")},Orichalcum(a){return m("cooling_tower",a,85e5,1.2,"portal")},Brick(a){return m("cooling_tower",a,25e4,1.2,"portal")}},effect(){return`
${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("cooling_tower","portal"),z($(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(a){return m("bireme",a,19e7,1.24,"portal")},Helium_3(a){return m("bireme",a,225e3,1.24,"portal")},Adamantite(a){return m("bireme",a,15e6,1.24,"portal")},Nano_Tube(a){return m("bireme",a,18e6,1.24,"portal")},Soul_Gem(a){return m("bireme",a,10,1.24,"portal")},Scarletite(a){return m("bireme",a,125e3,1.24,"portal")}},effect(){let a=e.blood.spire&&e.blood.spire>=2?20:15;return`
${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[a])}
${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 _($(this)[0])?(T("bireme","portal"),z($(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(a){return m("transport",a,3e8,1.22,"portal")},Oil(a){return m("transport",a,18e4,1.22,"portal")},Alloy(a){return m("transport",a,18e6,1.22,"portal")},Graphene(a){return m("transport",a,125e5,1.22,"portal")},Soul_Gem(a){return m("transport",a,5,1.22,"portal")},Scarletite(a){return m("transport",a,25e4,1.22,"portal")}},effect(a){let r=e.blood.spire&&e.blood.spire>=2?.8:.85,i=a?e.portal?.bireme?.on??0:la.bireme,s=+(r**i*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[s])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(ir("mTabResource"),ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return _($(this)[0])?(T("transport","portal"),z($(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"]),kt()),!0):!1}},oven:{id:"portal-oven",title:t("portal_oven_title"),desc(a){if(!e.portal.hasOwnProperty("oven")||e.portal.oven.count<100||a)return`
${t("portal_oven_title")}
${t("requires_segments",[100])}
`+(e.portal.hasOwnProperty("oven")&&e.portal.oven.count>=100?`
${t("requires_power")}
`:"")},reqs:{dish:2},condition(){return e.portal.oven.count<100},queue_size:10,queue_complete(){return 100-e.portal.oven.count},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?19e7:0},Steel(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?2e6:0},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?6e5:0},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?1e6:0},Scarletite(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?15e3:0}},effect(a){let r=(a?.count??0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0);if(r<100){let i=100-r;return`
${t("portal_oven_effect1")}
${t("requires_segments",[i])}
`}else return $t.prtl_lake.oven_complete.effect()},action(){return e.portal.oven.count<100&&_($(this)[0])?(e.portal.oven.count++,e.portal.oven.count>=100&&(e.tech.dish=3,e.portal.oven_complete={count:1,on:0},e.portal.devilish_dish={count:0,done:0,time:0},kt(),ie()),!0):!1}},oven_complete:{id:"portal-oven_complete",title:t("portal_oven_title"),desc(){return`
${t("portal_oven_title")}
${t("requires_power")}
`},wiki:!1,reqs:{dish:3},condition(){return e.portal.oven.count>=100},queue_complete(){return 0},cost:{},effect(a){let r=$(this)[0].p_fuel();return`
${t("portal_oven_desc")}
${e.tech.dish===4?`
${t("portal_oven_desc2")}
`:""}
${t("minus_power",[$(this)[0].powered()])}, ${t("spend",[r.a,r.r])}
`},powered(){return N(3500)},p_fuel(){return{r:"Infernite",a:225}},action(){return!1}},devilish_dish:{id:"portal-devilish_dish",title:t("portal_devilish_dish_title"),desc:t("portal_devilish_dish_title"),reqs:{dish:3},queue_complete(){return 0},cost:{},effect(){let a=e.portal.devilish_dish?e.portal.devilish_dish.done:0;return`
${t("portal_devilish_dish_desc",[a.toFixed(1)])}
${t(`portal_devilish_dish_flavor${a>=100?6:Math.ceil(a/20)}`)}
`},action(){return!1}},dish_soul_steeper:{id:"portal-dish_soul_steeper",title:t("portal_dish_soul_steeper_title"),desc:t("portal_dish_soul_steeper_desc"),reqs:{dish:5},cost:{Money(a){return m("dish_soul_steeper",a,75e7,St(1.3),"portal")},Bolognium(a){return m("dish_soul_steeper",a,12e6,St(1.3),"portal")},Scarletite(a){return m("dish_soul_steeper",a,3e5,St(1.3),"portal")}},powered(){return 0},effect(){return`
${t("portal_dish_soul_steeper_effect1")}
${t("portal_dish_soul_steeper_effect2",[3+(e.race.malnutrition?1:0)+(e.race.angry?-1:0)])}
`},action(){return _($(this)[0])?(e.portal.dish_soul_steeper.count++,e.portal.dish_soul_steeper.on++,!0):!1},flair:t("portal_dish_soul_steeper_flair")},dish_life_infuser:{id:"portal-dish_life_infuser",title:t("portal_dish_life_infuser_title"),desc:t("portal_dish_life_infuser_desc"),reqs:{dish:5},cost:{Money(a){return m("dish_life_infuser",a,28e7,St(1.2),"portal")},Bolognium(a){return m("dish_life_infuser",a,8e6,St(1.2),"portal")},Orichalcum(a){return m("dish_life_infuser",a,8e6,St(1.2),"portal")},Species(a){return sr(10)}},powered(){return 0},effect(){return`
${t("portal_dish_life_infuser_effect1",[15])}
${t("portal_dish_life_infuser_effect2",[5])}
`},action(){return _($(this)[0])?(e.portal.dish_life_infuser.count++,e.portal.dish_life_infuser.on++,!0):!1},flair:t("portal_dish_life_infuser_flair")}},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(a,r){return r?+a.toFixed(r):Math.floor(a)}},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 sr(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 _($(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(a){return m("purifier",a,85e6,St(1.15),"portal")},Supply(a){return e.portal.purifier&&e.portal.purifier.count===0?100:m("purifier",a,4200,St(1.2),"portal")}},powered(){return N(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 _($(this)[0])?(T("purifier","portal"),z($(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(a){return m("port",a,135e6,St(1.2),"portal")},Supply(a){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:m("port",a,6250,St(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(a){let r=1e4,i=a?e.portal?.base_camp?.on??0:Ri.base_camp;return i>0&&(r*=1+i*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return _($(this)[0])?(T("port","portal"),z($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},kt()),!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(a){return m("base_camp",a,425e6,St(1.2),"portal")},Supply(a){return m("base_camp",a,5e4,St(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 _($(this)[0])?(T("base_camp","portal"),z($(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"]),kt()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(a){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||a?`
${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(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?sr(10):0},Money(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(a){let r=10,i=(a?.count??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&&_($(this)[0])?(T("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,kt()),!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(a){let r=(a||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return r===1?5e7:r===0?4e7:0}},effect(a){let r=(a?.count??0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return r===1?t("portal_sphinx_effect2"):r===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(_($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),kt(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,kt(),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 _($(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&&(pe(),kt(),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 _($(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:{}},Gl(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(kt(),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(a){return m("mechbay",a,1e8,1.2,"portal")},Supply(a){return m("mechbay",a,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||(ir("mTabCivic"),ie("portal-mechbay"))},effect(){let a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,r=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",[a,r])}
`},action(){return _($(this)[0])?(T("mechbay","portal"),z($(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"]),zr(),Te()),!0):!1},postPower(){Vc()}},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 a=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,r=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(h=>`${t(`portal_spire_status_${h}`)}`).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}%`:"0%",n=`
${t("portal_spire_effect",[a])}
${t("portal_spire_type",[r])}
${i}
${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",o=`
${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)}`])}
`,l="???",u="???";if(e.stats.spire){let h=Dl(c),p=$(this)[0].mscan();p>0&&(l=t(`portal_mech_weapon_${h.w}`)),p>=5&&(u=t(`portal_mech_weapon_${h.r}`))}let d=`
${o}
${t("portal_spire_mob_weak",[`${l}`])}
${t("portal_spire_mob_resist",[`${u}`])}
`;return`
${n}
${d}
`},mscan(){let a=0;return Object.keys(e.stats.spire).forEach(function(r){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(r)&&e.stats.spire[r].hasOwnProperty(i)&&e.stats.spire[r][i]>a&&(a=e.stats.spire[r][i])}),a},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(a){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||a?`
${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(a){return a?a+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?sr(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?sr(25):0},Money(a){return a?a+(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(a){return a?a+(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(a){return a?a+(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(a){let r=(a?.count??0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(r>=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-r;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&&_($(this)[0])?(T("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,kt()),!0):!1}}}};function St(a){let r=e.portal.hasOwnProperty("spire")&&e.blood.spire?a-(e.portal.spire.count-1)/2500:a;return r>=1.01?r:1.01}var Ke=function(){var a;return function(r){return a&&!r||(a=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(a-=12)})),a}}();function fa(a,r){let i=Pa("gate",0,r);return Math.round(a/(i.supress>.01?i.supress:.01))}function ls(a){let r=Math.round(650/Pt(1,"hellArmy")),i=a?e.portal?.gun_emplacement?.on??0:G.gun_emplacement;return i&&(r-=i*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function us(){return $t}function kt(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let a=$("#portal");A(a),a.append($(`

${t("tab_portal")}

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

${s}

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

${s}

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

${s}

${n}
`);B(r,function(){return typeof $t[r].info.desc=="string"?$t[r].info.desc:$t[r].info.desc()},{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),r==="prtl_fortress"&&ts(a,!0),Object.keys($t[r]).forEach(function(c){if(c!=="info"&&Vt($t,r,c)){let o=$t[r][c];Ut(o,"portal",c)}})}})}function Hc(a,r){return Vt($t,a,r)}function Qr(a){switch(a){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 r=e.portal.fortress.threat;return r<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:r<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:r>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:r>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:r>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let r=Math.round(Bt("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[r])}}}function ts(a,r){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=r?"fort":"gFort",s=r?$(`
`):$("#gFort");r?a.append(s):(s.length>0?A(s):(s=$(`
`),a.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 o=$(`${t("fortress_spotted")} {{ f.threat }}`);n.append(o);let l=$('{{ f.threat | threat }}');n.append(l);let u=$("
");s.append(u),u.append($(`${t("fortress_wall")} {{ f.walls }}%`));let d=$("
");s.append(d),d.append($(`${t("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${t("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${t("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));var h=$('
');d.append(h),h.append($(`${t("civics_garrison")}: `));let p=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");h.append($(`${p} / {{ g.max | s_max }} | `)),h.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),h.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let f=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',g=$("
");d.append(g),g.append($(`${t("fortress_patrol_reports")}`)),g.append($(`${t("fortress_surv_reports")}`)),g.append($(`${t("fortress_nocrew")}`)),r&&s.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
`)),C({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Qr("hostiles")},threatLevel(){return Qr("threatLevel")},aNext(){let w=V();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,C({el:"#garrison"},"update"))},aLast(){let w=V(),v=e.portal.fortress.patrols*e.portal.fortress.patrol_size;G.soul_forge&&(v+=ls()),e.portal.hasOwnProperty("guard_post")&&(v+=F(e.portal.guard_post.on)),e.portal.fortress.garrison>v&&(e.portal.fortress.garrison-=w,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=w,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let w=V();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=w,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let w=e.portal.fortress.walls;return w>=75?"has-text-success":w<=25?"has-text-danger":"has-text-warning"},threaten(){let w=e.portal.fortress.threat;return w<1e3?"has-text-success":w>=2e3?"has-text-danger":"has-text-warning"},hire(){let w=V(),v=!0;for(;v&&w>0;){let k=zi();e.civic.garrison.workers=k?(e.resource.Money.amount-=k,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,C({el:"#garrison"},"update")):v=!1,w--}},hireLabel(){return Qr("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||$i()}},filters:{defensive(w){return Ll(w)},patrolling(w){let v=w-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(G.soul_forge){let k=ls();k<=v&&(v-=k)}return e.portal.hasOwnProperty("guard_post")&&(v-=F(e.portal.guard_post.on)),v},threat(w){return w<1e3?t("fortress_threat_level1"):w<1500?t("fortress_threat_level2"):w>=5e3?t("fortress_threat_level6"):w>=3e3?t("fortress_threat_level5"):w>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(w,v){return w===0?lt(-1):lt((100-v)/(w*4))},stationed(){return gt()},s_max(w){return gt(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(w){B(`hf${i}${w}`,function(){switch(w){case"hostiles":return Qr("hostiles");case"threatLevel":return Qr("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 Qr("hireLabel")}},{elm:`#${i} span.${w}`})}),B(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ll(a){let r=a-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(G.soul_forge){let n=ls();n<=r&&(r-=n)}e.portal.hasOwnProperty("guard_post")&&(r-=F(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>r&&(i=r)),G.war_droid){let n=G.war_droid-e.portal.fortress.patrols>0?G.war_droid-e.portal.fortress.patrols:0;r+=e.tech.hdroid?F(n*2):F(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(Pt(r,"hellArmy",i))+(G.turret?G.turret*s:0)}function Pa(a,r,i){switch(a){case"ruins":{let s=i?e.portal?.guard_post?.on??0:G.guard_post,n=r||F(s),c=(i?e.portal?.arcology?.on??0:G.arcology)*75,o=Pt(n,"hellArmy",0);e.race.holy&&(o*=1+b.holy.vars()[1]/100);let l=X("unicorn");l>0&&(o*=1+b.holy.vars(1)[1]/100*l);let u=(o+c)/5e3;return{supress:u>1?1:u,rating:o+c}}case"gate":{let s=Pa("ruins",r,i),n=(i?e.portal?.gate_turret?.on??0:G.gate_turret)*100;e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=X("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let o=(s.rating+n)/7500;return{supress:o>1?1:o,rating:s.rating+n}}default:return 0}}var jt={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 Ft(a,r){let i=9999,s=1e7;switch(a){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=r?n*2.5:n,i=r?20:1}break;case"medium":s=r?45e4:18e4,i=r?100:4;break;case"large":s=r?925e3:375e3,i=r?500:20;break;case"titan":s=r?15e5:75e4,i=r?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=r?n*2.5:n,i=1}break}return{s:i,c:s}}function Dl(a){let r="laser",i="laser";return Object.keys(jt[a].weapon).forEach(function(s){jt[a].weapon[s]>jt[a].weapon[r]&&(r=s),jt[a].weapon[s]');a.append(r);let i=$(`
${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);r.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])})`:"";r.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}
`),r.append("
{{ b.size | desc }}
");let n=$('
');r.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(d,h){c+=`${t(`portal_mech_size_${d}`)}`}),n.append(` + `),p+="",r.append(p),C({el:"#celestialLab",data:{p:h,w:i},methods:{pEdit(){h.pts=cs(h,a?i:!1)},setPlanet(){if(cs(h)>=0){Object.keys(h.geology).forEach(function(w){h.geology[w]===0?delete h.geology[w]:h.geology[w]/=100}),e.custom.hasOwnProperty("planet")||(e.custom.planet={});let f=ue();e.custom.planet.hasOwnProperty(f)||(e.custom.planet[f]={s:!1});let g="s";e.custom.planet[f][g]=Be(h),delete e.custom.planet[f][g].pts,$c(h)}},reset(){h.traitlist=[],Object.keys(h.geology).forEach(function(f){h.geology[f]=0}),h.pts=cs(h,a?i:!1)},less(f){h.geology[f]-=V(),h.geology[f]<-20&&(h.geology[f]=-20)},more(f){h.geology[f]+=V();let g=30;e.stats.achieve.whitehole&&(g+=e.stats.achieve.whitehole.l*5),h.biome==="eden"&&(g+=5),h.geology[f]>g&&(h.geology[f]=g)}},filters:{res(f){return h.geology[f]}}})}function cs(a,r){let i=(a.biome==="eden"?0:10)+(e.stats.achieve.lamentis?e.stats.achieve.lamentis.l*10:0);e.race.truepath&&(i*=2),i-=a.traitlist.length**3;let s=0;return Object.keys(a.geology).forEach(function(n){a.geology[n]!==0&&(i-=a.geology[n],s++)}),s>3&&(i-=(s-3)**2),i}function Qt(a){return a?e.interstellar?.s_gate?.count?!!e.interstellar.s_gate.on:!0:!!G.s_gate}var $t={prtl_fortress:{info:{name:t("portal_fortress_name"),desc:t("portal_fortress_desc"),repair(){let a=200;return G.repair_droid&&(a*=.95**G.repair_droid),Math.round(a)}},turret:{id:"portal-turret",title(){let a=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return t(a)},desc(){let a=e.tech.turret?e.tech.turret>=2?"portal_turret_title3":"portal_turret_title2":"portal_turret_title1";return`
${t(a)}
${t("requires_power")}
`},reqs:{portal:2},cost:{Money(a){return m("turret",a,35e4,1.28,"portal")},Copper(a){return m("turret",a,5e4,1.28,"portal")},Adamantite(a){return m("turret",a,8e3,1.28,"portal")},Elerium(a){return m("turret",a,15,1.28,"portal")},Nano_Tube(a){return m("turret",a,28e3,1.28,"portal")}},powered(){return N(e.tech.turret?4+e.tech.turret:4)},postPower(a){G.turret=e.portal.turret.on,C({el:"#fort"},"update")},effect(){let a=e.tech.turret?e.tech.turret>=2?70:50:35,r=$(this)[0].powered();return`
${t("portal_turret_effect",[a])}
${t("minus_power",[r])}
`},action(){return _($(this)[0])?(T("turret","portal"),z($(this)[0])&&(G.turret++,C({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(a){return m("carport",a,25e4,1.3,"portal")},Cement(a){return m("carport",a,18e3,1.3,"portal")},Oil(a){return m("carport",a,6500,1.3,"portal")},Plywood(a){return m("carport",a,8500,1.3,"portal")}},repair(){let a=180;return G.repair_droid&&(a*=.92**G.repair_droid),Math.round(a)},effect(){return`${t("portal_carport_effect",[1])}`},action(){return _($(this)[0])?(T("carport","portal"),e.civic.hell_surveyor.display=!0,e.civic.hell_surveyor.max+=F(1),e.resource.Infernite.display=!0,e.tech.infernite||(e.tech.infernite=1,le()),!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(a){return m("war_droid",a,495e3,1.26,"portal")},Neutronium(a){return m("war_droid",a,1250,1.26,"portal")},Elerium(a){return m("war_droid",a,18,1.26,"portal")},Stanene(a){return m("war_droid",a,37500,1.26,"portal")},Soul_Gem(a){return m("war_droid",a,1,1.26,"portal")}},powered(){return N(2)},effect(){return`
${t("portal_war_droid_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("war_droid","portal"),z($(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(a){return m("repair_droid",a,444e3,1.26,"portal")},Iron(a){return m("repair_droid",a,88e3,1.26,"portal")},Iridium(a){return m("repair_droid",a,17616,1.26,"portal")},Infernite(a){return m("repair_droid",a,666,1.26,"portal")},Soul_Gem(a){return m("repair_droid",a,1,1.15,"portal")}},powered(){return N(3)},effect(){return`
${t("portal_repair_droid_effect",[5])}
${t("portal_repair_droid_effect2",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("repair_droid","portal"),z($(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 N(5)},cost:{Money(a){return m("war_drone",a,65e4,1.28,"portal")},Alloy(a){return m("war_drone",a,6e4,1.28,"portal")},Graphene(a){return m("war_drone",a,1e5,1.28,"portal")},Elerium(a){return m("war_drone",a,25,1.28,"portal")},Soul_Gem(a){return m("war_drone",a,1,1.28,"portal")}},effect(){return`
${t("portal_war_drone_effect")}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("war_drone","portal"),z($(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 N(3)},cost:{Money(a){return m("sensor_drone",a,5e5,1.25,"portal")},Polymer(a){return m("sensor_drone",a,25e3,1.25,"portal")},Adamantite(a){return m("sensor_drone",a,12500,1.25,"portal")},Infernite(a){return m("sensor_drone",a,100,1.25,"portal")}},effect(){let a=e.tech.infernite>=4?e.tech.infernite>=6?50:20:10,r=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",[r])}
${i}`:"";return`
${t("portal_sensor_drone_effect",[a])}
${s}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("sensor_drone","portal"),z($(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 N(3)},cost:{Money(a){return m("attractor",a,35e4,1.25,"portal")},Aluminium(a){return m("attractor",a,175e3,1.25,"portal")},Stanene(a){return m("attractor",a,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 _($(this)[0])?(T("attractor","portal"),z($(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 _($(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/Pt(1,"hellArmy"))},Cement(){return 1e7},Adamantite(){return 125e4},Elerium(){return 2400},Stanene(){return 9e5}},effect:t("portal_assault_forge_effect"),action(){return _($(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 N(30)},postPower(a){C({el:"#fort"},"update")},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e6:0},Graphene(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?15e5:0},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?25e3:0},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)<1?1e5:0}},effect(a){let r=`
${t("portal_soul_forge_effect",[e.resource.Soul_Gem.name])}
`;if((a?.count??0)+(e.portal.hasOwnProperty("soul_forge")?e.portal.soul_forge.count:0)>=1){let n=e.tech.hell_pit>=6?75e4:1e6,c=a?e.portal.soul_attractor.on:G.soul_attractor;e.tech.hell_pit>=7&&c>0&&(n*=.97**c),r=r+`
${t("portal_soul_forge_effect2",[e.portal.soul_forge?e.portal.soul_forge.kills.toLocaleString():0,Math.round(n).toLocaleString()])}
`}let s=ls(a);return`${r}
${t("portal_soul_forge_soldiers",[s])}, ${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])&&e.portal.soul_forge.count<1?(T("soul_forge","portal"),z($(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 N(3)},cost:{Money(a){return m("gun_emplacement",a,4e6,1.25,"portal")},Coal(a){return m("gun_emplacement",a,25e4,1.25,"portal")},Steel(a){return m("gun_emplacement",a,12e5,1.25,"portal")},Wrought_Iron(a){return m("gun_emplacement",a,2e5,1.25,"portal")}},effect(){let a=e.tech.hell_gun>=2?2:1,r=e.tech.hell_gun>=2?35:20,i=e.tech.hell_gun>=2?75:40;return`
${t("portal_gun_emplacement_effect",[a])}
${t("portal_gun_emplacement_effect2",[r,i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("gun_emplacement","portal"),z($(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 N(4)},cost:{Money(a){return m("soul_attractor",a,12e6,1.25,"portal")},Stone(a){return m("soul_attractor",a,23e6,1.25,"portal")},Nano_Tube(a){return m("soul_attractor",a,314159,1.25,"portal")},Vitreloy(a){return m("soul_attractor",a,1618,1.25,"portal")},Aerogel(a){return m("soul_attractor",a,18e4,1.25,"portal")}},effect(){let a=e.tech.hell_pit>=7?`
${t("portal_soul_attractor_effect2",[3])}
`:"",r=e.blood.attract?e.blood.attract*5:0;return`
${t("portal_soul_attractor_effect",[40+r,120+r])}
${a}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("soul_attractor","portal"),z($(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 N(125)},queue_complete(){return 40-e.portal.soul_capacitor.count},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,75e7,1.01,"portal")},Crystal(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,125e4,1.01,"portal")},Adamantite(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,65e5,1.01,"portal")},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,1e4,1.01,"portal")},Stanene(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,25e5,1.01,"portal")},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,1e6,1.01,"portal")},Soul_Gem(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,3,1.01,"portal")},Mythril(a){return(a||0)+(e.portal.hasOwnProperty("soul_capacitor")?e.portal.soul_capacitor.count:0)>=40?0:m("soul_capacitor",a,125e4,1.01,"portal")}},effect(){let a=25e5,r=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",[r.toLocaleString()])}
`,s+=`
${t("portal_soul_capacitor_effect3",[a.toLocaleString()])}
`,s+=`
${t("minus_power",[$(this)[0].powered()])}
`,s},action(){return e.portal.soul_capacitor.count<40&&_($(this)[0])?(e.portal.soul_capacitor.count++,z($(this)[0]),!0):!1},postPower(){ji($(this)[0],"portal","soul_capacitor")}},absorption_chamber:{id:"portal-absorption_chamber",title:t("portal_absorption_chamber_title"),desc(a){return!e.interstellar.hasOwnProperty("absorption_chamber")||e.portal.absorption_chamber.count<100||a?`
${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(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e6:0},Alloy(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e4:0},Neutronium(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?125e3:0},Elerium(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?1e3:0},Orichalcum(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?25e4:0},Nanoweave(a){return(a||0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0)<100?75e3:0}},effect(a){let r=(a?.count??0)+(e.portal.hasOwnProperty("absorption_chamber")?e.portal.absorption_chamber.count:0);if(r<100){let i=100-r;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",[ke("descend").artifact])}
`;{let i=os();return`
${t("portal_absorption_chamber_effect",[1e8.toLocaleString()])}
${i}
`}}},action(){if(_($(this)[0])){if(e.portal.absorption_chamber.count<100)return T("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?mi():br(),!0}return!1}}},prtl_ruins:{info:{name:t("portal_ruins_name"),desc:t("portal_ruins_desc"),support:"guard_post",prop(){let a=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return a=a+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,a},filter(a,r){let i=Pa("ruins");switch(r){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 _($(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(a){return m("guard_post",a,8e6,1.06,"portal")},Lumber(a){return m("guard_post",a,65e5,1.06,"portal")},Sheet_Metal(a){return m("guard_post",a,3e5,1.06,"portal")}},powered(){return N(5)},support(){return 1},effect(){let a=e.race.holy?1+b.holy.vars()[1]/100:1,r=X("unicorn");r>0&&(a*=1+b.holy.vars(1)[1]/100*r);let i=Math.round(a*Pt(F(1),"hellArmy",0));return`
${t("portal_guard_post_effect1",[i])}
${t("portal_guard_post_effect2",[F(1),$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("guard_post","portal"),e.portal.guard_post.on++,!0):!1},postPower(){C({el:"#srprtl_ruins"},"update"),C({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(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===0?100:0},Money(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?25e7:0},Adamantite(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?125e5:0},Orichalcum(a){return(a||0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)===1?3e7:0}},effect(a){return(a?.count??0)+(e.portal.hasOwnProperty("vault")?e.portal.vault.count:0)<1?t("portal_vault_effect",[100]):t("portal_vault_effect2")},action(){return e.portal.vault.count<2&&_($(this)[0])?(T("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"])),!0):!1},post(){e.portal.vault.count===2&&(le(),kt(),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(a){return m("archaeology",a,1e8,1.25,"portal")},Titanium(a){return m("archaeology",a,375e4,1.25,"portal")},Mythril(a){return m("archaeology",a,125e4,1.25,"portal")}},powered(){return N(8)},effect(){return`
${t("portal_archaeology_effect",[F(2)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){if(_($(this)[0])){if(T("archaeology","portal"),e.civic.archaeologist.display=!0,z($(this)[0])){let a=F(2);e.civic.archaeologist.max+=a;let r=Math.min(a,e.civic[e.civic.d_job].workers);e.civic[e.civic.d_job].workers-=r,e.civic.archaeologist.workers+=r}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(a){return m("arcology",a,18e7,1.22,"portal")},Graphene(a){return m("arcology",a,75e5,1.22,"portal")},Bolognium(a){return m("arcology",a,28e5,1.22,"portal")},Orichalcum(a){return m("arcology",a,55e5,1.22,"portal")},Nanoweave(a){return m("arcology",a,65e4,1.22,"portal")},Horseshoe(){return e.race.hooved?13:0}},powered(){return N(25)},effect(a){let r=Pa("ruins",0,a),i=E(ja()*8*r.supress);i=+i.toFixed(0);let s=Math.round(pa(a))*10,n=`
${t("plus_max_resource",[s,t("resource_Crates_name")])}
${t("plus_max_resource",[s,t("resource_Containers_name")])}
`;return`
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
${t("plus_max_citizens",[$(this)[0].citizens()])}
${t("plus_max_resource",[F(5),t("civics_garrison_soldiers")])}
${t("portal_guard_post_effect1",[75])}
${n}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("arcology","portal"),z($(this)[0])&&(e.resource[e.race.species].max+=8),e.resource.Containers.display||sa(),!0):!1},post(){C({el:"#srprtl_ruins"},"update"),le()},postPower(){C({el:"#srprtl_ruins"},"update"),C({el:"#srprtl_gate"},"update")},citizens(){let a=8;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},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(a){return m("hell_forge",a,25e7,1.15,"portal")},Coal(a){return m("hell_forge",a,165e4,1.22,"portal")},Steel(a){return m("hell_forge",a,38e5,1.22,"portal")},Iridium(a){return m("hell_forge",a,12e5,1.22,"portal")},Neutronium(a){return m("hell_forge",a,28e4,1.22,"portal")},Soul_Gem(a){return m("hell_forge",a,5,1.22,"portal")}},powered(){return N(12)},special:!0,effect(a){let i=+(75*Pa("ruins",0,a).supress).toFixed(1),s=e.tech.inferno_power?`
${t("portal_hell_forge_effect2",[10,t("portal_inferno_power_title")])}
`:"";return`
${t("portal_hell_forge_effect",[F(1)])}
${s}
${t("interstellar_stellar_forge_effect3",[3])}
${t("interstellar_stellar_forge_effect",[i])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("hell_forge","portal"),z($(this)[0])&&(e.city.smelter.cap+=3,e.city.smelter.Oil+=3,e.city.smelter.Iron+=3),!0):!1},post(){Xe()},postPower(a){gi("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(a){return m("inferno_power",a,275e6,1.16,"portal")},Neutronium(a){return m("inferno_power",a,375e4,1.18,"portal")},Stanene(a){return m("inferno_power",a,12e6,1.18,"portal")},Bolognium(a){return m("inferno_power",a,8e6,1.18,"portal")}},powered(a){let r=20,i=a?e.portal?.hell_forge?.on??0:G.hell_forge;return i&&(r+=i*10),at(-r)},fuel:{Infernite:5,Coal:100,Oil:80},effect(a){let r=$(this)[0].fuel;return`
${t("space_dwarf_reactor_effect1",[-$(this)[0].powered(a)])}
${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 _($(this)[0])?(T("inferno_power","portal"),e.portal.inferno_power.on++,!0):!1},post(){C({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(a,r){return a!==void 0?a+Object.keys(e.pillars).length=1?`
${t("portal_ancient_pillars_effect2",[Object.keys(x).length-1,r])}
`:`
${t("portal_ancient_pillars_effect",[Object.keys(x).length-1])}
`},action(){return e.tech.pillars&&e.tech.pillars===1&&e.race.universe!=="micro"&&_($(this)[0])?(e.pillars[e.race.species]=dt(),e.tech.pillars=2,E(0,!1,!0),na(!0),Ke(!0),L("resonance"),C({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 a=` - ${t("portal_ruins_security")}: {{ on | filter('army') }}`;return a=a+` - ${t("portal_ruins_supressed")}: {{ on | filter('sup') }}`,a},filter(a,r){let i=Pa("gate");switch(r){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 _($(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(a){let r=Ke();return!e.portal.hasOwnProperty("west_tower")||e.portal.west_tower.count${t("portal_west_tower")}
${t("requires_segments",[r])}
`:`
${t("portal_west_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Ke()-e.portal.west_tower.count},cost:{Money(a,r){return(a||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=Ke()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),kt()))}},east_tower:{id:"portal-east_tower",title:t("portal_east_tower"),desc(a){let r=Ke();return!e.portal.hasOwnProperty("east_tower")||e.portal.east_tower.count${t("portal_east_tower")}
${t("requires_segments",[r])}
`:`
${t("portal_east_tower")}
`},reqs:{hell_gate:2},queue_size:25,queue_complete(){return Ke()-e.portal.east_tower.count},cost:{Money(a,r){return(a||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=Ke()&&(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.harbor={count:0,on:0,support:0,s_max:0},I(t("portal_gate_open"),"info",!1,["progress","hell"]),kt()))}},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 N(6)},cost:{Money(a){return m("gate_turret",a,375e4,1.22,"portal")},Iron(a){return m("gate_turret",a,425e4,1.22,"portal")},Elerium(a){return m("gate_turret",a,275,1.22,"portal")},Stanene(a){return m("gate_turret",a,85e4,1.22,"portal")}},effect(){let a=100;e.race.holy&&(a*=1+b.holy.vars()[1]/100);let r=X("unicorn");r>0&&(a*=1+b.holy.vars(1)[1]/100*r);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(a)])}
${t("portal_gate_turret_effect2",[i,s])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("gate_turret","portal"),z($(this)[0]),!0):!1},post(){C({el:"#srprtl_gate"},"update")},postPower(){C({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 N(5)},powerBalancer(){return[{r:"Infernite",k:"lpmod"}]},cost:{Money(a){return m("infernite_mine",a,75e6,1.26,"portal")},Alloy(a){return m("infernite_mine",a,245e4,1.26,"portal")},Orichalcum(a){return m("infernite_mine",a,165e4,1.26,"portal")},Wrought_Iron(a){return m("infernite_mine",a,68e4,1.26,"portal")}},effect(a){let r=te("infernite_mine","",a);return`
${t("portal_infernite_mine_effect",[+r.toFixed(3)])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("infernite_mine","portal"),z($(this)[0]),!0):!1}}},prtl_lake:{info:{name:t("portal_lake_name"),desc:t("portal_lake_desc"),support:"harbor"},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 _($(this)[0])?(I(t("portal_lake_mission_result"),"info",!1,["progress","hell"]),!0):!1}},harbor:{id:"portal-harbor",title:t("portal_harbor_title"),desc(){return`
${t("portal_harbor_title")}
${t("requires_power")}
`},reqs:{hell_lake:3},powered(a){let i=(a?e.portal?.cooling_tower?.on??0:G.cooling_tower)||0;return+N(500*.92**i).toFixed(2)},support(){return 1},cost:{Money(a){return m("harbor",a,225e6,St(1.18),"portal")},Cement(a){return m("harbor",a,5e7,St(1.18),"portal")},Iridium(a){return m("harbor",a,75e5,St(1.18),"portal")},Infernite(a){return m("harbor",a,8e5,St(1.18),"portal")},Stanene(a){return m("harbor",a,175e5,St(1.18),"portal")}},wide:!0,res(){return["Oil","Alloy","Polymer","Iridium","Helium_3","Deuterium","Neutronium","Adamantite","Infernite","Nano_Tube","Graphene","Stanene","Bolognium","Orichalcum"]},val(a){switch(a){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(a){let r='
';for(let i of $(this)[0].res())if(e.resource[i].display){let s=Y(+E($(this)[0].val(i)).toFixed(0),1);r=r+`${t("plus_max_resource",[s,e.resource[i].name])}`}return r=r+"
",`
${t("portal_harbor_effect",[1])}
${r}
${t("minus_power",[$(this)[0].powered(a)])}
`},action(){if(_($(this)[0])){if(T("harbor","portal"),z($(this)[0]))for(let a of $(this)[0].res())e.resource[a].display&&(e.resource[a].max+=E($(this)[0].val(a)));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 N(10)},cost:{Money(a){return m("cooling_tower",a,25e7,1.2,"portal")},Polymer(a){return m("cooling_tower",a,12e6,1.2,"portal")},Orichalcum(a){return m("cooling_tower",a,85e5,1.2,"portal")},Brick(a){return m("cooling_tower",a,25e4,1.2,"portal")}},effect(){return`
${t("portal_cooling_tower_effect",[8])}
${t("minus_power",[$(this)[0].powered()])}
`},action(){return _($(this)[0])?(T("cooling_tower","portal"),z($(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(a){return m("bireme",a,19e7,1.24,"portal")},Helium_3(a){return m("bireme",a,225e3,1.24,"portal")},Adamantite(a){return m("bireme",a,15e6,1.24,"portal")},Nano_Tube(a){return m("bireme",a,18e6,1.24,"portal")},Soul_Gem(a){return m("bireme",a,10,1.24,"portal")},Scarletite(a){return m("bireme",a,125e3,1.24,"portal")}},effect(){let a=e.blood.spire&&e.blood.spire>=2?20:15;return`
${t("space_used_support",[t("lake")])}
${t("portal_bireme_effect",[a])}
${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 _($(this)[0])?(T("bireme","portal"),z($(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(a){return m("transport",a,3e8,1.22,"portal")},Oil(a){return m("transport",a,18e4,1.22,"portal")},Alloy(a){return m("transport",a,18e6,1.22,"portal")},Graphene(a){return m("transport",a,125e5,1.22,"portal")},Soul_Gem(a){return m("transport",a,5,1.22,"portal")},Scarletite(a){return m("transport",a,25e4,1.22,"portal")}},effect(a){let r=e.blood.spire&&e.blood.spire>=2?.8:.85,i=a?e.portal?.bireme?.on??0:la.bireme,s=+(r**i*100).toFixed(1);return`
${t("space_used_support",[t("lake")])}
${t("portal_transport_effect",[5])}
${t("portal_transport_effect2",[s])}
${t("galaxy_starbase_civ_crew",[$(this)[0].ship.civ()])}
`},special:!0,sAction(){e.settings.civTabs=4,e.settings.marketTabs=3,e.settings.tabLoad||(ir("mTabResource"),ie("portal-transport"))},ship:{civ(){return e.race.high_pop?b.high_pop.vars()[0]*3:3},mil(){return 0}},action(){return _($(this)[0])?(T("transport","portal"),z($(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"]),kt()),!0):!1}},oven:{id:"portal-oven",title:t("portal_oven_title"),desc(a){if(!e.portal.hasOwnProperty("oven")||e.portal.oven.count<100||a)return`
${t("portal_oven_title")}
${t("requires_segments",[100])}
`+(e.portal.hasOwnProperty("oven")&&e.portal.oven.count>=100?`
${t("requires_power")}
`:"")},reqs:{dish:2},condition(){return e.portal.oven.count<100},queue_size:10,queue_complete(){return 100-e.portal.oven.count},cost:{Money(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?19e7:0},Steel(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?2e6:0},Infernite(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?6e5:0},Bolognium(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?1e6:0},Scarletite(a){return(a||0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0)<100?15e3:0}},effect(a){let r=(a?.count??0)+(e.portal.hasOwnProperty("oven")?e.portal.oven.count:0);if(r<100){let i=100-r;return`
${t("portal_oven_effect1")}
${t("requires_segments",[i])}
`}else return $t.prtl_lake.oven_complete.effect()},action(){return e.portal.oven.count<100&&_($(this)[0])?(e.portal.oven.count++,e.portal.oven.count>=100&&(e.tech.dish=3,e.portal.oven_complete={count:1,on:0},e.portal.devilish_dish={count:0,done:0,time:0},kt(),ie()),!0):!1}},oven_complete:{id:"portal-oven_complete",title:t("portal_oven_title"),desc(){return`
${t("portal_oven_title")}
${t("requires_power")}
`},wiki:!1,reqs:{dish:3},condition(){return e.portal.oven.count>=100},queue_complete(){return 0},cost:{},effect(a){let r=$(this)[0].p_fuel();return`
${t("portal_oven_desc")}
${e.tech.dish===4?`
${t("portal_oven_desc2")}
`:""}
${t("minus_power",[$(this)[0].powered()])}, ${t("spend",[r.a,r.r])}
`},powered(){return N(3500)},p_fuel(){return{r:"Infernite",a:225}},action(){return!1}},devilish_dish:{id:"portal-devilish_dish",title:t("portal_devilish_dish_title"),desc:t("portal_devilish_dish_title"),reqs:{dish:3},queue_complete(){return 0},cost:{},effect(){let a=e.portal.devilish_dish?e.portal.devilish_dish.done:0;return`
${t("portal_devilish_dish_desc",[a.toFixed(1)])}
${t(`portal_devilish_dish_flavor${a>=100?6:Math.ceil(a/20)}`)}
`},action(){return!1}},dish_soul_steeper:{id:"portal-dish_soul_steeper",title:t("portal_dish_soul_steeper_title"),desc:t("portal_dish_soul_steeper_desc"),reqs:{dish:5},cost:{Money(a){return m("dish_soul_steeper",a,75e7,St(1.3),"portal")},Bolognium(a){return m("dish_soul_steeper",a,12e6,St(1.3),"portal")},Scarletite(a){return m("dish_soul_steeper",a,3e5,St(1.3),"portal")}},powered(){return 0},effect(){return`
${t("portal_dish_soul_steeper_effect1")}
${t("portal_dish_soul_steeper_effect2",[3+(e.race.malnutrition?1:0)+(e.race.angry?-1:0)])}
`},action(){return _($(this)[0])?(e.portal.dish_soul_steeper.count++,e.portal.dish_soul_steeper.on++,!0):!1},flair:t("portal_dish_soul_steeper_flair")},dish_life_infuser:{id:"portal-dish_life_infuser",title:t("portal_dish_life_infuser_title"),desc:t("portal_dish_life_infuser_desc"),reqs:{dish:5},cost:{Money(a){return m("dish_life_infuser",a,28e7,St(1.2),"portal")},Bolognium(a){return m("dish_life_infuser",a,8e6,St(1.2),"portal")},Orichalcum(a){return m("dish_life_infuser",a,8e6,St(1.2),"portal")},Species(a){return sr(10)}},powered(){return 0},effect(){return`
${t("portal_dish_life_infuser_effect1",[15])}
${t("portal_dish_life_infuser_effect2",[5])}
`},action(){return _($(this)[0])?(e.portal.dish_life_infuser.count++,e.portal.dish_life_infuser.on++,!0):!1},flair:t("portal_dish_life_infuser_flair")}},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(a,r){return r?+a.toFixed(r):Math.floor(a)}},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 sr(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 _($(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(a){return m("purifier",a,85e6,St(1.15),"portal")},Supply(a){return e.portal.purifier&&e.portal.purifier.count===0?100:m("purifier",a,4200,St(1.2),"portal")}},powered(){return N(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 _($(this)[0])?(T("purifier","portal"),z($(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(a){return m("port",a,135e6,St(1.2),"portal")},Supply(a){return e.portal.hasOwnProperty("port")&&e.portal.port.count===0?100:m("port",a,6250,St(1.2),"portal")}},powered(){return 0},s_type:"spire",support(){return-1},effect(a){let r=1e4,i=a?e.portal?.base_camp?.on??0:Ri.base_camp;return i>0&&(r*=1+i*.4),`
${t("portal_port_effect1",[$(this)[0].support()])}
${t("portal_port_effect2",[Math.round(r)])}
`},action(){return _($(this)[0])?(T("port","portal"),z($(this)[0]),e.tech.hell_spire===3&&(e.tech.hell_spire=4,e.portal.base_camp={count:0,on:0},kt()),!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(a){return m("base_camp",a,425e6,St(1.2),"portal")},Supply(a){return m("base_camp",a,5e4,St(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 _($(this)[0])?(T("base_camp","portal"),z($(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"]),kt()),!0):!1}},bridge:{id:"portal-bridge",title:t("portal_bridge_title"),desc(a){return!e.portal.hasOwnProperty("bridge")||e.portal.bridge.count<10||a?`
${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(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?sr(10):0},Money(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?5e8:0},Supply(a){return(a||0)+(e.portal.hasOwnProperty("bridge")?e.portal.bridge.count:0)<10?1e5:0}},effect(a){let r=10,i=(a?.count??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&&_($(this)[0])?(T("bridge","portal"),e.portal.bridge.count>=10&&(e.portal.sphinx={count:0},e.tech.hell_spire=6,kt()),!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(a){let r=(a||0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return r===1?5e7:r===0?4e7:0}},effect(a){let r=(a?.count??0)+(!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2);return r===1?t("portal_sphinx_effect2"):r===2?t("portal_sphinx_effect3"):t("portal_sphinx_effect")},action(){if(_($(this)[0])){if(e.tech.hell_spire===6)return e.tech.hell_spire=7,I(t("portal_sphinx_msg"),"info",!1,["progress","hell"]),kt(),!0;if(e.tech.hell_spire===7)return e.tech.hell_spire=8,kt(),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 _($(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&&(le(),kt(),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 _($(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:{}},Gl(),I(t("portal_spire_survey_msg"),"info",!1,["progress","hell"]),!0):!1},post(){e.tech.hell_spire&&e.tech.hell_spire===9&&(kt(),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(a){return m("mechbay",a,1e8,1.2,"portal")},Supply(a){return m("mechbay",a,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||(ir("mTabCivic"),ie("portal-mechbay"))},effect(){let a=e.portal.hasOwnProperty("mechbay")?e.portal.mechbay.bay:0,r=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",[a,r])}
`},action(){return _($(this)[0])?(T("mechbay","portal"),z($(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"]),zr(),Te()),!0):!1},postPower(){Vc()}},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 a=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,r=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(h=>`${t(`portal_spire_status_${h}`)}`).join(", ")])}
`);let s=e.portal.hasOwnProperty("spire")?`${+e.portal.spire.progress.toFixed(3)}%`:"0%",n=`
${t("portal_spire_effect",[a])}
${t("portal_spire_type",[r])}
${i}
${t("portal_spire_progress",[s])}
`,c=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed",o=`
${t("portal_spire_mob",[`${t(`portal_mech_boss_${c}`)}`])}
`,l="???",u="???";if(e.stats.spire){let h=Dl(c),p=$(this)[0].mscan();p>0&&(l=t(`portal_mech_weapon_${h.w}`)),p>=5&&(u=t(`portal_mech_weapon_${h.r}`))}let d=`
${o}
${t("portal_spire_mob_weak",[`${l}`])}
${t("portal_spire_mob_resist",[`${u}`])}
`;return`
${n}
${d}
`},mscan(){let a=0;return Object.keys(e.stats.spire).forEach(function(r){let i=e.portal.hasOwnProperty("spire")?e.portal.spire.boss:"crazed";e.stats.spire.hasOwnProperty(r)&&e.stats.spire[r].hasOwnProperty(i)&&e.stats.spire[r][i]>a&&(a=e.stats.spire[r][i])}),a},wide:!0,action(){return!1}},waygate:{id:"portal-waygate",title:t("portal_waygate_title"),desc(a){return!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2||a?`
${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(a){return a?a+(e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0)<10?sr(25):0:!e.portal.hasOwnProperty("waygate")||e.tech.waygate&&e.tech.waygate<2?sr(25):0},Money(a){return a?a+(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(a){return a?a+(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(a){return a?a+(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(a){let r=(a?.count??0)+(e.tech.waygate&&e.tech.waygate>=2?10:e.portal.hasOwnProperty("waygate")?e.portal.waygate.count:0);if(r>=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-r;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&&_($(this)[0])?(T("waygate","portal"),e.portal.waygate.count>=10&&(e.tech.waygate=2,e.portal.waygate.count=1,kt(),le()),!0):!1}}}};function St(a){let r=e.portal.hasOwnProperty("spire")&&e.blood.spire?a-(e.portal.spire.count-1)/2500:a;return r>=1.01?r:1.01}var Ke=function(){var a;return function(r){return a&&!r||(a=1e3,e.hasOwnProperty("pillars")&&Object.keys(e.pillars).forEach(function(i){e.pillars[i]&&(a-=12)})),a}}();function fa(a,r){let i=Pa("gate",0,r);return Math.round(a/(i.supress>.01?i.supress:.01))}function ls(a){let r=Math.round(650/Pt(1,"hellArmy")),i=a?e.portal?.gun_emplacement?.on??0:G.gun_emplacement;return i&&(r-=i*(e.tech.hell_gun>=2?2:1),r<0&&(r=0)),r}function us(){return $t}function kt(){if(!e.settings.tabLoad&&(e.settings.civTabs!==1||e.settings.spaceTabs!==4))return;let a=$("#portal");A(a),a.append($(`

${t("tab_portal")}

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

${s}

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

${s}

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

${s}

${n}
`);B(r,function(){return typeof $t[r].info.desc=="string"?$t[r].info.desc:$t[r].info.desc()},{elm:`#${r} h3.name`,classes:"has-background-light has-text-dark"}),r==="prtl_fortress"&&ts(a,!0),Object.keys($t[r]).forEach(function(c){if(c!=="info"&&Vt($t,r,c)){let o=$t[r][c];Ut(o,"portal",c)}})}})}function Hc(a,r){return Vt($t,a,r)}function Qr(a){switch(a){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 r=e.portal.fortress.threat;return r<1e3?`${t("fortress_threat_level")} ${t("fortress_threat_level1")}`:r<1500?`${t("fortress_threat_level")} ${t("fortress_threat_level2")}`:r>=5e3?`${t("fortress_threat_level")} ${t("fortress_threat_level6")}`:r>=3e3?`${t("fortress_threat_level")} ${t("fortress_threat_level5")}`:r>=2e3?`${t("fortress_threat_level")} ${t("fortress_threat_level4")}`:`${t("fortress_threat_level")} ${t("fortress_threat_level3")}`}case"hireLabel":{let r=Math.round(Bt("m_cost")).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[r])}}}function ts(a,r){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=r?"fort":"gFort",s=r?$(`
`):$("#gFort");r?a.append(s):(s.length>0?A(s):(s=$(`
`),a.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 o=$(`${t("fortress_spotted")} {{ f.threat }}`);n.append(o);let l=$('{{ f.threat | threat }}');n.append(l);let u=$("
");s.append(u),u.append($(`${t("fortress_wall")} {{ f.walls }}%`));let d=$("
");s.append(d),d.append($(`${t("fortress_army")}`)),d.append($('«')),d.append($('{{ f.garrison | patrolling }}')),d.append($('»')),d.append($(`${t("fortress_patrol")}`)),d.append($('«')),d.append($('{{ f.patrols }}')),d.append($('»')),d.append($(`${t("fortress_patrol_size")}`)),d.append($('«')),d.append($('{{ f.patrol_size }}')),d.append($('»')),d.append($(``));var h=$('
');d.append(h),h.append($(`${t("civics_garrison")}: `));let p=e.tech.world_control&&!e.race.truepath?t("civics_garrison_peacekeepers"):t("civics_garrison_soldiers");h.append($(`${p} / {{ g.max | s_max }} | `)),h.append($(`${t("civics_garrison_crew")} {{ g.crew }} | `)),h.append($(`${t("civics_garrison_wounded")} {{ g.wounded }}`));let f=e.settings.theme==="light"?' type="is-light"':' type="is-dark"',g=$("
");d.append(g),g.append($(`${t("fortress_patrol_reports")}`)),g.append($(`${t("fortress_surv_reports")}`)),g.append($(`${t("fortress_nocrew")}`)),r&&s.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }} {{ g.progress }}%
`)),C({el:`#${i}`,data:{f:e.portal.fortress,g:e.civic.garrison,s:e.settings},methods:{defense(){return t("fortress_defense")},hostiles(){return Qr("hostiles")},threatLevel(){return Qr("threatLevel")},aNext(){let w=V();e.portal.fortress.garrisone.civic.garrison.workers&&(e.portal.fortress.garrison=e.civic.garrison.workers),e.portal.fortress.assigned=e.portal.fortress.garrison,C({el:"#garrison"},"update"))},aLast(){let w=V(),v=e.portal.fortress.patrols*e.portal.fortress.patrol_size;G.soul_forge&&(v+=ls()),e.portal.hasOwnProperty("guard_post")&&(v+=F(e.portal.guard_post.on)),e.portal.fortress.garrison>v&&(e.portal.fortress.garrison-=w,e.portal.fortress.garrison0&&(e.portal.fortress.patrols-=w,e.portal.fortress.patrols<0&&(e.portal.fortress.patrols=0))},patSizeInc(){let w=V();e.portal.fortress.patrol_size1&&(e.portal.fortress.patrol_size-=w,e.portal.fortress.patrol_size<1&&(e.portal.fortress.patrol_size=1))},wall(){let w=e.portal.fortress.walls;return w>=75?"has-text-success":w<=25?"has-text-danger":"has-text-warning"},threaten(){let w=e.portal.fortress.threat;return w<1e3?"has-text-success":w>=2e3?"has-text-danger":"has-text-warning"},hire(){let w=V(),v=!0;for(;v&&w>0;){let k=zi();e.civic.garrison.workers=k?(e.resource.Money.amount-=k,e.civic.garrison.workers++,e.civic.garrison.m_use++,e.portal.fortress.garrison++,e.portal.fortress.assigned=e.portal.fortress.garrison,C({el:"#garrison"},"update")):v=!1,w--}},hireLabel(){return Qr("hireLabel")},observation(){e.settings.civTabs=$("#mainTabs > nav ul li").length-1,e.settings.tabLoad||$i()}},filters:{defensive(w){return Ll(w)},patrolling(w){let v=w-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(G.soul_forge){let k=ls();k<=v&&(v-=k)}return e.portal.hasOwnProperty("guard_post")&&(v-=F(e.portal.guard_post.on)),v},threat(w){return w<1e3?t("fortress_threat_level1"):w<1500?t("fortress_threat_level2"):w>=5e3?t("fortress_threat_level6"):w>=3e3?t("fortress_threat_level5"):w>=2e3?t("fortress_threat_level4"):t("fortress_threat_level3")},trainTime(w,v){return w===0?lt(-1):lt((100-v)/(w*4))},stationed(){return gt()},s_max(w){return gt(!0)}}}),["hostiles","threatLevel","armyLabel","patLabel","patSizeLabel","hireLabel"].forEach(function(w){B(`hf${i}${w}`,function(){switch(w){case"hostiles":return Qr("hostiles");case"threatLevel":return Qr("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 Qr("hireLabel")}},{elm:`#${i} span.${w}`})}),B(`hf${i}observe`,function(){return t("hell_observation_tooltip")},{elm:`#${i} button.observe`})}function Ll(a){let r=a-e.portal.fortress.patrols*e.portal.fortress.patrol_size;if(G.soul_forge){let n=ls();n<=r&&(r-=n)}e.portal.hasOwnProperty("guard_post")&&(r-=F(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>r&&(i=r)),G.war_droid){let n=G.war_droid-e.portal.fortress.patrols>0?G.war_droid-e.portal.fortress.patrols:0;r+=e.tech.hdroid?F(n*2):F(n)}let s=e.tech.turret?e.tech.turret>=2?70:50:35;return Math.round(Pt(r,"hellArmy",i))+(G.turret?G.turret*s:0)}function Pa(a,r,i){switch(a){case"ruins":{let s=i?e.portal?.guard_post?.on??0:G.guard_post,n=r||F(s),c=(i?e.portal?.arcology?.on??0:G.arcology)*75,o=Pt(n,"hellArmy",0);e.race.holy&&(o*=1+b.holy.vars()[1]/100);let l=X("unicorn");l>0&&(o*=1+b.holy.vars(1)[1]/100*l);let u=(o+c)/5e3;return{supress:u>1?1:u,rating:o+c}}case"gate":{let s=Pa("ruins",r,i),n=(i?e.portal?.gate_turret?.on??0:G.gate_turret)*100;e.race.holy&&(n*=1+b.holy.vars()[1]/100);let c=X("unicorn");c>0&&(n*=1+b.holy.vars(1)[1]/100*c);let o=(s.rating+n)/7500;return{supress:o>1?1:o,rating:s.rating+n}}default:return 0}}var jt={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 Ft(a,r){let i=9999,s=1e7;switch(a){case"small":{let n=e.blood.prepared&&e.blood.prepared>=2?5e4:75e3;s=r?n*2.5:n,i=r?20:1}break;case"medium":s=r?45e4:18e4,i=r?100:4;break;case"large":s=r?925e3:375e3,i=r?500:20;break;case"titan":s=r?15e5:75e4,i=r?1500:75;break;case"collector":{let n=e.blood.prepared&&e.blood.prepared>=2?8e3:1e4;s=r?n*2.5:n,i=1}break}return{s:i,c:s}}function Dl(a){let r="laser",i="laser";return Object.keys(jt[a].weapon).forEach(function(s){jt[a].weapon[s]>jt[a].weapon[r]&&(r=s),jt[a].weapon[s]');a.append(r);let i=$(`
${t("portal_mech_assembly")} - {{ b.size | slabel }} {{ b.chassis | clabel }}
`);r.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])})`:"";r.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}
`),r.append("
{{ b.size | desc }}
");let n=$('
');r.append(n);let c="";["small","medium","large","titan","collector"].forEach(function(d,h){c+=`${t(`portal_mech_size_${d}`)}`}),n.append(`
');s.append(n);var c={template:''};C({el:"#govType",data:e.civic.govern,filters:{govern(o){return t(`govern_${o}`)},set(o){return o==="anarchy"?t("civics_set_gov"):t("civics_revolution")}},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var o=setInterval(function(){$("#modalBox").length>0&&(clearInterval(o),Ql())},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}}}),B("govLabel",function(){let o=e.tech.unify&&e.tech.unify>=2&&e.civic.govern.type==="federation"?"federation_alt":e.civic.govern.type;return o==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(o="theocracy_alt"),$(`
${eo(e.civic.govern.type)}
${Yc()[o]}
`)}),B("govTypeChange",function(){return e.civic.govern.rev>0?t("civics_change_desc",[e.civic.govern.rev]):t("civics_change_desc2")},{elm:"#govType .change"})}function eo(a){return e.race.witch_hunter&&a==="magocracy"?t("witch_hunter_magocracy"):t(`govern_${a}_desc`)}function Ql(){$("#modalBox").append($(`

${t("civics_government_type")}

`));let a=Ze(6,10);a.length>0&&$("#modalBoxTitle").append(a);let r=pt(6,14,!1);r.length>0&&$("#modalBoxTitle").append(r);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($(``))),C({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 o=X("tuskin");o>0&&(c=Math.round(c*((100-b.lawless.vars(1)[0]*o)/100)));let l=J("aristocrat",0);l&&(c=Math.round(c*(1-l/100))),e.civic.govern.rev=c+e.civic.govern.fr,n&&pe(),C({el:"#govModal"},"destroy"),$(".modal-background").click(),ie()}}}}),B("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"),$(`
${eo(n)}
${Yc()[c]}
`)},{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}function bi(){if($("#foreign").length===0&&!e.race.cataclysm&&(!e.tech.world_control||e.race.truepath)&&!e.tech.isolation){let r=$('
');r.append($(`

${t("civics_foreign")}

`)),$("#r_govern0").append(r);var a={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")}`);r.append(c);let o=$("
");o.append($(``)),o.append($(``)),o.append($(``)),c.append(o),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),C({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 yt(n)},sab(n){return n==="none"?"":t(`civics_spy_${n}`)},hate(n){return`${100-n}%`},turmoil(n){return`${n}%`}},methods:{campaign(n){ro(n)},battleAssessment(n){return On(n)},trigModal(n){this.$buefy.modal.open({parent:this,component:a});var c=setInterval(function(){$("#modalBox").length>0&&(clearInterval(c),Jl(n))},50)},spy_disabled(n){return e.civic.foreign[`gov${n}`].trn>0||ds(n)>e.resource.Money.amount},spy(n){to(n)},spyDesc(n){return Qc(n)},espDesc(){return Jc()},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){C({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return On(n)}}})},out:function(c){C({el:c.id},"destroy")}}),B(`gov${n}ts`,function(){return"{{ label() }}"},{elm:`#gov${n} .tspy`,in:function(c){C({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return Qc(n)}}})},out:function(c){C({el:c.id},"destroy")}}),B(`gov${n}s`,function(){return Jc()},{elm:`#gov${n} .sspy`});e.race.truepath&&B("garRivaldesc1",function(){return t("civics_gov_tp_rival",[yt(3),x[e.race.species].home])},{elm:"#gov3 > span"})}}function Qc(a){if(e.civic.foreign[`gov${a}`].trn>0)return t("civics_progress");let r=Y(ds(a));return t("civics_gov_spy_desc",[r])}function Jc(){return t("civics_gov_esp_desc")}function ds(a){let r=Math.round(e.civic.foreign[`gov${a}`].mil/2+e.civic.foreign[`gov${a}`].hstl/2-e.civic.foreign[`gov${a}`].unrest)+10;return r<50&&(r=50),e.race.infiltrator&&(r/=3),xr()==="scorpio"&&(r*=1-zt("scorpio")[0]/100),Math.round(r**(e.civic.foreign[`gov${a}`].spy+1))+500}function to(a){if(e.tech.spy&&e.civic.foreign[`gov${a}`].trn===0){let r=ds(a);if(e.resource.Money.amount>=r){e.resource.Money.amount-=r;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${a}`].trn=i}}}function Zc(a){let r=e.civic.foreign[`gov${a}`].eco*15384;return r*=1+e.civic.foreign[`gov${a}`].hstl*1.6/100,r*=1-e.civic.foreign[`gov${a}`].unrest*.25/100,+r.toFixed(0)}function Ua(a){return a?e.tech.world_control||e.civic.foreign[a].occ||e.civic.foreign[a].anx||e.civic.foreign[a].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 Jr(a,r){switch(a){case"influence":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="influence"}break;case"sabotage":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="sabotage"}break;case"incite":{if(r>=3)break;if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="incite"}}break}}function Jl(a){$("#modalBox").append($(`

${t("civics_espionage_actions")}

`));var r=$('
');$("#modalBox").append(r),e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&(r.append($(``)),r.append($(``)),a<3&&r.append($(``)),a<3&&e.civic.foreign[`gov${a}`].hstl<=50&&e.civic.foreign[`gov${a}`].unrest>=50&&r.append($(``)),a<3&&e.civic.foreign[`gov${a}`].spy>=3&&r.append($(``))),C({el:"#espModal",data:e.civic.foreign[`gov${a}`],methods:{influence(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Jr("influence",i),C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie())},sabotage(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Jr("sabotage",i),C({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&&(Jr("incite",i),C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie())},annex(i){if(!(i>=3)&&e.civic.foreign[`gov${a}`].hstl<=50&&e.civic.foreign[`gov${a}`].unrest>=50&&e.city.morale.current>=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].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=X("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",C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie()}},purchase(i){if(i>=3)return;let s=Zc(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=X("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",C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie()}}}}),B("GovLabel",function(i){let s=$(i.this).data("esp"),n="";if(s==="purchase"){let o=Zc(a).toLocaleString();n=t(`civics_spy_${s}_desc`,[yt(a),o])}else if(s==="annex")if(e.city.morale.current>=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].unrest)n=t(`civics_spy_${s}_desc`,[yt(a)]);else{let o=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].unrest;n=t(`civics_spy_${s}_goal`,[yt(a),o])}else n=t(`civics_spy_${s}_desc`,[yt(a)]);let c="";return(s==="influence"&&e.civic.foreign[`gov${a}`].hstl===0||s==="sabotage"&&e.civic.foreign[`gov${a}`].spy>=2&&e.civic.foreign[`gov${a}`].mil===50||s==="incite"&&e.civic.foreign[`gov${a}`].spy>=4&&e.civic.foreign[`gov${a}`].unrest===100)&&(c=`
${t("civics_spy_warning")}
`),$(`${c}
${n}
`)},{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}function Mn(a){let r=!!(e.tech.currency&&e.tech.currency>=5);if(a)return(r||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]:(r||e.race.terrifying)&&(i+=20),e.civic.govern.type==="oligarchy"&&(i+=Ee.oligarchy()[1]);let s=J("aristocrat",1);return s&&(i+=s),i}}function Cn(a,r){switch(a){case"add":{let i=r||V(),s=Mn(!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=r||V(),s=Mn(!0);e.civic.taxes.tax_rate>s&&(e.civic.taxes.tax_rate-=i,e.civic.taxes.tax_rate');a.append(r);var i=$(`

${t("civics_tax_rates")}

`);r.append(i);var s=$(''),n=$('«'),c=$('»');r.append(n),r.append(s),r.append(c),C({el:"#tax_rates",data:e.civic.taxes,filters:{tax_level(o){let l=Ze(11,14),u=pt(2,14,!1);return l.length>0&&(o===0&&!e.race.noble||o===10&&e.race.noble)?l:o===13&&u.length>0?u:`${o}%`}},methods:{add(){Cn("add")},sub(){Cn("sub")}}}),B("taxRateLabel",function(){return t("civics_tax_rates_desc")},{classes:"has-background-light has-text-dark"})}function Bt(a,r){switch(a){case"m_cost":return zi();case"m_buy":return ao(1);case"s_cost":return ds(r);case"t_spy":return to(r);case"adj_tax":return Cn(r,1);case"tax_cap":return Mn(r);case"s_influence":return Jr("influence",r);case"s_sabotage":return Jr("sabotage",r);case"s_incite":return Jr("incite",r)}}function zi(){let a=Math.round(1.24**e.civic.garrison.workers*75)-50;a>25e3&&(a=25e3),e.civic.garrison.m_use>0&&(a*=1.1**e.civic.garrison.m_use),e.race.brute&&(a*=1-b.brute.vars()[0]/100);let r=X("orc");return r>0&&(a*=1-b.brute.vars(1)[0]/100*r),e.race.inflation&&(a*=1+e.race.inflation/500),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),Math.round(a)}function ao(a){if(e.tech.mercs){let r=a||V(),i=!0;for(;i&&r>0;){let s=zi();e.civic.garrison.workers=s?(e.resource.Money.amount-=s,e.civic.garrison.workers++,e.civic.garrison.m_use++):i=!1,r--}}}function ha(a,r){A(a),e.tech.world_control&&!e.race.truepath?a.append($(`

${t("civics_garrison")}

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

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
`));var i=$('
');a.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($(`
`))),r){let k="";e.tech.isolation&&(k=Ze(8,12)),a.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${k} {{ g.progress }}%
`))}var c=$('
');a.append(c);var o=$('
');if(c.append(o),(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation){var l=$(`
${t("civics_garrison_campaign")}
`);o.append(l);var u=$('{{ g.tactic | tactics }}'),d=$('«'),h=$('»');l.append(d),l.append(u),l.append(h);var p=$(`
${t("civics_garrison_battalion")}
`);o.append(p);var f=$('{{ g.raid }}'),g=$('«'),w=$('»');p.append(g),p.append(f),p.append(w),r&&(e.race.truepath&&e.tech.rival&&c.append($(`
${yt(3)}
`)),e.tech.world_control||(c.append($(`
${yt(0)}
`)),c.append($(`
${yt(1)}
`)),c.append($(`
${yt(2)}
`))))}let v={g:e.civic.garrison,g0:e.civic.foreign.gov0,g1:e.civic.foreign.gov1,g2:e.civic.foreign.gov2};if(e.race.truepath&&(v.g3=e.civic.foreign.gov3,v.g4=e.civic.foreign.gov4),C({el:r?"#garrison":"#c_garrison",data:v,methods:{hire(){ao()},campaign(k){ro(k)},next(){e.civic.garrison.tactic<4&&e.civic.garrison.tactic++},last(){e.civic.garrison.tactic>0&&e.civic.garrison.tactic--},aNext(){let k=V();e.civic.garrison.raidgt()&&(e.civic.garrison.raid=gt()))},aLast(){let k=V();e.civic.garrison.raid>0&&(e.civic.garrison.raid-=k,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(k){switch(k){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(k){return+Pt(k,"army").toFixed(1)},hell(k){return gt()},stationed(k){let P=gt(),j=e.race.cataclysm?13:31,D=P===j&&!r?pt(2,14,!0):!1;return P===j&&D.length>0?D:P},s_max(k){return gt(!0)},wounded(k){let P=Ze(8,12);return r&&k===0&&P.length>0?P:xe("fool",2021)?gt()-k:k},trainTime(k,P){return k===0?lt(-1):lt((100-P)/(k*4))}}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach(function(k){B(r?`garrison${k}`:`cGarrison${k}`,function(){return"{{ label() }}"},{elm:`${r?"#garrison":"#c_garrison"} .${k}`,in:function(P){C({el:`#${P.id} > span`,data:{test:"val"},methods:{label(){switch(k){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",[F(e.civic.govern.type==="federation"?15:20)])}case"bat":return t("civics_garrison_army_label");case"soldier":return bn();case"crew":return t("civics_garrison_crew_desc");case"wounded":return t("civics_garrison_wounded_desc");case"hmerc":{let j=Math.round(zi()).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[j])}case"defenseRating":return t("civics_garrison_defensive_rate");case"offenseRating":return t("civics_garrison_offensive_rate")}}}})},out:function(P){C({el:P.id},"destroy")}})}),r){let k=e.race.truepath?4:3;for(let P=0;P{{ label() }}"},{elm:`#garrison .gov${P} button`,in:function(j){C({el:`#${j.id} > span`,data:{test:"val"},methods:{label(){return On(P)}}})},out:function(j){C({el:j.id},"destroy")}});e.race.truepath&&!e.tech.isolation&&B("garRivaldesc2",function(){return t("civics_gov_tp_rival",[yt(3),x[e.race.species].home])},{elm:"#garrison .gov3 > div"})}}function bn(){let a=Pt(gt(),"hunting"),r=[];if((!e.race.herbivore||e.race.carnivore)&&!e.race.artifical){let c=+(a/3).toFixed(2);r.push(c,e.resource.Food.name)}let i=+(a/10).toFixed(2);if(r.push(i,e.resource.Furs.name),e.race.evil&&!e.race.kindling_kindred&&!e.race.smoldering){let c=+(a/(e.race.soul_eater?3:5)).toFixed(2);r.push(c,e.resource.Lumber.name)}let s="civics_garrison_soldier_loot"+r.length/2,n=e.race.evil&&e.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc";return t(n)+t(s,r)}function On(a){if(e.civic.foreign[`gov${a}`].occ)return t("civics_garrison_deoccupy_desc");if(e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)return t("civics_garrison_secede_desc");if(e.civic.garrison.tactic<=1&&e.civic.foreign[`gov${a}`].spy<1||e.civic.garrison.tactic>=2&&e.civic.garrison.tactic<=3&&e.civic.foreign[`gov${a}`].spy<2||e.civic.garrison.tactic===4&&e.civic.foreign[`gov${a}`].spy<3)return t("civics_garrison_no_spy");let r=Pt(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${a}`].mil/100,e.race.banana&&(i*=2),e.city.biome==="swamp"&&(i*=he.swamp.vars()[0]),xe("fool",2021)&&(i/=1.25),rgt()?e.civic.garrison.raid=gt():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 r=e.race.claws?20:16,i=e.race.puny?3:5,s=Math.floor(K(i,r,!0))/10,n=Pt(e.civic.garrison.raid,"army")*s,c=0;switch(e.civic.garrison.tactic){case 0:c=K(0,10,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(0,2,!0));break;case 1:c=K(5,50,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(0,3,!0));break;case 2:c=K(25,100,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(1,5,!0));break;case 3:c=K(50,200,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(4,12,!0));break;case 4:c=K(100,500,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(10,25,!0));break}c=Math.floor(c*e.civic.foreign[`gov${a}`].mil/100),e.race.banana&&(c*=2),e.city.biome==="swamp"&&(c*=he.swamp.vars()[0]),e.race.mistrustful&&(e.civic.foreign[`gov${a}`].hstl+=b.mistrustful.vars()[0]),e.civic.foreign[`gov${a}`].hstl>100&&(e.civic.foreign[`gov${a}`].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 o=0;if(e.civic.garrison.raid>e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded&&(o=e.civic.garrison.raid-(e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded)),e.civic.garrison.fatigue++,n>c){let l=Math.floor(e.civic.garrison.raid/(5-e.civic.garrison.tactic));l+=o,e.city.ptrait.includes("rage")&&(l+=Fe.rage.vars()[2]),l<1&&(l=1),l>Ai()&&(l=Ai());let u=Math.floor(K(0,l,!0));e.race.frail&&(u+=b.frail.vars()[0]);let d=0;if(e.race.scales&&(d+=b.scales.vars()[0]),e.tech.armor&&(d+=e.tech.armor),e.race.high_pop&&(d+=Math.floor(K(0,d*b.high_pop.vars()[0],!0))),e.race.armored){let R=b.armored.vars()[0]/100;d+=Math.floor(u*R)}let h=X("tortoisan");if(h>0){let R=b.armored.vars(1)[0]/100*h;d+=Math.floor(u*R)}if(e.civic.garrison.raid>o&&(u-=d),u<0&&(u=0),u>e.civic.garrison.raid&&(u=e.civic.garrison.raid),e.race.instinct){let R=Math.floor(u*(b.instinct.vars()[1]/100));u-=R,o+=R}e.civic.garrison.workers-=u,e.stats.died+=u,e.civic.garrison.protest+=u,u>o?(e.civic.garrison.wounded-=o,o=0):(e.civic.garrison.wounded-=u,o-=u),e.civic.garrison.wounded+=Math.floor(K(o,e.civic.garrison.raid-u,!0));let p={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},f=a===3&&e.race.truepath?["Food","Lumber","Stone","Copper","Iron"]:["Food","Lumber","Stone"],g=a===3&&e.race.truepath?["Aluminium","Coal","Cement","Steel","Furs"]:["Copper","Iron","Aluminium","Coal"],w=a===3&&e.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];(e.race.artifical||e.race.fasting)&&f.shift(),e.race.smoldering&&f.push("Chrysotile"),e.race.terrifying&&a!==3&&w.push("Titanium"),e.tech.magic&&w.push("Crystal");let v=["Money"];switch(e.civic.garrison.tactic){case 0:{let R=["Money"].concat(f,g);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))]),e.resource.Steel.amount<25&&e.tech.smelting&&e.tech.smelting===1&&Math.floor(K(0,20,!0))===0&&v.push("Steel")}break;case 1:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 2:{let R=["Money"].concat(f,g,w),wt=g.concat(w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),v.push(wt[Math.floor(K(0,wt.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 3:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(w[Math.floor(K(0,w.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 4:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(w[Math.floor(K(0,w.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break}let k=e.race.terrifying&&a!==3?b.terrifying.vars()[0]:12,P=e.race.terrifying&&a!==3?b.terrifying.vars()[1]:32;v.forEach(function(R){switch(R){case"Money":p[R]+=Math.floor(K(100,375,!0));break;case"Food":p[R]+=Math.floor(K(40,175,!0));break;case"Lumber":case"Stone":p[R]+=Math.floor(K(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":p[R]+=Math.floor(K(35,125,!0));break;case"Coal":case"Cement":p[R]+=Math.floor(K(25,100,!0));break;case"Steel":case"Chrysotile":p[R]+=Math.floor(K(20,65,!0));break;case"Titanium":p[R]+=Math.floor(K(k,P,!0));break;case"Crystal":p[R]+=Math.floor(K(1,5,!0));break;case"Oil":p[R]+=Math.floor(K(20,50,!0));break;case"Iridium":p[R]+=Math.floor(K(2,30,!0));break;case"Alloy":case"Polymer":p[R]+=Math.floor(K(5,38,!0));break}});let j=t("civics_garrison_gained");e.resource.Money.display&&p.Money>0&&(p.Money=Xc(p.Money,a),j=j+t("civics_garrison_quant_money",[p.Money]),et("Money",p.Money)),f.concat(g,w).forEach(function(R){p[R]>0&&(e.resource[R].display||R==="Steel"||R==="Titanium")&&(p[R]=Xc(p[R],a),j=j+t("civics_garrison_quant_res",[p[R],e.resource[R].name]),et(R,p[R]),(R==="Steel"||R==="Titanium")&&(e.resource[R].display=!0))}),j=j.slice(0,-2),j=j+".",I(j,"warning",!1,["combat"]);let U=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[0]),!0));break;case 1:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[1]),!0));break;case 2:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[2]),!0));break}e.civic.garrison.workers+=U}if(U>0?I(t("civics_garrison_victorious_revive",[u,U]),"success",!1,["combat"]):I(t("civics_garrison_victorious",[u]),"success",!1,["combat"]),e.race.slaver&&e.city.slave_pen){let R=e.city.slave_pen.count*4;if(R>e.resource.Slave.amount){let wt=Math.floor(K(0,e.civic.garrison.tactic+2,!0));wt+e.resource.Slave.amount>R&&(wt=R-e.resource.Slave.amount),wt>0&&(e.resource.Slave.amount+=wt,I(t("civics_garrison_capture",[wt]),"success",!1,["combat"]))}}if(e.race.infectious){let R=0;switch(e.civic.garrison.tactic){case 0:R=Math.floor(K(0,b.infectious.vars()[0],!0));break;case 1:R=Math.floor(K(0,b.infectious.vars()[1],!0));break;case 2:R=Math.floor(K(0,b.infectious.vars()[2],!0));break;case 3:R=Math.floor(K(0,b.infectious.vars()[3],!0));break;case 4:R=Math.floor(K(0,b.infectious.vars()[4],!0));break}e.resource[e.race.species].amount+R>e.resource[e.race.species].max&&(R=e.resource[e.race.species].max-e.resource[e.race.species].amount),R>0&&(e.resource[e.race.species].amount+=R,e.civic.d_job!=="unemployed"&&(e.civic[e.civic.d_job].workers+=R),R===1?I(t("civics_garrison_soldier_infected"),"special",!1,["combat"]):I(t("civics_garrison_soldiers_infected",[R]),"special",!1,["combat"]))}let Q=F(e.civic.govern.type==="federation"?15:20);if(a<=2&&e.civic.garrison.tactic===4&&e.civic.garrison.workers>=Q){let R=!e.tech.gov_fed&&!Ua();if(e.civic.garrison.max-=Q,e.civic.garrison.workers-=Q,e.civic.foreign[`gov${a}`].occ=!0,e.civic.foreign[`gov${a}`].sab=0,e.civic.foreign[`gov${a}`].act="none",R&&pe(),e.race.banana){let wt=le();e.stats.banana.b1[wt]=!0,wt!=="m"&&wt!=="l"&&(e.stats.banana.b1.l=!0)}}}else{let l=e.civic.garrison.raid;l+=o,e.civic.garrison.tactic===0&&(l=Math.floor(l/2)),e.city.ptrait.includes("rage")&&(l+=Fe.rage.vars()[2]),l<1&&(l=1),l>Ai()&&(l=Ai());let u=Math.floor(K(1,l,!0));e.race.frail&&(u+=e.civic.garrison.tactic+b.frail.vars()[1]);let d=0;if(e.race.scales&&(d+=b.scales.vars()[1]),e.tech.armor&&(d+=e.tech.armor),e.race.high_pop&&(d+=Math.floor(K(0,Math.floor(d*b.high_pop.vars()[0]/2),!0))),e.race.armored){let f=b.armored.vars()[0]/100;d+=Math.floor(u*f)}let h=X("tortoisan");if(h>0){let f=b.armored.vars(1)[0]/100*h;d+=Math.floor(u*f)}if(e.civic.garrison.raid>o&&(u-=d),e.race.instinct){let f=Math.floor(u*(b.instinct.vars()[1]/100));u-=f,o+=f}u<1&&(u=1),u>e.civic.garrison.raid&&(u=e.civic.garrison.raid),e.civic.garrison.workers-=u,e.stats.died+=u,e.civic.garrison.protest+=u,u>o?(e.civic.garrison.wounded-=o,o=0):(e.civic.garrison.wounded-=u,o-=u),e.civic.garrison.wounded+=1+Math.floor(K(o,e.civic.garrison.raid-u,!0));let p=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[3]),!0));break;case 1:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[4]),!0));break;case 2:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[5]),!0));break}e.civic.garrison.workers+=p}p>0?I(t("civics_garrison_defeat_revive",[u,p]),"danger",!1,["combat"]):I(t("civics_garrison_defeat",[u]),"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 Ai(){let a=0,r=e.civic.garrison.raid;switch(e.civic.garrison.tactic){case 0:a=5;break;case 1:a=10;break;case 2:a=25;break;case 3:a=50;break;case 4:a=999;break}return e.race.high_pop&&(a=F(a)),r>a&&(r=a),r}function Xc(a,r){let i=Ai();e.race.high_pop&&(i=i/F(1));let s=a*Math.log(i+1);switch(e.race.invertebrate&&(s*=1-b.invertebrate.vars()[0]/100),e.race.universe==="evil"&&(s*=fe("evil")),e.race.gravity_well&&(s*=1-.75*fe("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*=he.swamp.vars()[1]),Math.floor(s*e.civic.foreign[`gov${r}`].eco/100)}function Xl(){let a=e.tech.military?e.tech.military>=5?e.tech.military-1:e.tech.military:1;if(e.tech.military&&e.tech.military>1){a-=e.tech.military>=11?2:1,e.race.sniper&&(a*=1+b.sniper.vars()[0]/100*a);let r=X("centaur");r>0&&(a*=1+b.sniper.vars(1)[0]/100*a*r),a+=e.tech.military>=11?2:1}return a}function Pt(a,r,i){if(!e.civic.hasOwnProperty("garrison"))return 1;let s=0;typeof i=="number"?s=i:a>e.civic.garrison.workers-e.civic.garrison.wounded&&(s=a-(e.civic.garrison.workers-e.civic.garrison.wounded));let n=Xl(),c=X("rhinotaur"),o=a-s/2;if(e.race.rage||c>0){let u=e.race.rage?s*b.rage.vars()[1]/100:0,d=c>0?s*b.rage.vars(1)[1]/100*c:0;o=a+u+d}let l=e.tech.military?o*n:o;if(r==="army"||r==="hellArmy"){e.race.rage&&(l*=1+b.rage.vars()[0]/100*(e.civic.garrison.wounded||0)),c>0&&(l*=1+b.rage.vars(1)[0]/100*c*(e.civic.garrison.wounded||0)),e.race.puny&&(l*=1-b.puny.vars()[0]/100),e.race.claws&&(l*=1+b.claws.vars()[0]/100);let u=X("scorpid");u>0&&(l*=1+b.claws.vars(1)[0]/100*u),e.race.chameleon&&(l*=1+b.chameleon.vars()[0]/100),e.race.cautious&&e.city.calendar.weather===0&&(l*=1-b.cautious.vars()[0]/100),e.race.apex_predator&&(l*=1+b.apex_predator.vars()[0]/100);let d=X("sharkin");d>0&&(l*=1+b.apex_predator.vars(1)[0]/100*d),e.race.swift&&(l*=1+b.swift.vars()[0]/100),e.race.fiery&&(l*=1+b.fiery.vars()[0]/100);let h=X("balorg");h>0&&(l*=1+b.fiery.vars(1)[0]/100*h),e.race.sticky&&(l*=1+b.sticky.vars()[1]/100);let p=X("pinguicula");p>0&&(l*=1+b.sticky.vars(1)[1]/100*p),e.race.pathetic&&(l*=1-b.pathetic.vars()[0]/100),e.race.tactical&&(l*=1+b.tactical.vars()[0]*e.race.tactical/100),e.tech.fanaticism&&e.tech.fanaticism>=4&&(l*=1+e.city.temple.count*.01),e.race.holy&&r==="hellArmy"&&(l*=1+b.holy.vars()[0]/100);let f=X("unicorn");f>0&&r==="hellArmy"&&(l*=1+b.holy.vars(1)[0]/100*f),e.race.banana&&r==="hellArmy"&&(l*=.8),xr()==="aries"&&(l*=1+zt("aries")[0]/100);let g=J("tactician",0);if(g&&(l*=1+g/100),e.city.ptrait.includes("rage")&&(l*=Fe.rage.vars()[0]),e.race.parasite&&(a===1?l+=2:a>1&&(l+=4)),e.tech.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("assaultTime")){let w=0;if(e.race.psychicPowers.assaultTime>0&&(w+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let v=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;w+=+(b.psychic.vars()[3]/5e4*v*e.race.psychicPowers.channel.assault).toFixed(3)}l*=1+w}}return r==="hunting"&&(e.race.unfathomable&&(l*=.66),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=3&&(l*=1+e.city.banquet.strength**.65/100)),e.race.rejuvenated&&(l*=1.05),e.civic.govern.type==="autocracy"&&(l*=1+Ee.autocracy()[1]/100),l=Math.floor(l),l*$a(a,r)}function gt(a,r){if(!e.civic.garrison)return 0;let i=a?"max":"workers",s=e.portal.fortress?e.portal.fortress.garrison:0,n=e.space.fob&&!r?e.space.fob.troops:0;return e.civic.garrison[i]-e.civic.garrison.crew-s-n}function Yl(){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 a=$('
');$("#military").append(a);var r=$('
');a.append(r),r.append($(`
${t("civics_mad_reset_desc",[i])}
`));let s=!!(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt));r.append($(`
`)),r.append($(`
`)),e.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),C({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(){vc()},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){B(`mad${n}`,function(){return"{{ label() }}"},{elm:`#mad .${n}`,in:function(c){C({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 o=ke("mad"),l=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return t("civics_mad_missiles_warning",[o.plasmid,l])}}}}})},out:function(c){C({el:`#${c.id} > span`},"destroy")}})})}}var Rr={unemployed:function(a){let r=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!a&&(r=r+" "+t("job_default",[t("job_unemployed")])),r},hunter:function(a){let r=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(r=t("job_eld_hunter_desc")),e.race.artifical?r=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"&&(r=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"&&!a&&(r=r+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),r},forager:function(a){let r=t("job_forager_desc");return e.civic.d_job==="forager"&&!a&&(r=r+" "+t("job_default",[t("job_forager")])),r},farmer:function(a){let r=+io(!0,a).toFixed(2),i=+io(!1,a).toFixed(2);a||(r=+He(r,"farmer").toFixed(2),i=+He(i,"farmer").toFixed(2));let s=e.race.high_pop&&!a?t("job_farmer_desc_hp",[r,e.resource.Food.name,F(1),i,F(1)*e.city.farm.count]):t("job_farmer_desc",[r,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!a&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(a){let r=a&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(a||(r=+He(r,"lumberjack").toFixed(2),i=+He(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;a||(s*=$a(r,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),o=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!a&&(o=o+" "+t("job_default",[t("job_reclaimer")])),o}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;a||(s*=$a(r,"lumberjack")),e.city.biome==="forest"&&(i*=he.forest.vars()[0]),e.city.biome==="savanna"&&(i*=he.savanna.vars()[2]),e.city.biome==="desert"&&(i*=he.desert.vars()[2]),e.city.biome==="swamp"&&(i*=he.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=he.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"&&!a&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(a){let r=a&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;a||(r=+He(r,"quarry_worker").toFixed(2),i=+He(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;a||(s*=$a(r,"miner")),e.city.biome==="desert"&&(s*=he.desert.vars()[0]),e.city.biome==="swamp"&&(s*=he.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"&&!a&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(a){let r=a&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;a||(r=+He(r,"crystal_miner").toFixed(2),i=+He(i,"crystal_miner").toFixed(2),s*=$a(r,"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"&&!a&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(a){let r=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(r*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!a&&(r*=b.high_pop.vars()[1]/100),a||(r=+He(r,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[x[e.race.species].home,r]);return e.civic.d_job==="scavenger"&&!a&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(a){let r=t("job_teamster_desc",[Zs()]);return e.civic.d_job==="teamster"&&!a&&(r=r+" "+t("job_default",[t("job_teamster")])),r},meditator:function(a){let r=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!a&&(r=r+" "+t("job_default",[t("job_meditator")])),r},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 a=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(a*=he.ashland.vars()[1]),a=+He(a,"cement_worker").toFixed(2);let r=+He(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$a(e.civic.cement_worker.workers,"factory"),n=r*i*s;return e.city.biome==="ashland"&&(n*=he.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,a])},banker:function(){let a=+He(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(a+=2*e.tech.stock_exchange),e.race.truthful&&(a*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(a*=1.25),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),a=+a.toFixed(0),e.race.fasting?t("job_banker_desc_fasting"):t("job_banker_desc",[a])},entertainer:function(){let a=e.tech.theatre;e.race.musical&&(a+=b.musical.vars()[0]),e.race.emotionless&&(a*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),a=+He(a,"entertainer").toFixed(2);let r=e.race.high_pop?b.high_pop.vars()[1]/100:1;return r=+He(r,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[a,r]):t("job_entertainer_desc",[+a.toFixed(2)])},priest:function(){let a="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?a=t("job_priest_desc2"):a=t("job_priest_desc"),e.tech.cleric&&(a=a+` ${t("job_priest_desc3")}`),a},professor:function(){let a=+He(1,"professor"),r=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=X("elven");return i>0&&(r+=b.studious.vars(1)[0]*i),a*=r,a*=e.race.pompous?1-b.pompous.vars()[0]/100:1,a*=$a(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(a*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(a*=.75),a=+a.toFixed(2),t("job_professor_desc",[a])},scientist:function(){let a=+He(e.civic.scientist.impact,"scientist").toFixed(2);return a*=$a(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(a*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(a*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(a*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),a=+a.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[a,+(.025*fe("magic")).toFixed(4)]):t("job_scientist_desc",[a])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[S().red])},titan_colonist(){return t("job_colonist_desc_tp",[S().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let a=(G.arcology||0)*75,r=(Pt(e.portal.guard_post.on,"hellArmy",0)+a)/5e3;r=r>1?1:r;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*r);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[x[e.race.species].home])])},crew(){return t("job_crew_desc")}};function wi(a){a||$("#civics").append($(`

${t("civics_jobs")}

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

{{ civic.${a}.name }}

{{ sjob.${a} }}
`):$(``);l.append(p)}else{let p=$(`

{{ civic.${a}.name }}

{{ civic.${a}.workers | adjust('${a}') }} / {{ civic.${a}.max | adjust('${a}') }}
`);l.append(p)}if(l.append(u),$(c?"#servants":"#jobs").append(l),a!=="crew"){var d=$(`«`),h=$(`»`);u.append(d),u.append(h)}c?C({el:`#${o}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(p){return e.civic[p].display||p==="scavenger"&&e.race.servants.force_scavenger},add(){let p=V();for(let f=0;fe.race.servants.used;f++)e.race.servants.jobs[a]++,e.race.servants.used++},sub(){let p=V();for(let f=0;f0;f++)e.race.servants.jobs[a]--,e.race.servants.used--}}}):C({el:`#${o}`,data:{civic:e.civic},methods:{showJob(p){return e.civic[p].display},add(){let p=V();for(let f=0;f0);f++)e.civic[a].workers++,e.civic[e.civic.d_job].workers--,e.civic[a].assigned=e.civic[a].workers},sub(){let p=V();for(let f=0;f0;f++)e.civic[a].workers--,e.civic[e.civic.d_job].workers++,e.civic[a].assigned=e.civic[a].workers},level(p){return e.civic[p].workers===0?"count has-text-danger":e.civic[p].workers===e.civic[p].max?"count has-text-success":e.civic[p].workers<=e.civic[p].max/3?"count has-text-caution":e.civic[p].workers<=e.civic[p].max*.66?"count has-text-warning":e.civic[p].workers0)return f}return p},adjust(p,f){return f==="titan_colonist"&&G.ai_colonist?p+F(G.ai_colonist):p}}}),B(o,function(){return Rr[a](c)},{elm:`#${o} .job_label`,classes:"has-background-light has-text-dark"})}}function eu(){if(A($("#servants")),e.race.servants&&Object.keys(e.race.servants.jobs).length>0){var a=$(`

${t("civics_servants")}

{{ s.used }} / {{ s.max }}
`);$("#servants").append(a),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(r){Ge(r,"servant")}),C({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&&!r?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"?he.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?he.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?he.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?he.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?he.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Fe.trashed.vars()[0]:1,r?i*=so(e.race.servants.jobs.farmer,"farmer"):i*=$a(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 Xe(a){if(A($(a?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let r=$(a?"#skilledServants":"#foundry"),i=a?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`

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

${i}
`);r.append(s);let n=xe("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];a||(c.push("Scarletite"),c.push("Quantium")),n&&!a&&c.push("Thermite");for(let l=0;l
');r.append(h);let p=$('
'),f;if(u==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))f=$(`

${d}

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

${d}

{{ f.${u} }} / {{ e.on | maxQuantium }}
`);else{let v=a?`{{ s.sjobs.${u} }}`:`{{ f.${u} }}`,k=a?`scraft${u}`:`craft${u}`;f=$(`

${d}

${v}
`)}h.append(f),h.append(p),r.append(h);let g=$(`«`),w=$(`»`);p.append(g),p.append(w)}}let o=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}};a?o.s=e.race.servants:o.f=e.city.foundry,C({el:a?"#skilledServants":"#foundry",data:o,methods:{add(l){let u=V(),d=-1;(l==="Scarletite"||l==="Quantium")&&(d=ps(l));for(let h=0;h0&&(d===-1||d>e.city.foundry[l]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[l]++,e.civic[e.civic.d_job].workers--;else break},sub(l){let u=V();for(let d=0;d0)e.race.servants.sjobs[l]--,e.race.servants.sused--;else break;else if(e.city.foundry[l]>0)e.city.foundry[l]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let l=a?e.race.servants.sused:e.civic.craftsman.workers,u=a?e.race.servants.smax:e.civic.craftsman.max;return l===0?"count has-text-danger":l===u?"count has-text-success":l<=u/3?"count has-text-caution":l<=u*.66?"count has-text-warning":l
"),f=e.resource[u].name,w=Zr(u,"auto").multiplier,v=e.genes.crafty?2:1,k=+e.resource[u].diff.toFixed(2),P=+(w*100).toFixed(0);p.append($(`
${t("craftsman_hover_bonus",[P.toLocaleString(),f])}
`)),p.append($(`
${t("craftsman_hover_prod",[k.toLocaleString(),f])}
`));let j=Ti();for(let D=0;D0&&(U-=b.resourceful.vars(1)[0]/100*Q);let R=+(j[u][D].a*e.city.foundry[u]*U*v/140).toFixed(2);p.append($(`
${t("craftsman_hover_cost",[R,e.resource[j[u][D].r].name])}
`))}return p},h=a?`scraft${u}`:`craft${u}`;ms(h,u,"auto",d)}}a?B("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):B("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!a&&e.race.servants.smax>0&&Xe(!0)}}var Wa={Food:5,Lumber:5,Chrysotile:5,Stone:5,Crystal:6,Furs:8,Copper:25,Iron:40,Aluminium:50,Cement:15,Coal:20,Oil:75,Uranium:550,Steel:100,Titanium:150,Alloy:350,Polymer:250,Iridium:420,Helium_3:620,Deuterium:950,Elerium:2e3,Water:2,Neutronium:1500,Adamantite:2250,Infernite:2750,Nano_Tube:750,Graphene:3e3,Stanene:3600,Bolognium:9e3,Vitreloy:10200,Orichalcum:99e3,Horseshoe:0,Nanite:0,Genes:0,Soul_Gem:0,Corrupt_Gem:0,Codex:0,Cipher:0,Demonic_Essence:0},Wt={Food:2,Lumber:2,Chrysotile:1,Stone:2,Crystal:.4,Furs:1,Copper:1,Iron:1,Aluminium:1,Cement:1,Coal:1,Oil:.5,Uranium:.12,Steel:.5,Titanium:.25,Alloy:.2,Polymer:.2,Iridium:.1,Helium_3:.1,Deuterium:.1,Elerium:.02,Water:2,Neutronium:.05,Adamantite:.05,Infernite:.01,Nano_Tube:.1,Graphene:.1,Stanene:.1,Bolognium:.12,Vitreloy:.12,Orichalcum:.05},Re={Food:4.355,Lumber:7.668,Chrysotile:15.395,Stone:20.017,Crystal:5.062,Furs:13.009,Copper:63.546,Iron:55.845,Aluminium:26.9815,Cement:20.009,Coal:12.0107,Oil:5.342,Uranium:238.0289,Steel:55.9,Titanium:47.867,Alloy:45.264,Polymer:120.054,Iridium:192.217,Helium_3:3.0026,Deuterium:2.014,Neutronium:248.74,Adamantite:178.803,Infernite:222.666,Elerium:297.115,Nano_Tube:15.083,Graphene:26.9615,Stanene:33.9615,Bolognium:75.898,Unobtainium:168.59,Vitreloy:41.08,Orichalcum:237.8,Water:18.01,Plywood:7.666,Brick:20.009,Wrought_Iron:55.845,Sheet_Metal:26.9815,Mythril:94.239,Aerogel:7.84,Nanoweave:23.71,Scarletite:188.6,Quantium:241.35},Ur={Lumber:{in:.5,out:25e3},Chrysotile:{in:.5,out:25e3},Stone:{in:.5,out:25e3},Crystal:{in:3,out:25e3},Furs:{in:3,out:25e3},Copper:{in:1.5,out:25e3},Iron:{in:1.5,out:25e3},Aluminium:{in:2.5,out:25e3},Cement:{in:3,out:25e3},Coal:{in:1.5,out:25e3},Oil:{in:2.5,out:12e3},Uranium:{in:5,out:300},Steel:{in:3,out:25e3},Titanium:{in:3,out:25e3},Alloy:{in:6,out:25e3},Polymer:{in:6,out:25e3},Iridium:{in:8,out:25e3},Helium_3:{in:4.5,out:12e3},Deuterium:{in:4,out:1e3},Neutronium:{in:15,out:1e3},Adamantite:{in:12.5,out:1e3},Infernite:{in:25,out:250},Elerium:{in:30,out:250},Nano_Tube:{in:6.5,out:1e3},Graphene:{in:5,out:1e3},Stanene:{in:4.5,out:1e3},Bolognium:{in:18,out:1e3},Vitreloy:{in:14,out:1e3},Orichalcum:{in:10,out:1e3},Plywood:{in:10,out:250},Brick:{in:10,out:250},Wrought_Iron:{in:10,out:250},Sheet_Metal:{in:10,out:250},Mythril:{in:12.5,out:250},Aerogel:{in:16.5,out:250},Nanoweave:{in:18,out:250},Scarletite:{in:35,out:250}};function Ti(a=!1){let r={Plywood:[{r:"Lumber",a:100}],Brick:e.race.flier?[{r:"Stone",a:60}]:[{r:"Cement",a:40}],Wrought_Iron:[{r:"Iron",a:80}],Sheet_Metal:[{r:"Aluminium",a:120}],Mythril:[{r:"Iridium",a:100},{r:"Alloy",a:250}],Aerogel:[{r:"Graphene",a:2500},{r:"Infernite",a:50}],Nanoweave:[{r:"Nano_Tube",a:1e3},{r:"Vitreloy",a:40}],Scarletite:[{r:"Iron",a:25e4},{r:"Adamantite",a:7500},{r:"Orichalcum",a:500}],Quantium:[{r:"Nano_Tube",a:1e3},{r:"Graphene",a:1e3},{r:"Elerium",a:25}],Thermite:[{r:"Iron",a:180},{r:"Aluminium",a:60}]};if(e.race.wasteful){let i=1+b.wasteful.vars()[0]/100;Object.keys(r).forEach(function(s){for(let n=0;n=2){let o=e.tech.foundry>=5?e.tech.foundry>=8?.08:.05:.03;a.general.add.push({name:t("city_foundry"),manual:e.city.foundry.count*o,auto:e.city.foundry.count*o})}if(e.tech.foundry>=3&&Object.keys(a).forEach(function(o){e.city.foundry[o]&&e.city.foundry[o]>1&&a[o].add.push({name:t("tech_apprentices"),manual:(e.city.foundry[o]-1)*ve(.03),auto:(e.city.foundry[o]-1)*ve(.03)})}),e.tech.foundry>=4&&e.city.sawmill&&a.Plywood.add.push({name:t("city_sawmill"),manual:e.city.sawmill.count*.02,auto:e.city.sawmill.count*.02}),e.tech.foundry>=6&&a.Brick.add.push({name:t("city_foundry"),manual:e.city.foundry.count*.02,auto:e.city.foundry.count*.02}),e.tech.foundry>=7&&(a.general.add.push({name:t("city_factory")+` (${t("tab_city5")})`,manual:G.factory*.05,auto:G.factory*.05}),e.tech.mars>=4&&a.general.add.push({name:t("city_factory")+` (${t("tab_space")})`,manual:G.red_factory*.05,auto:G.red_factory*.05}),e.interstellar.int_factory&&G.int_factory&&a.general.add.push({name:t("interstellar_int_factory_title"),manual:G.int_factory*.1,auto:G.int_factory*.1})),e.space.fabrication&&we.fabrication&&a.general.add.push({name:t("space_red_fabrication_title"),manual:we.fabrication*e.civic.colonist.workers*(n?ve(.05):ve(.02)),auto:we.fabrication*e.civic.colonist.workers*(n?ve(.05):ve(.02))}),G.stellar_forge&&(a.Mythril.add.push({name:t("interstellar_stellar_forge_title"),manual:G.stellar_forge*.05,auto:G.stellar_forge*.05}),a.general.add.push({name:t("interstellar_stellar_forge_title"),manual:0,auto:G.stellar_forge*.1})),G.hell_forge){let o=Pa("ruins");a.general.add.push({name:t("portal_hell_forge_title"),manual:0,auto:G.hell_forge*.75*o.supress}),a.Scarletite.multi.push({name:t("portal_ruins_supressed"),manual:1,auto:o.supress})}if(e.tauceti.tau_factory&&we.tau_factory&&a.general.add.push({name:t("tau_home_tau_factory"),manual:0,auto:we.tau_factory*(e.tech.isolation?2.75:.9)}),e.tech.isolation&&e.tauceti.colony&&we.colony&&a.general.add.push({name:t("tau_home_colony"),manual:we.colony*.5,auto:we.colony*.5}),we.zero_g_lab&&G.zero_g_lab||we.infectious_disease_lab&&G.infectious_disease_lab){let o=Sa("spc_enceladus");a.Quantium.multi.push({name:t("space_syndicate"),manual:1,auto:o})}if(e.tech.alien_crafting&&we.infectious_disease_lab&&G.infectious_disease_lab){let o=1+.65*Math.min(we.infectious_disease_lab,G.infectious_disease_lab);a.Quantium.multi.push({name:t("tech_infectious_disease_lab_alt"),manual:1,auto:o})}if(e.race.crafty&&a.general.add.push({name:t("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),e.race.ambidextrous&&a.general.add.push({name:t("trait_ambidextrous_name"),manual:b.ambidextrous.vars()[0]*e.race.ambidextrous/100,auto:b.ambidextrous.vars()[0]*e.race.ambidextrous/100}),e.race.rigid&&a.general.add.push({name:t("trait_rigid_name"),manual:-(b.rigid.vars()[0]/100),auto:-(b.rigid.vars()[0]/100)}),e.civic.govern.type==="socialist"&&a.general.multi.push({name:t("govern_socialist"),manual:1+Ee.socialist()[0]/100,auto:1+Ee.socialist()[0]/100}),e.race.casting&&e.race.casting.crafting){let o=1+e.race.casting.crafting/(e.race.casting.crafting+75),l=1+2*e.race.casting.crafting/(2*e.race.casting.crafting+75);a.general.multi.push({name:t("modal_pylon_casting"),manual:o,auto:l})}e.race.universe==="magic"&&a.general.multi.push({name:t("universe_magic"),manual:.8,auto:.8}),e.tech.v_train&&a.general.multi.push({name:t("tech_vocational_training"),manual:1,auto:2}),e.genes.crafty&&a.general.multi.push({name:t("tab_arpa_crispr")+" "+t("wiki_arpa_crispr_crafty"),manual:1,auto:1+(e.genes.crafty-1)*.5}),e.race.living_tool&&a.general.multi.push({name:t("trait_living_tool_name"),manual:1,auto:1+b.living_tool.vars()[1]/100}),e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=1&&a.general.multi.push({name:t("evo_challenge_orbit_decay"),manual:1,auto:1.1}),e.race.ambidextrous&&a.general.multi.push({name:t("trait_ambidextrous_name"),manual:1,auto:1+b.ambidextrous.vars()[1]*e.race.ambidextrous/100}),e.blood.artisan&&a.general.multi.push({name:t("tab_arpa_blood")+" "+t("arpa_blood_artisan_title"),manual:1,auto:1+e.blood.artisan/100});let c=An();c>0&&a.general.multi.push({name:t("faith"),manual:1,auto:1+c/(e.race.universe==="antimatter"?1.5:3)}),e.prestige.Plasmid.count>0&&a.general.multi.push({name:t("resource_Plasmid_plural_name"),manual:gs()/8+1,auto:gs()/8+1}),e.genes.challenge&&e.genes.challenge>=2&&a.general.multi.push({name:t("mastery"),manual:1+mt()/(e.race.weak_mastery?50:100),auto:1+mt()/(e.race.weak_mastery?50:100)}),e.race.gravity_well&&a.general.multi.push({name:t("evo_challenge_gravity_well"),manual:jr(1),auto:jr(1)})}else{let n=1,c={},o={};if(a.general){for(let u=0;u
`);$("#market").append(n),qi(`#market-${r}`,n,r,i,!0)}}),Wr()}else if(a==="storage"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;Aa("storage"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;if(ge.resource[r].stackable){var n=$(`
`);$("#resStorage").append(n),Pi(`#stack-${r}`,n,r,i,!0)}}),Wr()}else if(a==="ejector"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))return;Aa("ejector"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;Re[r]&&dn(r,i)})}else if(a==="supply"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))return;Aa("supply"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;Ur[r]&&pn(r,i)})}else if(a==="alchemy"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))return;Aa("alchemy"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color,s=ge.resource[r].tradable;Wt[r]&&e.race.universe==="magic"&&(e.resource[r].basic=s,hn(r,i,s))})}}function vs(a){if(e.race.species==="protoplasm"){let r=100;e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(r+=50*(e.stats.achieve.mass_extinction.l-1)),Z("RNA",a,r,1,!1),Z("DNA",a,r,1,!1)}Z("Money",a,1e3,1,!1,!1,"success"),Z(e.race.species,a,0,0,!1,!1,"warning"),Z("Slave",a,0,0,!1,!1,"warning"),Z("Mana",a,0,1,!1,!1,"warning"),Z("Energy",a,0,0,!1,!1,"warning"),Z("Sus",a,0,0,!1,!1,"warning"),Z("Knowledge",a,100,1,!1,!1,"warning"),Z("Zen",a,0,0,!1,!1,"warning"),Z("Crates",a,0,0,!1,!1,"warning"),Z("Containers",a,0,0,!1,!1,"warning"),Z("Food",a,250,1,!0,!0),Z("Lumber",a,200,1,!0,!0),Z("Chrysotile",a,200,1,!0,!0),Z("Stone",a,200,1,!0,!0),Z("Crystal",a,200,1,!0,!0),Z("Furs",a,100,1,!0,!0),Z("Copper",a,100,1,!0,!0),Z("Iron",a,100,1,!0,!0),Z("Aluminium",a,50,1,!0,!0),Z("Cement",a,100,1,!0,!0),Z("Coal",a,50,1,!0,!0),Z("Oil",a,0,1,!0,!1),Z("Uranium",a,10,1,!0,!1),Z("Steel",a,50,1,!0,!0),Z("Titanium",a,50,1,!0,!0),Z("Alloy",a,50,1,!0,!0),Z("Polymer",a,50,1,!0,!0),Z("Iridium",a,0,1,!0,!0),Z("Helium_3",a,0,1,!0,!1),Z("Water",a,0,1,!1,!1,"advanced"),Z("Deuterium",a,0,1,!1,!1,"advanced"),Z("Neutronium",a,0,1,!1,!1,"advanced"),Z("Adamantite",a,0,1,!1,!0,"advanced"),Z("Infernite",a,0,1,!1,!1,"advanced"),Z("Elerium",a,1,1,!1,!1,"advanced"),Z("Nano_Tube",a,0,1,!1,!1,"advanced"),Z("Graphene",a,0,1,!1,!0,"advanced"),Z("Stanene",a,0,1,!1,!0,"advanced"),Z("Bolognium",a,0,1,!1,!0,"advanced"),Z("Vitreloy",a,0,1,!1,!0,"advanced"),Z("Orichalcum",a,0,1,!1,!0,"advanced"),Z("Unobtainium",a,0,1,!1,!1,"advanced"),Z("Materials",a,0,1,!1,!1,"advanced"),Z("Horseshoe",a,-2,0,!1,!1,"advanced"),Z("Nanite",a,0,1,!1,!1,"advanced"),Z("Genes",a,-2,0,!1,!1,"advanced"),Z("Soul_Gem",a,-2,0,!1,!1,"advanced"),Z("Plywood",a,-1,0,!1,!1,"danger"),Z("Brick",a,-1,0,!1,!1,"danger"),Z("Wrought_Iron",a,-1,0,!1,!1,"danger"),Z("Sheet_Metal",a,-1,0,!1,!1,"danger"),Z("Mythril",a,-1,0,!1,!1,"danger"),Z("Aerogel",a,-1,0,!1,!1,"danger"),Z("Nanoweave",a,-1,0,!1,!1,"danger"),Z("Scarletite",a,-1,0,!1,!1,"danger"),Z("Quantium",a,-1,0,!1,!1,"danger"),Z("Corrupt_Gem",a,-2,0,!1,!1,"caution"),Z("Codex",a,-2,0,!1,!1,"caution"),Z("Cipher",a,0,1,!1,!1,"caution"),Z("Demonic_Essence",a,-2,0,!1,!1,"caution"),!a&&(cr("Blood_Stone","caution"),cr("Artifact","caution"),cr("Plasmid"),cr("AntiPlasmid"),cr("Phage"),cr("Dark"),cr("Harmony"),cr("AICore"))}function Wr(){e.race.species!=="protoplasm"&&(nu(),ru(),cu())}function Z(a,r,i,s,n,c,o){if(o=o||"info",e.resource[a]||(e.resource[a]={}),Kt(a),e.race.artifical&&a==="Food"&&(c=!1),r)return;e.resource[a].hasOwnProperty("display")||(e.resource[a].display=!1),e.resource[a].hasOwnProperty("value")||(e.resource[a].value=e.race.truepath?Wa[a]*2:Wa[a]),e.resource[a].hasOwnProperty("amount")||(e.resource[a].amount=0),e.resource[a].hasOwnProperty("max")||(e.resource[a].max=i),e.resource[a].hasOwnProperty("diff")||(e.resource[a].diff=0),e.resource[a].hasOwnProperty("delta")||(e.resource[a].delta=0),e.resource[a].hasOwnProperty("rate")||(e.resource[a].rate=s),a==="Mana"&&(e.resource[a].gen=0,e.resource[a].gen_d=0),e.resource[a].stackable=c,e.resource[a].crates||(e.resource[a].crates=0),e.resource[a].containers||(e.resource[a].containers=0),!e.resource[a].trade&&n&&(e.resource[a].trade=0);var l;e.resource[a].max===-1||e.resource[a].max===-2?l=$(`

{{ name | namespace }}

{{ amount | diffSize }}
`):l=$(`

{{ name | namespace }}

{{ amount | size }} / {{ max | size }}
`),c?l.append($(`+`)):(i!==-1||i===-1&&s===0&&e.race.no_craft||a==="Scarletite"||a==="Quantium")&&l.append($(""));let u=!1;if(s!==0||i===-1&&s===0&&e.race.no_craft||a==="Scarletite"||a==="Quantium")l.append($(`{{ diff | diffSize }} /s`));else if(i===-1&&!e.race.no_craft&&a!=="Scarletite"&&a!=="Quantium"){let h=$('');l.append(h);let p=[1,5];for(let f=0;f+${p[f]}`));h.append($(`+A`)),u=!0}else e.race.fasting&&a===e.race.species?l.append($(`{{ diff | diffSize }}`)):l.append($(""));$("#resources").append(l);var d={template:''};if(C({el:`#res${a}`,data:e.resource[a],filters:{size:function(h){return h&&Y(h,0)},diffSize:function(h){return a==="Horseshoe"&&!e.race.hooved&&xe("fool",2023)&&(h=5),Y(h,2)},namespace(h){return h.replace("_"," ")}},methods:{resRate(h){let p=Y(e.resource[h].diff,2);return`${h} ${p} per second`},trigModal(){this.$buefy.modal.open({parent:this,component:d});var h=setInterval(function(){$("#modalBox").length>0&&(clearInterval(h),ou(a,o))},50)},showTrigger(){return e.resource.Crates.display},craft(h,p){if(!e.race.no_craft){let f=Zr(h,"manual").multiplier,g=Ti(!0),w=Math.floor(e.resource[g[h][0].r].amount/g[h][0].a);for(let v=1;v${e.resource[g[h][w].r].name} ${v}
`}return f}}}),no(`cnt${a}`,a,"c"),u){let h=[1,5,"A"];for(let p=0;p"),w=a,v=h[p],k=+(Zr(w,"manual").multiplier*100).toFixed(0);g.append($(`
${t("manual_crafting_hover_bonus",[k.toLocaleString(),e.resource[w].name])}
`));let P=Ti(!0),j=$(`
${t("manual_crafting_hover_craft")}
`),D=0;if(typeof v!="number"){if(D=e.resource[P[w][0].r].amount/P[w][0].a,P[w].length>1)for(let Q=1;Q${Y(k/100*D,1)} ${e.resource[w].name}
`))}else{D=V()*v;let Q=Y(k/100*D,1);j.append($(`${Q} ${e.resource[w].name}`))}let U=$(`
${t("manual_crafting_hover_use")}
`);for(let Q=0;Q${Y(D*P[w][Q].a,1)} ${e.resource[P[w][Q].r].name}`)),Q+1, "));return g.append(j),g.append(U),g};ms(`inc${a}${h[p]}`,a,"manual",f)}}c&&B(`con${a}`,function(){var h=$(`
${t("resource_Crates_plural")} ${e.resource[a].crates}
`);return e.tech.steel_container&&h.append($(`
${t("resource_Containers_plural")} ${e.resource[a].containers}
`)),h}),(a!==e.race.species||e.race.fasting)&&a!=="Crates"&&a!=="Containers"&&i!==-1?no(`inc${a}`,a,"p"):i===-1&&ms(`inc${a}`,a,"auto"),$(`#res${a}`).on("mouseover",function(){$(`.res-${a}`).each(function(){e.resource[a].amount>=$(this).attr(`data-${a}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")})}),$(`#res${a}`).on("mouseout",function(){$(`.res-${a}`).each(function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")})}),typeof ge.resource>"u"&&(ge.resource={}),ge.resource[a]={color:o,tradable:n,stackable:c}}function Kt(a){if(a===e.race.species?e.resource[a].name=We("name"):e.resource[a].name=a==="Money"?"$":t(`resource_${a}_name`),xe("fool",2022))switch(a){case"Lumber":e.resource[a].name=t("resource_Stone_name");break;case"Stone":e.resource[a].name=t("resource_Lumber_name");break;case"Copper":e.resource[a].name=t("resource_Iron_name");break;case"Iron":e.resource[a].name=t("resource_Copper_name");break;case"Steel":e.resource[a].name=t("resource_Titanium_name");break;case"Titanium":e.resource[a].name=t("resource_Steel_name");break;case"Coal":e.resource[a].name=t("resource_Oil_name");break;case"Oil":e.resource[a].name=t("resource_Coal_name");break;case"Alloy":e.resource[a].name=t("resource_Polymer_name");break;case"Polymer":e.resource[a].name=t("resource_Alloy_name");break;case"Graphene":e.resource[a].name=t("resource_Stanene_name");break;case"Stanene":e.resource[a].name=t("resource_Graphene_name");break;case"Plywood":e.resource[a].name=t("resource_Brick_name");break;case"Brick":e.resource[a].name=t("resource_Plywood_name");break;case"Genes":e.resource[a].name=t("resource_Soul_Gem_name");break;case"Soul_Gem":e.resource[a].name=t("resource_Genes_name");break;case"Slave":e.resource[a].name=t("resource_Peon_name");break}if(a==="Horseshoe"&&(e.resource[a].name=xt()),e.race.artifical&&a==="Genes"&&(e.resource[a].name=t("resource_Program_name")),e.race.sappy)switch(a){case"Stone":e.resource[a].name=t("resource_Amber_name");break}else if(e.race.flier)switch(a){case"Stone":e.resource[a].name=t("resource_Clay_name");break;case"Brick":e.resource[a].name=t("resource_Mud_Brick_name");break}if(e.race.soul_eater)switch(a){case"Food":e.resource[a].name=t("resource_Souls_name");break}if(e.race.evil)switch(a){case"Lumber":e.resource[a].name=t("resource_Bones_name");break;case"Furs":e.resource[a].name=t("resource_Flesh_name");break;case"Plywood":e.resource[a].name=t("resource_Boneweave_name");break}if(e.race.artifical)switch(a){case"Food":e.resource[a].name=t("resource_Signal_name");break}if(xe("halloween").active)switch(a){case"Food":e.resource[a].name=t("resource_Candy_name");break;case"Lumber":e.resource[a].name=t("resource_Bones_name");break;case"Stone":e.resource[a].name=t("resource_RockCandy_name");break;case"Furs":e.resource[a].name=t("resource_Webs_name");break;case"Plywood":e.resource[a].name=t("resource_Boneweave_name");break;case"Brick":e.resource[a].name=t("resource_Tombstone_name");break;case"Soul_Gem":e.resource[a].name=t("resource_CandyCorn_name");break}}function cr(a,r){if($(`#res${a}`).length){let s=$(`#res${a}`);s.detach(),$("#resources").append(s);return}r=r||"special";var i=$(`
${t(`resource_${a}_name`)}{{ count | round }}
`);$("#resources").append(i),C({el:`#res${a}`,data:e.prestige[a],filters:{round(s){return+s.toFixed(3)}}}),!(a==="Artifact"||a==="Blood_Stone")&&B(`res${a}`,function(){let s=$("
");switch(a){case"Plasmid":let n=e.race.no_plasmid?Math.min(e.race.p_mutation,e.prestige.Plasmid.count):e.prestige.Plasmid.count;if(s.append($(`${t(`resource_${a}_desc`,[n,+(gs("plasmid")*100).toFixed(2)])}`)),e.genes.store&&(e.race.universe!=="antimatter"||e.genes.bleed>=3)){let u=E(1,"plasmid");u>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((u-1)*100).toFixed(2)])}`))}break;case"AntiPlasmid":s.append($(`${t(`resource_${a}_desc`,[e.prestige.AntiPlasmid.count,+(gs("antiplasmid")*100).toFixed(2)])}`));let c=E(1,"anti");e.genes.store&&(e.race.universe==="antimatter"||e.genes.bleed>=3)&&c>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((c-1)*100).toFixed(2)])}`));break;case"Phage":s.append($(`${t(e.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+e.prestige.Phage.count])}`));let o=E(1,"phage");e.genes.store&&e.genes.store>=4&&o>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((o-1)*100).toFixed(2)])}`));break;case"Dark":switch(e.race.universe){case"standard":s.append($(`${t(`resource_${a}_desc_s`,[+((fe("standard")-1)*100).toFixed(2)])}`));break;case"evil":s.append($(`${t(`resource_${a}_desc_e`,[+((fe("evil")-1)*100).toFixed(2)])}`));break;case"micro":s.append($(`${t(`resource_${a}_desc_m`,[fe("micro",!1),fe("micro",!0)])}`));break;case"heavy":let u=fe("heavy"),d=.25+.5*u,h=.2+.3*u;s.append($(`${t(`resource_${a}_desc_h`,[+(d*100).toFixed(4),+(h*100).toFixed(4)])}`));break;case"antimatter":s.append($(`${t(`resource_${a}_desc_a`,[+((fe("antimatter")-1)*100).toFixed(2)])}`));break;case"magic":s.append($(`${t(`resource_${a}_desc_mg`,[t("resource_Mana_name"),+((fe("magic")-1)*100).toFixed(2)])}`));break}break;case"Harmony":s.append($(`${t(`resource_${a}_desc`,[e.race.universe==="standard"?.1:1,Ei()])}`));break;case"AICore":let l=+((1-.99**e.prestige.AICore.count)*100).toFixed(2);s.append($(`${t(`resource_${a}_desc`,[l])}`));break}return s})}function tu(a){let r=e.tech.currency>=6?-1e6:e.tech.currency>=4?-100:-25;if(e.race.banana){let i=!1;if(Object.keys(e.resource).forEach(function(s){e.resource[s].hasOwnProperty("trade")&&e.resource[s].trade<0&&(i=s)}),i&&i!==a)return!1;r=e.tech.currency>=6?-1e6:e.tech.currency>=4?-25:-10}return!(e.resource[a].trade<=r)}function au(a){let r=e.tech.currency>=6?1e6:e.tech.currency>=4?100:25;return!(e.resource[a].trade>=r)}function qi(a,r,i,s,n){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))&&!((e.race.artifical||e.race.fasting)&&i==="Food")){if(n&&r.append($(`

{{ r.name | namespace }}

`)),e.race.no_trade||(r.append($(`${t("resource_market_buy")}`)),r.append($(`\${{ r.value | buy }}`)),r.append($(`${t("resource_market_sell")}`)),r.append($(`\${{ r.value | sell }}`))),n&&(e.race.banana&&i==="Food"||e.tech.trade&&!e.race.terrifying)){let c=$(`${t("resource_market_routes")}`);r.append(c),c.append($(`-`)),c.append($('')),c.append($(`+`)),c.append($(`${t("cancel_routes")}`)),Ii(i)}C({el:a,data:{r:e.resource[i],m:e.city.market},methods:{aSell(c){let o=Wt[c]===1?t("resource_market_unit"):t("resource_market_units"),l=iu(c),u=Wt[c];if(e.stats.achieve.hasOwnProperty("trade")){let d=e.stats.achieve.trade.l;d>5&&(d=5),u*=1-d/100}return u=+u.toFixed(3),t("resource_market_auto_sell_desc",[u,o,l])},aBuy(c){let o=Wt[c],l=J("dealmaker",0);l&&(o*=1+l/100),e.race.persuasive&&(o*=1+e.race.persuasive/100),e.race.merchant&&(o*=1+b.merchant.vars()[1]/100);let u=X("goblin");if(u>0&&(o*=1+b.merchant.vars(1)[1]/100*u),e.genes.trader){let p=mt();o*=1+p/100}if(e.stats.achieve.hasOwnProperty("trade")){let p=e.stats.achieve.trade.l;p>5&&(p=5),o*=1+p/50}e.race.truepath&&(o*=1-e.civic.foreign.gov3.hstl/101),o=+o.toFixed(3);let d=o===1?t("resource_market_unit"):t("resource_market_units"),h=su(c);return t("resource_market_auto_buy_desc",[o,d,h])},purchase(c){if(!e.race.no_trade&&!e.settings.pause){let o=e.city.market.qty,l=e.resource[c].value;e.race.arrogant&&(l*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(l*=1-b.conniving.vars()[0]/100);let u=X("imp");u>0&&(l*=1-b.conniving.vars(1)[0]/100*u);let d=Math.floor(Math.min(o,e.resource.Money.amount/l,e.resource[c].max-e.resource[c].amount));d>0&&(e.resource[c].amount+=d,e.resource.Money.amount-=Math.round(l*d),e.resource[c].value+=Number((d/Math.rand(1e3,1e4)).toFixed(2)))}},sell(c){if(!e.race.no_trade&&!e.settings.pause){let o=e.city.market.qty,l=4;e.race.merchant&&(l*=1-b.merchant.vars()[0]/100);let u=X("goblin");u>0&&(l*=1-b.merchant.vars(1)[0]/100*u),e.race.asymmetrical&&(l*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&(l*=1-b.conniving.vars()[1]/100);let d=X("imp");d>0&&(l*=1-b.conniving.vars(1)[1]/100*d);let h=e.resource[c].value/l,p=Math.floor(Math.min(o,e.resource[c].amount,(e.resource.Money.max-e.resource.Money.amount)/h));p>0&&(e.resource[c].amount-=p,e.resource.Money.amount+=Math.round(h*p),e.resource[c].value-=Number((p/Math.rand(1e3,1e4)).toFixed(2)),e.resource[c].value0&&(d+=e.resource[h].trade)}),u<=d)break}if(e.resource[c].trade>=0)if(au(c)&&e.city.market.trade0&&(o*=1-b.merchant.vars(1)[0]/100*l),e.race.asymmetrical&&(o*=1+b.asymmetrical.vars()[0]/100),Y(c*e.city.market.qty/o,0)},trade(c){if(i==="Stone"&&(c===31||c===-31)){let o=pt(3,12,!1);if(o.length>0)return o}return c<0?(c=0-c,`-${c}`):c>0?`+${c}`:0},namespace(c){return c.replace("_"," ")}}})}}function ru(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0)||($("#market").append($(`

${t("galaxy_trade")}

`)),jn())}function fs(){return[{buy:{res:"Deuterium",vol:5},sell:{res:"Helium_3",vol:25}},{buy:{res:"Neutronium",vol:2.5},sell:{res:"Copper",vol:200}},{buy:{res:"Adamantite",vol:3},sell:{res:"Iron",vol:300}},{buy:{res:"Elerium",vol:1},sell:{res:"Oil",vol:125}},{buy:{res:"Nano_Tube",vol:10},sell:{res:"Titanium",vol:20}},{buy:{res:"Graphene",vol:25},sell:{res:e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Lumber",vol:1e3}},{buy:{res:"Stanene",vol:40},sell:{res:"Aluminium",vol:800}},{buy:{res:"Bolognium",vol:.75},sell:{res:"Uranium",vol:4}},{buy:{res:"Vitreloy",vol:1},sell:{res:"Infernite",vol:1}}]}function jn(a){let r=a||$("#galaxyTrade");if(a||A($("#galaxyTrade")),e.galaxy.trade){r.append($(`
${t("galaxy_trade")}
`));let i=fs();for(let n=0;n');r.append(c),c.append($(`${e.resource[i[n].buy.res].name}`)),c.append($(`+{{ '${n}' | t_vol }}/s`)),c.append($(`${e.resource[i[n].sell.res].name}`)),c.append($(`-{{ '${n}' | s_vol }}/s`));let o=$(`${t("resource_market_routes")}`);c.append(o);let l=t("galaxy_freighter_assign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]),u=t("galaxy_freighter_unassign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]);o.append($(`-`)),o.append($(`{{ g.f${n} }}`)),o.append($(`+`)),o.append($(`${t("cancel_routes")}`))}let s=$(`
${t("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
`);s.append($(`${t("cancel_all_routes")}`)),r.append(s)}C({el:a?"#specialModal":"#galaxyTrade",data:{g:e.galaxy.trade,t:e.tech},methods:{less(i){let s=V();e.galaxy.trade[`f${i}`]>=s?(e.galaxy.trade[`f${i}`]-=s,e.galaxy.trade.cur-=s):(e.galaxy.trade.cur-=e.galaxy.trade[`f${i}`],e.galaxy.trade[`f${i}`]=0)},more(i){let s=V();e.galaxy.trade.cure.galaxy.trade.max-e.galaxy.trade.cur&&(s=e.galaxy.trade.max-e.galaxy.trade.cur),e.galaxy.trade[`f${i}`]+=s,e.galaxy.trade.cur+=s)},zero(i){if(i)e.galaxy.trade.cur-=e.galaxy.trade[`f${i}`],e.galaxy.trade[`f${i}`]=0;else{let s=fs();for(let n=0;n0&&(n*=1+b.merchant.vars(1)[1]/100*c),e.genes.trader){let o=mt();n*=1+o/100}if(e.stats.achieve.hasOwnProperty("trade")){let o=e.stats.achieve.trade.l;o>5&&(o=5),n*=1+o/50}return n=+n.toFixed(2),n},s_vol(i){let n=fs()[i].sell.vol;if(e.stats.achieve.hasOwnProperty("trade")){let c=e.stats.achieve.trade.l;c>5&&(c=5),n*=1-c/100}return n=+n.toFixed(2),n}}}),B("galacticTradeTotal",function(){let i=$('
');return Ce.hasOwnProperty("gt_route")&&Object.keys(Ce.gt_route).forEach(function(s){Ce.gt_route[s]>0&&i.append(``)}),i.append(``),i},{elm:"#galacticTradeTotal > span"})}function po(a){let r=V(),i=ys();r>e.resource[a].crates&&(r=e.resource[a].crates),r>0&&(e.resource.Crates.amount+=r,e.resource.Crates.max+=r,e.resource[a].crates-=r,e.resource[a].max-=i*r)}function ho(a){let r=V(),i=ys();r>e.resource.Crates.amount&&(r=e.resource.Crates.amount),r>0&&(e.resource.Crates.amount-=r,e.resource.Crates.max-=r,e.resource[a].crates+=r,e.resource[a].max+=i*r)}function mo(a){let r=V(),i=bs();r>e.resource[a].containers&&(r=e.resource[a].containers),r>0&&(e.resource.Containers.amount+=r,e.resource.Containers.max+=r,e.resource[a].containers-=r,e.resource[a].max-=i*r)}function fo(a){let r=V(),i=bs();r>e.resource.Containers.amount&&(r=e.resource.Containers.amount),r>0&&(e.resource.Containers.amount-=r,e.resource.Containers.max-=r,e.resource[a].containers+=r,e.resource[a].max+=i*r)}function Pi(a,r,i,s){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){if(r.append($(`

{{ name }}

`)),e.resource.Crates.display){let n=$(`${t("resource_Crates_name")}`);r.append(n),n.append($(`«`)),n.append($(``)),n.append($(`»`))}if(e.resource.Containers.display){let n=$(`${t("resource_Containers_name")}`);r.append(n),n.append($(`«`)),n.append($('')),n.append($(`»`))}C({el:a,data:e.resource[i],methods:{addCrate(n){ho(n)},subCrate(n){po(n)},addCon(n){fo(n)},subCon(n){mo(n)}},filters:{trick(n){if(i==="Stone"&&e.resource[i].crates===10&&e.resource[i].containers===31){let c=pt(4,13,!0);if(c.length>0)return c}return n},cCnt(n,c){if(c==="Food"&&!e.race.artifical||e.race.artifical&&c==="Coal"||c==="Souls"){let o=Ze(13,10);if(n===10&&o.length>0)return"1"+o}return n}}})}}function iu(a){let r=4;e.race.merchant&&(r*=1-b.merchant.vars()[0]/100);let i=X("goblin");i>0&&(r*=1-b.merchant.vars(1)[0]/100*i),e.race.asymmetrical&&(r*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&r--;let s=e.resource[a].value*Wt[a]/r;if(e.city.wharf&&(s=s*(1+e.city.wharf.count*.01)),e.space.gps&&e.space.gps.count>3&&(s=s*(1+e.space.gps.count*.01)),e.tech.railway){let n=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?.03:.02;s=s*(1+e.tech.railway*n)}if(e.race.truepath&&!e.race.lone_survivor&&(s*=1-e.civic.foreign.gov3.hstl/101),e.race.inflation&&(s*=1+e.race.inflation/500),e.race.witch_hunter&&e.resource.Sus.amount>50){let n=(e.resource.Sus.amount-50)/52;s*=1-n}return s*=te("psychic_cash"),s=+s.toFixed(1),s}function su(a){let r=e.resource[a].value;e.race.arrogant&&(r*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(r*=1-b.conniving.vars()[0]/100);let i=X("imp");i>0&&(r*=1-b.conniving.vars(1)[0]/100*i);let s=r*Wt[a];if(e.city.wharf&&(s=s*.99**e.city.wharf.count),e.space.gps&&e.space.gps.count>3&&(s=s*.99**e.space.gps.count),e.tech.railway){let n=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?.97:.98;s=s*n**e.tech.railway}if(e.race.truepath&&!e.race.lone_survivor&&(s*=1+e.civic.foreign.gov3.hstl/101),e.race.inflation&&(s*=1+e.race.inflation/300),e.race.quarantine&&(s*=1+Math.round(e.race.quarantine**3.5)),e.race.witch_hunter&&e.resource.Sus.amount>50){let n=(e.resource.Sus.amount-50)/8;s*=1+n}return s=+s.toFixed(1),s}function ms(a,r,i,s){B(`${a}`,function(){let n=$('
{{ res.name | namespace }}
'),c=$('
');n.append(c);let o=Zr(r,i),l=$("
");c.append(l),i==="auto"&&Ce.p[r]&&Object.keys(Ce.p[r]).forEach(function(p){let f=Ce.p[r][p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),l.append(``)}}),Object.keys(o.multi_bd).forEach(function(p){let f=o.multi_bd[p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),l.append(``)}});let u=$('
'),d=$(`
${t("craft_tools_multi")}
`);u.append(d);let h=0;if(Object.keys(o.add_bd).forEach(function(p){let f=o.add_bd[p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){h++;let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),u.append(``)}}),h>0&&c.append(u),Ce.p.consume&&Ce.p.consume[r]){let p=$('
'),f=0;Object.keys(Ce.p.consume[r]).forEach(function(g){let w=Ce.p.consume[r][g];if(w!=0&&!isNaN(w)){f++;let v=w>0?"success":"danger",k=g.replace(/\+.+$/,"");g=g.replace(/'/g,"\\'"),p.append(``)}}),f>0&&c.append(p)}return e.resource[r].diff<0&&e.resource[r].amount>0&&n.append(``),s&&(n.append(''),n.append(s)),n},{in:function(){C({el:"#popper > div",data:{[r]:Ce.p[r],res:e.resource[r],consume:Ce.p.consume,craft:Zr(r,i)},filters:{translate(n){let c=n[n.length-1],o=parseFloat(n.slice(0,-1)),l=o>0&&o<1||o<0&&o>-1?4:o>0&&o<10||o<0&&o>-10?3:2;o=+o.toFixed(l);let u=c==="%"?"%":"";if(o>0)return"+"+Y(o,l)+u;if(o<0)return Y(o,l)+u},fix(n){return n+"v"},counter(n){let c=-e.resource[r].diff,o=+(n/c).toFixed(0);if(o>60){let l=o%60,u=(o-l)/60;if(u>=60){let d=u%60;return`${(u-d)/60}h ${d}m`}else return`${u}m ${l}s`}else return`${o}s`},namespace(n){return n.replace("_"," ")}}})},out:function(){C({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function no(a,r,i){B(`${a}`,function(){let s=$('
{{ res.name | namespace }}
');i==="p"&&r===e.race.species&&(s=$(`
${t("starvation_resist")}
`));let n=$('
');s.append(n);let c=!1;if(Ce[i][r]&&!(e.race.species===r&&i==="p")){let l=$("
");n.append(l);let u=[r];u.push("Global");for(var o=0;o0?"success":"danger",w=h.replace(/\+.+$/,"");h=h.replace(/'/g,"\\'"),l.append(``)}})}}if(Ce[i].consume&&Ce[i].consume[r]){let l=$(`
`),u=0;Object.keys(Ce[i].consume[r]).forEach(function(d){let h=Ce[i].consume[r][d];if(h!=0&&!isNaN(h)){u++;let p=h>0?"success":"danger",f=d.replace(/\+.+$/,"");d=d.replace(/'/g,"\\'"),l.append(``)}}),u>0&&n.append(l)}if(i==="p"&&r!==e.race.species){let l=e.resource[r].diff>0?"success":"danger";s.append(``)}return s},{in:function(){C({el:"#popper > div",data:{Global:Ce[i].Global,[r]:Ce[i][r],consume:Ce[i].consume,res:e.resource[r]},filters:{translate(s){let n=s[s.length-1],c=parseFloat(s.slice(0,-1)),o=c>0&&c<1||c<0&&c>-1?4:c>0&&c<10||c<0&&c>-10?3:2,l=n==="%"?"%":"";if(c>0)return"+"+Y(c,o)+l;if(c<0)return Y(c,o)+l},fix(s){return s+"v"},counter(s){let n=e.resource[r].diff,c=0;if(n<0?(n*=-1,c=+(s/n).toFixed(0)):c=+((e.resource[r].max-s)/n).toFixed(0),c===1/0||Number.isNaN(c))return"Never";if(c>60){let o=c%60,l=(c-o)/60;if(l>=60){let u=l%60;return`${(l-u)/60}h ${u}m`}else return`${l}m ${o}s`}else return`${c}s`},direction(s){return s>=0?t("to_full"):t("to_empty")},namespace(s){return s.replace("_"," ")}}})},out:function(){C({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function nu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=e.race.no_trade?" nt":"";var r=$(`
${t("resource_market_trade_routes")} / {{ mtrade }}
`);r.append($(`${t("cancel_all_routes")}`)),$("#market").append(r),C({el:"#tradeTotal",data:e.city.market,methods:{zero(){Object.keys(e.resource).forEach(function(i){e.resource[i].trade&&(e.city.market.trade-=Math.abs(e.resource[i].trade),e.resource[i].trade=0,Ii(i))})}},filters:{tdeCnt(i){let s=Ze(17,11);return(i===100&&!e.tech.isolation&&!e.race.cataclysm||i===10&&(e.tech.isolation||e.race.cataclysm))&&s.length>0?"10"+s:i}}}),B("tradeTotalPopover",function(){let i=$('
');return Ce.hasOwnProperty("t_route")&&Object.keys(Ce.t_route).forEach(function(s){Ce.t_route[s]>0&&i.append(``)}),i.append(``),i},{elm:"#tradeTotalPopover > span"})}function cu(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){var a=$(`
${t("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${t("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
`);$("#resStorage").append(a),C({el:"#crateTotal",data:{cr:e.resource.Crates,cn:e.resource.Containers}})}}function Ii(a){$(`#market-${a} .trade .current`).removeClass("has-text-warning"),$(`#market-${a} .trade .current`).removeClass("has-text-danger"),$(`#market-${a} .trade .current`).removeClass("has-text-success"),e.resource[a].trade>0?$(`#market-${a} .trade .current`).addClass("has-text-success"):e.resource[a].trade<0?$(`#market-${a} .trade .current`).addClass("has-text-danger"):$(`#market-${a} .trade .current`).addClass("has-text-warning")}function go(){let a=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?e.resource.Chrysotile.name:e.resource.Stone.name:e.resource.Plywood?e.resource.Plywood.name:t("resource_Plywood_name"),r=e.race.kindling_kindred||e.race.smoldering?200:10;return t("resource_modal_crate_construct_desc",[r,a,ys()])}function vo(){return t("resource_modal_container_construct_desc",[125,bs()])}function qn(a,r){switch(a){case"crate":Fn(r);break;case"container":zn(r);break}}function Fn(a){let r=a||V(),i=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood",s=e.race.kindling_kindred||e.race.smoldering?200:10;r+e.resource.Crates.amount>e.resource.Crates.max&&(r=e.resource.Crates.max-e.resource.Crates.amount),e.resource[i].amount=s*r&&e.resource.Crates.amounte.resource.Containers.max&&(r=e.resource.Containers.max-e.resource.Containers.amount),e.resource.Steel.amount<125*r&&(r=Math.floor(e.resource.Steel.amount/125)),e.resource.Steel.amount>=125*r&&e.resource.Containers.amount{{ name }} - {{ amount | size }}/{{ max | size }}

'));let r=$('
');if($("#modalBox").append(r),a==="Food"&&!e.race.artifical||e.race.artifical&&a==="Coal"||a==="Souls"){let l=Ze(7,10);l.length>0&&$("#modalBoxTitle").prepend(l)}if(a==="Stone"){let l=pt(1,12,!1);l.length>0&&$("#modalBoxTitle").prepend(l)}let i=$('
');r.append(i),i.append($(`
${t("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${t("resource_modal_crate_assigned")} {{ res.crates }}
`));let s=$(``),n=$(``),c=$(``);if(i.append(s),i.append(n),i.append(c),C({el:"#modalCrates",data:{crates:e.resource.Crates,res:e.resource[a]},methods:{buildCrate(){Fn()},subCrate(l){po(l)},addCrate(l){ho(l)}}}),e.resource.Containers.display){let l=$('
');r.append(l),l.append($(`
${t("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${t("resource_modal_container_assigned")} {{ res.containers }}
`));let u=$(``),d=$(``),h=$(``);l.append(u),l.append(d),l.append(h),C({el:"#modalContainers",data:{containers:e.resource.Containers,res:e.resource[a]},methods:{buildContainer(){zn()},removeContainer(p){mo(p)},addContainer(p){fo(p)}}})}C({el:"#modalBoxTitle",data:e.resource[a],filters:{size:function(l){return Y(l,0)},diffSize:function(l){return Y(l,2)}}});function o(l,u){if(l==="modalContainers"){let d=bs();switch(u){case"assign":return t("resource_modal_container_assign_desc",[d]);case"unassign":return t("resource_modal_container_unassign_desc",[d]);case"construct":return vo()}}else{let d=ys();switch(u){case"assign":return t("resource_modal_crate_assign_desc",[d]);case"unassign":return t("resource_modal_crate_unassign_desc",[d]);case"construct":return go()}}}["modalCrates","modalContainers"].forEach(function(l){["assign","unassign","construct"].forEach(function(u){B(`${l}${u}`,o(l,u),{elm:$(`#${l} > .${u}`),attach:"#main"})})})}function yo(){e.settings.showResources||(e.settings.marketTabs=1),e.settings.showResources=!0,e.settings.showStorage=!0,ka("storage"),Te()}function bo(){e.resource.Crates.display||(I(t("city_storage_yard_msg"),"info",!1,["progress"]),e.resource.Crates.display=!0,yo())}function sa(){e.resource.Containers.display||(I(t("city_warehouse_msg"),"info",!1,["progress"]),e.resource.Containers.display=!0,yo())}function ys(){let a=e.tech.container&&e.tech.container>=2?500:350;e.tech.container&&e.tech.container>=4&&(a+=e.tech.container>=5?500:250),e.tech.container&&e.tech.container>=6&&(a+=e.tech.container>=7?1200:500),e.tech.container&&e.tech.container>=8&&(a+=4e3),e.race.pack_rat&&(a*=1+b.pack_rat.vars()[0]/100);let r=X("kobold");return r>0&&(a*=1+b.pack_rat.vars(1)[0]/100*r),e.stats.achieve.banana&&e.stats.achieve.banana.l>=3&&(a*=1.1),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(E(a))}function bs(){let a=e.tech.steel_container&&e.tech.steel_container>=3?1200:800;e.tech.steel_container&&e.tech.steel_container>=4&&(a+=e.tech.steel_container>=5?1e3:400),e.tech.steel_container&&e.tech.steel_container>=6&&(a+=e.tech.steel_container>=7?7500:1e3),e.tech.steel_container&&e.tech.steel_container>=8&&(a+=8e3),e.race.pack_rat&&(a*=1+b.pack_rat.vars()[0]/100);let r=X("kobold");return r>0&&(a*=1+b.pack_rat.vars(1)[0]/100*r),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(E(a))}function co(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=$(`

${t("resource_market")}

`);A($("#market")),$("#market").append(a),lu()}function oo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;let a=$(`

${t("tab_storage")}

`);A($("#resStorage")),$("#resStorage").append(a),e.resource.Crates&&e.resource.Containers&&(a.append($(``)),a.append($(``)),C({el:"#createHead",data:{cr:e.resource.Crates,cn:e.resource.Containers},methods:{crate(){Fn()},container(){zn()},buildCrateDesc(){return go()},buildContainerDesc(){return vo()}}}))}function lu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=$("#market-qty");A(a),e.race.no_trade||(a.append($(`

${t("resource_trade_qty")}

`)),a.append($('-+'))),C({el:"#market-qty",data:e.city.market,methods:{val(){e.city.market.qty<1?e.city.market.qty=1:e.city.market.qty>Sn()&&(e.city.market.qty=Sn())},limit(){return Sn()},less(){e.city.market.qty-=V()},more(){e.city.market.qty+=V()}}})}function Sn(){return e.tech.currency>=6?1e6:e.tech.currency>=4?5e3:100}function lo(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))&&(A($("#resEjector")),e.interstellar.mass_ejector)){let a=$(`

${t("interstellar_mass_ejector_vol")}

`);$("#resEjector").append(a);let r=$('');a.append(r),r.append($(`{{ total }} / {{ on | max }}{{ on | real }}${t("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),C({el:"#eject",data:e.interstellar.mass_ejector,filters:{max(i){return i*1e3},real(i){return G.mass_ejector

${e.resource[a].name}

`);$("#resEjector").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ e.${a} }}`)),s.append($(`»`)),s.append($(`${t("interstellar_mass_ejector_per")}: ${Re[a]} kt`)),e.interstellar.mass_ejector.hasOwnProperty(a)||(e.interstellar.mass_ejector[a]=0),C({el:`#eject${a}`,data:{r:e.resource[a],e:e.interstellar.mass_ejector},methods:{ejectMore(n){let c=V();c+e.interstellar.mass_ejector.total>G.mass_ejector*1e3&&(c=G.mass_ejector*1e3-e.interstellar.mass_ejector.total),e.interstellar.mass_ejector[n]+=c,e.interstellar.mass_ejector.total+=c},ejectLess(n){let c=V();c>e.interstellar.mass_ejector[n]&&(c=e.interstellar.mass_ejector[n]),e.interstellar.mass_ejector[n]>0&&(e.interstellar.mass_ejector[n]-=c,e.interstellar.mass_ejector.total-=c)}}})}}function uo(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&(A($("#resCargo")),e.portal.transport)){let a=$(`

${t("portal_transport_supply")}

`);$("#resCargo").append(a);let r=$('{{ used }} / {{ max }}');a.append(r),C({el:"#spireSupply",data:e.portal.transport.cargo})}}function pn(a,r){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&Ur[a]&&e.portal.transport){let i=$(`

${e.resource[a].name}

`);$("#resCargo").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ e.${a} }}`)),s.append($(`»`));let n=Y(Ur[a].out);s.append($(`${t("portal_transport_item",[`${n}`,`${Ur[a].in}`])}`)),e.portal.transport.cargo.hasOwnProperty(a)||(e.portal.transport.cargo[a]=0),C({el:`#supply${a}`,data:{r:e.resource[a],e:e.portal.transport.cargo},methods:{supplyMore(c){let o=V();o+e.portal.transport.cargo.used>e.portal.transport.cargo.max&&(o=e.portal.transport.cargo.max-e.portal.transport.cargo.used,e.portal.transport.cargo[c]+o<0&&(o=-e.portal.transport.cargo[c])),e.portal.transport.cargo[c]+=o,e.portal.transport.cargo.used+=o},supplyLess(c){let o=V();o>e.portal.transport.cargo[c]&&(o=e.portal.transport.cargo[c]),e.portal.transport.cargo[c]>0&&(e.portal.transport.cargo[c]-=o,e.portal.transport.cargo.used-=o)}}})}}function _o(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4)||A($("#resAlchemy"))}function hn(a,r,i){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))&&!(e.race.artifical&&a==="Food")&&e.tech.alchemy&&(i||e.tech.alchemy>=2)&&a!=="Crystal"){let s=$(`

${e.resource[a].name}

`);$("#resAlchemy").append(s);let n=$('');s.append(n),n.append($(`«`)),n.append($(`{{ a.${a} }}`)),n.append($(`»`)),e.race.alchemy.hasOwnProperty(a)||(e.race.alchemy[a]=0),C({el:`#alchemy${a}`,data:{r:e.resource[a],a:e.race.alchemy},methods:{addSpell(c){let o=V();for(let l=0;l=1;l++)e.race.alchemy[c]++,e.resource.Mana.diff--},subSpell(c){let o=V();for(let l=0;l0;l++)e.race.alchemy[c]--,e.resource.Mana.diff++}}}),B(`alchemy${a}`,function(){let c=i&&e.tech.alchemy>=2?Wt[a]*8:Wt[a]*2;return e.race.witch_hunter&&(c*=3),e.stats.achieve.soul_sponge&&e.stats.achieve.soul_sponge.mg&&(c*=e.stats.achieve.soul_sponge.mg+1),$(`
${t("resource_alchemy",[1,t("resource_Mana_name"),.15,t("resource_Crystal_name"),+c.toFixed(2),e.resource[a].name])}
`)},{elm:`#alchemy${a} h3`})}}var E=function(){var a={};return function(r,i,s){let n=i||"a",c=[e.race.universe,e.prestige.Plasmid.count,e.prestige.AntiPlasmid.count,e.prestige.Phage.count,e.race.no_plasmid||"0",e.race.p_mutation||"0",e.race.nerfed||"0",e.genes.store||"0",e.genes.bleed||"0",e.city.temple?e.city.temple.count:"0",e.space.ziggurat?e.space.ziggurat.count:"0",e.race.cataclysm?e.race.cataclysm:"0",e.race.orbit_decayed?e.race.orbit_decayed:"0",e.genes.ancients||"0",e.civic.priest?e.civic.priest.workers:"0"].join("-");if(a[n]||(a[n]={}),!a[n][c]||s){let o=1,l=!!(e.race.cataclysm||e.race.orbit_decayed);if(e.genes.store){let u=0;if(!i||i&&(i==="plasmid"&&e.race.universe!=="antimatter"||i==="anti"&&e.race.universe==="antimatter")){u=e.race.universe==="antimatter"?e.prestige.AntiPlasmid.count:e.prestige.Plasmid.count;let h=u;e.race.no_plasmid?h=Math.min(e.race.p_mutation,u):e.race.nerfed&&(h=Math.floor(u/(e.race.universe==="antimatter"?2:5))),u=Math.round(h*(e.race.nerfed?.5:1))}(!i||i&&i==="phage")&&e.genes.store>=4&&(u+=Math.round(e.prestige.Phage.count*(e.race.nerfed?1/3:1)));let d=e.genes.store>=2?e.genes.store>=3?1250:1666:2500;if(e.race.universe==="antimatter"&&(d*=2),e.genes.bleed&&e.genes.bleed>=3&&(!i||i&&(i==="plasmid"&&e.race.universe==="antimatter"||i==="anti"&&e.race.universe!=="antimatter"))){let h=e.race.universe==="antimatter"?e.prestige.Plasmid.count/5:e.prestige.AntiPlasmid.count/10;u+=Math.round(h*(e.race.nerfed?.5:1))}o*=1+u/d}if(e.race.universe==="standard"&&(o*=fe("standard")),e.race.universe==="antimatter"&&(!l&&e.city.temple&&e.city.temple.count||l&&e.space.ziggurat&&e.space.ziggurat.count)){let u=.06;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let d=e.genes.ancients>=5?.0012:e.genes.ancients>=3?.001:8e-4;e.race.high_pop&&(d=ve(d)),u+=d*e.civic.priest.workers}o*=1+(l?e.space.ziggurat.count:e.city.temple.count)*u}if(!i&&e.pillars){let u=na();o*=u[1]}a[n]={},a[n][c]=o}return i?a[n][c]*r:Math.round(a[n][c]*r)}}();function wo(){let a=0;return!!(e.race.cataclysm||e.race.orbit_decayed)&&e.space.ziggurat?a=e.space.ziggurat.count:e.city.temple&&(a=e.city.temple.count),a}function An(a=-1){if((e.race.no_plasmid||e.race.universe==="antimatter")&&(a==-1&&(a=wo()),a>0)){let r=e.tech.anthropology&&e.tech.anthropology>=1?.016:.01;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=He(e.civic.professor.workers,"professor")*ve(e.race.universe==="antimatter"?2e-4:4e-4);r+=s}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?15e-5:e.genes.ancients>=3?125e-6:1e-4;r+=ve(s)*He(e.civic.priest.workers,"priest")}e.race.universe==="antimatter"?r/=e.race.nerfed?3:2:e.race.nerfed&&(r/=2),e.race.spiritual&&(r*=1+b.spiritual.vars()[0]/100);let i=X("seraph");return i>0&&(r*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(r*=1+Ee.theocracy()[0]/100),e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),a*r}return 0}function Tn(a=-1){if(!e.race.no_plasmid&&e.race.universe!=="antimatter"&&(a==-1&&(a=wo()),a>0)){let r=e.tech.anthropology&&e.tech.anthropology>=1?.08:.05;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=He(e.civic.professor.workers,"professor")*ve(.002);r+=s}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.0015:e.genes.ancients>=3?.00125:.001;r+=ve(s)*He(e.civic.priest.workers,"priest")}e.race.spiritual&&(r*=1+b.spiritual.vars()[0]/100);let i=X("seraph");return i>0&&(r*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(r*=1+Ee.theocracy()[0]/100),e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(r*=.1),a*r}return 0}var gs=function(){var a={};return function(r){let i=[e.race.universe,e.prestige.Plasmid.count,e.prestige.AntiPlasmid.count,e.prestige.Phage.count,e.civic.govern.type,e.civic.professor.assigned,e.genes.bleed||"0",e.race.decayed||"0",e.race.gene_fortify||"0",e.tech.anthropology||"0",e.tech.fanaticism||"0",e.race.nerfed||"0",e.race.no_plasmid||"0",e.genes.ancients||"0",e.city.temple?e.city.temple.count:"0",e.space.ziggurat?e.space.ziggurat.count:"0",e.civic.priest?e.civic.priest.workers:"0",e.race.orbit_decayed?e.race.orbit_decayed:"0",e.race.spiritual||"0",e.tech.outpost_boost||"0",G.alien_outpost||"0"].join("-");if(!a[i]){let s=0,n=0;if(e.race.universe!=="antimatter"||e.genes.bleed){let o=e.race.no_plasmid?Math.min(e.race.p_mutation,e.prestige.Plasmid.count):e.prestige.Plasmid.count;e.race.universe==="antimatter"&&e.genes.bleed&&(o*=.025),e.race.decayed&&(o-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let l=250+e.prestige.Phage.count;o>l?s=+(Math.log(l+50)-3.91202).toFixed(5)/2.888+Math.log(o+1-l)/Math.LN2/250:o<0?s=0:s=+(Math.log(o+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&G.alien_outpost&&(s*=2);let u=Tn();s*=1+u}if(e.race.universe==="antimatter"||e.genes.bleed&&e.genes.bleed>=2){let o=e.prestige.AntiPlasmid.count;e.race.universe!=="antimatter"&&e.genes.bleed&&e.genes.bleed>=2&&(o*=.25),e.race.decayed&&(o-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let l=250+e.prestige.Phage.count;o>l?n=+(Math.log(l+50)-3.91202).toFixed(5)/2.888+Math.log(o+1-l)/Math.LN2/250:o<0?n=0:n=+(Math.log(o+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&G.alien_outpost&&(n*=2),n/=3}e.race.nerfed&&(e.race.universe==="antimatter"?(s/=2,n/=2):(s/=5,n/=5)),a={};let c=(1+s)*(1+n)-1;a[i]=[c,s,n]}return r&&r==="raw"?a[i]:r&&r==="plasmid"?a[i][1]:r&&r==="antiplasmid"?a[i][2]:a[i][0]}}();var or={club:{id:"tech-club",title:t("tech_club"),desc:t("tech_club_desc"),category:"agriculture",era:"primitive",reqs:{},grant:["primitive",1],cost:{Lumber(){return e.race.kindling_kindred||e.race.smoldering?0:5},Stone(){return e.race.kindling_kindred||e.race.smoldering?5:0}},action(){return _($(this)[0])?(e.resource.Food.display=!0,!0):!1}},bone_tools:{id:"tech-bone_tools",title:t("tech_bone_tools"),desc:t("tech_bone_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition(){return!(e.race.soul_eater&&!e.race.evil)},cost:{Food(){return e.race.evil&&!e.race.smoldering||e.race.fasting?0:10},Lumber(){return e.race.evil&&!e.race.smoldering||e.race.fasting?10:0}},action(){return _($(this)[0])?(e.resource.Stone.display=!0,e.race.smoldering&&(e.resource.Chrysotile.display=!0),!0):!1}},wooden_tools:{id:"tech-wooden_tools",title(){return e.race.kindling_kindred?t("tech_bone_tools"):t("tech_wooden_tools")},desc(){return e.race.kindling_kindred?t("tech_bone_tools_desc"):t("tech_wooden_tools_desc")},category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition(){return!!(e.race.soul_eater&&!e.race.evil)},cost:{Lumber(){return 10}},action(){return _($(this)[0])?(e.resource.Stone.display=!0,e.race.smoldering&&(e.resource.Chrysotile.display=!0),!0):!1}},sundial:{id:"tech-sundial",title(){return e.race.unfathomable?t("tech_moondial"):t("tech_sundial")},desc(){return e.race.unfathomable?t("tech_moondial_desc"):t("tech_sundial_desc")},category:"science",era:"primitive",reqs:{primitive:2},condition(){return!!(!e.race.gravity_well||e.race.gravity_well&&e.tech.transport)},grant:["primitive",3],cost:{Lumber(){return 8},Stone(){return 10}},effect(){return e.race.unfathomable?t("tech_moondial_effect"):t("tech_sundial_effect")},action(){return _($(this)[0])?(I(t("tech_sundial_msg"),"info",!1,["progress"]),e.resource.Knowledge.display=!0,e.city.calendar.day++,e.race.infectious&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0,on:0}),e.race.banana&&!e.race.terrifying&&(e.settings.showResources=!0,e.settings.showMarket=!0,e.resource.Money.display=!0,e.city.market.active=!0,e.tech.currency=2),e.race.calm&&(e.resource.Zen.display=!0,e.city.meditation={count:0}),!0):!1}},wheel:{id:"tech-wheel",title(){return t("tech_wheel")},desc(){return t("tech_wheel_desc")},category:"transport",era:"primitive",reqs:{primitive:2},grant:["transport",1],trait:["gravity_well"],cost:{Lumber(){return 50},Stone(){return 25}},effect(){return t("tech_wheel_effect")},action(){return _($(this)[0])?(e.civic.teamster.display=!0,!0):!1}},wagon:{id:"tech-wagon",title(){return t("tech_wagon")},desc(){return t("tech_wagon")},category:"transport",era:"civilized",reqs:{transport:1},condition(){return!!(e.tech.farm||e.tech.s_lodge||e.tech.hunting&&e.tech.hunting>=2||e.race.soul_eater&&e.race.species!=="wendigo"&&e.tech.housing>=1&&e.tech.currency>=1)},grant:["transport",2],trait:["gravity_well"],cost:{Knowledge(){return 195}},effect(){return t("tech_wagon_effect")},action(){return!!_($(this)[0])}},steam_engine:{id:"tech-steam_engine",title(){return t("tech_steam_engine")},desc(){return t("tech_steam_engine")},category:"transport",era:"discovery",reqs:{transport:2,smelting:3},grant:["transport",3],trait:["gravity_well"],cost:{Knowledge(){return 14345}},effect(){return t("tech_steam_engine_effect")},action(){return!!_($(this)[0])}},combustion_engine:{id:"tech-combustion_engine",title(){return t("tech_combustion_engine")},desc(){return t("tech_combustion_engine")},category:"transport",era:"industrialized",reqs:{transport:3,oil:3},grant:["transport",4],trait:["gravity_well"],cost:{Knowledge(){return 46777}},effect(){return t("tech_combustion_engine_effect")},action(){return!!_($(this)[0])}},hover_cart:{id:"tech-hover_cart",title(){return t("tech_hover_cart")},desc(){return t("tech_hover_cart")},category:"transport",era:"deep_space",reqs:{transport:4,elerium:1},grant:["transport",5],trait:["gravity_well"],cost:{Knowledge(){return 284e3}},effect(){return t("tech_hover_cart_effect")},action(){return!!_($(this)[0])}},osha:{id:"tech-osha",title(){return t("tech_osha")},desc(){return t("tech_osha")},category:"transport",era:"industrialized",reqs:{transport:3,high_tech:3},grant:["teamster",1],trait:["gravity_well"],cost:{Knowledge(){return 28262}},effect(){return t("tech_osha_effect")},action(){return _($(this)[0])?(e.civic.teamster.stress=6,!0):!1}},blackmarket:{id:"tech-blackmarket",title(){return t("tech_blackmarket")},desc(){return t("tech_blackmarket")},category:"transport",era:"industrialized",reqs:{teamster:1,currency:5},grant:["teamster",2],trait:["gravity_well"],cost:{Knowledge(){return 40666}},effect(){return t("tech_blackmarket_effect")},action(){return!!_($(this)[0])}},pipelines:{id:"tech-pipelines",title(){return t("tech_pipelines")},desc(){return t("tech_pipelines")},category:"transport",era:"globalized",reqs:{teamster:2,high_tech:6},grant:["teamster",3],trait:["gravity_well"],cost:{Knowledge(){return 95e3}},effect(){return t("tech_pipelines_effect")},action(){return!!_($(this)[0])}},housing:{id:"tech-housing",title:t("tech_housing"),desc:t("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge(){return 10}},effect:t("tech_housing_effect"),action(){return _($(this)[0])?(e.city.basic_housing={count:0},!0):!1}},cottage:{id:"tech-cottage",title(){return $e("medium")},desc:t("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge(){return 3600}},effect:t("tech_cottage_effect"),action(){return _($(this)[0])?(e.city.cottage={count:0},!0):!1}},apartment:{id:"tech-apartment",title(){return $e("large")},desc(){return $e("large")},category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge(){return 15750}},effect:t("tech_apartment_effect"),action(){return _($(this)[0])?(e.city.apartment={count:0,on:0},!0):!1}},arcology:{id:"tech-arcology",title:t("tech_arcology"),desc:t("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge(){return 25e6}},effect(){return t("tech_arcology_effect")},action(){return _($(this)[0])?(e.portal.arcology={count:0,on:0},!0):!1}},steel_beams:{id:"tech-steel_beams",title:t("tech_steel_beams"),desc:t("tech_housing_cost"),category:"housing",era:"discovery",reqs:{housing:2,smelting:2},not_trait:["cataclysm","lone_survivor"],grant:["housing_reduction",1],cost:{Knowledge(){return 11250},Steel(){return 2500}},effect(){let a=$e("small"),r=$e("medium");return t("tech_steel_beams_effect",[a,r])},action(){return!!_($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:t("tech_mythril_beams"),desc:t("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge(){return 175e3},Mythril(){return 1e3}},effect(){let a=$e("small"),r=$e("medium");return t("tech_mythril_beams_effect",[a,r])},action(){return!!_($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:t("tech_neutronium_walls"),desc:t("tech_housing_cost"),category:"housing",era:"deep_space",reqs:{housing_reduction:2,gas_moon:1},grant:["housing_reduction",3],cost:{Knowledge(){return 3e5},Neutronium(){return 850}},effect(){let a=$e("small"),r=$e("medium");return t("tech_neutronium_walls_effect",[a,r])},action(){return!!_($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:t("tech_bolognium_alloy_beams"),desc:t("tech_housing_cost"),category:"housing",era:"intergalactic",reqs:{housing_reduction:3,gateway:3},grant:["housing_reduction",4],cost:{Knowledge(){return 375e4},Adamantite(){return 25e5},Bolognium(){return 1e5}},effect(){let a=$e("small"),r=$e("medium");return t("tech_bolognium_alloy_beams_effect",[a,r])},action(){return!!_($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:t("tech_aphrodisiac"),desc:t("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge(){return 4500}},effect:t("tech_aphrodisiac_effect"),action(){return!!_($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:t("tech_fertility_clinic"),desc:t("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge(){return 45e5}},effect:t("tech_fertility_clinic_effect"),action(){return!!_($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:t("tech_captive_housing"),desc:t("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge(){return 12}},effect:t("tech_captive_housing_effect"),action(){return _($(this)[0])?(e.city.captive_housing={count:0,cattle:0,cattleCatch:0,race0:0,jailrace0:0,race1:0,jailrace1:0,race2:0,jailrace2:0,raceCap:0,cattleCap:0},!0):!1}},torture:{id:"tech-torture",title:t("tech_torture"),desc:t("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge(){return 25}},effect:t("tech_torture_effect"),action(){return _($(this)[0])?(e.civic.torturer.display=!0,!0):!1}},thrall_quarters:{id:"tech-thrall_quarters",title:t("tech_thrall_quarters"),desc:t("tech_thrall_quarters"),category:"eldritch",era:"civilized",reqs:{unfathomable:2,high_tech:6},trait:["unfathomable"],grant:["unfathomable",3],cost:{Knowledge(){return 95e3},Cement(){return 5e4},Wrought_Iron(){return 12500}},effect:t("tech_thrall_quarters_effect"),action(){return _($(this)[0])?(e.civic.torturer.display=!0,!0):!1}},psychic_energy:{id:"tech-psychic_energy",title:t("tech_psychic_energy"),desc:t("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition(){return e.settings.showCivic},trait:["psychic"],grant:["psychic",1],cost:{Knowledge(){return 15}},effect:t("tech_psychic_energy_effect"),action(){return _($(this)[0])?(e.resource.Energy.display=!0,e.settings.showPsychic=!0,e.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0):!1},post(){De()}},psychic_attack:{id:"tech-psychic_attack",title:t("tech_psychic_attack"),desc:t("tech_psychic_attack"),category:"eldritch",era:"civilized",reqs:{psychic:1,military:1},condition(){return e.stats.psykill>=10},trait:["psychic"],grant:["psychic",2],cost:{Knowledge(){return 100}},effect:t("tech_psychic_attack_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.assaultTime=0,!0):!1},post(){De()}},psychic_finance:{id:"tech-psychic_finance",title:t("tech_psychic_finance"),desc:t("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge(){return 65e3}},effect:t("tech_psychic_finance_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.cash=0,!0):!1},post(){De()}},psychic_channeling:{id:"tech-psychic_channeling",title:t("tech_psychic_channeling"),desc:t("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge(){return 36e4}},effect:t("tech_psychic_channeling_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0):!1},post(){De()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:t("tech_psychic_efficiency"),desc:t("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge(){return 525e4}},effect:t("tech_psychic_efficiency_effect"),action(){return!!_($(this)[0])},post(){De()}},mind_break:{id:"tech-mind_break",title:t("tech_mind_break"),desc:t("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge(){return 7e3}},effect:t("tech_mind_break_effect"),action(){return!!_($(this)[0])},post(){De()}},psychic_stun:{id:"tech-psychic_stun",title:t("tech_psychic_stun"),desc:t("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge(){return 32e3}},effect:t("tech_psychic_stun_effect"),action(){return!!_($(this)[0])},post(){De()}},spear:{id:"tech-spear",title:t("tech_spear"),desc:t("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge(){return 110},Stone(){return 75}},effect:t("tech_spear_effect"),action(){return!!_($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:t("tech_bronze_spear"),desc:t("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge(){return 525},Copper(){return 50}},effect:t("tech_bronze_spear_effect"),action(){return!!_($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:t("tech_iron_spear"),desc:t("tech_iron_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:2,mining:3},trait:["forager"],grant:["foraging",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1650:3300},Iron(){return 375}},effect:t("tech_bronze_spear_effect"),action(){return!!_($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:t("tech_dowsing_rod"),desc:t("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge(){return 450},Lumber(){return 750}},effect:t("tech_dowsing_rod_effect"),action(){return!!_($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:t("tech_metal_detector"),desc:t("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge(){return 65e3}},effect:t("tech_metal_detector_effect"),action(){return!!_($(this)[0])}},smokehouse:{id:"tech-smokehouse",title(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("city_smokehouse_easter"):t("tech_smokehouse")},desc(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_smokehouse_easter_desc"):t("tech_smokehouse_desc")},category:"storage",era:"civilized",reqs:{primitive:3,storage:1},trait:["carnivore"],not_trait:["cataclysm","artifical","soul_eater","herbivore","lone_survivor"],grant:["hunting",1],cost:{Knowledge(){return 80}},effect(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_smokehouse_easter_effect"):t("tech_smokehouse_effect")},action(){return _($(this)[0])?(Gt("city","smokehouse","silo",{count:0}),!0):!1},post(){e.tech.s_lodge&&(e.tech.hunting=2)}},lodge:{id:"tech-lodge",title:t("tech_lodge"),desc:t("tech_lodge"),wiki:!!e.race.carnivore,category:"agriculture",era:"civilized",reqs:{hunting:1,housing:1,currency:1},condition(){return!e.tech.s_lodge},grant:["hunting",2],cost:{Knowledge(){return 180}},effect:t("tech_lodge_effect"),action(){return _($(this)[0])?(Gt("city","lodge","farm",{count:0}),!0):!1}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?t("tech_lodge_alt"):t("tech_lodge")},desc(){return this.condition()?t("tech_lodge_alt"):t("tech_lodge")},wiki:!e.race.carnivore,category:"housing",era:"civilized",reqs:{housing:1,currency:1},grant:["s_lodge",1],condition(){return!!((e.race.species==="wendigo"||e.race.detritivore)&&!e.race.carnivore&&!e.race.herbivore||e.race.carnivore&&e.race.soul_eater||e.race.artifical||e.race.unfathomable)},cost:{Knowledge(){return e.race.artifical?1e4:180}},effect(){return this.condition()?t("tech_lodge_effect_alt"):t("tech_lodge_effect")},action(){return _($(this)[0])?(Gt("city","lodge","farm",{count:0}),!0):!1}},soul_well:{id:"tech-soul_well",title:t("tech_soul_well"),desc:t("tech_soul_well"),category:"souls",era:"civilized",reqs:{primitive:3},trait:["soul_eater"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["soul_eater",1],cost:{Knowledge(){return 10}},effect:t("tech_soul_well_effect"),action(){return _($(this)[0])?(e.city.soul_well={count:0},!0):!1}},compost:{id:"tech-compost",title:t("tech_compost"),desc:t("tech_compost_desc"),category:"compost",era:"civilized",reqs:{primitive:3},trait:["detritivore"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["compost",1],cost:{Knowledge(){return 10}},effect:t("tech_compost_effect"),action(){return _($(this)[0])?(e.city.compost={count:0,on:0},!0):!1}},hot_compost:{id:"tech-hot_compost",title:t("tech_hot_compost"),desc:t("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge(){return 100}},effect:t("tech_hot_compost_effect"),action(){return!!_($(this)[0])}},mulching:{id:"tech-mulching",title:t("tech_mulching"),desc:t("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge(){return 3200}},effect:t("tech_mulching_effect"),action(){return!!_($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:t("tech_adv_mulching"),desc:t("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge(){return 16e3}},effect:t("tech_adv_mulching_effect"),action(){return!!_($(this)[0])}},agriculture:{id:"tech-agriculture",title:t("tech_agriculture"),desc:t("tech_agriculture_desc"),category:"agriculture",era:"civilized",reqs:{primitive:3},condition(){return!!(e.race.herbivore||!e.race.carnivore&&!e.race.detritivore&&!e.race.soul_eater)},not_trait:["cataclysm","artifical","lone_survivor","unfathomable"],grant:["agriculture",1],cost:{Knowledge(){return 10}},effect:t("tech_agriculture_effect"),action(){return _($(this)[0])?(Gt("city","farm","lodge",{count:0}),!0):!1}},farm_house:{id:"tech-farm_house",title:t("tech_farm_house"),desc:t("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money(){return 50},Knowledge(){return 180}},effect:t("tech_farm_house_effect"),action(){return!!_($(this)[0])}},irrigation:{id:"tech-irrigation",title:t("tech_irrigation"),desc:t("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge(){return 55}},effect:t("tech_irrigation_effect"),action(){return!!_($(this)[0])}},silo:{id:"tech-silo",title:t("tech_silo"),desc:t("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge(){return 80}},effect:t("tech_silo_effect"),action(){return _($(this)[0])?(Gt("city","silo","smokehouse",{count:0}),!0):!1}},mill:{id:"tech-mill",title:t("tech_mill"),desc:t("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge(){return 5400}},effect:t("tech_mill_effect"),action(){return _($(this)[0])?(Gt("city","mill","windmill",{count:0,on:0}),!0):!1}},windmill:{id:"tech-windmill",title:t("tech_windmill"),desc:t("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge(){return 16200}},effect:t("tech_windmill_effect"),action(){return!!_($(this)[0])}},windturbine:{id:"tech-windturbine",title:t("tech_windturbine"),desc:t("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge(){return 66e3}},effect:t("tech_windturbine_effect"),action(){return!!_($(this)[0])}},wind_plant:{id:"tech-wind_plant",title(){return e.race.unfathomable?t("tech_watermill"):t("tech_windmill")},desc(){return e.race.unfathomable?t("tech_watermill"):t("tech_windmill")},category:"power_generation",era:"globalized",reqs:{high_tech:4},condition(){return!!(e.race.carnivore||e.race.detritivore||e.race.artifical||e.race.soul_eater||e.race.unfathomable)},not_trait:["herbivore"],grant:["wind_plant",1],cost:{Knowledge(){return 66e3}},effect(){return e.race.unfathomable?t("tech_watermill_effect"):t("tech_wind_plant_effect")},action(){return _($(this)[0])?(Gt("city","windmill","mill",{count:0,on:0}),!0):!1}},gmfood:{id:"tech-gmfood",title:t("tech_gmfood"),desc:t("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge(){return 95e3}},effect:t("tech_gmfood_effect"),action(){return!!_($(this)[0])}},foundry:{id:"tech-foundry",title:t("tech_foundry"),desc:t("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge(){return 650}},effect:t("tech_foundry_effect"),action(){return _($(this)[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},!0):!1}},artisans:{id:"tech-artisans",title:t("tech_artisans"),desc:t("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge(){return 1500}},effect:t("tech_artisans_effect"),action(){return!!_($(this)[0])}},apprentices:{id:"tech-apprentices",title:t("tech_apprentices"),desc:t("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge(){return 3200}},effect:t("tech_apprentices_effect"),action(){return!!_($(this)[0])}},carpentry:{id:"tech-carpentry",title:t("tech_carpentry"),desc:t("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge(){return 5200}},effect:t("tech_carpentry_effect"),action(){return!!_($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:t("tech_master_craftsman"),desc:t("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!e.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge(){return 12e3}},effect:t("tech_master_craftsman_effect"),action(){return!!_($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:t("tech_master_craftsman"),desc:t("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!e.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge(){return 12e3}},effect:t("tech_master_craftsman_effect"),action(){return!!_($(this)[0])}},banquet:{id:"tech-banquet",title:t("tech_banquet"),desc:t("tech_banquet"),category:"special",era:"discovery",reqs:{high_tech:2},not_trait:["fasting","cataclysm","lone_survivor"],grant:["banquet",1],condition(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)},cost:{Knowledge(){return 18500}},effect:t("tech_banquet_effect"),action(){return _($(this)[0])?(e.city.banquet={count:0,on:0,strength:0},!0):!1}},brickworks:{id:"tech-brickworks",title:t("tech_brickworks"),desc:t("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge(){return 18500}},effect:t("tech_brickworks_effect"),action(){return!!_($(this)[0])}},machinery:{id:"tech-machinery",title:t("tech_machinery"),desc:t("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge(){return 66e3}},effect:t("tech_machinery_effect"),action(){return!!_($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:t("tech_cnc_machine"),desc:t("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge(){return 132e3}},effect:t("tech_cnc_machine_effect"),action(){return!!_($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:t("tech_vocational_training"),desc:t("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge(){return 3e4}},effect:t("tech_vocational_training_effect"),action(){return!!_($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:t("tech_stellar_forge"),desc:t("tech_stellar_forge"),category:"crafting",era:"intergalactic",reqs:{foundry:8,high_tech:15,gateway:3,neutron:1},grant:["star_forge",1],cost:{Knowledge(){return 45e5}},effect:t("tech_stellar_forge_effect"),action(){return _($(this)[0])?(e.interstellar.stellar_forge={count:0,on:0},!0):!1}},stellar_smelting:{id:"tech-stellar_smelting",title:t("tech_stellar_smelting"),desc:t("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge(){return 5e6},Vitreloy(){return 1e4}},effect:t("tech_stellar_smelting_effect"),action(){if(_($(this)[0])){let r=G.stellar_forge*2;return e.city.smelter.cap+=r,e.city.smelter.Star+=r,e.city.smelter.StarCap+=r,e.city.smelter.Iron+=r,!0}return!1},post(){Pe()}},assembly_line:{id:"tech-assembly_line",title:t("tech_assembly_line"),desc:t("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge(){return 72e3},Copper(){return 125e3}},effect:`${t("tech_assembly_line_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},automation:{id:"tech-automation",title:t("tech_automation"),desc:t("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge(){return 165e3}},effect:`${t("tech_automation_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:t("tech_laser_cutters"),desc:t("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge(){return 3e5},Elerium(){return 200}},effect:`${t("tech_laser_cutters_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:t("tech_high_tech_factories"),desc:t("tech_high_tech_factories"),category:"crafting",era:"intergalactic",reqs:{high_tech:17,alpha:4,factory:3},grant:["factory",4],cost:{Knowledge(){return 135e5},Vitreloy(){return 5e5},Orichalcum(){return 3e5}},effect:`${t("tech_high_tech_factories_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},theatre:{id:"tech-theatre",title:t("tech_theatre"),desc:t("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge(){return 750}},effect:t("tech_theatre_effect"),action(){return _($(this)[0])?(e.city.amphitheatre={count:0},!0):!1}},playwright:{id:"tech-playwright",title:t("tech_playwright"),desc:t("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge(){return 1080}},effect:t("tech_playwright_effect"),action(){return!!_($(this)[0])}},magic:{id:"tech-magic",title(){return e.race.universe==="magic"?t("tech_illusionist"):t("tech_magic")},desc(){return e.race.universe==="magic"?t("tech_illusionist"):t("tech_magic")},category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge(){return 7920}},effect(){return e.race.universe==="magic"?t("tech_illusionist_effect"):t("tech_magic_effect")},action(){return!!_($(this)[0])}},superstars:{id:"tech-superstars",title:t("tech_superstars"),desc:t("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge(){return 66e4}},effect:t("tech_superstars_effect"),action(){return!!_($(this)[0])}},radio:{id:"tech-radio",title:t("tech_radio"),desc:t("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge(){return 16200}},effect(){return t("tech_radio_effect",[qt()])},action(){return!!_($(this)[0])}},tv:{id:"tech-tv",title:t("tech_tv"),desc:t("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge(){return 67500}},effect(){return t("tech_tv_effect",[qt()])},action(){return!!_($(this)[0])}},vr_center:{id:"tech-vr_center",title:t("tech_vr_center"),desc:t("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge(){return 62e4}},effect(){return t("tech_vr_center_effect")},action(){return _($(this)[0])?(e.space.vr_center={count:0,on:0},!0):!1}},zoo:{id:"tech-zoo",title:t("tech_zoo"),desc:t("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge(){return 225e5}},effect(){return t("tech_zoo_effect")},action(){return _($(this)[0])?(e.interstellar.zoo={count:0,on:0},!0):!1}},casino:{id:"tech-casino",title:t("tech_casino"),desc:t("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge(){return 95e3}},effect:t("tech_casino_effect"),action(){return _($(this)[0])?(e.city.casino={count:0,on:0},e.space.spc_casino={count:0,on:0},!0):!1}},dazzle:{id:"tech-dazzle",title:t("tech_dazzle"),desc:t("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge(){return 125e3}},effect:t("tech_dazzle_effect"),action(){return!!_($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:t("tech_casino_vault"),desc:t("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge(){return 145e3},Iridium(){return 2500}},effect:t("tech_casino_vault_effect"),action(){return!!_($(this)[0])}},otb:{id:"tech-otb",title:t("tech_otb"),desc:t("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge(){return 39e4}},effect:t("tech_otb_effect"),action(){return!!_($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:t("tech_online_gambling"),desc:t("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge(){return 8e5}},effect:t("tech_online_gambling_effect"),action(){return!!_($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:t("tech_bolognium_vaults"),desc:t("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge(){return 39e5},Bolognium(){return 18e4}},effect:t("tech_bolognium_vaults_effect"),action(){return!!_($(this)[0])}},mining:{id:"tech-mining",title(){return e.race.sappy?t("tech_amber"):t("tech_mining")},desc(){return e.race.sappy?t("tech_amber"):t("tech_mining_desc")},category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge(){return 45}},effect(){return e.race.sappy?t("tech_amber_effect"):t(e.race.flier?"tech_mining_effect_alt":"tech_mining_effect")},action(){return _($(this)[0])?(e.city.rock_quarry={count:0,on:0,asbestos:50},e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),!0):!1}},bayer_process:{id:"tech-bayer_process",title:t("tech_bayer_process"),desc:t("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge(){return 4500}},effect(){return e.race.sappy?t("tech_bayer_process_effect_alt"):t("tech_bayer_process_effect")},action(){return _($(this)[0])?(e.city.metal_refinery={count:0,on:0},Xe(),!0):!1}},elysis_process:{id:"tech-elysis_process",title:t("tech_elysis_process"),desc:t("tech_elysis_process"),category:"mining",era:"interstellar",reqs:{alumina:1,stanene:1,graphene:1},path:["standard","truepath"],not_trait:["cataclysm","lone_survivor"],grant:["alumina",2],cost:{Knowledge(){return 675e3},Graphene(){return 45e3},Stanene(){return 75e3}},effect:t("tech_elysis_process_effect"),action(){return!!_($(this)[0])}},smelting:{id:"tech-smelting",title:t("tech_smelting"),desc:t("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge(){return 4050}},effect:t("tech_smelting_effect"),action(){return _($(this)[0])?(e.city.smelter={count:0,cap:0,Wood:0,Coal:0,Oil:0,Star:0,StarCap:0,Inferno:0,Iron:0,Steel:0,Iridium:0},!0):!1},post(){e.race.steelen&&(e.tech.smelting=2,pe())}},steel:{id:"tech-steel",title:t("tech_steel"),desc:t("tech_steel_desc"),category:"mining",era:"civilized",reqs:{smelting:1,mining:4},grant:["smelting",2],condition(){return!e.race.steelen},cost:{Knowledge(){return 4950},Steel(){return 25}},effect:t("tech_steel_effect"),action(){return _($(this)[0])?(e.resource.Steel.display=!0,!0):!1},post(){Pe(),De()}},blast_furnace:{id:"tech-blast_furnace",title:t("tech_blast_furnace"),desc:t("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge(){return 13500},Coal(){return 2e3}},effect:t("tech_blast_furnace_effect"),action(){return!!_($(this)[0])},post(){e.race.steelen&&(e.tech.smelting=6,pe())}},bessemer_process:{id:"tech-bessemer_process",title:t("tech_bessemer_process"),desc:t("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition(){return!e.race.steelen},cost:{Knowledge(){return 19800},Coal(){return 5e3}},effect:t("tech_bessemer_process_effect"),action(){return!!_($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:t("tech_oxygen_converter"),desc:t("tech_oxygen_converter"),category:"mining",era:"industrialized",reqs:{smelting:4,high_tech:3},grant:["smelting",5],condition(){return!e.race.steelen},cost:{Knowledge(){return 46800},Coal(){return 1e4}},effect:t("tech_oxygen_converter_effect"),action(){return!!_($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:t("tech_electric_arc_furnace"),desc:t("tech_electric_arc_furnace"),category:"mining",era:"globalized",reqs:{smelting:5,high_tech:4},grant:["smelting",6],condition(){return!e.race.steelen},cost:{Knowledge(){return 85500},Copper(){return 25e3}},effect:t("tech_electric_arc_furnace_effect"),action(){return!!_($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:t("tech_hellfire_furnace"),desc:t("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge(){return 615e3},Infernite(){return 2e3},Soul_Gem(){return 2}},effect:t("tech_hellfire_furnace_effect"),action(){return!!_($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:t("tech_infernium_fuel"),desc:t("tech_infernium_fuel"),category:"mining",era:"dimensional",reqs:{smelting:7,hell_ruins:4},grant:["smelting",8],cost:{Knowledge(){return 275e5},Coal(){return 45e6},Oil(){return 5e5},Infernite(){return 75e4}},effect:t("tech_infernium_fuel_effect"),action(){return!!_($(this)[0])},post(){Pe()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:t("tech_iridium_smelting"),desc:t("tech_iridium_smelting"),category:"mining",era:"early_space",path:["standard"],reqs:{smelting:6,space:3},condition(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=3)},grant:["irid_smelting",1],cost:{Knowledge(){return 35e4},Mythril(){return 2500}},effect:t("tech_iridium_smelting_effect"),action(){return!!_($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:t("tech_rotary_kiln"),desc:t("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge(){return 57600},Coal(){return 8e3}},effect:t("tech_rotary_kiln_effect"),action(){return!!_($(this)[0])}},metal_working:{id:"tech-metal_working",title:t("tech_metal_working"),desc:t("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge(){return 350}},effect:t("tech_metal_working_effect"),action(){return _($(this)[0])?(e.city.mine={count:0,on:0},!0):!1}},iron_mining:{id:"tech-iron_mining",title:t("tech_iron_mining"),desc:t("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?500:2500}},effect:t("tech_iron_mining_effect"),action(){return _($(this)[0])?(e.resource.Iron.display=!0,e.city.foundry&&e.city.foundry.count>0&&(e.resource.Wrought_Iron.display=!0,Xe()),!0):!1},post(){De()}},coal_mining:{id:"tech-coal_mining",title:t("tech_coal_mining"),desc:t("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge(){return 4320}},effect:t("tech_coal_mining_effect"),action(){return _($(this)[0])?(e.city.coal_mine={count:0,on:0},e.resource.Coal.display=!0,!0):!1},post(){De()}},storage:{id:"tech-storage",title:t("tech_storage"),desc:t("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge(){return 20}},effect:t("tech_storage_effect"),action(){return _($(this)[0])?(e.city.shed={count:0},!0):!1}},reinforced_shed:{id:"tech-reinforced_shed",title:t("tech_reinforced_shed"),desc:t("tech_reinforced_shed_desc"),category:"storage",era:"civilized",reqs:{storage:1,cement:1,mining:3},grant:["storage",2],cost:{Money(){return 3750},Knowledge(){return 2550},Iron(){return 750},Cement(){return 500}},effect:t("tech_reinforced_shed_effect"),action(){return!!_($(this)[0])}},barns:{id:"tech-barns",title:t("tech_barns"),desc:t("tech_barns_desc"),category:"storage",era:"discovery",reqs:{storage:2,smelting:2,alumina:1},grant:["storage",3],cost:{Knowledge(){return 15750},Aluminium(){return 3e3},Steel(){return 3e3}},effect:t("tech_barns_effect"),action(){return!!_($(this)[0])},post(){ba(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:t("tech_warehouse"),desc:t("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge(){return 40500},Titanium(){return 3e3}},effect:t("tech_warehouse_effect"),action(){return!!_($(this)[0])},post(){ba(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:t("tech_cameras"),desc:t("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money(){return 9e4},Knowledge(){return 65e3}},effect:t("tech_cameras_effect"),action(){return!!_($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:t("tech_pocket_dimensions"),desc:t("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge(){return 108e3}},effect:t("tech_pocket_dimensions_effect"),action(){return!!_($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:t("tech_ai_logistics"),desc:t("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge(){return 65e4}},effect:t("tech_ai_logistics_effect"),action(){return!!_($(this)[0])}},containerization:{id:"tech-containerization",title:t("tech_containerization"),desc:t("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge(){return 2700}},effect:t("tech_containerization_effect"),action(){return _($(this)[0])?(e.city.storage_yard={count:0},!0):!1}},reinforced_crates:{id:"tech-reinforced_crates",title:t("tech_reinforced_crates"),desc:t("tech_reinforced_crates"),category:"storage",era:"civilized",reqs:{container:1,smelting:2},grant:["container",2],cost:{Knowledge(){return 6750},Sheet_Metal(){return 100}},effect(){if(e.race.smoldering||e.race.kindling_kindred||e.race.evil){let a=t("resource_Bones_name");return e.race.smoldering?a=t("resource_Chrysotile_name"):e.race.kindling_kindred&&(a=t("resource_Stone_name")),t("tech_reinforced_crates_alt_effect",[a])}else return t("tech_reinforced_crates_effect")},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},cranes:{id:"tech-cranes",title:t("tech_cranes"),desc:t("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge(){return 18e3},Copper(){return 1e3},Steel(){return 2500}},effect:t("tech_cranes_effect"),action(){return!!_($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title(){return t("tech_titanium_crates",[e.resource.Titanium.name])},desc(){return t("tech_titanium_crates",[e.resource.Titanium.name])},category:"storage",era:"globalized",reqs:{container:3,titanium:1},grant:["container",4],cost:{Knowledge(){return 67500},Titanium(){return 1e3}},effect(){return t("tech_titanium_crates_effect",[e.resource.Titanium.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},mythril_crates:{id:"tech-mythril_crates",title(){return t("tech_mythril_crates",[e.resource.Mythril.name])},desc(){return t("tech_mythril_crates",[e.resource.Mythril.name])},category:"storage",era:"early_space",reqs:{container:4,space:3},grant:["container",5],cost:{Knowledge(){return 145e3},Mythril(){return 350}},effect(){return t("tech_mythril_crates_effect",[e.resource.Mythril.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},infernite_crates:{id:"tech-infernite_crates",title(){return t("tech_crates",[e.resource.Infernite.name])},desc(){return t("tech_infernite_crates_desc",[e.resource.Infernite.name])},category:"storage",era:"interstellar",reqs:{container:5,infernite:1},grant:["container",6],cost:{Knowledge(){return 575e3},Infernite(){return 1e3}},effect(){return t("tech_infernite_crates_effect",[e.resource.Infernite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},graphene_crates:{id:"tech-graphene_crates",title(){return t("tech_crates",[e.resource.Graphene.name])},desc(){return t("tech_crates",[e.resource.Graphene.name])},category:"storage",era:"interstellar",path:["standard","truepath"],reqs:{container:6,graphene:1},grant:["container",7],cost:{Knowledge(){return 725e3},Graphene(){return 75e3}},effect(){return t("tech_graphene_crates_effect",[e.resource.Graphene.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_crates:{id:"tech-bolognium_crates",title(){return t("tech_crates",[e.resource.Bolognium.name])},desc(){return t("tech_crates",[e.resource.Bolognium.name])},category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge(){return 342e4},Bolognium(){return 9e4}},effect(){return t("tech_bolognium_crates_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},steel_containers:{id:"tech-steel_containers",title(){return t("tech_containers",[e.resource.Steel.name])},desc(){return t("tech_steel_containers_desc",[e.resource.Steel.name])},category:"storage",era:"discovery",reqs:{smelting:2,container:1},grant:["steel_container",1],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect(){if(e.race.smoldering||e.race.kindling_kindred||e.race.evil){let a=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood";return t("tech_steel_containers_alt_effect",[e.resource[a].name,e.resource.Steel.name])}else return t("tech_steel_containers_effect",[e.resource.Steel.name])},action(){return _($(this)[0])?(e.city.warehouse={count:0},!0):!1}},gantry_crane:{id:"tech-gantry_crane",title:t("tech_gantry_crane"),desc:t("tech_gantry_crane_desc"),category:"storage",era:"discovery",reqs:{steel_container:1,high_tech:2},grant:["steel_container",2],cost:{Knowledge(){return 22500},Steel(){return 5e3}},effect:t("tech_gantry_crane_effect"),action(){return!!_($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title(){return t("tech_containers",[e.resource.Alloy.name])},desc(){return t("tech_alloy_containers_desc",[e.resource.Alloy.name])},category:"storage",era:"industrialized",reqs:{steel_container:2,storage:4},grant:["steel_container",3],cost:{Knowledge(){return 49500},Alloy(){return 2500}},effect(){return t("tech_alloy_containers_effect",[e.resource.Alloy.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},mythril_containers:{id:"tech-mythril_containers",title(){return t("tech_containers",[e.resource.Mythril.name])},desc(){return t("tech_mythril_containers_desc",[e.resource.Mythril.name])},category:"storage",era:"early_space",reqs:{steel_container:3,space:3},grant:["steel_container",4],cost:{Knowledge(){return 165e3},Mythril(){return 500}},effect(){return t("tech_mythril_containers_effect",[e.resource.Mythril.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},adamantite_containers:{id:"tech-adamantite_containers",title(){return t("tech_containers",[e.resource.Adamantite.name])},desc(){return t("tech_adamantite_containers_desc",[e.resource.Adamantite.name])},category:"storage",era:"interstellar",reqs:{steel_container:4,alpha:2},grant:["steel_container",5],cost:{Knowledge(){return 525e3},Adamantite(){return 17500}},effect(){return t("tech_adamantite_containers_effect",[e.resource.Adamantite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},aerogel_containers:{id:"tech-aerogel_containers",title(){return t("tech_containers",[e.resource.Aerogel.name])},desc(){return t("tech_containers",[e.resource.Aerogel.name])},category:"storage",era:"interstellar",reqs:{steel_container:5,aerogel:1},grant:["steel_container",6],cost:{Knowledge(){return 775e3},Aerogel(){return 500}},effect(){return t("tech_aerogel_containers_effect",[e.resource.Aerogel.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_containers:{id:"tech-bolognium_containers",title(){return t("tech_containers",[e.resource.Bolognium.name])},desc(){return t("tech_containers",[e.resource.Bolognium.name])},category:"storage",era:"intergalactic",reqs:{steel_container:6,gateway:3},grant:["steel_container",7],cost:{Knowledge(){return 35e5},Bolognium(){return 125e3}},effect(){return t("tech_bolognium_containers_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title(){return t("tech_nanoweave_containers",[e.resource.Nanoweave.name])},desc(){return t("tech_nanoweave_containers",[e.resource.Nanoweave.name])},category:"storage",era:"intergalactic",reqs:{steel_container:7,nanoweave:1},grant:["steel_container",8],cost:{Knowledge(){return 9e6},Nanoweave(){return 5e4}},effect(){return t("tech_nanoweave_containers_effect",[e.resource.Nanoweave.name])},action(){return!!_($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:t("tech_urban_planning"),desc:t("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!e.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge(){return 2500}},effect:t("tech_urban_planning_effect"),action(){return _($(this)[0])?(e.queue.display=!0,!0):!1},post(){ua()}},urban_planning:{id:"tech-urban_planning",title:t("tech_urban_planning"),desc:t("tech_urban_planning"),category:"queues",era:"civilized",wiki:!e.race.terrifying,reqs:{banking:2,currency:2},grant:["queue",1],not_trait:["terrifying"],cost:{Knowledge(){return 2500}},effect:t("tech_urban_planning_effect"),action(){return _($(this)[0])?(e.queue.display=!0,e.settings.msgFilters.queue.unlocked||(e.settings.msgFilters.queue.unlocked=!0,e.settings.msgFilters.queue.vis=!0),!0):!1},post(){ua()}},zoning_permits:{id:"tech-zoning_permits",title:t("tech_zoning_permits"),desc:t("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge(){return 28e3}},effect(){return t("tech_zoning_permits_effect",[e.genes.queue&&e.genes.queue>=2?4:2])},action(){return!!_($(this)[0])},post(){ua()}},urbanization:{id:"tech-urbanization",title:t("tech_urbanization"),desc:t("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge(){return 95e3}},effect(){return t("tech_urbanization_effect",[e.genes.queue&&e.genes.queue>=2?6:3])},action(){return!!_($(this)[0])},post(){ua()}},assistant:{id:"tech-assistant",title:t("tech_assistant"),desc:t("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge(){return 5e3}},effect:t("tech_assistant_effect"),action(){return _($(this)[0])?(e.r_queue.display=!0,e.settings.msgFilters.building_queue.unlocked||(e.settings.msgFilters.building_queue.unlocked=!0,e.settings.msgFilters.building_queue.vis=!0,e.settings.msgFilters.research_queue.unlocked=!0,e.settings.msgFilters.research_queue.vis=!0),!0):!1},post(){Ra(),(e.settings.tabLoad||e.settings.civTabs===3)&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:t("tech_government"),desc:t("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge(){return 750}},effect:t("tech_government_effect"),action(){return!!_($(this)[0])},post(){C({el:"#govType"},"update"),C({el:"#foreign"},"update"),C({el:"#government .govTabs2"},"update"),e.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:t("govern_theocracy"),desc:t("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge(){return 1200}},effect:t("tech_theocracy_effect"),action(){return!!_($(this)[0])}},republic:{id:"tech-republic",title:t("govern_republic"),desc:t("govern_republic"),category:"government",era:"discovery",reqs:{govern:1},condition(){return!!(e.tech.trade&&e.tech.trade>=2||e.race.terrifying)},grant:["govern",2],cost:{Knowledge(){return 17e3}},effect:t("tech_republic_effect"),action(){return!!_($(this)[0])}},socialist:{id:"tech-socialist",title:t("govern_socialist"),desc:t("govern_socialist"),category:"government",era:"discovery",reqs:{govern:1},condition(){return!!(e.tech.trade&&e.tech.trade>=2||e.race.terrifying)},grant:["gov_soc",1],cost:{Knowledge(){return 17e3}},effect:t("tech_socialist_effect"),action(){return!!_($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:t("govern_corpocracy"),desc:t("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge(){return 26e3}},effect:t("tech_corpocracy_effect"),action(){return!!_($(this)[0])}},technocracy:{id:"tech-technocracy",title:t("govern_technocracy"),desc:t("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge(){return 26e3}},effect:t("tech_technocracy_effect"),action(){return!!_($(this)[0])}},federation:{id:"tech-federation",title:t("govern_federation"),desc:t("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition(){return e.tech.unify&&e.tech.unify>=2||Ua()},grant:["gov_fed",1],cost:{Knowledge(){return 3e4}},effect:t("tech_federation_effect"),action(){return!!_($(this)[0])}},magocracy:{id:"tech-magocracy",title:t("govern_magocracy"),desc:t("govern_magocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},condition(){return e.race.universe==="magic"},grant:["gov_mage",1],cost:{Knowledge(){return 26e3}},effect:t("tech_magocracy_effect"),action(){return!!_($(this)[0])}},governor:{id:"tech-governor",title:t("tech_governor"),desc:t("tech_governor"),category:"government",era:"civilized",reqs:{govern:1},condition(){return!!(e.genes.governor&&e.civic.govern.type!=="anarchy")},grant:["governor",1],cost:{Knowledge(){return 1e3}},effect:t("tech_governor_effect"),action(){return _($(this)[0])?(e.settings.showGovernor=!0,!0):!1},post(){Te()}},spy:{id:"tech-spy",title:t("tech_spy"),desc:t("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge(){return 1250}},effect:t("tech_spy_effect"),action(){return!!_($(this)[0])},post(){C({el:"#foreign"},"update"),Te()}},espionage:{id:"tech-espionage",title:t("tech_espionage"),desc:t("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge(){return 7500}},effect:t("tech_espionage_effect"),action(){return _($(this)[0])?(e.settings.msgFilters.spy.unlocked||(e.settings.msgFilters.spy.unlocked=!0,e.settings.msgFilters.spy.vis=!0),!0):!1},post(){C({el:"#foreign"},"update"),Te()}},spy_training:{id:"tech-spy_training",title:t("tech_spy_training"),desc:t("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge(){return 1e4}},effect:t("tech_spy_training_effect"),action(){return!!_($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:t("tech_spy_gadgets"),desc:t("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge(){return 15e3}},effect:t("tech_spy_gadgets_effect"),action(){return!!_($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:t("tech_code_breakers"),desc:t("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge(){return 55e3}},effect:t("tech_code_breakers_effect"),action(){return!!_($(this)[0])}},currency:{id:"tech-currency",title:t("tech_currency"),desc:t("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge(){return 22},Lumber(){return 10}},effect:t("tech_currency_effect"),action(){return _($(this)[0])?(e.resource.Money.display=!0,!0):!1}},market:{id:"tech-market",title:t("tech_market"),desc:t("tech_market_desc"),category:"banking",era:"civilized",reqs:{banking:1,govern:1},not_trait:["terrifying"],grant:["currency",2],cost:{Knowledge(){return e.race.banana?300:1800}},effect:t("tech_market_effect"),action(){return _($(this)[0])?(e.settings.showResources=!0,e.settings.showMarket=!0,!0):!1}},tax_rates:{id:"tech-tax_rates",title:t("tech_tax_rates"),desc:t("tech_tax_rates_desc"),category:"banking",era:"civilized",reqs:{banking:2,currency:2,queue:1},not_trait:["terrifying"],grant:["currency",3],cost:{Knowledge(){return 3375}},effect:t("tech_tax_rates_effect"),action(){return _($(this)[0])?(e.civic.taxes.display=!0,!0):!1},post(){Te()}},large_trades:{id:"tech-large_trades",title:t("tech_large_trades"),desc:t("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge(){return 6750}},effect:t("tech_large_trades_effect"),action(){return!!_($(this)[0])},post(){e.race.noble&&(e.tech.currency=5,pe())}},corruption:{id:"tech-corruption",title:t("tech_corruption"),desc:t("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge(){return 36e3}},effect:t("tech_corruption_effect"),action(){return!!_($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:t("tech_massive_trades"),desc:t("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge(){return 108e3}},effect:t("tech_massive_trades_effect"),action(){return!!_($(this)[0])}},trade:{id:"tech-trade",title:t("tech_trade"),desc:t("tech_trade_desc"),category:"market",era:"civilized",reqs:{currency:2,military:1},not_trait:["terrifying"],grant:["trade",1],cost:{Knowledge(){return e.race.banana?1200:4500}},effect:t("tech_trade_effect"),action(){return _($(this)[0])?(e.city.trade={count:0},e.city.market.active=!0,!0):!1}},diplomacy:{id:"tech-diplomacy",title:t("tech_diplomacy"),desc:t("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge(){return 16200}},effect:t("tech_diplomacy_effect"),action(){return!!_($(this)[0])}},freight:{id:"tech-freight",title:t("tech_freight"),desc:t("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge(){return 37800}},effect:t("tech_freight_effect"),action(){return!!_($(this)[0])},post(){e.tech.high_tech>=6&&ye("Physics")}},wharf:{id:"tech-wharf",title:t("tech_wharf"),desc:t("tech_wharf_desc"),category:"market",era:"industrialized",reqs:{trade:1,high_tech:3,oil:1},not_trait:["thalassophobia"],grant:["wharf",1],cost:{Knowledge(){return 44e3}},effect:t("tech_wharf_effect"),action(){return _($(this)[0])?(e.city.wharf={count:0},!0):!1}},banking:{id:"tech-banking",title:t("tech_banking"),desc:t("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge(){return 90}},effect:t("tech_banking_effect"),action(){return _($(this)[0])?(e.city.bank={count:0},!0):!1}},investing:{id:"tech-investing",title:t("tech_investing"),desc:t("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money(){return 2500},Knowledge(){return 900}},effect:t("tech_investing_effect"),action(){return _($(this)[0])?(e.civic.banker.display=!0,!0):!1}},vault:{id:"tech-vault",title:t("tech_vault"),desc:t("tech_vault_desc"),category:"banking",era:"civilized",reqs:{banking:2,cement:1},grant:["banking",3],cost:{Money(){return 2e3},Knowledge(){return 3600},Iron(){return 500},Cement(){return 750}},effect:t("tech_vault_effect"),action(){return!!_($(this)[0])}},bonds:{id:"tech-bonds",title:t("tech_bonds"),desc:t("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money(){return 2e4},Knowledge(){return 5e3}},effect:t("tech_bonds_effect"),action(){return!!_($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:t("tech_steel_vault"),desc:t("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money(){return 3e4},Knowledge(){return 6750},Steel(){return 3e3}},effect:t("tech_steel_vault_effect"),action(){return!!_($(this)[0])}},eebonds:{id:"tech-eebonds",title:t("tech_eebonds"),desc:t("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money(){return 75e3},Knowledge(){return 18e3}},effect:t("tech_eebonds_effect"),action(){return!!_($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:qr(),desc:qr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money(){return 125e3},Knowledge(){return 45e3}},effect:t("tech_swiss_banking_effect"),action(){return!!_($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:t("tech_safety_deposit"),desc:t("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money(){return 25e4},Knowledge(){return 67500}},effect:t("tech_safety_deposit_effect"),action(){return!!_($(this)[0])}},stock_market:{id:"tech-stock_market",title:t("tech_stock_market"),desc:t("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money(){return 325e3},Knowledge(){return 108e3}},effect:t("tech_stock_market_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:t("tech_hedge_funds"),desc:t("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money(){return 375e3},Knowledge(){return 126e3}},effect:t("tech_hedge_funds_effect"),action(){return!!_($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:t("tech_four_oh_one"),desc:t("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money(){return 425e3},Knowledge(){return 144e3}},effect:t("tech_four_oh_one_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_four_oh_one_flair")}},exchange:{id:"tech-exchange",title:t("tech_exchange"),desc:t("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money(){return 1e6},Knowledge(){return 675e3}},effect:t("tech_exchange_effect"),action(){return _($(this)[0])?(e.interstellar.exchange={count:0,on:0},!0):!1}},foreign_investment:{id:"tech-foreign_investment",title:t("tech_foreign_investment"),desc:t("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money(){return 1e8},Knowledge(){return 8e6}},effect:t("tech_foreign_investment_effect"),action(){return!!_($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:t("tech_mythril_vault"),desc:t("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money(){return 5e5},Knowledge(){return 15e4},Mythril(){return 750}},effect:t("tech_mythril_vault_effect"),action(){return!!_($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:t("tech_neutronium_vault"),desc:t("tech_neutronium_vault"),category:"banking",era:"deep_space",reqs:{vault:1,gas_moon:1},grant:["vault",2],cost:{Money(){return 75e4},Knowledge(){return 28e4},Neutronium(){return 650}},effect:t("tech_neutronium_vault_effect"),action(){return!!_($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:t("tech_adamantite_vault"),desc:t("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money(){return 2e6},Knowledge(){return 56e4},Adamantite(){return 2e4}},effect:t("tech_adamantite_vault_effect"),action(){return!!_($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:t("tech_graphene_vault"),desc:t("tech_graphene_vault"),category:"banking",era:"interstellar",path:["standard","truepath"],reqs:{vault:3,graphene:1},grant:["vault",4],cost:{Money(){return 3e6},Knowledge(){return 75e4},Graphene(){return 4e5}},effect:t("tech_graphene_vault_effect"),action(){return!!_($(this)[0])}},home_safe:{id:"tech-home_safe",title:t("tech_home_safe"),desc:t("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money(){return 42e3},Knowledge(){return 8e3},Steel(){return 4500}},effect:t("tech_home_safe_effect"),action(){return!!_($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:t("tech_fire_proof_safe"),desc:t("tech_fire_proof_safe"),category:"banking",era:"early_space",reqs:{home_safe:1,space:3},grant:["home_safe",2],cost:{Money(){return 25e4},Knowledge(){return 12e4},Iridium(){return 1e3}},effect:t("tech_fire_proof_safe_effect"),action(){return!!_($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:t("tech_tamper_proof_safe"),desc:t("tech_tamper_proof_safe"),category:"banking",era:"interstellar",reqs:{home_safe:2,infernite:1},grant:["home_safe",3],cost:{Money(){return 25e5},Knowledge(){return 6e5},Infernite(){return 800}},effect:t("tech_tamper_proof_safe_effect"),action(){return!!_($(this)[0])}},monument:{id:"tech-monument",title:t("tech_monument"),desc:t("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge(){return 12e4}},effect:t("tech_monument_effect"),action(){return _($(this)[0])?(e.arpa.m_type=ye("Monument"),!0):!1},post(){ye("Physics")}},tourism:{id:"tech-tourism",title:t("tech_tourism"),desc:t("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge(){return 15e4}},effect:t("tech_tourism_effect"),action(){return _($(this)[0])?(e.city.tourist_center={count:0,on:0},!0):!1}},xeno_tourism:{id:"tech-xeno_tourism",title:t("tech_xeno_tourism"),desc:t("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge(){return 8e6}},effect:t("tech_xeno_tourism_effect"),action(){return!!_($(this)[0])}},science:{id:"tech-science",title:t("tech_science"),desc:t("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge(){return 65}},effect:t("tech_science_effect"),action(){return _($(this)[0])?(e.city.university={count:0},!0):!1}},library:{id:"tech-library",title:t("tech_library"),desc:t("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge(){return 720}},effect:t("tech_library_effect"),action(){return _($(this)[0])?(e.city.library={count:0},!0):!1}},thesis:{id:"tech-thesis",title:t("tech_thesis"),desc:t("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge(){return 1125}},effect:t("tech_thesis_effect"),action(){return!!_($(this)[0])}},research_grant:{id:"tech-research_grant",title:t("tech_research_grant"),desc:t("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge(){return 3240}},effect:t("tech_research_grant_effect"),action(){return!!_($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title(){return e.race.universe==="magic"?t("tech_magic_tomes"):t("tech_scientific_journal")},desc(){return e.race.universe==="magic"?t("tech_magic_tomes_desc"):t("tech_scientific_journal_desc")},category:"science",era:"industrialized",reqs:{science:4,high_tech:3},grant:["science",5],cost:{Knowledge(){return 27e3}},effect(){return e.race.universe==="magic"?t("tech_magic_tomes_effect"):t("tech_scientific_journal_effect")},action(){return!!_($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:t("tech_adjunct_professor"),desc:t("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge(){return 36e3}},effect(){return t("tech_adjunct_professor_effect",[qt(),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])},action(){return!!_($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:t("tech_tesla_coil"),desc:t("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge(){return 51750}},effect(){return t("tech_tesla_coil_effect",[qt()])},action(){return!!_($(this)[0])}},internet:{id:"tech-internet",title:t("tech_internet"),desc:t("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge(){return 61200}},effect:t("tech_internet_effect"),action(){return _($(this)[0])?(e.race.toxic&&e.race.species==="troll"&&L("godwin"),!0):!1}},observatory:{id:"tech-observatory",title:t("tech_observatory"),desc:t("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge(){return 148e3}},effect:t("tech_observatory_effect"),action(){return _($(this)[0])?(e.space.observatory={count:0,on:0},!0):!1}},world_collider:{id:"tech-world_collider",title:t("tech_world_collider"),desc:t("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge(){return 35e4}},effect(){return t("tech_world_collider_effect",[S().dwarf])},action(){return _($(this)[0])?(e.space.world_collider={count:0},e.space.world_controller={count:0,on:0},!0):!1},flair:`
${t("tech_world_collider_flair1")}
${t("tech_world_collider_flair2")}
`},laboratory:{id:"tech-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("tech_laboratory")},desc(){return e.race.universe==="magic"?t("tech_sanctum"):t("tech_laboratory_desc")},category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge(){return 5e5}},effect(){return e.race.universe==="magic"?t("tech_sanctum_effect"):t("tech_laboratory_effect")},action(){return _($(this)[0])?(e.interstellar.laboratory={count:0,on:0},!0):!1},flair(){return e.race.universe==="magic"?t("tech_sanctum_flair"):t("tech_laboratory_flair")}},virtual_assistant:{id:"tech-virtual_assistant",title:t("tech_virtual_assistant"),desc:t("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge(){return 635e3}},effect(){return e.race.universe==="magic"?t("tech_virtual_assistant_magic_effect"):t("tech_virtual_assistant_effect")},action(){return!!_($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:t("tech_dimensional_readings"),desc:t("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge(){return 75e4}},effect(){return t("tech_dimensional_readings_effect")},action(){return!!_($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:t("tech_quantum_entanglement"),desc:t("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge(){return 85e4},Neutronium(){return 7500},Soul_Gem(){return 2}},effect(){return t("tech_quantum_entanglement_effect",[2,e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title"),qt()])},action(){return!!_($(this)[0])}},expedition:{id:"tech-expedition",title(){return e.race.universe==="magic"?t("tech_expedition_wiz"):t("tech_expedition")},desc(){return e.race.universe==="magic"?t("tech_expedition_wiz"):t("tech_expedition")},category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge(){return 535e4}},effect(){return e.race.universe==="magic"?t("tech_expedition_wiz_effect"):t("tech_expedition_effect")},action(){return!!_($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:t("tech_subspace_sensors"),desc:t("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge(){return 6e6}},effect(){return t("tech_subspace_sensors_effect")},action(){return!!_($(this)[0])}},alien_database:{id:"tech-alien_database",title:t("tech_alien_database"),desc:t("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge(){return 825e4}},effect(){return t("tech_alien_database_effect")},action(){return!!_($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:t("tech_orichalcum_capacitor"),desc:t("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge(){return 125e5},Orichalcum(){return 25e4}},effect(){return t("tech_orichalcum_capacitor_effect")},action(){return!!_($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:t("tech_advanced_biotech"),desc:t("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge(){return 255e5}},effect(){return t("tech_advanced_biotech_effect")},action(){return!!_($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:t("tech_codex_infinium"),desc:t("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge(){return 401e5},Codex(){return 1}},effect(){return t("tech_codex_infinium_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!1,!0):!1}},devilish_dish:{id:"tech-devilish_dish",title:t("tech_devilish_dish"),desc:t("tech_devilish_dish"),category:"fasting",era:"dimensional",reqs:{hell_ruins:4},trait:["fasting"],grant:["dish",1],cost:{Knowledge(){return 29e6}},effect(){return t("tech_devilish_dish_effect")},action(){return _($(this)[0])?(e.tech.hell_lake>=3&&I(t("tech_lake_analysis_fasting"),"info",!1,["progress","hell"]),!0):!1}},hell_oven:{id:"tech-hell_oven",title:t("tech_hell_oven"),desc:t("tech_hell_oven"),category:"fasting",era:"dimensional",reqs:{hell_lake:3,dish:1},trait:["fasting"],grant:["dish",2],cost:{Knowledge(){return 32e6}},effect(){return t("tech_hell_oven_effect")},action(){return _($(this)[0])?(e.portal.oven={count:0},!0):!1}},preparation_methods:{id:"tech-preparation_methods",title:t("tech_preparation_methods"),desc:t("tech_preparation_methods"),category:"fasting",era:"dimensional",reqs:{science:21,dish:4},trait:["fasting"],grant:["dish",5],cost:{Knowledge(){return 62e6}},effect(){return t("tech_preparation_methods_effect")},action(){return _($(this)[0])?(e.portal.dish_soul_steeper={count:0,on:0},e.portal.dish_life_infuser={count:0,on:0},!0):!1}},final_ingredient:{id:"tech-final_ingredient",title:t("tech_final_ingredient"),desc:t("tech_final_ingredient"),category:"fasting",era:"dimensional",reqs:{dish_reset:1},grant:["dish_reset",2],cost:{Bolognium(){return 5e7},Demonic_Essence(){return 1}},effect(){return`${t("tech_final_ingredient_effect")} + `);r.append(i),$("#r_civics").append(r),C({el:"#government .govTabs2",data:{t:e.civic.taxes,s:e.settings},methods:{vis(){return!!e.tech.govern}}}),Wl($("#r_govern0")),Zl($("#r_govern0"));var s=$('
');$("#r_govern0").append(s),Te()}}function yi(){if(xi(),!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==3))){var a=$('
');$("#military").append(a),$("#military").append($('
')),ha(a,!0),Yl()}}function xi(){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 hi(a){if(e.race.truepath){if(e.civic.foreign[`gov${a}`].hstl<10)return 1+(10-e.civic.foreign[`gov${a}`].hstl)/40;if(e.civic.foreign[`gov${a}`].hstl>60)return 1-(-60+e.civic.foreign[`gov${a}`].hstl)/160}return 1}function yt(a){if(typeof e.civic.foreign[`gov${a}`].name>"u"){let r=xa();e.civic.foreign[`gov${a}`].name={s0:r.s0,s1:r.s1}}return t(`civics_gov${e.civic.foreign[`gov${a}`].name.s0}`,[e.civic.foreign[`gov${a}`].name.s1])}var Yc=function(){return{anarchy:t("govern_anarchy_effect"),autocracy:t("govern_autocracy_effect",Ee.autocracy()),democracy:t("govern_democracy_effect",Ee.democracy()),oligarchy:e.tech.high_tech&&e.tech.high_tech>=12?t("govern_oligarchy_effect_alt",[Ee.oligarchy()[1]]):t("govern_oligarchy_effect",[Ee.oligarchy()[0],Ee.oligarchy()[1]]),theocracy:t("govern_theocracy_effect",Ee.theocracy()),theocracy_alt:t("govern_theocracy_effect_alt",Ee.theocracy()),republic:t("govern_republic_effect",Ee.republic()),socialist:t("govern_socialist_effect",Ee.socialist()),corpocracy:t("govern_corpocracy_effect",Ee.corpocracy()),technocracy:e.tech.high_tech&&e.tech.high_tech>=16?t("govern_technocracy_effect_alt",[Ee.technocracy()[0],Ee.technocracy()[2]]):t("govern_technocracy_effect",Ee.technocracy()),federation:t("govern_federation_effect",[Ee.federation()[0],Ee.federation()[1]]),federation_alt:t("govern_federation_effect_alt",[25,Ee.federation()[2],Ee.federation()[1]]),magocracy:t("govern_magocracy_effect",Ee.magocracy())}},Ee={autocracy(){let a=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?10:18:25,r=J("organizer",0)?40:35;return[a,r]},democracy(){let a=e.tech.high_tech&&e.tech.high_tech>=2?e.tech.high_tech>=12?30:25:20,r=J("organizer",0)?1:5;return[a,r]},oligarchy(){let a=e.tech.high_tech&&e.tech.high_tech>=12?0:e.tech.high_tech&&e.tech.high_tech>=2?2:5,r=J("organizer",0)?25:20;return[a,r]},theocracy(){let a=12,r=J("organizer",0)?10:25,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?25:40:50;return[a,r,i]},republic(){let a=J("organizer",0)?30:25,r=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:30:20;return[a,r]},socialist(){let a=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:42:35,r=J("organizer",0)?12:10,i=10,s=J("organizer",0)?10:20;return[a,r,i,s]},corpocracy(){let a=J("organizer",0)?220:200,r=J("organizer",0)?175:150,i=J("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[a,r,i,s,n]},technocracy(){let a=8,r=e.tech.high_tech&&e.tech.high_tech>=16?0:e.tech.high_tech&&e.tech.high_tech>=12?1:2,i=J("organizer",0)?18:10;return[a,r,i]},federation(){let a=3,r=J("organizer",0)?12:10,i=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?40:36:32;return[a,r,i]},magocracy(){let a=J("organizer",0)?30:25,r=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?50:40:25;return[a,r]}};function Wl(a){var r=$('
');a.append(r);var i=$(`
${t("civics_government_type")} {{ type | govern }}
`);r.append(i);var s=$("
");r.append(s);var n=$('');s.append(n);var c={template:''};C({el:"#govType",data:e.civic.govern,filters:{govern(o){return t(`govern_${o}`)},set(o){return o==="anarchy"?t("civics_set_gov"):t("civics_revolution")}},methods:{trigModal(){this.$buefy.modal.open({parent:this,component:c});var o=setInterval(function(){$("#modalBox").length>0&&(clearInterval(o),Ql())},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}}}),B("govLabel",function(){let o=e.tech.unify&&e.tech.unify>=2&&e.civic.govern.type==="federation"?"federation_alt":e.civic.govern.type;return o==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display&&(o="theocracy_alt"),$(`
${eo(e.civic.govern.type)}
${Yc()[o]}
`)}),B("govTypeChange",function(){return e.civic.govern.rev>0?t("civics_change_desc",[e.civic.govern.rev]):t("civics_change_desc2")},{elm:"#govType .change"})}function eo(a){return e.race.witch_hunter&&a==="magocracy"?t("witch_hunter_magocracy"):t(`govern_${a}_desc`)}function Ql(){$("#modalBox").append($(`

${t("civics_government_type")}

`));let a=Ze(6,10);a.length>0&&$("#modalBoxTitle").append(a);let r=pt(6,14,!1);r.length>0&&$("#modalBoxTitle").append(r);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($(``))),C({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 o=X("tuskin");o>0&&(c=Math.round(c*((100-b.lawless.vars(1)[0]*o)/100)));let l=J("aristocrat",0);l&&(c=Math.round(c*(1-l/100))),e.civic.govern.rev=c+e.civic.govern.fr,n&&le(),C({el:"#govModal"},"destroy"),$(".modal-background").click(),ie()}}}}),B("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"),$(`
${eo(n)}
${Yc()[c]}
`)},{elm:"#govModal button",self:!0,classes:"has-background-light has-text-dark"})}function bi(){if($("#foreign").length===0&&!e.race.cataclysm&&(!e.tech.world_control||e.race.truepath)&&!e.tech.isolation){let r=$('
');r.append($(`

${t("civics_foreign")}

`)),$("#r_govern0").append(r);var a={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")}`);r.append(c);let o=$("
");o.append($(``)),o.append($(``)),o.append($(``)),c.append(o),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),C({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 yt(n)},sab(n){return n==="none"?"":t(`civics_spy_${n}`)},hate(n){return`${100-n}%`},turmoil(n){return`${n}%`}},methods:{campaign(n){ro(n)},battleAssessment(n){return On(n)},trigModal(n){this.$buefy.modal.open({parent:this,component:a});var c=setInterval(function(){$("#modalBox").length>0&&(clearInterval(c),Jl(n))},50)},spy_disabled(n){return e.civic.foreign[`gov${n}`].trn>0||ds(n)>e.resource.Money.amount},spy(n){to(n)},spyDesc(n){return Qc(n)},espDesc(){return Jc()},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){C({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return On(n)}}})},out:function(c){C({el:c.id},"destroy")}}),B(`gov${n}ts`,function(){return"{{ label() }}"},{elm:`#gov${n} .tspy`,in:function(c){C({el:`#${c.id} > span`,data:{test:"val"},methods:{label(){return Qc(n)}}})},out:function(c){C({el:c.id},"destroy")}}),B(`gov${n}s`,function(){return Jc()},{elm:`#gov${n} .sspy`});e.race.truepath&&B("garRivaldesc1",function(){return t("civics_gov_tp_rival",[yt(3),x[e.race.species].home])},{elm:"#gov3 > span"})}}function Qc(a){if(e.civic.foreign[`gov${a}`].trn>0)return t("civics_progress");let r=Y(ds(a));return t("civics_gov_spy_desc",[r])}function Jc(){return t("civics_gov_esp_desc")}function ds(a){let r=Math.round(e.civic.foreign[`gov${a}`].mil/2+e.civic.foreign[`gov${a}`].hstl/2-e.civic.foreign[`gov${a}`].unrest)+10;return r<50&&(r=50),e.race.infiltrator&&(r/=3),xr()==="scorpio"&&(r*=1-zt("scorpio")[0]/100),Math.round(r**(e.civic.foreign[`gov${a}`].spy+1))+500}function to(a){if(e.tech.spy&&e.civic.foreign[`gov${a}`].trn===0){let r=ds(a);if(e.resource.Money.amount>=r){e.resource.Money.amount-=r;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${a}`].trn=i}}}function Zc(a){let r=e.civic.foreign[`gov${a}`].eco*15384;return r*=1+e.civic.foreign[`gov${a}`].hstl*1.6/100,r*=1-e.civic.foreign[`gov${a}`].unrest*.25/100,+r.toFixed(0)}function Ua(a){return a?e.tech.world_control||e.civic.foreign[a].occ||e.civic.foreign[a].anx||e.civic.foreign[a].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 Jr(a,r){switch(a){case"influence":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="influence"}break;case"sabotage":if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="sabotage"}break;case"incite":{if(r>=3)break;if(e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${r}`].spy>=1&&e.civic.foreign[`gov${r}`].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=X("dryad");s>0&&(i=Math.round(i*(1-b.befuddle.vars(1)[0]/100*s))),e.civic.foreign[`gov${r}`].sab=i,e.civic.foreign[`gov${r}`].act="incite"}}break}}function Jl(a){$("#modalBox").append($(`

${t("civics_espionage_actions")}

`));var r=$('
');$("#modalBox").append(r),e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${a}`].spy>=1&&(r.append($(``)),r.append($(``)),a<3&&r.append($(``)),a<3&&e.civic.foreign[`gov${a}`].hstl<=50&&e.civic.foreign[`gov${a}`].unrest>=50&&r.append($(``)),a<3&&e.civic.foreign[`gov${a}`].spy>=3&&r.append($(``))),C({el:"#espModal",data:e.civic.foreign[`gov${a}`],methods:{influence(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Jr("influence",i),C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie())},sabotage(i){e.tech.spy&&e.tech.spy>=2&&e.civic.foreign[`gov${i}`].spy>=1&&(Jr("sabotage",i),C({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&&(Jr("incite",i),C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie())},annex(i){if(!(i>=3)&&e.civic.foreign[`gov${a}`].hstl<=50&&e.civic.foreign[`gov${a}`].unrest>=50&&e.city.morale.current>=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].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=X("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",C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie()}},purchase(i){if(i>=3)return;let s=Zc(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=X("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",C({el:"#espModal"},"destroy"),$(".modal-background").click(),ie()}}}}),B("GovLabel",function(i){let s=$(i.this).data("esp"),n="";if(s==="purchase"){let o=Zc(a).toLocaleString();n=t(`civics_spy_${s}_desc`,[yt(a),o])}else if(s==="annex")if(e.city.morale.current>=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].unrest)n=t(`civics_spy_${s}_desc`,[yt(a)]);else{let o=200+e.civic.foreign[`gov${a}`].hstl-e.civic.foreign[`gov${a}`].unrest;n=t(`civics_spy_${s}_goal`,[yt(a),o])}else n=t(`civics_spy_${s}_desc`,[yt(a)]);let c="";return(s==="influence"&&e.civic.foreign[`gov${a}`].hstl===0||s==="sabotage"&&e.civic.foreign[`gov${a}`].spy>=2&&e.civic.foreign[`gov${a}`].mil===50||s==="incite"&&e.civic.foreign[`gov${a}`].spy>=4&&e.civic.foreign[`gov${a}`].unrest===100)&&(c=`
${t("civics_spy_warning")}
`),$(`${c}
${n}
`)},{elm:"#espModal button",self:!0,classes:"has-background-light has-text-dark"})}function Mn(a){let r=!!(e.tech.currency&&e.tech.currency>=5);if(a)return(r||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]:(r||e.race.terrifying)&&(i+=20),e.civic.govern.type==="oligarchy"&&(i+=Ee.oligarchy()[1]);let s=J("aristocrat",1);return s&&(i+=s),i}}function Cn(a,r){switch(a){case"add":{let i=r||V(),s=Mn(!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=r||V(),s=Mn(!0);e.civic.taxes.tax_rate>s&&(e.civic.taxes.tax_rate-=i,e.civic.taxes.tax_rate');a.append(r);var i=$(`

${t("civics_tax_rates")}

`);r.append(i);var s=$(''),n=$('«'),c=$('»');r.append(n),r.append(s),r.append(c),C({el:"#tax_rates",data:e.civic.taxes,filters:{tax_level(o){let l=Ze(11,14),u=pt(2,14,!1);return l.length>0&&(o===0&&!e.race.noble||o===10&&e.race.noble)?l:o===13&&u.length>0?u:`${o}%`}},methods:{add(){Cn("add")},sub(){Cn("sub")}}}),B("taxRateLabel",function(){return t("civics_tax_rates_desc")},{classes:"has-background-light has-text-dark"})}function Bt(a,r){switch(a){case"m_cost":return zi();case"m_buy":return ao(1);case"s_cost":return ds(r);case"t_spy":return to(r);case"adj_tax":return Cn(r,1);case"tax_cap":return Mn(r);case"s_influence":return Jr("influence",r);case"s_sabotage":return Jr("sabotage",r);case"s_incite":return Jr("incite",r)}}function zi(){let a=Math.round(1.24**e.civic.garrison.workers*75)-50;a>25e3&&(a=25e3),e.civic.garrison.m_use>0&&(a*=1.1**e.civic.garrison.m_use),e.race.brute&&(a*=1-b.brute.vars()[0]/100);let r=X("orc");return r>0&&(a*=1-b.brute.vars(1)[0]/100*r),e.race.inflation&&(a*=1+e.race.inflation/500),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),Math.round(a)}function ao(a){if(e.tech.mercs){let r=a||V(),i=!0;for(;i&&r>0;){let s=zi();e.civic.garrison.workers=s?(e.resource.Money.amount-=s,e.civic.garrison.workers++,e.civic.garrison.m_use++):i=!1,r--}}}function ha(a,r){A(a),e.tech.world_control&&!e.race.truepath?a.append($(`

${t("civics_garrison")}

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

${t("civics_garrison")}

- ${t("rating")} {{ g.workers | hell | rating }} / {{ g.raid | rating }}
`));var i=$('
');a.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($(`
`))),r){let k="";e.tech.isolation&&(k=Ze(8,12)),a.append($(`
${t("civics_garrison_training")} - ${t("arpa_to_complete")} {{ g.rate, g.progress | trainTime }}${k} {{ g.progress }}%
`))}var c=$('
');a.append(c);var o=$('
');if(c.append(o),(!e.tech.world_control||e.race.truepath)&&!e.race.cataclysm&&!e.tech.isolation){var l=$(`
${t("civics_garrison_campaign")}
`);o.append(l);var u=$('{{ g.tactic | tactics }}'),d=$('«'),h=$('»');l.append(d),l.append(u),l.append(h);var p=$(`
${t("civics_garrison_battalion")}
`);o.append(p);var f=$('{{ g.raid }}'),g=$('«'),w=$('»');p.append(g),p.append(f),p.append(w),r&&(e.race.truepath&&e.tech.rival&&c.append($(`
${yt(3)}
`)),e.tech.world_control||(c.append($(`
${yt(0)}
`)),c.append($(`
${yt(1)}
`)),c.append($(`
${yt(2)}
`))))}let v={g:e.civic.garrison,g0:e.civic.foreign.gov0,g1:e.civic.foreign.gov1,g2:e.civic.foreign.gov2};if(e.race.truepath&&(v.g3=e.civic.foreign.gov3,v.g4=e.civic.foreign.gov4),C({el:r?"#garrison":"#c_garrison",data:v,methods:{hire(){ao()},campaign(k){ro(k)},next(){e.civic.garrison.tactic<4&&e.civic.garrison.tactic++},last(){e.civic.garrison.tactic>0&&e.civic.garrison.tactic--},aNext(){let k=V();e.civic.garrison.raidgt()&&(e.civic.garrison.raid=gt()))},aLast(){let k=V();e.civic.garrison.raid>0&&(e.civic.garrison.raid-=k,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(k){switch(k){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(k){return+Pt(k,"army").toFixed(1)},hell(k){return gt()},stationed(k){let P=gt(),j=e.race.cataclysm?13:31,D=P===j&&!r?pt(2,14,!0):!1;return P===j&&D.length>0?D:P},s_max(k){return gt(!0)},wounded(k){let P=Ze(8,12);return r&&k===0&&P.length>0?P:xe("fool",2021)?gt()-k:k},trainTime(k,P){return k===0?lt(-1):lt((100-P)/(k*4))}}}),["tactic","bat","soldier","crew","wounded","hmerc","defenseRating","offenseRating"].forEach(function(k){B(r?`garrison${k}`:`cGarrison${k}`,function(){return"{{ label() }}"},{elm:`${r?"#garrison":"#c_garrison"} .${k}`,in:function(P){C({el:`#${P.id} > span`,data:{test:"val"},methods:{label(){switch(k){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",[F(e.civic.govern.type==="federation"?15:20)])}case"bat":return t("civics_garrison_army_label");case"soldier":return bn();case"crew":return t("civics_garrison_crew_desc");case"wounded":return t("civics_garrison_wounded_desc");case"hmerc":{let j=Math.round(zi()).toLocaleString();return t("civics_garrison_hire_mercenary_cost",[j])}case"defenseRating":return t("civics_garrison_defensive_rate");case"offenseRating":return t("civics_garrison_offensive_rate")}}}})},out:function(P){C({el:P.id},"destroy")}})}),r){let k=e.race.truepath?4:3;for(let P=0;P{{ label() }}"},{elm:`#garrison .gov${P} button`,in:function(j){C({el:`#${j.id} > span`,data:{test:"val"},methods:{label(){return On(P)}}})},out:function(j){C({el:j.id},"destroy")}});e.race.truepath&&!e.tech.isolation&&B("garRivaldesc2",function(){return t("civics_gov_tp_rival",[yt(3),x[e.race.species].home])},{elm:"#garrison .gov3 > div"})}}function bn(){let a=Pt(gt(),"hunting"),r=[];if((!e.race.herbivore||e.race.carnivore)&&!e.race.artifical){let c=+(a/3).toFixed(2);r.push(c,e.resource.Food.name)}let i=+(a/10).toFixed(2);if(r.push(i,e.resource.Furs.name),e.race.evil&&!e.race.kindling_kindred&&!e.race.smoldering){let c=+(a/(e.race.soul_eater?3:5)).toFixed(2);r.push(c,e.resource.Lumber.name)}let s="civics_garrison_soldier_loot"+r.length/2,n=e.race.evil&&e.race.soul_eater?"civics_garrison_soldier_evil_desc":"civics_garrison_soldier_desc";return t(n)+t(s,r)}function On(a){if(e.civic.foreign[`gov${a}`].occ)return t("civics_garrison_deoccupy_desc");if(e.civic.foreign[`gov${a}`].buy||e.civic.foreign[`gov${a}`].anx)return t("civics_garrison_secede_desc");if(e.civic.garrison.tactic<=1&&e.civic.foreign[`gov${a}`].spy<1||e.civic.garrison.tactic>=2&&e.civic.garrison.tactic<=3&&e.civic.foreign[`gov${a}`].spy<2||e.civic.garrison.tactic===4&&e.civic.foreign[`gov${a}`].spy<3)return t("civics_garrison_no_spy");let r=Pt(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${a}`].mil/100,e.race.banana&&(i*=2),e.city.biome==="swamp"&&(i*=he.swamp.vars()[0]),xe("fool",2021)&&(i/=1.25),rgt()?e.civic.garrison.raid=gt():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 r=e.race.claws?20:16,i=e.race.puny?3:5,s=Math.floor(K(i,r,!0))/10,n=Pt(e.civic.garrison.raid,"army")*s,c=0;switch(e.civic.garrison.tactic){case 0:c=K(0,10,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(0,2,!0));break;case 1:c=K(5,50,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(0,3,!0));break;case 2:c=K(25,100,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(1,5,!0));break;case 3:c=K(50,200,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(4,12,!0));break;case 4:c=K(100,500,!0),e.civic.foreign[`gov${a}`].hstl+=Math.floor(K(10,25,!0));break}c=Math.floor(c*e.civic.foreign[`gov${a}`].mil/100),e.race.banana&&(c*=2),e.city.biome==="swamp"&&(c*=he.swamp.vars()[0]),e.race.mistrustful&&(e.civic.foreign[`gov${a}`].hstl+=b.mistrustful.vars()[0]),e.civic.foreign[`gov${a}`].hstl>100&&(e.civic.foreign[`gov${a}`].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 o=0;if(e.civic.garrison.raid>e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded&&(o=e.civic.garrison.raid-(e.civic.garrison.workers-e.civic.garrison.crew-e.civic.garrison.wounded)),e.civic.garrison.fatigue++,n>c){let l=Math.floor(e.civic.garrison.raid/(5-e.civic.garrison.tactic));l+=o,e.city.ptrait.includes("rage")&&(l+=Fe.rage.vars()[2]),l<1&&(l=1),l>Ai()&&(l=Ai());let u=Math.floor(K(0,l,!0));e.race.frail&&(u+=b.frail.vars()[0]);let d=0;if(e.race.scales&&(d+=b.scales.vars()[0]),e.tech.armor&&(d+=e.tech.armor),e.race.high_pop&&(d+=Math.floor(K(0,d*b.high_pop.vars()[0],!0))),e.race.armored){let R=b.armored.vars()[0]/100;d+=Math.floor(u*R)}let h=X("tortoisan");if(h>0){let R=b.armored.vars(1)[0]/100*h;d+=Math.floor(u*R)}if(e.civic.garrison.raid>o&&(u-=d),u<0&&(u=0),u>e.civic.garrison.raid&&(u=e.civic.garrison.raid),e.race.instinct){let R=Math.floor(u*(b.instinct.vars()[1]/100));u-=R,o+=R}e.civic.garrison.workers-=u,e.stats.died+=u,e.civic.garrison.protest+=u,u>o?(e.civic.garrison.wounded-=o,o=0):(e.civic.garrison.wounded-=u,o-=u),e.civic.garrison.wounded+=Math.floor(K(o,e.civic.garrison.raid-u,!0));let p={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},f=a===3&&e.race.truepath?["Food","Lumber","Stone","Copper","Iron"]:["Food","Lumber","Stone"],g=a===3&&e.race.truepath?["Aluminium","Coal","Cement","Steel","Furs"]:["Copper","Iron","Aluminium","Coal"],w=a===3&&e.race.truepath?["Titanium","Oil","Iridium","Alloy","Polymer"]:["Cement","Steel"];(e.race.artifical||e.race.fasting)&&f.shift(),e.race.smoldering&&f.push("Chrysotile"),e.race.terrifying&&a!==3&&w.push("Titanium"),e.tech.magic&&w.push("Crystal");let v=["Money"];switch(e.civic.garrison.tactic){case 0:{let R=["Money"].concat(f,g);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))]),e.resource.Steel.amount<25&&e.tech.smelting&&e.tech.smelting===1&&Math.floor(K(0,20,!0))===0&&v.push("Steel")}break;case 1:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 2:{let R=["Money"].concat(f,g,w),wt=g.concat(w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),v.push(wt[Math.floor(K(0,wt.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 3:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(w[Math.floor(K(0,w.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break;case 4:{let R=["Money"].concat(f,g,w);v.push(f[Math.floor(K(0,f.length,!0))]),v.push(g[Math.floor(K(0,g.length,!0))]),v.push(w[Math.floor(K(0,w.length,!0))]),v.push(R[Math.floor(K(0,R.length,!0))]),e.race.beast_of_burden&&v.push(R[Math.floor(K(0,R.length,!0))])}break}let k=e.race.terrifying&&a!==3?b.terrifying.vars()[0]:12,P=e.race.terrifying&&a!==3?b.terrifying.vars()[1]:32;v.forEach(function(R){switch(R){case"Money":p[R]+=Math.floor(K(100,375,!0));break;case"Food":p[R]+=Math.floor(K(40,175,!0));break;case"Lumber":case"Stone":p[R]+=Math.floor(K(50,250,!0));break;case"Copper":case"Iron":case"Aluminium":p[R]+=Math.floor(K(35,125,!0));break;case"Coal":case"Cement":p[R]+=Math.floor(K(25,100,!0));break;case"Steel":case"Chrysotile":p[R]+=Math.floor(K(20,65,!0));break;case"Titanium":p[R]+=Math.floor(K(k,P,!0));break;case"Crystal":p[R]+=Math.floor(K(1,5,!0));break;case"Oil":p[R]+=Math.floor(K(20,50,!0));break;case"Iridium":p[R]+=Math.floor(K(2,30,!0));break;case"Alloy":case"Polymer":p[R]+=Math.floor(K(5,38,!0));break}});let j=t("civics_garrison_gained");e.resource.Money.display&&p.Money>0&&(p.Money=Xc(p.Money,a),j=j+t("civics_garrison_quant_money",[p.Money]),et("Money",p.Money)),f.concat(g,w).forEach(function(R){p[R]>0&&(e.resource[R].display||R==="Steel"||R==="Titanium")&&(p[R]=Xc(p[R],a),j=j+t("civics_garrison_quant_res",[p[R],e.resource[R].name]),et(R,p[R]),(R==="Steel"||R==="Titanium")&&(e.resource[R].display=!0))}),j=j.slice(0,-2),j=j+".",I(j,"warning",!1,["combat"]);let U=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[0]),!0));break;case 1:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[1]),!0));break;case 2:U=Math.floor(K(0,Math.floor(u/b.revive.vars()[2]),!0));break}e.civic.garrison.workers+=U}if(U>0?I(t("civics_garrison_victorious_revive",[u,U]),"success",!1,["combat"]):I(t("civics_garrison_victorious",[u]),"success",!1,["combat"]),e.race.slaver&&e.city.slave_pen){let R=e.city.slave_pen.count*4;if(R>e.resource.Slave.amount){let wt=Math.floor(K(0,e.civic.garrison.tactic+2,!0));wt+e.resource.Slave.amount>R&&(wt=R-e.resource.Slave.amount),wt>0&&(e.resource.Slave.amount+=wt,I(t("civics_garrison_capture",[wt]),"success",!1,["combat"]))}}if(e.race.infectious){let R=0;switch(e.civic.garrison.tactic){case 0:R=Math.floor(K(0,b.infectious.vars()[0],!0));break;case 1:R=Math.floor(K(0,b.infectious.vars()[1],!0));break;case 2:R=Math.floor(K(0,b.infectious.vars()[2],!0));break;case 3:R=Math.floor(K(0,b.infectious.vars()[3],!0));break;case 4:R=Math.floor(K(0,b.infectious.vars()[4],!0));break}e.resource[e.race.species].amount+R>e.resource[e.race.species].max&&(R=e.resource[e.race.species].max-e.resource[e.race.species].amount),R>0&&(e.resource[e.race.species].amount+=R,e.civic.d_job!=="unemployed"&&(e.civic[e.civic.d_job].workers+=R),R===1?I(t("civics_garrison_soldier_infected"),"special",!1,["combat"]):I(t("civics_garrison_soldiers_infected",[R]),"special",!1,["combat"]))}let Q=F(e.civic.govern.type==="federation"?15:20);if(a<=2&&e.civic.garrison.tactic===4&&e.civic.garrison.workers>=Q){let R=!e.tech.gov_fed&&!Ua();if(e.civic.garrison.max-=Q,e.civic.garrison.workers-=Q,e.civic.foreign[`gov${a}`].occ=!0,e.civic.foreign[`gov${a}`].sab=0,e.civic.foreign[`gov${a}`].act="none",R&&le(),e.race.banana){let wt=ue();e.stats.banana.b1[wt]=!0,wt!=="m"&&wt!=="l"&&(e.stats.banana.b1.l=!0)}}}else{let l=e.civic.garrison.raid;l+=o,e.civic.garrison.tactic===0&&(l=Math.floor(l/2)),e.city.ptrait.includes("rage")&&(l+=Fe.rage.vars()[2]),l<1&&(l=1),l>Ai()&&(l=Ai());let u=Math.floor(K(1,l,!0));e.race.frail&&(u+=e.civic.garrison.tactic+b.frail.vars()[1]);let d=0;if(e.race.scales&&(d+=b.scales.vars()[1]),e.tech.armor&&(d+=e.tech.armor),e.race.high_pop&&(d+=Math.floor(K(0,Math.floor(d*b.high_pop.vars()[0]/2),!0))),e.race.armored){let f=b.armored.vars()[0]/100;d+=Math.floor(u*f)}let h=X("tortoisan");if(h>0){let f=b.armored.vars(1)[0]/100*h;d+=Math.floor(u*f)}if(e.civic.garrison.raid>o&&(u-=d),e.race.instinct){let f=Math.floor(u*(b.instinct.vars()[1]/100));u-=f,o+=f}u<1&&(u=1),u>e.civic.garrison.raid&&(u=e.civic.garrison.raid),e.civic.garrison.workers-=u,e.stats.died+=u,e.civic.garrison.protest+=u,u>o?(e.civic.garrison.wounded-=o,o=0):(e.civic.garrison.wounded-=u,o-=u),e.civic.garrison.wounded+=1+Math.floor(K(o,e.civic.garrison.raid-u,!0));let p=0;if(e.race.revive){switch(e.city.calendar.temp){case 0:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[3]),!0));break;case 1:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[4]),!0));break;case 2:p=Math.floor(K(0,Math.floor(u/b.revive.vars()[5]),!0));break}e.civic.garrison.workers+=p}p>0?I(t("civics_garrison_defeat_revive",[u,p]),"danger",!1,["combat"]):I(t("civics_garrison_defeat",[u]),"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 Ai(){let a=0,r=e.civic.garrison.raid;switch(e.civic.garrison.tactic){case 0:a=5;break;case 1:a=10;break;case 2:a=25;break;case 3:a=50;break;case 4:a=999;break}return e.race.high_pop&&(a=F(a)),r>a&&(r=a),r}function Xc(a,r){let i=Ai();e.race.high_pop&&(i=i/F(1));let s=a*Math.log(i+1);switch(e.race.invertebrate&&(s*=1-b.invertebrate.vars()[0]/100),e.race.universe==="evil"&&(s*=fe("evil")),e.race.gravity_well&&(s*=1-.75*fe("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*=he.swamp.vars()[1]),Math.floor(s*e.civic.foreign[`gov${r}`].eco/100)}function Xl(){let a=e.tech.military?e.tech.military>=5?e.tech.military-1:e.tech.military:1;if(e.tech.military&&e.tech.military>1){a-=e.tech.military>=11?2:1,e.race.sniper&&(a*=1+b.sniper.vars()[0]/100*a);let r=X("centaur");r>0&&(a*=1+b.sniper.vars(1)[0]/100*a*r),a+=e.tech.military>=11?2:1}return a}function Pt(a,r,i){if(!e.civic.hasOwnProperty("garrison"))return 1;let s=0;typeof i=="number"?s=i:a>e.civic.garrison.workers-e.civic.garrison.wounded&&(s=a-(e.civic.garrison.workers-e.civic.garrison.wounded));let n=Xl(),c=X("rhinotaur"),o=a-s/2;if(e.race.rage||c>0){let u=e.race.rage?s*b.rage.vars()[1]/100:0,d=c>0?s*b.rage.vars(1)[1]/100*c:0;o=a+u+d}let l=e.tech.military?o*n:o;if(r==="army"||r==="hellArmy"){e.race.rage&&(l*=1+b.rage.vars()[0]/100*(e.civic.garrison.wounded||0)),c>0&&(l*=1+b.rage.vars(1)[0]/100*c*(e.civic.garrison.wounded||0)),e.race.puny&&(l*=1-b.puny.vars()[0]/100),e.race.claws&&(l*=1+b.claws.vars()[0]/100);let u=X("scorpid");u>0&&(l*=1+b.claws.vars(1)[0]/100*u),e.race.chameleon&&(l*=1+b.chameleon.vars()[0]/100),e.race.cautious&&e.city.calendar.weather===0&&(l*=1-b.cautious.vars()[0]/100),e.race.apex_predator&&(l*=1+b.apex_predator.vars()[0]/100);let d=X("sharkin");d>0&&(l*=1+b.apex_predator.vars(1)[0]/100*d),e.race.swift&&(l*=1+b.swift.vars()[0]/100),e.race.fiery&&(l*=1+b.fiery.vars()[0]/100);let h=X("balorg");h>0&&(l*=1+b.fiery.vars(1)[0]/100*h),e.race.sticky&&(l*=1+b.sticky.vars()[1]/100);let p=X("pinguicula");p>0&&(l*=1+b.sticky.vars(1)[1]/100*p),e.race.pathetic&&(l*=1-b.pathetic.vars()[0]/100),e.race.tactical&&(l*=1+b.tactical.vars()[0]*e.race.tactical/100),e.tech.fanaticism&&e.tech.fanaticism>=4&&(l*=1+e.city.temple.count*.01),e.race.holy&&r==="hellArmy"&&(l*=1+b.holy.vars()[0]/100);let f=X("unicorn");f>0&&r==="hellArmy"&&(l*=1+b.holy.vars(1)[0]/100*f),e.race.banana&&r==="hellArmy"&&(l*=.8),xr()==="aries"&&(l*=1+zt("aries")[0]/100);let g=J("tactician",0);if(g&&(l*=1+g/100),e.city.ptrait.includes("rage")&&(l*=Fe.rage.vars()[0]),e.race.parasite&&(a===1?l+=2:a>1&&(l+=4)),e.tech.psychic&&e.race.psychicPowers&&e.race.psychicPowers.hasOwnProperty("assaultTime")){let w=0;if(e.race.psychicPowers.assaultTime>0&&(w+=b.psychic.vars()[3]/100),e.tech.psychic>=4&&e.race.psychicPowers.channel){let v=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;w+=+(b.psychic.vars()[3]/5e4*v*e.race.psychicPowers.channel.assault).toFixed(3)}l*=1+w}}return r==="hunting"&&(e.race.unfathomable&&(l*=.66),e.city.banquet&&e.city.banquet.on&&e.city.banquet.count>=3&&(l*=1+e.city.banquet.strength**.65/100)),e.race.rejuvenated&&(l*=1.05),e.civic.govern.type==="autocracy"&&(l*=1+Ee.autocracy()[1]/100),l=Math.floor(l),l*$a(a,r)}function gt(a,r){if(!e.civic.garrison)return 0;let i=a?"max":"workers",s=e.portal.fortress?e.portal.fortress.garrison:0,n=e.space.fob&&!r?e.space.fob.troops:0;return e.civic.garrison[i]-e.civic.garrison.crew-s-n}function Yl(){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 a=$('
');$("#military").append(a);var r=$('
');a.append(r),r.append($(`
${t("civics_mad_reset_desc",[i])}
`));let s=!!(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt));r.append($(`
`)),r.append($(`
`)),e.civic.mad.armed||($("#mad").addClass("armed"),$("#mad .arm").html(t(s?"civics_mad_disarm_grenades":"civics_mad_disarm_missiles"))),C({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(){vc()},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){B(`mad${n}`,function(){return"{{ label() }}"},{elm:`#mad .${n}`,in:function(c){C({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 o=ke("mad"),l=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return t("civics_mad_missiles_warning",[o.plasmid,l])}}}}})},out:function(c){C({el:`#${c.id} > span`},"destroy")}})})}}var Rr={unemployed:function(a){let r=t("job_unemployed_desc");return e.civic.d_job==="unemployed"&&!a&&(r=r+" "+t("job_default",[t("job_unemployed")])),r},hunter:function(a){let r=t("job_hunter_desc",[e.resource.Food.name]);return e.race.unfathomable&&(r=t("job_eld_hunter_desc")),e.race.artifical?r=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"&&(r=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"&&!a&&(r=r+" "+t("job_default",[e.race.unfathomable?t("job_raider"):t("job_hunter")])),r},forager:function(a){let r=t("job_forager_desc");return e.civic.d_job==="forager"&&!a&&(r=r+" "+t("job_default",[t("job_forager")])),r},farmer:function(a){let r=+io(!0,a).toFixed(2),i=+io(!1,a).toFixed(2);a||(r=+He(r,"farmer").toFixed(2),i=+He(i,"farmer").toFixed(2));let s=e.race.high_pop&&!a?t("job_farmer_desc_hp",[r,e.resource.Food.name,F(1),i,F(1)*e.city.farm.count]):t("job_farmer_desc",[r,e.resource.Food.name,e.city.farm.count,i]);return e.civic.d_job==="farmer"&&!a&&(s=s+" "+t("job_default",[t("job_farmer")])),s},lumberjack:function(a){let r=a&&e.race.servants?e.race.servants.jobs.lumberjack:e.civic.lumberjack.workers,i=e.civic.lumberjack.impact;if(a||(r=+He(r,"lumberjack").toFixed(2),i=+He(i,"lumberjack").toFixed(2)),e.race.evil&&(!e.race.soul_eater||e.race.species==="wendigo")){let s=1;a||(s*=$a(r,"lumberjack"));let n=+(i*s).toFixed(2),c=+(i/4*s).toFixed(2),o=e.race.species==="wendigo"?t("job_reclaimer_desc2",[n]):t("job_reclaimer_desc",[n,c]);return e.civic.d_job==="lumberjack"&&!a&&(o=o+" "+t("job_default",[t("job_reclaimer")])),o}else{let s=(e.tech.axe&&e.tech.axe>0?(e.tech.axe-1)*.35:0)+1;a||(s*=$a(r,"lumberjack")),e.city.biome==="forest"&&(i*=he.forest.vars()[0]),e.city.biome==="savanna"&&(i*=he.savanna.vars()[2]),e.city.biome==="desert"&&(i*=he.desert.vars()[2]),e.city.biome==="swamp"&&(i*=he.swamp.vars()[2]),e.city.biome==="taiga"&&(i*=he.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"&&!a&&(c=c+" "+t("job_default",[t("job_lumberjack")])),c}},quarry_worker:function(a){let r=a&&e.race.servants?e.race.servants.jobs.quarry_worker:e.civic.quarry_worker.workers,i=e.civic.quarry_worker.impact;a||(r=+He(r,"quarry_worker").toFixed(2),i=+He(i,"quarry_worker").toFixed(2));let s=(e.tech.hammer&&e.tech.hammer>0?e.tech.hammer*.4:0)+1;a||(s*=$a(r,"miner")),e.city.biome==="desert"&&(s*=he.desert.vars()[0]),e.city.biome==="swamp"&&(s*=he.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"&&!a&&(c=c+" "+t("job_default",[t("job_quarry_worker")])),c},crystal_miner:function(a){let r=a&&e.race.servants?e.race.servants.jobs.crystal_miner:e.civic.crystal_miner.workers,i=e.civic.crystal_miner.impact,s=1;a||(r=+He(r,"crystal_miner").toFixed(2),i=+He(i,"crystal_miner").toFixed(2),s*=$a(r,"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"&&!a&&(c=c+" "+t("job_default",[t("job_crystal_miner")])),c},scavenger:function(a){let r=b.scavenger.vars()[0];e.city.ptrait.includes("trashed")&&e.race.scavenger&&(r*=1+b.scavenger.vars()[1]/100),e.race.high_pop&&!a&&(r*=b.high_pop.vars()[1]/100),a||(r=+He(r,"scavenger").toFixed(2));let i=t("job_scavenger_desc",[x[e.race.species].home,r]);return e.civic.d_job==="scavenger"&&!a&&(i=i+" "+t("job_default",[t("job_scavenger")])),i},teamster:function(a){let r=t("job_teamster_desc",[Zs()]);return e.civic.d_job==="teamster"&&!a&&(r=r+" "+t("job_default",[t("job_teamster")])),r},meditator:function(a){let r=t("job_meditator_desc");return e.civic.d_job==="meditator"&&!a&&(r=r+" "+t("job_default",[t("job_meditator")])),r},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 a=e.race.high_pop?3/b.high_pop.vars()[0]:3;e.city.biome==="ashland"&&(a*=he.ashland.vars()[1]),a=+He(a,"cement_worker").toFixed(2);let r=+He(e.civic.cement_worker.impact,"cement_worker").toFixed(2),i=e.tech.cement>=4?1.2:1,s=$a(e.civic.cement_worker.workers,"factory"),n=r*i*s;return e.city.biome==="ashland"&&(n*=he.ashland.vars()[1]),n=+n.toFixed(2),e.race.sappy?t("job_cement_worker_amber_desc",[n]):t("job_cement_worker_desc",[n,a])},banker:function(){let a=+He(e.civic.banker.impact,"banker").toFixed(2)*100;return e.tech.banking>=10&&(a+=2*e.tech.stock_exchange),e.race.truthful&&(a*=1-b.truthful.vars()[0]/100),e.civic.govern.type==="republic"&&(a*=1.25),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),a=+a.toFixed(0),e.race.fasting?t("job_banker_desc_fasting"):t("job_banker_desc",[a])},entertainer:function(){let a=e.tech.theatre;e.race.musical&&(a+=b.musical.vars()[0]),e.race.emotionless&&(a*=1-b.emotionless.vars()[0]/100),e.race.high_pop&&(a*=b.high_pop.vars()[1]/100),a=+He(a,"entertainer").toFixed(2);let r=e.race.high_pop?b.high_pop.vars()[1]/100:1;return r=+He(r,"entertainer").toFixed(2),e.tech.superstar?t("job_entertainer_desc2",[a,r]):t("job_entertainer_desc",[+a.toFixed(2)])},priest:function(){let a="";return e.civic.govern.type==="theocracy"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display?a=t("job_priest_desc2"):a=t("job_priest_desc"),e.tech.cleric&&(a=a+` ${t("job_priest_desc3")}`),a},professor:function(){let a=+He(1,"professor"),r=+(e.race.studious?e.civic.professor.impact+b.studious.vars()[0]:e.civic.professor.impact),i=X("elven");return i>0&&(r+=b.studious.vars(1)[0]*i),a*=r,a*=e.race.pompous?1-b.pompous.vars()[0]/100:1,a*=$a(e.civic.professor.workers,"science"),e.tech.anthropology&&e.tech.anthropology>=3&&(a*=1+e.city.temple.count*.05),e.civic.govern.type==="theocracy"&&(a*=.75),a=+a.toFixed(2),t("job_professor_desc",[a])},scientist:function(){let a=+He(e.civic.scientist.impact,"scientist").toFixed(2);return a*=$a(e.civic.scientist.workers,"science"),e.tech.science>=6&&e.city.wardenclyffe&&(a*=1+e.civic.professor.workers*e.city.wardenclyffe.on*.01),e.space.satellite&&(a*=1+e.space.satellite.count*.01),e.civic.govern.type==="theocracy"&&(a*=e.tech.high_tech&&e.tech.high_tech>=12?e.tech.high_tech>=16?.75:.6:.5),a=+a.toFixed(2),e.race.universe==="magic"?t("job_wizard_desc",[a,+(.025*fe("magic")).toFixed(4)]):t("job_scientist_desc",[a])},colonist(){return t(e.race.truepath?"job_colonist_desc_tp":"job_colonist_desc",[S().red])},titan_colonist(){return t("job_colonist_desc_tp",[S().titan])},space_miner(){return t("job_space_miner_desc")},hell_surveyor(){return t("job_hell_surveyor_desc")},archaeologist(){let a=(G.arcology||0)*75,r=(Pt(e.portal.guard_post.on,"hellArmy",0)+a)/5e3;r=r>1?1:r;let i=25e4;e.race.high_pop&&(i*=b.high_pop.vars()[1]/100);let s=Math.round(i*r);return t("job_archaeologist_desc",[s.toLocaleString()])},pit_miner(){return t("job_pit_miner_desc",[t("tau_planet",[x[e.race.species].home])])},crew(){return t("job_crew_desc")}};function wi(a){a||$("#civics").append($(`

${t("civics_jobs")}

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

{{ civic.${a}.name }}

{{ sjob.${a} }}
`):$(``);l.append(p)}else{let p=$(`

{{ civic.${a}.name }}

{{ civic.${a}.workers | adjust('${a}') }} / {{ civic.${a}.max | adjust('${a}') }}
`);l.append(p)}if(l.append(u),$(c?"#servants":"#jobs").append(l),a!=="crew"){var d=$(`«`),h=$(`»`);u.append(d),u.append(h)}c?C({el:`#${o}`,data:{civic:e.civic,sjob:e.race.servants.jobs},methods:{showJob(p){return e.civic[p].display||p==="scavenger"&&e.race.servants.force_scavenger},add(){let p=V();for(let f=0;fe.race.servants.used;f++)e.race.servants.jobs[a]++,e.race.servants.used++},sub(){let p=V();for(let f=0;f0;f++)e.race.servants.jobs[a]--,e.race.servants.used--}}}):C({el:`#${o}`,data:{civic:e.civic},methods:{showJob(p){return e.civic[p].display},add(){let p=V();for(let f=0;f0);f++)e.civic[a].workers++,e.civic[e.civic.d_job].workers--,e.civic[a].assigned=e.civic[a].workers},sub(){let p=V();for(let f=0;f0;f++)e.civic[a].workers--,e.civic[e.civic.d_job].workers++,e.civic[a].assigned=e.civic[a].workers},level(p){return e.civic[p].workers===0?"count has-text-danger":e.civic[p].workers===e.civic[p].max?"count has-text-success":e.civic[p].workers<=e.civic[p].max/3?"count has-text-caution":e.civic[p].workers<=e.civic[p].max*.66?"count has-text-warning":e.civic[p].workers0)return f}return p},adjust(p,f){return f==="titan_colonist"&&G.ai_colonist?p+F(G.ai_colonist):p}}}),B(o,function(){return Rr[a](c)},{elm:`#${o} .job_label`,classes:"has-background-light has-text-dark"})}}function eu(){if(A($("#servants")),e.race.servants&&Object.keys(e.race.servants.jobs).length>0){var a=$(`

${t("civics_servants")}

{{ s.used }} / {{ s.max }}
`);$("#servants").append(a),["hunter","forager","farmer","lumberjack","quarry_worker","crystal_miner","scavenger"].forEach(function(r){Ge(r,"servant")}),C({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&&!r?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"?he.grassland.vars()[0]:1,i*=e.city.biome==="savanna"?he.savanna.vars()[0]:1,i*=e.city.biome==="ashland"?he.ashland.vars()[0]:1,i*=e.city.biome==="volcanic"?he.volcanic.vars()[0]:1,i*=e.city.biome==="hellscape"?he.hellscape.vars()[0]:1,i*=e.city.ptrait.includes("trashed")?Fe.trashed.vars()[0]:1,r?i*=so(e.race.servants.jobs.farmer,"farmer"):i*=$a(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 Xe(a){if(A($(a?"#skilledServants":"#foundry")),e.city.foundry&&e.city.foundry.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation){let r=$(a?"#skilledServants":"#foundry"),i=a?"{{ s.sused }} / {{ s.smax }}":"{{ f.crafting }} / {{ c.max }}",s=$(`

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

${i}
`);r.append(s);let n=xe("summer"),c=["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Aerogel","Nanoweave"];a||(c.push("Scarletite"),c.push("Quantium")),n&&!a&&c.push("Thermite");for(let l=0;l
');r.append(h);let p=$('
'),f;if(u==="Scarletite"&&e.portal.hasOwnProperty("hell_forge"))f=$(`

${d}

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

${d}

{{ f.${u} }} / {{ e.on | maxQuantium }}
`);else{let v=a?`{{ s.sjobs.${u} }}`:`{{ f.${u} }}`,k=a?`scraft${u}`:`craft${u}`;f=$(`

${d}

${v}
`)}h.append(f),h.append(p),r.append(h);let g=$(`«`),w=$(`»`);p.append(g),p.append(w)}}let o=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}};a?o.s=e.race.servants:o.f=e.city.foundry,C({el:a?"#skilledServants":"#foundry",data:o,methods:{add(l){let u=V(),d=-1;(l==="Scarletite"||l==="Quantium")&&(d=ps(l));for(let h=0;h0&&(d===-1||d>e.city.foundry[l]))e.civic.craftsman.workers++,e.city.foundry.crafting++,e.city.foundry[l]++,e.civic[e.civic.d_job].workers--;else break},sub(l){let u=V();for(let d=0;d0)e.race.servants.sjobs[l]--,e.race.servants.sused--;else break;else if(e.city.foundry[l]>0)e.city.foundry[l]--,e.civic.craftsman.workers--,e.city.foundry.crafting--,e.civic[e.civic.d_job].workers++;else break},level(){let l=a?e.race.servants.sused:e.civic.craftsman.workers,u=a?e.race.servants.smax:e.civic.craftsman.max;return l===0?"count has-text-danger":l===u?"count has-text-success":l<=u/3?"count has-text-caution":l<=u*.66?"count has-text-warning":l
"),f=e.resource[u].name,w=Zr(u,"auto").multiplier,v=e.genes.crafty?2:1,k=+e.resource[u].diff.toFixed(2),P=+(w*100).toFixed(0);p.append($(`
${t("craftsman_hover_bonus",[P.toLocaleString(),f])}
`)),p.append($(`
${t("craftsman_hover_prod",[k.toLocaleString(),f])}
`));let j=Ti();for(let D=0;D0&&(U-=b.resourceful.vars(1)[0]/100*Q);let R=+(j[u][D].a*e.city.foundry[u]*U*v/140).toFixed(2);p.append($(`
${t("craftsman_hover_cost",[R,e.resource[j[u][D].r].name])}
`))}return p},h=a?`scraft${u}`:`craft${u}`;ms(h,u,"auto",d)}}a?B("servantFoundry",function(){return t("civics_skilled_servants_desc")},{elm:"#skilledServants .foundry",classes:"has-background-light has-text-dark"}):B("craftsmenFoundry",function(){return t("job_craftsman_hover")},{elm:"#foundry .foundry",classes:"has-background-light has-text-dark"}),e.race.servants&&!a&&e.race.servants.smax>0&&Xe(!0)}}var Wa={Food:5,Lumber:5,Chrysotile:5,Stone:5,Crystal:6,Furs:8,Copper:25,Iron:40,Aluminium:50,Cement:15,Coal:20,Oil:75,Uranium:550,Steel:100,Titanium:150,Alloy:350,Polymer:250,Iridium:420,Helium_3:620,Deuterium:950,Elerium:2e3,Water:2,Neutronium:1500,Adamantite:2250,Infernite:2750,Nano_Tube:750,Graphene:3e3,Stanene:3600,Bolognium:9e3,Vitreloy:10200,Orichalcum:99e3,Horseshoe:0,Nanite:0,Genes:0,Soul_Gem:0,Corrupt_Gem:0,Codex:0,Cipher:0,Demonic_Essence:0},Wt={Food:2,Lumber:2,Chrysotile:1,Stone:2,Crystal:.4,Furs:1,Copper:1,Iron:1,Aluminium:1,Cement:1,Coal:1,Oil:.5,Uranium:.12,Steel:.5,Titanium:.25,Alloy:.2,Polymer:.2,Iridium:.1,Helium_3:.1,Deuterium:.1,Elerium:.02,Water:2,Neutronium:.05,Adamantite:.05,Infernite:.01,Nano_Tube:.1,Graphene:.1,Stanene:.1,Bolognium:.12,Vitreloy:.12,Orichalcum:.05},Re={Food:4.355,Lumber:7.668,Chrysotile:15.395,Stone:20.017,Crystal:5.062,Furs:13.009,Copper:63.546,Iron:55.845,Aluminium:26.9815,Cement:20.009,Coal:12.0107,Oil:5.342,Uranium:238.0289,Steel:55.9,Titanium:47.867,Alloy:45.264,Polymer:120.054,Iridium:192.217,Helium_3:3.0026,Deuterium:2.014,Neutronium:248.74,Adamantite:178.803,Infernite:222.666,Elerium:297.115,Nano_Tube:15.083,Graphene:26.9615,Stanene:33.9615,Bolognium:75.898,Unobtainium:168.59,Vitreloy:41.08,Orichalcum:237.8,Water:18.01,Plywood:7.666,Brick:20.009,Wrought_Iron:55.845,Sheet_Metal:26.9815,Mythril:94.239,Aerogel:7.84,Nanoweave:23.71,Scarletite:188.6,Quantium:241.35},Ur={Lumber:{in:.5,out:25e3},Chrysotile:{in:.5,out:25e3},Stone:{in:.5,out:25e3},Crystal:{in:3,out:25e3},Furs:{in:3,out:25e3},Copper:{in:1.5,out:25e3},Iron:{in:1.5,out:25e3},Aluminium:{in:2.5,out:25e3},Cement:{in:3,out:25e3},Coal:{in:1.5,out:25e3},Oil:{in:2.5,out:12e3},Uranium:{in:5,out:300},Steel:{in:3,out:25e3},Titanium:{in:3,out:25e3},Alloy:{in:6,out:25e3},Polymer:{in:6,out:25e3},Iridium:{in:8,out:25e3},Helium_3:{in:4.5,out:12e3},Deuterium:{in:4,out:1e3},Neutronium:{in:15,out:1e3},Adamantite:{in:12.5,out:1e3},Infernite:{in:25,out:250},Elerium:{in:30,out:250},Nano_Tube:{in:6.5,out:1e3},Graphene:{in:5,out:1e3},Stanene:{in:4.5,out:1e3},Bolognium:{in:18,out:1e3},Vitreloy:{in:14,out:1e3},Orichalcum:{in:10,out:1e3},Plywood:{in:10,out:250},Brick:{in:10,out:250},Wrought_Iron:{in:10,out:250},Sheet_Metal:{in:10,out:250},Mythril:{in:12.5,out:250},Aerogel:{in:16.5,out:250},Nanoweave:{in:18,out:250},Scarletite:{in:35,out:250}};function Ti(a=!1){let r={Plywood:[{r:"Lumber",a:100}],Brick:e.race.flier?[{r:"Stone",a:60}]:[{r:"Cement",a:40}],Wrought_Iron:[{r:"Iron",a:80}],Sheet_Metal:[{r:"Aluminium",a:120}],Mythril:[{r:"Iridium",a:100},{r:"Alloy",a:250}],Aerogel:[{r:"Graphene",a:2500},{r:"Infernite",a:50}],Nanoweave:[{r:"Nano_Tube",a:1e3},{r:"Vitreloy",a:40}],Scarletite:[{r:"Iron",a:25e4},{r:"Adamantite",a:7500},{r:"Orichalcum",a:500}],Quantium:[{r:"Nano_Tube",a:1e3},{r:"Graphene",a:1e3},{r:"Elerium",a:25}],Thermite:[{r:"Iron",a:180},{r:"Aluminium",a:60}]};if(e.race.wasteful){let i=1+b.wasteful.vars()[0]/100;Object.keys(r).forEach(function(s){for(let n=0;n=2){let o=e.tech.foundry>=5?e.tech.foundry>=8?.08:.05:.03;a.general.add.push({name:t("city_foundry"),manual:e.city.foundry.count*o,auto:e.city.foundry.count*o})}if(e.tech.foundry>=3&&Object.keys(a).forEach(function(o){e.city.foundry[o]&&e.city.foundry[o]>1&&a[o].add.push({name:t("tech_apprentices"),manual:(e.city.foundry[o]-1)*ve(.03),auto:(e.city.foundry[o]-1)*ve(.03)})}),e.tech.foundry>=4&&e.city.sawmill&&a.Plywood.add.push({name:t("city_sawmill"),manual:e.city.sawmill.count*.02,auto:e.city.sawmill.count*.02}),e.tech.foundry>=6&&a.Brick.add.push({name:t("city_foundry"),manual:e.city.foundry.count*.02,auto:e.city.foundry.count*.02}),e.tech.foundry>=7&&(a.general.add.push({name:t("city_factory")+` (${t("tab_city5")})`,manual:G.factory*.05,auto:G.factory*.05}),e.tech.mars>=4&&a.general.add.push({name:t("city_factory")+` (${t("tab_space")})`,manual:G.red_factory*.05,auto:G.red_factory*.05}),e.interstellar.int_factory&&G.int_factory&&a.general.add.push({name:t("interstellar_int_factory_title"),manual:G.int_factory*.1,auto:G.int_factory*.1})),e.space.fabrication&&we.fabrication&&a.general.add.push({name:t("space_red_fabrication_title"),manual:we.fabrication*e.civic.colonist.workers*(n?ve(.05):ve(.02)),auto:we.fabrication*e.civic.colonist.workers*(n?ve(.05):ve(.02))}),G.stellar_forge&&(a.Mythril.add.push({name:t("interstellar_stellar_forge_title"),manual:G.stellar_forge*.05,auto:G.stellar_forge*.05}),a.general.add.push({name:t("interstellar_stellar_forge_title"),manual:0,auto:G.stellar_forge*.1})),G.hell_forge){let o=Pa("ruins");a.general.add.push({name:t("portal_hell_forge_title"),manual:0,auto:G.hell_forge*.75*o.supress}),a.Scarletite.multi.push({name:t("portal_ruins_supressed"),manual:1,auto:o.supress})}if(e.tauceti.tau_factory&&we.tau_factory&&a.general.add.push({name:t("tau_home_tau_factory"),manual:0,auto:we.tau_factory*(e.tech.isolation?2.75:.9)}),e.tech.isolation&&e.tauceti.colony&&we.colony&&a.general.add.push({name:t("tau_home_colony"),manual:we.colony*.5,auto:we.colony*.5}),we.zero_g_lab&&G.zero_g_lab||we.infectious_disease_lab&&G.infectious_disease_lab){let o=Sa("spc_enceladus");a.Quantium.multi.push({name:t("space_syndicate"),manual:1,auto:o})}if(e.tech.alien_crafting&&we.infectious_disease_lab&&G.infectious_disease_lab){let o=1+.65*Math.min(we.infectious_disease_lab,G.infectious_disease_lab);a.Quantium.multi.push({name:t("tech_infectious_disease_lab_alt"),manual:1,auto:o})}if(e.race.crafty&&a.general.add.push({name:t("wiki_arpa_crispr_crafty"),manual:.03,auto:.03}),e.race.ambidextrous&&a.general.add.push({name:t("trait_ambidextrous_name"),manual:b.ambidextrous.vars()[0]*e.race.ambidextrous/100,auto:b.ambidextrous.vars()[0]*e.race.ambidextrous/100}),e.race.rigid&&a.general.add.push({name:t("trait_rigid_name"),manual:-(b.rigid.vars()[0]/100),auto:-(b.rigid.vars()[0]/100)}),e.civic.govern.type==="socialist"&&a.general.multi.push({name:t("govern_socialist"),manual:1+Ee.socialist()[0]/100,auto:1+Ee.socialist()[0]/100}),e.race.casting&&e.race.casting.crafting){let o=1+e.race.casting.crafting/(e.race.casting.crafting+75),l=1+2*e.race.casting.crafting/(2*e.race.casting.crafting+75);a.general.multi.push({name:t("modal_pylon_casting"),manual:o,auto:l})}e.race.universe==="magic"&&a.general.multi.push({name:t("universe_magic"),manual:.8,auto:.8}),e.tech.v_train&&a.general.multi.push({name:t("tech_vocational_training"),manual:1,auto:2}),e.genes.crafty&&a.general.multi.push({name:t("tab_arpa_crispr")+" "+t("wiki_arpa_crispr_crafty"),manual:1,auto:1+(e.genes.crafty-1)*.5}),e.race.living_tool&&a.general.multi.push({name:t("trait_living_tool_name"),manual:1,auto:1+b.living_tool.vars()[1]/100}),e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=1&&a.general.multi.push({name:t("evo_challenge_orbit_decay"),manual:1,auto:1.1}),e.race.ambidextrous&&a.general.multi.push({name:t("trait_ambidextrous_name"),manual:1,auto:1+b.ambidextrous.vars()[1]*e.race.ambidextrous/100}),e.blood.artisan&&a.general.multi.push({name:t("tab_arpa_blood")+" "+t("arpa_blood_artisan_title"),manual:1,auto:1+e.blood.artisan/100});let c=An();c>0&&a.general.multi.push({name:t("faith"),manual:1,auto:1+c/(e.race.universe==="antimatter"?1.5:3)}),e.prestige.Plasmid.count>0&&a.general.multi.push({name:t("resource_Plasmid_plural_name"),manual:gs()/8+1,auto:gs()/8+1}),e.genes.challenge&&e.genes.challenge>=2&&a.general.multi.push({name:t("mastery"),manual:1+mt()/(e.race.weak_mastery?50:100),auto:1+mt()/(e.race.weak_mastery?50:100)}),e.race.gravity_well&&a.general.multi.push({name:t("evo_challenge_gravity_well"),manual:jr(1),auto:jr(1)})}else{let n=1,c={},o={};if(a.general){for(let u=0;u
`);$("#market").append(n),qi(`#market-${r}`,n,r,i,!0)}}),Wr()}else if(a==="storage"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;Aa("storage"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;if(ge.resource[r].stackable){var n=$(`
`);$("#resStorage").append(n),Pi(`#stack-${r}`,n,r,i,!0)}}),Wr()}else if(a==="ejector"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))return;Aa("ejector"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;Re[r]&&dn(r,i)})}else if(a==="supply"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))return;Aa("supply"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color;Ur[r]&&pn(r,i)})}else if(a==="alchemy"){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))return;Aa("alchemy"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(r){let i=ge.resource[r].color,s=ge.resource[r].tradable;Wt[r]&&e.race.universe==="magic"&&(e.resource[r].basic=s,hn(r,i,s))})}}function vs(a){if(e.race.species==="protoplasm"){let r=100;e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1&&(r+=50*(e.stats.achieve.mass_extinction.l-1)),Z("RNA",a,r,1,!1),Z("DNA",a,r,1,!1)}Z("Money",a,1e3,1,!1,!1,"success"),Z(e.race.species,a,0,0,!1,!1,"warning"),Z("Slave",a,0,0,!1,!1,"warning"),Z("Mana",a,0,1,!1,!1,"warning"),Z("Energy",a,0,0,!1,!1,"warning"),Z("Sus",a,0,0,!1,!1,"warning"),Z("Knowledge",a,100,1,!1,!1,"warning"),Z("Zen",a,0,0,!1,!1,"warning"),Z("Crates",a,0,0,!1,!1,"warning"),Z("Containers",a,0,0,!1,!1,"warning"),Z("Food",a,250,1,!0,!0),Z("Lumber",a,200,1,!0,!0),Z("Chrysotile",a,200,1,!0,!0),Z("Stone",a,200,1,!0,!0),Z("Crystal",a,200,1,!0,!0),Z("Furs",a,100,1,!0,!0),Z("Copper",a,100,1,!0,!0),Z("Iron",a,100,1,!0,!0),Z("Aluminium",a,50,1,!0,!0),Z("Cement",a,100,1,!0,!0),Z("Coal",a,50,1,!0,!0),Z("Oil",a,0,1,!0,!1),Z("Uranium",a,10,1,!0,!1),Z("Steel",a,50,1,!0,!0),Z("Titanium",a,50,1,!0,!0),Z("Alloy",a,50,1,!0,!0),Z("Polymer",a,50,1,!0,!0),Z("Iridium",a,0,1,!0,!0),Z("Helium_3",a,0,1,!0,!1),Z("Water",a,0,1,!1,!1,"advanced"),Z("Deuterium",a,0,1,!1,!1,"advanced"),Z("Neutronium",a,0,1,!1,!1,"advanced"),Z("Adamantite",a,0,1,!1,!0,"advanced"),Z("Infernite",a,0,1,!1,!1,"advanced"),Z("Elerium",a,1,1,!1,!1,"advanced"),Z("Nano_Tube",a,0,1,!1,!1,"advanced"),Z("Graphene",a,0,1,!1,!0,"advanced"),Z("Stanene",a,0,1,!1,!0,"advanced"),Z("Bolognium",a,0,1,!1,!0,"advanced"),Z("Vitreloy",a,0,1,!1,!0,"advanced"),Z("Orichalcum",a,0,1,!1,!0,"advanced"),Z("Unobtainium",a,0,1,!1,!1,"advanced"),Z("Materials",a,0,1,!1,!1,"advanced"),Z("Horseshoe",a,-2,0,!1,!1,"advanced"),Z("Nanite",a,0,1,!1,!1,"advanced"),Z("Genes",a,-2,0,!1,!1,"advanced"),Z("Soul_Gem",a,-2,0,!1,!1,"advanced"),Z("Plywood",a,-1,0,!1,!1,"danger"),Z("Brick",a,-1,0,!1,!1,"danger"),Z("Wrought_Iron",a,-1,0,!1,!1,"danger"),Z("Sheet_Metal",a,-1,0,!1,!1,"danger"),Z("Mythril",a,-1,0,!1,!1,"danger"),Z("Aerogel",a,-1,0,!1,!1,"danger"),Z("Nanoweave",a,-1,0,!1,!1,"danger"),Z("Scarletite",a,-1,0,!1,!1,"danger"),Z("Quantium",a,-1,0,!1,!1,"danger"),Z("Corrupt_Gem",a,-2,0,!1,!1,"caution"),Z("Codex",a,-2,0,!1,!1,"caution"),Z("Cipher",a,0,1,!1,!1,"caution"),Z("Demonic_Essence",a,-2,0,!1,!1,"caution"),!a&&(cr("Blood_Stone","caution"),cr("Artifact","caution"),cr("Plasmid"),cr("AntiPlasmid"),cr("Phage"),cr("Dark"),cr("Harmony"),cr("AICore"))}function Wr(){e.race.species!=="protoplasm"&&(nu(),ru(),cu())}function Z(a,r,i,s,n,c,o){if(o=o||"info",e.resource[a]||(e.resource[a]={}),Kt(a),e.race.artifical&&a==="Food"&&(c=!1),r)return;e.resource[a].hasOwnProperty("display")||(e.resource[a].display=!1),e.resource[a].hasOwnProperty("value")||(e.resource[a].value=e.race.truepath?Wa[a]*2:Wa[a]),e.resource[a].hasOwnProperty("amount")||(e.resource[a].amount=0),e.resource[a].hasOwnProperty("max")||(e.resource[a].max=i),e.resource[a].hasOwnProperty("diff")||(e.resource[a].diff=0),e.resource[a].hasOwnProperty("delta")||(e.resource[a].delta=0),e.resource[a].hasOwnProperty("rate")||(e.resource[a].rate=s),a==="Mana"&&(e.resource[a].gen=0,e.resource[a].gen_d=0),e.resource[a].stackable=c,e.resource[a].crates||(e.resource[a].crates=0),e.resource[a].containers||(e.resource[a].containers=0),!e.resource[a].trade&&n&&(e.resource[a].trade=0);var l;e.resource[a].max===-1||e.resource[a].max===-2?l=$(`

{{ name | namespace }}

{{ amount | diffSize }}
`):l=$(`

{{ name | namespace }}

{{ amount | size }} / {{ max | size }}
`),c?l.append($(`+`)):(i!==-1||i===-1&&s===0&&e.race.no_craft||a==="Scarletite"||a==="Quantium")&&l.append($(""));let u=!1;if(s!==0||i===-1&&s===0&&e.race.no_craft||a==="Scarletite"||a==="Quantium")l.append($(`{{ diff | diffSize }} /s`));else if(i===-1&&!e.race.no_craft&&a!=="Scarletite"&&a!=="Quantium"){let h=$('');l.append(h);let p=[1,5];for(let f=0;f+${p[f]}`));h.append($(`+A`)),u=!0}else e.race.fasting&&a===e.race.species?l.append($(`{{ diff | diffSize }}`)):l.append($(""));$("#resources").append(l);var d={template:''};if(C({el:`#res${a}`,data:e.resource[a],filters:{size:function(h){return h&&Y(h,0)},diffSize:function(h){return a==="Horseshoe"&&!e.race.hooved&&xe("fool",2023)&&(h=5),Y(h,2)},namespace(h){return h.replace("_"," ")}},methods:{resRate(h){let p=Y(e.resource[h].diff,2);return`${h} ${p} per second`},trigModal(){this.$buefy.modal.open({parent:this,component:d});var h=setInterval(function(){$("#modalBox").length>0&&(clearInterval(h),ou(a,o))},50)},showTrigger(){return e.resource.Crates.display},craft(h,p){if(!e.race.no_craft){let f=Zr(h,"manual").multiplier,g=Ti(!0),w=Math.floor(e.resource[g[h][0].r].amount/g[h][0].a);for(let v=1;v${e.resource[g[h][w].r].name} ${v}
`}return f}}}),no(`cnt${a}`,a,"c"),u){let h=[1,5,"A"];for(let p=0;p"),w=a,v=h[p],k=+(Zr(w,"manual").multiplier*100).toFixed(0);g.append($(`
${t("manual_crafting_hover_bonus",[k.toLocaleString(),e.resource[w].name])}
`));let P=Ti(!0),j=$(`
${t("manual_crafting_hover_craft")}
`),D=0;if(typeof v!="number"){if(D=e.resource[P[w][0].r].amount/P[w][0].a,P[w].length>1)for(let Q=1;Q${Y(k/100*D,1)} ${e.resource[w].name}`))}else{D=V()*v;let Q=Y(k/100*D,1);j.append($(`${Q} ${e.resource[w].name}`))}let U=$(`
${t("manual_crafting_hover_use")}
`);for(let Q=0;Q${Y(D*P[w][Q].a,1)} ${e.resource[P[w][Q].r].name}`)),Q+1, "));return g.append(j),g.append(U),g};ms(`inc${a}${h[p]}`,a,"manual",f)}}c&&B(`con${a}`,function(){var h=$(`
${t("resource_Crates_plural")} ${e.resource[a].crates}
`);return e.tech.steel_container&&h.append($(`
${t("resource_Containers_plural")} ${e.resource[a].containers}
`)),h}),(a!==e.race.species||e.race.fasting)&&a!=="Crates"&&a!=="Containers"&&i!==-1?no(`inc${a}`,a,"p"):i===-1&&ms(`inc${a}`,a,"auto"),$(`#res${a}`).on("mouseover",function(){$(`.res-${a}`).each(function(){e.resource[a].amount>=$(this).attr(`data-${a}`)?$(this).addClass("hl-ca"):$(this).addClass("hl-cna")})}),$(`#res${a}`).on("mouseout",function(){$(`.res-${a}`).each(function(){$(this).removeClass("hl-ca"),$(this).removeClass("hl-cna")})}),typeof ge.resource>"u"&&(ge.resource={}),ge.resource[a]={color:o,tradable:n,stackable:c}}function Kt(a){if(a===e.race.species?e.resource[a].name=We("name"):e.resource[a].name=a==="Money"?"$":t(`resource_${a}_name`),xe("fool",2022))switch(a){case"Lumber":e.resource[a].name=t("resource_Stone_name");break;case"Stone":e.resource[a].name=t("resource_Lumber_name");break;case"Copper":e.resource[a].name=t("resource_Iron_name");break;case"Iron":e.resource[a].name=t("resource_Copper_name");break;case"Steel":e.resource[a].name=t("resource_Titanium_name");break;case"Titanium":e.resource[a].name=t("resource_Steel_name");break;case"Coal":e.resource[a].name=t("resource_Oil_name");break;case"Oil":e.resource[a].name=t("resource_Coal_name");break;case"Alloy":e.resource[a].name=t("resource_Polymer_name");break;case"Polymer":e.resource[a].name=t("resource_Alloy_name");break;case"Graphene":e.resource[a].name=t("resource_Stanene_name");break;case"Stanene":e.resource[a].name=t("resource_Graphene_name");break;case"Plywood":e.resource[a].name=t("resource_Brick_name");break;case"Brick":e.resource[a].name=t("resource_Plywood_name");break;case"Genes":e.resource[a].name=t("resource_Soul_Gem_name");break;case"Soul_Gem":e.resource[a].name=t("resource_Genes_name");break;case"Slave":e.resource[a].name=t("resource_Peon_name");break}if(a==="Horseshoe"&&(e.resource[a].name=xt()),e.race.artifical&&a==="Genes"&&(e.resource[a].name=t("resource_Program_name")),e.race.sappy)switch(a){case"Stone":e.resource[a].name=t("resource_Amber_name");break}else if(e.race.flier)switch(a){case"Stone":e.resource[a].name=t("resource_Clay_name");break;case"Brick":e.resource[a].name=t("resource_Mud_Brick_name");break}if(e.race.soul_eater)switch(a){case"Food":e.resource[a].name=t("resource_Souls_name");break}if(e.race.evil)switch(a){case"Lumber":e.resource[a].name=t("resource_Bones_name");break;case"Furs":e.resource[a].name=t("resource_Flesh_name");break;case"Plywood":e.resource[a].name=t("resource_Boneweave_name");break}if(e.race.artifical)switch(a){case"Food":e.resource[a].name=t("resource_Signal_name");break}if(xe("halloween").active)switch(a){case"Food":e.resource[a].name=t("resource_Candy_name");break;case"Lumber":e.resource[a].name=t("resource_Bones_name");break;case"Stone":e.resource[a].name=t("resource_RockCandy_name");break;case"Furs":e.resource[a].name=t("resource_Webs_name");break;case"Plywood":e.resource[a].name=t("resource_Boneweave_name");break;case"Brick":e.resource[a].name=t("resource_Tombstone_name");break;case"Soul_Gem":e.resource[a].name=t("resource_CandyCorn_name");break}}function cr(a,r){if($(`#res${a}`).length){let s=$(`#res${a}`);s.detach(),$("#resources").append(s);return}r=r||"special";var i=$(`
${t(`resource_${a}_name`)}{{ count | round }}
`);$("#resources").append(i),C({el:`#res${a}`,data:e.prestige[a],filters:{round(s){return+s.toFixed(3)}}}),!(a==="Artifact"||a==="Blood_Stone")&&B(`res${a}`,function(){let s=$("
");switch(a){case"Plasmid":let n=e.race.no_plasmid?Math.min(e.race.p_mutation,e.prestige.Plasmid.count):e.prestige.Plasmid.count;if(s.append($(`${t(`resource_${a}_desc`,[n,+(gs("plasmid")*100).toFixed(2)])}`)),e.genes.store&&(e.race.universe!=="antimatter"||e.genes.bleed>=3)){let u=E(1,"plasmid");u>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((u-1)*100).toFixed(2)])}`))}break;case"AntiPlasmid":s.append($(`${t(`resource_${a}_desc`,[e.prestige.AntiPlasmid.count,+(gs("antiplasmid")*100).toFixed(2)])}`));let c=E(1,"anti");e.genes.store&&(e.race.universe==="antimatter"||e.genes.bleed>=3)&&c>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((c-1)*100).toFixed(2)])}`));break;case"Phage":s.append($(`${t(e.prestige.AntiPlasmid.count>0?"resource_Phage_desc2":"resource_Phage_desc",[250+e.prestige.Phage.count])}`));let o=E(1,"phage");e.genes.store&&e.genes.store>=4&&o>1&&s.append($(` ${t("resource_Plasmid_desc2",[+((o-1)*100).toFixed(2)])}`));break;case"Dark":switch(e.race.universe){case"standard":s.append($(`${t(`resource_${a}_desc_s`,[+((fe("standard")-1)*100).toFixed(2)])}`));break;case"evil":s.append($(`${t(`resource_${a}_desc_e`,[+((fe("evil")-1)*100).toFixed(2)])}`));break;case"micro":s.append($(`${t(`resource_${a}_desc_m`,[fe("micro",!1),fe("micro",!0)])}`));break;case"heavy":let u=fe("heavy"),d=.25+.5*u,h=.2+.3*u;s.append($(`${t(`resource_${a}_desc_h`,[+(d*100).toFixed(4),+(h*100).toFixed(4)])}`));break;case"antimatter":s.append($(`${t(`resource_${a}_desc_a`,[+((fe("antimatter")-1)*100).toFixed(2)])}`));break;case"magic":s.append($(`${t(`resource_${a}_desc_mg`,[t("resource_Mana_name"),+((fe("magic")-1)*100).toFixed(2)])}`));break}break;case"Harmony":s.append($(`${t(`resource_${a}_desc`,[e.race.universe==="standard"?.1:1,Ei()])}`));break;case"AICore":let l=+((1-.99**e.prestige.AICore.count)*100).toFixed(2);s.append($(`${t(`resource_${a}_desc`,[l])}`));break}return s})}function tu(a){let r=e.tech.currency>=6?-1e6:e.tech.currency>=4?-100:-25;if(e.race.banana){let i=!1;if(Object.keys(e.resource).forEach(function(s){e.resource[s].hasOwnProperty("trade")&&e.resource[s].trade<0&&(i=s)}),i&&i!==a)return!1;r=e.tech.currency>=6?-1e6:e.tech.currency>=4?-25:-10}return!(e.resource[a].trade<=r)}function au(a){let r=e.tech.currency>=6?1e6:e.tech.currency>=4?100:25;return!(e.resource[a].trade>=r)}function qi(a,r,i,s,n){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))&&!((e.race.artifical||e.race.fasting)&&i==="Food")){if(n&&r.append($(`

{{ r.name | namespace }}

`)),e.race.no_trade||(r.append($(`${t("resource_market_buy")}`)),r.append($(`\${{ r.value | buy }}`)),r.append($(`${t("resource_market_sell")}`)),r.append($(`\${{ r.value | sell }}`))),n&&(e.race.banana&&i==="Food"||e.tech.trade&&!e.race.terrifying)){let c=$(`${t("resource_market_routes")}`);r.append(c),c.append($(`-`)),c.append($('')),c.append($(`+`)),c.append($(`${t("cancel_routes")}`)),Ii(i)}C({el:a,data:{r:e.resource[i],m:e.city.market},methods:{aSell(c){let o=Wt[c]===1?t("resource_market_unit"):t("resource_market_units"),l=iu(c),u=Wt[c];if(e.stats.achieve.hasOwnProperty("trade")){let d=e.stats.achieve.trade.l;d>5&&(d=5),u*=1-d/100}return u=+u.toFixed(3),t("resource_market_auto_sell_desc",[u,o,l])},aBuy(c){let o=Wt[c],l=J("dealmaker",0);l&&(o*=1+l/100),e.race.persuasive&&(o*=1+e.race.persuasive/100),e.race.merchant&&(o*=1+b.merchant.vars()[1]/100);let u=X("goblin");if(u>0&&(o*=1+b.merchant.vars(1)[1]/100*u),e.genes.trader){let p=mt();o*=1+p/100}if(e.stats.achieve.hasOwnProperty("trade")){let p=e.stats.achieve.trade.l;p>5&&(p=5),o*=1+p/50}e.race.truepath&&(o*=1-e.civic.foreign.gov3.hstl/101),o=+o.toFixed(3);let d=o===1?t("resource_market_unit"):t("resource_market_units"),h=su(c);return t("resource_market_auto_buy_desc",[o,d,h])},purchase(c){if(!e.race.no_trade&&!e.settings.pause){let o=e.city.market.qty,l=e.resource[c].value;e.race.arrogant&&(l*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(l*=1-b.conniving.vars()[0]/100);let u=X("imp");u>0&&(l*=1-b.conniving.vars(1)[0]/100*u);let d=Math.floor(Math.min(o,e.resource.Money.amount/l,e.resource[c].max-e.resource[c].amount));d>0&&(e.resource[c].amount+=d,e.resource.Money.amount-=Math.round(l*d),e.resource[c].value+=Number((d/Math.rand(1e3,1e4)).toFixed(2)))}},sell(c){if(!e.race.no_trade&&!e.settings.pause){let o=e.city.market.qty,l=4;e.race.merchant&&(l*=1-b.merchant.vars()[0]/100);let u=X("goblin");u>0&&(l*=1-b.merchant.vars(1)[0]/100*u),e.race.asymmetrical&&(l*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&(l*=1-b.conniving.vars()[1]/100);let d=X("imp");d>0&&(l*=1-b.conniving.vars(1)[1]/100*d);let h=e.resource[c].value/l,p=Math.floor(Math.min(o,e.resource[c].amount,(e.resource.Money.max-e.resource.Money.amount)/h));p>0&&(e.resource[c].amount-=p,e.resource.Money.amount+=Math.round(h*p),e.resource[c].value-=Number((p/Math.rand(1e3,1e4)).toFixed(2)),e.resource[c].value0&&(d+=e.resource[h].trade)}),u<=d)break}if(e.resource[c].trade>=0)if(au(c)&&e.city.market.trade0&&(o*=1-b.merchant.vars(1)[0]/100*l),e.race.asymmetrical&&(o*=1+b.asymmetrical.vars()[0]/100),Y(c*e.city.market.qty/o,0)},trade(c){if(i==="Stone"&&(c===31||c===-31)){let o=pt(3,12,!1);if(o.length>0)return o}return c<0?(c=0-c,`-${c}`):c>0?`+${c}`:0},namespace(c){return c.replace("_"," ")}}})}}function ru(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0)||($("#market").append($(`

${t("galaxy_trade")}

`)),jn())}function fs(){return[{buy:{res:"Deuterium",vol:5},sell:{res:"Helium_3",vol:25}},{buy:{res:"Neutronium",vol:2.5},sell:{res:"Copper",vol:200}},{buy:{res:"Adamantite",vol:3},sell:{res:"Iron",vol:300}},{buy:{res:"Elerium",vol:1},sell:{res:"Oil",vol:125}},{buy:{res:"Nano_Tube",vol:10},sell:{res:"Titanium",vol:20}},{buy:{res:"Graphene",vol:25},sell:{res:e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Lumber",vol:1e3}},{buy:{res:"Stanene",vol:40},sell:{res:"Aluminium",vol:800}},{buy:{res:"Bolognium",vol:.75},sell:{res:"Uranium",vol:4}},{buy:{res:"Vitreloy",vol:1},sell:{res:"Infernite",vol:1}}]}function jn(a){let r=a||$("#galaxyTrade");if(a||A($("#galaxyTrade")),e.galaxy.trade){r.append($(`
${t("galaxy_trade")}
`));let i=fs();for(let n=0;n');r.append(c),c.append($(`${e.resource[i[n].buy.res].name}`)),c.append($(`+{{ '${n}' | t_vol }}/s`)),c.append($(`${e.resource[i[n].sell.res].name}`)),c.append($(`-{{ '${n}' | s_vol }}/s`));let o=$(`${t("resource_market_routes")}`);c.append(o);let l=t("galaxy_freighter_assign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]),u=t("galaxy_freighter_unassign",[e.resource[i[n].buy.res].name,e.resource[i[n].sell.res].name]);o.append($(`-`)),o.append($(`{{ g.f${n} }}`)),o.append($(`+`)),o.append($(`${t("cancel_routes")}`))}let s=$(`
${t("resource_market_galactic_trade_routes")} {{ g.cur }} / {{ g.max }}
`);s.append($(`${t("cancel_all_routes")}`)),r.append(s)}C({el:a?"#specialModal":"#galaxyTrade",data:{g:e.galaxy.trade,t:e.tech},methods:{less(i){let s=V();e.galaxy.trade[`f${i}`]>=s?(e.galaxy.trade[`f${i}`]-=s,e.galaxy.trade.cur-=s):(e.galaxy.trade.cur-=e.galaxy.trade[`f${i}`],e.galaxy.trade[`f${i}`]=0)},more(i){let s=V();e.galaxy.trade.cure.galaxy.trade.max-e.galaxy.trade.cur&&(s=e.galaxy.trade.max-e.galaxy.trade.cur),e.galaxy.trade[`f${i}`]+=s,e.galaxy.trade.cur+=s)},zero(i){if(i)e.galaxy.trade.cur-=e.galaxy.trade[`f${i}`],e.galaxy.trade[`f${i}`]=0;else{let s=fs();for(let n=0;n0&&(n*=1+b.merchant.vars(1)[1]/100*c),e.genes.trader){let o=mt();n*=1+o/100}if(e.stats.achieve.hasOwnProperty("trade")){let o=e.stats.achieve.trade.l;o>5&&(o=5),n*=1+o/50}return n=+n.toFixed(2),n},s_vol(i){let n=fs()[i].sell.vol;if(e.stats.achieve.hasOwnProperty("trade")){let c=e.stats.achieve.trade.l;c>5&&(c=5),n*=1-c/100}return n=+n.toFixed(2),n}}}),B("galacticTradeTotal",function(){let i=$('
');return Ce.hasOwnProperty("gt_route")&&Object.keys(Ce.gt_route).forEach(function(s){Ce.gt_route[s]>0&&i.append(``)}),i.append(``),i},{elm:"#galacticTradeTotal > span"})}function po(a){let r=V(),i=ys();r>e.resource[a].crates&&(r=e.resource[a].crates),r>0&&(e.resource.Crates.amount+=r,e.resource.Crates.max+=r,e.resource[a].crates-=r,e.resource[a].max-=i*r)}function ho(a){let r=V(),i=ys();r>e.resource.Crates.amount&&(r=e.resource.Crates.amount),r>0&&(e.resource.Crates.amount-=r,e.resource.Crates.max-=r,e.resource[a].crates+=r,e.resource[a].max+=i*r)}function mo(a){let r=V(),i=bs();r>e.resource[a].containers&&(r=e.resource[a].containers),r>0&&(e.resource.Containers.amount+=r,e.resource.Containers.max+=r,e.resource[a].containers-=r,e.resource[a].max-=i*r)}function fo(a){let r=V(),i=bs();r>e.resource.Containers.amount&&(r=e.resource.Containers.amount),r>0&&(e.resource.Containers.amount-=r,e.resource.Containers.max-=r,e.resource[a].containers+=r,e.resource[a].max+=i*r)}function Pi(a,r,i,s){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){if(r.append($(`

{{ name }}

`)),e.resource.Crates.display){let n=$(`${t("resource_Crates_name")}`);r.append(n),n.append($(`«`)),n.append($(``)),n.append($(`»`))}if(e.resource.Containers.display){let n=$(`${t("resource_Containers_name")}`);r.append(n),n.append($(`«`)),n.append($('')),n.append($(`»`))}C({el:a,data:e.resource[i],methods:{addCrate(n){ho(n)},subCrate(n){po(n)},addCon(n){fo(n)},subCon(n){mo(n)}},filters:{trick(n){if(i==="Stone"&&e.resource[i].crates===10&&e.resource[i].containers===31){let c=pt(4,13,!0);if(c.length>0)return c}return n},cCnt(n,c){if(c==="Food"&&!e.race.artifical||e.race.artifical&&c==="Coal"||c==="Souls"){let o=Ze(13,10);if(n===10&&o.length>0)return"1"+o}return n}}})}}function iu(a){let r=4;e.race.merchant&&(r*=1-b.merchant.vars()[0]/100);let i=X("goblin");i>0&&(r*=1-b.merchant.vars(1)[0]/100*i),e.race.asymmetrical&&(r*=1+b.asymmetrical.vars()[0]/100),e.race.conniving&&r--;let s=e.resource[a].value*Wt[a]/r;if(e.city.wharf&&(s=s*(1+e.city.wharf.count*.01)),e.space.gps&&e.space.gps.count>3&&(s=s*(1+e.space.gps.count*.01)),e.tech.railway){let n=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?.03:.02;s=s*(1+e.tech.railway*n)}if(e.race.truepath&&!e.race.lone_survivor&&(s*=1-e.civic.foreign.gov3.hstl/101),e.race.inflation&&(s*=1+e.race.inflation/500),e.race.witch_hunter&&e.resource.Sus.amount>50){let n=(e.resource.Sus.amount-50)/52;s*=1-n}return s*=te("psychic_cash"),s=+s.toFixed(1),s}function su(a){let r=e.resource[a].value;e.race.arrogant&&(r*=1+b.arrogant.vars()[0]/100),e.race.conniving&&(r*=1-b.conniving.vars()[0]/100);let i=X("imp");i>0&&(r*=1-b.conniving.vars(1)[0]/100*i);let s=r*Wt[a];if(e.city.wharf&&(s=s*.99**e.city.wharf.count),e.space.gps&&e.space.gps.count>3&&(s=s*.99**e.space.gps.count),e.tech.railway){let n=e.stats.achieve.banana&&e.stats.achieve.banana.l>=1?.97:.98;s=s*n**e.tech.railway}if(e.race.truepath&&!e.race.lone_survivor&&(s*=1+e.civic.foreign.gov3.hstl/101),e.race.inflation&&(s*=1+e.race.inflation/300),e.race.quarantine&&(s*=1+Math.round(e.race.quarantine**3.5)),e.race.witch_hunter&&e.resource.Sus.amount>50){let n=(e.resource.Sus.amount-50)/8;s*=1+n}return s=+s.toFixed(1),s}function ms(a,r,i,s){B(`${a}`,function(){let n=$('
{{ res.name | namespace }}
'),c=$('
');n.append(c);let o=Zr(r,i),l=$("
");c.append(l),i==="auto"&&Ce.p[r]&&Object.keys(Ce.p[r]).forEach(function(p){let f=Ce.p[r][p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),l.append(``)}}),Object.keys(o.multi_bd).forEach(function(p){let f=o.multi_bd[p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),l.append(``)}});let u=$('
'),d=$(`
${t("craft_tools_multi")}
`);u.append(d);let h=0;if(Object.keys(o.add_bd).forEach(function(p){let f=o.add_bd[p],g=parseFloat(f.slice(0,-1));if(g!=0&&!isNaN(g)){h++;let w=g>0?"success":"danger",v=p.replace(/\+.+$/,"");p=p.replace(/'/g,"\\'"),u.append(``)}}),h>0&&c.append(u),Ce.p.consume&&Ce.p.consume[r]){let p=$('
'),f=0;Object.keys(Ce.p.consume[r]).forEach(function(g){let w=Ce.p.consume[r][g];if(w!=0&&!isNaN(w)){f++;let v=w>0?"success":"danger",k=g.replace(/\+.+$/,"");g=g.replace(/'/g,"\\'"),p.append(``)}}),f>0&&c.append(p)}return e.resource[r].diff<0&&e.resource[r].amount>0&&n.append(``),s&&(n.append(''),n.append(s)),n},{in:function(){C({el:"#popper > div",data:{[r]:Ce.p[r],res:e.resource[r],consume:Ce.p.consume,craft:Zr(r,i)},filters:{translate(n){let c=n[n.length-1],o=parseFloat(n.slice(0,-1)),l=o>0&&o<1||o<0&&o>-1?4:o>0&&o<10||o<0&&o>-10?3:2;o=+o.toFixed(l);let u=c==="%"?"%":"";if(o>0)return"+"+Y(o,l)+u;if(o<0)return Y(o,l)+u},fix(n){return n+"v"},counter(n){let c=-e.resource[r].diff,o=+(n/c).toFixed(0);if(o>60){let l=o%60,u=(o-l)/60;if(u>=60){let d=u%60;return`${(u-d)/60}h ${d}m`}else return`${u}m ${l}s`}else return`${o}s`},namespace(n){return n.replace("_"," ")}}})},out:function(){C({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function no(a,r,i){B(`${a}`,function(){let s=$('
{{ res.name | namespace }}
');i==="p"&&r===e.race.species&&(s=$(`
${t("starvation_resist")}
`));let n=$('
');s.append(n);let c=!1;if(Ce[i][r]&&!(e.race.species===r&&i==="p")){let l=$("
");n.append(l);let u=[r];u.push("Global");for(var o=0;o0?"success":"danger",w=h.replace(/\+.+$/,"");h=h.replace(/'/g,"\\'"),l.append(``)}})}}if(Ce[i].consume&&Ce[i].consume[r]){let l=$(`
`),u=0;Object.keys(Ce[i].consume[r]).forEach(function(d){let h=Ce[i].consume[r][d];if(h!=0&&!isNaN(h)){u++;let p=h>0?"success":"danger",f=d.replace(/\+.+$/,"");d=d.replace(/'/g,"\\'"),l.append(``)}}),u>0&&n.append(l)}if(i==="p"&&r!==e.race.species){let l=e.resource[r].diff>0?"success":"danger";s.append(``)}return s},{in:function(){C({el:"#popper > div",data:{Global:Ce[i].Global,[r]:Ce[i][r],consume:Ce[i].consume,res:e.resource[r]},filters:{translate(s){let n=s[s.length-1],c=parseFloat(s.slice(0,-1)),o=c>0&&c<1||c<0&&c>-1?4:c>0&&c<10||c<0&&c>-10?3:2,l=n==="%"?"%":"";if(c>0)return"+"+Y(c,o)+l;if(c<0)return Y(c,o)+l},fix(s){return s+"v"},counter(s){let n=e.resource[r].diff,c=0;if(n<0?(n*=-1,c=+(s/n).toFixed(0)):c=+((e.resource[r].max-s)/n).toFixed(0),c===1/0||Number.isNaN(c))return"Never";if(c>60){let o=c%60,l=(c-o)/60;if(l>=60){let u=l%60;return`${(l-u)/60}h ${u}m`}else return`${l}m ${o}s`}else return`${c}s`},direction(s){return s>=0?t("to_full"):t("to_empty")},namespace(s){return s.replace("_"," ")}}})},out:function(){C({el:"#popper > div"},"destroy")},classes:"breakdown has-background-light has-text-dark",prop:{modifiers:{preventOverflow:{enabled:!1},hide:{enabled:!1}}}})}function nu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=e.race.no_trade?" nt":"";var r=$(`
${t("resource_market_trade_routes")} / {{ mtrade }}
`);r.append($(`${t("cancel_all_routes")}`)),$("#market").append(r),C({el:"#tradeTotal",data:e.city.market,methods:{zero(){Object.keys(e.resource).forEach(function(i){e.resource[i].trade&&(e.city.market.trade-=Math.abs(e.resource[i].trade),e.resource[i].trade=0,Ii(i))})}},filters:{tdeCnt(i){let s=Ze(17,11);return(i===100&&!e.tech.isolation&&!e.race.cataclysm||i===10&&(e.tech.isolation||e.race.cataclysm))&&s.length>0?"10"+s:i}}}),B("tradeTotalPopover",function(){let i=$('
');return Ce.hasOwnProperty("t_route")&&Object.keys(Ce.t_route).forEach(function(s){Ce.t_route[s]>0&&i.append(``)}),i.append(``),i},{elm:"#tradeTotalPopover > span"})}function cu(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))){var a=$(`
${t("resource_Crates_name")}{{ cr.amount }} / {{ cr.max }}${t("resource_Containers_name")}{{ cn.amount }} / {{ cn.max }}
`);$("#resStorage").append(a),C({el:"#crateTotal",data:{cr:e.resource.Crates,cn:e.resource.Containers}})}}function Ii(a){$(`#market-${a} .trade .current`).removeClass("has-text-warning"),$(`#market-${a} .trade .current`).removeClass("has-text-danger"),$(`#market-${a} .trade .current`).removeClass("has-text-success"),e.resource[a].trade>0?$(`#market-${a} .trade .current`).addClass("has-text-success"):e.resource[a].trade<0?$(`#market-${a} .trade .current`).addClass("has-text-danger"):$(`#market-${a} .trade .current`).addClass("has-text-warning")}function go(){let a=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?e.resource.Chrysotile.name:e.resource.Stone.name:e.resource.Plywood?e.resource.Plywood.name:t("resource_Plywood_name"),r=e.race.kindling_kindred||e.race.smoldering?200:10;return t("resource_modal_crate_construct_desc",[r,a,ys()])}function vo(){return t("resource_modal_container_construct_desc",[125,bs()])}function qn(a,r){switch(a){case"crate":Fn(r);break;case"container":zn(r);break}}function Fn(a){let r=a||V(),i=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood",s=e.race.kindling_kindred||e.race.smoldering?200:10;r+e.resource.Crates.amount>e.resource.Crates.max&&(r=e.resource.Crates.max-e.resource.Crates.amount),e.resource[i].amount=s*r&&e.resource.Crates.amounte.resource.Containers.max&&(r=e.resource.Containers.max-e.resource.Containers.amount),e.resource.Steel.amount<125*r&&(r=Math.floor(e.resource.Steel.amount/125)),e.resource.Steel.amount>=125*r&&e.resource.Containers.amount{{ name }} - {{ amount | size }}/{{ max | size }}

'));let r=$('
');if($("#modalBox").append(r),a==="Food"&&!e.race.artifical||e.race.artifical&&a==="Coal"||a==="Souls"){let l=Ze(7,10);l.length>0&&$("#modalBoxTitle").prepend(l)}if(a==="Stone"){let l=pt(1,12,!1);l.length>0&&$("#modalBoxTitle").prepend(l)}let i=$('
');r.append(i),i.append($(`
${t("resource_modal_crate_owned")} {{ crates.amount }}/{{ crates.max }}${t("resource_modal_crate_assigned")} {{ res.crates }}
`));let s=$(``),n=$(``),c=$(``);if(i.append(s),i.append(n),i.append(c),C({el:"#modalCrates",data:{crates:e.resource.Crates,res:e.resource[a]},methods:{buildCrate(){Fn()},subCrate(l){po(l)},addCrate(l){ho(l)}}}),e.resource.Containers.display){let l=$('
');r.append(l),l.append($(`
${t("resource_modal_container_owned")} {{ containers.amount }}/{{ containers.max }}${t("resource_modal_container_assigned")} {{ res.containers }}
`));let u=$(``),d=$(``),h=$(``);l.append(u),l.append(d),l.append(h),C({el:"#modalContainers",data:{containers:e.resource.Containers,res:e.resource[a]},methods:{buildContainer(){zn()},removeContainer(p){mo(p)},addContainer(p){fo(p)}}})}C({el:"#modalBoxTitle",data:e.resource[a],filters:{size:function(l){return Y(l,0)},diffSize:function(l){return Y(l,2)}}});function o(l,u){if(l==="modalContainers"){let d=bs();switch(u){case"assign":return t("resource_modal_container_assign_desc",[d]);case"unassign":return t("resource_modal_container_unassign_desc",[d]);case"construct":return vo()}}else{let d=ys();switch(u){case"assign":return t("resource_modal_crate_assign_desc",[d]);case"unassign":return t("resource_modal_crate_unassign_desc",[d]);case"construct":return go()}}}["modalCrates","modalContainers"].forEach(function(l){["assign","unassign","construct"].forEach(function(u){B(`${l}${u}`,o(l,u),{elm:$(`#${l} > .${u}`),attach:"#main"})})})}function yo(){e.settings.showResources||(e.settings.marketTabs=1),e.settings.showResources=!0,e.settings.showStorage=!0,ka("storage"),Te()}function bo(){e.resource.Crates.display||(I(t("city_storage_yard_msg"),"info",!1,["progress"]),e.resource.Crates.display=!0,yo())}function sa(){e.resource.Containers.display||(I(t("city_warehouse_msg"),"info",!1,["progress"]),e.resource.Containers.display=!0,yo())}function ys(){let a=e.tech.container&&e.tech.container>=2?500:350;e.tech.container&&e.tech.container>=4&&(a+=e.tech.container>=5?500:250),e.tech.container&&e.tech.container>=6&&(a+=e.tech.container>=7?1200:500),e.tech.container&&e.tech.container>=8&&(a+=4e3),e.race.pack_rat&&(a*=1+b.pack_rat.vars()[0]/100);let r=X("kobold");return r>0&&(a*=1+b.pack_rat.vars(1)[0]/100*r),e.stats.achieve.banana&&e.stats.achieve.banana.l>=3&&(a*=1.1),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(E(a))}function bs(){let a=e.tech.steel_container&&e.tech.steel_container>=3?1200:800;e.tech.steel_container&&e.tech.steel_container>=4&&(a+=e.tech.steel_container>=5?1e3:400),e.tech.steel_container&&e.tech.steel_container>=6&&(a+=e.tech.steel_container>=7?7500:1e3),e.tech.steel_container&&e.tech.steel_container>=8&&(a+=8e3),e.race.pack_rat&&(a*=1+b.pack_rat.vars()[0]/100);let r=X("kobold");return r>0&&(a*=1+b.pack_rat.vars(1)[0]/100*r),a*=e.stats.achieve.blackhole?1+e.stats.achieve.blackhole.l*.05:1,Math.round(E(a))}function co(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=$(`

${t("resource_market")}

`);A($("#market")),$("#market").append(a),lu()}function oo(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==1))return;let a=$(`

${t("tab_storage")}

`);A($("#resStorage")),$("#resStorage").append(a),e.resource.Crates&&e.resource.Containers&&(a.append($(``)),a.append($(``)),C({el:"#createHead",data:{cr:e.resource.Crates,cn:e.resource.Containers},methods:{crate(){Fn()},container(){zn()},buildCrateDesc(){return go()},buildContainerDesc(){return vo()}}}))}function lu(){if(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==0))return;let a=$("#market-qty");A(a),e.race.no_trade||(a.append($(`

${t("resource_trade_qty")}

`)),a.append($('-+'))),C({el:"#market-qty",data:e.city.market,methods:{val(){e.city.market.qty<1?e.city.market.qty=1:e.city.market.qty>Sn()&&(e.city.market.qty=Sn())},limit(){return Sn()},less(){e.city.market.qty-=V()},more(){e.city.market.qty+=V()}}})}function Sn(){return e.tech.currency>=6?1e6:e.tech.currency>=4?5e3:100}function lo(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==2))&&(A($("#resEjector")),e.interstellar.mass_ejector)){let a=$(`

${t("interstellar_mass_ejector_vol")}

`);$("#resEjector").append(a);let r=$('');a.append(r),r.append($(`{{ total }} / {{ on | max }}{{ on | real }}${t("interstellar_mass_ejector_mass")}: {{ mass | approx }} kt/s`)),C({el:"#eject",data:e.interstellar.mass_ejector,filters:{max(i){return i*1e3},real(i){return G.mass_ejector

${e.resource[a].name}

`);$("#resEjector").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ e.${a} }}`)),s.append($(`»`)),s.append($(`${t("interstellar_mass_ejector_per")}: ${Re[a]} kt`)),e.interstellar.mass_ejector.hasOwnProperty(a)||(e.interstellar.mass_ejector[a]=0),C({el:`#eject${a}`,data:{r:e.resource[a],e:e.interstellar.mass_ejector},methods:{ejectMore(n){let c=V();c+e.interstellar.mass_ejector.total>G.mass_ejector*1e3&&(c=G.mass_ejector*1e3-e.interstellar.mass_ejector.total),e.interstellar.mass_ejector[n]+=c,e.interstellar.mass_ejector.total+=c},ejectLess(n){let c=V();c>e.interstellar.mass_ejector[n]&&(c=e.interstellar.mass_ejector[n]),e.interstellar.mass_ejector[n]>0&&(e.interstellar.mass_ejector[n]-=c,e.interstellar.mass_ejector.total-=c)}}})}}function uo(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&(A($("#resCargo")),e.portal.transport)){let a=$(`

${t("portal_transport_supply")}

`);$("#resCargo").append(a);let r=$('{{ used }} / {{ max }}');a.append(r),C({el:"#spireSupply",data:e.portal.transport.cargo})}}function pn(a,r){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==3))&&Ur[a]&&e.portal.transport){let i=$(`

${e.resource[a].name}

`);$("#resCargo").append(i);let s=$('');i.append(s),s.append($(`«`)),s.append($(`{{ e.${a} }}`)),s.append($(`»`));let n=Y(Ur[a].out);s.append($(`${t("portal_transport_item",[`${n}`,`${Ur[a].in}`])}`)),e.portal.transport.cargo.hasOwnProperty(a)||(e.portal.transport.cargo[a]=0),C({el:`#supply${a}`,data:{r:e.resource[a],e:e.portal.transport.cargo},methods:{supplyMore(c){let o=V();o+e.portal.transport.cargo.used>e.portal.transport.cargo.max&&(o=e.portal.transport.cargo.max-e.portal.transport.cargo.used,e.portal.transport.cargo[c]+o<0&&(o=-e.portal.transport.cargo[c])),e.portal.transport.cargo[c]+=o,e.portal.transport.cargo.used+=o},supplyLess(c){let o=V();o>e.portal.transport.cargo[c]&&(o=e.portal.transport.cargo[c]),e.portal.transport.cargo[c]>0&&(e.portal.transport.cargo[c]-=o,e.portal.transport.cargo.used-=o)}}})}}function _o(){!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4)||A($("#resAlchemy"))}function hn(a,r,i){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==4||e.settings.marketTabs!==4))&&!(e.race.artifical&&a==="Food")&&e.tech.alchemy&&(i||e.tech.alchemy>=2)&&a!=="Crystal"){let s=$(`

${e.resource[a].name}

`);$("#resAlchemy").append(s);let n=$('');s.append(n),n.append($(`«`)),n.append($(`{{ a.${a} }}`)),n.append($(`»`)),e.race.alchemy.hasOwnProperty(a)||(e.race.alchemy[a]=0),C({el:`#alchemy${a}`,data:{r:e.resource[a],a:e.race.alchemy},methods:{addSpell(c){let o=V();for(let l=0;l=1;l++)e.race.alchemy[c]++,e.resource.Mana.diff--},subSpell(c){let o=V();for(let l=0;l0;l++)e.race.alchemy[c]--,e.resource.Mana.diff++}}}),B(`alchemy${a}`,function(){let c=i&&e.tech.alchemy>=2?Wt[a]*8:Wt[a]*2;return e.race.witch_hunter&&(c*=3),e.stats.achieve.soul_sponge&&e.stats.achieve.soul_sponge.mg&&(c*=e.stats.achieve.soul_sponge.mg+1),$(`
${t("resource_alchemy",[1,t("resource_Mana_name"),.15,t("resource_Crystal_name"),+c.toFixed(2),e.resource[a].name])}
`)},{elm:`#alchemy${a} h3`})}}var E=function(){var a={};return function(r,i,s){let n=i||"a",c=[e.race.universe,e.prestige.Plasmid.count,e.prestige.AntiPlasmid.count,e.prestige.Phage.count,e.race.no_plasmid||"0",e.race.p_mutation||"0",e.race.nerfed||"0",e.genes.store||"0",e.genes.bleed||"0",e.city.temple?e.city.temple.count:"0",e.space.ziggurat?e.space.ziggurat.count:"0",e.race.cataclysm?e.race.cataclysm:"0",e.race.orbit_decayed?e.race.orbit_decayed:"0",e.genes.ancients||"0",e.civic.priest?e.civic.priest.workers:"0"].join("-");if(a[n]||(a[n]={}),!a[n][c]||s){let o=1,l=!!(e.race.cataclysm||e.race.orbit_decayed);if(e.genes.store){let u=0;if(!i||i&&(i==="plasmid"&&e.race.universe!=="antimatter"||i==="anti"&&e.race.universe==="antimatter")){u=e.race.universe==="antimatter"?e.prestige.AntiPlasmid.count:e.prestige.Plasmid.count;let h=u;e.race.no_plasmid?h=Math.min(e.race.p_mutation,u):e.race.nerfed&&(h=Math.floor(u/(e.race.universe==="antimatter"?2:5))),u=Math.round(h*(e.race.nerfed?.5:1))}(!i||i&&i==="phage")&&e.genes.store>=4&&(u+=Math.round(e.prestige.Phage.count*(e.race.nerfed?1/3:1)));let d=e.genes.store>=2?e.genes.store>=3?1250:1666:2500;if(e.race.universe==="antimatter"&&(d*=2),e.genes.bleed&&e.genes.bleed>=3&&(!i||i&&(i==="plasmid"&&e.race.universe==="antimatter"||i==="anti"&&e.race.universe!=="antimatter"))){let h=e.race.universe==="antimatter"?e.prestige.Plasmid.count/5:e.prestige.AntiPlasmid.count/10;u+=Math.round(h*(e.race.nerfed?.5:1))}o*=1+u/d}if(e.race.universe==="standard"&&(o*=fe("standard")),e.race.universe==="antimatter"&&(!l&&e.city.temple&&e.city.temple.count||l&&e.space.ziggurat&&e.space.ziggurat.count)){let u=.06;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let d=e.genes.ancients>=5?.0012:e.genes.ancients>=3?.001:8e-4;e.race.high_pop&&(d=ve(d)),u+=d*e.civic.priest.workers}o*=1+(l?e.space.ziggurat.count:e.city.temple.count)*u}if(!i&&e.pillars){let u=na();o*=u[1]}a[n]={},a[n][c]=o}return i?a[n][c]*r:Math.round(a[n][c]*r)}}();function wo(){let a=0;return!!(e.race.cataclysm||e.race.orbit_decayed)&&e.space.ziggurat?a=e.space.ziggurat.count:e.city.temple&&(a=e.city.temple.count),a}function An(a=-1){if((e.race.no_plasmid||e.race.universe==="antimatter")&&(a==-1&&(a=wo()),a>0)){let r=e.tech.anthropology&&e.tech.anthropology>=1?.016:.01;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=He(e.civic.professor.workers,"professor")*ve(e.race.universe==="antimatter"?2e-4:4e-4);r+=s}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?15e-5:e.genes.ancients>=3?125e-6:1e-4;r+=ve(s)*He(e.civic.priest.workers,"priest")}e.race.universe==="antimatter"?r/=e.race.nerfed?3:2:e.race.nerfed&&(r/=2),e.race.spiritual&&(r*=1+b.spiritual.vars()[0]/100);let i=X("seraph");return i>0&&(r*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(r*=1+Ee.theocracy()[0]/100),e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),a*r}return 0}function Tn(a=-1){if(!e.race.no_plasmid&&e.race.universe!=="antimatter"&&(a==-1&&(a=wo()),a>0)){let r=e.tech.anthropology&&e.tech.anthropology>=1?.08:.05;if(e.tech.fanaticism&&e.tech.fanaticism>=2){let s=He(e.civic.professor.workers,"professor")*ve(.002);r+=s}if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.0015:e.genes.ancients>=3?.00125:.001;r+=ve(s)*He(e.civic.priest.workers,"priest")}e.race.spiritual&&(r*=1+b.spiritual.vars()[0]/100);let i=X("seraph");return i>0&&(r*=1+b.spiritual.vars(1)[0]/100*i),e.civic.govern.type==="theocracy"&&(r*=1+Ee.theocracy()[0]/100),e.race.ooze&&(r*=1-b.ooze.vars()[1]/100),e.race.orbit_decayed&&e.race.truepath&&(r*=.1),a*r}return 0}var gs=function(){var a={};return function(r){let i=[e.race.universe,e.prestige.Plasmid.count,e.prestige.AntiPlasmid.count,e.prestige.Phage.count,e.civic.govern.type,e.civic.professor.assigned,e.genes.bleed||"0",e.race.decayed||"0",e.race.gene_fortify||"0",e.tech.anthropology||"0",e.tech.fanaticism||"0",e.race.nerfed||"0",e.race.no_plasmid||"0",e.genes.ancients||"0",e.city.temple?e.city.temple.count:"0",e.space.ziggurat?e.space.ziggurat.count:"0",e.civic.priest?e.civic.priest.workers:"0",e.race.orbit_decayed?e.race.orbit_decayed:"0",e.race.spiritual||"0",e.tech.outpost_boost||"0",G.alien_outpost||"0"].join("-");if(!a[i]){let s=0,n=0;if(e.race.universe!=="antimatter"||e.genes.bleed){let o=e.race.no_plasmid?Math.min(e.race.p_mutation,e.prestige.Plasmid.count):e.prestige.Plasmid.count;e.race.universe==="antimatter"&&e.genes.bleed&&(o*=.025),e.race.decayed&&(o-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let l=250+e.prestige.Phage.count;o>l?s=+(Math.log(l+50)-3.91202).toFixed(5)/2.888+Math.log(o+1-l)/Math.LN2/250:o<0?s=0:s=+(Math.log(o+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&G.alien_outpost&&(s*=2);let u=Tn();s*=1+u}if(e.race.universe==="antimatter"||e.genes.bleed&&e.genes.bleed>=2){let o=e.prestige.AntiPlasmid.count;e.race.universe!=="antimatter"&&e.genes.bleed&&e.genes.bleed>=2&&(o*=.25),e.race.decayed&&(o-=Math.round((e.stats.days-e.race.decayed)/(300+e.race.gene_fortify*6)));let l=250+e.prestige.Phage.count;o>l?n=+(Math.log(l+50)-3.91202).toFixed(5)/2.888+Math.log(o+1-l)/Math.LN2/250:o<0?n=0:n=+(Math.log(o+50)-3.91202).toFixed(5)/2.888,e.tech.outpost_boost&&e.race.truepath&&G.alien_outpost&&(n*=2),n/=3}e.race.nerfed&&(e.race.universe==="antimatter"?(s/=2,n/=2):(s/=5,n/=5)),a={};let c=(1+s)*(1+n)-1;a[i]=[c,s,n]}return r&&r==="raw"?a[i]:r&&r==="plasmid"?a[i][1]:r&&r==="antiplasmid"?a[i][2]:a[i][0]}}();var or={club:{id:"tech-club",title:t("tech_club"),desc:t("tech_club_desc"),category:"agriculture",era:"primitive",reqs:{},grant:["primitive",1],cost:{Lumber(){return e.race.kindling_kindred||e.race.smoldering?0:5},Stone(){return e.race.kindling_kindred||e.race.smoldering?5:0}},action(){return _($(this)[0])?(e.resource.Food.display=!0,!0):!1}},bone_tools:{id:"tech-bone_tools",title:t("tech_bone_tools"),desc:t("tech_bone_tools_desc"),category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition(){return!(e.race.soul_eater&&!e.race.evil)},cost:{Food(){return e.race.evil&&!e.race.smoldering||e.race.fasting?0:10},Lumber(){return e.race.evil&&!e.race.smoldering||e.race.fasting?10:0}},action(){return _($(this)[0])?(e.resource.Stone.display=!0,e.race.smoldering&&(e.resource.Chrysotile.display=!0),!0):!1}},wooden_tools:{id:"tech-wooden_tools",title(){return e.race.kindling_kindred?t("tech_bone_tools"):t("tech_wooden_tools")},desc(){return e.race.kindling_kindred?t("tech_bone_tools_desc"):t("tech_wooden_tools_desc")},category:"stone_gathering",era:"primitive",reqs:{primitive:1},grant:["primitive",2],condition(){return!!(e.race.soul_eater&&!e.race.evil)},cost:{Lumber(){return 10}},action(){return _($(this)[0])?(e.resource.Stone.display=!0,e.race.smoldering&&(e.resource.Chrysotile.display=!0),!0):!1}},sundial:{id:"tech-sundial",title(){return e.race.unfathomable?t("tech_moondial"):t("tech_sundial")},desc(){return e.race.unfathomable?t("tech_moondial_desc"):t("tech_sundial_desc")},category:"science",era:"primitive",reqs:{primitive:2},condition(){return!!(!e.race.gravity_well||e.race.gravity_well&&e.tech.transport)},grant:["primitive",3],cost:{Lumber(){return 8},Stone(){return 10}},effect(){return e.race.unfathomable?t("tech_moondial_effect"):t("tech_sundial_effect")},action(){return _($(this)[0])?(I(t("tech_sundial_msg"),"info",!1,["progress"]),e.resource.Knowledge.display=!0,e.city.calendar.day++,e.race.infectious&&(e.civic.garrison.display=!0,e.settings.showCivic=!0,e.city.garrison={count:0,on:0}),e.race.banana&&!e.race.terrifying&&(e.settings.showResources=!0,e.settings.showMarket=!0,e.resource.Money.display=!0,e.city.market.active=!0,e.tech.currency=2),e.race.calm&&(e.resource.Zen.display=!0,e.city.meditation={count:0}),!0):!1}},wheel:{id:"tech-wheel",title(){return t("tech_wheel")},desc(){return t("tech_wheel_desc")},category:"transport",era:"primitive",reqs:{primitive:2},grant:["transport",1],trait:["gravity_well"],cost:{Lumber(){return 50},Stone(){return 25}},effect(){return t("tech_wheel_effect")},action(){return _($(this)[0])?(e.civic.teamster.display=!0,!0):!1}},wagon:{id:"tech-wagon",title(){return t("tech_wagon")},desc(){return t("tech_wagon")},category:"transport",era:"civilized",reqs:{transport:1},condition(){return!!(e.tech.farm||e.tech.s_lodge||e.tech.hunting&&e.tech.hunting>=2||e.race.soul_eater&&e.race.species!=="wendigo"&&e.tech.housing>=1&&e.tech.currency>=1)},grant:["transport",2],trait:["gravity_well"],cost:{Knowledge(){return 195}},effect(){return t("tech_wagon_effect")},action(){return!!_($(this)[0])}},steam_engine:{id:"tech-steam_engine",title(){return t("tech_steam_engine")},desc(){return t("tech_steam_engine")},category:"transport",era:"discovery",reqs:{transport:2,smelting:3},grant:["transport",3],trait:["gravity_well"],cost:{Knowledge(){return 14345}},effect(){return t("tech_steam_engine_effect")},action(){return!!_($(this)[0])}},combustion_engine:{id:"tech-combustion_engine",title(){return t("tech_combustion_engine")},desc(){return t("tech_combustion_engine")},category:"transport",era:"industrialized",reqs:{transport:3,oil:3},grant:["transport",4],trait:["gravity_well"],cost:{Knowledge(){return 46777}},effect(){return t("tech_combustion_engine_effect")},action(){return!!_($(this)[0])}},hover_cart:{id:"tech-hover_cart",title(){return t("tech_hover_cart")},desc(){return t("tech_hover_cart")},category:"transport",era:"deep_space",reqs:{transport:4,elerium:1},grant:["transport",5],trait:["gravity_well"],cost:{Knowledge(){return 284e3}},effect(){return t("tech_hover_cart_effect")},action(){return!!_($(this)[0])}},osha:{id:"tech-osha",title(){return t("tech_osha")},desc(){return t("tech_osha")},category:"transport",era:"industrialized",reqs:{transport:3,high_tech:3},grant:["teamster",1],trait:["gravity_well"],cost:{Knowledge(){return 28262}},effect(){return t("tech_osha_effect")},action(){return _($(this)[0])?(e.civic.teamster.stress=6,!0):!1}},blackmarket:{id:"tech-blackmarket",title(){return t("tech_blackmarket")},desc(){return t("tech_blackmarket")},category:"transport",era:"industrialized",reqs:{teamster:1,currency:5},grant:["teamster",2],trait:["gravity_well"],cost:{Knowledge(){return 40666}},effect(){return t("tech_blackmarket_effect")},action(){return!!_($(this)[0])}},pipelines:{id:"tech-pipelines",title(){return t("tech_pipelines")},desc(){return t("tech_pipelines")},category:"transport",era:"globalized",reqs:{teamster:2,high_tech:6},grant:["teamster",3],trait:["gravity_well"],cost:{Knowledge(){return 95e3}},effect(){return t("tech_pipelines_effect")},action(){return!!_($(this)[0])}},housing:{id:"tech-housing",title:t("tech_housing"),desc:t("tech_housing_desc"),category:"housing",era:"civilized",reqs:{primitive:3},grant:["housing",1],cost:{Knowledge(){return 10}},effect:t("tech_housing_effect"),action(){return _($(this)[0])?(e.city.basic_housing={count:0},!0):!1}},cottage:{id:"tech-cottage",title(){return $e("medium")},desc:t("tech_cottage_desc"),category:"housing",era:"civilized",reqs:{housing:1,cement:1,mining:3},grant:["housing",2],cost:{Knowledge(){return 3600}},effect:t("tech_cottage_effect"),action(){return _($(this)[0])?(e.city.cottage={count:0},!0):!1}},apartment:{id:"tech-apartment",title(){return $e("large")},desc(){return $e("large")},category:"housing",era:"discovery",reqs:{housing:2,high_tech:2},grant:["housing",3],cost:{Knowledge(){return 15750}},effect:t("tech_apartment_effect"),action(){return _($(this)[0])?(e.city.apartment={count:0,on:0},!0):!1}},arcology:{id:"tech-arcology",title:t("tech_arcology"),desc:t("tech_arcology"),category:"housing",era:"dimensional",reqs:{hell_ruins:4,housing:3,high_tech:17},grant:["housing",4],cost:{Knowledge(){return 25e6}},effect(){return t("tech_arcology_effect")},action(){return _($(this)[0])?(e.portal.arcology={count:0,on:0},!0):!1}},steel_beams:{id:"tech-steel_beams",title:t("tech_steel_beams"),desc:t("tech_housing_cost"),category:"housing",era:"discovery",reqs:{housing:2,smelting:2},not_trait:["cataclysm","lone_survivor"],grant:["housing_reduction",1],cost:{Knowledge(){return 11250},Steel(){return 2500}},effect(){let a=$e("small"),r=$e("medium");return t("tech_steel_beams_effect",[a,r])},action(){return!!_($(this)[0])}},mythril_beams:{id:"tech-mythril_beams",title:t("tech_mythril_beams"),desc:t("tech_housing_cost"),category:"housing",era:"early_space",reqs:{housing_reduction:1,space:3},grant:["housing_reduction",2],cost:{Knowledge(){return 175e3},Mythril(){return 1e3}},effect(){let a=$e("small"),r=$e("medium");return t("tech_mythril_beams_effect",[a,r])},action(){return!!_($(this)[0])}},neutronium_walls:{id:"tech-neutronium_walls",title:t("tech_neutronium_walls"),desc:t("tech_housing_cost"),category:"housing",era:"deep_space",reqs:{housing_reduction:2,gas_moon:1},grant:["housing_reduction",3],cost:{Knowledge(){return 3e5},Neutronium(){return 850}},effect(){let a=$e("small"),r=$e("medium");return t("tech_neutronium_walls_effect",[a,r])},action(){return!!_($(this)[0])}},bolognium_alloy_beams:{id:"tech-bolognium_alloy_beams",title:t("tech_bolognium_alloy_beams"),desc:t("tech_housing_cost"),category:"housing",era:"intergalactic",reqs:{housing_reduction:3,gateway:3},grant:["housing_reduction",4],cost:{Knowledge(){return 375e4},Adamantite(){return 25e5},Bolognium(){return 1e5}},effect(){let a=$e("small"),r=$e("medium");return t("tech_bolognium_alloy_beams_effect",[a,r])},action(){return!!_($(this)[0])}},aphrodisiac:{id:"tech-aphrodisiac",title:t("tech_aphrodisiac"),desc:t("tech_aphrodisiac_desc"),category:"housing",era:"civilized",reqs:{housing:2},grant:["reproduction",1],not_trait:["artifical"],cost:{Knowledge(){return 4500}},effect:t("tech_aphrodisiac_effect"),action(){return!!_($(this)[0])}},fertility_clinic:{id:"tech-fertility_clinic",title:t("tech_fertility_clinic"),desc:t("tech_fertility_clinic"),category:"housing",era:"intergalactic",reqs:{reproduction:1,xeno:6},not_trait:["cataclysm"],grant:["reproduction",2],cost:{Knowledge(){return 45e5}},effect:t("tech_fertility_clinic_effect"),action(){return!!_($(this)[0])}},captive_housing:{id:"tech-captive_housing",title:t("tech_captive_housing"),desc:t("tech_captive_housing"),category:"eldritch",era:"civilized",reqs:{housing:1},trait:["unfathomable"],grant:["unfathomable",1],cost:{Knowledge(){return 12}},effect:t("tech_captive_housing_effect"),action(){return _($(this)[0])?(e.city.captive_housing={count:0,cattle:0,cattleCatch:0,race0:0,jailrace0:0,race1:0,jailrace1:0,race2:0,jailrace2:0,raceCap:0,cattleCap:0},!0):!1}},torture:{id:"tech-torture",title:t("tech_torture"),desc:t("tech_torture"),category:"eldritch",era:"civilized",reqs:{unfathomable:1},trait:["unfathomable"],grant:["unfathomable",2],cost:{Knowledge(){return 25}},effect:t("tech_torture_effect"),action(){return _($(this)[0])?(e.civic.torturer.display=!0,!0):!1}},thrall_quarters:{id:"tech-thrall_quarters",title:t("tech_thrall_quarters"),desc:t("tech_thrall_quarters"),category:"eldritch",era:"civilized",reqs:{unfathomable:2,high_tech:6},trait:["unfathomable"],grant:["unfathomable",3],cost:{Knowledge(){return 95e3},Cement(){return 5e4},Wrought_Iron(){return 12500}},effect:t("tech_thrall_quarters_effect"),action(){return _($(this)[0])?(e.civic.torturer.display=!0,!0):!1}},psychic_energy:{id:"tech-psychic_energy",title:t("tech_psychic_energy"),desc:t("tech_psychic_energy"),category:"eldritch",era:"civilized",reqs:{housing:1},condition(){return e.settings.showCivic},trait:["psychic"],grant:["psychic",1],cost:{Knowledge(){return 15}},effect:t("tech_psychic_energy_effect"),action(){return _($(this)[0])?(e.resource.Energy.display=!0,e.settings.showPsychic=!0,e.race.psychicPowers={boost:{r:"Food"},boostTime:0},!0):!1},post(){De()}},psychic_attack:{id:"tech-psychic_attack",title:t("tech_psychic_attack"),desc:t("tech_psychic_attack"),category:"eldritch",era:"civilized",reqs:{psychic:1,military:1},condition(){return e.stats.psykill>=10},trait:["psychic"],grant:["psychic",2],cost:{Knowledge(){return 100}},effect:t("tech_psychic_attack_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.assaultTime=0,!0):!1},post(){De()}},psychic_finance:{id:"tech-psychic_finance",title:t("tech_psychic_finance"),desc:t("tech_psychic_finance"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:4},trait:["psychic"],grant:["psychic",3],cost:{Knowledge(){return 65e3}},effect:t("tech_psychic_finance_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.cash=0,!0):!1},post(){De()}},psychic_channeling:{id:"tech-psychic_channeling",title:t("tech_psychic_channeling"),desc:t("tech_psychic_channeling"),category:"eldritch",era:"deep_space",reqs:{psychic:3,high_tech:10},trait:["psychic"],grant:["psychic",4],cost:{Knowledge(){return 36e4}},effect:t("tech_psychic_channeling_effect"),action(){return _($(this)[0])?(e.race.psychicPowers.channel={cash:0,assault:0,boost:0},!0):!1},post(){De()}},psychic_efficiency:{id:"tech-psychic_efficiency",title:t("tech_psychic_efficiency"),desc:t("tech_psychic_efficiency"),category:"eldritch",era:"intergalactic",reqs:{psychic:4,high_tech:16},trait:["psychic"],grant:["psychic",5],cost:{Knowledge(){return 525e4}},effect:t("tech_psychic_efficiency_effect"),action(){return!!_($(this)[0])},post(){De()}},mind_break:{id:"tech-mind_break",title:t("tech_mind_break"),desc:t("tech_mind_break"),category:"eldritch",era:"civilized",reqs:{psychic:2,high_tech:1,unfathomable:2},trait:["psychic"],grant:["psychicthrall",1],cost:{Knowledge(){return 7e3}},effect:t("tech_mind_break_effect"),action(){return!!_($(this)[0])},post(){De()}},psychic_stun:{id:"tech-psychic_stun",title:t("tech_psychic_stun"),desc:t("tech_psychic_stun"),category:"eldritch",era:"civilized",reqs:{psychicthrall:1,high_tech:3,unfathomable:2},trait:["psychic"],grant:["psychicthrall",2],cost:{Knowledge(){return 32e3}},effect:t("tech_psychic_stun_effect"),action(){return!!_($(this)[0])},post(){De()}},spear:{id:"tech-spear",title:t("tech_spear"),desc:t("tech_spear_desc"),category:"foraging",era:"civilized",reqs:{primitive:3,storage:1},trait:["forager"],grant:["foraging",1],cost:{Knowledge(){return 110},Stone(){return 75}},effect:t("tech_spear_effect"),action(){return!!_($(this)[0])}},bronze_spear:{id:"tech-bronze_spear",title:t("tech_bronze_spear"),desc:t("tech_bronze_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["foraging",2],cost:{Knowledge(){return 525},Copper(){return 50}},effect:t("tech_bronze_spear_effect"),action(){return!!_($(this)[0])}},iron_spear:{id:"tech-iron_spear",title:t("tech_iron_spear"),desc:t("tech_iron_spear_desc"),category:"foraging",era:"civilized",reqs:{foraging:2,mining:3},trait:["forager"],grant:["foraging",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1650:3300},Iron(){return 375}},effect:t("tech_bronze_spear_effect"),action(){return!!_($(this)[0])}},dowsing_rod:{id:"tech-dowsing_rod",title:t("tech_dowsing_rod"),desc:t("tech_dowsing_rod_desc"),category:"foraging",era:"civilized",reqs:{foraging:1,mining:2},trait:["forager"],grant:["dowsing",1],cost:{Knowledge(){return 450},Lumber(){return 750}},effect:t("tech_dowsing_rod_effect"),action(){return!!_($(this)[0])}},metal_detector:{id:"tech-metal_detector",title:t("tech_metal_detector"),desc:t("tech_metal_detector_desc"),category:"foraging",era:"civilized",reqs:{dowsing:1,high_tech:4},trait:["forager"],grant:["dowsing",2],cost:{Knowledge(){return 65e3}},effect:t("tech_metal_detector_effect"),action(){return!!_($(this)[0])}},smokehouse:{id:"tech-smokehouse",title(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("city_smokehouse_easter"):t("tech_smokehouse")},desc(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_smokehouse_easter_desc"):t("tech_smokehouse_desc")},category:"storage",era:"civilized",reqs:{primitive:3,storage:1},trait:["carnivore"],not_trait:["cataclysm","artifical","soul_eater","herbivore","lone_survivor"],grant:["hunting",1],cost:{Knowledge(){return 80}},effect(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_smokehouse_easter_effect"):t("tech_smokehouse_effect")},action(){return _($(this)[0])?(Gt("city","smokehouse","silo",{count:0}),!0):!1},post(){e.tech.s_lodge&&(e.tech.hunting=2)}},lodge:{id:"tech-lodge",title:t("tech_lodge"),desc:t("tech_lodge"),wiki:!!e.race.carnivore,category:"agriculture",era:"civilized",reqs:{hunting:1,housing:1,currency:1},condition(){return!e.tech.s_lodge},grant:["hunting",2],cost:{Knowledge(){return 180}},effect:t("tech_lodge_effect"),action(){return _($(this)[0])?(Gt("city","lodge","farm",{count:0}),!0):!1}},alt_lodge:{id:"tech-alt_lodge",title(){return this.condition()?t("tech_lodge_alt"):t("tech_lodge")},desc(){return this.condition()?t("tech_lodge_alt"):t("tech_lodge")},wiki:!e.race.carnivore,category:"housing",era:"civilized",reqs:{housing:1,currency:1},grant:["s_lodge",1],condition(){return!!((e.race.species==="wendigo"||e.race.detritivore)&&!e.race.carnivore&&!e.race.herbivore||e.race.carnivore&&e.race.soul_eater||e.race.artifical||e.race.unfathomable)},cost:{Knowledge(){return e.race.artifical?1e4:180}},effect(){return this.condition()?t("tech_lodge_effect_alt"):t("tech_lodge_effect")},action(){return _($(this)[0])?(Gt("city","lodge","farm",{count:0}),!0):!1}},soul_well:{id:"tech-soul_well",title:t("tech_soul_well"),desc:t("tech_soul_well"),category:"souls",era:"civilized",reqs:{primitive:3},trait:["soul_eater"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["soul_eater",1],cost:{Knowledge(){return 10}},effect:t("tech_soul_well_effect"),action(){return _($(this)[0])?(e.city.soul_well={count:0},!0):!1}},compost:{id:"tech-compost",title:t("tech_compost"),desc:t("tech_compost_desc"),category:"compost",era:"civilized",reqs:{primitive:3},trait:["detritivore"],not_trait:["cataclysm","artifical","lone_survivor"],grant:["compost",1],cost:{Knowledge(){return 10}},effect:t("tech_compost_effect"),action(){return _($(this)[0])?(e.city.compost={count:0,on:0},!0):!1}},hot_compost:{id:"tech-hot_compost",title:t("tech_hot_compost"),desc:t("tech_hot_compost"),category:"compost",era:"civilized",reqs:{compost:1},trait:["detritivore"],grant:["compost",2],cost:{Knowledge(){return 100}},effect:t("tech_hot_compost_effect"),action(){return!!_($(this)[0])}},mulching:{id:"tech-mulching",title:t("tech_mulching"),desc:t("tech_mulching"),category:"compost",era:"civilized",reqs:{compost:2,mining:3},trait:["detritivore"],grant:["compost",3],cost:{Knowledge(){return 3200}},effect:t("tech_mulching_effect"),action(){return!!_($(this)[0])}},adv_mulching:{id:"tech-adv_mulching",title:t("tech_adv_mulching"),desc:t("tech_adv_mulching"),category:"compost",era:"discovery",reqs:{compost:3,high_tech:2},trait:["detritivore"],grant:["compost",4],cost:{Knowledge(){return 16e3}},effect:t("tech_adv_mulching_effect"),action(){return!!_($(this)[0])}},agriculture:{id:"tech-agriculture",title:t("tech_agriculture"),desc:t("tech_agriculture_desc"),category:"agriculture",era:"civilized",reqs:{primitive:3},condition(){return!!(e.race.herbivore||!e.race.carnivore&&!e.race.detritivore&&!e.race.soul_eater)},not_trait:["cataclysm","artifical","lone_survivor","unfathomable"],grant:["agriculture",1],cost:{Knowledge(){return 10}},effect:t("tech_agriculture_effect"),action(){return _($(this)[0])?(Gt("city","farm","lodge",{count:0}),!0):!1}},farm_house:{id:"tech-farm_house",title:t("tech_farm_house"),desc:t("tech_farm_house_desc"),category:"housing",era:"civilized",reqs:{agriculture:1,housing:1,currency:1},grant:["farm",1],cost:{Money(){return 50},Knowledge(){return 180}},effect:t("tech_farm_house_effect"),action(){return!!_($(this)[0])}},irrigation:{id:"tech-irrigation",title:t("tech_irrigation"),desc:t("tech_irrigation_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:1},grant:["agriculture",2],cost:{Knowledge(){return 55}},effect:t("tech_irrigation_effect"),action(){return!!_($(this)[0])}},silo:{id:"tech-silo",title:t("tech_silo"),desc:t("tech_silo_desc"),category:"storage",era:"civilized",reqs:{agriculture:2,storage:1},grant:["agriculture",3],cost:{Knowledge(){return 80}},effect:t("tech_silo_effect"),action(){return _($(this)[0])?(Gt("city","silo","smokehouse",{count:0}),!0):!1}},mill:{id:"tech-mill",title:t("tech_mill"),desc:t("tech_mill_desc"),category:"agriculture",era:"civilized",reqs:{agriculture:3,mining:3},grant:["agriculture",4],cost:{Knowledge(){return 5400}},effect:t("tech_mill_effect"),action(){return _($(this)[0])?(Gt("city","mill","windmill",{count:0,on:0}),!0):!1}},windmill:{id:"tech-windmill",title:t("tech_windmill"),desc:t("tech_windmill_desc"),category:"agriculture",era:"discovery",reqs:{agriculture:4,high_tech:1},grant:["agriculture",5],cost:{Knowledge(){return 16200}},effect:t("tech_windmill_effect"),action(){return!!_($(this)[0])}},windturbine:{id:"tech-windturbine",title:t("tech_windturbine"),desc:t("tech_windturbine"),category:"power_generation",era:"globalized",reqs:{agriculture:5,high_tech:4},grant:["agriculture",6],cost:{Knowledge(){return 66e3}},effect:t("tech_windturbine_effect"),action(){return!!_($(this)[0])}},wind_plant:{id:"tech-wind_plant",title(){return e.race.unfathomable?t("tech_watermill"):t("tech_windmill")},desc(){return e.race.unfathomable?t("tech_watermill"):t("tech_windmill")},category:"power_generation",era:"globalized",reqs:{high_tech:4},condition(){return!!(e.race.carnivore||e.race.detritivore||e.race.artifical||e.race.soul_eater||e.race.unfathomable)},not_trait:["herbivore"],grant:["wind_plant",1],cost:{Knowledge(){return 66e3}},effect(){return e.race.unfathomable?t("tech_watermill_effect"):t("tech_wind_plant_effect")},action(){return _($(this)[0])?(Gt("city","windmill","mill",{count:0,on:0}),!0):!1}},gmfood:{id:"tech-gmfood",title:t("tech_gmfood"),desc:t("tech_gmfood_desc"),category:"agriculture",era:"globalized",reqs:{agriculture:6,genetics:1},grant:["agriculture",7],cost:{Knowledge(){return 95e3}},effect:t("tech_gmfood_effect"),action(){return!!_($(this)[0])}},foundry:{id:"tech-foundry",title:t("tech_foundry"),desc:t("tech_foundry"),category:"crafting",era:"civilized",reqs:{mining:2},grant:["foundry",1],cost:{Knowledge(){return 650}},effect:t("tech_foundry_effect"),action(){return _($(this)[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},!0):!1}},artisans:{id:"tech-artisans",title:t("tech_artisans"),desc:t("tech_artisans"),category:"crafting",era:"civilized",reqs:{foundry:1},grant:["foundry",2],cost:{Knowledge(){return 1500}},effect:t("tech_artisans_effect"),action(){return!!_($(this)[0])}},apprentices:{id:"tech-apprentices",title:t("tech_apprentices"),desc:t("tech_apprentices"),category:"crafting",era:"civilized",reqs:{foundry:2},grant:["foundry",3],cost:{Knowledge(){return 3200}},effect:t("tech_apprentices_effect"),action(){return!!_($(this)[0])}},carpentry:{id:"tech-carpentry",title:t("tech_carpentry"),desc:t("tech_carpentry"),category:"crafting",era:"civilized",reqs:{foundry:3,saw:1},grant:["foundry",4],not_trait:["evil"],cost:{Knowledge(){return 5200}},effect:t("tech_carpentry_effect"),action(){return!!_($(this)[0])}},demonic_craftsman:{id:"tech-demonic_craftsman",title:t("tech_master_craftsman"),desc:t("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!!e.race.evil,reqs:{foundry:3},grant:["foundry",5],trait:["evil"],cost:{Knowledge(){return 12e3}},effect:t("tech_master_craftsman_effect"),action(){return!!_($(this)[0])}},master_craftsman:{id:"tech-master_craftsman",title:t("tech_master_craftsman"),desc:t("tech_master_craftsman"),category:"crafting",era:"discovery",wiki:!e.race.evil,reqs:{foundry:4},grant:["foundry",5],not_trait:["evil"],cost:{Knowledge(){return 12e3}},effect:t("tech_master_craftsman_effect"),action(){return!!_($(this)[0])}},banquet:{id:"tech-banquet",title:t("tech_banquet"),desc:t("tech_banquet"),category:"special",era:"discovery",reqs:{high_tech:2},not_trait:["fasting","cataclysm","lone_survivor"],grant:["banquet",1],condition(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)},cost:{Knowledge(){return 18500}},effect:t("tech_banquet_effect"),action(){return _($(this)[0])?(e.city.banquet={count:0,on:0,strength:0},!0):!1}},brickworks:{id:"tech-brickworks",title:t("tech_brickworks"),desc:t("tech_brickworks"),category:"crafting",era:"discovery",reqs:{foundry:5},grant:["foundry",6],cost:{Knowledge(){return 18500}},effect:t("tech_brickworks_effect"),action(){return!!_($(this)[0])}},machinery:{id:"tech-machinery",title:t("tech_machinery"),desc:t("tech_machinery"),category:"crafting",era:"globalized",reqs:{foundry:6,high_tech:4},grant:["foundry",7],cost:{Knowledge(){return 66e3}},effect:t("tech_machinery_effect"),action(){return!!_($(this)[0])}},cnc_machine:{id:"tech-cnc_machine",title:t("tech_cnc_machine"),desc:t("tech_cnc_machine"),category:"crafting",era:"globalized",reqs:{foundry:7,high_tech:8},grant:["foundry",8],cost:{Knowledge(){return 132e3}},effect:t("tech_cnc_machine_effect"),action(){return!!_($(this)[0])}},vocational_training:{id:"tech-vocational_training",title:t("tech_vocational_training"),desc:t("tech_vocational_training"),category:"crafting",era:"industrialized",reqs:{foundry:1,high_tech:3},grant:["v_train",1],cost:{Knowledge(){return 3e4}},effect:t("tech_vocational_training_effect"),action(){return!!_($(this)[0])}},stellar_forge:{id:"tech-stellar_forge",title:t("tech_stellar_forge"),desc:t("tech_stellar_forge"),category:"crafting",era:"intergalactic",reqs:{foundry:8,high_tech:15,gateway:3,neutron:1},grant:["star_forge",1],cost:{Knowledge(){return 45e5}},effect:t("tech_stellar_forge_effect"),action(){return _($(this)[0])?(e.interstellar.stellar_forge={count:0,on:0},!0):!1}},stellar_smelting:{id:"tech-stellar_smelting",title:t("tech_stellar_smelting"),desc:t("tech_stellar_smelting"),category:"crafting",era:"intergalactic",reqs:{star_forge:1,xeno:4},grant:["star_forge",2],cost:{Knowledge(){return 5e6},Vitreloy(){return 1e4}},effect:t("tech_stellar_smelting_effect"),action(){if(_($(this)[0])){let r=G.stellar_forge*2;return e.city.smelter.cap+=r,e.city.smelter.Star+=r,e.city.smelter.StarCap+=r,e.city.smelter.Iron+=r,!0}return!1},post(){Pe()}},assembly_line:{id:"tech-assembly_line",title:t("tech_assembly_line"),desc:t("tech_assembly_line"),category:"crafting",era:"globalized",reqs:{high_tech:4},grant:["factory",1],cost:{Knowledge(){return 72e3},Copper(){return 125e3}},effect:`${t("tech_assembly_line_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},automation:{id:"tech-automation",title:t("tech_automation"),desc:t("tech_automation"),category:"crafting",era:"early_space",reqs:{high_tech:8,factory:1},grant:["factory",2],cost:{Knowledge(){return 165e3}},effect:`${t("tech_automation_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},laser_cutters:{id:"tech-laser_cutters",title:t("tech_laser_cutters"),desc:t("tech_laser_cutters"),category:"crafting",era:"deep_space",reqs:{high_tech:9,factory:2},grant:["factory",3],cost:{Knowledge(){return 3e5},Elerium(){return 200}},effect:`${t("tech_laser_cutters_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},high_tech_factories:{id:"tech-high_tech_factories",title:t("tech_high_tech_factories"),desc:t("tech_high_tech_factories"),category:"crafting",era:"intergalactic",reqs:{high_tech:17,alpha:4,factory:3},grant:["factory",4],cost:{Knowledge(){return 135e5},Vitreloy(){return 5e5},Orichalcum(){return 3e5}},effect:`${t("tech_high_tech_factories_effect")} ${t("tech_factory_warning")}`,action(){return!!_($(this)[0])}},theatre:{id:"tech-theatre",title:t("tech_theatre"),desc:t("tech_theatre"),category:"entertainment",era:"civilized",reqs:{housing:1,currency:1,cement:1},grant:["theatre",1],not_trait:["joyless"],cost:{Knowledge(){return 750}},effect:t("tech_theatre_effect"),action(){return _($(this)[0])?(e.city.amphitheatre={count:0},!0):!1}},playwright:{id:"tech-playwright",title:t("tech_playwright"),desc:t("tech_playwright"),category:"entertainment",era:"civilized",reqs:{theatre:1,science:2},grant:["theatre",2],cost:{Knowledge(){return 1080}},effect:t("tech_playwright_effect"),action(){return!!_($(this)[0])}},magic:{id:"tech-magic",title(){return e.race.universe==="magic"?t("tech_illusionist"):t("tech_magic")},desc(){return e.race.universe==="magic"?t("tech_illusionist"):t("tech_magic")},category:"entertainment",era:"discovery",reqs:{theatre:2,high_tech:1},grant:["theatre",3],cost:{Knowledge(){return 7920}},effect(){return e.race.universe==="magic"?t("tech_illusionist_effect"):t("tech_magic_effect")},action(){return!!_($(this)[0])}},superstars:{id:"tech-superstars",title:t("tech_superstars"),desc:t("tech_superstars"),category:"entertainment",era:"interstellar",reqs:{theatre:3,high_tech:12},grant:["superstar",1],cost:{Knowledge(){return 66e4}},effect:t("tech_superstars_effect"),action(){return!!_($(this)[0])}},radio:{id:"tech-radio",title:t("tech_radio"),desc:t("tech_radio"),category:"entertainment",era:"discovery",reqs:{theatre:3,high_tech:2},grant:["broadcast",1],cost:{Knowledge(){return 16200}},effect(){return t("tech_radio_effect",[qt()])},action(){return!!_($(this)[0])}},tv:{id:"tech-tv",title:t("tech_tv"),desc:t("tech_tv"),category:"entertainment",era:"globalized",reqs:{broadcast:1,high_tech:4},grant:["broadcast",2],cost:{Knowledge(){return 67500}},effect(){return t("tech_tv_effect",[qt()])},action(){return!!_($(this)[0])}},vr_center:{id:"tech-vr_center",title:t("tech_vr_center"),desc:t("tech_vr_center"),category:"entertainment",era:"interstellar",reqs:{broadcast:2,high_tech:12,stanene:1},grant:["broadcast",3],cost:{Knowledge(){return 62e4}},effect(){return t("tech_vr_center_effect")},action(){return _($(this)[0])?(e.space.vr_center={count:0,on:0},!0):!1}},zoo:{id:"tech-zoo",title:t("tech_zoo"),desc:t("tech_zoo"),category:"entertainment",era:"dimensional",reqs:{hell_ruins:2},grant:["zoo",1],cost:{Knowledge(){return 225e5}},effect(){return t("tech_zoo_effect")},action(){return _($(this)[0])?(e.interstellar.zoo={count:0,on:0},!0):!1}},casino:{id:"tech-casino",title:t("tech_casino"),desc:t("tech_casino"),category:"entertainment",era:"globalized",reqs:{high_tech:4,currency:5},grant:["gambling",1],cost:{Knowledge(){return 95e3}},effect:t("tech_casino_effect"),action(){return _($(this)[0])?(e.city.casino={count:0,on:0},e.space.spc_casino={count:0,on:0},!0):!1}},dazzle:{id:"tech-dazzle",title:t("tech_dazzle"),desc:t("tech_dazzle"),category:"banking",era:"globalized",reqs:{gambling:1},grant:["gambling",2],cost:{Knowledge(){return 125e3}},effect:t("tech_dazzle_effect"),action(){return!!_($(this)[0])}},casino_vault:{id:"tech-casino_vault",title:t("tech_casino_vault"),desc:t("tech_casino_vault"),category:"banking",era:"early_space",reqs:{gambling:2,space:3},grant:["gambling",3],cost:{Knowledge(){return 145e3},Iridium(){return 2500}},effect:t("tech_casino_vault_effect"),action(){return!!_($(this)[0])}},otb:{id:"tech-otb",title:t("tech_otb"),desc:t("tech_otb"),category:"banking",era:"deep_space",reqs:{gambling:3,banking:10,high_tech:10},grant:["gambling",4],cost:{Knowledge(){return 39e4}},effect:t("tech_otb_effect"),action(){return!!_($(this)[0])}},online_gambling:{id:"tech-online_gambling",title:t("tech_online_gambling"),desc:t("tech_online_gambling"),category:"banking",era:"interstellar",reqs:{gambling:4,banking:12},grant:["gambling",5],cost:{Knowledge(){return 8e5}},effect:t("tech_online_gambling_effect"),action(){return!!_($(this)[0])}},bolognium_vaults:{id:"tech-bolognium_vaults",title:t("tech_bolognium_vaults"),desc:t("tech_bolognium_vaults"),category:"banking",era:"intergalactic",reqs:{gambling:5,gateway:3},grant:["gambling",6],cost:{Knowledge(){return 39e5},Bolognium(){return 18e4}},effect:t("tech_bolognium_vaults_effect"),action(){return!!_($(this)[0])}},mining:{id:"tech-mining",title(){return e.race.sappy?t("tech_amber"):t("tech_mining")},desc(){return e.race.sappy?t("tech_amber"):t("tech_mining_desc")},category:"mining",era:"civilized",reqs:{primitive:3},grant:["mining",1],cost:{Knowledge(){return 45}},effect(){return e.race.sappy?t("tech_amber_effect"):t(e.race.flier?"tech_mining_effect_alt":"tech_mining_effect")},action(){return _($(this)[0])?(e.city.rock_quarry={count:0,on:0,asbestos:50},e.race.cannibalize&&(e.city.s_alter={count:0,rage:0,mind:0,regen:0,mine:0,harvest:0}),!0):!1}},bayer_process:{id:"tech-bayer_process",title:t("tech_bayer_process"),desc:t("tech_bayer_process_desc"),category:"mining",era:"civilized",reqs:{smelting:2},grant:["alumina",1],cost:{Knowledge(){return 4500}},effect(){return e.race.sappy?t("tech_bayer_process_effect_alt"):t("tech_bayer_process_effect")},action(){return _($(this)[0])?(e.city.metal_refinery={count:0,on:0},Xe(),!0):!1}},elysis_process:{id:"tech-elysis_process",title:t("tech_elysis_process"),desc:t("tech_elysis_process"),category:"mining",era:"interstellar",reqs:{alumina:1,stanene:1,graphene:1},path:["standard","truepath"],not_trait:["cataclysm","lone_survivor"],grant:["alumina",2],cost:{Knowledge(){return 675e3},Graphene(){return 45e3},Stanene(){return 75e3}},effect:t("tech_elysis_process_effect"),action(){return!!_($(this)[0])}},smelting:{id:"tech-smelting",title:t("tech_smelting"),desc:t("tech_smelting_desc"),category:"mining",era:"civilized",reqs:{mining:3},grant:["smelting",1],cost:{Knowledge(){return 4050}},effect:t("tech_smelting_effect"),action(){return _($(this)[0])?(e.city.smelter={count:0,cap:0,Wood:0,Coal:0,Oil:0,Star:0,StarCap:0,Inferno:0,Iron:0,Steel:0,Iridium:0},!0):!1},post(){e.race.steelen&&(e.tech.smelting=2,le())}},steel:{id:"tech-steel",title:t("tech_steel"),desc:t("tech_steel_desc"),category:"mining",era:"civilized",reqs:{smelting:1,mining:4},grant:["smelting",2],condition(){return!e.race.steelen},cost:{Knowledge(){return 4950},Steel(){return 25}},effect:t("tech_steel_effect"),action(){return _($(this)[0])?(e.resource.Steel.display=!0,!0):!1},post(){Pe(),De()}},blast_furnace:{id:"tech-blast_furnace",title:t("tech_blast_furnace"),desc:t("tech_blast_furnace"),category:"mining",era:"discovery",reqs:{smelting:2},grant:["smelting",3],cost:{Knowledge(){return 13500},Coal(){return 2e3}},effect:t("tech_blast_furnace_effect"),action(){return!!_($(this)[0])},post(){e.race.steelen&&(e.tech.smelting=6,le())}},bessemer_process:{id:"tech-bessemer_process",title:t("tech_bessemer_process"),desc:t("tech_bessemer_process"),category:"mining",era:"discovery",reqs:{smelting:3},grant:["smelting",4],condition(){return!e.race.steelen},cost:{Knowledge(){return 19800},Coal(){return 5e3}},effect:t("tech_bessemer_process_effect"),action(){return!!_($(this)[0])}},oxygen_converter:{id:"tech-oxygen_converter",title:t("tech_oxygen_converter"),desc:t("tech_oxygen_converter"),category:"mining",era:"industrialized",reqs:{smelting:4,high_tech:3},grant:["smelting",5],condition(){return!e.race.steelen},cost:{Knowledge(){return 46800},Coal(){return 1e4}},effect:t("tech_oxygen_converter_effect"),action(){return!!_($(this)[0])}},electric_arc_furnace:{id:"tech-electric_arc_furnace",title:t("tech_electric_arc_furnace"),desc:t("tech_electric_arc_furnace"),category:"mining",era:"globalized",reqs:{smelting:5,high_tech:4},grant:["smelting",6],condition(){return!e.race.steelen},cost:{Knowledge(){return 85500},Copper(){return 25e3}},effect:t("tech_electric_arc_furnace_effect"),action(){return!!_($(this)[0])}},hellfire_furnace:{id:"tech-hellfire_furnace",title:t("tech_hellfire_furnace"),desc:t("tech_hellfire_furnace"),category:"mining",era:"interstellar",reqs:{smelting:6,infernite:1},grant:["smelting",7],cost:{Knowledge(){return 615e3},Infernite(){return 2e3},Soul_Gem(){return 2}},effect:t("tech_hellfire_furnace_effect"),action(){return!!_($(this)[0])}},infernium_fuel:{id:"tech-infernium_fuel",title:t("tech_infernium_fuel"),desc:t("tech_infernium_fuel"),category:"mining",era:"dimensional",reqs:{smelting:7,hell_ruins:4},grant:["smelting",8],cost:{Knowledge(){return 275e5},Coal(){return 45e6},Oil(){return 5e5},Infernite(){return 75e4}},effect:t("tech_infernium_fuel_effect"),action(){return!!_($(this)[0])},post(){Pe()}},iridium_smelting_perk:{id:"tech-iridium_smelting_perk",title:t("tech_iridium_smelting"),desc:t("tech_iridium_smelting"),category:"mining",era:"early_space",path:["standard"],reqs:{smelting:6,space:3},condition(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=3)},grant:["irid_smelting",1],cost:{Knowledge(){return 35e4},Mythril(){return 2500}},effect:t("tech_iridium_smelting_effect"),action(){return!!_($(this)[0])}},rotary_kiln:{id:"tech-rotary_kiln",title:t("tech_rotary_kiln"),desc:t("tech_rotary_kiln"),category:"mining",era:"industrialized",reqs:{smelting:3,high_tech:3},grant:["copper",1],cost:{Knowledge(){return 57600},Coal(){return 8e3}},effect:t("tech_rotary_kiln_effect"),action(){return!!_($(this)[0])}},metal_working:{id:"tech-metal_working",title:t("tech_metal_working"),desc:t("tech_metal_working_desc"),category:"mining",era:"civilized",reqs:{mining:1},grant:["mining",2],cost:{Knowledge(){return 350}},effect:t("tech_metal_working_effect"),action(){return _($(this)[0])?(e.city.mine={count:0,on:0},!0):!1}},iron_mining:{id:"tech-iron_mining",title:t("tech_iron_mining"),desc:t("tech_iron_mining_desc"),category:"mining",era:"civilized",reqs:{mining:2},grant:["mining",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?500:2500}},effect:t("tech_iron_mining_effect"),action(){return _($(this)[0])?(e.resource.Iron.display=!0,e.city.foundry&&e.city.foundry.count>0&&(e.resource.Wrought_Iron.display=!0,Xe()),!0):!1},post(){De()}},coal_mining:{id:"tech-coal_mining",title:t("tech_coal_mining"),desc:t("tech_coal_mining_desc"),category:"power_generation",era:"civilized",reqs:{mining:3},grant:["mining",4],cost:{Knowledge(){return 4320}},effect:t("tech_coal_mining_effect"),action(){return _($(this)[0])?(e.city.coal_mine={count:0,on:0},e.resource.Coal.display=!0,!0):!1},post(){De()}},storage:{id:"tech-storage",title:t("tech_storage"),desc:t("tech_storage_desc"),category:"storage",era:"civilized",reqs:{primitive:3,currency:1},grant:["storage",1],cost:{Knowledge(){return 20}},effect:t("tech_storage_effect"),action(){return _($(this)[0])?(e.city.shed={count:0},!0):!1}},reinforced_shed:{id:"tech-reinforced_shed",title:t("tech_reinforced_shed"),desc:t("tech_reinforced_shed_desc"),category:"storage",era:"civilized",reqs:{storage:1,cement:1,mining:3},grant:["storage",2],cost:{Money(){return 3750},Knowledge(){return 2550},Iron(){return 750},Cement(){return 500}},effect:t("tech_reinforced_shed_effect"),action(){return!!_($(this)[0])}},barns:{id:"tech-barns",title:t("tech_barns"),desc:t("tech_barns_desc"),category:"storage",era:"discovery",reqs:{storage:2,smelting:2,alumina:1},grant:["storage",3],cost:{Knowledge(){return 15750},Aluminium(){return 3e3},Steel(){return 3e3}},effect:t("tech_barns_effect"),action(){return!!_($(this)[0])},post(){ba(!1,["city-shed"])}},warehouse:{id:"tech-warehouse",title:t("tech_warehouse"),desc:t("tech_warehouse_desc"),category:"storage",era:"industrialized",reqs:{storage:3,high_tech:3,smelting:2},grant:["storage",4],cost:{Knowledge(){return 40500},Titanium(){return 3e3}},effect:t("tech_warehouse_effect"),action(){return!!_($(this)[0])},post(){ba(!1,["city-shed"])}},cameras:{id:"tech-cameras",title:t("tech_cameras"),desc:t("tech_cameras_desc"),category:"storage",era:"globalized",reqs:{storage:4,high_tech:4},grant:["storage",5],cost:{Money(){return 9e4},Knowledge(){return 65e3}},effect:t("tech_cameras_effect"),action(){return!!_($(this)[0])}},pocket_dimensions:{id:"tech-pocket_dimensions",title:t("tech_pocket_dimensions"),desc:t("tech_pocket_dimensions_desc"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1,storage:5},grant:["storage",6],cost:{Knowledge(){return 108e3}},effect:t("tech_pocket_dimensions_effect"),action(){return!!_($(this)[0])}},ai_logistics:{id:"tech-ai_logistics",title:t("tech_ai_logistics"),desc:t("tech_ai_logistics"),category:"storage",era:"interstellar",reqs:{storage:6,proxima:2,science:13},grant:["storage",7],cost:{Knowledge(){return 65e4}},effect:t("tech_ai_logistics_effect"),action(){return!!_($(this)[0])}},containerization:{id:"tech-containerization",title:t("tech_containerization"),desc:t("tech_containerization_desc"),category:"storage",era:"civilized",reqs:{cement:1,mining:1,storage:1,science:1},grant:["container",1],cost:{Knowledge(){return 2700}},effect:t("tech_containerization_effect"),action(){return _($(this)[0])?(e.city.storage_yard={count:0},!0):!1}},reinforced_crates:{id:"tech-reinforced_crates",title:t("tech_reinforced_crates"),desc:t("tech_reinforced_crates"),category:"storage",era:"civilized",reqs:{container:1,smelting:2},grant:["container",2],cost:{Knowledge(){return 6750},Sheet_Metal(){return 100}},effect(){if(e.race.smoldering||e.race.kindling_kindred||e.race.evil){let a=t("resource_Bones_name");return e.race.smoldering?a=t("resource_Chrysotile_name"):e.race.kindling_kindred&&(a=t("resource_Stone_name")),t("tech_reinforced_crates_alt_effect",[a])}else return t("tech_reinforced_crates_effect")},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},cranes:{id:"tech-cranes",title:t("tech_cranes"),desc:t("tech_cranes_desc"),category:"storage",era:"discovery",reqs:{container:2,high_tech:2},grant:["container",3],cost:{Knowledge(){return 18e3},Copper(){return 1e3},Steel(){return 2500}},effect:t("tech_cranes_effect"),action(){return!!_($(this)[0])}},titanium_crates:{id:"tech-titanium_crates",title(){return t("tech_titanium_crates",[e.resource.Titanium.name])},desc(){return t("tech_titanium_crates",[e.resource.Titanium.name])},category:"storage",era:"globalized",reqs:{container:3,titanium:1},grant:["container",4],cost:{Knowledge(){return 67500},Titanium(){return 1e3}},effect(){return t("tech_titanium_crates_effect",[e.resource.Titanium.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},mythril_crates:{id:"tech-mythril_crates",title(){return t("tech_mythril_crates",[e.resource.Mythril.name])},desc(){return t("tech_mythril_crates",[e.resource.Mythril.name])},category:"storage",era:"early_space",reqs:{container:4,space:3},grant:["container",5],cost:{Knowledge(){return 145e3},Mythril(){return 350}},effect(){return t("tech_mythril_crates_effect",[e.resource.Mythril.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},infernite_crates:{id:"tech-infernite_crates",title(){return t("tech_crates",[e.resource.Infernite.name])},desc(){return t("tech_infernite_crates_desc",[e.resource.Infernite.name])},category:"storage",era:"interstellar",reqs:{container:5,infernite:1},grant:["container",6],cost:{Knowledge(){return 575e3},Infernite(){return 1e3}},effect(){return t("tech_infernite_crates_effect",[e.resource.Infernite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},graphene_crates:{id:"tech-graphene_crates",title(){return t("tech_crates",[e.resource.Graphene.name])},desc(){return t("tech_crates",[e.resource.Graphene.name])},category:"storage",era:"interstellar",path:["standard","truepath"],reqs:{container:6,graphene:1},grant:["container",7],cost:{Knowledge(){return 725e3},Graphene(){return 75e3}},effect(){return t("tech_graphene_crates_effect",[e.resource.Graphene.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_crates:{id:"tech-bolognium_crates",title(){return t("tech_crates",[e.resource.Bolognium.name])},desc(){return t("tech_crates",[e.resource.Bolognium.name])},category:"storage",era:"intergalactic",reqs:{container:7,gateway:3},grant:["container",8],cost:{Knowledge(){return 342e4},Bolognium(){return 9e4}},effect(){return t("tech_bolognium_crates_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},steel_containers:{id:"tech-steel_containers",title(){return t("tech_containers",[e.resource.Steel.name])},desc(){return t("tech_steel_containers_desc",[e.resource.Steel.name])},category:"storage",era:"discovery",reqs:{smelting:2,container:1},grant:["steel_container",1],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect(){if(e.race.smoldering||e.race.kindling_kindred||e.race.evil){let a=e.race.kindling_kindred||e.race.smoldering?e.race.smoldering?"Chrysotile":"Stone":"Plywood";return t("tech_steel_containers_alt_effect",[e.resource[a].name,e.resource.Steel.name])}else return t("tech_steel_containers_effect",[e.resource.Steel.name])},action(){return _($(this)[0])?(e.city.warehouse={count:0},!0):!1}},gantry_crane:{id:"tech-gantry_crane",title:t("tech_gantry_crane"),desc:t("tech_gantry_crane_desc"),category:"storage",era:"discovery",reqs:{steel_container:1,high_tech:2},grant:["steel_container",2],cost:{Knowledge(){return 22500},Steel(){return 5e3}},effect:t("tech_gantry_crane_effect"),action(){return!!_($(this)[0])}},alloy_containers:{id:"tech-alloy_containers",title(){return t("tech_containers",[e.resource.Alloy.name])},desc(){return t("tech_alloy_containers_desc",[e.resource.Alloy.name])},category:"storage",era:"industrialized",reqs:{steel_container:2,storage:4},grant:["steel_container",3],cost:{Knowledge(){return 49500},Alloy(){return 2500}},effect(){return t("tech_alloy_containers_effect",[e.resource.Alloy.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},mythril_containers:{id:"tech-mythril_containers",title(){return t("tech_containers",[e.resource.Mythril.name])},desc(){return t("tech_mythril_containers_desc",[e.resource.Mythril.name])},category:"storage",era:"early_space",reqs:{steel_container:3,space:3},grant:["steel_container",4],cost:{Knowledge(){return 165e3},Mythril(){return 500}},effect(){return t("tech_mythril_containers_effect",[e.resource.Mythril.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},adamantite_containers:{id:"tech-adamantite_containers",title(){return t("tech_containers",[e.resource.Adamantite.name])},desc(){return t("tech_adamantite_containers_desc",[e.resource.Adamantite.name])},category:"storage",era:"interstellar",reqs:{steel_container:4,alpha:2},grant:["steel_container",5],cost:{Knowledge(){return 525e3},Adamantite(){return 17500}},effect(){return t("tech_adamantite_containers_effect",[e.resource.Adamantite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},aerogel_containers:{id:"tech-aerogel_containers",title(){return t("tech_containers",[e.resource.Aerogel.name])},desc(){return t("tech_containers",[e.resource.Aerogel.name])},category:"storage",era:"interstellar",reqs:{steel_container:5,aerogel:1},grant:["steel_container",6],cost:{Knowledge(){return 775e3},Aerogel(){return 500}},effect(){return t("tech_aerogel_containers_effect",[e.resource.Aerogel.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_containers:{id:"tech-bolognium_containers",title(){return t("tech_containers",[e.resource.Bolognium.name])},desc(){return t("tech_containers",[e.resource.Bolognium.name])},category:"storage",era:"intergalactic",reqs:{steel_container:6,gateway:3},grant:["steel_container",7],cost:{Knowledge(){return 35e5},Bolognium(){return 125e3}},effect(){return t("tech_bolognium_containers_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},nanoweave_containers:{id:"tech-nanoweave_containers",title(){return t("tech_nanoweave_containers",[e.resource.Nanoweave.name])},desc(){return t("tech_nanoweave_containers",[e.resource.Nanoweave.name])},category:"storage",era:"intergalactic",reqs:{steel_container:7,nanoweave:1},grant:["steel_container",8],cost:{Knowledge(){return 9e6},Nanoweave(){return 5e4}},effect(){return t("tech_nanoweave_containers_effect",[e.resource.Nanoweave.name])},action(){return!!_($(this)[0])}},evil_planning:{id:"tech-evil_planning",title:t("tech_urban_planning"),desc:t("tech_urban_planning"),category:"queues",era:"civilized",wiki:!!e.race.terrifying,reqs:{banking:2},grant:["queue",1],trait:["terrifying"],cost:{Knowledge(){return 2500}},effect:t("tech_urban_planning_effect"),action(){return _($(this)[0])?(e.queue.display=!0,!0):!1},post(){ua()}},urban_planning:{id:"tech-urban_planning",title:t("tech_urban_planning"),desc:t("tech_urban_planning"),category:"queues",era:"civilized",wiki:!e.race.terrifying,reqs:{banking:2,currency:2},grant:["queue",1],not_trait:["terrifying"],cost:{Knowledge(){return 2500}},effect:t("tech_urban_planning_effect"),action(){return _($(this)[0])?(e.queue.display=!0,e.settings.msgFilters.queue.unlocked||(e.settings.msgFilters.queue.unlocked=!0,e.settings.msgFilters.queue.vis=!0),!0):!1},post(){ua()}},zoning_permits:{id:"tech-zoning_permits",title:t("tech_zoning_permits"),desc:t("tech_zoning_permits"),category:"queues",era:"industrialized",reqs:{queue:1,high_tech:3},grant:["queue",2],cost:{Knowledge(){return 28e3}},effect(){return t("tech_zoning_permits_effect",[e.genes.queue&&e.genes.queue>=2?4:2])},action(){return!!_($(this)[0])},post(){ua()}},urbanization:{id:"tech-urbanization",title:t("tech_urbanization"),desc:t("tech_urbanization"),category:"queues",era:"globalized",reqs:{queue:2,high_tech:6},grant:["queue",3],cost:{Knowledge(){return 95e3}},effect(){return t("tech_urbanization_effect",[e.genes.queue&&e.genes.queue>=2?6:3])},action(){return!!_($(this)[0])},post(){ua()}},assistant:{id:"tech-assistant",title:t("tech_assistant"),desc:t("tech_assistant"),category:"queues",era:"civilized",reqs:{queue:1,science:4},grant:["r_queue",1],cost:{Knowledge(){return 5e3}},effect:t("tech_assistant_effect"),action(){return _($(this)[0])?(e.r_queue.display=!0,e.settings.msgFilters.building_queue.unlocked||(e.settings.msgFilters.building_queue.unlocked=!0,e.settings.msgFilters.building_queue.vis=!0,e.settings.msgFilters.research_queue.unlocked=!0,e.settings.msgFilters.research_queue.vis=!0),!0):!1},post(){Ra(),(e.settings.tabLoad||e.settings.civTabs===3)&&$("#resQueue").removeAttr("style")}},government:{id:"tech-government",title:t("tech_government"),desc:t("tech_government_desc"),category:"government",era:"civilized",reqs:{currency:1},grant:["govern",1],cost:{Knowledge(){return 750}},effect:t("tech_government_effect"),action(){return!!_($(this)[0])},post(){C({el:"#govType"},"update"),C({el:"#foreign"},"update"),C({el:"#government .govTabs2"},"update"),e.settings.tabLoad&&$("#government .govTabs2").removeAttr("style")}},theocracy:{id:"tech-theocracy",title:t("govern_theocracy"),desc:t("govern_theocracy"),category:"government",era:"civilized",reqs:{govern:1,theology:2},grant:["gov_theo",1],cost:{Knowledge(){return 1200}},effect:t("tech_theocracy_effect"),action(){return!!_($(this)[0])}},republic:{id:"tech-republic",title:t("govern_republic"),desc:t("govern_republic"),category:"government",era:"discovery",reqs:{govern:1},condition(){return!!(e.tech.trade&&e.tech.trade>=2||e.race.terrifying)},grant:["govern",2],cost:{Knowledge(){return 17e3}},effect:t("tech_republic_effect"),action(){return!!_($(this)[0])}},socialist:{id:"tech-socialist",title:t("govern_socialist"),desc:t("govern_socialist"),category:"government",era:"discovery",reqs:{govern:1},condition(){return!!(e.tech.trade&&e.tech.trade>=2||e.race.terrifying)},grant:["gov_soc",1],cost:{Knowledge(){return 17e3}},effect:t("tech_socialist_effect"),action(){return!!_($(this)[0])}},corpocracy:{id:"tech-corpocracy",title:t("govern_corpocracy"),desc:t("govern_corpocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["gov_corp",1],cost:{Knowledge(){return 26e3}},effect:t("tech_corpocracy_effect"),action(){return!!_($(this)[0])}},technocracy:{id:"tech-technocracy",title:t("govern_technocracy"),desc:t("govern_technocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},grant:["govern",3],cost:{Knowledge(){return 26e3}},effect:t("tech_technocracy_effect"),action(){return!!_($(this)[0])}},federation:{id:"tech-federation",title:t("govern_federation"),desc:t("govern_federation"),category:"government",era:"early_space",reqs:{govern:2},condition(){return e.tech.unify&&e.tech.unify>=2||Ua()},grant:["gov_fed",1],cost:{Knowledge(){return 3e4}},effect:t("tech_federation_effect"),action(){return!!_($(this)[0])}},magocracy:{id:"tech-magocracy",title:t("govern_magocracy"),desc:t("govern_magocracy"),category:"government",era:"industrialized",reqs:{govern:2,high_tech:3},condition(){return e.race.universe==="magic"},grant:["gov_mage",1],cost:{Knowledge(){return 26e3}},effect:t("tech_magocracy_effect"),action(){return!!_($(this)[0])}},governor:{id:"tech-governor",title:t("tech_governor"),desc:t("tech_governor"),category:"government",era:"civilized",reqs:{govern:1},condition(){return!!(e.genes.governor&&e.civic.govern.type!=="anarchy")},grant:["governor",1],cost:{Knowledge(){return 1e3}},effect:t("tech_governor_effect"),action(){return _($(this)[0])?(e.settings.showGovernor=!0,!0):!1},post(){Te()}},spy:{id:"tech-spy",title:t("tech_spy"),desc:t("tech_spy"),category:"spies",era:"civilized",reqs:{govern:1},grant:["spy",1],cost:{Knowledge(){return 1250}},effect:t("tech_spy_effect"),action(){return!!_($(this)[0])},post(){C({el:"#foreign"},"update"),Te()}},espionage:{id:"tech-espionage",title:t("tech_espionage"),desc:t("tech_espionage"),category:"spies",era:"discovery",reqs:{spy:1,high_tech:1},grant:["spy",2],cost:{Knowledge(){return 7500}},effect:t("tech_espionage_effect"),action(){return _($(this)[0])?(e.settings.msgFilters.spy.unlocked||(e.settings.msgFilters.spy.unlocked=!0,e.settings.msgFilters.spy.vis=!0),!0):!1},post(){C({el:"#foreign"},"update"),Te()}},spy_training:{id:"tech-spy_training",title:t("tech_spy_training"),desc:t("tech_spy_training"),category:"spies",era:"discovery",reqs:{spy:2,boot_camp:1},grant:["spy",3],cost:{Knowledge(){return 1e4}},effect:t("tech_spy_training_effect"),action(){return!!_($(this)[0])}},spy_gadgets:{id:"tech-spy_gadgets",title:t("tech_spy_gadgets"),desc:t("tech_spy_gadgets"),category:"spies",era:"discovery",reqs:{spy:3,high_tech:2},grant:["spy",4],cost:{Knowledge(){return 15e3}},effect:t("tech_spy_gadgets_effect"),action(){return!!_($(this)[0])}},code_breakers:{id:"tech-code_breakers",title:t("tech_code_breakers"),desc:t("tech_code_breakers"),category:"spies",era:"industrialized",reqs:{spy:4,high_tech:4},grant:["spy",5],cost:{Knowledge(){return 55e3}},effect:t("tech_code_breakers_effect"),action(){return!!_($(this)[0])}},currency:{id:"tech-currency",title:t("tech_currency"),desc:t("tech_currency_desc"),category:"banking",era:"civilized",reqs:{housing:1},grant:["currency",1],cost:{Knowledge(){return 22},Lumber(){return 10}},effect:t("tech_currency_effect"),action(){return _($(this)[0])?(e.resource.Money.display=!0,!0):!1}},market:{id:"tech-market",title:t("tech_market"),desc:t("tech_market_desc"),category:"banking",era:"civilized",reqs:{banking:1,govern:1},not_trait:["terrifying"],grant:["currency",2],cost:{Knowledge(){return e.race.banana?300:1800}},effect:t("tech_market_effect"),action(){return _($(this)[0])?(e.settings.showResources=!0,e.settings.showMarket=!0,!0):!1}},tax_rates:{id:"tech-tax_rates",title:t("tech_tax_rates"),desc:t("tech_tax_rates_desc"),category:"banking",era:"civilized",reqs:{banking:2,currency:2,queue:1},not_trait:["terrifying"],grant:["currency",3],cost:{Knowledge(){return 3375}},effect:t("tech_tax_rates_effect"),action(){return _($(this)[0])?(e.civic.taxes.display=!0,!0):!1},post(){Te()}},large_trades:{id:"tech-large_trades",title:t("tech_large_trades"),desc:t("tech_large_trades_desc"),category:"market",era:"civilized",reqs:{currency:3},not_trait:["terrifying"],grant:["currency",4],cost:{Knowledge(){return 6750}},effect:t("tech_large_trades_effect"),action(){return!!_($(this)[0])},post(){e.race.noble&&(e.tech.currency=5,le())}},corruption:{id:"tech-corruption",title:t("tech_corruption"),desc:t("tech_corruption_desc"),category:"banking",era:"industrialized",reqs:{currency:4,high_tech:3},not_trait:["terrifying","noble"],grant:["currency",5],cost:{Knowledge(){return 36e3}},effect:t("tech_corruption_effect"),action(){return!!_($(this)[0])}},massive_trades:{id:"tech-massive_trades",title:t("tech_massive_trades"),desc:t("tech_massive_trades_desc"),category:"market",era:"globalized",reqs:{currency:5,high_tech:4},not_trait:["terrifying"],grant:["currency",6],cost:{Knowledge(){return 108e3}},effect:t("tech_massive_trades_effect"),action(){return!!_($(this)[0])}},trade:{id:"tech-trade",title:t("tech_trade"),desc:t("tech_trade_desc"),category:"market",era:"civilized",reqs:{currency:2,military:1},not_trait:["terrifying"],grant:["trade",1],cost:{Knowledge(){return e.race.banana?1200:4500}},effect:t("tech_trade_effect"),action(){return _($(this)[0])?(e.city.trade={count:0},e.city.market.active=!0,!0):!1}},diplomacy:{id:"tech-diplomacy",title:t("tech_diplomacy"),desc:t("tech_diplomacy_desc"),category:"market",era:"discovery",reqs:{trade:1,high_tech:1},not_trait:["terrifying"],grant:["trade",2],cost:{Knowledge(){return 16200}},effect:t("tech_diplomacy_effect"),action(){return!!_($(this)[0])}},freight:{id:"tech-freight",title:t("tech_freight"),desc:t("tech_freight_desc"),category:"market",era:"industrialized",reqs:{trade:2,high_tech:3},not_trait:["terrifying"],grant:["trade",3],cost:{Knowledge(){return 37800}},effect:t("tech_freight_effect"),action(){return!!_($(this)[0])},post(){e.tech.high_tech>=6&&ye("Physics")}},wharf:{id:"tech-wharf",title:t("tech_wharf"),desc:t("tech_wharf_desc"),category:"market",era:"industrialized",reqs:{trade:1,high_tech:3,oil:1},not_trait:["thalassophobia"],grant:["wharf",1],cost:{Knowledge(){return 44e3}},effect:t("tech_wharf_effect"),action(){return _($(this)[0])?(e.city.wharf={count:0},!0):!1}},banking:{id:"tech-banking",title:t("tech_banking"),desc:t("tech_banking_desc"),category:"banking",era:"civilized",reqs:{currency:1},grant:["banking",1],cost:{Knowledge(){return 90}},effect:t("tech_banking_effect"),action(){return _($(this)[0])?(e.city.bank={count:0},!0):!1}},investing:{id:"tech-investing",title:t("tech_investing"),desc:t("tech_investing_desc"),category:"banking",era:"civilized",reqs:{banking:1},grant:["banking",2],cost:{Money(){return 2500},Knowledge(){return 900}},effect:t("tech_investing_effect"),action(){return _($(this)[0])?(e.civic.banker.display=!0,!0):!1}},vault:{id:"tech-vault",title:t("tech_vault"),desc:t("tech_vault_desc"),category:"banking",era:"civilized",reqs:{banking:2,cement:1},grant:["banking",3],cost:{Money(){return 2e3},Knowledge(){return 3600},Iron(){return 500},Cement(){return 750}},effect:t("tech_vault_effect"),action(){return!!_($(this)[0])}},bonds:{id:"tech-bonds",title:t("tech_bonds"),desc:t("tech_bonds"),category:"banking",era:"civilized",reqs:{banking:3},grant:["banking",4],cost:{Money(){return 2e4},Knowledge(){return 5e3}},effect:t("tech_bonds_effect"),action(){return!!_($(this)[0])}},steel_vault:{id:"tech-steel_vault",title:t("tech_steel_vault"),desc:t("tech_steel_vault"),category:"banking",era:"civilized",reqs:{banking:4,smelting:2},grant:["banking",5],cost:{Money(){return 3e4},Knowledge(){return 6750},Steel(){return 3e3}},effect:t("tech_steel_vault_effect"),action(){return!!_($(this)[0])}},eebonds:{id:"tech-eebonds",title:t("tech_eebonds"),desc:t("tech_eebonds"),category:"banking",era:"discovery",reqs:{banking:5,high_tech:1},grant:["banking",6],cost:{Money(){return 75e3},Knowledge(){return 18e3}},effect:t("tech_eebonds_effect"),action(){return!!_($(this)[0])}},swiss_banking:{id:"tech-swiss_banking",title:qr(),desc:qr(),category:"banking",era:"industrialized",reqs:{banking:6},grant:["banking",7],cost:{Money(){return 125e3},Knowledge(){return 45e3}},effect:t("tech_swiss_banking_effect"),action(){return!!_($(this)[0])}},safety_deposit:{id:"tech-safety_deposit",title:t("tech_safety_deposit"),desc:t("tech_safety_deposit"),category:"banking",era:"globalized",reqs:{banking:7,high_tech:4},grant:["banking",8],cost:{Money(){return 25e4},Knowledge(){return 67500}},effect:t("tech_safety_deposit_effect"),action(){return!!_($(this)[0])}},stock_market:{id:"tech-stock_market",title:t("tech_stock_market"),desc:t("tech_stock_market"),category:"arpa",era:"globalized",reqs:{banking:8,high_tech:6},grant:["banking",9],cost:{Money(){return 325e3},Knowledge(){return 108e3}},effect:t("tech_stock_market_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},hedge_funds:{id:"tech-hedge_funds",title:t("tech_hedge_funds"),desc:t("tech_hedge_funds"),category:"banking",era:"early_space",reqs:{banking:9,stock_exchange:1},grant:["banking",10],cost:{Money(){return 375e3},Knowledge(){return 126e3}},effect:t("tech_hedge_funds_effect"),action(){return!!_($(this)[0])}},four_oh_one:{id:"tech-four_oh_one",title:t("tech_four_oh_one"),desc:t("tech_four_oh_one"),category:"banking",era:"early_space",reqs:{banking:10},grant:["banking",11],cost:{Money(){return 425e3},Knowledge(){return 144e3}},effect:t("tech_four_oh_one_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_four_oh_one_flair")}},exchange:{id:"tech-exchange",title:t("tech_exchange"),desc:t("tech_exchange"),category:"banking",era:"interstellar",reqs:{banking:11,alpha:2,graphene:1},grant:["banking",12],cost:{Money(){return 1e6},Knowledge(){return 675e3}},effect:t("tech_exchange_effect"),action(){return _($(this)[0])?(e.interstellar.exchange={count:0,on:0},!0):!1}},foreign_investment:{id:"tech-foreign_investment",title:t("tech_foreign_investment"),desc:t("tech_foreign_investment"),category:"banking",era:"intergalactic",reqs:{banking:12,xeno:10},grant:["banking",13],cost:{Money(){return 1e8},Knowledge(){return 8e6}},effect:t("tech_foreign_investment_effect"),action(){return!!_($(this)[0])}},mythril_vault:{id:"tech-mythril_vault",title:t("tech_mythril_vault"),desc:t("tech_mythril_vault"),category:"banking",era:"early_space",reqs:{banking:5,space:3},grant:["vault",1],cost:{Money(){return 5e5},Knowledge(){return 15e4},Mythril(){return 750}},effect:t("tech_mythril_vault_effect"),action(){return!!_($(this)[0])}},neutronium_vault:{id:"tech-neutronium_vault",title:t("tech_neutronium_vault"),desc:t("tech_neutronium_vault"),category:"banking",era:"deep_space",reqs:{vault:1,gas_moon:1},grant:["vault",2],cost:{Money(){return 75e4},Knowledge(){return 28e4},Neutronium(){return 650}},effect:t("tech_neutronium_vault_effect"),action(){return!!_($(this)[0])}},adamantite_vault:{id:"tech-adamantite_vault",title:t("tech_adamantite_vault"),desc:t("tech_adamantite_vault"),category:"banking",era:"interstellar",reqs:{vault:2,alpha:2},grant:["vault",3],cost:{Money(){return 2e6},Knowledge(){return 56e4},Adamantite(){return 2e4}},effect:t("tech_adamantite_vault_effect"),action(){return!!_($(this)[0])}},graphene_vault:{id:"tech-graphene_vault",title:t("tech_graphene_vault"),desc:t("tech_graphene_vault"),category:"banking",era:"interstellar",path:["standard","truepath"],reqs:{vault:3,graphene:1},grant:["vault",4],cost:{Money(){return 3e6},Knowledge(){return 75e4},Graphene(){return 4e5}},effect:t("tech_graphene_vault_effect"),action(){return!!_($(this)[0])}},home_safe:{id:"tech-home_safe",title:t("tech_home_safe"),desc:t("tech_home_safe"),category:"banking",era:"discovery",reqs:{banking:5},grant:["home_safe",1],cost:{Money(){return 42e3},Knowledge(){return 8e3},Steel(){return 4500}},effect:t("tech_home_safe_effect"),action(){return!!_($(this)[0])}},fire_proof_safe:{id:"tech-fire_proof_safe",title:t("tech_fire_proof_safe"),desc:t("tech_fire_proof_safe"),category:"banking",era:"early_space",reqs:{home_safe:1,space:3},grant:["home_safe",2],cost:{Money(){return 25e4},Knowledge(){return 12e4},Iridium(){return 1e3}},effect:t("tech_fire_proof_safe_effect"),action(){return!!_($(this)[0])}},tamper_proof_safe:{id:"tech-tamper_proof_safe",title:t("tech_tamper_proof_safe"),desc:t("tech_tamper_proof_safe"),category:"banking",era:"interstellar",reqs:{home_safe:2,infernite:1},grant:["home_safe",3],cost:{Money(){return 25e5},Knowledge(){return 6e5},Infernite(){return 800}},effect:t("tech_tamper_proof_safe_effect"),action(){return!!_($(this)[0])}},monument:{id:"tech-monument",title:t("tech_monument"),desc:t("tech_monument"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["monument",1],cost:{Knowledge(){return 12e4}},effect:t("tech_monument_effect"),action(){return _($(this)[0])?(e.arpa.m_type=ye("Monument"),!0):!1},post(){ye("Physics")}},tourism:{id:"tech-tourism",title:t("tech_tourism"),desc:t("tech_tourism"),category:"banking",era:"early_space",reqs:{monuments:2,monument:1},not_trait:["cataclysm","lone_survivor"],grant:["monument",2],cost:{Knowledge(){return 15e4}},effect:t("tech_tourism_effect"),action(){return _($(this)[0])?(e.city.tourist_center={count:0,on:0},!0):!1}},xeno_tourism:{id:"tech-xeno_tourism",title:t("tech_xeno_tourism"),desc:t("tech_xeno_tourism"),category:"banking",era:"intergalactic",reqs:{monument:2,xeno:10,monuments:10},not_trait:["cataclysm"],grant:["monument",3],cost:{Knowledge(){return 8e6}},effect:t("tech_xeno_tourism_effect"),action(){return!!_($(this)[0])}},science:{id:"tech-science",title:t("tech_science"),desc:t("tech_science_desc"),category:"science",era:"civilized",reqs:{housing:1},grant:["science",1],cost:{Knowledge(){return 65}},effect:t("tech_science_effect"),action(){return _($(this)[0])?(e.city.university={count:0},!0):!1}},library:{id:"tech-library",title:t("tech_library"),desc:t("tech_library_desc"),category:"science",era:"civilized",reqs:{science:1,cement:1},grant:["science",2],cost:{Knowledge(){return 720}},effect:t("tech_library_effect"),action(){return _($(this)[0])?(e.city.library={count:0},!0):!1}},thesis:{id:"tech-thesis",title:t("tech_thesis"),desc:t("tech_thesis_desc"),category:"science",era:"civilized",reqs:{science:2},grant:["science",3],cost:{Knowledge(){return 1125}},effect:t("tech_thesis_effect"),action(){return!!_($(this)[0])}},research_grant:{id:"tech-research_grant",title:t("tech_research_grant"),desc:t("tech_research_grant_desc"),category:"science",era:"civilized",reqs:{science:3},grant:["science",4],cost:{Knowledge(){return 3240}},effect:t("tech_research_grant_effect"),action(){return!!_($(this)[0])}},scientific_journal:{id:"tech-scientific_journal",title(){return e.race.universe==="magic"?t("tech_magic_tomes"):t("tech_scientific_journal")},desc(){return e.race.universe==="magic"?t("tech_magic_tomes_desc"):t("tech_scientific_journal_desc")},category:"science",era:"industrialized",reqs:{science:4,high_tech:3},grant:["science",5],cost:{Knowledge(){return 27e3}},effect(){return e.race.universe==="magic"?t("tech_magic_tomes_effect"):t("tech_scientific_journal_effect")},action(){return!!_($(this)[0])}},adjunct_professor:{id:"tech-adjunct_professor",title:t("tech_adjunct_professor"),desc:t("tech_adjunct_professor"),category:"science",era:"industrialized",reqs:{science:5},grant:["science",6],cost:{Knowledge(){return 36e3}},effect(){return t("tech_adjunct_professor_effect",[qt(),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])},action(){return!!_($(this)[0])}},tesla_coil:{id:"tech-tesla_coil",title:t("tech_tesla_coil"),desc:t("tech_tesla_coil_desc"),category:"science",era:"industrialized",reqs:{science:6,high_tech:3},grant:["science",7],cost:{Knowledge(){return 51750}},effect(){return t("tech_tesla_coil_effect",[qt()])},action(){return!!_($(this)[0])}},internet:{id:"tech-internet",title:t("tech_internet"),desc:t("tech_internet"),category:"science",era:"globalized",reqs:{science:7,high_tech:4},grant:["science",8],cost:{Knowledge(){return 61200}},effect:t("tech_internet_effect"),action(){return _($(this)[0])?(e.race.toxic&&e.race.species==="troll"&&L("godwin"),!0):!1}},observatory:{id:"tech-observatory",title:t("tech_observatory"),desc:t("tech_observatory"),category:"science",era:"early_space",reqs:{science:8,space:3,luna:1},grant:["science",9],cost:{Knowledge(){return 148e3}},effect:t("tech_observatory_effect"),action(){return _($(this)[0])?(e.space.observatory={count:0,on:0},!0):!1}},world_collider:{id:"tech-world_collider",title:t("tech_world_collider"),desc:t("tech_world_collider"),category:"science",era:"deep_space",path:["standard"],reqs:{science:9,elerium:2},grant:["science",10],cost:{Knowledge(){return 35e4}},effect(){return t("tech_world_collider_effect",[S().dwarf])},action(){return _($(this)[0])?(e.space.world_collider={count:0},e.space.world_controller={count:0,on:0},!0):!1},flair:`
${t("tech_world_collider_flair1")}
${t("tech_world_collider_flair2")}
`},laboratory:{id:"tech-laboratory",title(){return e.race.universe==="magic"?t("tech_sanctum"):t("tech_laboratory")},desc(){return e.race.universe==="magic"?t("tech_sanctum"):t("tech_laboratory_desc")},category:"science",era:"interstellar",reqs:{science:11,alpha:2},grant:["science",12],cost:{Knowledge(){return 5e5}},effect(){return e.race.universe==="magic"?t("tech_sanctum_effect"):t("tech_laboratory_effect")},action(){return _($(this)[0])?(e.interstellar.laboratory={count:0,on:0},!0):!1},flair(){return e.race.universe==="magic"?t("tech_sanctum_flair"):t("tech_laboratory_flair")}},virtual_assistant:{id:"tech-virtual_assistant",title:t("tech_virtual_assistant"),desc:t("tech_virtual_assistant"),category:"science",era:"interstellar",reqs:{science:12,high_tech:12},grant:["science",13],cost:{Knowledge(){return 635e3}},effect(){return e.race.universe==="magic"?t("tech_virtual_assistant_magic_effect"):t("tech_virtual_assistant_effect")},action(){return!!_($(this)[0])}},dimensional_readings:{id:"tech-dimensional_readings",title:t("tech_dimensional_readings"),desc:t("tech_dimensional_readings"),category:"science",era:"interstellar",reqs:{science:13,infernite:2},grant:["science",14],cost:{Knowledge(){return 75e4}},effect(){return t("tech_dimensional_readings_effect")},action(){return!!_($(this)[0])}},quantum_entanglement:{id:"tech-quantum_entanglement",title:t("tech_quantum_entanglement"),desc:t("tech_quantum_entanglement"),category:"science",era:"interstellar",reqs:{science:14,neutron:1},grant:["science",15],cost:{Knowledge(){return 85e4},Neutronium(){return 7500},Soul_Gem(){return 2}},effect(){return t("tech_quantum_entanglement_effect",[2,e.race.universe==="magic"?t("tech_sanctum"):t("interstellar_laboratory_title"),qt()])},action(){return!!_($(this)[0])}},expedition:{id:"tech-expedition",title(){return e.race.universe==="magic"?t("tech_expedition_wiz"):t("tech_expedition")},desc(){return e.race.universe==="magic"?t("tech_expedition_wiz"):t("tech_expedition")},category:"science",era:"intergalactic",reqs:{science:15,xeno:4},grant:["science",16],cost:{Knowledge(){return 535e4}},effect(){return e.race.universe==="magic"?t("tech_expedition_wiz_effect"):t("tech_expedition_effect")},action(){return!!_($(this)[0])}},subspace_sensors:{id:"tech-subspace_sensors",title:t("tech_subspace_sensors"),desc:t("tech_subspace_sensors"),category:"science",era:"intergalactic",reqs:{science:16,high_tech:16},grant:["science",17],cost:{Knowledge(){return 6e6}},effect(){return t("tech_subspace_sensors_effect")},action(){return!!_($(this)[0])}},alien_database:{id:"tech-alien_database",title:t("tech_alien_database"),desc:t("tech_alien_database"),category:"progress",era:"intergalactic",reqs:{science:17,conflict:5},grant:["science",18],cost:{Knowledge(){return 825e4}},effect(){return t("tech_alien_database_effect")},action(){return!!_($(this)[0])}},orichalcum_capacitor:{id:"tech-orichalcum_capacitor",title:t("tech_orichalcum_capacitor"),desc:t("tech_orichalcum_capacitor"),category:"science",era:"intergalactic",reqs:{science:18,high_tech:17},grant:["science",19],cost:{Knowledge(){return 125e5},Orichalcum(){return 25e4}},effect(){return t("tech_orichalcum_capacitor_effect")},action(){return!!_($(this)[0])}},advanced_biotech:{id:"tech-advanced_biotech",title:t("tech_advanced_biotech"),desc:t("tech_advanced_biotech"),category:"science",era:"dimensional",reqs:{science:19,high_tech:18},grant:["science",20],cost:{Knowledge(){return 255e5}},effect(){return t("tech_advanced_biotech_effect")},action(){return!!_($(this)[0])}},codex_infinium:{id:"tech-codex_infinium",title:t("tech_codex_infinium"),desc:t("tech_codex_infinium"),category:"science",era:"dimensional",reqs:{science:20,sphinx_bribe:1},grant:["science",21],cost:{Knowledge(){return 401e5},Codex(){return 1}},effect(){return t("tech_codex_infinium_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!1,!0):!1}},devilish_dish:{id:"tech-devilish_dish",title:t("tech_devilish_dish"),desc:t("tech_devilish_dish"),category:"fasting",era:"dimensional",reqs:{hell_ruins:4},trait:["fasting"],grant:["dish",1],cost:{Knowledge(){return 29e6}},effect(){return t("tech_devilish_dish_effect")},action(){return _($(this)[0])?(e.tech.hell_lake>=3&&I(t("tech_lake_analysis_fasting"),"info",!1,["progress","hell"]),!0):!1}},hell_oven:{id:"tech-hell_oven",title:t("tech_hell_oven"),desc:t("tech_hell_oven"),category:"fasting",era:"dimensional",reqs:{hell_lake:3,dish:1},trait:["fasting"],grant:["dish",2],cost:{Knowledge(){return 32e6}},effect(){return t("tech_hell_oven_effect")},action(){return _($(this)[0])?(e.portal.oven={count:0},!0):!1}},preparation_methods:{id:"tech-preparation_methods",title:t("tech_preparation_methods"),desc:t("tech_preparation_methods"),category:"fasting",era:"dimensional",reqs:{science:21,dish:4},trait:["fasting"],grant:["dish",5],cost:{Knowledge(){return 62e6}},effect(){return t("tech_preparation_methods_effect")},action(){return _($(this)[0])?(e.portal.dish_soul_steeper={count:0,on:0},e.portal.dish_life_infuser={count:0,on:0},!0):!1}},final_ingredient:{id:"tech-final_ingredient",title:t("tech_final_ingredient"),desc:t("tech_final_ingredient"),category:"fasting",era:"dimensional",reqs:{dish_reset:1},grant:["dish_reset",2],cost:{Bolognium(){return 5e7},Demonic_Essence(){return 1}},effect(){return`${t("tech_final_ingredient_effect")} ${e.race.witch_hunter?`
${t("dish_witch_hunter_interaction",[t("tech_outerplane_summon"),t("portal_devilish_dish_title")])}
`:""} -
${t("tech_demonic_infusion_effect2",[ke("descend").artifact])}
`},action(){return Jt($(this)[0])&&mi(),!1}},bioscience:{id:"tech-bioscience",title:t("tech_bioscience"),desc:t("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge(){return 67500}},effect:t("tech_bioscience_effect"),action(){return _($(this)[0])?(e.city.biolab={count:0},!0):!1}},genetics:{id:"tech-genetics",title:t("tech_genetics"),desc:t("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge(){return 108e3}},effect:t("tech_genetics_effect"),action(){return _($(this)[0])?(e.settings.arpa.genetics=!0,e.arpa.sequence||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!(e.race.cataclysm||e.race.orbit_decayed),boost:!1,auto:!1,labs:0}),!0):!1},post(){ye("Genetics")}},crispr:{id:"tech-crispr",title:t("tech_crispr"),desc:t("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge(){return 125e3}},effect(){return e.race.artifical?t("tech_crispr_effect_artifical"):t("tech_crispr_effect")},action(){return _($(this)[0])?(e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2,!0):!1},post(){ye("Genetics"),ye("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:t("tech_shotgun_sequencing"),desc(){return e.race.artifical?t("tech_shotgun_sequencing_desc_artifical"):t("tech_shotgun_sequencing_desc")},category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge(){return 165e3}},effect(){return e.race.artifical?t("tech_shotgun_sequencing_effect_artifical"):t("tech_shotgun_sequencing_effect")},action(){return _($(this)[0])?(e.arpa.sequence.boost=!0,!0):!1},post(){ye("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:t("tech_de_novo_sequencing"),desc:t("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge(){return 22e4}},effect(){return e.race.artifical?t("tech_de_novo_sequencing_effect_artifical"):t("tech_de_novo_sequencing_effect")},action(){return _($(this)[0])?(e.resource.Genes.display=!0,!0):!1},post(){ye("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title(){return e.race.artifical?t("tech_code_sequencer"):t("tech_dna_sequencer")},desc(){return e.race.artifical?t("tech_code_sequencer"):t("tech_dna_sequencer")},category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge(){return 3e5}},effect(){return e.race.artifical?t("tech_code_sequencer_effect"):t("tech_dna_sequencer_effect")},action(){return _($(this)[0])?(e.arpa.sequence.auto=!0,!0):!1},post(){ye("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title(){return e.race.artifical?t("tech_agile_development"):t("tech_rapid_sequencing")},desc(){return e.race.artifical?t("tech_agile_development"):t("tech_rapid_sequencing")},category:"genes",era:"interstellar",path:["standard","truepath"],reqs:{genetics:7,high_tech:12},grant:["genetics",8],cost:{Knowledge(){return 8e5}},effect(){return e.race.artifical?t("tech_agile_development_effect"):t("tech_rapid_sequencing_effect")},action(){return!!_($(this)[0])}},mad_science:{id:"tech-mad_science",title(){return e.race.universe==="magic"?t("tech_sages"):t("tech_mad_science")},desc(){return e.race.universe==="magic"?t("tech_sages"):t("tech_mad_science")},category:"science",era:"discovery",reqs:{science:2,smelting:2},grant:["high_tech",1],cost:{Money(){return 1e4},Mana(){return e.race.universe==="magic"?50:0},Knowledge(){return 6750},Crystal(){return e.race.universe==="magic"?1e3:0},Aluminium(){return 750}},effect(){return e.race.universe==="magic"?t("tech_sages_effect"):t("tech_mad_science_effect")},action(){return _($(this)[0])?(e.race.terrifying&&(e.civic.taxes.display=!0),e.city.wardenclyffe={count:0,on:0},!0):!1},post(){e.race.terrifying&&Te()}},electricity:{id:"tech-electricity",title:t("tech_electricity"),desc:t("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge(){return 13500},Copper(){return 1e3}},effect:t("tech_electricity_effect"),action(){return _($(this)[0])?(I(t("tech_electricity_msg"),"info",!1,["progress"]),e.city.power=0,e.city.powered=!0,e.city.coal_power={count:0,on:0},e.settings.showPowerGrid=!0,Va(),!0):!1}},matter_replicator:{id:"tech-matter_replicator",title(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator"):t("tech_replicator")},desc(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator"):t("tech_replicator")},category:"special",era:"discovery",reqs:{high_tech:2},condition(){return!!(e.stats.achieve.adam_eve&&e.stats.achieve.adam_eve.l>=5)},not_trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge(){return 25e3}},effect(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator_effect_alt"):t("tech_replicator_effect_alt")},action(){if(_($(this)[0])){if(e.race.universe==="antimatter"&&e.race.amexplode){se("annihilation"),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),$("body").addClass("nuke");let a=$('
');$("body").append(a),setTimeout(function(){a.addClass("burn")},500),setTimeout(function(){a.addClass("b")},600),setTimeout(function(){window.soft_reset()},4e3)}else e.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){Te()}},industrialization:{id:"tech-industrialization",title:t("tech_industrialization"),desc:t("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge(){return 25200}},effect:t("tech_industrialization_effect"),action(){return _($(this)[0])?(e.resource.Titanium.display=!0,e.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:0,Nano:0,Stanene:0},!0):!1},post(){De()}},electronics:{id:"tech-electronics",title:t("tech_electronics"),desc:t("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge(){return 5e4}},effect:t("tech_electronics_effect"),action(){return _($(this)[0])?(e.race.terrifying&&(e.tech.gambling=1,e.city.casino={count:0,on:0},e.space.spc_casino={count:0,on:0}),!0):!1}},fission:{id:"tech-fission",title:t("tech_fission"),desc:t("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge(){return 77400},Uranium(){return 10}},effect:t("tech_fission_effect"),action(){return _($(this)[0])?(I(t("tech_fission_msg"),"info",!1,["progress"]),e.city.fission_power={count:0,on:0},!0):!1}},arpa:{id:"tech-arpa",title:t("tech_arpa"),desc:t("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge(){return 9e4}},effect:t("tech_arpa_effect"),action(){return _($(this)[0])?(e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.race.truepath&&!e.tech.unify&&(e.tech.unify=1),!0):!1},post(){ye("Physics")}},rocketry:{id:"tech-rocketry",title:t("tech_rocketry"),desc:t("tech_rocketry"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["high_tech",7],cost:{Knowledge(){return 112500},Oil(){return e.city.ptrait.includes("dense")?8e3:6800}},effect:t("tech_rocketry_effect"),action(){return _($(this)[0])?(e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[yt(3)]),"info",!1,["progress","combat"])),!0):!1},post(){ye("Physics")}},robotics:{id:"tech-robotics",title:t("tech_robotics"),desc:t("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge(){return 125e3}},effect:t("tech_robotics_effect"),action(){return!!_($(this)[0])}},lasers:{id:"tech-lasers",title:t("tech_lasers"),desc:t("tech_lasers_desc"),category:"progress",era:"deep_space",reqs:{high_tech:8,space:3,supercollider:1,elerium:1},grant:["high_tech",9],cost:{Knowledge(){return 28e4},Elerium(){return 100}},effect:t("tech_lasers_effect"),action(){return _($(this)[0])?(e.race.cataclysm&&L("iron_will",!1,3),!0):!1}},artifical_intelligence:{id:"tech-artifical_intelligence",title:t("tech_artificial_intelligence"),desc:t("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge(){return 325e3}},effect:t("tech_artificial_intelligence_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_artificial_intelligence_flair")}},quantum_computing:{id:"tech-quantum_computing",title:t("tech_quantum_computing"),desc:t("tech_quantum_computing"),category:"progress",era:"deep_space",reqs:{high_tech:10,nano:1},grant:["high_tech",11],cost:{Knowledge(){return 435e3},Elerium(){return 250},Nano_Tube(){return 1e5}},effect:t("tech_quantum_computing_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_quantum_computing_flair")}},virtual_reality:{id:"tech-virtual_reality",title:t("tech_virtual_reality"),desc:t("tech_virtual_reality"),category:"progress",era:"interstellar",reqs:{high_tech:11,alpha:2,infernite:1,stanene:1},grant:["high_tech",12],cost:{Knowledge(){return 6e5},Stanene(){return 1250},Soul_Gem(){return 1}},effect:t("tech_virtual_reality_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_virtual_reality_flair")}},plasma:{id:"tech-plasma",title:t("tech_plasma"),desc:t("tech_plasma"),category:"progress",era:"interstellar",path:["standard","truepath"],reqs:{high_tech:12},grant:["high_tech",13],cost:{Knowledge(){return 755e3},Infernite(){return e.race.truepath?0:1e3},Stanene(){return e.race.truepath?1e6:25e4}},effect:t("tech_plasma_effect"),action(){return!!_($(this)[0])}},shields:{id:"tech-shields",title:t("tech_shields"),desc:t("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge(){return 85e4}},effect:t("tech_shields_effect"),action(){return _($(this)[0])?(e.settings.space.neutron=!0,e.settings.space.blackhole=!0,!0):!1}},ai_core:{id:"tech-ai_core",title:t("tech_ai_core"),desc:t("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge(){return 15e5}},effect:t("tech_ai_core_effect"),action(){return _($(this)[0])?(e.interstellar.citadel={count:0,on:0},!0):!1}},metaphysics:{id:"tech-metaphysics",title:t("tech_metaphysics"),desc:t("tech_metaphysics"),category:"progress",era:"intergalactic",reqs:{high_tech:15,xeno:5},grant:["high_tech",16],cost:{Knowledge(){return 5e6},Vitreloy(){return 1e4},Soul_Gem(){return 10}},effect(){return t("tech_metaphysics_effect")},action(){return!!_($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:t("tech_orichalcum_analysis"),desc:t("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge(){return 122e5},Orichalcum(){return 1e5}},effect(){return t("tech_orichalcum_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0):!1}},cybernetics:{id:"tech-cybernetics",title:t("tech_cybernetics"),desc:t("tech_cybernetics"),category:"progress",era:"dimensional",reqs:{high_tech:17,hell_ruins:4},grant:["high_tech",18],cost:{Knowledge(){return 25e6},Adamantite(){return 125e5},Stanene(){return 5e7},Vitreloy(){return 1e7}},effect(){return t("tech_cybernetics_effect")},action(){return!!_($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:t("tech_blood_pact"),desc:t("tech_blood_pact"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:18,b_stone:1},grant:["b_stone",2],cost:{Knowledge(){return 52e6},Blood_Stone(){return 1}},effect(){return t("tech_blood_pact_effect")},action(){return _($(this)[0])?(e.settings.arpa.blood=!0,ye("Crispr"),!0):!1},post(){ye("Blood")}},purify:{id:"tech-purify",title:t("tech_purify"),desc:t("tech_purify"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:3,b_stone:2},grant:["b_stone",3],cost:{Knowledge(){return 525e5},Blood_Stone(){return 1}},effect(){return t("tech_purify_effect")},action(){return!!_($(this)[0])}},waygate:{id:"tech-waygate",title:t("tech_waygate"),desc:t("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge(){return 55e6}},effect(){return t("tech_waygate_effect")},action(){return _($(this)[0])?(e.portal.waygate={count:0,progress:0,on:0},!0):!1}},demonic_infusion:{id:"tech-demonic_infusion",title:t("tech_demonic_infusion"),desc:t("tech_demonic_infusion"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2,waygate:3},grant:["waygate",4],not_trait:["witch_hunter","fasting"],cost:{Species(){return sr(1e3)},Knowledge(){return 55e6},Demonic_Essence(){return 1}},effect(){return`
${t("tech_demonic_infusion_effect")}
${t("tech_demonic_infusion_effect2",[ke("descend").artifact])}
`},action(){return Jt($(this)[0])&&mi(),!1}},gate_key:{id:"tech-gate_key",title:t("tech_gate_key"),desc:t("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge(){return 3e7}},effect(){return t("tech_gate_key_effect")},action(){return _($(this)[0])?(e.portal.west_tower={count:0,on:0},e.portal.east_tower={count:0,on:0},!0):!1}},gate_turret:{id:"tech-gate_turret",title:t("tech_gate_turret"),desc:t("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge(){return 32e6}},effect(){return t("tech_gate_turret_effect")},action(){return _($(this)[0])?(e.portal.gate_turret={count:0,on:0},!0):!1}},infernite_mine:{id:"tech-infernite_mine",title:t("tech_infernite_mine"),desc:t("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge(){return 325e5}},effect(){return t("tech_infernite_mine_effect")},action(){return _($(this)[0])?(e.portal.infernite_mine={count:0,on:0},!0):!1}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:t("tech_study_corrupt_gem"),desc:t("tech_study_corrupt_gem"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],trait:["witch_hunter"],cost:{Mana(){return e.race.no_plasmid?1e4:3e4},Knowledge(){return 185e5},Corrupt_Gem(){return 1}},effect(){return t("tech_study_corrupt_gem_effect")},action(){return _($(this)[0])?(I(t("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),e.resource.Corrupt_Gem.display=!1,!0):!1}},soul_binding:{id:"tech-soul_binding",title:t("tech_soul_binding"),desc:t("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge(){return 19e6}},effect(){return t("tech_soul_binding_effect")},action(){return!!_($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:t("tech_soul_capacitor"),desc:t("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge(){return 195e5}},effect(){return t("tech_soul_capacitor_effect")},action(){return _($(this)[0])?(e.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0):!1}},absorption_chamber:{id:"tech-absorption_chamber",title:t("tech_absorption_chamber"),desc:t("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge(){return 2e7}},effect(){return t("tech_absorption_chamber_effect")},action(){return _($(this)[0])?(e.portal.absorption_chamber={count:0},!0):!1}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:t("tech_corrupt_gem_analysis"),desc:t("tech_corrupt_gem_analysis"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],not_trait:["witch_hunter"],cost:{Species(){return 1},Knowledge(){return 22e6},Corrupt_Gem(){return 1}},effect(){return t("tech_corrupt_gem_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),e.resource.Corrupt_Gem.display=!1,!0):!1}},hell_search:{id:"tech-hell_search",title:t("tech_hell_search"),desc:t("tech_hell_search"),category:"hell_dimension",era:"dimensional",reqs:{corrupt:2},grant:["hell_ruins",1],cost:{Knowledge(){return 221e5},Structs(){return{portal:{sensor_drone:{s:"prtl_badlands",count:25,on:25}}}}},effect(){return t("tech_hell_search_effect")},action(){return _($(this)[0])?(I(t("tech_hell_search_result"),"info",!1,["progress","hell"]),e.settings.portal.ruins=!0,e.settings.portal.gate=!0,e.portal.guard_post={count:0,on:0,support:0,s_max:0},!0):!1}},codex_infernium:{id:"tech-codex_infernium",title:t("tech_codex_infernium"),desc:t("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge(){return 235e5},Codex(){return 1}},effect(){return t("tech_codex_infernium_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!1,!0):!1}},lake_analysis:{id:"tech-lake_analysis",title:t("tech_lake_analysis"),desc:t("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge(){return 34e6}},effect(){return t("tech_lake_analysis_effect")},action(){return _($(this)[0])?(e.race.fasting&&e.tech.dish>=1&&I(t("tech_lake_analysis_fasting"),"info",!1,["progress","hell"]),!0):!1}},lake_threat:{id:"tech-lake_threat",title:t("tech_lake_threat"),desc:t("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge(){return 345e5}},effect(){return t("tech_lake_threat_effect")},action(){return _($(this)[0])?(e.portal.bireme={count:0,on:0,crew:0,mil:0},I(t("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0):!1}},lake_transport:{id:"tech-lake_transport",title:t("tech_lake_transport"),desc:t("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge(){return 35e6}},effect(){return t("tech_lake_transport_effect")},action(){return _($(this)[0])?(e.portal.transport={count:0,on:0,crew:0,mil:0,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}},!0):!1}},cooling_tower:{id:"tech-cooling_tower",title:t("tech_cooling_tower"),desc:t("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge(){return 375e5}},effect(){return t("tech_cooling_tower_effect")},action(){return _($(this)[0])?(e.portal.cooling_tower={count:0,on:0},!0):!1}},miasma:{id:"tech-miasma",title:t("tech_miasma"),desc:t("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge(){return 3825e4}},effect(){return t("tech_miasma_effect")},action(){return _($(this)[0])?(e.portal.port={count:0},!0):!1}},incorporeal:{id:"tech-incorporeal",title:t("tech_incorporeal"),desc:t("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge(){return 175e5},Phage(){return 25}},effect(){return t("tech_incorporeal_effect")},action(){return!!_($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:t("tech_ascension"),desc:t("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge(){return 185e5},Plasmid(){return 100}},effect(){return t("tech_ascension_effect")},action(){return _($(this)[0])?(e.settings.space.sirius=!0,!0):!1}},terraforming:{id:"tech-terraforming",title:t("tech_terraforming"),desc:t("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge(){return 18e6}},effect(){return t("tech_terraforming_effect",[S().red])},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},cement_processing:{id:"tech-cement_processing",title:t("tech_cement_processing"),desc:t("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge(){return 175e4}},effect:t("tech_cement_processing_effect"),action(){return!!_($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:t("tech_adamantite_processing"),desc:t("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge(){return 2e6}},effect:t("tech_adamantite_processing_effect"),action(){return!!_($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:t("tech_adamantite_processing"),desc:t("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge(){return 2e6}},effect:t("tech_adamantite_processing_effect"),action(){return!!_($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:t("tech_graphene_processing"),desc:t("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge(){return 25e5}},effect:t("tech_graphene_processing_effect"),action(){return!!_($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:t("tech_fusion_power"),desc:t("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge(){return 64e4}},effect:t("tech_fusion_power_effect"),action(){return _($(this)[0])?(e.interstellar.fusion={count:0,on:0},!0):!1}},infernium_power:{id:"tech-infernium_power",title:t("tech_infernium_power"),desc:t("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge(){return 3e7}},effect:t("tech_infernium_power_effect"),action(){return _($(this)[0])?(e.portal.inferno_power={count:0,on:0},!0):!1}},thermomechanics:{id:"tech-thermomechanics",title:t("tech_thermomechanics"),desc:t("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge(){return 6e4}},effect(){return t("tech_thermomechanics_effect")},action(){return!!_($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:t("tech_quantum_manufacturing"),desc:t("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge(){return 465e3}},effect:t("tech_quantum_manufacturing_effect"),action(){return!!_($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:t("tech_worker_drone"),desc:t("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge(){return 4e5}},effect(){return t("tech_worker_drone_effect",[S().gas_moon])},action(){return _($(this)[0])?(e.space.drone={count:0},!0):!1}},uranium:{id:"tech-uranium",title:t("tech_uranium"),desc:t("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge(){return 72e3}},effect:t("tech_uranium_effect"),action(){return _($(this)[0])?(e.resource.Uranium.display=!0,!0):!1},post(){De()}},uranium_storage:{id:"tech-uranium_storage",title:t("tech_uranium_storage"),desc:t("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge(){return 75600},Alloy(){return 2500}},effect:t("tech_uranium_storage_effect"),action(){return!!_($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:t("tech_uranium_ash"),desc:t("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge(){return 122e3}},effect:t("tech_uranium_ash_effect"),action(){return!!_($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:t("tech_breeder_reactor"),desc:t("tech_breeder_reactor"),category:"power_generation",era:"early_space",reqs:{high_tech:5,uranium:3,space:3},grant:["uranium",4],cost:{Knowledge(){return 16e4},Uranium(){return 250},Iridium(){return 1e3}},effect:t("tech_breeder_reactor_effect"),action(){return!!_($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:t("tech_mine_conveyor"),desc:t("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge(){return 16200},Copper(){return 2250},Steel(){return 1750}},effect:t("tech_mine_conveyor_effect"),action(){return!!_($(this)[0])}},oil_well:{id:"tech-oil_well",title:t("tech_oil_well"),desc:t("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge(){return 27e3}},effect:t("tech_oil_well_effect"),action(){return _($(this)[0])?(e.city.oil_well={count:0},!0):!1}},oil_depot:{id:"tech-oil_depot",title:t("tech_oil_depot"),desc:t("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge(){return 32e3}},effect:t("tech_oil_depot_effect"),action(){return _($(this)[0])?(e.city.oil_depot={count:0},!0):!1}},oil_power:{id:"tech-oil_power",title(){return e.race.environmentalist?t("city_wind_power"):t("tech_oil_power")},desc(){return e.race.environmentalist?t("city_wind_power"):t("tech_oil_power")},category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge(){return 44e3}},effect(){return e.race.environmentalist?t("tech_wind_power_effect"):t("tech_oil_power_effect")},action(){return _($(this)[0])?(e.city.oil_power={count:0,on:0},!0):!1}},titanium_drills:{id:"tech-titanium_drills",title:t("tech_titanium_drills"),desc:t("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge(){return 54e3},Titanium(){return 3500}},effect:t("tech_titanium_drills_effect"),action(){return!!_($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:t("tech_alloy_drills"),desc:t("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge(){return 77e3},Alloy(){return 1e3}},effect:t("tech_alloy_drills_effect"),action(){return!!_($(this)[0])}},fracking:{id:"tech-fracking",title:t("tech_fracking"),desc:t("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge(){return 132e3}},effect:t("tech_fracking_effect"),action(){return!!_($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:t("tech_mythril_drills"),desc:t("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge(){return 165e3},Mythril(){return 100}},effect:t("tech_mythril_drills_effect"),action(){return!!_($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:t("tech_mass_driver"),desc:t("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge(){return 16e4}},effect:t("tech_mass_driver_effect"),action(){return _($(this)[0])?(e.city.mass_driver={count:0,on:0},!0):!1}},orichalcum_driver:{id:"tech-orichalcum_driver",title:t("tech_orichalcum_driver"),desc:t("tech_orichalcum_driver"),category:"science",era:"intergalactic",reqs:{mass:1,science:19},grant:["mass",2],not_trait:["orbit_decayed"],cost:{Knowledge(){return 14e6},Orichalcum(){return 4e5}},effect(){return t("tech_orichalcum_driver_effect")},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},polymer:{id:"tech-polymer",title:t("tech_polymer"),desc:t("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge(){return 8e4},Oil(){return 5e3},Alloy(){return 450}},effect:t("tech_polymer_effect"),action(){return _($(this)[0])?(e.resource.Polymer.display=!0,I(t("tech_polymer_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:t("tech_fluidized_bed_reactor"),desc:t("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge(){return 99e3}},effect:t("tech_fluidized_bed_reactor_effect"),action(){return!!_($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title(){return e.race.evil?t("tech_faux_leather"):t("tech_synthetic_fur")},desc(){return e.race.evil?t("tech_faux_leather"):t("tech_synthetic_fur")},category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge(){return 1e5},Polymer(){return 2500}},effect(){return e.race.evil?t("tech_faux_leather_effect"):t("tech_synthetic_fur_effect")},action(){return!!_($(this)[0])},post(){Pe()}},nanoweave:{id:"tech-nanoweave",title:t("tech_nanoweave"),desc:t("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge(){return 85e5},Nano_Tube(){return 5e6},Vitreloy(){return 25e4}},effect:t("tech_nanoweave_effect"),action(){return _($(this)[0])?(e.resource.Nanoweave.display=!0,I(t("tech_nanoweave_avail"),"info",!1,["progress"]),Xe(),!0):!1},post(){De()}},stanene:{id:"tech-stanene",title:t("tech_stanene"),desc:t("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge(){return 59e4},Aluminium(){return 5e5},Infernite(){return 1e3}},effect:t("tech_stanene_effect"),action(){return _($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},nano_tubes:{id:"tech-nano_tubes",title:t("tech_nano_tubes"),desc:t("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge(){return 375e3},Coal(){return 1e5},Neutronium(){return 1e3}},effect:t("tech_nano_tubes_effect"),action(){return _($(this)[0])?(e.resource.Nano_Tube.display=!0,I(t("tech_nano_tubes_msg"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},scarletite:{id:"tech-scarletite",title:t("tech_scarletite"),desc:t("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge(){return 2675e4},Iron(){return 1e8},Adamantite(){return 15e6},Orichalcum(){return 8e6}},effect:t("tech_scarletite_effect"),action(){if(_($(this)[0])){if(e.resource.Scarletite.display=!0,e.portal.hell_forge={count:0,on:0},I(t("tech_scarletite_avail"),"info",!1,["progress"]),Xe(),e.race.universe!=="micro"&&!e.pillars[e.race.species])e.tech.fusable=1;else{let a=dt();a>e.pillars[e.race.species]&&(e.pillars[e.race.species]=a),e.tech.pillars=2}return!0}return!1},post(){De()}},pillars:{id:"tech-pillars",title:t("tech_pillars"),desc:t("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge(){return 3e7}},effect:t("tech_pillars_effect"),action(){return _($(this)[0])?(I(t("tech_pillars_msg",[x[e.race.species].entity]),"info",!1,["progress","hell"]),!0):!1}},reclaimer:{id:"tech-reclaimer",title:t("tech_reclaimer"),desc:t("tech_reclaimer_desc"),category:"reclaimer",era:"civilized",reqs:{primitive:3},grant:["reclaimer",1],trait:["evil"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 45},Lumber(){return 20},Stone(){return 20}},effect:t("tech_reclaimer_effect"),action(){return _($(this)[0])?(e.civic.lumberjack.name=t("job_reclaimer"),e.civic.lumberjack.display=!0,e.city.graveyard={count:0},!0):!1}},shovel:{id:"tech-shovel",title:t("tech_shovel"),desc:t("tech_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:1,mining:2},grant:["reclaimer",2],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_shovel_effect"),action(){return!!_($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:t("tech_iron_shovel"),desc:t("tech_iron_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:2,mining:3},grant:["reclaimer",3],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 2700},Iron(){return 250}},effect:t("tech_iron_shovel_effect"),action(){return!!_($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:t("tech_steel_shovel"),desc:t("tech_steel_shovel"),category:"reclaimer",era:"discovery",reqs:{reclaimer:3,smelting:2},grant:["reclaimer",4],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_shovel_effect"),action(){return!!_($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:t("tech_titanium_shovel"),desc:t("tech_titanium_shovel"),category:"reclaimer",era:"industrialized",reqs:{reclaimer:4,high_tech:3},grant:["reclaimer",5],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 38e3},Titanium(){return 350}},effect:t("tech_titanium_shovel_effect"),action(){return!!_($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:t("tech_alloy_shovel"),desc:t("tech_alloy_shovel"),category:"reclaimer",era:"globalized",reqs:{reclaimer:5,high_tech:4},grant:["reclaimer",6],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 67500},Alloy(){return 750}},effect:t("tech_alloy_shovel_effect"),action(){return!!_($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:t("tech_mythril_shovel"),desc:t("tech_mythril_shovel"),category:"reclaimer",era:"early_space",reqs:{reclaimer:6,space:3},grant:["reclaimer",7],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 16e4},Mythril(){return 880}},effect:t("tech_mythril_shovel_effect"),action(){return!!_($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:t("tech_adamantite_shovel"),desc:t("tech_adamantite_shovel"),category:"reclaimer",era:"interstellar",reqs:{reclaimer:7,alpha:2},grant:["reclaimer",8],trait:["evil"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 525e3},Adamantite(){return 1e4}},effect:t("tech_adamantite_shovel_effect"),action(){return!!_($(this)[0])}},stone_axe:{id:"tech-stone_axe",title(){return t("tech_stone_axe")},desc(){return t("tech_stone_axe_desc")},category:"lumber_gathering",reqs:{primitive:3},era:"civilized",grant:["axe",1],not_trait:["kindling_kindred","smoldering","evil","cataclysm"],cost:{Knowledge(){return 45},Lumber(){return 20},Stone(){return 20}},effect(){return e.race.living_tool?t("tech_basic_livingtools"):e.race.sappy?t("tech_amber_axe_effect"):t("tech_stone_axe_effect")},action(){return _($(this)[0])?(e.civic.lumberjack.display=!0,e.city.lumber_yard={count:0},!0):!1}},copper_axes:{id:"tech-copper_axes",title:t("tech_copper_axes"),desc:t("tech_copper_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:2},not_trait:["living_tool"],grant:["axe",2],cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_copper_axes_effect"),action(){return!!_($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:t("tech_iron_saw"),desc:t("tech_iron_saw_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:3},grant:["saw",1],not_trait:["lone_survivor"],cost:{Knowledge(){return 3375},Iron(){return 400}},effect:t("tech_iron_saw_effect"),action(){return _($(this)[0])?(e.city.sawmill={count:0,on:0},!0):!1}},steel_saw:{id:"tech-steel_saw",title:t("tech_steel_saw"),desc:t("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge(){return 10800},Steel(){return 400}},effect:t("tech_steel_saw_effect"),action(){return!!_($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:t("tech_iron_axes"),desc:t("tech_iron_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:2,mining:3},not_trait:["living_tool"],grant:["axe",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1350:2700},Iron(){return 250}},effect:t("tech_iron_axes_effect"),action(){return!!_($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:t("tech_steel_axes"),desc:t("tech_steel_axes_desc"),category:"lumber_gathering",era:"discovery",reqs:{axe:3,smelting:2},not_trait:["living_tool"],grant:["axe",4],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_axes_effect"),action(){return!!_($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:t("tech_titanium_axes"),desc:t("tech_titanium_axes_desc"),category:"lumber_gathering",era:"industrialized",reqs:{axe:4,high_tech:3},not_trait:["living_tool"],grant:["axe",5],cost:{Knowledge(){return 38e3},Titanium(){return 350}},effect:t("tech_titanium_axes_effect"),action(){return!!_($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:t("tech_chainsaws"),desc:t("tech_chainsaws_desc"),category:"lumber_gathering",era:"interstellar",reqs:{axe:5,alpha:2},not_trait:["living_tool"],grant:["axe",6],cost:{Knowledge(){return 56e4},Oil(){return 1e4},Adamantite(){return 2e3}},effect:t("tech_chainsaws_effect"),action(){return!!_($(this)[0])},flair(){return`
${t("tech_chainsaws_flair1")}
${t("tech_chainsaws_flair2")}
`}},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:t("tech_copper_sledgehammer"),desc:t("tech_copper_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",1],cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_copper_sledgehammer_effect"),action(){return!!_($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:t("tech_iron_sledgehammer"),desc:t("tech_iron_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{hammer:1,mining:3},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1350:2700},Iron(){return 250}},effect:t("tech_iron_sledgehammer_effect"),action(){return!!_($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:t("tech_steel_sledgehammer"),desc:t("tech_steel_sledgehammer_desc"),category:"stone_gathering",era:"discovery",reqs:{hammer:2,smelting:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",3],cost:{Knowledge(){return 7200},Steel(){return 250}},effect:t("tech_steel_sledgehammer_effect"),action(){return!!_($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:t("tech_titanium_sledgehammer"),desc:t("tech_titanium_sledgehammer_desc"),category:"stone_gathering",era:"industrialized",reqs:{hammer:3,high_tech:3},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",4],cost:{Knowledge(){return 4e4},Titanium(){return 400}},effect:t("tech_titanium_sledgehammer_effect"),action(){return!!_($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:t("tech_copper_pickaxe"),desc:t("tech_copper_pickaxe_desc"),category:"mining",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","living_tool"],grant:["pickaxe",1],cost:{Knowledge(){return 675},Copper(){return 25}},effect:t("tech_copper_pickaxe_effect"),action(){return!!_($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:t("tech_iron_pickaxe"),desc:t("tech_iron_pickaxe_desc"),category:"mining",era:"civilized",reqs:{pickaxe:1,mining:3},not_trait:["cataclysm","living_tool"],grant:["pickaxe",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1600:3200},Iron(){return 250}},effect:t("tech_iron_pickaxe_effect"),action(){return!!_($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:t("tech_steel_pickaxe"),desc:t("tech_steel_pickaxe_desc"),category:"mining",era:"discovery",reqs:{pickaxe:2,smelting:2},not_trait:["living_tool"],grant:["pickaxe",3],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_pickaxe_effect"),action(){return!!_($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:t("tech_jackhammer"),desc:t("tech_jackhammer_desc"),category:"mining",era:"discovery",reqs:{pickaxe:3,high_tech:2},not_trait:["living_tool"],grant:["pickaxe",4],cost:{Knowledge(){return 22500},Copper(){return 5e3}},effect:t("tech_jackhammer_effect"),action(){return!!_($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:t("tech_jackhammer_mk2"),desc:t("tech_jackhammer_mk2"),category:"mining",era:"globalized",reqs:{pickaxe:4,high_tech:4},not_trait:["living_tool"],grant:["pickaxe",5],cost:{Knowledge(){return 67500},Titanium(){return 2e3},Alloy(){return 500}},effect:t("tech_jackhammer_mk2_effect"),action(){return!!_($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:t("tech_adamantite_hammer"),desc:t("tech_adamantite_hammer"),category:"mining",era:"interstellar",reqs:{pickaxe:5,alpha:2},not_trait:["living_tool"],grant:["pickaxe",6],cost:{Knowledge(){return 535e3},Adamantite(){return 12500}},effect:t("tech_adamantite_hammer_effect"),action(){return!!_($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:t("tech_copper_hoe"),desc:t("tech_copper_hoe_desc"),category:"agriculture",era:"civilized",reqs:{mining:2,agriculture:1},not_trait:["cataclysm","living_tool"],grant:["hoe",1],cost:{Knowledge(){return 720},Copper(){return 50}},effect:t("tech_copper_hoe_effect"),action(){return!!_($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:t("tech_iron_hoe"),desc:t("tech_iron_hoe_desc"),category:"agriculture",era:"civilized",reqs:{hoe:1,mining:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1800:3600},Iron(){return 500}},effect:t("tech_iron_hoe_effect"),action(){return!!_($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:t("tech_steel_hoe"),desc:t("tech_steel_hoe_desc"),category:"agriculture",era:"discovery",reqs:{hoe:2,smelting:2,agriculture:1},not_trait:["living_tool"],grant:["hoe",3],cost:{Knowledge(){return 12600},Steel(){return 500}},effect:t("tech_steel_hoe_effect"),action(){return!!_($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:t("tech_titanium_hoe"),desc:t("tech_titanium_hoe_desc"),category:"agriculture",era:"industrialized",reqs:{hoe:3,high_tech:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",4],cost:{Knowledge(){return 44e3},Titanium(){return 500}},effect:t("tech_titanium_hoe_effect"),action(){return!!_($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:t("tech_adamantite_hoe"),desc:t("tech_adamantite_hoe_desc"),category:"agriculture",era:"interstellar",reqs:{hoe:4,alpha:2},not_trait:["living_tool"],grant:["hoe",5],cost:{Knowledge(){return 53e4},Adamantite(){return 1e3}},effect:t("tech_adamantite_hoe_effect"),action(){return!!_($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:t("tech_cyber_limbs"),desc:t("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge(){return 27e6}},effect:t("tech_cyber_limbs_effect"),action(){return!!_($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:t("tech_slave_pens"),desc:t("tech_slave_pens"),category:"slaves",era:"civilized",reqs:{military:1,mining:1},not_trait:["cataclysm","lone_survivor"],grant:["slaves",1],trait:["slaver"],cost:{Knowledge(){return 150}},effect:t("tech_slave_pens_effect"),action(){return _($(this)[0])?(e.city.slave_pen={count:0},e.resource.Slave.amount=0,!0):!1}},slave_market:{id:"tech-slave_market",title:t("tech_slave_market"),desc:t("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge(){return 8e3}},effect:t("tech_slave_market_effect"),action(){return!!_($(this)[0])},post(){Te()}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:t("tech_ceremonial_dagger"),desc:t("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge(){return 60}},effect:t("tech_ceremonial_dagger_effect"),action(){return!!_($(this)[0])}},last_rites:{id:"tech-last_rites",title:t("tech_last_rites"),desc:t("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge(){return 1e3}},effect:t("tech_last_rites_effect"),action(){return!!_($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:t("tech_ancient_infusion"),desc:t("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge(){return 182e3}},effect:t("tech_ancient_infusion_effect"),action(){return!!_($(this)[0])}},garrison:{id:"tech-garrison",title:t("tech_garrison"),desc:t("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge(){return 70}},effect:t("tech_garrison_effect"),action(){return _($(this)[0])?(e.city.garrison={count:0,on:0},!0):!1}},mercs:{id:"tech-mercs",title:t("tech_mercs"),desc:t("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money(){return 1e4},Knowledge(){return 4500}},effect:t("tech_mercs_effect"),action(){return _($(this)[0])?(e.civic.garrison.mercs=!0,!0):!1},post(){Te()}},signing_bonus:{id:"tech-signing_bonus",title:t("tech_signing_bonus"),desc:t("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money(){return 5e4},Knowledge(){return 32e3}},effect:t("tech_signing_bonus_effect"),action(){return!!_($(this)[0])}},hospital:{id:"tech-hospital",title:t("tech_hospital"),desc:t("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge(){return 5e3}},effect:t("tech_hospital_effect"),action(){return _($(this)[0])?(e.city.hospital={count:0},!0):!1}},bac_tanks:{id:"tech-bac_tanks",title(){return e.race.artifical?t("tech_repair_subroutines"):t("tech_bac_tanks")},desc(){return e.race.artifical?t("tech_repair_subroutines"):t("tech_bac_tanks_desc")},category:"military",era:"interstellar",reqs:{medic:1,infernite:1},grant:["medic",2],cost:{Knowledge(){return 6e5},Infernite(){return 250}},effect(){return e.race.artifical?t("tech_repair_subroutines_effect"):t("tech_bac_tanks_effect")},action(){return!!_($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:t("tech_boot_camp"),desc:t("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge(){return 8e3}},effect:t("tech_boot_camp_effect"),action(){return _($(this)[0])?(e.city.boot_camp={count:0},!0):!1}},vr_training:{id:"tech-vr_training",title:t("tech_vr_training"),desc:t("tech_vr_training"),category:"military",era:"interstellar",path:["standard","truepath"],reqs:{boot_camp:1,high_tech:12},not_trait:["cataclysm","lone_survivor"],grant:["boot_camp",2],cost:{Knowledge(){return 625e3}},effect(){return t("tech_vr_training_effect")},action(){return!!_($(this)[0])}},bows:{id:"tech-bows",title:t("tech_bows"),desc:t("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge(){return 225},Lumber(){return 250}},effect:t("tech_bows_effect"),action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title(){return e.race.universe==="magic"?t("tech_magic_arrow"):t("tech_flintlock_rifle")},desc(){return e.race.universe==="magic"?t("tech_magic_arrow"):t("tech_flintlock_rifle")},category:"military",era:"civilized",reqs:{military:2,explosives:1},grant:["military",3],cost:{Knowledge(){return 5400},Coal(){return e.race.universe==="magic"?0:750},Mana(){return e.race.universe==="magic"?100:0}},effect(){return e.race.universe==="magic"?t("tech_magic_arrow_effect"):t("tech_flintlock_rifle_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title(){return e.race.universe==="magic"?t("tech_fire_mage"):t("tech_machine_gun")},desc(){return e.race.universe==="magic"?t("tech_fire_mage"):t("tech_machine_gun")},category:"military",era:"industrialized",reqs:{military:3,oil:1},grant:["military",4],cost:{Mana(){return e.race.universe==="magic"?300:0},Knowledge(){return 33750},Oil(){return 1500}},effect(){return e.race.universe==="magic"?t("tech_fire_mage_effect"):t("tech_machine_gun_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:t("tech_bunk_beds"),desc:t("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge(){return 76500},Furs(){return 25e3},Alloy(){return 3e3}},effect:t("tech_bunk_beds_effect"),action(){return!!_($(this)[0])}},rail_guns:{id:"tech-rail_guns",title(){return e.race.universe==="magic"?t("tech_lightning_caster"):t("tech_rail_guns")},desc(){return e.race.universe==="magic"?t("tech_lightning_caster"):t("tech_rail_guns")},category:"military",era:"early_space",reqs:{military:5,mass:1},grant:["military",6],cost:{Mana(){return e.race.universe==="magic"?450:0},Knowledge(){return 2e5},Iridium(){return 2500}},effect(){return e.race.universe==="magic"?t("tech_lightning_caster_effect"):t("tech_rail_guns_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title(){return e.race.universe==="magic"?t("tech_mana_rifles"):t("tech_laser_rifles")},desc(){return e.race.universe==="magic"?t("tech_mana_rifles"):t("tech_laser_rifles")},category:"military",era:"deep_space",reqs:{military:6,high_tech:9,elerium:1},grant:["military",7],cost:{Knowledge(){return 325e3},Elerium(){return 250}},effect(){return e.race.universe==="magic"?t("tech_mana_rifles_effect"):t("tech_laser_rifles_effect")},action(){return _($(this)[0])?(e.race.species==="sharkin"&&L("laser_shark"),!0):!1},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title(){return e.race.universe==="magic"?t("tech_focused_rifles"):t("tech_plasma_rifles")},desc(){return e.race.universe==="magic"?t("tech_focused_rifles"):t("tech_plasma_rifles")},category:"military",era:"interstellar",reqs:{military:7,high_tech:13},grant:["military",8],path:["standard","truepath"],cost:{Knowledge(){return 78e4},Elerium(){return e.race.truepath?1e3:500}},effect(){return e.race.universe==="magic"?t("tech_focused_rifles_effect"):t("tech_plasma_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title(){return e.race.universe==="magic"?t("tech_magic_missile"):t("tech_disruptor_rifles")},desc(){return e.race.universe==="magic"?t("tech_magic_missile"):t("tech_disruptor_rifles")},category:"military",era:"interstellar",reqs:{military:8,high_tech:14,science:15,infernite:1},grant:["military",9],cost:{Knowledge(){return 1e6},Infernite(){return 1e3}},effect(){return e.race.universe==="magic"?t("tech_magic_missile_effect"):t("tech_disruptor_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title(){return e.race.universe==="magic"?t("tech_magicword_kill"):t("tech_gauss_rifles")},desc(){return e.race.universe==="magic"?t("tech_magicword_kill"):t("tech_gauss_rifles")},category:"military",era:"intergalactic",reqs:{military:9,science:18},grant:["military",10],cost:{Knowledge(){return 95e5},Bolognium(){return 1e5}},effect(){return e.race.universe==="magic"?t("tech_magicword_kill_effect"):t("tech_gauss_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:t("tech_cyborg_soldiers"),desc:t("tech_cyborg_soldiers"),category:"military",era:"dimensional",reqs:{military:10,high_tech:18},grant:["military",11],cost:{Knowledge(){return 26e6},Adamantite(){return 8e6},Bolognium(){return 4e6},Orichalcum(){return 6e6}},effect:t("tech_cyborg_soldiers_effect"),action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:t("tech_space_marines"),desc:t("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge(){return 21e4}},effect(){return`
${t("tech_space_marines_effect",[S().red])}
`},action(){return _($(this)[0])?(e.space.space_barracks={count:0,on:0},!0):!1},flair:t("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:t("tech_hammocks"),desc:t("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge(){return 89e5},Nanoweave(){return 3e4}},effect(){return t("tech_hammocks_effect")},action(){return!!_($(this)[0])}},cruiser:{id:"tech-cruiser",title:t("tech_cruiser"),desc:t("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge(){return 86e4}},effect:t("tech_cruiser_effect"),action(){return _($(this)[0])?(e.interstellar.cruiser={count:0,on:0},!0):!1}},armor:{id:"tech-armor",title:t("tech_armor"),desc:t("tech_armor_desc"),category:"military",era:"civilized",reqs:{military:1},not_trait:["apex_predator"],grant:["armor",1],cost:{Money(){return 250},Knowledge(){return 225},Furs(){return 250}},effect:t("tech_armor_effect"),action(){return!!_($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:t("tech_plate_armor"),desc:t("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge(){return 3400},Iron(){return 600}},effect:t("tech_plate_armor_effect"),action(){return!!_($(this)[0])}},kevlar:{id:"tech-kevlar",title:t("tech_kevlar"),desc:t("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge(){return 86e3},Polymer(){return 750}},effect:t("tech_kevlar_effect"),action(){return!!_($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:t("tech_nanoweave_vest"),desc:t("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge(){return 925e4},Nanoweave(){return 75e3}},effect:t("tech_nanoweave_vest_effect"),action(){return!!_($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:t("tech_laser_turret"),desc:t("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge(){return 6e5},Elerium(){return 100}},effect(){return`
${t("tech_laser_turret_effect1")}
${t("tech_laser_turret_effect2")}
`},action(){return!!_($(this)[0])},post(){C({el:"#fort"},"update"),ba(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:t("tech_plasma_turret"),desc:t("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge(){return 76e4},Elerium(){return 350}},effect(){return`
${t("tech_plasma_turret_effect")}
${t("tech_laser_turret_effect2")}
`},action(){return!!_($(this)[0])},post(){C({el:"#fort"},"update"),ba(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title(){return e.race.universe==="magic"?t("tech_magic_powder"):t("tech_black_powder")},desc(){return e.race.universe==="magic"?t("tech_magic_powder_desc"):t("tech_black_powder_desc")},category:"progress",era:"civilized",reqs:{mining:4},grant:["explosives",1],cost:{Knowledge(){return 4500},Mana(){return e.race.universe==="magic"?100:0},Crystal(){return e.race.universe==="magic"?250:0},Coal(){return e.race.universe==="magic"?300:500}},effect(){return e.race.universe==="magic"?t("tech_magic_powder_effect"):t("tech_black_powder_effect")},action(){return!!_($(this)[0])}},dynamite:{id:"tech-dynamite",title:t("tech_dynamite"),desc:t("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge(){return 4800},Coal(){return 750}},effect:t("tech_dynamite_effect"),action(){return!!_($(this)[0])}},anfo:{id:"tech-anfo",title:t("tech_anfo"),desc:t("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge(){return 42e3},Oil(){return 2500}},effect:t("tech_anfo_effect"),action(){return!!_($(this)[0])}},mad:{id:"tech-mad",title:t("tech_mad"),desc:t("tech_mad_desc"),category:"special",era:"globalized",reqs:{uranium:1,explosives:3,high_tech:7},not_trait:["cataclysm","lone_survivor"],grant:["mad",1],condition(){return e.race.sludge?!1:e.race.truepath?!!e.tech.world_control:!0},cost:{Knowledge(){return 12e4},Oil(){return e.city.ptrait.includes("dense")?1e4:8500},Uranium(){return 1250}},effect(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_mad_effect_easter"):t("tech_mad_effect")},action(){return _($(this)[0])?(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?I(t("tech_mad_info_easter"),"info",!1,["progress"]):I(t("tech_mad_info"),"info",!1,["progress"]),e.civic.mad.display=!0,!0):!1}},cement:{id:"tech-cement",title:t("tech_cement"),desc:t("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge(){return 500}},effect:t("tech_cement_effect"),action(){return _($(this)[0])?(e.city.cement_plant={count:0,on:0},!0):!1}},rebar:{id:"tech-rebar",title:t("tech_rebar"),desc:t("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge(){return 3200},Iron(){return 750}},effect:t("tech_rebar_effect"),action(){return!!_($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:t("tech_steel_rebar"),desc:t("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge(){return 6750},Steel(){return 750}},effect:t("tech_steel_rebar_effect"),action(){return!!_($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:t("tech_portland_cement"),desc:t("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge(){return 32e3}},effect:t("tech_portland_cement_effect"),action(){return!!_($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:t("tech_screw_conveyor"),desc:t("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge(){return 72e3}},effect:t("tech_screw_conveyor_effect"),action(){return!!_($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:t("tech_adamantite_screws"),desc:t("tech_adamantite_screws"),category:"cement",era:"interstellar",reqs:{cement:5,alpha:2},not_trait:["cataclysm","flier"],grant:["cement",6],cost:{Knowledge(){return 5e5},Adamantite(){return 1e4}},effect:t("tech_adamantite_screws_effect",[3]),action(){return!!_($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:t("tech_hunter_process"),desc:t("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge(){return 45e3},Titanium(){return 1e3}},effect:t("tech_hunter_process_effect"),action(){return _($(this)[0])?(e.resource.Titanium.value=Wa.Titanium,!0):!1}},kroll_process:{id:"tech-kroll_process",title:t("tech_kroll_process"),desc:t("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge(){return 78e3},Titanium(){return 1e4}},effect:t("tech_kroll_process_effect"),action(){return!!_($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:t("tech_cambridge_process"),desc:t("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge(){return 135e3},Titanium(){return 17500}},effect:t("tech_cambridge_process_effect"),action(){return!!_($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:t("tech_pynn_partical"),desc:t("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge(){return 1e5}},effect:t("tech_pynn_partical_effect"),action(){return!!_($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:t("tech_matter_compression"),desc:t("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge(){return 112500}},effect:t("tech_matter_compression_effect"),action(){return!!_($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:t("tech_higgs_boson"),desc:t("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge(){return 125e3}},effect:t("tech_higgs_boson_effect"),action(){return!!_($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:t("tech_dimensional_compression"),desc:t("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge(){return 425e3}},effect:t("tech_dimensional_compression_effect"),action(){return!!_($(this)[0])}},theology:{id:"tech-theology",title:t("tech_theology"),desc:t("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge(){return 900}},effect:t("tech_theology_effect"),action(){return _($(this)[0])?(e.city.temple={count:0},e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0),!0):!1}},fanaticism:{id:"tech-fanaticism",title:t("tech_fanaticism"),desc:t("tech_fanaticism"),category:"religion",era:"civilized",wiki:!e.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-anthropology")},cost:{Knowledge(){return 2500}},effect:`
${t("tech_fanaticism_effect")}
${t("tech_fanaticism_warning")}
`,action(){return _($(this)[0])?(e.tech.fanaticism=1,e.race.gods===e.race.species&&L("second_evolution"),ws(e.race.gods),!0):!1}},alt_fanaticism:{id:"tech-alt_fanaticism",title:t("tech_fanaticism"),desc:t("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!e.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge(){return 2500}},effect:`
${t("tech_fanaticism_effect")}
`,action(){return _($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),e.race.gods===e.race.species&&L("second_evolution"),ws(e.race.gods),!0):!1}},ancient_theology:{id:"tech-ancient_theology",title:t("tech_ancient_theology"),desc:t("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition(){return!!e.genes.ancients},cost:{Knowledge(){return 18e4}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity,r=e.race.gods!=="none"?x[e.race.gods.toLowerCase()].entity:x[e.race.species].entity;return t("tech_ancient_theology_effect",[a,r])},action(){return _($(this)[0])?(e.space.ziggurat={count:0},!0):!1}},study:{id:"tech-study",title:t("tech_study"),desc:t("tech_study_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-deify")},cost:{Knowledge(){return 195e3}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("tech_study_effect",[a])}
${t("tech_study_warning")}
`},action(){return _($(this)[0])?(e.tech.ancient_study=1,!0):!1}},encoding:{id:"tech-encoding",title:t("tech_encoding"),desc:t("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge(){return 268e3}},effect(){return`
${t("tech_encoding_effect")}
`},action(){return!!_($(this)[0])}},deify:{id:"tech-deify",title:t("tech_deify"),desc:t("tech_deify_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-study")},cost:{Knowledge(){return 195e3}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("tech_deify_effect",[a])}
${t("tech_deify_warning")}
`},action(){return _($(this)[0])?(e.tech.ancient_deify=1,ws(e.race.old_gods),ye("Genetics"),!0):!1}},infusion:{id:"tech-infusion",title:t("tech_infusion"),desc:t("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge(){return 268e3}},effect(){return`
${t("tech_infusion_effect")}
`},action(){return!!_($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:t("tech_indoctrination"),desc:t("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge(){return 5e3}},effect:t("tech_indoctrination_effect"),action(){return!!_($(this)[0])},post(){e.race.terrifying&&(e.tech.fanaticism=3,pe())}},missionary:{id:"tech-missionary",title:t("tech_missionary"),desc:t("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge(){return 1e4}},effect:t("tech_missionary_effect"),action(){return!!_($(this)[0])}},zealotry:{id:"tech-zealotry",title:t("tech_zealotry"),desc:t("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge(){return 25e3}},effect:t("tech_zealotry_effect"),action(){return!!_($(this)[0])}},anthropology:{id:"tech-anthropology",title:t("tech_anthropology"),desc:t("tech_anthropology"),category:"religion",era:"civilized",wiki:!e.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-fanaticism")},cost:{Knowledge(){return 2500}},effect:`
${t("tech_anthropology_effect")}
${t("tech_anthropology_warning")}
`,action(){return _($(this)[0])?(e.tech.anthropology=1,!0):!1}},alt_anthropology:{id:"tech-alt_anthropology",title:t("tech_anthropology"),desc:t("tech_anthropology"),category:"religion",era:"civilized",wiki:!!e.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge(){return 2500}},effect:`
${t("tech_anthropology_effect")}
`,action(){return _($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),!0):!1}},mythology:{id:"tech-mythology",title:t("tech_mythology"),desc:t("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge(){return 5e3}},effect:t("tech_mythology_effect"),action(){return!!_($(this)[0])}},archaeology:{id:"tech-archaeology",title:t("tech_archaeology"),desc:t("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge(){return 1e4}},effect:t("tech_archaeology_effect"),action(){return!!_($(this)[0])}},merchandising:{id:"tech-merchandising",title:t("tech_merchandising"),desc:t("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge(){return 25e3}},effect(){return e.race.truepath?t("tech_merchandising_effect_tp"):t("tech_merchandising_effect")},action(){return!!_($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:t("tech_astrophysics"),desc:t("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge(){return 125e3}},effect:t("tech_astrophysics_effect"),action(){return _($(this)[0])?(e.space.propellant_depot={count:0},!0):!1}},rover:{id:"tech-rover",title:t("tech_rover"),desc:t("tech_rover"),category:"space_exploration",era:"early_space",reqs:{space_explore:1},grant:["space_explore",2],cost:{Knowledge(){return 135e3},Alloy(){return 22e3},Polymer(){return 18e3},Uranium(){return 750}},effect:t("tech_rover_effect"),action(){return _($(this)[0])?(e.settings.space.moon=!0,e.space.moon_base={count:0,on:0,support:0,s_max:0},!0):!1}},probes:{id:"tech-probes",title:t("tech_probes"),desc:t("tech_probes"),category:"space_exploration",era:"early_space",reqs:{space_explore:2},grant:["space_explore",3],cost:{Knowledge(){return 168e3},Steel(){return 1e5},Iridium(){return 5e3},Uranium(){return 2250},Helium_3(){return 3500}},effect:t("tech_probes_effect"),action(){return _($(this)[0])?(e.settings.space.red=!0,e.settings.space.hell=!0,e.space.spaceport={count:0,on:0,support:0,s_max:0},!0):!1}},starcharts:{id:"tech-starcharts",title:t("tech_starcharts"),desc:t("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge(){return 185e3}},effect:t("tech_starcharts_effect"),action(){return _($(this)[0])?(e.settings.space.gas=!0,e.settings.space.sun=!0,e.race.truepath&&(e.settings.showOuter=!0),e.space.swarm_control={count:0,support:0,s_max:0},!0):!1}},colonization:{id:"tech-colonization",title:t("tech_colonization"),desc(){return t("tech_colonization_desc",[S().red])},category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge(){return 172e3}},effect(){return t(e.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[S().red])},action(){return _($(this)[0])?(e.space.biodome={count:0,on:0},!0):!1}},red_tower:{id:"tech-red_tower",title(){return t("tech_red_tower",[S().red])},desc(){return t("tech_red_tower",[S().red])},category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge(){return 195e3}},effect(){return t("tech_red_tower_effect",[S().red])},action(){return _($(this)[0])?(e.space.red_tower={count:0,on:0},!0):!1}},space_manufacturing:{id:"tech-space_manufacturing",title:t("tech_space_manufacturing"),desc:t("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge(){return 22e4}},effect(){return t("tech_space_manufacturing_effect",[S().red])},action(){return _($(this)[0])?(e.space.red_factory={count:0,on:0},!0):!1}},exotic_lab:{id:"tech-exotic_lab",title:t("tech_exotic_lab"),desc:t("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge(){return 25e4}},effect:t("tech_exotic_lab_effect"),action(){return _($(this)[0])?(e.space.exotic_lab={count:0,on:0},!0):!1}},hydroponics:{id:"tech-hydroponics",title:t("tech_hydroponics"),desc(){return t("tech_hydroponics")},category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge(){return 3e6},Bolognium(){return 5e5}},effect(){return t("tech_hydroponics_effect")},action(){return!!_($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:t("tech_dyson_sphere"),desc:t("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge(){return 195e3}},effect:t("tech_dyson_sphere_effect"),action(){return!!_($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:t("tech_dyson_swarm"),desc:t("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge(){return 21e4}},effect:t("tech_dyson_swarm_effect"),action(){return _($(this)[0])?(e.space.swarm_satellite={count:0},!0):!1}},swarm_plant:{id:"tech-swarm_plant",title:t("tech_swarm_plant"),desc:t("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge(){return 25e4}},effect(){return t("tech_swarm_plant_effect",[x[e.race.species].home,S().hell])},action(){return _($(this)[0])?(e.space.swarm_plant={count:0},!0):!1}},space_sourced:{id:"tech-space_sourced",title:t("tech_space_sourced"),desc:t("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge(){return 3e5}},effect:t("tech_space_sourced_effect"),action(){return!!_($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:t("tech_swarm_plant_ai"),desc:t("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge(){return 335e3}},effect:t("tech_swarm_plant_ai_effect"),action(){return!!_($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:t("tech_swarm_control_ai"),desc:t("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge(){return 36e4}},effect:t("tech_swarm_control_ai_effect"),action(){return!!_($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:t("tech_quantum_swarm"),desc:t("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge(){return 45e4}},effect:t("tech_quantum_swarm_effect"),action(){return!!_($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:t("tech_perovskite_cell"),desc:t("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge(){return 525e3},Titanium(){return 1e5}},effect:t("tech_perovskite_cell_effect"),action(){return!!_($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:t("tech_swarm_convection"),desc:t("tech_swarm_convection"),category:"power_generation",era:"interstellar",reqs:{swarm:4,stanene:1},grant:["swarm",5],path:["standard","truepath"],cost:{Knowledge(){return 725e3},Stanene(){return 1e5}},effect:t("tech_swarm_convection_effect"),action(){return!!_($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:t("tech_orichalcum_panels"),desc:t("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge(){return 14e6},Orichalcum(){return 125e3}},effect(){return t("tech_orichalcum_panels_effect")},action(){return!!_($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:t("tech_dyson_net"),desc:t("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge(){return 8e5}},effect:t("tech_dyson_net_effect"),action(){return _($(this)[0])?(e.interstellar.dyson={count:0},!0):!1}},dyson_sphere2:{id:"tech-dyson_sphere2",title:t("tech_dyson_sphere"),desc:t("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge(){return 5e6}},effect:t("tech_dyson_sphere2_effect"),action(){return _($(this)[0])?(e.interstellar.dyson_sphere={count:0},!0):!1}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:t("tech_orichalcum_sphere"),desc:t("tech_orichalcum_sphere"),category:"power_generation",era:"intergalactic",reqs:{dyson:1,science:19},condition(){return!!(e.interstellar.dyson_sphere&&e.interstellar.dyson_sphere.count>=100)},grant:["dyson",2],cost:{Knowledge(){return 175e5},Orichalcum(){return 25e4}},effect:t("tech_orichalcum_sphere_effect"),action(){return _($(this)[0])?(e.interstellar.orichalcum_sphere={count:0},!0):!1}},gps:{id:"tech-gps",title:t("tech_gps"),desc:t("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge(){return 15e4}},effect:t("tech_gps_effect"),action(){return _($(this)[0])?(e.space.gps={count:0},!0):!1}},nav_beacon:{id:"tech-nav_beacon",title:t("tech_nav_beacon"),desc:t("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge(){return 18e4}},effect:t("tech_nav_beacon_effect"),action(){return _($(this)[0])?(e.space.nav_beacon={count:0,on:0},!0):!1}},subspace_signal:{id:"tech-subspace_signal",title:t("tech_subspace_signal"),desc:t("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge(){return 7e5},Stanene(){return 125e3}},effect(){return t("tech_subspace_signal_effect",[S().red])},action(){return!!_($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:t("tech_atmospheric_mining"),desc:t("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge(){return 19e4}},effect:t("tech_atmospheric_mining_effect"),action(){return _($(this)[0])?(e.space.gas_mining={count:0,on:0},e.space.gas_storage={count:0},!0):!1}},helium_attractor:{id:"tech-helium_attractor",title:t("tech_helium_attractor"),desc:t("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge(){return 29e4},Elerium(){return 250}},effect(){return t("tech_helium_attractor_effect",[S().gas])},action(){return!!_($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:t("tech_ram_scoops"),desc:t("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge(){return 58e4}},effect(){return t("tech_ram_scoops_effect")},action(){return!!_($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:t("tech_elerium_prospecting"),desc:t("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge(){return 61e4}},effect(){return t("tech_elerium_prospecting_effect")},action(){return _($(this)[0])?(e.interstellar.elerium_prospector={count:0,on:0},!0):!1}},zero_g_mining:{id:"tech-zero_g_mining",title:t("tech_zero_g_mining"),desc:t("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge(){return 21e4}},effect:t("tech_zero_g_mining_effect"),action(){return _($(this)[0])?(e.space.space_station={count:0,on:0,support:0,s_max:0},e.space.iridium_ship={count:0,on:0},e.space.iron_ship={count:0,on:0},!0):!1}},elerium_mining:{id:"tech-elerium_mining",title:t("tech_elerium_mining"),desc:t("tech_elerium_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:4},grant:["asteroid",5],cost:{Knowledge(){return 235e3},Elerium(){return e.race.truepath?.5:1}},effect:t("tech_elerium_mining_effect"),action(){return _($(this)[0])?(e.space.elerium_ship={count:0,on:0},e.race.cataclysm&&L("iron_will",!1,2),!0):!1}},laser_mining:{id:"tech-laser_mining",title:t("tech_laser_mining"),desc:t("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge(){return 35e4}},effect:t("tech_laser_mining_effect"),action(){return!!_($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:t("tech_plasma_mining"),desc:t("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge(){return 825e3}},effect:t("tech_plasma_mining_effect"),action(){return!!_($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:t("tech_elerium_tech"),desc:t("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge(){return 275e3},Elerium(){return 20}},effect:t("tech_elerium_tech_effect"),action(){return!!_($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:t("tech_elerium_reactor"),desc:t("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge(){return 325e3},Elerium(){return 180}},effect:t("tech_elerium_reactor_effect"),action(){return _($(this)[0])?(e.space.e_reactor={count:0,on:0},!0):!1}},neutronium_housing:{id:"tech-neutronium_housing",title:t("tech_neutronium_housing"),desc:t("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge(){return 275e3},Neutronium(){return 350}},effect(){return t("tech_neutronium_housing_effect",[S().red])},action(){return!!_($(this)[0])}},unification:{id:"tech-unification",title:t("tech_unification"),desc(){return t("tech_unification_desc",[x[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge(){return 2e5}},effect:t("tech_unification_effect"),action(){return!!_($(this)[0])}},unification2:{id:"tech-unification2",title:t("tech_unification"),desc(){return t("tech_unification_desc",[x[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let a=0;for(let r=0;r<3;r++)(e.civic.foreign[`gov${r}`].occ||e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)&&a++;return a===3}},effect(){let a=e.race.banana?`
${t("tech_unification_banana")}
`:"";return`
${t("tech_unification_effect2")}
${t("tech_unification_warning")}
${a}`},action(){return _($(this)[0])?(e.race.banana&&(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),delete e.race.banana),e.civic.foreign.gov0.occ&&e.civic.foreign.gov1.occ&&e.civic.foreign.gov2.occ&&L("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&L("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&L("syndicate"),e.stats.attacks===0&&L("pacifist"),ko(),!0):!1}},unite:{id:"tech-unite",title:t("tech_unite"),desc(){return t("tech_unite_desc")},category:"special",era:"globalized",path:["truepath"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let a=0;for(let r=0;r<3;r++)(e.civic.foreign[`gov${r}`].occ||e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)&&a++;return a===3}},effect(){return`
${t("tech_unite_effect")}
${t("tech_unification_effect2")}
`},action(){return _($(this)[0])?(e.race.banana&&(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),delete e.race.banana),e.civic.foreign.gov0.occ&&e.civic.foreign.gov1.occ&&e.civic.foreign.gov2.occ&&L("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&L("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&L("syndicate"),e.stats.attacks===0&&L("pacifist"),ko(),e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[yt(3)]),"info",!1,["progress","combat"])),!0):!1}},genesis:{id:"tech-genesis",title:t("tech_genesis"),desc:t("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge(){return 35e4}},effect:t("tech_genesis_effect"),action(){return!!_($(this)[0])}},star_dock:{id:"tech-star_dock",title:t("tech_star_dock"),desc:t("tech_star_dock"),category:"special",era:"deep_space",reqs:{genesis:2,space:5,high_tech:10},grant:["genesis",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 38e4}},effect:t("tech_star_dock_effect"),action(){return _($(this)[0])?(e.space.star_dock={count:0,ship:0,probe:0,template:e.race.species},!0):!1}},interstellar:{id:"tech-interstellar",title:t("tech_interstellar"),desc:t("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge(){return 4e5}},effect:t("tech_interstellar_effect"),action(){return _($(this)[0])?(e.starDock.probes={count:0},!0):!1}},genesis_ship:{id:"tech-genesis_ship",title(){return e.race.cataclysm?t("tech_generational_ship"):t("tech_genesis_ship")},desc(){return e.race.cataclysm?t("tech_generational_ship"):t("tech_genesis_ship")},category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge(){return 425e3}},effect(){return e.race.cataclysm?t("tech_generational_effect"):t("tech_genesis_ship_effect")},action(){return _($(this)[0])?(e.starDock.seeder={count:0},e.race.cataclysm&&L("iron_will",!1,4),!0):!1}},geck:{id:"tech-geck",title(){return t("tech_geck")},desc(){return t("tech_geck_desc")},category:"special",era:"deep_space",reqs:{genesis:5},grant:["geck",1],condition(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)},cost:{Knowledge(){return 5e5}},effect(){return t("tech_geck_effect")},action(){return _($(this)[0])?(e.starDock.geck={count:0},!0):!1}},genetic_decay:{id:"tech-genetic_decay",title:t("tech_genetic_decay"),desc:t("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge(){return 2e5}},effect:t("tech_genetic_decay_effect"),action(){return!!_($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:t("tech_stabilize_decay"),desc:t("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge(){return 5e7},Blood_Stone(){return 1}},effect:t("tech_stabilize_decay_effect"),action(){return!!_($(this)[0])}},tachyon:{id:"tech-tachyon",title:t("tech_tachyon"),desc:t("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge(){return 435e3}},effect:t("tech_tachyon_effect"),action(){return!!_($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:t("tech_warp_drive"),desc:t("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge(){return 45e4}},effect:t("tech_warp_drive_effect"),action(){return _($(this)[0])?(e.settings.showDeep=!0,e.settings.space.alpha=!0,e.interstellar.starport={count:0,on:0,support:0,s_max:0},!0):!1}},habitat:{id:"tech-habitat",title:t("tech_habitat"),desc:t("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge(){return 48e4}},effect:t("tech_habitat_effect"),action(){return _($(this)[0])?(e.interstellar.habitat={count:0,on:0},!0):!1}},graphene:{id:"tech-graphene",title:t("tech_graphene"),desc:t("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge(){return 54e4},Adamantite(){return 1e4}},effect:t("tech_graphene_effect"),action(){return _($(this)[0])?(e.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0):!1}},aerogel:{id:"tech-aerogel",title:t("tech_aerogel"),desc:t("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge(){return 75e4},Graphene(){return 5e4},Infernite(){return 500}},effect:t("tech_aerogel_effect"),action(){return _($(this)[0])?(e.resource.Aerogel.display=!0,Xe(),!0):!1},post(){De()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:t("tech_mega_manufacturing"),desc:t("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge(){return 565e4}},effect(){return t("tech_mega_manufacturing_effect")},action(){return _($(this)[0])?(e.interstellar.int_factory={count:0,on:0},!0):!1}},luxury_condo:{id:"tech-luxury_condo",title:t("tech_luxury_condo"),desc:t("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge(){return 15e6}},effect(){return t("tech_luxury_condo_effect")},action(){return _($(this)[0])?(e.interstellar.luxury_condo={count:0,on:0},!0):!1}},stellar_engine:{id:"tech-stellar_engine",title:t("tech_stellar_engine"),desc:t("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge(){return 1e6}},effect:t("tech_stellar_engine_effect"),action(){return _($(this)[0])?(e.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0):!1}},mass_ejector:{id:"tech-mass_ejector",title:t("tech_mass_ejector"),desc:t("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge(){return 11e5}},effect:t("tech_mass_ejector_effect"),action(){return _($(this)[0])?(e.interstellar.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},!0):!1}},asteroid_redirect:{id:"tech-asteroid_redirect",title:t("tech_asteroid_redirect"),desc:t("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge(){return 35e5}},effect:t("tech_asteroid_redirect_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:t("tech_exotic_infusion"),desc:t("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){return`
${t("tech_exotic_infusion_effect",[e.resource.Soul_Gem.name])}
${t("tech_exotic_infusion_effect2")}
`},action(){return!!Jt($(this)[0])},flair(){return t("tech_exotic_infusion_flair")}},infusion_check:{id:"tech-infusion_check",title:t("tech_infusion_check"),desc:t("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){return`
${t("tech_infusion_check_effect")}
${t("tech_exotic_infusion_effect2")}
`},action(){return!!Jt($(this)[0])},flair(){return t("tech_infusion_check_flair")}},infusion_confirm:{id:"tech-infusion_confirm",title:t("tech_infusion_confirm"),desc:t("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){let a=ke("bigbang"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`
${t("wiki_tech_infusion_confirm_gains",[a.plasmid,a.phage,a.dark,r])}
`;return`
${t("tech_infusion_confirm_effect")}
${t("tech_exotic_infusion_effect2")}
${i}`},action(){if(_($(this)[0])){if(e.tech.whitehole>=4)return;e.tech.whitehole=4;let a=$('
');return $("body").append(a),setTimeout(function(){a.addClass("burn")},125),setTimeout(function(){a.addClass("b")},150),setTimeout(function(){a.addClass("c")},2e3),setTimeout(function(){wc()},4e3),!1}return!1},flair(){return t("tech_infusion_confirm_flair")}},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:t("tech_stabilize_blackhole"),desc(){return`
${t("tech_stabilize_blackhole")}
${t("tech_stabilize_blackhole2")}
`},category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge(){return 15e5},Neutronium(){return 2e4}},effect:t("tech_stabilize_blackhole_effect"),action(){if(_($(this)[0])){if(e.interstellar.stellar_engine.mass+=Re.Neutronium*2e4/1e10,e.interstellar.stellar_engine.mass+=e.interstellar.stellar_engine.exotic*40,e.interstellar.stellar_engine.exotic=0,delete e.tech.whitehole,e.race.banana&&e.interstellar.stellar_engine.mass>=12){let a=le();e.stats.banana.b3[a]=!0,a!=="m"&&a!=="l"&&(e.stats.banana.b3.l=!0)}return!0}return!1}},veil:{id:"tech-veil",title:t("tech_veil"),desc:t("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition(){return e.race.universe==="magic"},grant:["veil",1],cost:{Knowledge(){return 125e4}},effect:t("tech_veil_effect"),action(){return!!_($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:t("tech_mana_syphon"),desc:t("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition(){return e.race.universe==="magic"},grant:["veil",2],cost:{Knowledge(){return 15e5}},effect:t("tech_mana_syphon_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:t("tech_gravitational_waves"),desc:t("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge(){return 125e4}},effect:t("tech_gravitational_waves_effect"),action(){return!!_($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:t("tech_gravity_convection"),desc:t("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge(){return 135e4}},effect:t("tech_gravity_convection_effect"),action(){return!!_($(this)[0])}},wormholes:{id:"tech-wormholes",title:t("tech_wormholes"),desc:t("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge(){return 225e4}},effect:t("tech_wormholes_effect"),action(){return!!_($(this)[0])}},portal:{id:"tech-portal",title:t("tech_portal"),desc:t("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge(){return 5e5}},effect:t("tech_portal_effect"),action(){return!!_($(this)[0])}},fortifications:{id:"tech-fortifications",title:t("tech_fort"),desc:t("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge(){return 55e4},Stone(){return 1e6}},effect:t("tech_fort_effect"),action(){return _($(this)[0])?(e.settings.showPortal=!0,e.settings.portal.fortress=!0,e.settings.msgFilters.hell.unlocked||(e.settings.msgFilters.hell.unlocked=!0,e.settings.msgFilters.hell.vis=!0),e.portal.fortress={threat:1e4,garrison:0,walls:100,repair:0,patrols:0,patrol_size:10,siege:999,notify:"Yes",s_ntfy:"Yes",nocrew:!1},e.portal.turret={count:0,on:0},e.portal.carport={count:0,damaged:0,repair:0},x[e.race.species].type==="demonic"?L("blood_war"):L("pandemonium"),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,surveyors: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,surveyors:0}}},graphID:0,graphs:{}},!0):!1},post(){$i()}},war_drones:{id:"tech-war_drones",title:t("tech_war_drones"),desc:t("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge(){return 7e5}},effect:t("tech_war_drones_effect"),action(){return _($(this)[0])?(e.settings.portal.badlands=!0,e.portal.war_drone={count:0,on:0},!0):!1}},demon_attractor:{id:"tech-demon_attractor",title:t("tech_demon_attractor"),desc:t("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge(){return 745e3}},effect:t("tech_demon_attractor_effect"),action(){return _($(this)[0])?(e.portal.attractor={count:0,on:0},!0):!1}},combat_droids:{id:"tech-combat_droids",title:t("tech_combat_droids"),desc:t("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge(){return 762e3},Soul_Gem(){return 1}},effect:t("tech_combat_droids_effect"),action(){return _($(this)[0])?(e.portal.war_droid={count:0,on:0},!0):!1},flair(){return t("tech_combat_droids_flair")}},repair_droids:{id:"tech-repair_droids",title:t("tech_repair_droids"),desc:t("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge(){return 794e3},Soul_Gem(){return 1}},effect:t("tech_repair_droids_effect"),action(){return _($(this)[0])?(e.portal.repair_droid={count:0,on:0},!0):!1}},advanced_predators:{id:"tech-advanced_predators",title:t("tech_advanced_predators"),desc:t("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge(){return 5e6},Bolognium(){return 5e5},Vitreloy(){return 25e4}},effect:t("tech_advanced_predators_effect"),action(){return!!_($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:t("tech_enhanced_droids"),desc:t("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge(){return 105e4}},effect:t("tech_enhanced_droids_effect"),action(){return!!_($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:t("tech_sensor_drone"),desc:t("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge(){return 725e3}},effect:t("tech_sensor_drone_effect"),action(){return _($(this)[0])?(e.portal.sensor_drone={count:0,on:0},!0):!1}},map_terrain:{id:"tech-map_terrain",title:t("tech_map_terrain"),desc:t("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge(){return 948e3}},effect(){return t("tech_map_terrain_effect")},action(){return!!_($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:t("tech_calibrated_sensors"),desc:t("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge(){return 1125e3},Infernite(){return 3500}},effect(){return t("tech_calibrated_sensors_effect")},action(){return!!_($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:t("tech_shield_generator"),desc:t("tech_shield_generator"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:14,gateway:3,infernite:4},grant:["infernite",5],cost:{Knowledge(){return 268e4},Bolognium(){return 75e3}},effect(){return t("tech_shield_generator_effect")},action(){return!!_($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:t("tech_enhanced_sensors"),desc:t("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge(){return 475e4},Vitreloy(){return 25e3}},effect(){return t("tech_enhanced_sensors_effect")},action(){return!!_($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:t("tech_xeno_linguistics"),desc:t("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge(){return 3e6}},effect(){return t("tech_xeno_linguistics_effect")},action(){return _($(this)[0])?(e.settings.space.gorddon=!0,!0):!1}},xeno_culture:{id:"tech-xeno_culture",title:t("tech_xeno_culture"),desc:t("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge(){return 34e5}},effect(){let a=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name,r=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].entity;return t("tech_xeno_culture_effect",[a,r])},action(){return _($(this)[0])?(e.galaxy.embassy={count:0,on:0},!0):!1}},cultural_exchange:{id:"tech-cultural_exchange",title:t("tech_cultural_exchange"),desc:t("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge(){return 355e4}},effect(){let a=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name;return t("tech_cultural_exchange_effect",[a])},action(){return _($(this)[0])?(e.galaxy.symposium={count:0,on:0},e.galaxy.dormitory={count:0,on:0},!0):!1}},shore_leave:{id:"tech-shore_leave",title:t("tech_shore_leave"),desc:t("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge(){return 46e5}},effect(){return t("tech_shore_leave_effect")},action(){return!!_($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:t("tech_xeno_gift"),desc:t("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge(){return 65e5},Infernite(){return 125e3}},effect(){return t("tech_xeno_gift_effect")},action(){return _($(this)[0])?(e.galaxy.consulate={count:0},e.settings.space.alien1=!0,I(t("tech_xeno_gift_msg",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name]),"info",!1,["progress"]),!0):!1}},industrial_partnership:{id:"tech-industrial_partnership",title:t("tech_industrial_partnership"),desc(){return t("tech_industrial_partnership")},category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge(){return 725e4}},effect(){return t("tech_industrial_partnership_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.vitreloy_plant={count:0,on:0},!0):!1}},embassy_housing:{id:"tech-embassy_housing",title:t("tech_embassy_housing"),desc(){return t("tech_embassy_housing")},category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge(){return 1075e4}},effect(){return t("tech_embassy_housing_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return!!_($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:t("tech_advanced_telemetry"),desc:t("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge(){return 42e5},Vitreloy(){return 1e4}},effect(){return t("tech_advanced_telemetry_effect")},action(){return!!_($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:t("galaxy_defense_platform"),desc:t("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge(){return 485e4}},effect:t("tech_defense_platform_effect"),action(){return _($(this)[0])?(e.galaxy.defense_platform={count:0,on:0},!0):!1}},scout_ship:{id:"tech-scout_ship",title:t("galaxy_scout_ship"),desc:t("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge(){return 26e5}},effect(){return t("tech_scout_ship_effect")},action(){return _($(this)[0])?(e.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0):!1}},corvette_ship:{id:"tech-corvette_ship",title:t("galaxy_corvette_ship"),desc:t("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge(){return 32e5}},effect(){return t("tech_corvette_ship_effect")},action(){return _($(this)[0])?(e.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0):!1}},frigate_ship:{id:"tech-frigate_ship",title:t("galaxy_frigate_ship"),desc:t("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge(){return 4e6}},effect(){return t("tech_frigate_ship_effect")},action(){return _($(this)[0])?(e.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},ut(),!0):!1}},cruiser_ship:{id:"tech-cruiser_ship",title:t("galaxy_cruiser_ship"),desc:t("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge(){return 75e5}},effect(){return t("tech_cruiser_ship_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.cruiser_ship={count:0,on:0,crew:0,mil:0},e.galaxy.foothold={count:0,on:0,support:0,s_max:0},e.settings.space.alien2=!0,ut(),!0):!1}},dreadnought:{id:"tech-dreadnought",title:t("galaxy_dreadnought"),desc:t("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge(){return 1e7}},effect(){return t("tech_dreadnought_effect")},action(){return _($(this)[0])?(e.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},ut(),!0):!1}},ship_dock:{id:"tech-ship_dock",title:t("galaxy_ship_dock"),desc:t("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge(){return 39e5}},effect(){return t("tech_ship_dock_effect")},action(){return _($(this)[0])?(e.galaxy.ship_dock={count:0,on:0},!0):!1}},ore_processor:{id:"tech-ore_processor",title:t("galaxy_ore_processor"),desc:t("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge(){return 75e5}},effect(){return t("tech_ore_processor_effect")},action(){return _($(this)[0])?(e.galaxy.ore_processor={count:0,on:0},!0):!1}},scavenger:{id:"tech-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge(){return 8e6}},effect(){return t("tech_scavenger_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.scavenger={count:0,on:0,crew:0},!0):!1}},coordinates:{id:"tech-coordinates",title:t("tech_coordinates"),desc:t("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge(){return 1e7}},effect(){return t("tech_coordinates_effect")},action(){return _($(this)[0])?(e.galaxy.minelayer={count:0,on:0,crew:0,mil:0},e.settings.space.chthonian=!0,!0):!1}},chthonian_survey:{id:"tech-chthonian_survey",title:t("tech_chthonian_survey"),desc:t("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge(){return 118e5}},effect(){return t("tech_chthonian_survey_effect")},action(){return _($(this)[0])?(e.resource.Orichalcum.display=!0,e.galaxy.excavator={count:0,on:0},e.galaxy.raider={count:0,on:0,crew:0,mil:0},I(t("tech_chthonian_survey_result"),"info",!1,["progress"]),!0):!1},post(){De()}},gateway_depot:{id:"tech-gateway_depot",title:t("galaxy_gateway_depot"),desc:t("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge(){return 435e4}},effect(){return t("tech_gateway_depot_effect")},action(){return _($(this)[0])?(e.galaxy.gateway_depot={count:0,on:0},!0):!1}},soul_forge:{id:"tech-soul_forge",title:t("portal_soul_forge_title"),desc:t("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge(){return 275e4}},effect(){return t("tech_soul_forge_effect")},action(){return _($(this)[0])?(e.portal.soul_forge={count:0,on:0,kills:0},!0):!1}},soul_attractor:{id:"tech-soul_attractor",title:t("portal_soul_attractor_title"),desc:t("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge(){return 55e5}},effect(){return t("tech_soul_attractor_effect")},action(){return _($(this)[0])?(e.portal.soul_attractor={count:0,on:0},!0):!1}},soul_absorption:{id:"tech-soul_absorption",title:t("tech_soul_absorption"),desc:t("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge(){return 6e6},Infernite(){return 25e4}},effect(){return t("tech_soul_absorption_effect")},action(){return!!_($(this)[0])}},soul_link:{id:"tech-soul_link",title:t("tech_soul_link"),desc:t("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge(){return 75e5},Vitreloy(){return 25e4}},effect(){return t("tech_soul_link_effect")},action(){return!!_($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:t("portal_gun_emplacement_title"),desc:t("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge(){return 3e6}},effect(){return t("tech_gun_emplacement_effect")},action(){return _($(this)[0])?(e.portal.gun_emplacement={count:0,on:0},!0):!1}},advanced_emplacement:{id:"tech-advanced_emplacement",title:t("tech_advanced_emplacement"),desc:t("tech_advanced_emplacement"),category:"hell_dimension",era:"intergalactic",reqs:{hell_gun:1,high_tech:17},grant:["hell_gun",2],cost:{Knowledge(){return 125e5},Orichalcum(){return 18e4}},effect(){return t("tech_advanced_emplacement_effect")},action(){return!!_($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:t("tech_dial_it_to_11"),desc:t("tech_dial_it_to_11"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge(){return 5e5}},condition(){return!(e.race.sludge&&!e.race.cataclysm)},effect(){let a=ke("cataclysm"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("tech_dial_it_to_11_effect",[S().dwarf,e.race.cataclysm?S().red:x[e.race.species].home])}
${t("tech_dial_it_to_11_effect2")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){return _($(this)[0])?($("#main").addClass("earthquake"),setTimeout(function(){$("#main").removeClass("earthquake"),bc()},4e3),!0):!1},flair(){return t("tech_dial_it_to_11_flair")}},limit_collider:{id:"tech-limit_collider",title:t("tech_limit_collider"),desc:t("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge(){return 5e5}},effect(){return t("tech_limit_collider_effect")},action(){return!!_($(this)[0])}},mana:{id:"tech-mana",title:t("tech_mana"),desc:t("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition(){return e.race.universe==="magic"},cost:{Knowledge(){return 25}},effect(){return t("tech_mana_effect")},action(){return _($(this)[0])?(e.resource.Mana.display=!0,e.resource.Crystal.display=!0,e.civic.crystal_miner.display=!0,e.race.witch_hunter&&(e.resource.Sus.display=!0),!0):!1},flair:t("tech_mana_flair"),post(){De()}},ley_lines:{id:"tech-ley_lines",title:t("tech_ley_lines"),desc:t("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition(){return e.race.universe==="magic"},cost:{Knowledge(){return 40}},effect(){return t("tech_ley_lines_effect")},action(){return _($(this)[0])?(e.tech.isolation?e.tauceti.pylon={count:0}:e.race.cataclysm||e.race.orbit_decayed?e.space.pylon={count:0}:e.city.pylon={count:0},!0):!1}},rituals:{id:"tech-rituals",title:t("tech_rituals"),desc:t("tech_rituals"),category:"magic",era:"civilized",reqs:{magic:2},grant:["magic",3],condition(){return e.race.universe==="magic"},cost:{Mana(){return 25},Knowledge(){return 750},Crystal(){return 50}},effect(){return t("tech_rituals_effect")},action(){return _($(this)[0])?(e.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0},e.settings.showIndustry=!0,!0):!1},post(){Pe()}},crafting_ritual:{id:"tech-crafting_ritual",title:t("tech_crafting_ritual"),desc:t("tech_crafting_ritual"),category:"magic",era:"discovery",reqs:{magic:3,foundry:5},grant:["magic",4],condition(){return e.race.universe==="magic"},cost:{Mana(){return 100},Knowledge(){return 15e3},Crystal(){return 2500}},effect(){return t("tech_crafting_ritual_effect")},action(){return _($(this)[0])?(e.race.casting.crafting=0,!0):!1},post(){Pe()}},mana_nexus:{id:"tech-mana_nexus",title:t("tech_mana_nexus"),desc:t("tech_mana_nexus"),category:"magic",era:"early_space",reqs:{magic:4,space:3,luna:1},grant:["magic",5],condition(){return e.race.universe==="magic"},cost:{Mana(){return 500},Knowledge(){return 16e4},Crystal(){return 2500}},effect(){return t("tech_mana_nexus_effect")},action(){return!!_($(this)[0])},post(){ye("Physics")}},clerics:{id:"tech-clerics",title:t("tech_clerics"),desc:t("tech_clerics"),category:"magic",era:"civilized",reqs:{magic:3},grant:["cleric",1],condition(){return!!(e.race.universe==="magic"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display)},cost:{Mana(){return 100},Knowledge(){return 2e3},Crystal(){return 100}},effect(){return t("tech_clerics_effect")},action(){return!!_($(this)[0])}},conjuring:{id:"tech-conjuring",title:t("tech_conjuring"),desc:t("tech_conjuring_desc"),category:"magic",era:"civilized",reqs:{magic:1},grant:["conjuring",1],not_trait:["cataclysm"],condition(){return e.race.universe==="magic"},cost:{Mana(){return 2},Crystal(){return 5}},effect(){return t("tech_conjuring_effect")},action(){return!!_($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:t("tech_res_conjuring"),desc:t("tech_res_conjuring"),category:"magic",era:"civilized",reqs:{conjuring:1},grant:["conjuring",2],not_trait:["cataclysm"],condition(){return e.race.universe==="magic"},cost:{Mana(){return 5},Crystal(){return 10}},effect(){return t("tech_res_conjuring_effect")},action(){return!!_($(this)[0])}},alchemy:{id:"tech-alchemy",title:t("tech_alchemy"),desc:t("tech_alchemy"),category:"magic",era:"discovery",reqs:{magic:3,high_tech:1},grant:["alchemy",1],condition(){return e.race.universe==="magic"},cost:{Mana(){return 100},Knowledge(){return 1e4},Crystal(){return 250}},effect(){return t("tech_alchemy_effect")},action(){return _($(this)[0])?(e.race.alchemy={Food: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},e.settings.showAlchemy=!0,!0):!1},post(){ka("alchemy")}},transmutation:{id:"tech-transmutation",title:t("tech_transmutation"),desc:t("tech_transmutation"),category:"magic",era:"intergalactic",reqs:{alchemy:1,high_tech:16},grant:["alchemy",2],condition(){return e.race.universe==="magic"},cost:{Mana(){return 1250},Knowledge(){return 55e5},Crystal(){return 1e6}},effect(){return t("tech_transmutation_effect")},action(){return!!_($(this)[0])}},secret_society:{id:"tech-secret_society",title:t("tech_secret_society"),desc:t("tech_secret_society"),category:"magic",era:"civilized",reqs:{magic:1},grant:["roguemagic",1],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 10},Knowledge(){return 45}},effect(){return t("tech_secret_society_effect")},action(){return!!_($(this)[0])}},cultists:{id:"tech-cultists",title:t("tech_cultists"),desc:t("tech_cultists"),category:"magic",era:"civilized",reqs:{roguemagic:1,cleric:1},grant:["roguemagic",2],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 250},Knowledge(){return 2125}},effect(){return t("tech_cultists_effect")},action(){return!!_($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:t("tech_conceal_ward"),desc:t("tech_conceal_ward"),category:"magic",era:"discovery",reqs:{roguemagic:2,theatre:3},grant:["roguemagic",3],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 500},Knowledge(){return 8200},Crystal(){return 1e3}},effect(){return t("tech_conceal_ward_effect")},action(){return _($(this)[0])?(e.city.conceal_ward={count:0},e.space.conceal_ward={count:0},!0):!1}},subtle_rituals:{id:"tech-subtle_rituals",title:t("tech_subtle_rituals"),desc:t("tech_subtle_rituals"),category:"magic",era:"discovery",reqs:{roguemagic:3,magic:4},grant:["roguemagic",4],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 100},Knowledge(){return 15e3},Crystal(){return 2500}},effect(){return t("tech_subtle_rituals_effect")},action(){return!!_($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:t("tech_pylon_camouflage"),desc:t("tech_pylon_camouflage"),category:"magic",era:"industrialized",reqs:{roguemagic:4,high_tech:3},grant:["roguemagic",5],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 1e3},Knowledge(){return 3e4},Crystal(){return 3750}},effect(){return t("tech_pylon_camouflage_effect")},action(){return!!_($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:t("tech_fake_tech"),desc:t("tech_fake_tech"),category:"magic",era:"industrialized",reqs:{roguemagic:5,high_tech:4},grant:["roguemagic",6],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 2250},Knowledge(){return 6e4}},effect(){return t("tech_fake_tech_effect")},action(){return!!_($(this)[0])}},concealment:{id:"tech-concealment",title:t("tech_concealment"),desc:t("tech_concealment"),category:"magic",era:"early_space",reqs:{roguemagic:6,magic:5},grant:["roguemagic",7],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 3e3},Knowledge(){return 185e3}},effect(){return t("tech_concealment_effect")},action(){return!!_($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:t("tech_improved_concealment"),desc:t("tech_improved_concealment"),category:"magic",era:"intergalactic",reqs:{roguemagic:7,forbidden:1},grant:["roguemagic",8],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return e.race.no_plasmid?6e3:15e3},Knowledge(){return 2e7}},effect(){return t("tech_improved_concealment_effect")},action(){return!!_($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:t("tech_outerplane_summon"),desc:t("tech_outerplane_summon"),category:"magic",era:"dimensional",reqs:{roguemagic:8,forbidden:4,hell_spire:10,b_stone:2,waygate:3},grant:["forbidden",5],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return e.race.no_plasmid?12e3:4e4},Knowledge(){return 6e7},Demonic_Essence(){return 1}},effect(){return t("tech_outerplane_summon_effect")},action(){return!!_($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:t("tech_dark_bomb"),desc:t("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let a=le();return!!(e.portal.hasOwnProperty("waygate")&&e.portal.waygate.progress<100&&e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty("dlstr")&&e.stats.spire[a].dlstr>0)},grant:["dl_reset",1],cost:{Knowledge(){return 65e6},Soul_Gem(){return 5e3},Blood_Stone(){return 25},Dark(){return 1},Supply(){return 1e6}},effect(){return t("tech_dark_bomb_effect")},action(){return _($(this)[0])?(e.portal.waygate.progress=100,e.portal.waygate.on=0,e.tech.waygate=3,e.resource.Demonic_Essence.display=!0,e.resource.Demonic_Essence.amount=1,!0):!1},flair(){return t("tech_dark_bomb_flair")}},bribe_sphinx:{id:"tech-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("tech_bribe_sphinx_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0):!1}},alien_biotech:{id:"tech-alien_biotech",title:t("tech_alien_biotech"),desc:t("tech_alien_biotech"),category:"science",era:"solar",reqs:{genetics:8,kuiper:1},grant:["biotech",1],path:["truepath"],cost:{Knowledge(){return 24e5},Orichalcum(){return 125e3},Cipher(){return 15e3}},effect(){return t(e.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect")},action(){return!!_($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:t("tech_zero_g_lab"),desc:t("tech_zero_g_lab"),category:"science",era:"solar",path:["truepath"],reqs:{high_tech:13,graphene:1,enceladus:2},grant:["enceladus",3],cost:{Knowledge(){return 9e5}},effect:t("tech_zero_g_lab_effect"),action(){return _($(this)[0])?(e.space.zero_g_lab={count:0,on:0},!0):!1}},operating_base:{id:"tech-operating_base",title:t("tech_operating_base"),desc:t("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge(){return 14e5}},effect(){return t("tech_operating_base_effect",[S().enceladus])},action(){return _($(this)[0])?(e.space.operating_base={count:0,on:0},!0):!1}},munitions_depot:{id:"tech-munitions_depot",title:t("tech_munitions_depot"),desc:t("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge(){return 15e5}},effect(){return t("tech_munitions_depot_effect")},action(){return _($(this)[0])?(e.space.munitions_depot={count:0},!0):!1}},fob:{id:"tech-fob",title:t("tech_fob"),desc:t("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge(){return 145e4}},effect(){return t("tech_fob_effect",[S().triton])},action(){return _($(this)[0])?(e.space.fob={count:0,on:0,troops:0,enemy:0},e.space.lander={count:0,on:0},e.space.crashed_ship={count:0},!0):!1}},bac_tanks_tp:{id:"tech-bac_tanks_tp",title:t("tech_bac_tanks"),desc:t("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge(){return 175e4}},effect:t("tech_bac_tanks_effect"),action(){return!!_($(this)[0])}},medkit:{id:"tech-medkit",title:t("tech_medkit"),desc:t("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge(){return 225e4},Quantium(){return 25e4},Cipher(){return 8e3}},effect:t("tech_medkit_effect"),action(){return!!_($(this)[0])}},sam_site:{id:"tech-sam_site",title:t("tech_sam_site"),desc:t("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge(){return 1475e3}},effect(){return t("tech_sam_site_effect",[S().titan])},action(){return _($(this)[0])?(e.space.sam={count:0,on:0},!0):!1}},data_cracker:{id:"tech-data_cracker",title:t("tech_data_cracker"),desc:t("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge(){return 275e4},Cipher(){return 25e3}},effect(){return t("tech_data_cracker_effect",[e.resource.Cipher.name])},action(){return _($(this)[0])?(e.space.decoder={count:0,on:0},!0):!1}},ai_core_tp:{id:"tech-ai_core_tp",title:t("tech_ai_core"),desc:t("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge(){return 3e6},Cipher(){return 1e5}},effect:t("tech_ai_core_effect"),action(){return _($(this)[0])?(e.space.ai_core={count:0},!0):!1}},ai_optimizations:{id:"tech-ai_optimizations",title:t("tech_ai_optimizations"),desc:t("tech_ai_optimizations"),category:"ai_core",era:"solar",path:["truepath"],reqs:{eris:3,titan:9,titan_ai_core:1,dig_control:1},grant:["titan_ai_core",2],cost:{Knowledge(){return 375e4},Cipher(){return 75e3}},effect:t("tech_ai_optimizations_effect"),action(){return!!_($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:t("tech_synthetic_life"),desc:t("tech_synthetic_life"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:2},grant:["titan_ai_core",3],cost:{Knowledge(){return 4e6},Cipher(){return 75e3}},effect:t("tech_synthetic_life_effect"),action(){return _($(this)[0])?(e.space.ai_colonist={count:0,on:0},!0):!1},class:"synth"},protocol66:{id:"tech-protocol66",title:t("tech_protocol66"),desc:t("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:1},grant:["corrupted_ai",2],cost:{Knowledge(){return 5e6}},effect:t("tech_protocol66_effect"),action(){return!!Jt($(this)[0])},flair:t("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:t("tech_protocol66"),desc:t("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:2},wiki:!1,grant:["corrupted_ai",3],cost:{Knowledge(){return 5e6}},effect(){let a=ke("ai"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`
${t("tech_protocol66a_effect_gains",[a.plasmid,r,a.phage,a.cores])}
`;return`
${t("tech_protocol66a_effect")}
${i}`},action(){return _($(this)[0])?(ce.w&&ce.w.terminate(),ie(),$("body").append('
'),$("#aiAppoc").addClass("noise-wrapper"),$("#aiAppoc > div").addClass("noise"),setTimeout(function(){$("body").append('
'),$("body").append('
'),$("#deadAirTop").animate({height:"50%",opacity:1},400),$("#deadAirBottom").animate({height:"50%",opacity:1},400)},3e3),setTimeout(function(){xc()},4e3),!0):!1},flair:t("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:t("tech_terraforming"),desc:t("tech_terraforming"),category:"special",era:"solar",reqs:{dig_control:1,eris:2,titan_ai_core:2},path:["truepath"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge(){return 5e6}},effect(){return t("tech_terraforming_effect",[S().red])},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},quantium:{id:"tech-quantium",title:t("tech_quantium"),desc:t("tech_quantium"),category:"crafting",era:"solar",path:["truepath"],reqs:{supercollider:10,enceladus:3},grant:["quantium",1],cost:{Knowledge(){return 1e6},Elerium(){return 1e3},Nano_Tube(){return 1e6},Graphene(){return 1e6}},effect:t("tech_quantium_effect"),action(){return _($(this)[0])?(e.resource.Quantium.display=!0,!0):!1},post(){De()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:t("tech_anitgrav_bunk"),desc:t("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge(){return 125e4},Quantium(){return 5e5}},effect(){return t("tech_anitgrav_bunk_effect",[t("space_red_space_barracks_title")])},action(){return!!_($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:t("tech_higgs_boson"),desc:t("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge(){return 125e3}},effect:t("tech_higgs_boson_effect"),action(){return!!_($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:t("tech_long_range_probes"),desc:t("tech_long_range_probes"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{high_tech:10,elerium:1},grant:["outer",1],cost:{Knowledge(){return 4e5},Uranium(){return 2e4},Iridium(){return 25e4},Neutronium(){return 3e3},Elerium(){return 350}},effect:t("tech_long_range_probes_effect"),action(){return _($(this)[0])?(e.settings.space.titan=!0,e.settings.space.enceladus=!0,e.space.titan_spaceport={count:0,on:0,support:0,s_max:0},e.space.electrolysis={count:0,on:0,support:0,s_max:0},!0):!1}},strange_signal:{id:"tech-strange_signal",title:t("tech_strange_signal"),desc:t("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge(){return 135e4}},effect:t("tech_strange_signal_effect"),action(){return _($(this)[0])?(e.settings.space.triton=!0,!0):!1}},data_analysis:{id:"tech-data_analysis",title:t("tech_data_analysis"),desc:t("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge(){return 18e5},Cipher(){return 12500}},effect:t("tech_data_analysis_effect"),action(){return _($(this)[0])?(I(t("tech_data_analysis_result"),"info",!1,["progress"]),e.space.syndicate.spc_titan+=500,e.space.syndicate.spc_enceladus+=250,e.space.syndicate.spc_triton+=1e3,!0):!1}},mass_relay:{id:"tech-mass_relay",title:t("tech_mass_relay"),desc:t("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge(){return 22e5},Cipher(){return 4e4}},effect:t("tech_mass_relay_effect"),action(){return _($(this)[0])?(e.space.mass_relay={count:0},!0):!1}},nav_data:{id:"tech-nav_data",title:t("tech_nav_data"),desc:t("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge(){return 225e4},Cipher(){return 6e4}},effect:t("tech_nav_data_effect"),action(){return _($(this)[0])?(e.settings.space.eris=!0,e.settings.space.kuiper=!0,e.tech.eris_scan=0,e.space.drone_control={count:0,on:0,support:0,s_max:0},I(t("tech_nav_data_result",[S().eris]),"info",!1,["progress"]),!0):!1}},sensor_logs:{id:"tech-sensor_logs",title:t("tech_sensor_logs"),desc:t("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge(){return 35e5},Cipher(){return 65e3}},effect:t("tech_sensor_logs_effect"),action(){return _($(this)[0])?(I(t("tech_sensor_logs_result"),"info",!1,["progress"]),!0):!1}},dronewar:{id:"tech-dronewar",title:t("tech_dronewar"),desc:t("tech_dronewar"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:2,titan_ai_core:1},grant:["eris",3],cost:{Knowledge(){return 32e5},Cipher(){return 25e3}},effect(){return t("tech_dronewar_effect",[S().eris])},action(){return _($(this)[0])?(e.space.shock_trooper={count:0,on:0},e.space.digsite={count:0,enemy:1e4},!0):!1}},drone_tank:{id:"tech-drone_tank",title:t("tech_drone_tank"),desc:t("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge(){return 34e5},Cipher(){return 5e4}},effect:t("tech_drone_tank_effect"),action(){return _($(this)[0])?(e.space.tank={count:0,on:0},!0):!1}},stanene_tp:{id:"tech-stanene_tp",title:t("tech_stanene"),desc:t("tech_stanene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:1,enceladus:1},grant:["stanene",1],cost:{Knowledge(){return 525e3},Aluminium(){return 5e5},Nano_Tube(){return 1e5}},effect:t("tech_stanene_effect"),action(){return _($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},graphene_tp:{id:"tech-graphene_tp",title:t("tech_graphene"),desc:t("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge(){return 64e4},Adamantite(){return 25e3}},effect:t("tech_graphene_effect"),action(){return _($(this)[0])?(e.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0):!1}},virtual_reality_tp:{id:"tech-virtual_reality_tp",title:t("tech_virtual_reality"),desc:t("tech_virtual_reality"),category:"progress",era:"solar",path:["truepath"],reqs:{high_tech:11,titan:4,stanene:1},grant:["high_tech",12],cost:{Knowledge(){return 616e3},Nano_Tube(){return 1e6},Stanene(){return 125e3}},effect:t("tech_virtual_reality_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_virtual_reality_flair")}},electrolysis:{id:"tech-electrolysis",title:t("tech_electrolysis"),desc:t("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge(){return 465e3}},effect(){return t("tech_electrolysis_effect",[S().titan,e.resource.Water.name])},action(){return _($(this)[0])?(e.space.titan_quarters={count:0,on:0},e.space.titan_mine={count:0,on:0,ratio:90},!0):!1}},storehouse:{id:"tech-storehouse",title(){return t("tech_storehouse",[S().titan])},desc(){return t("tech_storehouse",[S().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge(){return 5e5}},effect(){return t("tech_storehouse_effect",[S().titan])},action(){return _($(this)[0])?(e.space.storehouse={count:0},!0):!1}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:t("tech_adamantite_vault"),desc:t("tech_adamantite_vault"),category:"banking",era:"solar",path:["truepath"],reqs:{vault:2,titan:4},grant:["vault",3],cost:{Money(){return 2e6},Knowledge(){return 56e4},Adamantite(){return 2e4}},effect:t("tech_adamantite_vault_effect"),action(){return!!_($(this)[0])}},titan_bank:{id:"tech-titan_bank",title(){return t("tech_titan_bank",[S().titan])},desc(){return t("tech_titan_bank",[S().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge(){return 6e5}},effect(){return t("tech_titan_bank_effect",[S().titan])},action(){return _($(this)[0])?(e.space.titan_bank={count:0},!0):!1}},hydrogen_plant:{id:"tech-hydrogen_plant",title:t("tech_hydrogen_plant"),desc:t("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge(){return 55e4}},effect(){return t("tech_hydrogen_plant_effect")},action(){return _($(this)[0])?(e.space.hydrogen_plant={count:0,on:0},!0):!1}},water_mining:{id:"tech-water_mining",title:t("tech_water_mining"),desc:t("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge(){return 45e4}},effect(){return t("tech_water_mining_effect",[S().enceladus,x[e.race.species].home,e.resource.Water.name])},action(){return _($(this)[0])?(e.space.water_freighter={count:0,on:0},!0):!1}},mercury_smelting:{id:"tech-mercury_smelting",title:t("tech_mercury_smelting"),desc:t("tech_mercury_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{hell:1,titan:4,smelting:6},grant:["m_smelting",1],cost:{Knowledge(){return 625e3},Adamantite(){return 5e4}},effect(){return t("tech_mercury_smelting_effect",[S().hell])},action(){return _($(this)[0])?(e.space.hell_smelter={count:0},!0):!1}},iridium_smelting:{id:"tech-iridium_smelting",title:t("tech_iridium_smelting"),desc:t("tech_iridium_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{m_smelting:1,graphene:1},grant:["m_smelting",2],cost:{Knowledge(){return 825e3},Graphene(){return 125e3}},effect:t("tech_iridium_smelting_effect"),action(){return!!_($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:t("tech_adamantite_crates"),desc:t("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge(){return 525e3},Adamantite(){return 12500}},effect:t("tech_adamantite_crates_effect"),action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title(){return t("tech_crates",[e.resource.Bolognium.name])},desc(){return t("tech_crates",[e.resource.Bolognium.name])},category:"storage",era:"tauceti",path:["truepath"],reqs:{container:7,tauceti:4},grant:["container",8],cost:{Knowledge(){return 616e4},Bolognium(){return 75e4}},effect(){return t("tech_bolognium_crates_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title(){return t("tech_containers",[e.resource.Adamantite.name])},desc(){return t("tech_adamantite_containers_desc",[e.resource.Adamantite.name])},category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:4,titan:4},grant:["steel_container",5],cost:{Knowledge(){return 575e3},Adamantite(){return 17500}},effect(){return t("tech_adamantite_containers_effect",[e.resource.Adamantite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},quantium_containers:{id:"tech-quantium_containers",title(){return t("tech_containers",[e.resource.Quantium.name])},desc(){return t("tech_containers",[e.resource.Quantium.name])},category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:5,quantium:1},grant:["steel_container",6],cost:{Knowledge(){return 115e4},Quantium(){return 1e5}},effect(){return t("tech_quantium_containers_effect",[e.resource.Quantium.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},unobtainium_containers:{id:"tech-unobtainium_containers",title(){return t("tech_containers",[e.resource.Unobtainium.name])},desc(){return t("tech_containers",[e.resource.Unobtainium.name])},category:"storage",era:"tauceti",path:["truepath"],reqs:{steel_container:6,tau_red:7},grant:["steel_container",7],cost:{Knowledge(){return 725e4},Unobtainium(){return 7500}},effect(){return t("tech_bolognium_containers_effect",[e.resource.Unobtainium.name])},action(){return!!_($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:t("tech_reinforced_shelving"),desc:t("tech_reinforced_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{graphene:1,titan:5},grant:["shelving",1],cost:{Knowledge(){return 85e4},Adamantite(){return 35e4},Graphene(){return 25e4}},effect:t("tech_reinforced_shelving_effect"),action(){return!!_($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:t("tech_garage_shelving"),desc:t("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge(){return 125e4},Quantium(){return 75e3}},effect:t("tech_garage_shelving_effect"),action(){return!!_($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:t("tech_warehouse_shelving"),desc:t("tech_warehouse_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:2,quantium:1,outer:4},grant:["shelving",3],cost:{Knowledge(){return 225e4},Quantium(){return 1e6},Cipher(){return 25e3}},effect:t("tech_warehouse_shelving_effect"),action(){return!!_($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:t("tech_elerium_extraction"),desc:t("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge(){return 25e5},Orichalcum(){return 1e5},Cipher(){return 12e3}},effect(){return t("tech_elerium_extraction_effect")},action(){return _($(this)[0])?(e.space.elerium_mine={count:0,on:0},!0):!1}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:t("tech_orichalcum_panels"),desc:t("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge(){return 24e5},Orichalcum(){return 125e3}},effect(){return t("tech_orichalcum_panels_effect")},action(){return!!_($(this)[0])}},shipyard:{id:"tech-shipyard",title(){return t("tech_shipyard",[S().dwarf])},desc(){return t("tech_shipyard",[S().dwarf])},category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge(){return 42e4}},effect(){return t("tech_shipyard_effect",[S().dwarf])},action(){return _($(this)[0])?(e.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},un(),!0):!1}},ship_lasers:{id:"tech-ship_lasers",title:t("tech_ship_lasers"),desc:t("tech_ship_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{military:7,syard_weapon:1},grant:["syard_weapon",2],cost:{Knowledge(){return 425e3},Elerium(){return 500}},effect:t("tech_ship_lasers_effect"),action(){return!!_($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:t("tech_pulse_lasers"),desc:t("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge(){return 5e5},Elerium(){return 750}},effect:t("tech_pulse_lasers_effect"),action(){return!!_($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:t("tech_ship_plasma"),desc:t("tech_ship_plasma"),category:"space_militarization",era:"solar",reqs:{high_tech:13,syard_weapon:3},grant:["syard_weapon",4],path:["truepath"],cost:{Knowledge(){return 88e4},Elerium(){return 2500}},effect:t("tech_ship_plasma_effect"),action(){return!!_($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:t("tech_ship_phaser"),desc:t("tech_ship_phaser"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:4,quantium:1},grant:["syard_weapon",5],cost:{Knowledge(){return 1225e3},Quantium(){return 75e3}},effect:t("tech_ship_phaser_effect"),action(){return!!_($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:t("tech_ship_disruptor"),desc:t("tech_ship_disruptor"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:5,outer:4},grant:["syard_weapon",6],cost:{Knowledge(){return 2e6},Cipher(){return 25e3}},effect:t("tech_ship_disruptor_effect"),action(){return!!_($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:t("tech_destroyer_ship"),desc:t("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge(){return 465e3}},effect:t("tech_destroyer_ship_effect"),action(){return!!_($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:t("tech_cruiser_ship"),desc:t("tech_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:3,titan:4},grant:["syard_class",4],cost:{Knowledge(){return 75e4},Adamantite(){return 5e4}},effect:t("tech_cruiser_ship_tp"),action(){return!!_($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:t("tech_h_cruiser_ship"),desc:t("tech_h_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:4,triton:1},grant:["syard_class",5],cost:{Knowledge(){return 15e5}},effect:t("tech_h_cruiser_ship_effect"),action(){return!!_($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:t("tech_dreadnought_ship"),desc:t("tech_dreadnought_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:5,kuiper:1},grant:["syard_class",6],cost:{Knowledge(){return 25e5},Cipher(){return 1e4}},effect:t("tech_dreadnought_ship_effect"),action(){return!!_($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:t("outer_shipyard_engine_pulse"),desc:t("outer_shipyard_engine_pulse"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:2,stanene:1},grant:["syard_engine",3],cost:{Knowledge(){return 555e3},Stanene(){return 25e4}},effect:t("tech_pulse_engine_effect"),action(){return!!_($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:t("outer_shipyard_engine_photon"),desc:t("outer_shipyard_engine_photon"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:3,quantium:1},grant:["syard_engine",4],cost:{Knowledge(){return 115e4},Quantium(){return 5e4}},effect:t("tech_photon_engine_effect"),action(){return!!_($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:t("outer_shipyard_engine_vacuum"),desc:t("outer_shipyard_engine_vacuum"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:4,outer:4},grant:["syard_engine",5],cost:{Knowledge(){return 185e4},Cipher(){return 1e4}},effect:t("outer_shipyard_engine_vacuum_desc"),action(){return!!_($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:t("tech_fusion_generator"),desc:t("tech_fusion_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:3,quantium:1},grant:["syard_power",4],cost:{Knowledge(){return 11e5},Quantium(){return 65e3}},effect:t("tech_fusion_generator_effect"),action(){return!!_($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:t("tech_elerium_generator"),desc:t("tech_elerium_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:4,outer:4},grant:["syard_power",5],cost:{Knowledge(){return 19e5},Cipher(){return 18e3}},effect:t("tech_elerium_generator_effect"),action(){return!!_($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:t("tech_quantum_signatures"),desc:t("tech_quantum_signatures"),category:"progress",era:"solar",path:["truepath"],reqs:{quantium:1,syard_sensor:3},grant:["syard_sensor",4],cost:{Knowledge(){return 105e4},Quantium(){return 1e4}},effect:t("tech_quantum_signatures_effect"),action(){return!!_($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:t("tech_interstellar_drive"),desc:t("tech_interstellar_drive"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outer:8,titan_ai_core:2,syard_sensor:4},grant:["tauceti",1],cost:{Knowledge(){return 45e5},Quantium(){return 25e4},Cipher(){return 75e3}},effect:t("tech_interstellar_drive_effect"),action(){return!!_($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:t("tech_alien_outpost"),desc:t("tech_alien_outpost"),category:"science",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:3},grant:["tau_home",4],cost:{Knowledge(){return 5e6},Cipher(){return 1e5}},effect:t("tech_alien_outpost_effect"),action(){return _($(this)[0])?(e.tauceti.alien_outpost={count:1,on:0},e.tauceti.jump_gate={count:0},e.space.jump_gate={count:0},I(t("tech_alien_outpost_msg"),"info",!1,["progress"]),!0):!1}},jumpgates:{id:"tech-jumpgates",title:t("tech_jumpgates"),desc:t("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge(){return 6e6}},effect:t("tech_jumpgates_effect"),action(){return!!_($(this)[0])}},system_survey:{id:"tech-system_survey",title:t("tech_system_survey"),desc:t("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge(){return 7e6}},effect:t("tech_system_survey_effect"),action(){return _($(this)[0])?(e.settings.tau.roid=!0,e.settings.tau.gas=!0,e.tauceti.patrol_ship={count:0,on:0,support:0,s_max:0},!0):!1}},repository:{id:"tech-repository",title:t("tech_repository"),desc:t("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge(){return 65e5}},effect:t("tech_repository_effect"),action(){return _($(this)[0])?(e.tauceti.repository={count:0},!0):!1}},fusion_generator:{id:"tech-fusion_generator",title:t("tech_fusion_power"),desc:t("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge(){return 675e4}},effect:t("tech_tau_fusion_power_effect"),action(){return _($(this)[0])?(e.tauceti.fusion_generator={count:0,on:0},!0):!1}},tau_cultivation:{id:"tech-tau_cultivation",title:t("tech_tau_cultivation"),desc:t("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge(){return 69e5}},effect(){return t("tech_tau_cultivation_effect",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.tau_farm={count:0,on:0},!0):!1}},tau_manufacturing:{id:"tech-tau_manufacturing",title:t("tech_tau_manufacturing"),desc:t("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge(){return 725e4}},effect(){return t("tech_tau_manufacturing_effect",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.tau_factory={count:0,on:0},!0):!1}},weasels:{id:"tech-weasels",title:t("tech_weasels"),desc:t("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge(){return 625e4}},effect(){return t("tech_weasels_effect",[t("tau_planet",[S().red])])},action(){return _($(this)[0])?(I(t("tech_weasels_msg",[t("tau_planet",[S().red])]),"info",!1,["progress"]),!0):!1}},jeff:{id:"tech-jeff",title:t("tech_jeff"),desc:t("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge(){return 638e4}},effect(){return t("tech_jeff_effect")},action(){return _($(this)[0])?(I(t("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0):!1}},womling_fun:{id:"tech-womling_fun",title:t("tech_womling_fun"),desc:t("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge(){return 665e4}},effect(){return t("tech_womling_fun_effect")},action(){return!!_($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:t("tech_womling_lab"),desc:t("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge(){return 69e5}},effect(){return t("tech_womling_lab_effect")},action(){return _($(this)[0])?(e.tauceti.womling_lab={count:0,on:0,scientist:0,tech:0},e.tech.womling_tech=0,!0):!1}},womling_mining:{id:"tech-womling_mining",title:t("tech_womling_mining"),desc:t("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge(){return 71e5}},effect(){return t("tech_womling_mining_effect")},action(){return!!_($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:t("tech_womling_firstaid"),desc:t("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge(){return 735e4}},effect(){return t("tech_womling_firstaid_effect")},action(){return!!_($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:t("tech_womling_logistics"),desc:t("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge(){return 765e4}},effect(){return t("tech_womling_logistics_effect",[t("tau_red_orbital_platform")])},action(){return!!_($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:t("tech_womling_repulser"),desc:t("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge(){return 79e5}},effect(){return t("tech_womling_repulser_effect",[e.resource.Oil.name,t("tau_red_orbital_platform")])},action(){return!!_($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:t("tech_womling_farming"),desc:t("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge(){return 82e5}},effect(){return t("tech_womling_farming_effect")},action(){return!!_($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:t("tech_womling_housing"),desc:t("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge(){return 85e5}},effect(){return t("tech_womling_housing_effect")},action(){return!!_($(this)[0])}},womling_support:{id:"tech-womling_support",title:t("tech_womling_support"),desc:t("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge(){return 885e4}},effect(){return`
${t("tech_womling_support_effect")}
`},action(){return _($(this)[0])?(e.tauceti.womling_station={count:0,on:0},!0):!1}},womling_recycling:{id:"tech-womling_recycling",title:t("tech_womling_recycling"),desc:t("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge(){return 955e4}},effect(){return`
${t("tech_womling_recycling_effect")}
`},action(){return!!_($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:t("tech_asteroid_analysis"),desc:t("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge(){return 735e4}},effect(){return t("tech_asteroid_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0):!1}},shark_repellent:{id:"tech-shark_repellent",title:t("tech_shark_repellent"),desc:t("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge(){return 74e5}},effect(){return t("tech_shark_repellent_effect")},action(){return _($(this)[0])?(I(t("tech_shark_repellent_msg"),"info",!1,["progress"]),!0):!1}},belt_mining:{id:"tech-belt_mining",title:t("tech_belt_mining"),desc:t("tech_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_gas",4],cost:{Knowledge(){return 765e4}},effect(){return t("tech_belt_mining_effect")},action(){return _($(this)[0])?(e.tauceti.ore_refinery={count:0,on:0,max:0,fill:0},e.tauceti.mining_ship={count:0,on:0,common:50,uncommon:50,rare:50},!0):!1}},adv_belt_mining:{id:"tech-adv_belt_mining",title:t("tech_adv_belt_mining"),desc:t("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge(){return 79e5}},effect(){return t("tech_adv_belt_mining_effect")},action(){return!!_($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:t("tech_space_whaling"),desc:t("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge(){return 75e5}},effect(){return t("tech_space_whaling_effect")},action(){return _($(this)[0])?(e.tauceti.whaling_station={count:0,on:0,max:0,fill:0},e.tauceti.whaling_ship={count:0,on:0},!0):!1}},infectious_disease_lab:{id:"tech-infectious_disease_lab",title(){return t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},desc(){return t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},category:"science",era:"tauceti",path:["truepath"],reqs:{plague:2},grant:["disease",1],cost:{Knowledge(){return 825e4}},effect(){return t(e.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect")},action(){return _($(this)[0])?(e.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0):!1}},isolation_protocol:{id:"tech-isolation_protocol",title:t("tech_isolation_protocol"),desc:t("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 85e5}},effect(){return`
${t("tech_isolation_protocol_effect",[t("tab_tauceti")])}
${t("tech_isolation_protocol_warning")}
`},action(){return _($(this)[0])?(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),e.tech.isolation=1,zc(),!0):!1}},focus_cure:{id:"tech-focus_cure",title:t("tech_focus_cure"),desc:t("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 85e5}},effect(){return`
${t("tech_focus_cure_effect",[t("tab_tauceti")])}
${t("tech_focus_cure_warning")}
`},action(){return _($(this)[0])?(e.tech.focus_cure=1,!0):!1}},decode_virus:{id:"tech-decode_virus",title:t("tech_decode_virus"),desc:t("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge(){return 9e6}},effect(){return`
${t(e.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
`},action(){return _($(this)[0])?(e.race.artifical?I(t("tech_decode_virus_msg1s",[q.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):I(t("tech_decode_virus_msg1",[q.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0):!1}},vaccine_campaign:{id:"tech-vaccine_campaign",title:t("tech_vaccine_campaign"),desc:t("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge(){return 925e4}},effect(){let a=e.race.artifical?q.city.boot_camp.title():q.city.hospital.title;return`
${t("tech_vaccine_campaign_effect",[a])}
`},action(){return _($(this)[0])?(e.race.vax=0,!0):!1}},vax_strat1:{id:"tech-vax_strat1",title:t("tech_vax_strat1"),desc:t("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat1_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_p=1,I(t("tech_vax_strat1_msg"),"info",!1,["progress"]),!0):!1}},vax_strat2:{id:"tech-vax_strat2",title:t("tech_vax_strat2"),desc:t("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat2_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_f=1,I(t("tech_vax_strat2_msg"),"info",!1,["progress"]),!0):!1}},vax_strat3:{id:"tech-vax_strat3",title:t("tech_vax_strat3"),desc:t("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat3_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_s=1,I(t("tech_vax_strat3_msg"),"info",!1,["progress"]),!0):!1}},vax_strat4:{id:"tech-vax_strat4",title:t("tech_vax_strat4"),desc:t("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat4_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_c=1,I(t("tech_vax_strat4_msg"),"info",!1,["progress"]),!0):!1}},cloning:{id:"tech-cloning",title:t("tech_cloning"),desc:t("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge(){return 975e4}},effect(){return`
${t(e.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
`},action(){return _($(this)[0])?(e.tauceti.cloning_facility={count:0,on:0},!0):!1},post(){Te()}},clone_degradation:{id:"tech-clone_degradation",title:t("tech_clone_degradation"),desc:t("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge(){return 1e7}},effect(){return`
${t("tech_clone_degradation_effect")}
`},action(){return _($(this)[0])?(I(t("tech_clone_degradation_msg"),"info",!1,["progress"]),!0):!1}},digital_paradise:{id:"tech-digital_paradise",title:t("tech_digital_paradise"),desc:t("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge(){return 105e5},Cipher(){return 2e5}},effect(){return`
${t("tech_digital_paradise_effect")}
`},action(){return!!_($(this)[0])}},ringworld:{id:"tech-ringworld",title:t("tech_ringworld"),desc:t("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money(){return 3e9},Knowledge(){return 11e6}},effect(){return`
${t("tech_ringworld_effect")}
`},action(){return _($(this)[0])?(e.settings.tau.star=!0,e.tauceti.ringworld={count:0},!0):!1}},iso_gambling:{id:"tech-iso_gambling",title:t("tech_iso_gambling"),desc:t("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge(){return 865e4}},effect:t("tech_iso_gambling_effect",[5]),action(){return!!_($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title(){return t("tech_outpost_boost")},desc(){return t("tech_outpost_boost")},category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge(){return 89e5}},effect(){return t("tech_outpost_boost_effect")},action(){return!!_($(this)[0])},flair(){return t("tech_outpost_boost_flair")}},cultural_center:{id:"tech-cultural_center",title:t("tech_cultural_center"),desc:t("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge(){return 885e4}},effect:t("tech_cultural_center_effect"),action(){return _($(this)[0])?(e.tauceti.tau_cultural_center={count:0,on:0},!0):!1},flair(){return t("tech_cultural_center_flair")}},outer_tau_survey:{id:"tech-outer_tau_survey",title:t("tech_outer_tau_survey"),desc:t("tech_outer_tau_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outpost_boost:1,plague:5},grant:["tau_gas2",1],cost:{Knowledge(){return 91e5},Helium_3(){return+_e(5e6).toFixed(0)}},effect:t("tech_outer_tau_survey_effect"),action(){return _($(this)[0])?(e.settings.tau.gas2=!0,!0):!1}},alien_research:{id:"tech-alien_research",title:t("tech_alien_research"),desc:t("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge(){return 935e4}},effect:t("tech_alien_research_effect"),action(){return _($(this)[0])?(e.tauceti.alien_space_station.decrypted=0,e.tauceti.alien_space_station.focus=95,I(t("tech_alien_research_msg"),"info",!1,["progress"]),!0):!1}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:t("tech_womling_gene_therapy"),desc:t("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge(){return 952e4}},effect:t("tech_womling_gene_therapy_effect"),action(){return!!_($(this)[0])}},food_culture:{id:"tech-food_culture",title(){return t("tech_food_culture",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])},desc(){return t("tech_food_culture",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])},category:"banking",era:"tauceti",path:["truepath"],reqs:{alien_data:2,tau_culture:1},grant:["tau_culture",2],cost:{Knowledge(){return 941e4}},effect(){return t("tech_food_culture_effect",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`),t("tech_cultural_center")])},action(){return!!_($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:t("tech_advanced_refinery"),desc:t("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge(){return 968e4}},effect(){return t("tech_advanced_refinery_effect")},action(){return!!_($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:t("tech_advanced_pit_mining"),desc:t("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge(){return 972e4}},effect(){return t("tech_advanced_pit_mining_effect")},action(){return!!_($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:t("tech_useless_junk"),desc:t("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge(){return 955e4}},effect(){return t("tech_useless_junk_effect",[t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`),t("tau_red_womlings")])},action(){return!!_($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:t("tech_advanced_asteroid_mining"),desc:t("tech_advanced_asteroid_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:5,tau_ore_mining:1},grant:["tau_ore_mining",2],cost:{Knowledge(){return 975e4}},effect(){return t("tech_advanced_asteroid_mining_effect",[t("tau_roid_mining_ship")])},action(){return!!_($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:t("tech_advanced_material_synthesis"),desc:t("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge(){return 988e4}},effect(){return t("tech_advanced_material_synthesis_effect",[e.resource.Quantium.name])},action(){return!!_($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:t("tech_matrioshka_brain"),desc:t("tech_matrioshka_brain"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:6},grant:["tau_gas2",7],not_trait:["lone_survivor"],cost:{Knowledge(){return 1e7}},effect(){return t("tech_matrioshka_brain_effect",[q.tauceti.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.matrioshka_brain={count:0},!0):!1}},ignition_device:{id:"tech-ignition_device",title:t("tech_ignition_device"),desc:t("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge(){return 105e5}},effect(){return t("tech_ignition_device_effect",[q.tauceti.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.ignition_device={count:0},e.tauceti.hasOwnProperty("matrioshka_brain")||(e.tauceti.matrioshka_brain={count:0}),!0):!1}},replicator:{id:"tech-replicator",title(){return e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")},desc(){return e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")},category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge(){return 625e4}},effect(){return e.race.universe==="antimatter"?t("tech_antireplicator_effect"):t("tech_replicator_effect")},action(){return _($(this)[0])?(e.race.replicator={res:"Unobtainium",pow:1},!0):!1}},womling_unlock:{id:"tech-womling_unlock",title:t("tech_womling_unlock"),desc:t("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge(){return 65e5}},effect(){return t("tech_womling_unlock_effect",[t("tau_planet",[S().red])])},action(){return _($(this)[0])?(e.settings.tau.red=!0,e.tauceti.orbital_platform.count=1,e.tauceti.orbital_platform.on=1,!0):!1}},garden_of_eden:{id:"tech-garden_of_eden",title:t("tech_garden_of_eden"),desc:t("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge(){return 1e7}},effect(){return t("tech_garden_of_eden_effect")},action(){return _($(this)[0])?(e.tauceti.goe_facility={count:0},!0):!1}}};function ko(){e.tech.world_control=1,A($("#garrison")),A($("#c_garrison")),ha($("#garrison"),!0),ha($("#c_garrison"),!1);for(let a=0;a<3;a++){if(e.civic.foreign[`gov${a}`].occ){let r=F(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=r,e.civic.garrison.workers+=r,e.civic.foreign[`gov${a}`].occ=!1}e.civic.foreign[`gov${a}`].buy=!1,e.civic.foreign[`gov${a}`].anx=!1,e.civic.foreign[`gov${a}`].sab=0,e.civic.foreign[`gov${a}`].act="none"}Ht("spy"),Ht("spyop")}function qr(a,r){let i=["swiss","gouda","cheddar","brie","feta","ricotta","goat","mascarpone","bleu","colby_jack","camembert","gorgonzola","mozzarella","roquefort","provolone","monterey_jack","muenster","cambozola","jarlsberg","bocconcini","cantal","emmental","havarti","burrata","cottage","asiago","wensleydale","pepper_jack","queso_blanco","pecorino","raclette","fontina","reblochon","port_salut","brillat_savarin","cream","stilton","taleggio","manchego","edam","gruyeye","parmigiano_reggiano","epoisses","comte","caciocavallo","teleme","grana_padano","chaumes","morbier","halloumi","lancashire","bleu_de_gex","fourme_d_ambert","fromage_blanc","red_leicester","bleu_d_auvergne","pont_l_eveque","jl_grubb","castello_blue","wagasi","ayibe","caravane","limburger","herve","kashkaval","sirene","paski_sir","akkawi","olomoucke_syrecky","anari","danbo","hermel\xEDn","trappista","stinking_bishop","banbury","sulguni","hofoingi","urda","golka","rokpol","telemea","bryndza","parenica","kackavalj","liptauer","greve","korbaciky","herrgardsost","vasterbottensost","mish","anejo","quesillo","nacho","reggianito","catupiry","queso_paipa","canastra","port_wine","cados","brie_de_meaux"];if(r)return i;let s=(e.stats.hasOwnProperty("reset")?e.stats.reset:0)%i.length;return a?t(`cheese_${i[s]}`):t("tech_swiss_bank",[t(`cheese_${i[s]}`)])}var In={standard:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","interstellar","intergalactic","dimensional"],truepath:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","solar","tauceti"]};function Li(a){if(a){let r={};return Object.keys(or).forEach(function(i){(In[a].includes(or[i].era)||or[i].hasOwnProperty("path"))&&(!or[i].hasOwnProperty("path")||or[i].hasOwnProperty("path")&&or[i].path.includes(a))&&(r[i]=or[i])}),r}return or}var q={evolution:{rna:{id:"evolution-rna",title:t("resource_RNA_name"),desc(){let a=e.race.rapid_mutation?2:1;return t("evo_rna",[a])},condition(){return e.resource.hasOwnProperty("RNA")&&e.resource.RNA.display&&!e.race.evoFinalMenu},action(){return e.resource.RNA.amount=2&&e.resource.DNA.amount=2&&a++,t("evo_organelles_effect",[a])},action(){return _($(this)[0])?(e.evolution.organelles.count++,!0):!1}},nucleus:{id:"evolution-nucleus",title:t("evo_nucleus_title"),desc:t("evo_nucleus_desc"),condition(){return e.evolution.hasOwnProperty("nucleus")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("nucleus",38,e.tech.evo&&e.tech.evo>=4?16:32,a)},DNA(a){return Qa("nucleus",18,e.tech.evo&&e.tech.evo>=4?12:16,a)}},effect(){let a=e.tech.evo&&e.tech.evo>=5?2:1;return t("evo_nucleus_effect",[a])},action(){return _($(this)[0])?(e.evolution.nucleus.count++,!0):!1}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:t("evo_eukaryotic_title"),desc:t("evo_eukaryotic_desc"),condition(){return e.evolution.hasOwnProperty("eukaryotic_cell")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("eukaryotic_cell",20,20,a)},DNA(a){return Qa("eukaryotic_cell",40,12,a)}},effect(){let a=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10;return t("evo_eukaryotic_effect",[a])},action(){return _($(this)[0])?(e.evolution.eukaryotic_cell.count++,e.resource.DNA.max+=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10,!0):!1}},mitochondria:{id:"evolution-mitochondria",title:t("evo_mitochondria_title"),desc:t("evo_mitochondria_desc"),condition(){return e.evolution.hasOwnProperty("mitochondria")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("mitochondria",75,50,a)},DNA(a){return Qa("mitochondria",65,35,a)}},effect:t("evo_mitochondria_effect"),action(){return _($(this)[0])?(e.evolution.mitochondria.count++,!0):!1}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:t("evo_sexual_reproduction_title"),desc:t("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition(){return e.tech.evo&&e.tech.evo===1},cost:{DNA(){return 150}},effect:t("evo_sexual_reproduction_effect"),action(){return _($(this)[0])?(e.evolution.final=20,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===1?1:0}},phagocytosis:{id:"evolution-phagocytosis",title:t("evo_phagocytosis_title"),desc:t("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition(){return e.tech.evo&&e.tech.evo===2},cost:{DNA(){return 175}},effect:t("evo_phagocytosis_effect"),action(){return _($(this)[0])?(e.tech.evo_animal=1,e.evolution.final=40,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0}},chloroplasts:{id:"evolution-chloroplasts",title(){return e.evolution.gselect?t("genelab_genus_plant"):t("evo_chloroplasts_title")},desc:t("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition(){return nt(2)},cost:{DNA(){return 175}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_chloroplasts_effect")}
${t("evo_warn_unwise")}
`:t("evo_chloroplasts_effect")},action(){return _($(this)[0])?(e.evolution.gselect?(e.tech.evo=7,e.tech.evo_plant=2,e.evolution.final=100):(e.tech.evo_plant=1,e.evolution.final=40),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_plant")}},chitin:{id:"evolution-chitin",title(){return e.evolution.gselect?t("genelab_genus_fungi"):t("evo_chitin_title")},desc:t("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition(){return nt(2)},cost:{DNA(){return 175}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_chitin_effect")}
${t("evo_warn_unwise")}
`:t("evo_chitin_effect")},action(){return _($(this)[0])?(e.evolution.gselect?(e.tech.evo=7,e.tech.evo_fungi=2,e.evolution.final=100):(e.tech.evo_fungi=1,e.evolution.final=40),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_fungi")}},exterminate:{id:"evolution-exterminate",title(){return e.evolution.gselect?t("genelab_genus_synthetic"):t("evo_exterminate_title")},desc:t("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition(){return nt(2)&&e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5},cost:{DNA(){return 200}},effect(){return t("evo_exterminate_effect")},action(){return _($(this)[0])?(e.tech.evo_synthetic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_synthetic")}},multicellular:{id:"evolution-multicellular",title:t("evo_multicellular_title"),desc:t("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition(){return e.tech.evo&&e.tech.evo===3},cost:{DNA(){return 200}},effect:t("evo_multicellular_effect"),action(){return _($(this)[0])?(e.evolution.final=60,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===3?1:0}},spores:{id:"evolution-spores",title:t("evo_spores_title"),desc:t("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},poikilohydric:{id:"evolution-poikilohydric",title:t("evo_poikilohydric_title"),desc:t("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},bilateral_symmetry:{id:"evolution-bilateral_symmetry",title:t("evo_bilateral_symmetry_title"),desc:t("evo_bilateral_symmetry_desc"),reqs:{evo:4,evo_animal:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,e.tech.evo_insectoid=1,e.tech.evo_mammals=1,e.tech.evo_eggshell=1,e.tech.evo_eldritch=1,e.tech.evo_aquatic=1,e.tech.evo_fey=1,e.tech.evo_sand=1,e.tech.evo_heat=1,e.tech.evo_polar=1,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},bryophyte:{id:"evolution-bryophyte",title:t("evo_bryophyte_title"),desc:t("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition(){return!!(e.tech.evo_plant||e.tech.evo_fungi)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_bryophyte_effect"),action(){return _($(this)[0])?(e.evolution.final=100,e.tech.evo_fungi&&(e.tech.evo_fungi=2),e.tech.evo_plant&&(e.tech.evo_plant=2),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},athropods:{id:"evolution-athropods",title:t("evo_athropods_title"),desc:t("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition(){return nt(5)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_athropods_effect")}
${t("evo_warn_unwise")}
`:t("evo_athropods_effect")},action(){return _($(this)[0])?(e.tech.evo_insectoid=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_insectoid")}},mammals:{id:"evolution-mammals",title:t("evo_mammals_title"),desc:t("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition(){return e.tech.evo&&e.tech.evo===5},cost:{DNA(){return 245}},effect:t("evo_mammals_effect"),action(){return _($(this)[0])?(e.tech.evo_humanoid=1,e.tech.evo_giant=1,e.tech.evo_small=1,e.tech.evo_animalism=1,e.tech.evo_demonic=1,e.tech.evo_angelic=1,e.evolution.final=90,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},humanoid:{id:"evolution-humanoid",title:t("evo_humanoid_title"),desc:t("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_humanoid_effect")}
${t("evo_warn_unwise")}
`:t("evo_humanoid_effect")},action(){return _($(this)[0])?(e.tech.evo_humanoid=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_humanoid")}},gigantism:{id:"evolution-gigantism",title:t("evo_gigantism_title"),desc:t("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_gigantism_effect")}
${t("evo_warn_unwise")}
`:t("evo_gigantism_effect")},action(){return _($(this)[0])?(e.tech.evo_giant=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_giant")}},dwarfism:{id:"evolution-dwarfism",title:t("evo_dwarfism_title"),desc:t("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_dwarfism_effect")}
${t("evo_warn_unwise")}
`:t("evo_dwarfism_effect")},action(){return _($(this)[0])?(e.tech.evo_small=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_small")}},animalism:{id:"evolution-animalism",title:t("evo_animalism_title"),desc:t("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition(){return nt(6)&&e.tech.evo_animalism&&e.tech.evo_animalism===1},cost:{DNA(){return 250}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_animalism_effect")}
${t("evo_warn_unwise")}
`:t("evo_animalism_effect")},action(){return _($(this)[0])?(e.tech.evo_animalism=2,e.evolution.final=95,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6&&e.tech.evo_animalism===1?1:0}},carnivore:{id:"evolution-carnivore",title:t("evo_carnivore_title"),desc:t("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_carnivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_carnivore_effect")},action(){return _($(this)[0])?(e.tech.evo=7,e.tech.evo_carnivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_carnivore")}},herbivore:{id:"evolution-herbivore",title:t("evo_herbivore_title"),desc:t("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_herbivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_herbivore_effect")},action(){return _($(this)[0])?(e.tech.evo=7,e.tech.evo_herbivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_herbivore")}},omnivore:{id:"evolution-omnivore",title:t("evo_omnivore_title"),desc:t("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},wiki:!1,effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_omnivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_omnivore_effect")},action(){return _($(this)[0])?(e.tech.evo_omnivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_omnivore")}},celestial:{id:"evolution-celestial",title:t("evo_celestial_title"),desc:t("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition(){return!!(e.city.biome==="eden"||e.blood.unbound&&e.blood.unbound>=3)&&nt(6)},cost:{DNA(){return 260}},effect(){return t("evo_celestial_effect")},action(){return _($(this)[0])?(e.tech.evo_angelic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_angelic")}},demonic:{id:"evolution-demonic",title:t("evo_demonic_title"),desc:t("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition(){return!!(e.city.biome==="hellscape"||e.blood.unbound&&e.blood.unbound>=3)&&nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe==="evil"?`
${t("evo_demonic_effect")}
${t("evo_warn_unwise")}
`:t("evo_demonic_effect")},action(){return _($(this)[0])?(e.tech.evo_demonic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_demonic")}},eldritch:{id:"evolution-eldritch",title:t("evo_eldritch_title"),desc:t("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition(){return!!(e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_eldritch_effect"),action(){return _($(this)[0])?(e.tech.evo_eldritch=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_eldritch")}},aquatic:{id:"evolution-aquatic",title:t("evo_aquatic_title"),desc:t("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition(){return!!(["oceanic","swamp"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_aquatic_effect"),action(){return _($(this)[0])?(e.tech.evo_aquatic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_aquatic")}},fey:{id:"evolution-fey",title:t("evo_fey_title"),desc:t("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition(){return!!(["forest","swamp","taiga"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_fey_effect"),action(){return _($(this)[0])?(e.tech.evo_fey=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_fey")}},heat:{id:"evolution-heat",title:t("evo_heat_title"),desc:t("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition(){return!!(["volcanic","ashland"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_heat_effect"),action(){return _($(this)[0])?(e.tech.evo_heat=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_heat")}},polar:{id:"evolution-polar",title:t("evo_polar_title"),desc:t("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition(){return!!(["tundra","taiga"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_polar_effect"),action(){return _($(this)[0])?(e.tech.evo_polar=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_polar")}},sand:{id:"evolution-sand",title:t("evo_sand_title"),desc:t("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition(){return!!(["desert","ashland"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_sand_effect"),action(){return _($(this)[0])?(e.tech.evo_sand=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_sand")}},eggshell:{id:"evolution-eggshell",title:t("evo_eggshell_title"),desc:t("evo_eggshell_desc"),reqs:{evo:5,evo_eggshell:1},grant:["evo",6],condition(){return e.tech.evo&&e.tech.evo===5&&!e.evolution.gselect},cost:{DNA(){return 245}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_eggshell_effect")}
${t("evo_warn_unwise")}
`:t("evo_eggshell_effect")},action(){return _($(this)[0])?(e.tech.evo_eggshell=2,e.evolution.final=90,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},endothermic:{id:"evolution-endothermic",title(){return e.evolution.gselect?t("genelab_genus_avian"):t("evo_endothermic_title")},desc:t("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect:t("evo_endothermic_effect"),action(){return _($(this)[0])?(e.tech.evo_avian=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_avian")}},ectothermic:{id:"evolution-ectothermic",title(){return e.evolution.gselect?t("genelab_genus_reptilian"):t("evo_ectothermic_title")},desc:t("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect:t("evo_ectothermic_effect"),action(){return _($(this)[0])?(e.tech.evo_reptilian=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_reptilian")}},sentience:{id:"evolution-sentience",title:t("evo_sentience_title"),desc:t("evo_sentience_desc"),reqs:{evo:7},grant:["evo",8],condition(){return e.tech.evo&&e.tech.evo===7&&e.evolution.final===100},cost:{RNA(){return 300},DNA(){return 300}},effect(){return e.evolution.exterminate?t("evo_sentience_ai_effect"):t("evo_sentience_effect")},action(){if(_($(this)[0])){let a=[],r="humanoid";for(let i in vt)if(e.tech[`evo_${i}`]&&e.tech[`evo_${i}`]>=2){r=i;break}if(e.race.junker||e.race.sludge){let i=e.race.sludge?"sludge":"junker";e.race.jtype=r,a.push(i)}else for(let i in ei){let s=ei[i];x[s].type===r&&a.push(s)}e.race.species=a[Math.floor(K(0,a.length))],e.stats.achieve[`extinct_${e.race.species}`]&&e.stats.achieve[`extinct_${e.race.species}`].l>=1&&(e.race.species=a[Math.floor(K(0,a.length))]),qs()}return!1},emblem(){for(let a in ei){let r=ei[a];if(e.tech[`evo_${x[r].type}`]&&e.tech[`evo_${x[r].type}`]>=2)return Ne(`genus_${x[r].type}`)}return""},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0}}},city:{gift:{id:"city-gift",title:t("city_gift"),desc:t("city_gift_desc"),wiki:!1,category:"outskirts",reqs:{primitive:1},queue_complete(){return 0},not_tech:["santa"],not_trait:["cataclysm","lone_survivor"],class:["hgift"],condition(){let a=new Date;if(a.getMonth()!==11||a.getMonth()===11&&(a.getDate()<=16||a.getDate()>=25)){let r=!1;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(r=!0)}),r}return!1},count(){let a=0;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(r){e.special.gift[r]&&a++}),a},action(){if(!e.settings.pause){let a=new Date,r=!1;if(e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(r=i)}),a.getMonth()!==11||a.getMonth()===11&&(a.getDate()<=16||a.getDate()>=25)){if(r==="g2019")e.special&&e.special.gift&&(delete e.special.gift[r],e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=100,e.stats.antiplasmid+=100,I(t("city_gift_msg",[100,t("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(e.prestige.Plasmid.count+=100,e.stats.plasmid+=100,I(t("city_gift_msg",[100,t("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),Rt());else if(e.special&&e.special.gift){delete e.special.gift[r];let i=e.stats.hasOwnProperty("reset")?e.stats.reset:0,s=e.stats.hasOwnProperty("mad")?e.stats.mad:0,n=e.stats.hasOwnProperty("bioseed")?e.stats.bioseed:0,c=e.stats.hasOwnProperty("cataclysm")?e.stats.cataclysm:0,o=100+i+s,l=n+c,u=[];if(e.stats.died+e.stats.tdied>0){let d=e.stats.died+e.stats.tdied;e.resource.Coal.amount+=d,u.push(`${d.toLocaleString()} ${t("resource_Coal_name")}`)}if(e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o,e.stats.antiplasmid+=o,u.push(`${o.toLocaleString()} ${t("resource_AntiPlasmid_plural_name")}`)):(e.prestige.Plasmid.count+=o,e.stats.plasmid+=o,u.push(`${o.toLocaleString()} ${t("resource_Plasmid_plural_name")}`)),l>0&&(e.prestige.Phage.count+=l,e.stats.phage+=l,u.push(`${l.toLocaleString()} ${t("resource_Phage_name")}`)),e.stats.hasOwnProperty("achieve")){let d=e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:0;d+=e.stats.achieve.heavy?e.stats.achieve.heavy.l:0,d+=e.stats.achieve.canceled?e.stats.achieve.canceled.l:0,d+=e.stats.achieve.eviltwin?e.stats.achieve.eviltwin.l:0,d+=e.stats.achieve.microbang?e.stats.achieve.microbang.l:0,d+=e.stats.achieve.pw_apocalypse?e.stats.achieve.pw_apocalypse.l:0;let h=e.stats.achieve.ascended?e.stats.achieve.ascended.l:0,p=e.stats.achieve.corrupted?e.stats.achieve.corrupted.l:0,f=e.stats.achieve.obsolete?e.stats.achieve.obsolete.l:0;if(d>30&&(d=30),h>5&&(h=5),p>5&&(p=5),d>0){let g=+(d/7.5).toFixed(2);e.prestige.Dark.count+=g,e.stats.dark+=g,u.push(`${g} ${t("resource_Dark_name")}`)}if(h>0&&(e.prestige.Harmony.count+=h,e.stats.harmony+=h,u.push(`${h} ${t("resource_Harmony_name")}`)),p>0){let g=p*5,w=p;e.prestige.Blood_Stone.count+=g,e.stats.blood+=g,e.prestige.Artifact.count+=w,e.stats.artifact+=w,u.push(`${g} ${t("resource_Blood_Stone_name")}`),u.push(`${w} ${t("resource_Artifact_name")}`)}r!=="g2020"&&f>0&&(e.prestige.AICore.count+=f,e.stats.cores+=f,u.push(`${f} ${t("resource_AICore_name")}`))}I(t("city_gift2_msg",[u.join(", ")]),"info",!1,["events"]),Rt()}}}return!1},touchlabel:t("open")},food:{id:"city-food",title(){return oa().active?e.tech.conjuring?t("city_trick_conjure"):t("city_trick"):e.tech.conjuring?t("city_food_conjure"):t("city_food")},desc(){let a=$(this)[0].val(!1),r=oa();return e.race.fasting?t("city_food_fasting"):r.active?e.tech.conjuring?t("city_trick_conjure_desc",[a]):t("city_trick_desc",[a]):e.tech.conjuring?t("city_food_conjure_desc",[a]):t("city_food_desc",[a])},category:"outskirts",reqs:{primitive:1},not_trait:["soul_eater","cataclysm","artifical"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring?1:0}},action(){return e.settings.pause||(e.resource.Food.amount=1&&(r*=10,e.resource.Food.amount=2?t("city_dig_conjour"):t("city_dig"):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure"):t("city_lumber")},desc(){let a=$(this)[0].val(!1);return oa().active?e.tech.conjuring&&e.tech.conjuring>=2?t("city_dig_conjour_desc",[a]):t("city_dig_desc",[a]):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure_desc",[a]):t("city_lumber_desc",[a])},category:"outskirts",reqs:{},not_trait:["evil","cataclysm"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||(e.resource.Lumber.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Lumber.amount=2?t("city_conjour",[e.resource.Stone.name]):t("city_gather",[e.resource.Stone.name])},desc(){let a=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[a,e.resource.Stone.name]):t(e.race.sappy?"city_amber_desc":"city_stone_desc",[a,e.resource.Stone.name])},category:"outskirts",reqs:{primitive:2},not_trait:["cataclysm","lone_survivor"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||(e.resource.Stone.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Stone.amount=2?t("city_chrysotile_conjour"):t("city_gather",[e.resource.Chrysotile.name])},desc(){let a=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[a,e.resource.Chrysotile.name]):t("city_stone_desc",[a,e.resource.Chrysotile.name])},category:"outskirts",reqs:{primitive:2},trait:["smoldering"],not_trait:["cataclysm","lone_survivor"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||e.resource.Chrysotile.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Chrysotile.amounte.resource.Slave.amount&&_($(this)[0])?(e.resource.Slave.amount++,!0):!1},touchlabel:t("purchase")},s_alter:{id:"city-s_alter",title:t("city_s_alter"),desc(){return e.city.hasOwnProperty("s_alter")&&e.city.s_alter.count>=1?`
${t("city_s_alter")}
${t("city_s_alter_desc")}
`:t("city_s_alter")},category:"outskirts",reqs:{mining:1},trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],inflation:!1,cost:{Stone(a){return(a||0)+(e.city.hasOwnProperty("s_alter")?e.city.s_alter.count:0)>=1?0:100}},effect(){let a=e.civic[e.civic.d_job]?e.civic[e.civic.d_job].workers:0,r=`
${t("city_s_alter_sacrifice",[a])}
`;if(e.city.hasOwnProperty("s_alter")&&e.city.s_alter.rage>0&&(r=r+`
${t("city_s_alter_rage",[b.cannibalize.vars()[0],lt(e.city.s_alter.rage)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.regen>0&&(r=r+`
${t("city_s_alter_regen",[b.cannibalize.vars()[0],lt(e.city.s_alter.regen)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mind>0&&(r=r+`
${t("city_s_alter_mind",[b.cannibalize.vars()[0],lt(e.city.s_alter.mind)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mine>0&&(r=r+`
${t("city_s_alter_mine",[b.cannibalize.vars()[0],lt(e.city.s_alter.mine)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.harvest>0){let i=e.race.evil&&!e.race.soul_eater?t("job_reclaimer"):t("job_lumberjack");r=r+`
${t("city_s_alter_harvest",[b.cannibalize.vars()[0],lt(e.city.s_alter.harvest),i])}
`}return r},action(){if(_($(this)[0])){if(e.city.s_alter.count===0)e.city.s_alter.count++;else if(e.civic[e.civic.d_job].workers>0){e.resource[e.race.species].amount--,e.civic[e.civic.d_job].workers--,e.stats.sac++,et("Food",Math.rand(250,1e3),!0);let r=300,i=600;if(e.tech.sacrifice)switch(e.tech.sacrifice){case 1:r=600,i=1500;break;case 2:r=1800,i=3600;break;case 3:r=5400,i=16200;break}switch(e.race.kindling_kindred||e.race.smoldering?Math.rand(0,4):Math.rand(0,5)){case 0:e.city.s_alter.rage+=Math.rand(r,i);break;case 1:e.city.s_alter.mind+=Math.rand(r,i);break;case 2:e.city.s_alter.regen+=Math.rand(r,i);break;case 3:e.city.s_alter.mine+=Math.rand(r,i);break;case 4:e.city.s_alter.harvest+=Math.rand(r,i);break}}return!0}return!1},touchlabel:t("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title(){return Co()},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},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.basic_housing?e.city.basic_housing.count:0)+a>=5?O("basic_housing",a,20,1.17):0},Lumber(a){return e.race.kindling_kindred||e.race.smoldering?0:O("basic_housing",a,10,1.23)},Stone(a){return e.race.kindling_kindred?O("basic_housing",a,10,1.23):0},Chrysotile(a){return e.race.smoldering?O("basic_housing",a,10,1.23):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.basic_housing.count++,e.settings.showCivic=!0,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},cottage:{id:"city-cottage",title(){return $e("medium")},desc(){return t("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("cottage",a,900,1.15)},Plywood(a){return O("cottage",a,25,1.25)},Brick(a){return O("cottage",a,20,1.25)},Wrought_Iron(a){return O("cottage",a,15,1.25)},Iron(a){return e.city.ptrait.includes("unstable")?O("cottage",a,5,1.25):0},Horseshoe(){return e.race.hooved?2:0}},effect(){let a=$(this)[0].citizens();if(e.tech.home_safe){let r=E(e.tech.home_safe>=2?e.tech.home_safe>=3?5e3:2e3:1e3);return`
${t("plus_max_citizens",[a])}
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
`}else return t("plus_max_citizens",[a])},action(){return _($(this)[0])?(e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.cottage.count++,!0):!1},citizens(){let a=2;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},apartment:{id:"city-apartment",title(){return $e("large")},desc(){return`
${t("city_apartment_desc",[$(this)[0].citizens()])}
${t("requires_power")}
`},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("apartment",a,1750,1.26)-500},Crystal(a){return e.race.universe==="magic"?O("apartment",a,25,1.22):0},Furs(a){return O("apartment",a,725,1.32)-500},Copper(a){return O("apartment",a,650,1.32)-500},Cement(a){return O("apartment",a,700,1.32)-500},Steel(a){return O("apartment",a,800,1.32)-500},Horseshoe(){return e.race.hooved?5:0}},effect(){let a=J("extravagant",2),r=$(this)[0].citizens();if(e.tech.home_safe){let i=E(e.tech.home_safe>=2?e.tech.home_safe>=3?1e4:5e3:2e3);return a&&(i*=2),`
${t("plus_max_citizens",[r])}. ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`}else return`${t("plus_max_citizens",[r])}. ${t("minus_power",[$(this)[0].powered()])}`},powered(){let a=J("extravagant",1);return N(a||1)},action(){return _($(this)[0])?(e.city.apartment.count++,z($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let a=J("extravagant",2),r=a?5+a:5;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},lodge:{id:"city-lodge",title:t("city_lodge"),desc(){return e.race.detritivore?t("city_lodge_desc_alt"):t("city_lodge_desc")},category:"residential",reqs:{housing:1,currency:1},not_trait:["cataclysm","lone_survivor"],condition(){return!!((e.race.soul_eater||e.race.detritivore||e.race.artifical||e.race.unfathomable)&&e.tech.s_lodge||e.tech.hunting&&e.tech.hunting>=2)},cost:{Money(a){return O("lodge",a,50,1.32)},Lumber(a){return O("lodge",a,20,1.36)},Stone(a){return O("lodge",a,10,1.36)},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.carnivore&&!e.race.artifical?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_lodge_effect",[5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.city.lodge.count++,e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=1,e.settings.showCivic=!0,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},smokehouse:{id:"city-smokehouse",title(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("city_smokehouse_easter"):t("city_smokehouse")},desc:t("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("smokehouse",a,85,1.32)},Lumber(a){return O("smokehouse",a,65,1.36)},Stone(a){return O("smokehouse",a,50,1.36)}},effect(){let a=Et(E(100));return`
${t("plus_max_resource",[a,t("resource_Food_name")])}
${t("city_smokehouse_effect",[10])}
`},action(){return _($(this)[0])?(e.city.smokehouse.count++,e.resource.Food.max+=Et(E(100)),!0):!1}},soul_well:{id:"city-soul_well",title:t("city_soul_well"),desc:t("city_soul_well_desc"),category:"trade",reqs:{soul_eater:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.soul_well?e.city.soul_well.count:0)+a>=3?O("soul_well",a,50,1.32):0},Lumber(a){return O("soul_well",a,20,1.36)},Stone(a){return O("soul_well",a,10,1.36)}},effect(){let a=Et(E(500)),r=e.race.ghostly?2+b.ghostly.vars()[1]:2;return`
${t("city_soul_well_effect",[r])}
${t("plus_max_resource",[a,t("resource_Souls_name")])}
`},action(){return _($(this)[0])?(e.city.soul_well.count++,e.resource.Food.max+=Et(E(500)),!0):!1}},slave_pen:{id:"city-slave_pen",title:t("city_slave_pen"),desc:t("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("slave_pen",a,250,1.32)},Lumber(a){return O("slave_pen",a,100,1.36)},Stone(a){return O("slave_pen",a,75,1.36)},Copper(a){return O("slave_pen",a,10,1.36)},Nanite(a){return e.race.deconstructor?O("slave_pen",a,4,1.36):0}},effect(){let a=e.city.slave_pen?e.city.slave_pen.count*4:4,r=e.city.slave_pen?e.resource.Slave.amount:0;return`
${t("city_slave_pen_effect",[4])}
${t("city_slave_pen_effect2",[r,a])}
`},action(){return _($(this)[0])?(e.city.slave_pen.count++,e.resource.Slave.display=!0,e.resource.Slave.max=e.city.slave_pen.count*4,!0):!1}},transmitter:{id:"city-transmitter",title:t("city_transmitter"),desc(){return`
${t("city_transmitter_desc")}
${t("requires_power")}
`},category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money(a){return e.city.transmitter&&e.city.transmitter.count>=3?O("transmitter",a,50,1.32):0},Copper(a){return O("transmitter",a,20,1.36)},Steel(a){return O("transmitter",a,10,1.36)}},effect(){let a=+te("transmitter").toFixed(2),r=E(100);return`
${t("gain",[a,e.resource.Food.name])}
${t("city_transmitter_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(.5)},powerBalancer(){return[{r:"Food",k:"lpmod"}]},action(){return _($(this)[0])?(e.city.transmitter.count++,z($(this)[0]),!0):!1}},captive_housing:ft("captive_housing","city"),farm:{id:"city-farm",title:t("city_farm"),desc:t("city_farm_desc"),category:"residential",reqs:{agriculture:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.farm?e.city.farm.count:0)+a>=3?O("farm",a,50,1.32):0},Lumber(a){return O("farm",a,20,1.36)},Stone(a){return O("farm",a,10,1.36)},Horseshoe(a){return e.race.hooved&&(e.city.farm?e.city.farm.count:0)+(a||0)>=2?1:0}},effect(){let a=$(this)[0].citizens();return e.tech.farm?`
${t("city_farm_effect")}
${t("plus_max_resource",[a,t("citizen")])}
`:t("city_farm_effect")},action(){return _($(this)[0])?(e.city.farm.count++,e.race.fasting?(e.civic.farmer.display=!1,e.civic.farmer.assigned=0):e.civic.farmer.display=!0,e.tech.farm&&(e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=$(this)[0].citizens(),e.settings.showCivic=!0),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a},flair(){return e.tech.agriculture>=7?t("city_farm_flair2"):t("city_farm_flair1")}},compost:{id:"city-compost",title:t("city_compost_heap"),desc:t("city_compost_heap_desc"),category:"residential",reqs:{compost:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.compost?e.city.compost.count:0)+a>=3?O("compost",a,50,1.32):0},Lumber(a){return O("compost",a,12,1.36)},Stone(a){return O("compost",a,12,1.36)}},effect(){let a=1.2+(e.tech.compost?e.tech.compost:0)*.8;a*=e.city.biome==="grassland"?he.grassland.vars()[0]:1,a*=e.city.biome==="savanna"?he.savanna.vars()[0]:1,a*=e.city.biome==="ashland"?he.ashland.vars()[0]:1,a*=e.city.biome==="volcanic"?he.volcanic.vars()[0]:1,a*=e.city.biome==="hellscape"?he.hellscape.vars()[0]:1,a*=e.city.ptrait.includes("trashed")?Fe.trashed.vars()[0]:1,a=+a.toFixed(2);let r=Et(E(200)),i=e.race.kindling_kindred||e.race.smoldering?"":`
${t("city_compost_heap_effect2",[.5,e.resource.Lumber.name])}
`;return`
${t("city_compost_heap_effect",[a])}
${t("city_compost_heap_effect3",[r])}
${i}`},switchable(){return!0},action(){return _($(this)[0])?(e.city.compost.count++,e.city.compost.on++,e.resource.Food.max+=Et(E(200)),!0):!1}},mill:{id:"city-mill",title(){return e.tech.agriculture>=5?t("city_mill_title2"):t("city_mill_title1")},desc(){let a=e.tech.agriculture>=5?5:3;if(e.tech.agriculture>=6){let r=$(this)[0].powered()*-1;return t("city_mill_desc2",[a,r])}else return t("city_mill_desc1",[a])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mill",a,1e3,1.31)},Lumber(a){return O("mill",a,600,1.33)},Iron(a){return O("mill",a,150,1.33)},Cement(a){return O("mill",a,125,1.33)}},powered(){return e.race.environmentalist?-1.5:-1},power_reqs:{agriculture:6},effect(){return e.tech.agriculture>=6?`${t("city_on")} ${t("city_mill_effect1")} ${t("city_off")} ${t("city_mill_effect2")}`:!1},action(){return _($(this)[0])?(e.city.mill.count++,!0):!1}},windmill:{id:"city-windmill",title(){return e.race.unfathomable?t("tech_watermill"):t("city_mill_title2")},desc(){return e.race.unfathomable?t("tech_watermill"):t("city_mill_title2")},wiki:!1,category:"utility",reqs:{wind_plant:1},not_trait:["cataclysm","lone_survivor"],powered(){return e.race.environmentalist?-1.5:-1},power_reqs:{false:1},cost:{Money(a){return O("windmill",a,1e3,1.31)},Lumber(a){return O("windmill",a,600,1.33)},Iron(a){return O("windmill",a,150,1.33)},Cement(a){return O("windmill",a,125,1.33)}},effect(){let a=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[a])}
`},action(){return _($(this)[0])?(e.city.windmill.count++,!0):!1}},silo:{id:"city-silo",title:t("city_silo"),desc:t("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("silo",a,85,1.32)},Lumber(a){return O("silo",a,65,1.36)},Stone(a){return O("silo",a,50,1.36)},Iron(a){return(e.city.silo?e.city.silo.count:0)+(a||0)>=4&&e.city.ptrait.includes("unstable")?O("silo",a,10,1.36):0}},effect(){let a=Et(E(500));return t("plus_max_resource",[a,t("resource_Food_name")])},action(){return _($(this)[0])?(e.city.silo.count++,e.resource.Food.max+=Et(E(500)),!0):!1}},assembly:ft("assembly","city"),garrison:{id:"city-garrison",title(){return e.race.flier?t("city_garrison_flier"):t("city_garrison")},desc:t("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("garrison",a,240,1.5)},Stone(a){return O("garrison",a,260,1.46)},Iron(a){return(e.city.garrison?e.city.garrison.count:0)+(a||0)>=4&&e.city.ptrait.includes("unstable")?O("garrison",a,50,1.4):0},Horseshoe(){return e.race.hooved?e.race.chameleon?1:2:0}},effect(){let a=e.tech.military>=5?F(3):F(2);return e.race.chameleon&&a--,t("plus_max_resource",[a,t("civics_garrison_soldiers")])},switchable(){return!0},action(){if(_($(this)[0])){e.settings.showMil=!0,e.settings.msgFilters.combat.unlocked||(e.settings.msgFilters.combat.unlocked=!0,e.settings.msgFilters.combat.vis=!0),e.civic.garrison.display||(e.civic.garrison.display=!0,C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update"));let a=e.tech.military>=5?3:2;return e.race.chameleon&&(a-=e.city.garrison.count),e.civic.garrison.max+=F(a),e.city.garrison.count++,e.city.garrison.on++,e.resource.Furs.display=!0,!0}return!1}},hospital:{id:"city-hospital",title:t("city_hospital"),desc:t("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money(a){return O("hospital",a,22e3,1.32)},Furs(a){return O("hospital",a,4e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("hospital",a,500,1.32):0},Aluminium(a){return O("hospital",a,1e4,1.32)}},effect(){let a=e.tech.reproduction&&e.tech.reproduction>=2?`
${t("city_hospital_effect2")}
`:"",r=e.tech.medic*5,i=`
${t("city_hospital_effect",[r])}
${a}`;return!e.race.artifical&&e.race.hasOwnProperty("vax")&&(i=i+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return _($(this)[0])?(e.city.hospital.count++,!0):!1}},boot_camp:{id:"city-boot_camp",title(){return e.race.artifical?t("city_boot_camp_art"):t("city_boot_camp")},desc(){return e.race.artifical?t("city_boot_camp_art_desc",[x[e.race.species].name]):t("city_boot_camp_desc")},category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("boot_camp",a,5e4,1.32)},Lumber(a){return O("boot_camp",a,21500,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("boot_camp",a,300,1.32):0},Aluminium(a){return O("boot_camp",a,12e3,1.32)},Brick(a){return O("boot_camp",a,1400,1.32)}},effect(){let a=e.tech.boot_camp>=2?8:5;e.blood.lust&&(a+=e.blood.lust*.2);let r=J("militant",0);r&&(a*=1+r/100);let i=e.tech.spy&&e.tech.spy>=3?`
${t("city_boot_camp_effect",[a])}
${t("city_boot_camp_effect2",[10])}
`:`
${t("city_boot_camp_effect",[a])}
`;if(e.race.artifical&&!e.race.orbit_decayed){let s=e.tech.medic||1;i+=`
${t("city_boot_camp_art_effect",[s*5])}
`}return e.race.artifical&&e.race.hasOwnProperty("vax")&&(i+=`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return _($(this)[0])?(e.city.boot_camp.count++,!0):!1}},shed:{id:"city-shed",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let a=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",[a])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("shed",a,75,1.22)},Lumber(a){return e.tech.storage&&e.tech.storage<4?O("shed",a,55,1.32):0},Stone(a){return e.tech.storage&&e.tech.storage<3?O("shed",a,45,1.32):0},Iron(a){return e.tech.storage&&e.tech.storage>=4?O("shed",a,22,1.32):0},Cement(a){return e.tech.storage&&e.tech.storage>=3?O("shed",a,18,1.32):0}},res(){let a=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return e.tech.storage>=3&&e.resource.Steel.display&&a.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&a.push("Titanium"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Graphene.display&&a.push("Graphene"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Stanene.display&&a.push("Stanene"),e.race.unfathomable&&a.push("Food"),a},val(a){switch(a){case"Food":return 50;case"Lumber":return 300;case"Stone":return 300;case"Chrysotile":return 300;case"Crystal":return 8;case"Furs":return 125;case"Copper":return 90;case"Iron":return 125;case"Aluminium":return 90;case"Cement":return 100;case"Coal":return 75;case"Steel":return 40;case"Titanium":return 20;case"Graphene":return 15;case"Stanene":return 25;default:return 0}},effect(a){let r='
',i=Oi(a);for(let s of $(this)[0].res())if(e.resource[s].display){let n=Y(+(E($(this)[0].val(s))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return r=r+"
",r},wide:!0,action(){if(_($(this)[0])){e.city.shed.count++;let a=Oi();for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=E($(this)[0].val(r)*a));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:t("city_storage_yard"),desc:t("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("storage_yard",a,10,Xr(1.36))},Brick(a){return O("storage_yard",a,3,Xr(1.35))},Wrought_Iron(a){return O("storage_yard",a,5,Xr(1.35))}},effect(){let a=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.tech.trade&&e.tech.trade>=3?`
${t("plus_max_resource",[a,t("resource_Crates_name")])}
${t("city_trade_effect",[1])}
`:t("plus_max_resource",[a,t("resource_Crates_name")])},action(){if(_($(this)[0])){e.city.storage_yard.count++;let a=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Crates.max+=a,e.resource.Crates.display||bo(),!0}return!1}},warehouse:{id:"city-warehouse",title:t("city_warehouse"),desc:t("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("warehouse",a,400,Xr(1.26))},Cement(a){return O("warehouse",a,75,Xr(1.26))},Sheet_Metal(a){return O("warehouse",a,25,Xr(1.25))}},effect(){let a=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),t("plus_max_resource",[a,t("resource_Containers_name")])},action(){if(_($(this)[0])){e.city.warehouse.count++;let a=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},bank:{id:"city-bank",title:t("city_bank"),desc(){let a=x[e.race.species].home;return t("city_bank_desc",[a])},category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("bank",a,250,1.35)},Lumber(a){return O("bank",a,75,1.32)},Stone(a){return O("bank",a,100,1.35)},Iron(a){return(e.city.bank?e.city.bank.count:0)+(a||0)>=2&&e.city.ptrait.includes("unstable")?O("bank",a,30,1.3):0}},effect(){let a=ja();return a=E(a),a=(+a.toFixed(0)).toLocaleString(),e.tech.banking>=2?`
${t("plus_max_resource",[`$${a}`,t("resource_Money_name")])}
${t("plus_max_resource",[F(1),t("banker_name")])}
`:t("plus_max_resource",[`$${a}`,t("resource_Money_name")])},action(){return _($(this)[0])?(e.resource.Money.max+=E(1800),e.city.bank.count++,e.civic.banker.max=F(e.city.bank.count),!0):!1}},pylon:{id:"city-pylon",title:t("city_pylon"),desc:t("city_pylon"),category:"industrial",reqs:{magic:2},not_trait:["cataclysm","orbit_decayed"],cost:{Money(a){return a=a||0,(e.city.pylon?e.city.pylon.count:0)+a>=2?O("pylon",a,10,1.48):0},Stone(a){return O("pylon",a,12,1.42)},Crystal(a){return O("pylon",a,8,1.42)-3}},effect(){let a=E(5),r=+(.01*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.city.pylon.count++,e.resource.Mana.max+=E(5),!0):!1}},conceal_ward:{id:"city-conceal_ward",title:t("city_conceal_ward"),desc:t("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money(a){return O("conceal_ward",a,500,1.25)},Mana(a){return O("conceal_ward",a,yu(42),1.25)},Crystal(a){return O("conceal_ward",a,5,1.25)}},effect(){let a=e.tech.roguemagic&&e.tech.roguemagic>=8?1.25:1;return`
${t("city_conceal_ward_effect",[a])}
`},action(){return _($(this)[0])?(e.city.conceal_ward.count++,!0):!1}},graveyard:{id:"city-graveyard",title:t("city_graveyard"),desc:t("city_graveyard_desc"),category:"industrial",reqs:{reclaimer:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.graveyard?e.city.graveyard.count:0)+a>=5?O("graveyard",a,5,1.85):0},Lumber(a){return O("graveyard",a,2,1.95)},Stone(a){return O("graveyard",a,6,1.9)}},effect(){let a=Et(E(100));return`
${t("city_graveyard_effect",[8])}
${t("plus_max_resource",[a,e.resource.Lumber.name])}
`},action(){return _($(this)[0])?(e.city.graveyard.count++,e.resource.Lumber.max+=Et(E(100)),!0):!1}},lumber_yard:{id:"city-lumber_yard",title:t("city_lumber_yard"),desc:t("city_lumber_yard_desc"),category:"industrial",reqs:{axe:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.lumber_yard?e.city.lumber_yard.count:0)+a>=5?O("lumber_yard",a,5,1.85):0},Lumber(a){return O("lumber_yard",a,6,1.9)},Stone(a){return O("lumber_yard",a,2,1.95)}},effect(){let a=Et(E(100));return`
${t("city_lumber_yard_effect",[2])}
${t("plus_max_resource",[a,e.resource.Lumber.name])}
`},action(){return _($(this)[0])?(e.city.lumber_yard.count++,e.civic.lumberjack.display=!0,e.resource.Lumber.max+=Et(E(100)),!0):!1}},sawmill:{id:"city-sawmill",title:t("city_sawmill"),desc:t("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("sawmill",a,3e3,1.26)},Iron(a){return O("sawmill",a,400,1.26)},Cement(a){return O("sawmill",a,420,1.26)}},effect(){let a=e.tech.saw>=2?8:5,r=Et(E(200)),i=`
${t("plus_max_resource",[r,e.resource.Lumber.name])}
${t("city_lumber_yard_effect",[a])}
`;return e.tech.foundry&&e.tech.foundry>=4&&(i=i+`
${t("city_sawmill_effect2",[2])}
`),e.city.powered&&(i=i+`
${t("city_sawmill_effect3",[4,$(this)[0].powered()])}
`),i},powered(){return N(1)},powerBalancer(){return e.city.sawmill.hasOwnProperty("psaw")?[{r:"Lumber",k:"psaw"}]:!1},action(){return _($(this)[0])?(e.city.sawmill.count++,e.resource.Lumber.max+=Et(E(200)),z($(this)[0]),!0):!1}},rock_quarry:{id:"city-rock_quarry",title(){return e.race.flier?t("city_rock_quarry_alt"):t("city_rock_quarry")},desc(){return e.race.flier?t("city_rock_quarry_desc_alt",[e.resource.Stone.name]):t("city_rock_quarry_desc")},category:"industrial",reqs:{mining:1},not_trait:["cataclysm","sappy"],cost:{Money(a){return a=a||0,(e.city.rock_quarry?e.city.rock_quarry.count:0)+a>=2?O("rock_quarry",a,20,1.45):0},Lumber(a){return O("rock_quarry",a,50,1.36)},Stone(a){return O("rock_quarry",a,10,1.36)}},effect(){let a=Et(E(100)),r=e.race.smoldering?`
${t("plus_max_resource",[a,e.resource.Chrysotile.name])}
`:"";return e.tech.mine_conveyor?`
${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[a,e.resource.Stone.name])}
${r}
${t("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
`:`
${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[a,e.resource.Stone.name])}
${r}`},special(){return!!e.race.smoldering},powered(){return N(1)},powerBalancer(){return e.city.rock_quarry.hasOwnProperty("cnvay")?e.city.hasOwnProperty("metal_refinery")&&e.city.rock_quarry.hasOwnProperty("almcvy")?[{r:"Stone",k:"cnvay"},{r:"Aluminium",k:"almcvy"}]:[{r:"Stone",k:"cnvay"}]:!1},power_reqs:{mine_conveyor:1},action(){if(_($(this)[0])){e.city.rock_quarry.count++,e.civic.quarry_worker.display=!0;let a=Et(E(100));return e.resource.Stone.max+=a,e.race.smoldering&&e.resource.Chrysotile.display&&(e.settings.showCivic=!0,e.settings.showIndustry=!0,e.resource.Chrysotile.max+=a),e.tech.mine_conveyor&&z($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:t("city_cement_plant"),desc:t("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money(a){return O("cement_plant",a,3e3,1.5)},Lumber(a){return O("cement_plant",a,1800,1.36)},Stone(a){return O("cement_plant",a,2e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("cement_plant",a,275,1.32):0}},effect(){if(e.tech.cement>=5){let a=e.tech.cement>=6?8:5;return`
${t("city_cement_plant_effect1",[F(2)])}
${t("city_cement_plant_effect2",[$(this)[0].powered(),a])}
`}else return t("city_cement_plant_effect1",[F(2)])},powered(){return N(2)},powerBalancer(){return e.city.cement_plant.hasOwnProperty("cnvay")?[{r:"Cement",k:"cnvay"}]:!1},power_reqs:{cement:5},action(){return _($(this)[0])?(e.resource.Cement.display=!0,e.city.cement_plant.count++,e.civic.cement_worker.display=!0,e.civic.cement_worker.max=e.city.cement_plant.count*F(2),e.tech.cement&&e.tech.cement>=5&&z($(this)[0]),!0):!1}},foundry:{id:"city-foundry",title:t("city_foundry"),desc:t("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("foundry",a,750,1.36)},Stone(a){return O("foundry",a,100,1.36)},Copper(a){return O("foundry",a,250,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("foundry",a,40,1.36):0}},effect(){let a=`
${t("city_foundry_effect1",[F(1)])}
`;if(e.tech.foundry>=2){let r=e.tech.foundry>=5?e.tech.foundry>=8?8:5:3;a=a+`
${t("city_crafted_mats",[r])}
`}return e.tech.foundry>=6&&(a=a+`
${t("city_foundry_effect2",[2])}
`),a},action(){return _($(this)[0])?(e.city.foundry.count===0&&(e.race.no_craft?I(t("city_foundry_msg2"),"info",!1,["progress"]):I(t("city_foundry_msg1"),"info",!1,["progress"])),e.city.foundry.count++,e.civic.craftsman.max+=F(1),e.civic.craftsman.display=!0,!e.race.kindling_kindred&&!e.race.smoldering&&(e.resource.Plywood.display=!0),e.resource.Brick.display=!0,e.resource.Iron.display&&(e.resource.Wrought_Iron.display=!0),e.resource.Aluminium.display&&(e.resource.Sheet_Metal.display=!0),Xe(),!0):!1}},factory:{id:"city-factory",title:t("city_factory"),desc:`
${t("city_factory_desc")}
${t("requires_power")}
`,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("factory",a,25e3,Oe(1.32))},Cement(a){return O("factory",a,1e3,Oe(1.32))},Steel(a){return O("factory",a,7500,Oe(1.32))},Titanium(a){return O("factory",a,2500,Oe(1.32))}},effect(){let a=`
${t("city_factory_effect")}
${t("minus_power",[$(this)[0].powered()])}
`;return e.tech.foundry>=7&&(a=a+`
${t("city_crafted_mats",[5])}
`),a},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(e.city.factory.count++,e.resource.Alloy.display=!0,e.tech.polymer&&(e.resource.Polymer.display=!0),z($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,Pe(),!0):!1}},nanite_factory:ft("nanite_factory","city"),smelter:{id:"city-smelter",title:t("city_smelter"),desc:t("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("smelter",a,1e3,Oe(1.32))},Iron(a){return O("smelter",a,500,Oe(1.33))}},effect(){var a=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(a*=.9),e.tech.smelting>=2&&!e.race.steelen?t("city_smelter_effect2",[a]):t("city_smelter_effect1",[a])},special:!0,action(){return _($(this)[0])?(e.city.smelter.count++,e.race.kindling_kindred||e.race.smoldering||e.race.artifical?e.race.artifical?e.city.smelter.Oil++:e.race.evil?e.city.smelter.Wood++:e.city.smelter.Coal++:e.city.smelter.Wood++,e.city.smelter.Iron++,e.settings.showIndustry=!0,Pe(),!0):!1},flair:`
${t("city_smelter_flair1")}
${t("city_smelter_flair2")}
`},metal_refinery:{id:"city-metal_refinery",title:t("city_metal_refinery"),desc:t("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("metal_refinery",a,2500,1.35)},Iron(a){return e.city.ptrait.includes("unstable")?O("metal_refinery",a,125,1.35):0},Steel(a){return O("metal_refinery",a,350,1.35)}},powered(){return N(2)},powerBalancer(){return e.city.metal_refinery.hasOwnProperty("pwr")?[{r:"Aluminium",k:"cnvay"}]:!1},power_reqs:{alumina:2},effect(){let a=e.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return e.tech.alumina>=2?`${t(a,[6])} ${t("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:t(a,[6])},action(){return _($(this)[0])?(e.city.metal_refinery.count++,e.resource.Aluminium.display=!0,e.city.foundry&&e.city.foundry.count>0&&!e.resource.Sheet_Metal.display&&(e.resource.Sheet_Metal.display=!0,Xe()),e.tech.alumina>=2&&z($(this)[0]),!0):!1}},mine:{id:"city-mine",title:t("city_mine"),desc:t("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mine",a,60,Oe(1.6))},Lumber(a){return O("mine",a,175,Oe(1.38))}},effect(){return e.tech.mine_conveyor?`
${t("city_mine_effect1",[F(1)])}
${t("city_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_mine_effect1",[F(1)])},powered(){return N(1)},powerBalancer(){return e.city.mine.hasOwnProperty("cpow")&&e.city.mine.hasOwnProperty("ipow")?[{r:"Copper",k:"cpow"},{r:"Iron",k:"ipow"}]:!1},power_reqs:{mine_conveyor:1},action(){return _($(this)[0])?(e.city.mine.count++,e.resource.Copper.display=!0,e.civic.miner.display=!0,e.civic.miner.max=F(e.city.mine.count),e.tech.mine_conveyor&&z($(this)[0]),!0):!1},flair(){return x[e.race.species].type==="avian"?t("city_mine_flair_avian"):""}},coal_mine:{id:"city-coal_mine",title:t("city_coal_mine"),desc:t("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("coal_mine",a,480,Oe(1.4))},Lumber(a){return O("coal_mine",a,250,Oe(1.36))},Iron(a){return e.city.ptrait.includes("unstable")?O("coal_mine",a,28,Oe(1.36)):0},Wrought_Iron(a){return O("coal_mine",a,18,Oe(1.36))}},effect(){return e.tech.mine_conveyor?`
${t("city_coal_mine_effect1",[F(1)])}
${t("city_coal_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_coal_mine_effect1",[F(1)])},powered(){return N(1)},powerBalancer(){return e.city.coal_mine.hasOwnProperty("cpow")&&e.city.coal_mine.hasOwnProperty("upow")&&e.resource.Uranium.display?[{r:"Coal",k:"cpow"},{r:"Uranium",k:"upow"}]:e.city.coal_mine.hasOwnProperty("cpow")?[{r:"Coal",k:"cpow"}]:!1},power_reqs:{mine_conveyor:1},action(){return _($(this)[0])?(e.city.coal_mine.count++,e.resource.Coal.display=!0,e.civic.coal_miner.display=!0,e.civic.coal_miner.max=F(e.city.coal_mine.count),e.tech.mine_conveyor&&z($(this)[0]),!0):!1}},oil_well:{id:"city-oil_well",title:t("city_oil_well"),desc:t("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_well",a,5e3,Oe(1.5))},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_well",a,450,Oe(1.5)):0},Cement(a){return O("oil_well",a,5250,Oe(1.5))},Steel(a){return O("oil_well",a,6e3,Oe(1.5))}},effect(){let a=+te("oil_well").toFixed(2),r=E(500);return t("city_oil_well_effect",[a,r])},action(){return _($(this)[0])?(e.city.oil_well.count++,e.resource.Oil.max+=E(500),e.city.oil_well.count===1&&(e.resource.Oil.display=!0,Pe()),!0):!1},flair:t("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:t("city_oil_depot"),desc:t("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_depot",a,2500,Oe(1.46))},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_depot",a,325,Oe(1.36)):0},Cement(a){return O("oil_depot",a,3750,Oe(1.46))},Sheet_Metal(a){return O("oil_depot",a,100,Oe(1.45))}},effect(){let a=E(1e3);a*=e.tech.world_control?1.5:1;let r=`
${t("plus_max_resource",[a,e.resource.Oil.name])}.
`;if(e.resource.Helium_3.display){let i=E(400);i*=e.tech.world_control?1.5:1,r=r+`
${t("plus_max_resource",[i,e.resource.Helium_3.name])}.
`}if(e.tech.uranium>=2){let i=E(250);i*=e.tech.world_control?1.5:1,r=r+`
${t("plus_max_resource",[i,e.resource.Uranium.name])}.
`}return r},action(){return _($(this)[0])?(e.city.oil_depot.count++,e.resource.Oil.max+=E(1e3)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=E(400)*(e.tech.world_control?1.5:1)),e.tech.uranium>=2&&(e.resource.Uranium.max+=E(250)*(e.tech.world_control?1.5:1)),!0):!1}},trade:{id:"city-trade",title:t("city_trade"),desc:t("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("trade",a,500,1.36)},Lumber(a){return O("trade",a,125,1.36)},Stone(a){return O("trade",a,50,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("trade",a,15,1.36):0},Furs(a){return O("trade",a,65,1.36)}},effect(){let a=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&a--,e.race.flier&&(a+=b.flier.vars()[1]),t("city_trade_effect",[a])},action(){if(_($(this)[0])){e.city.trade.count++;let a=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&a--,e.city.market.mtrade+=a,!0}return!1}},wharf:{id:"city-wharf",title:t("city_wharf"),desc:t("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money(a){return O("wharf",a,62e3,1.32)},Lumber(a){return O("wharf",a,44e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("wharf",a,200,1.32):0},Cement(a){return O("wharf",a,3e3,1.32)},Oil(a){return O("wharf",a,750,1.32)}},effect(){let a=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(a*=2),`
${t("city_trade_effect",[2])}
${t("city_wharf_effect")}
${t("plus_max_crates",[a])}
${t("plus_max_containers",[a])}
`},action(){if(_($(this)[0])){e.city.wharf.count++,e.city.market.mtrade+=2;let a=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},tourist_center:{id:"city-tourist_center",title:t("city_tourist_center"),desc:t("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("tourist_center",a,1e5,1.36)},Stone(a){return O("tourist_center",a,25e3,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("tourist_center",a,1e3,1.36):0},Furs(a){return O("tourist_center",a,7500,1.36)},Plywood(a){return O("tourist_center",a,5e3,1.36)}},effect(a){let r=e.tech.monument&&e.tech.monument>=3&&Qt(a)?3:1,i=(e.civic.govern.type==="corpocracy"?2:1)*r,s=(e.civic.govern.type==="corpocracy"?10:5)*r,n=(e.civic.govern.type==="corpocracy"?4:2)*r,c="";e.stats.achieve.banana&&e.stats.achieve.banana.l>=4&&(c=`
${t("city_tourist_center_effect5",[(e.civic.govern.type==="corpocracy"?6:3)*r])}
`);let o="",l=J("pious",1);return l&&(o=`
${t("city_tourist_center_effect6",[(e.civic.govern.type==="corpocracy"?l*2:l)*r])}
`),`
${t("city_tourist_center_effect1",[e.resource.Food.name])}
${t("city_tourist_center_effect2",[i,q.city.amphitheatre.title()])}
${t("city_tourist_center_effect3",[s])}
${t("city_tourist_center_effect4",[n])}
${c}${o}`},powered(){return 0},action(){return _($(this)[0])?(e.city.tourist_center.count++,e.city.tourist_center.on++,!0):!1}},amphitheatre:{id:"city-amphitheatre",title(){return J("athleticism",0)?t("city_stadium"):t("city_amphitheatre")},desc(){return J("athleticism",0)?t("city_stadium"):t("city_amphitheatre_desc")},category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money(a){return O("amphitheatre",a,500,1.55)},Lumber(a){return O("amphitheatre",a,50,1.75)},Stone(a){return O("amphitheatre",a,200,1.75)},Iron(a){return e.city.ptrait.includes("unstable")?O("amphitheatre",a,18,1.36):0}},effect(){let a=J("athleticism",0),r=J("athleticism",1);return`
${t("city_max_entertainer",[F(r||1)])}
${t("city_max_morale",[a||1])}
`},action(){if(_($(this)[0])){e.city.amphitheatre.count++;let a=J("athleticism",1);return e.civic.entertainer.max+=F(a||1),e.civic.entertainer.display=!0,!0}return!1},flair(){return J("athleticism",0)?t("city_stadium_flair"):t("city_amphitheatre_flair")}},casino:{id:"city-casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("casino",a,35e4,1.35)},Iron(a){return e.city.ptrait.includes("unstable")?O("casino",a,2e3,1.35):0},Furs(a){return O("casino",a,6e4,1.35)},Plywood(a){return O("casino",a,1e4,1.35)},Brick(a){return O("casino",a,6e3,1.35)}},effect(){let a=vi();return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return _($(this)[0])?(e.city.casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(this)[0]),!0):!1},flair:t("city_casino_flair")},temple:{id:"city-temple",title:t("city_temple"),desc(){let a=e.race.gods!=="none"?x[e.race.gods.toLowerCase()].entity:x[e.race.species].entity;return t("city_temple_desc",[a])},category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("temple",a,50,1.36)},Lumber(a){return O("temple",a,25,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("temple",a,6,1.36):0},Furs(a){return O("temple",a,15,1.36)},Cement(a){return O("temple",a,10,1.36)}},effect(){let a=wn();return e.genes.ancients&&e.genes.ancients>=2&&(a=a+`
${t("city_temple_effect6",[F(1)])}
`),a},action(){return _($(this)[0])?(e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0,e.civic.priest.max+=F(1)),e.city.temple.count++,!0):!1}},shrine:{id:"city-shrine",title:t("city_shrine"),desc(){return t("city_shrine_desc")},category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("shrine",a,75,1.32)},Stone(a){return O("shrine",a,65,1.32)},Furs(a){return O("shrine",a,10,1.32)},Copper(a){return O("shrine",a,15,1.32)}},effect(){let a=`
${t("city_shrine_effect")}
`;if(e.city.shrine&&e.city.shrine.morale>0){let r=Yr("morale");a=a+`
${t("city_shrine_morale",[+r.add.toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.metal>0){let r=Yr("metal");a=a+`
${t("city_shrine_metal",[+((r.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.know>0){let r=Yr("know");a=a+`
${t("city_shrine_know",[(+r.add.toFixed(1)).toLocaleString()])}
`,a=a+`
${t("city_shrine_know2",[+((r.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.tax>0){let r=Yr("tax");a=a+`
${t("city_shrine_tax",[+((r.mult-1)*100).toFixed(1)])}
`}return a},action(){if(_($(this)[0])){if(e.city.shrine.count++,e.city.calendar.moon>0&&e.city.calendar.moon<7)e.city.shrine.morale++;else if(e.city.calendar.moon>7&&e.city.calendar.moon<14)e.city.shrine.metal++;else if(e.city.calendar.moon>14&&e.city.calendar.moon<21)e.city.shrine.know++;else if(e.city.calendar.moon>21)e.city.shrine.tax++;else switch(Math.floor(K(0,4))){case 0:e.city.shrine.morale++;break;case 1:e.city.shrine.metal++;break;case 2:e.city.shrine.know++;break;case 3:e.city.shrine.tax++;break}return!0}return!1}},meditation:{id:"city-meditation",title:t("city_meditation"),desc:t("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("meditation",a,50,1.2)},Stone(a){return O("meditation",a,25,1.2)},Furs(a){return O("meditation",a,8,1.2)}},effect(){let a=e.resource.Zen.amount/(e.resource.Zen.amount+5e3);return`
${t("city_meditation_effect",[b.calm.vars()[0]])}
${t("city_meditation_effect2",[2])}
${t("city_meditation_effect3",[1])}
${t("city_meditation_effect4",[`${(a*100).toFixed(2)}%`])}
`},action(){return _($(this)[0])?(e.city.meditation.count++,e.resource.Zen.max+=b.calm.vars()[0],!0):!1}},banquet:{id:"city-banquet",title:t("city_banquet"),desc:t("city_banquet_desc"),category:"commercial",reqs:{banquet:1},queue_complete(){return e.stats.achieve.endless_hunger?e.stats.achieve.endless_hunger.l-e.city.banquet.count:0},no_multi:!0,condition(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)},cost:{Money(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 45e3;case 1:return 18e4;case 2:return 24e5;case 3:return 3e7;case 4:return 14e7;default:return 0}},Food(a){let r=(a||0)+(e.city.banquet?e.city.banquet.count:0);return(()=>{switch(r){case 0:return 4e4;case 1:return 124e3;case 2:return 3e5;case 3:return 72e4;case 4:return 12e5;default:return 0}})()*(e.race.artifical?.25:1)},Brick(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 1600;case 1:return 18e3;case 2:return 75e3;default:return 0}},Wrought_Iron(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 0;case 1:return 26e3;case 2:return 88e3;case 3:return 144e3;case 4:return 24e4;default:return 0}},Iridium(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 2:return 5e4;case 3:return 27e4;case 4:return 7e5;default:return 0}},Aerogel(a,r){let i=(a||0)+(e.city.banquet?e.city.banquet.count:0);if(r?r.truepath:e.race.truepath)return 0;switch(i){case 3:return 4e4;case 4:return 15e4;default:return 0}},Quantium(a,r){let i=(a||0)+(e.city.banquet?e.city.banquet.count:0);if(r?!r.truepath:!e.race.truepath)return 0;switch(i){case 3:return 4e4;case 4:return 15e4;default:return 0}},Bolognium(a){switch(a||0||(e.city.banquet?e.city.banquet.count:0)){case 4:return 15e4;default:return 0}}},effect(a){let r=e.city.banquet?e.city.banquet.strength:0,i=(a?.count??0)+(e.city.banquet?e.city.banquet.count:0),s=`
Strength: ${r}
`;return s+=`
${t("city_banquet_effect1",[Y(((i>=5?1.02:1.022)**r-1)*100)])}
`,i>=1&&(s+=`
${t("city_banquet_effect2",[(r**.75).toFixed(2)])}
`),i>=2&&(s+=`
${t("city_banquet_effect3",[(r**.65).toFixed(2)])}
`),i>=3&&(s+=`
${t("city_banquet_effect4",[(r**.65).toFixed(2)])}
`),i>=4&&(s+=`
${t("city_banquet_effect5",[(r**.75).toFixed(2)])}
`),s},powered(){return 0},action(){return e.city.banquet.count=3&&e.city.ptrait.includes("unstable")?O("university",a,25,1.36):0}},effect(a){let r=+$(this)[0].knowVal(a).toFixed(0);return`
${t("city_university_effect",[F(1)])}
${t("city_max_knowledge",[r.toLocaleString()])}
`},knowVal(a){let r=1,i=e.tech.science&&e.tech.science>=8?700:500;e.city.ptrait.includes("permafrost")&&(i+=Fe.permafrost.vars()[1]),e.tech.science>=4&&(r+=e.city.library.count*.02),e.space.observatory&&e.space.observatory.count>0&&(r+=(a?e.space.observatory.on:we.observatory)*.05),e.portal.sensor_drone&&e.tech.science>=14&&(r+=(a?e.portal.sensor_drone.on:G.sensor_drone)*.02),e.race.hard_of_hearing&&(r*=1-b.hard_of_hearing.vars()[0]/100),e.race.curious&&(r*=1+b.curious.vars()[0]/100*e.resource[e.race.species].amount);let s=X("cath");s>0&&(r*=1+b.curious.vars(3)[0]*s);let c=Qt(a)?a?e.galaxy?.scavenger?.on??0:la.scavenger:0;if(c>0){let d=Lt("gxy_alien2",!1,!1,a),h=c*d/4;r*=1+h}let o=J("teacher",0);o&&(r*=1+o/100);let l=J("athleticism",2);if(l&&(r*=1-l/100),Kn()){let d=Yr("know");r*=d.mult}let u=i*r;if(e.tech.supercollider){let d=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;u*=e.tech.supercollider/d+1}return e.race.orbit_decayed&&(e.space.satellite&&(u*=1+e.space.satellite.count*.12),e.tech.biotech&&e.tech.biotech>=1&&(u*=2)),u},action(){if(_($(this)[0])){let a=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.science>=4&&(a*=1+e.city.library.count*.02),e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,e.city.university.count++,e.civic.professor.display=!0,e.civic.professor.max=F(e.city.university.count),!0}return!1}},library:{id:"city-library",title:t("city_library"),desc(){let a=x[e.race.species].home;return t("city_library_desc",[a])},category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("library",a,45,1.2)},Crystal(a){return e.race.universe==="magic"?O("library",a,2,1.2):0},Iron(a){return e.city.ptrait.includes("unstable")?O("library",a,4,1.2):0},Furs(a){return O("library",a,22,1.2)},Plywood(a){return O("library",a,20,1.2)},Brick(a){return O("library",a,15,1.2)}},effect(){let a=125;e.race.nearsighted&&(a*=1-b.nearsighted.vars()[0]/100),e.race.studious&&(a*=1+b.studious.vars()[1]/100);let r=X("elven");if(r>0&&(a*=1+b.studious.vars(1)[1]/100*r),e.tech.science&&e.tech.science>=8&&(a*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(a*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5){let l=He(e.civic.scientist.workers,"scientist");e.race.high_pop&&(l=ve(l)),a*=1+l*.12}let i=J("teacher",0);i&&(a*=1+i/100);let s=J("athleticism",2);s&&(a*=1-s/100);let n=J("muckraker",1);n&&(a*=1+n/100),a=+a.toFixed(0);let c=J("muckraker",2),o=c?5-c:5;return e.race.autoignition&&(o-=b.autoignition.vars()[0],o<0&&(o=0)),`
${t("city_max_knowledge",[a.toLocaleString()])}
${t("city_library_effect",[o])}
`},action(){if(_($(this)[0])){let a=125;return e.race.nearsighted&&(a*=1-b.nearsighted.vars()[0]/100),e.tech.science&&e.tech.science>=8&&(a*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(a*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5&&(a*=1+He(e.civic.scientist.workers,"scientist")*.12),a=+a.toFixed(1),e.resource.Knowledge.max+=a,e.city.library.count++,e.tech.science&&e.tech.science>=3&&(e.civic.professor.impact=.5+e.city.library.count*.01),!0}return!1},flair:t("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title(){return qt()},desc:t("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("wardenclyffe",a,5e3,1.22)},Knowledge(a){return O("wardenclyffe",a,e.race.logical?1e3-b.logical.vars()[0]:1e3,1.22)},Crystal(a){return e.race.universe==="magic"?O("wardenclyffe",a,100,1.22):0},Copper(a){return O("wardenclyffe",a,500,1.22)},Iron(a){return e.city.ptrait.includes("unstable")?O("wardenclyffe",a,75,1.22):0},Cement(a){return O("wardenclyffe",a,350,1.22)},Sheet_Metal(a){return O("wardenclyffe",a,125,1.2)},Nanite(a){return e.race.deconstructor?O("wardenclyffe",a,50,1.18):0}},effect(){let a=1e3;if(e.city.ptrait.includes("magnetic")&&(a+=Fe.magnetic.vars()[1]),e.tech.supercollider){let s=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/s+1}e.space.satellite&&(a*=1+e.space.satellite.count*.04);let r=J("athleticism",2);r&&(a*=1-r/100),a=+a.toFixed(0);let i=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
${t("city_max_knowledge",[a.toLocaleString()])}
`;if(e.city.powered){let s=e.tech.science>=7?2500:2e3;if(e.city.ptrait.includes("magnetic")&&(s+=Fe.magnetic.vars()[1]),e.space.satellite&&(s*=1+e.space.satellite.count*.04),e.tech.supercollider){let c=e.tech.particles&&e.tech.particles>=3?12.5:25;s*=e.tech.supercollider/c+1}let n=J("athleticism",2);if(n&&(s*=1-n/100),s=+s.toFixed(1),e.tech.science>=15&&(i=i+`
${t("city_wardenclyffe_effect4",[2])}
`),e.race.universe==="magic"){let c=E(8);i=i+`
${t("plus_max_resource",[c,e.resource.Mana.name])}
`}if(e.tech.broadcast){let c=e.tech.broadcast;i=i+`
${t("city_wardenclyffe_effect3",[$(this)[0].powered(),s.toLocaleString(),c])}
`}else i=i+`
${t("city_wardenclyffe_effect2",[$(this)[0].powered(),s.toLocaleString()])}
`;e.race.artifical&&(i=i+`
${t("city_transmitter_effect",[E(250)])}=7?2500:2e3),e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,!0}return!1},flair(){return e.race.universe==="magic"?`
${t("city_wizard_tower_flair")}
`:e.race.evil?`
${t("city_babel_flair")}
`:`
${t("city_wardenclyffe_flair1")}
${t("city_wardenclyffe_flair2")}
`}},biolab:{id:"city-biolab",title:t("city_biolab"),desc:`
${t("city_biolab_desc")}
${t("requires_power")}
`,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("biolab",a,25e3,1.3)},Knowledge(a){return O("biolab",a,5e3,1.3)},Copper(a){return O("biolab",a,1250,1.3)},Iron(a){return e.city.ptrait.includes("unstable")?O("biolab",a,160,1.3):0},Alloy(a){return O("biolab",a,350,1.3)}},effect(a){let r=3e3;return e.portal.sensor_drone&&e.tech.science>=14&&(r*=1+(a?e.portal.sensor_drone.on:G.sensor_drone)*.02),e.tech.science>=20&&(r*=3),e.tech.science>=21&&(r*=1.45),e.tech.biotech>=1&&(r*=2.5),r=+r.toFixed(0),`${t("city_max_knowledge",[r.toLocaleString()])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return N(2)},action(){return _($(this)[0])?(e.city.biolab.count++,z($(this)[0])&&(e.resource.Knowledge.max+=3e3),!0):!1}},coal_power:{id:"city-coal_power",title(){return e.race.environmentalist?t("city_hydro_power"):t(e.race.universe==="magic"?"city_mana_engine":"city_coal_power")},desc(){return e.race.environmentalist?`
${t("city_hydro_power_desc")}
`:`
${t(e.race.universe==="magic"?"city_mana_engine_desc":"city_coal_power_desc")}
${t("requires_res",[t(e.race.universe==="magic"?"resource_Mana_name":"resource_Coal_name")])}
`},category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("coal_power",a,1e4,Oe(1.22))},Crystal(a){return e.race.universe==="magic"?O("coal_power",a,125,Oe(1.22)):0},Copper(a){return O("coal_power",a,1800,Oe(1.22))-1e3},Iron(a){return e.city.ptrait.includes("unstable")?O("coal_power",a,175,Oe(1.22)):0},Cement(a){return O("coal_power",a,600,Oe(1.22))},Steel(a){return O("coal_power",a,2e3,Oe(1.22))-1e3}},effect(){let a=e.race.universe==="magic"?.05:.35,r=-$(this)[0].powered();return e.race.environmentalist?`+${r}MW`:`+${r}MW. ${t(e.race.universe==="magic"?"city_mana_engine_effect":"city_coal_power_effect",[a])}`},powered(){let a=e.race.environmentalist?e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1?-5:-4:e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1?-6:-5,r=J("dirty_jobs",1);return r&&(a-=r),at(a)},p_fuel(){return e.race.universe==="magic"?{r:"Mana",a:e.race.environmentalist?0:.05}:{r:"Coal",a:e.race.environmentalist?0:.35}},action(){return _($(this)[0])?(e.city.coal_power.count++,e.city.coal_power.on++,e.city.power+=5,!0):!1}},oil_power:{id:"city-oil_power",title(){return e.race.environmentalist?t("city_wind_power"):t("city_oil_power")},desc(){return e.race.environmentalist?`
${t("city_wind_power_desc")}
`:`
${t("city_oil_power_desc")}
${t("requires_res",[t("resource_Oil_name")])}
`},category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_power",a,5e4,Oe(1.22))},Copper(a){return O("oil_power",a,6500,Oe(1.22))+1e3},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_power",a,180,Oe(1.22)):0},Aluminium(a){return O("oil_power",a,12e3,Oe(1.22))},Cement(a){return O("oil_power",a,5600,Oe(1.22))+1e3}},effect(){let a=.65,r=-$(this)[0].powered();return e.race.environmentalist?`+${r}MW`:`+${r}MW. ${t("city_oil_power_effect",[a])}`},powered(){let a=0;if(e.race.environmentalist)if(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3){let i=e.city.calendar.wind===1?-7:-5;a=e.stats.achieve.dissipated.l>=5?i-2:i-1}else a=e.city.calendar.wind===1?-7:-5;else e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3?a=e.stats.achieve.dissipated.l>=5?-8:-7:a=-6;let r=J("dirty_jobs",1);return r&&(a-=r),at(a)},p_fuel(){return{r:"Oil",a:e.race.environmentalist?0:.65}},action(){return _($(this)[0])?(e.city.oil_power.count++,e.city.oil_power.on++,e.city.power+=6,!0):!1}},fission_power:{id:"city-fission_power",title:t("city_fission_power"),desc:`
${t("city_fission_power_desc")}
${t("requires_res",[t("resource_Uranium_name")])}
`,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("fission_power",a,25e4,1.36)},Copper(a){return O("fission_power",a,13500,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("fission_power",a,1750,1.36):0},Cement(a){return O("fission_power",a,10800,1.36)},Titanium(a){return O("fission_power",a,7500,1.36)}},effect(){let a=.1;return`+${-$(this)[0].powered()}MW. ${t("city_fission_power_effect",[a])}`},powered(){return at(e.tech.uranium>=4?-18:-14)},p_fuel(){return{r:"Uranium",a:.1}},action(){return _($(this)[0])?(e.city.fission_power.count++,e.city.fission_power.on++,e.city.power+=14,!0):!1}},mass_driver:{id:"city-mass_driver",title:t("city_mass_driver"),desc:`
${t("city_mass_driver_desc")}
${t("requires_power")}
`,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mass_driver",a,375e3,1.32)},Copper(a){return O("mass_driver",a,33e3,1.32)},Iron(a){return O("mass_driver",a,42500,1.32)},Iridium(a){return O("mass_driver",a,2200,1.32)}},effect(){return`${e.tech.mass>=2?`
${t("city_mass_driver_effect2",[1,e.civic.scientist.name])}
`:""}${t("city_mass_driver_effect",[e.race.truepath?6:5,We("name")])} ${t("minus_power",[$(this)[0].powered()])}`},powered(){let a=e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4?4:5;return N(e.tech.mass>=2?a-1:a)},action(){return _($(this)[0])?(e.city.mass_driver.count++,z($(this)[0]),!0):!1}},replicator:{id:"city-replicator",title:t("tech_replicator"),desc:t("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect(){return"fake structure"},powered(){return 1},action(){return!1}}},tech:Li(),arpa:ye("PhysicsTech"),genes:ye("GeneTech"),blood:ye("BloodTech"),space:es(),interstellar:Kc(),galaxy:Gc(),starDock:{probes:{id:"starDock-probes",title:t("star_dock_probe"),desc(){return`
${t("star_dock_probe_desc")}
`},reqs:{genesis:4},cost:{Money(a){return O("probes",a,35e4,e.race.truepath?1.125:1.25,"starDock")},Alloy(a){return O("probes",a,75e3,e.race.truepath?1.125:1.25,"starDock")},Polymer(a){return O("probes",a,85e3,e.race.truepath?1.125:1.25,"starDock")},Iridium(a){return O("probes",a,12e3,e.race.truepath?1.125:1.25,"starDock")},Mythril(a){return O("probes",a,3500,e.race.truepath?1.125:1.25,"starDock")}},effect(){return`
${t("star_dock_probe_effect")}
`},action(){return _($(this)[0])?(e.starDock.probes.count++,!0):!1}},geck:{id:"starDock-geck",title:t("tech_geck"),desc(){return`
${t("tech_geck_desc")}
`},reqs:{geck:1},condition(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)},queue_complete(){return 0},no_multi:!0,cost:{Money(a){return O("geck",a,1e6,1.25,"starDock")},Elerium(a){return O("geck",a,1e3,1.25,"starDock")},Plasmid(a){return O("geck",a,25,1.4,"starDock")}},effect(){return`
${t("star_dock_geck_effect")}
`},action(){return _($(this)[0])?(e.starDock.geck.count++,!0):!1}},seeder:{id:"starDock-seeder",title(){return e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder")},desc(){let a=e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder");return e.starDock.seeder&&e.starDock.seeder.count>=100?`
${a}
${t("star_dock_seeder_desc2")}
`:`
${a}
${t("star_dock_seeder_desc1")}
`},reqs:{genesis:5},queue_size:10,queue_complete(){return 100-e.starDock.seeder.count},cost:{Money(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?1e5:0},Steel(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?25e3:0},Neutronium(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?240:0},Elerium(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?10:0},Nano_Tube(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?12e3:0}},effect(a){let r=(a?.count??0)+(e.starDock.seeder?e.starDock.seeder.count:0),i=r<100?t("star_dock_seeder_status1",[100-r]):t("star_dock_seeder_status2");return`
${e.race.cataclysm?t("star_dock_exodus_effect"):t("star_dock_seeder_effect")}
${i}
`},action(){if(e.starDock.seeder.count<100&&_($(this)[0])){if(e.starDock.seeder.count++,e.starDock.seeder.count>=100){e.tech.genesis=6,ie("starDock-seeder"),A($("#modalBox"));let a=q.space.spc_gas.star_dock;En(a,"star_dock")}return!0}return!1}},prep_ship:{id:"starDock-prep_ship",title:t("star_dock_prep"),desc(){return`
${e.race.cataclysm?t("star_dock_prep_cata_desc"):t("star_dock_prep_desc")}
${t("star_dock_genesis_desc2")}
`},reqs:{genesis:6},queue_complete(){return 0},cost:{Helium_3(a,r){return+ue(e.race.gravity_well?15e4:75e3,!1,r).toFixed(0)}},effect(){let a=ke("bioseed"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${e.race.cataclysm?t("star_dock_prep_cata_effect"):t("star_dock_prep_effect")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){if(_($(this)[0])){e.tech.genesis=7,ie("starDock-prep_ship"),A($("#modalBox"));let a=q.space.spc_gas.star_dock;return En(a,"star_dock"),!0}return!1}},launch_ship:{id:"starDock-launch_ship",title:t("star_dock_genesis"),desc(){return`
${e.race.cataclysm?t("star_dock_prep_cata_effect"):t("star_dock_genesis_desc1")}
${t("star_dock_genesis_desc2")}
`},reqs:{genesis:7},queue_complete(){return 0},cost:{},effect(){let a=ke("bioseed"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${e.race.cataclysm?t("star_dock_genesis_cata_effect1"):t("star_dock_genesis_effect1")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){return yc(),!1}}},portal:us(),tauceti:Oc()};function xs(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach(function(r){A($(r),!0)}),A($("#evolution .evolving"),!0),e.evolution.bunker={count:1},Na(q.evolution.bunker.id),Mo(),e.race.truepath||e.race.lone_survivor?(e.evolution.nerfed={count:0},e.evolution.badgenes={count:0}):(e.race.universe==="antimatter"?e.evolution.mastery={count:0}:e.evolution.plasmid={count:0},e.evolution.crispr={count:0}),e.evolution.trade={count:0},e.evolution.craft={count:0},e.evolution.junker={count:0},e.evolution.joyless={count:0},e.evolution.steelen={count:0},(e.stats.achieve.whitehole||e.sim)&&(e.evolution.decay={count:0}),(e.stats.achieve.ascended||e.sim)&&(e.evolution.emfield={count:0}),(e.stats.achieve.scrooge||e.sim)&&(e.evolution.inflation={count:0}),(e.stats.achieve.shaken||e.sim)&&(e.evolution.cataclysm={count:0}),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&(e.evolution.banana={count:0},e.evolution.orbit_decay={count:0}),e.race.universe==="standard"&&(e.stats.achieve.whitehole||e.sim),e.race.universe==="heavy"&&(e.stats.achieve.seeder&&e.stats.achieve.seeder.h||e.sim)&&(e.evolution.gravity_well={count:0}),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&(e.evolution.witch_hunter={count:0}),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&(e.evolution.truepath={count:0}),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&(e.evolution.sludge={count:0}),(e.stats.achieve.bluepill||e.sim)&&(e.evolution.simulation={count:0}),(e.stats.achieve.retired||e.sim)&&(e.evolution.lone_survivor={count:0}),(e.stats.achieve.corrupted||e.sim)&&(e.evolution.fasting={count:0}),bu(),e.race.truepath||e.race.lone_survivor?je("evolution","nerfed"):e.race.universe==="antimatter"?je("evolution","mastery"):je("evolution","plasmid"),je("evolution","trade"),je("evolution","craft"),e.race.truepath||e.race.lone_survivor?je("evolution","badgenes"):je("evolution","crispr"),wu(),je("evolution","joyless"),je("evolution","steelen"),(e.stats.achieve.whitehole||e.sim)&&je("evolution","decay"),(e.stats.achieve.ascended||e.sim)&&je("evolution","emfield"),(e.stats.achieve.scrooge||e.sim)&&je("evolution","inflation"),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&je("evolution","sludge"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&je("evolution","orbit_decay"),e.race.universe==="standard"&&(e.stats.achieve.whitehole||e.sim),e.race.universe==="heavy"&&(e.stats.achieve.seeder&&e.stats.achieve.seeder.h||e.sim)&&je("evolution","gravity_well"),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&je("evolution","witch_hunter"),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),e.hasOwnProperty("beta")&&!e.sim&&je("evolution","simulation"),ku(),je("evolution","junker"),(e.stats.achieve.shaken||e.sim)&&je("evolution","cataclysm"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&je("evolution","banana"),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&je("evolution","truepath"),(e.stats.achieve.retired||e.sim)&&je("evolution","lone_survivor"),(e.stats.achieve.corrupted||e.sim)&&je("evolution","fasting"),e.sim?$u():e.race.simulation&&xu()}function ft(a,r){let i=e.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(n,c,o){return o==="space"?n.hasOwnProperty("trait")?n.trait.push(c):n.trait=[c]:o==="tauceti"?n.reqs.isolation=1:n.hasOwnProperty("not_trait")?n.not_trait.push(c):n.not_trait=[c],n};switch(a){case"bonfire":{let n={id:`${r}-bonfire`,title:t("city_bonfire"),desc:t("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition(){return xe("summer")},queue_complete(){return 0},effect(){let c=e.resource.Thermite.diff*2.5/(e.resource.Thermite.diff*2.5+500)*500,o=1e5+e.stats.reset*9e3;o>1e6&&(o=1e6);let l=e.resource.Thermite.amount${t("city_bonfire_effect3",[o.toLocaleString()])}
${t("city_bonfire_effect4",[(+e.resource.Thermite.amount.toFixed(0)).toLocaleString(),o.toLocaleString()])}
`:"";return`
${t("city_bonfire_effect",[e.resource.Thermite.diff])}
${t("city_bonfire_effect2",[+c.toFixed(1)])}
${l}`},action(){return!1},flair(){return t("city_bonfire_flair")}};return s(n,i,r)}case"firework":{let n={id:`${r}-firework`,title:t("city_firework"),desc:t("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition(){return xe("firework")&&e[r].firework&&(e.tech.cement||e.race.flier)},cost:{Money(){return e[r].firework.count===0?5e4:0},Iron(){return e[r].firework.count===0?7500:0},Cement(){return e[r].firework.count===0?1e4:0}},queue_complete(){return 1-e[r].firework.count},switchable(){return!0},effect(){return e[r].firework.count===0?t("city_firework_build"):t("city_firework_effect")},action(){return e[r].firework.count===0&&_($(this)[0])?(e[r].firework.count=1,!0):!1}};return s(n,i,r)}case"assembly":{let n=function(o){let l=ve(o);return e.race.promiscuous&&(l/=1+b.promiscuous.vars()[1]*e.race.promiscuous),Math.round(l)},c={id:`${r}-assembly`,title:t("city_assembly"),desc(){return t("city_assembly_desc",[x[e.race.species].name])},category:"military",reqs:{},trait:["artifical"],queue_complete(){return e.resource[e.race.species].max-e.resource[e.race.species].amount},cost:{Money(o){return e.resource[e.race.species].amount?O("citizen",o,n(125),1.01):0},Copper(o){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?O("citizen",o,n(50),1.01):0},Aluminium(o){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?O("citizen",o,n(50),1.01):0},Nanite(o){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?O("citizen",o,n(500),1.01):0}},effect(){let o="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(o=`
${t("city_assembly_effect_warn")}
`),`
${t("city_assembly_effect",[x[e.race.species].name])}
${o}`},action(){return e.race.vax&&e.race.vax>=100?!0:e.resource[e.race.species].max>e.resource[e.race.species].amount&&_($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}};return s(c,i,r)}case"nanite_factory":{let n={id:`${r}-nanite_factory`,title:t("city_nanite_factory"),desc:t("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money(c){return O("nanite_factory",c,25e3,Oe(1.25))},Copper(c){return O("nanite_factory",c,1200,Oe(1.25))},Steel(c){return O("nanite_factory",c,1e3,Oe(1.25))}},effect(){let c=E(2500);return`
${t("city_nanite_factory_effect",[e.resource.Nanite.name])}
${t("plus_max_resource",[c,e.resource.Nanite.name])}.
`},special:!0,action(){return _($(this)[0])?(e.city.nanite_factory.count++,e.settings.showIndustry=!0,Pe(),!0):!1},flair:t("city_nanite_factory_flair")};return s(n,i,r)}case"captive_housing":{let n={id:`${r}-captive_housing`,title:t("city_captive_housing"),desc:t("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money(c){return O("captive_housing",c,40,1.35)},Lumber(c){return O("captive_housing",c,30,1.35)},Stone(c){return O("captive_housing",c,18,1.35)}},effect(){let c="";if(!e.race.artifical&&!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater){let u=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattle:0,d=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattleCap:0;c+=`
${t("city_captive_housing_cattle",[u,d])}
`}let o=0;if(e.city.hasOwnProperty("surfaceDwellers"))for(let u=0;u${t("city_captive_housing_broken",[x[d].name,h])}`,c+=`
${t("city_captive_housing_untrained",[x[d].name,p])}
`}let l=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.raceCap:0;return c+=`
${t("city_captive_housing_capacity",[o,l])}
`,e.tech.unfathomable&&e.tech.unfathomable>=2&&(c+=`
${t("plus_max_resource",[1,t("job_torturer")])}
`),c},action(){if(_($(this)[0])){e.city.captive_housing.count++;let c=e.city.captive_housing.count;return e.city.captive_housing.raceCap=c*(e.tech.unfathomable&&e.tech.unfathomable>=3?3:2),e.city.captive_housing.cattleCap=c*5,!0}return!1}};return s(n,i,r)}case"horseshoe":{let n={id:`${r}-horseshoe`,title(){return t(`city_${xt(!0)}`,[xt(!1)])},desc(){return t(`city_${xt(!0)}_desc`,[xt(!1)])},category:"outskirts",reqs:{primitive:3},condition(){return e.race.hooved||xe("fool",2023)},inflation:!1,cost:{Lumber(c){let o=(e.race.shoecnt||0)+(c||0);return!e.race.kindling_kindred&&!e.race.smoldering&&(!e.resource.Copper.display||o<=12)?Math.round((o>12?25:5)*(o<=5?1:o-4)*(b.hooved.vars()[0]/100)):0},Copper(c){let o=(e.race.shoecnt||0)+(c||0),l=!(e.race.kindling_kindred||e.race.smoldering);return!!((!l||l&&o>12&&e.resource.Copper.display)&&(!e.resource.Iron.display||o<=75))?Math.round((o>75?20:5)*(o<=12?1:o-11)*(b.hooved.vars()[0]/100)):0},Iron(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Iron.display&&o>75&&(!e.resource.Steel.display||o<=150)?Math.round((o<=150?12:28)*o*(b.hooved.vars()[0]/100)):0},Steel(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Steel.display&&o>150&&(!e.resource.Adamantite.display||o<=500)?Math.round((o<=500?40:100)*o*(b.hooved.vars()[0]/100)):0},Adamantite(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Adamantite.display&&o>500&&(!e.resource.Orichalcum.display||o<=5e3)?Math.round((o<=5e3?5:25)*o*(b.hooved.vars()[0]/100)):0},Orichalcum(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Orichalcum.display&&o>5e3?Math.round((25*o-12e4)*(b.hooved.vars()[0]/100)):0}},action(){return!e.race.hooved&&xe("fool",2023)?!0:e.resource.Horseshoe.display&&_($(this)[0])?(e.resource.Horseshoe.amount++,e.race.shoecnt++,e.race.shoecnt===5001&&e.resource.Orichalcum.display||e.race.shoecnt===501&&e.resource.Adamantite.display||e.race.shoecnt===151&&e.resource.Steel.display||e.race.shoecnt===76&&e.resource.Iron.display||e.race.shoecnt===13&&e.resource.Copper.display&&e.resource.Lumber.display?0:!0):!1}};return s(n,i,r)}}}function nt(a,r){r=r||"evo";let i=e.evolution.final||0;return(e.tech[r]&&e.tech[r]===a||e.evolution.gselect)&&i<100}var ei=["human","orc","elven","troll","ogre","cyclops","kobold","goblin","gnome","cath","wolven","vulpine","centaur","rhinotaur","capybara","tortoisan","gecko","slitheryn","arraak","pterodacti","dracnid","sporgar","shroomi","moldling","mantis","scorpid","antid","entish","cacti","pinguicula","sharkin","octigoran","dryad","satyr","phoenix","salamander","yeti","wendigo","tuskin","kamel","imp","balorg","seraph","unicorn","synth","nano","ghast","shoggoth","custom"];ei.forEach(function(a){(a!=="custom"||e.custom.hasOwnProperty("race0"))&&(q.evolution[a]={id:`evolution-${a}`,title(){return x[a].name},desc(){return`${t("evo_evolve")} ${x[a].name}`},reqs:{evo:7},grant:["evo",8],condition(){return(e.race.seeded||e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>=1||e.stats.achieve[`extinct_${a}`]&&e.stats.achieve[`extinct_${a}`].l>=1)&&e.tech[`evo_${x[a].type}`]>=2&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{RNA(){return 320},DNA(){return 320}},race:!0,effect(){return`${typeof x[a].desc=="string"?x[a].desc:x[a].desc()} ${t("evo_complete")}`},action(){if(_($(this)[0])){if(["synth","custom"].includes(a))return Cu(a);e.race.species=a,qs()}return!1},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0},emblem(){return Ne(`extinct_${a}`)}})});if(Object.keys(e.stats.synth).length>1){let a=Be(ei);a.push("junker"),a.push("sludge"),a.forEach(r=>q.evolution[`s-${r}`]={id:`evolution-s-${r}`,title(){return x[r].name},desc(){return`${t("evo_imitate")} ${x[r].name}`},reqs:{evo:8},grant:["evo",9],condition(){return e.stats.synth[r]&&e.race.evoFinalMenu},cost:{},race:!0,effect(){return t("evo_imitate_race",[x[r].name])},action(){return e.stats.synth[r]&&(e.race.species=e.race.evoFinalMenu,e.race.srace=r,qs()),!1},queue_complete(){return e.tech.evo&&e.tech.evo===8?1:0}})}var Ba={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ba).forEach(a=>q.evolution[a]={id:`evolution-${a}`,title:t(`evo_challenge_${a}`),desc:t(`evo_challenge_${a}`),condition(){return e.evolution.hasOwnProperty(a)},cost:{DNA(){return 10}},challenge:!0,effect(){return xo(a)},action(){return _($(this)[0])&&(e.race[Ba[a]]?(delete e.race[Ba[a]],$(`#${$(this)[0].id}`).removeClass("hl"),(e.race.truepath||e.race.lone_survivor)&&(delete e.race.nerfed,delete e.race.badgenes),["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(r){delete e.race[r],$(`#evolution-${r}`).removeClass("hl")})):(e.race[Ba[a]]=1,$(`#${$(this)[0].id}`).addClass("hl")),xs(),Ms()),!1},highlight(){return!!e.race[Ba[a]]},queue_complete(){return 0}});var ks={joyless:{t:"c",e:"joyless"},steelen:{t:"c",e:"steelen"},decay:{t:"c",e:"dissipated"},emfield:{t:"c",e:"technophobe"},inflation:{t:"c",e:"wheelbarrow"},sludge:{t:"c",e:"extinct_sludge"},orbit_decay:{t:"c",e:"lamentis"},gravity_well:{t:"c",e:"escape_velocity"},witch_hunter:{t:"c",e:"soul_sponge"},simulation:{t:"c",e:"thereisnospoon"},junker:{t:"s",e:"extinct_junker"},cataclysm:{t:"s",e:"iron_will"},banana:{t:"s",e:"banana"},truepath:{t:"s",e:"pathfinder"},lone_survivor:{t:"s",e:"adam_eve"},fasting:{t:"s",e:"endless_hunger"}};Object.keys(ks).forEach(a=>q.evolution[a]={id:`evolution-${a}`,title:t(`evo_challenge_${a}`),desc(){let r="";return e.race.universe==="micro"&&(r=r+`
${t("evo_challenge_micro_warn")}
`),r=r+`
${t(`evo_challenge_${a}_desc`)}
`,["sludge","junker"].includes(a)&&(r=r+`
${t("evo_start")}
`),r},condition(){return e.evolution.hasOwnProperty(a)},cost:{DNA(){return ks[a].t==="c"?25:50}},challenge:!0,effect(){return xo(a)},action(){return _($(this)[0])&&(ks[a].t==="c"?uu(a):_u(a)),!1},emblem(){return Ne(ks[a].e)},highlight(){return!!e.race[a]},queue_complete(){return 0}});q.evolution.bunker={id:"evolution-bunker",title:t("evo_bunker"),desc(){return`
${t("evo_bunker")}
${t("evo_challenge")}
`},reqs:{evo:6},grant:["evo_challenge",1],condition(){return e.genes.challenge&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{DNA(){return 10}},effect:t("evo_bunker_effect"),action(){return!!_($(this)[0])},queue_complete(){return e.tech.evo_challenge?0:1},flair:t("evo_bunker_flair")};function ss(){if(!(!e.settings.tabLoad&&e.settings.civTabs!==0)&&!(e.race.universe==="bigbang"||e.race.seeded&&!e.race.chose)){if(e.tech.evo_challenge){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach(function(r){A($(r),!0)}),A($("#evolution .evolving"),!0)}Object.keys(q.evolution).forEach(function(a){if(!q.evolution[a].challenge){Na(q.evolution[a].id);var r=!0;q.evolution[a].hasOwnProperty("reqs")&&Object.keys(q.evolution[a].reqs).forEach(function(i){(!e.tech[i]||e.tech[i]=2&&Mo(),e.tech.evo_challenge&&xs())}}function xo(a){switch(a){case"nerfed":let r=e.race.universe==="antimatter"?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];return t(`evo_challenge_${a}_effect`,r);case"badgenes":return t(`evo_challenge_${a}_effect`,[1,2]);case"orbit_decay":return mt()>=100?`
${t("evo_challenge_orbit_decay_effect",[5e3])}
${t("evo_challenge_scenario_failwarn")}
`:`
${t("evo_challenge_orbit_decay_effect",[5e3])}
${t("evo_challenge_scenario_failwarn")}
${t("evo_challenge_scenario_warn")}
`;case"junker":return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_challenge_junker_effect")}
${t("evo_warn_unwise")}
`:t("evo_challenge_junker_effect");case"cataclysm":return mt()>=50?`
${t("evo_challenge_cataclysm_effect")}
${t("evo_challenge_cataclysm_warn")}
`:`
${t("evo_challenge_cataclysm_effect")}
${t("evo_challenge_scenario_warn")}
`;default:return t(`evo_challenge_${a}_effect`)}}function wn(){let a;if(e.race.universe==="antimatter"||e.race.no_plasmid){let r=An(100);if(r=+r.toFixed(3),a=`
${t("city_temple_effect1",[r])}
`,e.race.universe==="antimatter"){let i=6;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.12:e.genes.ancients>=3?.1:.08;e.race.high_pop&&(s=ve(s)),i+=s*He(e.civic.priest.workers,"priest")}a+=`
${t("city_temple_effect5",[i.toFixed(2)])}
`}}else{let r=Tn(100);r=+r.toFixed(3),a=`
${t("city_temple_effect2",[r])}
`}return e.tech.fanaticism&&e.tech.fanaticism>=3&&(a=a+`
${t("city_temple_effect3")}
`),e.tech.anthropology&&e.tech.anthropology>=4&&(a=a+`
${e.race.truepath?t("city_temple_effect_tp",[2,25]):t("city_temple_effect4")}
`),a}function vi(){let a=e.tech.gambling>=3?6e4:4e4;e.tech.gambling>=5&&(a+=e.tech.gambling>=6?24e4:6e4),a=E(a),e.race.gambler&&(a*=1+e.race.gambler*.04),e.tech.world_control&&(a=a*1.25),e.race.truepath&&(a=a*1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(a*=1+e.tech.stock_exchange*.05),e.race.inflation&&(a*=1+e.race.inflation/100),e.tech.isolation&&(a*=5.5),a=Math.round(a);let r=e.race.joyless?"":`
${t("city_max_entertainer",[F(1)])}
`,i=e.race.orbit_decayed||e.tech.isolation?`
${t("plus_max_resource",[F(1),t("banker_name")])}
`:"",s=`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${r}${i}
${t("city_max_morale",[1])}
`,n=Math.log2(1+e.resource[e.race.species].amount)*(e.race.gambler?2.5+e.race.gambler/10:2.5);return e.tech.gambling&&e.tech.gambling>=2&&(n*=e.tech.gambling>=5?2:1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(n*=1+e.tech.stock_exchange*.01),e.civic.govern.type==="corpocracy"&&(n*=3),e.civic.govern.type==="socialist"&&(n*=.8),e.race.inflation&&(n*=1+e.race.inflation/1250),e.tech.isolation&&(n*=1.25,e.tech.iso_gambling&&(n*=1+He(e.civic.banker.workers,"banker")*.05)),n=+n.toFixed(2),s=s+`
${t("tech_casino_effect2",[n])}
`,s}function Qa(a,r,i,s){return((e.evolution.hasOwnProperty(a)?e.evolution[a].count:0)+(s||0))*i+r}function uu(a){e.race[a]?(delete e.race[a],$(`#evolution-${a}`).removeClass("hl"),a==="sludge"&&Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).removeClass("is-hidden")})):(e.race[a]=1,$(`#evolution-${a}`).addClass("hl"),a==="sludge"&&(Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).addClass("is-hidden")}),e.race.junker&&delete e.race.junker),a==="orbit_decay"&&(delete e.race.cataclysm,e.race.lone_survivor&&(delete e.race.lone_survivor,["nerfed","badgenes"].forEach(function(r){delete e.race[Ba[r]]})))),xs(),Ms()}function _u(a){if(e.race.sludge||Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).removeClass("is-hidden")}),e.race[a])delete e.race[a],$(`#evolution-${a}`).removeClass("hl"),["nerfed","badgenes"].forEach(function(r){delete e.race[Ba[r]]});else{["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(i){delete e.race[i],$(`#evolution-${i}`).removeClass("hl")}),e.race[a]=1,$(`#evolution-${a}`).addClass("hl"),a==="junker"&&(Object.keys(x).forEach(function(i){i!=="junker"&&i!=="sludge"&&$(`#evolution-${i}`).addClass("is-hidden")}),e.race.sludge&&delete e.race.sludge),(a==="cataclysm"||a==="lone_survivor")&&delete e.race.orbit_decay,a==="truepath"||a==="lone_survivor"?(e.race.nerfed=1,["crispr","plasmid","mastery"].forEach(function(i){delete e.race[Ba[i]]})):(["nerfed","badgenes"].forEach(function(i){delete e.race[Ba[i]]}),e.race.universe==="antimatter"?(e.race.weak_mastery=1,$("#evolution-mastery").hasClass("hl")||$("#evolution-mastery").addClass("hl")):(e.race.no_plasmid=1,$("#evolution-plasmid").hasClass("hl")||$("#evolution-plasmid").addClass("hl")));let r=a==="truepath"||a==="lone_survivor"?["badgenes","trade","craft"]:["crispr","trade","craft"];for(let i=0;i=3&&(r*=e.tech.storage>=4?3:1.5),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[1]/100);let i=X("kobold");return i>0&&(r*=1+b.pack_rat.vars(1)[1]/100*i),e.tech.storage>=6&&(r*=1+e.tech.supercollider/20),e.tech.tp_depot&&(r*=1+e.tech.tp_depot/20),e.tech.shelving&&e.tech.shelving>=3&&(r*=1.5),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?3:1,e.race.ascended&&(r*=1.1),e.blood.hoarder&&(r*=1+e.blood.hoarder/100),e.tech.storage>=7&&e.interstellar.cargo_yard&&(r*=1+e.interstellar.cargo_yard.count*pa(a)/100),r}function Da(a){if((e.race.kindling_kindred||e.race.smoldering)&&a==="lumber")return!1;if((e.race.kindling_kindred||e.race.smoldering)&&a==="stone")return!0;let r=e.race.truepath?"truepath":"standard";if(q.city[a].hasOwnProperty("path")&&!q.city[a].path.includes(r))return!1;var i=!0;return Object.keys(q.city[a].reqs).forEach(function(s){(!e.tech[s]||e.tech[s]=3&&(s=!0,e.r_queue.queue.forEach(function(c){Ln(c.type,!1)&&(r[q[c.action][c.type].grant[0]]={v:q[c.action][c.type].grant[1],a:c.type})}),Object.keys(n).forEach(function(c){let o=e.tech[c]||0;$o(c,e.tech[c]||0)||(!r[c]||r[c].vo+1)&&(s=!1)})),(i||s)&&(!e.tech[q.tech[a].grant[0]]||e.tech[q.tech[a].grant[0]]=q.tech[a].grant[1]){if(a!=="fanaticism"&&a!=="anthropology"&&a!=="deify"&&a!=="study")return!0;if(a==="fanaticism"&&e.tech.fanaticism)return!0;if(a==="anthropology"&&e.tech.anthropology)return!0;if(a==="deify"&&e.tech.ancient_deify)return!0;if(a==="study"&&e.tech.ancient_study)return!0}return!1}function Dn(a){let r=!0;return a.power_reqs&&Object.keys(a.power_reqs).forEach(function(i){(!e.tech[i]||e.tech[i]`).appendTo("#city").append(`

${t(`city_dist_${i}`)}

`),a[i].forEach(function(s){je("city",s)}),B(`dist-${i}`,function(){return t(`city_dist_${i}_desc`)},{elm:`#city-dist-${i} h3`,classes:"has-background-light has-text-dark"})}})}function pe(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;let a={},r={},i={},s=[],n=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach(function(u){i[u]=[]});let o={interstellar:"solar"},l={};Object.keys(q.tech).forEach(function(u){if(!du(u))return;Na(q.tech[u].id);let d=pu(u),h=q.tech[u],p="category"in h?h.category:"research";if(!d&&s.indexOf(p)===-1&&s.push(p),d&&n.indexOf(p)===-1&&n.push(p),c.indexOf(p)===-1&&c.push(p),d===!0)p in r||(r[p]=[]),r[p].push(u);else{let f=q.tech[u];if(!Ja(f,u))return;let g=Ln(u,l);if(!g)return;p in a||(a[p]=[]);let w=e.race.truepath&&o[f.era]?o[f.era]:f.era;i.hasOwnProperty(w)||(i[w]=[]),i[w].push({t:u,p:g==="precog"})}}),A($("#tech")),Object.keys(i).forEach(function(u){i[u].length>0&&($("#tech").append(`

${t(`tech_era_${u}`)}

`),i[u].sort(function(d,h){return q.tech[d.t].cost.Knowledge==null?-1:q.tech[h.t].cost.Knowledge==null||q.tech[d.t].cost.Knowledge()>q.tech[h.t].cost.Knowledge()?1:-1}),i[u].forEach(function(d){je("tech",d.t,!1,d.p?l:!1)}))}),c.forEach(function(u){A($(`#tech-dist-${u}`),!0),A($(`#tech-dist-old-${u}`),!0)}),n.forEach(function(u){if(!(u in r))return;$(`
`).appendTo("#oldTech").append(`

${t(`tech_dist_${u}`)}

`);let d=pt(4,12,!1);d.length>0&&u==="science"&&$("#tech-dist-old-science h3").append(d),r[u].forEach(function(h){je("tech",h,!0,!1)})})}function je(a,r,i,s){let n=q[a][r];Ut(n,a,r,i,s)}function Ut(a,r,i,s,n){if(Ja(a,i)===!1)return;let c=r;r==="outerSol"&&(r="space"),a.region&&(r=a.region),a.powered&&!e[r][i].on&&(e[r][i].on=0);let o=a.id;Na(o);let l="";n&&a&&a.reqs&&Object.keys(a.reqs).forEach(function(p){n[p]&&(l+=` data-req-${p}="${n[p].a}"`)});let u=a.highlight&&a.highlight()?$(`
`):$(`
`);Jt(a,!1,["genes","blood"].includes(r))||u.addClass("cna"),Jt(a,!0,["genes","blood"].includes(r))||u.addClass("cnam");let d;if(s)d=$('{{ title }}');else{let p="",f="";if(a.cost){let v=r!=="genes"&&r!=="blood"?_t(a):a.cost;Object.keys(v).forEach(function(k){let P=v[k]();P>0&&(p=p+` res-${k}`,f=f+` data-${k}="${P}"`)})}let g="";a.class&&(g=typeof a.class=="function"?` ${a.class()}`:` ${a.class}`),n&&(g=" precog");let w=a.highlight?a.highlight()?`${t("active")}`:`${t("not_active")}`:"";d=$(`${w}{{ title }} description`)}if(u.append(d),a.hasOwnProperty("special")&&(typeof a.special=="function"&&a.special()||a.special===!0)){let p=$(`
+
${t("tech_demonic_infusion_effect2",[ke("descend").artifact])}
`},action(){return Jt($(this)[0])&&mi(),!1}},bioscience:{id:"tech-bioscience",title:t("tech_bioscience"),desc:t("tech_bioscience_desc"),category:"science",era:"globalized",reqs:{science:8},grant:["genetics",1],cost:{Knowledge(){return 67500}},effect:t("tech_bioscience_effect"),action(){return _($(this)[0])?(e.city.biolab={count:0},!0):!1}},genetics:{id:"tech-genetics",title:t("tech_genetics"),desc:t("tech_genetics"),category:"arpa",era:"globalized",reqs:{genetics:1,high_tech:6},grant:["genetics",2],cost:{Knowledge(){return 108e3}},effect:t("tech_genetics_effect"),action(){return _($(this)[0])?(e.settings.arpa.genetics=!0,e.arpa.sequence||(e.arpa.sequence={max:5e4,progress:0,time:5e4,on:!(e.race.cataclysm||e.race.orbit_decayed),boost:!1,auto:!1,labs:0}),!0):!1},post(){ye("Genetics")}},crispr:{id:"tech-crispr",title:t("tech_crispr"),desc:t("tech_crispr"),category:"genes",era:"globalized",reqs:{genetics:3},grant:["genetics",4],cost:{Knowledge(){return 125e3}},effect(){return e.race.artifical?t("tech_crispr_effect_artifical"):t("tech_crispr_effect")},action(){return _($(this)[0])?(e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2,!0):!1},post(){ye("Genetics"),ye("Crispr")}},shotgun_sequencing:{id:"tech-shotgun_sequencing",title:t("tech_shotgun_sequencing"),desc(){return e.race.artifical?t("tech_shotgun_sequencing_desc_artifical"):t("tech_shotgun_sequencing_desc")},category:"genes",era:"early_space",reqs:{genetics:4},grant:["genetics",5],cost:{Knowledge(){return 165e3}},effect(){return e.race.artifical?t("tech_shotgun_sequencing_effect_artifical"):t("tech_shotgun_sequencing_effect")},action(){return _($(this)[0])?(e.arpa.sequence.boost=!0,!0):!1},post(){ye("Genetics")}},de_novo_sequencing:{id:"tech-de_novo_sequencing",title:t("tech_de_novo_sequencing"),desc:t("tech_de_novo_sequencing"),category:"genes",era:"early_space",reqs:{genetics:5},grant:["genetics",6],cost:{Knowledge(){return 22e4}},effect(){return e.race.artifical?t("tech_de_novo_sequencing_effect_artifical"):t("tech_de_novo_sequencing_effect")},action(){return _($(this)[0])?(e.resource.Genes.display=!0,!0):!1},post(){ye("Genetics")}},dna_sequencer:{id:"tech-dna_sequencer",title(){return e.race.artifical?t("tech_code_sequencer"):t("tech_dna_sequencer")},desc(){return e.race.artifical?t("tech_code_sequencer"):t("tech_dna_sequencer")},category:"genes",era:"deep_space",reqs:{genetics:6},grant:["genetics",7],cost:{Knowledge(){return 3e5}},effect(){return e.race.artifical?t("tech_code_sequencer_effect"):t("tech_dna_sequencer_effect")},action(){return _($(this)[0])?(e.arpa.sequence.auto=!0,!0):!1},post(){ye("Genetics")}},rapid_sequencing:{id:"tech-rapid_sequencing",title(){return e.race.artifical?t("tech_agile_development"):t("tech_rapid_sequencing")},desc(){return e.race.artifical?t("tech_agile_development"):t("tech_rapid_sequencing")},category:"genes",era:"interstellar",path:["standard","truepath"],reqs:{genetics:7,high_tech:12},grant:["genetics",8],cost:{Knowledge(){return 8e5}},effect(){return e.race.artifical?t("tech_agile_development_effect"):t("tech_rapid_sequencing_effect")},action(){return!!_($(this)[0])}},mad_science:{id:"tech-mad_science",title(){return e.race.universe==="magic"?t("tech_sages"):t("tech_mad_science")},desc(){return e.race.universe==="magic"?t("tech_sages"):t("tech_mad_science")},category:"science",era:"discovery",reqs:{science:2,smelting:2},grant:["high_tech",1],cost:{Money(){return 1e4},Mana(){return e.race.universe==="magic"?50:0},Knowledge(){return 6750},Crystal(){return e.race.universe==="magic"?1e3:0},Aluminium(){return 750}},effect(){return e.race.universe==="magic"?t("tech_sages_effect"):t("tech_mad_science_effect")},action(){return _($(this)[0])?(e.race.terrifying&&(e.civic.taxes.display=!0),e.city.wardenclyffe={count:0,on:0},!0):!1},post(){e.race.terrifying&&Te()}},electricity:{id:"tech-electricity",title:t("tech_electricity"),desc:t("tech_electricity"),category:"power_generation",era:"discovery",reqs:{high_tech:1},grant:["high_tech",2],cost:{Knowledge(){return 13500},Copper(){return 1e3}},effect:t("tech_electricity_effect"),action(){return _($(this)[0])?(I(t("tech_electricity_msg"),"info",!1,["progress"]),e.city.power=0,e.city.powered=!0,e.city.coal_power={count:0,on:0},e.settings.showPowerGrid=!0,Va(),!0):!1}},matter_replicator:{id:"tech-matter_replicator",title(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator"):t("tech_replicator")},desc(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator"):t("tech_replicator")},category:"special",era:"discovery",reqs:{high_tech:2},condition(){return!!(e.stats.achieve.adam_eve&&e.stats.achieve.adam_eve.l>=5)},not_trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge(){return 25e3}},effect(){return e.race.universe==="antimatter"&&!e.race.amexplode?t("tech_antireplicator_effect_alt"):t("tech_replicator_effect_alt")},action(){if(_($(this)[0])){if(e.race.universe==="antimatter"&&e.race.amexplode){se("annihilation"),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),$("body").addClass("nuke");let a=$('
');$("body").append(a),setTimeout(function(){a.addClass("burn")},500),setTimeout(function(){a.addClass("b")},600),setTimeout(function(){window.soft_reset()},4e3)}else e.race.replicator={res:"Stone",pow:1};return!0}return!1},post(){Te()}},industrialization:{id:"tech-industrialization",title:t("tech_industrialization"),desc:t("tech_industrialization"),category:"progress",era:"industrialized",reqs:{high_tech:2,cement:2,steel_container:1},grant:["high_tech",3],cost:{Knowledge(){return 25200}},effect:t("tech_industrialization_effect"),action(){return _($(this)[0])?(e.resource.Titanium.display=!0,e.city.factory={count:0,on:0,Lux:0,Furs:0,Alloy:0,Polymer:0,Nano:0,Stanene:0},!0):!1},post(){De()}},electronics:{id:"tech-electronics",title:t("tech_electronics"),desc:t("tech_electronics"),category:"progress",era:"industrialized",reqs:{high_tech:3,titanium:1},grant:["high_tech",4],cost:{Knowledge(){return 5e4}},effect:t("tech_electronics_effect"),action(){return _($(this)[0])?(e.race.terrifying&&(e.tech.gambling=1,e.city.casino={count:0,on:0},e.space.spc_casino={count:0,on:0}),!0):!1}},fission:{id:"tech-fission",title:t("tech_fission"),desc:t("tech_fission"),category:"progress",era:"globalized",reqs:{high_tech:4,uranium:1},grant:["high_tech",5],cost:{Knowledge(){return 77400},Uranium(){return 10}},effect:t("tech_fission_effect"),action(){return _($(this)[0])?(I(t("tech_fission_msg"),"info",!1,["progress"]),e.city.fission_power={count:0,on:0},!0):!1}},arpa:{id:"tech-arpa",title:t("tech_arpa"),desc:t("tech_arpa_desc"),category:"arpa",era:"globalized",reqs:{high_tech:5},grant:["high_tech",6],cost:{Knowledge(){return 9e4}},effect:t("tech_arpa_effect"),action(){return _($(this)[0])?(e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.race.truepath&&!e.tech.unify&&(e.tech.unify=1),!0):!1},post(){ye("Physics")}},rocketry:{id:"tech-rocketry",title:t("tech_rocketry"),desc:t("tech_rocketry"),category:"arpa",era:"globalized",reqs:{high_tech:6},grant:["high_tech",7],cost:{Knowledge(){return 112500},Oil(){return e.city.ptrait.includes("dense")?8e3:6800}},effect:t("tech_rocketry_effect"),action(){return _($(this)[0])?(e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[yt(3)]),"info",!1,["progress","combat"])),!0):!1},post(){ye("Physics")}},robotics:{id:"tech-robotics",title:t("tech_robotics"),desc:t("tech_robotics"),category:"progress",era:"globalized",reqs:{high_tech:7},grant:["high_tech",8],cost:{Knowledge(){return 125e3}},effect:t("tech_robotics_effect"),action(){return!!_($(this)[0])}},lasers:{id:"tech-lasers",title:t("tech_lasers"),desc:t("tech_lasers_desc"),category:"progress",era:"deep_space",reqs:{high_tech:8,space:3,supercollider:1,elerium:1},grant:["high_tech",9],cost:{Knowledge(){return 28e4},Elerium(){return 100}},effect:t("tech_lasers_effect"),action(){return _($(this)[0])?(e.race.cataclysm&&L("iron_will",!1,3),!0):!1}},artifical_intelligence:{id:"tech-artifical_intelligence",title:t("tech_artificial_intelligence"),desc:t("tech_artificial_intelligence"),category:"progress",era:"deep_space",reqs:{high_tech:9},grant:["high_tech",10],cost:{Knowledge(){return 325e3}},effect:t("tech_artificial_intelligence_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_artificial_intelligence_flair")}},quantum_computing:{id:"tech-quantum_computing",title:t("tech_quantum_computing"),desc:t("tech_quantum_computing"),category:"progress",era:"deep_space",reqs:{high_tech:10,nano:1},grant:["high_tech",11],cost:{Knowledge(){return 435e3},Elerium(){return 250},Nano_Tube(){return 1e5}},effect:t("tech_quantum_computing_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_quantum_computing_flair")}},virtual_reality:{id:"tech-virtual_reality",title:t("tech_virtual_reality"),desc:t("tech_virtual_reality"),category:"progress",era:"interstellar",reqs:{high_tech:11,alpha:2,infernite:1,stanene:1},grant:["high_tech",12],cost:{Knowledge(){return 6e5},Stanene(){return 1250},Soul_Gem(){return 1}},effect:t("tech_virtual_reality_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_virtual_reality_flair")}},plasma:{id:"tech-plasma",title:t("tech_plasma"),desc:t("tech_plasma"),category:"progress",era:"interstellar",path:["standard","truepath"],reqs:{high_tech:12},grant:["high_tech",13],cost:{Knowledge(){return 755e3},Infernite(){return e.race.truepath?0:1e3},Stanene(){return e.race.truepath?1e6:25e4}},effect:t("tech_plasma_effect"),action(){return!!_($(this)[0])}},shields:{id:"tech-shields",title:t("tech_shields"),desc:t("tech_shields"),category:"stellar_engine",era:"interstellar",reqs:{high_tech:13},grant:["high_tech",14],cost:{Knowledge(){return 85e4}},effect:t("tech_shields_effect"),action(){return _($(this)[0])?(e.settings.space.neutron=!0,e.settings.space.blackhole=!0,!0):!1}},ai_core:{id:"tech-ai_core",title:t("tech_ai_core"),desc:t("tech_ai_core"),category:"ai_core",era:"interstellar",reqs:{high_tech:14,science:15,blackhole:3},grant:["high_tech",15],cost:{Knowledge(){return 15e5}},effect:t("tech_ai_core_effect"),action(){return _($(this)[0])?(e.interstellar.citadel={count:0,on:0},!0):!1}},metaphysics:{id:"tech-metaphysics",title:t("tech_metaphysics"),desc:t("tech_metaphysics"),category:"progress",era:"intergalactic",reqs:{high_tech:15,xeno:5},grant:["high_tech",16],cost:{Knowledge(){return 5e6},Vitreloy(){return 1e4},Soul_Gem(){return 10}},effect(){return t("tech_metaphysics_effect")},action(){return!!_($(this)[0])}},orichalcum_analysis:{id:"tech-orichalcum_analysis",title:t("tech_orichalcum_analysis"),desc:t("tech_orichalcum_analysis"),category:"progress",era:"intergalactic",reqs:{high_tech:16,chthonian:3},grant:["high_tech",17],cost:{Knowledge(){return 122e5},Orichalcum(){return 1e5}},effect(){return t("tech_orichalcum_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_orichalcum_analysis_result"),"info",!1,["progress"]),!0):!1}},cybernetics:{id:"tech-cybernetics",title:t("tech_cybernetics"),desc:t("tech_cybernetics"),category:"progress",era:"dimensional",reqs:{high_tech:17,hell_ruins:4},grant:["high_tech",18],cost:{Knowledge(){return 25e6},Adamantite(){return 125e5},Stanene(){return 5e7},Vitreloy(){return 1e7}},effect(){return t("tech_cybernetics_effect")},action(){return!!_($(this)[0])}},blood_pact:{id:"tech-blood_pact",title:t("tech_blood_pact"),desc:t("tech_blood_pact"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:18,b_stone:1},grant:["b_stone",2],cost:{Knowledge(){return 52e6},Blood_Stone(){return 1}},effect(){return t("tech_blood_pact_effect")},action(){return _($(this)[0])?(e.settings.arpa.blood=!0,ye("Crispr"),!0):!1},post(){ye("Blood")}},purify:{id:"tech-purify",title:t("tech_purify"),desc:t("tech_purify"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:3,b_stone:2},grant:["b_stone",3],cost:{Knowledge(){return 525e5},Blood_Stone(){return 1}},effect(){return t("tech_purify_effect")},action(){return!!_($(this)[0])}},waygate:{id:"tech-waygate",title:t("tech_waygate"),desc:t("tech_waygate"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2},grant:["waygate",1],cost:{Knowledge(){return 55e6}},effect(){return t("tech_waygate_effect")},action(){return _($(this)[0])?(e.portal.waygate={count:0,progress:0,on:0},!0):!1}},demonic_infusion:{id:"tech-demonic_infusion",title:t("tech_demonic_infusion"),desc:t("tech_demonic_infusion"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2,waygate:3},grant:["waygate",4],not_trait:["witch_hunter","fasting"],cost:{Species(){return sr(1e3)},Knowledge(){return 55e6},Demonic_Essence(){return 1}},effect(){return`
${t("tech_demonic_infusion_effect")}
${t("tech_demonic_infusion_effect2",[ke("descend").artifact])}
`},action(){return Jt($(this)[0])&&mi(),!1}},gate_key:{id:"tech-gate_key",title:t("tech_gate_key"),desc:t("tech_gate_key"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:1},grant:["hell_gate",2],cost:{Knowledge(){return 3e7}},effect(){return t("tech_gate_key_effect")},action(){return _($(this)[0])?(e.portal.west_tower={count:0,on:0},e.portal.east_tower={count:0,on:0},!0):!1}},gate_turret:{id:"tech-gate_turret",title:t("tech_gate_turret"),desc:t("tech_gate_turret"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:2},grant:["hell_gate",3],cost:{Knowledge(){return 32e6}},effect(){return t("tech_gate_turret_effect")},action(){return _($(this)[0])?(e.portal.gate_turret={count:0,on:0},!0):!1}},infernite_mine:{id:"tech-infernite_mine",title:t("tech_infernite_mine"),desc:t("tech_infernite_mine"),category:"hell_dimension",era:"dimensional",reqs:{hell_gate:3},grant:["hell_gate",4],cost:{Knowledge(){return 325e5}},effect(){return t("tech_infernite_mine_effect")},action(){return _($(this)[0])?(e.portal.infernite_mine={count:0,on:0},!0):!1}},study_corrupt_gem:{id:"tech-study_corrupt_gem",title:t("tech_study_corrupt_gem"),desc:t("tech_study_corrupt_gem"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],trait:["witch_hunter"],cost:{Mana(){return e.race.no_plasmid?1e4:3e4},Knowledge(){return 185e5},Corrupt_Gem(){return 1}},effect(){return t("tech_study_corrupt_gem_effect")},action(){return _($(this)[0])?(I(t("tech_study_corrupt_gem_result"),"info",!1,["progress","hell"]),e.resource.Corrupt_Gem.display=!1,!0):!1}},soul_binding:{id:"tech-soul_binding",title:t("tech_soul_binding"),desc:t("tech_soul_binding"),category:"hell_dimension",era:"intergalactic",reqs:{corrupt:2,science:19},grant:["forbidden",1],trait:["witch_hunter"],cost:{Knowledge(){return 19e6}},effect(){return t("tech_soul_binding_effect")},action(){return!!_($(this)[0])}},soul_capacitor:{id:"tech-soul_capacitor",title:t("tech_soul_capacitor"),desc:t("tech_soul_capacitor"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:1},grant:["forbidden",2],trait:["witch_hunter"],cost:{Knowledge(){return 195e5}},effect(){return t("tech_soul_capacitor_effect")},action(){return _($(this)[0])?(e.portal.soul_capacitor={count:0,on:0,energy:0,ecap:0},!0):!1}},absorption_chamber:{id:"tech-absorption_chamber",title:t("tech_absorption_chamber"),desc:t("tech_absorption_chamber"),category:"hell_dimension",era:"intergalactic",reqs:{forbidden:2},grant:["forbidden",3],trait:["witch_hunter"],cost:{Knowledge(){return 2e7}},effect(){return t("tech_absorption_chamber_effect")},action(){return _($(this)[0])?(e.portal.absorption_chamber={count:0},!0):!1}},corrupt_gem_analysis:{id:"tech-corrupt_gem_analysis",title:t("tech_corrupt_gem_analysis"),desc:t("tech_corrupt_gem_analysis"),category:"hell_dimension",era:"dimensional",reqs:{high_tech:16,corrupt:1},grant:["corrupt",2],not_trait:["witch_hunter"],cost:{Species(){return 1},Knowledge(){return 22e6},Corrupt_Gem(){return 1}},effect(){return t("tech_corrupt_gem_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_corrupt_gem_analysis_result"),"info",!1,["progress","hell"]),e.resource.Corrupt_Gem.display=!1,!0):!1}},hell_search:{id:"tech-hell_search",title:t("tech_hell_search"),desc:t("tech_hell_search"),category:"hell_dimension",era:"dimensional",reqs:{corrupt:2},grant:["hell_ruins",1],cost:{Knowledge(){return 221e5},Structs(){return{portal:{sensor_drone:{s:"prtl_badlands",count:25,on:25}}}}},effect(){return t("tech_hell_search_effect")},action(){return _($(this)[0])?(I(t("tech_hell_search_result"),"info",!1,["progress","hell"]),e.settings.portal.ruins=!0,e.settings.portal.gate=!0,e.portal.guard_post={count:0,on:0,support:0,s_max:0},!0):!1}},codex_infernium:{id:"tech-codex_infernium",title:t("tech_codex_infernium"),desc:t("tech_codex_infernium"),category:"progress",era:"dimensional",reqs:{hell_ruins:3},grant:["hell_ruins",4],cost:{Knowledge(){return 235e5},Codex(){return 1}},effect(){return t("tech_codex_infernium_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!1,!0):!1}},lake_analysis:{id:"tech-lake_analysis",title:t("tech_lake_analysis"),desc:t("tech_lake_analysis"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:2},grant:["hell_lake",3],cost:{Knowledge(){return 34e6}},effect(){return t("tech_lake_analysis_effect")},action(){return _($(this)[0])?(e.race.fasting&&e.tech.dish>=1&&I(t("tech_lake_analysis_fasting"),"info",!1,["progress","hell"]),!0):!1}},lake_threat:{id:"tech-lake_threat",title:t("tech_lake_threat"),desc:t("tech_lake_threat"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:3},grant:["hell_lake",4],cost:{Knowledge(){return 345e5}},effect(){return t("tech_lake_threat_effect")},action(){return _($(this)[0])?(e.portal.bireme={count:0,on:0,crew:0,mil:0},I(t("tech_lake_threat_result"),"info",!1,["progress","hell"]),!0):!1}},lake_transport:{id:"tech-lake_transport",title:t("tech_lake_transport"),desc:t("tech_lake_transport"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:4},grant:["hell_lake",5],cost:{Knowledge(){return 35e6}},effect(){return t("tech_lake_transport_effect")},action(){return _($(this)[0])?(e.portal.transport={count:0,on:0,crew:0,mil:0,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}},!0):!1}},cooling_tower:{id:"tech-cooling_tower",title:t("tech_cooling_tower"),desc:t("tech_cooling_tower"),category:"hell_dimension",era:"dimensional",reqs:{hell_lake:5},grant:["hell_lake",6],cost:{Knowledge(){return 375e5}},effect(){return t("tech_cooling_tower_effect")},action(){return _($(this)[0])?(e.portal.cooling_tower={count:0,on:0},!0):!1}},miasma:{id:"tech-miasma",title:t("tech_miasma"),desc:t("tech_miasma"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:2},grant:["hell_spire",3],cost:{Knowledge(){return 3825e4}},effect(){return t("tech_miasma_effect")},action(){return _($(this)[0])?(e.portal.port={count:0},!0):!1}},incorporeal:{id:"tech-incorporeal",title:t("tech_incorporeal"),desc:t("tech_incorporeal"),category:"special",era:"intergalactic",reqs:{science:19},grant:["ascension",1],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge(){return 175e5},Phage(){return 25}},effect(){return t("tech_incorporeal_effect")},action(){return!!_($(this)[0])}},tech_ascension:{id:"tech-tech_ascension",title:t("tech_ascension"),desc:t("tech_ascension"),category:"special",era:"intergalactic",reqs:{ascension:1},grant:["ascension",2],not_trait:["orbit_decay","witch_hunter"],cost:{Knowledge(){return 185e5},Plasmid(){return 100}},effect(){return t("tech_ascension_effect")},action(){return _($(this)[0])?(e.settings.space.sirius=!0,!0):!1}},terraforming:{id:"tech-terraforming",title:t("tech_terraforming"),desc:t("tech_terraforming"),category:"special",era:"intergalactic",reqs:{science:19},path:["standard"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge(){return 18e6}},effect(){return t("tech_terraforming_effect",[S().red])},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},cement_processing:{id:"tech-cement_processing",title:t("tech_cement_processing"),desc:t("tech_cement_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},not_trait:["flier"],grant:["ai_core",1],cost:{Knowledge(){return 175e4}},effect:t("tech_cement_processing_effect"),action(){return!!_($(this)[0])}},adamantite_processing_flier:{id:"tech-adamantite_processing_flier",title:t("tech_adamantite_processing"),desc:t("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{high_tech:15},trait:["flier"],grant:["ai_core",2],cost:{Knowledge(){return 2e6}},effect:t("tech_adamantite_processing_effect"),action(){return!!_($(this)[0])}},adamantite_processing:{id:"tech-adamantite_processing",title:t("tech_adamantite_processing"),desc:t("tech_adamantite_processing"),category:"ai_core",era:"interstellar",reqs:{ai_core:1},not_trait:["flier"],grant:["ai_core",2],cost:{Knowledge(){return 2e6}},effect:t("tech_adamantite_processing_effect"),action(){return!!_($(this)[0])}},graphene_processing:{id:"tech-graphene_processing",title:t("tech_graphene_processing"),desc:t("tech_graphene_processing"),category:"ai_core",era:"intergalactic",reqs:{ai_core:2},grant:["ai_core",3],cost:{Knowledge(){return 25e5}},effect:t("tech_graphene_processing_effect"),action(){return!!_($(this)[0])}},fusion_power:{id:"tech-fusion_power",title:t("tech_fusion_power"),desc:t("tech_fusion_power"),category:"power_generation",era:"interstellar",reqs:{ram_scoop:1},grant:["fusion",1],cost:{Knowledge(){return 64e4}},effect:t("tech_fusion_power_effect"),action(){return _($(this)[0])?(e.interstellar.fusion={count:0,on:0},!0):!1}},infernium_power:{id:"tech-infernium_power",title:t("tech_infernium_power"),desc:t("tech_infernium_power"),category:"power_generation",era:"dimensional",reqs:{smelting:8,hell_ruins:4},grant:["inferno_power",1],cost:{Knowledge(){return 3e7}},effect:t("tech_infernium_power_effect"),action(){return _($(this)[0])?(e.portal.inferno_power={count:0,on:0},!0):!1}},thermomechanics:{id:"tech-thermomechanics",title:t("tech_thermomechanics"),desc:t("tech_thermomechanics_desc"),category:"crafting",era:"industrialized",reqs:{high_tech:4},grant:["alloy",1],cost:{Knowledge(){return 6e4}},effect(){return t("tech_thermomechanics_effect")},action(){return!!_($(this)[0])}},quantum_manufacturing:{id:"tech-quantum_manufacturing",title:t("tech_quantum_manufacturing"),desc:t("tech_quantum_manufacturing"),category:"crafting",era:"deep_space",reqs:{high_tech:11},grant:["q_factory",1],cost:{Knowledge(){return 465e3}},effect:t("tech_quantum_manufacturing_effect"),action(){return!!_($(this)[0])}},worker_drone:{id:"tech-worker_drone",title:t("tech_worker_drone"),desc:t("tech_worker_drone"),category:"mining",era:"deep_space",reqs:{nano:1},grant:["drone",1],cost:{Knowledge(){return 4e5}},effect(){return t("tech_worker_drone_effect",[S().gas_moon])},action(){return _($(this)[0])?(e.space.drone={count:0},!0):!1}},uranium:{id:"tech-uranium",title:t("tech_uranium"),desc:t("tech_uranium"),category:"power_generation",era:"globalized",reqs:{high_tech:4},grant:["uranium",1],cost:{Knowledge(){return 72e3}},effect:t("tech_uranium_effect"),action(){return _($(this)[0])?(e.resource.Uranium.display=!0,!0):!1},post(){De()}},uranium_storage:{id:"tech-uranium_storage",title:t("tech_uranium_storage"),desc:t("tech_uranium_storage"),category:"storage",era:"globalized",reqs:{uranium:1},grant:["uranium",2],cost:{Knowledge(){return 75600},Alloy(){return 2500}},effect:t("tech_uranium_storage_effect"),action(){return!!_($(this)[0])}},uranium_ash:{id:"tech-uranium_ash",title:t("tech_uranium_ash"),desc:t("tech_uranium_ash"),category:"power_generation",era:"globalized",reqs:{uranium:2},grant:["uranium",3],cost:{Knowledge(){return 122e3}},effect:t("tech_uranium_ash_effect"),action(){return!!_($(this)[0])}},breeder_reactor:{id:"tech-breeder_reactor",title:t("tech_breeder_reactor"),desc:t("tech_breeder_reactor"),category:"power_generation",era:"early_space",reqs:{high_tech:5,uranium:3,space:3},grant:["uranium",4],cost:{Knowledge(){return 16e4},Uranium(){return 250},Iridium(){return 1e3}},effect:t("tech_breeder_reactor_effect"),action(){return!!_($(this)[0])}},mine_conveyor:{id:"tech-mine_conveyor",title:t("tech_mine_conveyor"),desc:t("tech_mine_conveyor"),category:"mining",era:"discovery",reqs:{high_tech:2},grant:["mine_conveyor",1],cost:{Knowledge(){return 16200},Copper(){return 2250},Steel(){return 1750}},effect:t("tech_mine_conveyor_effect"),action(){return!!_($(this)[0])}},oil_well:{id:"tech-oil_well",title:t("tech_oil_well"),desc:t("tech_oil_well"),category:"power_generation",era:"industrialized",reqs:{high_tech:3},grant:["oil",1],cost:{Knowledge(){return 27e3}},effect:t("tech_oil_well_effect"),action(){return _($(this)[0])?(e.city.oil_well={count:0},!0):!1}},oil_depot:{id:"tech-oil_depot",title:t("tech_oil_depot"),desc:t("tech_oil_depot"),category:"storage",era:"industrialized",reqs:{oil:1},grant:["oil",2],cost:{Knowledge(){return 32e3}},effect:t("tech_oil_depot_effect"),action(){return _($(this)[0])?(e.city.oil_depot={count:0},!0):!1}},oil_power:{id:"tech-oil_power",title(){return e.race.environmentalist?t("city_wind_power"):t("tech_oil_power")},desc(){return e.race.environmentalist?t("city_wind_power"):t("tech_oil_power")},category:"power_generation",era:"industrialized",reqs:{oil:2},grant:["oil",3],cost:{Knowledge(){return 44e3}},effect(){return e.race.environmentalist?t("tech_wind_power_effect"):t("tech_oil_power_effect")},action(){return _($(this)[0])?(e.city.oil_power={count:0,on:0},!0):!1}},titanium_drills:{id:"tech-titanium_drills",title:t("tech_titanium_drills"),desc:t("tech_titanium_drills"),category:"power_generation",era:"industrialized",reqs:{oil:3},grant:["oil",4],cost:{Knowledge(){return 54e3},Titanium(){return 3500}},effect:t("tech_titanium_drills_effect"),action(){return!!_($(this)[0])}},alloy_drills:{id:"tech-alloy_drills",title:t("tech_alloy_drills"),desc:t("tech_alloy_drills"),category:"power_generation",era:"globalized",reqs:{oil:4},grant:["oil",5],cost:{Knowledge(){return 77e3},Alloy(){return 1e3}},effect:t("tech_alloy_drills_effect"),action(){return!!_($(this)[0])}},fracking:{id:"tech-fracking",title:t("tech_fracking"),desc:t("tech_fracking"),category:"power_generation",era:"globalized",reqs:{oil:5,high_tech:6},grant:["oil",6],cost:{Knowledge(){return 132e3}},effect:t("tech_fracking_effect"),action(){return!!_($(this)[0])}},mythril_drills:{id:"tech-mythril_drills",title:t("tech_mythril_drills"),desc:t("tech_mythril_drills"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["oil",7],cost:{Knowledge(){return 165e3},Mythril(){return 100}},effect:t("tech_mythril_drills_effect"),action(){return!!_($(this)[0])}},mass_driver:{id:"tech-mass_driver",title:t("tech_mass_driver"),desc:t("tech_mass_driver"),category:"power_generation",era:"early_space",reqs:{oil:6,space:3},grant:["mass",1],cost:{Knowledge(){return 16e4}},effect:t("tech_mass_driver_effect"),action(){return _($(this)[0])?(e.city.mass_driver={count:0,on:0},!0):!1}},orichalcum_driver:{id:"tech-orichalcum_driver",title:t("tech_orichalcum_driver"),desc:t("tech_orichalcum_driver"),category:"science",era:"intergalactic",reqs:{mass:1,science:19},grant:["mass",2],not_trait:["orbit_decayed"],cost:{Knowledge(){return 14e6},Orichalcum(){return 4e5}},effect(){return t("tech_orichalcum_driver_effect")},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},polymer:{id:"tech-polymer",title:t("tech_polymer"),desc:t("tech_polymer"),category:"crafting",era:"globalized",reqs:{genetics:1},grant:["polymer",1],cost:{Knowledge(){return 8e4},Oil(){return 5e3},Alloy(){return 450}},effect:t("tech_polymer_effect"),action(){return _($(this)[0])?(e.resource.Polymer.display=!0,I(t("tech_polymer_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},fluidized_bed_reactor:{id:"tech-fluidized_bed_reactor",title:t("tech_fluidized_bed_reactor"),desc:t("tech_fluidized_bed_reactor"),category:"crafting",era:"globalized",reqs:{polymer:1,high_tech:6},grant:["polymer",2],cost:{Knowledge(){return 99e3}},effect:t("tech_fluidized_bed_reactor_effect"),action(){return!!_($(this)[0])}},synthetic_fur:{id:"tech-synthetic_fur",title(){return e.race.evil?t("tech_faux_leather"):t("tech_synthetic_fur")},desc(){return e.race.evil?t("tech_faux_leather"):t("tech_synthetic_fur")},category:"crafting",era:"globalized",reqs:{polymer:1},grant:["synthetic_fur",1],cost:{Knowledge(){return 1e5},Polymer(){return 2500}},effect(){return e.race.evil?t("tech_faux_leather_effect"):t("tech_synthetic_fur_effect")},action(){return!!_($(this)[0])},post(){Pe()}},nanoweave:{id:"tech-nanoweave",title:t("tech_nanoweave"),desc:t("tech_nanoweave"),category:"crafting",era:"intergalactic",reqs:{science:18},grant:["nanoweave",1],cost:{Knowledge(){return 85e5},Nano_Tube(){return 5e6},Vitreloy(){return 25e4}},effect:t("tech_nanoweave_effect"),action(){return _($(this)[0])?(e.resource.Nanoweave.display=!0,I(t("tech_nanoweave_avail"),"info",!1,["progress"]),Xe(),!0):!1},post(){De()}},stanene:{id:"tech-stanene",title:t("tech_stanene"),desc:t("tech_stanene"),category:"crafting",era:"interstellar",reqs:{infernite:1},grant:["stanene",1],cost:{Knowledge(){return 59e4},Aluminium(){return 5e5},Infernite(){return 1e3}},effect:t("tech_stanene_effect"),action(){return _($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},nano_tubes:{id:"tech-nano_tubes",title:t("tech_nano_tubes"),desc:t("tech_nano_tubes"),category:"crafting",era:"deep_space",reqs:{high_tech:10},grant:["nano",1],cost:{Knowledge(){return 375e3},Coal(){return 1e5},Neutronium(){return 1e3}},effect:t("tech_nano_tubes_effect"),action(){return _($(this)[0])?(e.resource.Nano_Tube.display=!0,I(t("tech_nano_tubes_msg"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},scarletite:{id:"tech-scarletite",title:t("tech_scarletite"),desc:t("tech_scarletite"),category:"crafting",era:"dimensional",reqs:{hell_ruins:4},grant:["scarletite",1],cost:{Knowledge(){return 2675e4},Iron(){return 1e8},Adamantite(){return 15e6},Orichalcum(){return 8e6}},effect:t("tech_scarletite_effect"),action(){if(_($(this)[0])){if(e.resource.Scarletite.display=!0,e.portal.hell_forge={count:0,on:0},I(t("tech_scarletite_avail"),"info",!1,["progress"]),Xe(),e.race.universe!=="micro"&&!e.pillars[e.race.species])e.tech.fusable=1;else{let a=dt();a>e.pillars[e.race.species]&&(e.pillars[e.race.species]=a),e.tech.pillars=2}return!0}return!1},post(){De()}},pillars:{id:"tech-pillars",title:t("tech_pillars"),desc:t("tech_pillars"),category:"hell_dimension",era:"dimensional",reqs:{scarletite:1,fusable:1},grant:["pillars",1],cost:{Knowledge(){return 3e7}},effect:t("tech_pillars_effect"),action(){return _($(this)[0])?(I(t("tech_pillars_msg",[x[e.race.species].entity]),"info",!1,["progress","hell"]),!0):!1}},reclaimer:{id:"tech-reclaimer",title:t("tech_reclaimer"),desc:t("tech_reclaimer_desc"),category:"reclaimer",era:"civilized",reqs:{primitive:3},grant:["reclaimer",1],trait:["evil"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 45},Lumber(){return 20},Stone(){return 20}},effect:t("tech_reclaimer_effect"),action(){return _($(this)[0])?(e.civic.lumberjack.name=t("job_reclaimer"),e.civic.lumberjack.display=!0,e.city.graveyard={count:0},!0):!1}},shovel:{id:"tech-shovel",title:t("tech_shovel"),desc:t("tech_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:1,mining:2},grant:["reclaimer",2],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_shovel_effect"),action(){return!!_($(this)[0])}},iron_shovel:{id:"tech-iron_shovel",title:t("tech_iron_shovel"),desc:t("tech_iron_shovel"),category:"reclaimer",era:"civilized",reqs:{reclaimer:2,mining:3},grant:["reclaimer",3],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 2700},Iron(){return 250}},effect:t("tech_iron_shovel_effect"),action(){return!!_($(this)[0])}},steel_shovel:{id:"tech-steel_shovel",title:t("tech_steel_shovel"),desc:t("tech_steel_shovel"),category:"reclaimer",era:"discovery",reqs:{reclaimer:3,smelting:2},grant:["reclaimer",4],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_shovel_effect"),action(){return!!_($(this)[0])}},titanium_shovel:{id:"tech-titanium_shovel",title:t("tech_titanium_shovel"),desc:t("tech_titanium_shovel"),category:"reclaimer",era:"industrialized",reqs:{reclaimer:4,high_tech:3},grant:["reclaimer",5],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 38e3},Titanium(){return 350}},effect:t("tech_titanium_shovel_effect"),action(){return!!_($(this)[0])}},alloy_shovel:{id:"tech-alloy_shovel",title:t("tech_alloy_shovel"),desc:t("tech_alloy_shovel"),category:"reclaimer",era:"globalized",reqs:{reclaimer:5,high_tech:4},grant:["reclaimer",6],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 67500},Alloy(){return 750}},effect:t("tech_alloy_shovel_effect"),action(){return!!_($(this)[0])}},mythril_shovel:{id:"tech-mythril_shovel",title:t("tech_mythril_shovel"),desc:t("tech_mythril_shovel"),category:"reclaimer",era:"early_space",reqs:{reclaimer:6,space:3},grant:["reclaimer",7],trait:["evil"],not_trait:["living_tool"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 16e4},Mythril(){return 880}},effect:t("tech_mythril_shovel_effect"),action(){return!!_($(this)[0])}},adamantite_shovel:{id:"tech-adamantite_shovel",title:t("tech_adamantite_shovel"),desc:t("tech_adamantite_shovel"),category:"reclaimer",era:"interstellar",reqs:{reclaimer:7,alpha:2},grant:["reclaimer",8],trait:["evil"],condition(){return e.race.kindling_kindred||e.race.smoldering?!1:e.race.species==="wendigo"?!0:!e.race.soul_eater},cost:{Knowledge(){return 525e3},Adamantite(){return 1e4}},effect:t("tech_adamantite_shovel_effect"),action(){return!!_($(this)[0])}},stone_axe:{id:"tech-stone_axe",title(){return t("tech_stone_axe")},desc(){return t("tech_stone_axe_desc")},category:"lumber_gathering",reqs:{primitive:3},era:"civilized",grant:["axe",1],not_trait:["kindling_kindred","smoldering","evil","cataclysm"],cost:{Knowledge(){return 45},Lumber(){return 20},Stone(){return 20}},effect(){return e.race.living_tool?t("tech_basic_livingtools"):e.race.sappy?t("tech_amber_axe_effect"):t("tech_stone_axe_effect")},action(){return _($(this)[0])?(e.civic.lumberjack.display=!0,e.city.lumber_yard={count:0},!0):!1}},copper_axes:{id:"tech-copper_axes",title:t("tech_copper_axes"),desc:t("tech_copper_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:2},not_trait:["living_tool"],grant:["axe",2],cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_copper_axes_effect"),action(){return!!_($(this)[0])}},iron_saw:{id:"tech-iron_saw",title:t("tech_iron_saw"),desc:t("tech_iron_saw_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:1,mining:3},grant:["saw",1],not_trait:["lone_survivor"],cost:{Knowledge(){return 3375},Iron(){return 400}},effect:t("tech_iron_saw_effect"),action(){return _($(this)[0])?(e.city.sawmill={count:0,on:0},!0):!1}},steel_saw:{id:"tech-steel_saw",title:t("tech_steel_saw"),desc:t("tech_steel_saw_desc"),category:"lumber_gathering",era:"discovery",reqs:{smelting:2,saw:1},grant:["saw",2],cost:{Knowledge(){return 10800},Steel(){return 400}},effect:t("tech_steel_saw_effect"),action(){return!!_($(this)[0])}},iron_axes:{id:"tech-iron_axes",title:t("tech_iron_axes"),desc:t("tech_iron_axes_desc"),category:"lumber_gathering",era:"civilized",reqs:{axe:2,mining:3},not_trait:["living_tool"],grant:["axe",3],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1350:2700},Iron(){return 250}},effect:t("tech_iron_axes_effect"),action(){return!!_($(this)[0])}},steel_axes:{id:"tech-steel_axes",title:t("tech_steel_axes"),desc:t("tech_steel_axes_desc"),category:"lumber_gathering",era:"discovery",reqs:{axe:3,smelting:2},not_trait:["living_tool"],grant:["axe",4],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_axes_effect"),action(){return!!_($(this)[0])}},titanium_axes:{id:"tech-titanium_axes",title:t("tech_titanium_axes"),desc:t("tech_titanium_axes_desc"),category:"lumber_gathering",era:"industrialized",reqs:{axe:4,high_tech:3},not_trait:["living_tool"],grant:["axe",5],cost:{Knowledge(){return 38e3},Titanium(){return 350}},effect:t("tech_titanium_axes_effect"),action(){return!!_($(this)[0])}},chainsaws:{id:"tech-chainsaws",title:t("tech_chainsaws"),desc:t("tech_chainsaws_desc"),category:"lumber_gathering",era:"interstellar",reqs:{axe:5,alpha:2},not_trait:["living_tool"],grant:["axe",6],cost:{Knowledge(){return 56e4},Oil(){return 1e4},Adamantite(){return 2e3}},effect:t("tech_chainsaws_effect"),action(){return!!_($(this)[0])},flair(){return`
${t("tech_chainsaws_flair1")}
${t("tech_chainsaws_flair2")}
`}},copper_sledgehammer:{id:"tech-copper_sledgehammer",title:t("tech_copper_sledgehammer"),desc:t("tech_copper_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",1],cost:{Knowledge(){return 540},Copper(){return 25}},effect:t("tech_copper_sledgehammer_effect"),action(){return!!_($(this)[0])}},iron_sledgehammer:{id:"tech-iron_sledgehammer",title:t("tech_iron_sledgehammer"),desc:t("tech_iron_sledgehammer_desc"),category:"stone_gathering",era:"civilized",reqs:{hammer:1,mining:3},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1350:2700},Iron(){return 250}},effect:t("tech_iron_sledgehammer_effect"),action(){return!!_($(this)[0])}},steel_sledgehammer:{id:"tech-steel_sledgehammer",title:t("tech_steel_sledgehammer"),desc:t("tech_steel_sledgehammer_desc"),category:"stone_gathering",era:"discovery",reqs:{hammer:2,smelting:2},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",3],cost:{Knowledge(){return 7200},Steel(){return 250}},effect:t("tech_steel_sledgehammer_effect"),action(){return!!_($(this)[0])}},titanium_sledgehammer:{id:"tech-titanium_sledgehammer",title:t("tech_titanium_sledgehammer"),desc:t("tech_titanium_sledgehammer_desc"),category:"stone_gathering",era:"industrialized",reqs:{hammer:3,high_tech:3},not_trait:["cataclysm","sappy","living_tool"],grant:["hammer",4],cost:{Knowledge(){return 4e4},Titanium(){return 400}},effect:t("tech_titanium_sledgehammer_effect"),action(){return!!_($(this)[0])}},copper_pickaxe:{id:"tech-copper_pickaxe",title:t("tech_copper_pickaxe"),desc:t("tech_copper_pickaxe_desc"),category:"mining",era:"civilized",reqs:{mining:2},not_trait:["cataclysm","living_tool"],grant:["pickaxe",1],cost:{Knowledge(){return 675},Copper(){return 25}},effect:t("tech_copper_pickaxe_effect"),action(){return!!_($(this)[0])}},iron_pickaxe:{id:"tech-iron_pickaxe",title:t("tech_iron_pickaxe"),desc:t("tech_iron_pickaxe_desc"),category:"mining",era:"civilized",reqs:{pickaxe:1,mining:3},not_trait:["cataclysm","living_tool"],grant:["pickaxe",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1600:3200},Iron(){return 250}},effect:t("tech_iron_pickaxe_effect"),action(){return!!_($(this)[0])}},steel_pickaxe:{id:"tech-steel_pickaxe",title:t("tech_steel_pickaxe"),desc:t("tech_steel_pickaxe_desc"),category:"mining",era:"discovery",reqs:{pickaxe:2,smelting:2},not_trait:["living_tool"],grant:["pickaxe",3],cost:{Knowledge(){return 9e3},Steel(){return 250}},effect:t("tech_steel_pickaxe_effect"),action(){return!!_($(this)[0])}},jackhammer:{id:"tech-jackhammer",title:t("tech_jackhammer"),desc:t("tech_jackhammer_desc"),category:"mining",era:"discovery",reqs:{pickaxe:3,high_tech:2},not_trait:["living_tool"],grant:["pickaxe",4],cost:{Knowledge(){return 22500},Copper(){return 5e3}},effect:t("tech_jackhammer_effect"),action(){return!!_($(this)[0])}},jackhammer_mk2:{id:"tech-jackhammer_mk2",title:t("tech_jackhammer_mk2"),desc:t("tech_jackhammer_mk2"),category:"mining",era:"globalized",reqs:{pickaxe:4,high_tech:4},not_trait:["living_tool"],grant:["pickaxe",5],cost:{Knowledge(){return 67500},Titanium(){return 2e3},Alloy(){return 500}},effect:t("tech_jackhammer_mk2_effect"),action(){return!!_($(this)[0])}},adamantite_hammer:{id:"tech-adamantite_hammer",title:t("tech_adamantite_hammer"),desc:t("tech_adamantite_hammer"),category:"mining",era:"interstellar",reqs:{pickaxe:5,alpha:2},not_trait:["living_tool"],grant:["pickaxe",6],cost:{Knowledge(){return 535e3},Adamantite(){return 12500}},effect:t("tech_adamantite_hammer_effect"),action(){return!!_($(this)[0])}},copper_hoe:{id:"tech-copper_hoe",title:t("tech_copper_hoe"),desc:t("tech_copper_hoe_desc"),category:"agriculture",era:"civilized",reqs:{mining:2,agriculture:1},not_trait:["cataclysm","living_tool"],grant:["hoe",1],cost:{Knowledge(){return 720},Copper(){return 50}},effect:t("tech_copper_hoe_effect"),action(){return!!_($(this)[0])}},iron_hoe:{id:"tech-iron_hoe",title:t("tech_iron_hoe"),desc:t("tech_iron_hoe_desc"),category:"agriculture",era:"civilized",reqs:{hoe:1,mining:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",2],cost:{Knowledge(){return e.city.ptrait.includes("unstable")?1800:3600},Iron(){return 500}},effect:t("tech_iron_hoe_effect"),action(){return!!_($(this)[0])}},steel_hoe:{id:"tech-steel_hoe",title:t("tech_steel_hoe"),desc:t("tech_steel_hoe_desc"),category:"agriculture",era:"discovery",reqs:{hoe:2,smelting:2,agriculture:1},not_trait:["living_tool"],grant:["hoe",3],cost:{Knowledge(){return 12600},Steel(){return 500}},effect:t("tech_steel_hoe_effect"),action(){return!!_($(this)[0])}},titanium_hoe:{id:"tech-titanium_hoe",title:t("tech_titanium_hoe"),desc:t("tech_titanium_hoe_desc"),category:"agriculture",era:"industrialized",reqs:{hoe:3,high_tech:3,agriculture:1},not_trait:["living_tool"],grant:["hoe",4],cost:{Knowledge(){return 44e3},Titanium(){return 500}},effect:t("tech_titanium_hoe_effect"),action(){return!!_($(this)[0])}},adamantite_hoe:{id:"tech-adamantite_hoe",title:t("tech_adamantite_hoe"),desc:t("tech_adamantite_hoe_desc"),category:"agriculture",era:"interstellar",reqs:{hoe:4,alpha:2},not_trait:["living_tool"],grant:["hoe",5],cost:{Knowledge(){return 53e4},Adamantite(){return 1e3}},effect:t("tech_adamantite_hoe_effect"),action(){return!!_($(this)[0])}},cyber_limbs:{id:"tech-cyber_limbs",title:t("tech_cyber_limbs"),desc:t("tech_cyber_limbs"),category:"mining",era:"dimensional",reqs:{high_tech:18},grant:["cyber_worker",1],cost:{Knowledge(){return 27e6}},effect:t("tech_cyber_limbs_effect"),action(){return!!_($(this)[0])}},slave_pens:{id:"tech-slave_pens",title:t("tech_slave_pens"),desc:t("tech_slave_pens"),category:"slaves",era:"civilized",reqs:{military:1,mining:1},not_trait:["cataclysm","lone_survivor"],grant:["slaves",1],trait:["slaver"],cost:{Knowledge(){return 150}},effect:t("tech_slave_pens_effect"),action(){return _($(this)[0])?(e.city.slave_pen={count:0},e.resource.Slave.amount=0,!0):!1}},slave_market:{id:"tech-slave_market",title:t("tech_slave_market"),desc:t("tech_slave_market"),category:"slaves",era:"discovery",reqs:{slaves:1,high_tech:1},grant:["slaves",2],trait:["slaver"],cost:{Knowledge(){return 8e3}},effect:t("tech_slave_market_effect"),action(){return!!_($(this)[0])},post(){Te()}},ceremonial_dagger:{id:"tech-ceremonial_dagger",title:t("tech_ceremonial_dagger"),desc:t("tech_ceremonial_dagger"),category:"sacrifice",era:"civilized",reqs:{mining:1},grant:["sacrifice",1],trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],cost:{Knowledge(){return 60}},effect:t("tech_ceremonial_dagger_effect"),action(){return!!_($(this)[0])}},last_rites:{id:"tech-last_rites",title:t("tech_last_rites"),desc:t("tech_last_rites"),category:"sacrifice",era:"civilized",reqs:{sacrifice:1,theology:2},grant:["sacrifice",2],trait:["cannibalize"],cost:{Knowledge(){return 1e3}},effect:t("tech_last_rites_effect"),action(){return!!_($(this)[0])}},ancient_infusion:{id:"tech-ancient_infusion",title:t("tech_ancient_infusion"),desc:t("tech_ancient_infusion"),category:"sacrifice",era:"early_space",reqs:{sacrifice:2,theology:4},grant:["sacrifice",3],trait:["cannibalize"],cost:{Knowledge(){return 182e3}},effect:t("tech_ancient_infusion_effect"),action(){return!!_($(this)[0])}},garrison:{id:"tech-garrison",title:t("tech_garrison"),desc:t("tech_garrison_desc"),category:"military",era:"civilized",reqs:{science:1,housing:1},grant:["military",1],cost:{Knowledge(){return 70}},effect:t("tech_garrison_effect"),action(){return _($(this)[0])?(e.city.garrison={count:0,on:0},!0):!1}},mercs:{id:"tech-mercs",title:t("tech_mercs"),desc:t("tech_mercs_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["mercs",1],not_trait:["lone_survivor"],cost:{Money(){return 1e4},Knowledge(){return 4500}},effect:t("tech_mercs_effect"),action(){return _($(this)[0])?(e.civic.garrison.mercs=!0,!0):!1},post(){Te()}},signing_bonus:{id:"tech-signing_bonus",title:t("tech_signing_bonus"),desc:t("tech_signing_bonus_desc"),category:"military",era:"industrialized",reqs:{mercs:1,high_tech:3},grant:["mercs",2],cost:{Money(){return 5e4},Knowledge(){return 32e3}},effect:t("tech_signing_bonus_effect"),action(){return!!_($(this)[0])}},hospital:{id:"tech-hospital",title:t("tech_hospital"),desc:t("tech_hospital"),category:"military",era:"civilized",reqs:{military:1,alumina:1},grant:["medic",1],not_trait:["artifical"],cost:{Knowledge(){return 5e3}},effect:t("tech_hospital_effect"),action(){return _($(this)[0])?(e.city.hospital={count:0},!0):!1}},bac_tanks:{id:"tech-bac_tanks",title(){return e.race.artifical?t("tech_repair_subroutines"):t("tech_bac_tanks")},desc(){return e.race.artifical?t("tech_repair_subroutines"):t("tech_bac_tanks_desc")},category:"military",era:"interstellar",reqs:{medic:1,infernite:1},grant:["medic",2],cost:{Knowledge(){return 6e5},Infernite(){return 250}},effect(){return e.race.artifical?t("tech_repair_subroutines_effect"):t("tech_bac_tanks_effect")},action(){return!!_($(this)[0])}},boot_camp:{id:"tech-boot_camp",title:t("tech_boot_camp"),desc:t("tech_boot_camp_desc"),category:"military",era:"discovery",reqs:{high_tech:1},grant:["boot_camp",1],cost:{Knowledge(){return 8e3}},effect:t("tech_boot_camp_effect"),action(){return _($(this)[0])?(e.city.boot_camp={count:0},!0):!1}},vr_training:{id:"tech-vr_training",title:t("tech_vr_training"),desc:t("tech_vr_training"),category:"military",era:"interstellar",path:["standard","truepath"],reqs:{boot_camp:1,high_tech:12},not_trait:["cataclysm","lone_survivor"],grant:["boot_camp",2],cost:{Knowledge(){return 625e3}},effect(){return t("tech_vr_training_effect")},action(){return!!_($(this)[0])}},bows:{id:"tech-bows",title:t("tech_bows"),desc:t("tech_bows_desc"),category:"military",era:"civilized",reqs:{military:1},grant:["military",2],cost:{Knowledge(){return 225},Lumber(){return 250}},effect:t("tech_bows_effect"),action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},flintlock_rifle:{id:"tech-flintlock_rifle",title(){return e.race.universe==="magic"?t("tech_magic_arrow"):t("tech_flintlock_rifle")},desc(){return e.race.universe==="magic"?t("tech_magic_arrow"):t("tech_flintlock_rifle")},category:"military",era:"civilized",reqs:{military:2,explosives:1},grant:["military",3],cost:{Knowledge(){return 5400},Coal(){return e.race.universe==="magic"?0:750},Mana(){return e.race.universe==="magic"?100:0}},effect(){return e.race.universe==="magic"?t("tech_magic_arrow_effect"):t("tech_flintlock_rifle_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},machine_gun:{id:"tech-machine_gun",title(){return e.race.universe==="magic"?t("tech_fire_mage"):t("tech_machine_gun")},desc(){return e.race.universe==="magic"?t("tech_fire_mage"):t("tech_machine_gun")},category:"military",era:"industrialized",reqs:{military:3,oil:1},grant:["military",4],cost:{Mana(){return e.race.universe==="magic"?300:0},Knowledge(){return 33750},Oil(){return 1500}},effect(){return e.race.universe==="magic"?t("tech_fire_mage_effect"):t("tech_machine_gun_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},bunk_beds:{id:"tech-bunk_beds",title:t("tech_bunk_beds"),desc:t("tech_bunk_beds"),category:"military",era:"globalized",reqs:{military:4,high_tech:4},grant:["military",5],cost:{Knowledge(){return 76500},Furs(){return 25e3},Alloy(){return 3e3}},effect:t("tech_bunk_beds_effect"),action(){return!!_($(this)[0])}},rail_guns:{id:"tech-rail_guns",title(){return e.race.universe==="magic"?t("tech_lightning_caster"):t("tech_rail_guns")},desc(){return e.race.universe==="magic"?t("tech_lightning_caster"):t("tech_rail_guns")},category:"military",era:"early_space",reqs:{military:5,mass:1},grant:["military",6],cost:{Mana(){return e.race.universe==="magic"?450:0},Knowledge(){return 2e5},Iridium(){return 2500}},effect(){return e.race.universe==="magic"?t("tech_lightning_caster_effect"):t("tech_rail_guns_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},laser_rifles:{id:"tech-laser_rifles",title(){return e.race.universe==="magic"?t("tech_mana_rifles"):t("tech_laser_rifles")},desc(){return e.race.universe==="magic"?t("tech_mana_rifles"):t("tech_laser_rifles")},category:"military",era:"deep_space",reqs:{military:6,high_tech:9,elerium:1},grant:["military",7],cost:{Knowledge(){return 325e3},Elerium(){return 250}},effect(){return e.race.universe==="magic"?t("tech_mana_rifles_effect"):t("tech_laser_rifles_effect")},action(){return _($(this)[0])?(e.race.species==="sharkin"&&L("laser_shark"),!0):!1},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},plasma_rifles:{id:"tech-plasma_rifles",title(){return e.race.universe==="magic"?t("tech_focused_rifles"):t("tech_plasma_rifles")},desc(){return e.race.universe==="magic"?t("tech_focused_rifles"):t("tech_plasma_rifles")},category:"military",era:"interstellar",reqs:{military:7,high_tech:13},grant:["military",8],path:["standard","truepath"],cost:{Knowledge(){return 78e4},Elerium(){return e.race.truepath?1e3:500}},effect(){return e.race.universe==="magic"?t("tech_focused_rifles_effect"):t("tech_plasma_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},disruptor_rifles:{id:"tech-disruptor_rifles",title(){return e.race.universe==="magic"?t("tech_magic_missile"):t("tech_disruptor_rifles")},desc(){return e.race.universe==="magic"?t("tech_magic_missile"):t("tech_disruptor_rifles")},category:"military",era:"interstellar",reqs:{military:8,high_tech:14,science:15,infernite:1},grant:["military",9],cost:{Knowledge(){return 1e6},Infernite(){return 1e3}},effect(){return e.race.universe==="magic"?t("tech_magic_missile_effect"):t("tech_disruptor_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},gauss_rifles:{id:"tech-gauss_rifles",title(){return e.race.universe==="magic"?t("tech_magicword_kill"):t("tech_gauss_rifles")},desc(){return e.race.universe==="magic"?t("tech_magicword_kill"):t("tech_gauss_rifles")},category:"military",era:"intergalactic",reqs:{military:9,science:18},grant:["military",10],cost:{Knowledge(){return 95e5},Bolognium(){return 1e5}},effect(){return e.race.universe==="magic"?t("tech_magicword_kill_effect"):t("tech_gauss_rifles_effect")},action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},cyborg_soldiers:{id:"tech-cyborg_soldiers",title:t("tech_cyborg_soldiers"),desc:t("tech_cyborg_soldiers"),category:"military",era:"dimensional",reqs:{military:10,high_tech:18},grant:["military",11],cost:{Knowledge(){return 26e6},Adamantite(){return 8e6},Bolognium(){return 4e6},Orichalcum(){return 6e6}},effect:t("tech_cyborg_soldiers_effect"),action(){return!!_($(this)[0])},post(){C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update")}},space_marines:{id:"tech-space_marines",title:t("tech_space_marines"),desc:t("tech_space_marines_desc"),category:"military",era:"early_space",reqs:{space:3,mars:2},grant:["marines",1],cost:{Knowledge(){return 21e4}},effect(){return`
${t("tech_space_marines_effect",[S().red])}
`},action(){return _($(this)[0])?(e.space.space_barracks={count:0,on:0},!0):!1},flair:t("tech_space_marines_flair")},hammocks:{id:"tech-hammocks",title:t("tech_hammocks"),desc:t("tech_hammocks"),category:"military",era:"intergalactic",reqs:{marines:1,nanoweave:1},grant:["marines",2],cost:{Knowledge(){return 89e5},Nanoweave(){return 3e4}},effect(){return t("tech_hammocks_effect")},action(){return!!_($(this)[0])}},cruiser:{id:"tech-cruiser",title:t("tech_cruiser"),desc:t("tech_cruiser"),category:"military",era:"interstellar",reqs:{high_tech:14,proxima:2,aerogel:1},grant:["cruiser",1],cost:{Knowledge(){return 86e4}},effect:t("tech_cruiser_effect"),action(){return _($(this)[0])?(e.interstellar.cruiser={count:0,on:0},!0):!1}},armor:{id:"tech-armor",title:t("tech_armor"),desc:t("tech_armor_desc"),category:"military",era:"civilized",reqs:{military:1},not_trait:["apex_predator"],grant:["armor",1],cost:{Money(){return 250},Knowledge(){return 225},Furs(){return 250}},effect:t("tech_armor_effect"),action(){return!!_($(this)[0])}},plate_armor:{id:"tech-plate_armor",title:t("tech_plate_armor"),desc:t("tech_plate_armor_desc"),category:"military",era:"civilized",reqs:{armor:1,mining:3},grant:["armor",2],cost:{Knowledge(){return 3400},Iron(){return 600}},effect:t("tech_plate_armor_effect"),action(){return!!_($(this)[0])}},kevlar:{id:"tech-kevlar",title:t("tech_kevlar"),desc:t("tech_kevlar_desc"),category:"military",era:"globalized",reqs:{armor:2,polymer:1},grant:["armor",3],cost:{Knowledge(){return 86e3},Polymer(){return 750}},effect:t("tech_kevlar_effect"),action(){return!!_($(this)[0])}},nanoweave_vest:{id:"tech-nanoweave_vest",title:t("tech_nanoweave_vest"),desc:t("tech_nanoweave_vest"),category:"military",era:"intergalactic",reqs:{armor:3,nanoweave:1},grant:["armor",4],cost:{Knowledge(){return 925e4},Nanoweave(){return 75e3}},effect:t("tech_nanoweave_vest_effect"),action(){return!!_($(this)[0])}},laser_turret:{id:"tech-laser_turret",title:t("tech_laser_turret"),desc:t("tech_laser_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:9,portal:2},grant:["turret",1],cost:{Knowledge(){return 6e5},Elerium(){return 100}},effect(){return`
${t("tech_laser_turret_effect1")}
${t("tech_laser_turret_effect2")}
`},action(){return!!_($(this)[0])},post(){C({el:"#fort"},"update"),ba(!1,["portal-turret"])}},plasma_turret:{id:"tech-plasma_turret",title:t("tech_plasma_turret"),desc:t("tech_plasma_turret"),category:"hell_dimension",era:"interstellar",reqs:{high_tech:13,turret:1},grant:["turret",2],cost:{Knowledge(){return 76e4},Elerium(){return 350}},effect(){return`
${t("tech_plasma_turret_effect")}
${t("tech_laser_turret_effect2")}
`},action(){return!!_($(this)[0])},post(){C({el:"#fort"},"update"),ba(!1,["portal-turret"])}},black_powder:{id:"tech-black_powder",title(){return e.race.universe==="magic"?t("tech_magic_powder"):t("tech_black_powder")},desc(){return e.race.universe==="magic"?t("tech_magic_powder_desc"):t("tech_black_powder_desc")},category:"progress",era:"civilized",reqs:{mining:4},grant:["explosives",1],cost:{Knowledge(){return 4500},Mana(){return e.race.universe==="magic"?100:0},Crystal(){return e.race.universe==="magic"?250:0},Coal(){return e.race.universe==="magic"?300:500}},effect(){return e.race.universe==="magic"?t("tech_magic_powder_effect"):t("tech_black_powder_effect")},action(){return!!_($(this)[0])}},dynamite:{id:"tech-dynamite",title:t("tech_dynamite"),desc:t("tech_dynamite"),category:"mining",era:"civilized",reqs:{explosives:1},grant:["explosives",2],cost:{Knowledge(){return 4800},Coal(){return 750}},effect:t("tech_dynamite_effect"),action(){return!!_($(this)[0])}},anfo:{id:"tech-anfo",title:t("tech_anfo"),desc:t("tech_anfo"),category:"mining",era:"industrialized",reqs:{explosives:2,oil:1},grant:["explosives",3],cost:{Knowledge(){return 42e3},Oil(){return 2500}},effect:t("tech_anfo_effect"),action(){return!!_($(this)[0])}},mad:{id:"tech-mad",title:t("tech_mad"),desc:t("tech_mad_desc"),category:"special",era:"globalized",reqs:{uranium:1,explosives:3,high_tech:7},not_trait:["cataclysm","lone_survivor"],grant:["mad",1],condition(){return e.race.sludge?!1:e.race.truepath?!!e.tech.world_control:!0},cost:{Knowledge(){return 12e4},Oil(){return e.city.ptrait.includes("dense")?1e4:8500},Uranium(){return 1250}},effect(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("tech_mad_effect_easter"):t("tech_mad_effect")},action(){return _($(this)[0])?(e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?I(t("tech_mad_info_easter"),"info",!1,["progress"]):I(t("tech_mad_info"),"info",!1,["progress"]),e.civic.mad.display=!0,!0):!1}},cement:{id:"tech-cement",title:t("tech_cement"),desc:t("tech_cement_desc"),category:"cement",era:"civilized",reqs:{mining:1,storage:1,science:1},not_trait:["flier"],grant:["cement",1],cost:{Knowledge(){return 500}},effect:t("tech_cement_effect"),action(){return _($(this)[0])?(e.city.cement_plant={count:0,on:0},!0):!1}},rebar:{id:"tech-rebar",title:t("tech_rebar"),desc:t("tech_rebar"),category:"cement",era:"civilized",reqs:{mining:3,cement:1},not_trait:["flier"],grant:["cement",2],cost:{Knowledge(){return 3200},Iron(){return 750}},effect:t("tech_rebar_effect"),action(){return!!_($(this)[0])}},steel_rebar:{id:"tech-steel_rebar",title:t("tech_steel_rebar"),desc:t("tech_steel_rebar"),category:"cement",era:"civilized",reqs:{smelting:2,cement:2},not_trait:["flier"],grant:["cement",3],cost:{Knowledge(){return 6750},Steel(){return 750}},effect:t("tech_steel_rebar_effect"),action(){return!!_($(this)[0])}},portland_cement:{id:"tech-portland_cement",title:t("tech_portland_cement"),desc:t("tech_portland_cement"),category:"cement",era:"industrialized",reqs:{cement:3,high_tech:3},not_trait:["flier"],grant:["cement",4],cost:{Knowledge(){return 32e3}},effect:t("tech_portland_cement_effect"),action(){return!!_($(this)[0])}},screw_conveyor:{id:"tech-screw_conveyor",title:t("tech_screw_conveyor"),desc:t("tech_screw_conveyor"),category:"cement",era:"globalized",reqs:{cement:4,high_tech:4},not_trait:["flier"],grant:["cement",5],cost:{Knowledge(){return 72e3}},effect:t("tech_screw_conveyor_effect"),action(){return!!_($(this)[0])}},adamantite_screws:{id:"tech-adamantite_screws",title:t("tech_adamantite_screws"),desc:t("tech_adamantite_screws"),category:"cement",era:"interstellar",reqs:{cement:5,alpha:2},not_trait:["cataclysm","flier"],grant:["cement",6],cost:{Knowledge(){return 5e5},Adamantite(){return 1e4}},effect:t("tech_adamantite_screws_effect",[3]),action(){return!!_($(this)[0])}},hunter_process:{id:"tech-hunter_process",title:t("tech_hunter_process"),desc:t("tech_hunter_process"),category:"mining",era:"industrialized",reqs:{high_tech:3,smelting:2},grant:["titanium",1],cost:{Knowledge(){return 45e3},Titanium(){return 1e3}},effect:t("tech_hunter_process_effect"),action(){return _($(this)[0])?(e.resource.Titanium.value=Wa.Titanium,!0):!1}},kroll_process:{id:"tech-kroll_process",title:t("tech_kroll_process"),desc:t("tech_kroll_process"),category:"mining",era:"globalized",reqs:{titanium:1,high_tech:4},grant:["titanium",2],cost:{Knowledge(){return 78e3},Titanium(){return 1e4}},effect:t("tech_kroll_process_effect"),action(){return!!_($(this)[0])}},cambridge_process:{id:"tech-cambridge_process",title:t("tech_cambridge_process"),desc:t("tech_cambridge_process"),category:"mining",era:"early_space",reqs:{titanium:2,supercollider:1},grant:["titanium",3],cost:{Knowledge(){return 135e3},Titanium(){return 17500}},effect:t("tech_cambridge_process_effect"),action(){return!!_($(this)[0])}},pynn_partical:{id:"tech-pynn_partical",title:t("tech_pynn_partical"),desc:t("tech_pynn_partical"),category:"progress",era:"early_space",path:["standard"],reqs:{supercollider:1},grant:["particles",1],cost:{Knowledge(){return 1e5}},effect:t("tech_pynn_partical_effect"),action(){return!!_($(this)[0])}},matter_compression:{id:"tech-matter_compression",title:t("tech_matter_compression"),desc:t("tech_matter_compression"),category:"storage",era:"early_space",path:["standard"],reqs:{particles:1},grant:["particles",2],cost:{Knowledge(){return 112500}},effect:t("tech_matter_compression_effect"),action(){return!!_($(this)[0])}},higgs_boson:{id:"tech-higgs_boson",title:t("tech_higgs_boson"),desc:t("tech_higgs_boson"),category:"science",era:"early_space",path:["standard"],reqs:{particles:2,supercollider:2},grant:["particles",3],cost:{Knowledge(){return 125e3}},effect:t("tech_higgs_boson_effect"),action(){return!!_($(this)[0])}},dimensional_compression:{id:"tech-dimensional_compression",title:t("tech_dimensional_compression"),desc:t("tech_dimensional_compression"),category:"storage",era:"interstellar",reqs:{particles:3,science:11,supercollider:3},grant:["particles",4],cost:{Knowledge(){return 425e3}},effect:t("tech_dimensional_compression_effect"),action(){return!!_($(this)[0])}},theology:{id:"tech-theology",title:t("tech_theology"),desc:t("tech_theology"),category:"religion",era:"civilized",reqs:{theology:1,housing:1,cement:1},grant:["theology",2],cost:{Knowledge(){return 900}},effect:t("tech_theology_effect"),action(){return _($(this)[0])?(e.city.temple={count:0},e.race.magnificent&&(e.city.shrine={count:0,morale:0,metal:0,know:0,tax:0}),e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0),!0):!1}},fanaticism:{id:"tech-fanaticism",title:t("tech_fanaticism"),desc:t("tech_fanaticism"),category:"religion",era:"civilized",wiki:!e.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-anthropology")},cost:{Knowledge(){return 2500}},effect:`
${t("tech_fanaticism_effect")}
${t("tech_fanaticism_warning")}
`,action(){return _($(this)[0])?(e.tech.fanaticism=1,e.race.gods===e.race.species&&L("second_evolution"),ws(e.race.gods),!0):!1}},alt_fanaticism:{id:"tech-alt_fanaticism",title:t("tech_fanaticism"),desc:t("tech_fanaticism"),category:"religion",era:"civilized",wiki:!!e.genes.transcendence,reqs:{theology:2},grant:["fanaticism",1],gene:["transcendence"],cost:{Knowledge(){return 2500}},effect:`
${t("tech_fanaticism_effect")}
`,action(){return _($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),e.race.gods===e.race.species&&L("second_evolution"),ws(e.race.gods),!0):!1}},ancient_theology:{id:"tech-ancient_theology",title:t("tech_ancient_theology"),desc:t("tech_ancient_theology"),category:"religion",era:"early_space",reqs:{theology:3,mars:2},grant:["theology",4],condition(){return!!e.genes.ancients},cost:{Knowledge(){return 18e4}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity,r=e.race.gods!=="none"?x[e.race.gods.toLowerCase()].entity:x[e.race.species].entity;return t("tech_ancient_theology_effect",[a,r])},action(){return _($(this)[0])?(e.space.ziggurat={count:0},!0):!1}},study:{id:"tech-study",title:t("tech_study"),desc:t("tech_study_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-deify")},cost:{Knowledge(){return 195e3}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("tech_study_effect",[a])}
${t("tech_study_warning")}
`},action(){return _($(this)[0])?(e.tech.ancient_study=1,!0):!1}},encoding:{id:"tech-encoding",title:t("tech_encoding"),desc:t("tech_encoding_desc"),category:"religion",era:"deep_space",reqs:{ancient_study:1,mars:5},grant:["ancient_study",2],cost:{Knowledge(){return 268e3}},effect(){return`
${t("tech_encoding_effect")}
`},action(){return!!_($(this)[0])}},deify:{id:"tech-deify",title:t("tech_deify"),desc:t("tech_deify_desc"),category:"religion",era:"early_space",reqs:{theology:4},grant:["theology",5],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-study")},cost:{Knowledge(){return 195e3}},effect(){let a=e.race.old_gods!=="none"?x[e.race.old_gods.toLowerCase()].entity:x[e.race.species].entity;return`
${t("tech_deify_effect",[a])}
${t("tech_deify_warning")}
`},action(){return _($(this)[0])?(e.tech.ancient_deify=1,ws(e.race.old_gods),ye("Genetics"),!0):!1}},infusion:{id:"tech-infusion",title:t("tech_infusion"),desc:t("tech_infusion_desc"),category:"religion",era:"deep_space",reqs:{ancient_deify:1,mars:5},grant:["ancient_deify",2],cost:{Knowledge(){return 268e3}},effect(){return`
${t("tech_infusion_effect")}
`},action(){return!!_($(this)[0])}},indoctrination:{id:"tech-indoctrination",title:t("tech_indoctrination"),desc:t("tech_indoctrination"),category:"religion",era:"civilized",reqs:{fanaticism:1},grant:["fanaticism",2],cost:{Knowledge(){return 5e3}},effect:t("tech_indoctrination_effect"),action(){return!!_($(this)[0])},post(){e.race.terrifying&&(e.tech.fanaticism=3,le())}},missionary:{id:"tech-missionary",title:t("tech_missionary"),desc:t("tech_missionary"),category:"religion",era:"discovery",reqs:{fanaticism:2},not_trait:["terrifying"],grant:["fanaticism",3],cost:{Knowledge(){return 1e4}},effect:t("tech_missionary_effect"),action(){return!!_($(this)[0])}},zealotry:{id:"tech-zealotry",title:t("tech_zealotry"),desc:t("tech_zealotry"),category:"religion",era:"discovery",reqs:{fanaticism:3},grant:["fanaticism",4],cost:{Knowledge(){return 25e3}},effect:t("tech_zealotry_effect"),action(){return!!_($(this)[0])}},anthropology:{id:"tech-anthropology",title:t("tech_anthropology"),desc:t("tech_anthropology"),category:"religion",era:"civilized",wiki:!e.genes.transcendence,reqs:{theology:2},grant:["theology",3],not_gene:["transcendence"],no_queue(){return!!e.r_queue.queue.some(a=>a.id==="tech-fanaticism")},cost:{Knowledge(){return 2500}},effect:`
${t("tech_anthropology_effect")}
${t("tech_anthropology_warning")}
`,action(){return _($(this)[0])?(e.tech.anthropology=1,!0):!1}},alt_anthropology:{id:"tech-alt_anthropology",title:t("tech_anthropology"),desc:t("tech_anthropology"),category:"religion",era:"civilized",wiki:!!e.genes.transcendence,reqs:{theology:2},grant:["anthropology",1],gene:["transcendence"],cost:{Knowledge(){return 2500}},effect:`
${t("tech_anthropology_effect")}
`,action(){return _($(this)[0])?(e.tech.theology===2&&(e.tech.theology=3),!0):!1}},mythology:{id:"tech-mythology",title:t("tech_mythology"),desc:t("tech_mythology"),category:"religion",era:"civilized",reqs:{anthropology:1},grant:["anthropology",2],cost:{Knowledge(){return 5e3}},effect:t("tech_mythology_effect"),action(){return!!_($(this)[0])}},archaeology:{id:"tech-archaeology",title:t("tech_archaeology"),desc:t("tech_archaeology"),category:"science",era:"discovery",reqs:{anthropology:2},grant:["anthropology",3],cost:{Knowledge(){return 1e4}},effect:t("tech_archaeology_effect"),action(){return!!_($(this)[0])}},merchandising:{id:"tech-merchandising",title:t("tech_merchandising"),desc:t("tech_merchandising"),category:"banking",era:"discovery",reqs:{anthropology:3},grant:["anthropology",4],cost:{Knowledge(){return 25e3}},effect(){return e.race.truepath?t("tech_merchandising_effect_tp"):t("tech_merchandising_effect")},action(){return!!_($(this)[0])}},astrophysics:{id:"tech-astrophysics",title:t("tech_astrophysics"),desc:t("tech_astrophysics_desc"),category:"storage",era:"early_space",reqs:{space:2},grant:["space_explore",1],cost:{Knowledge(){return 125e3}},effect:t("tech_astrophysics_effect"),action(){return _($(this)[0])?(e.space.propellant_depot={count:0},!0):!1}},rover:{id:"tech-rover",title:t("tech_rover"),desc:t("tech_rover"),category:"space_exploration",era:"early_space",reqs:{space_explore:1},grant:["space_explore",2],cost:{Knowledge(){return 135e3},Alloy(){return 22e3},Polymer(){return 18e3},Uranium(){return 750}},effect:t("tech_rover_effect"),action(){return _($(this)[0])?(e.settings.space.moon=!0,e.space.moon_base={count:0,on:0,support:0,s_max:0},!0):!1}},probes:{id:"tech-probes",title:t("tech_probes"),desc:t("tech_probes"),category:"space_exploration",era:"early_space",reqs:{space_explore:2},grant:["space_explore",3],cost:{Knowledge(){return 168e3},Steel(){return 1e5},Iridium(){return 5e3},Uranium(){return 2250},Helium_3(){return 3500}},effect:t("tech_probes_effect"),action(){return _($(this)[0])?(e.settings.space.red=!0,e.settings.space.hell=!0,e.space.spaceport={count:0,on:0,support:0,s_max:0},!0):!1}},starcharts:{id:"tech-starcharts",title:t("tech_starcharts"),desc:t("tech_starcharts"),category:"space_exploration",era:"early_space",reqs:{space_explore:3,science:9},grant:["space_explore",4],cost:{Knowledge(){return 185e3}},effect:t("tech_starcharts_effect"),action(){return _($(this)[0])?(e.settings.space.gas=!0,e.settings.space.sun=!0,e.race.truepath&&(e.settings.showOuter=!0),e.space.swarm_control={count:0,support:0,s_max:0},!0):!1}},colonization:{id:"tech-colonization",title:t("tech_colonization"),desc(){return t("tech_colonization_desc",[S().red])},category:"agriculture",era:"early_space",reqs:{space:4,mars:1},grant:["mars",2],cost:{Knowledge(){return 172e3}},effect(){return t(e.race.artifical?"tech_colonization_artifical_effect":"tech_colonization_effect",[S().red])},action(){return _($(this)[0])?(e.space.biodome={count:0,on:0},!0):!1}},red_tower:{id:"tech-red_tower",title(){return t("tech_red_tower",[S().red])},desc(){return t("tech_red_tower",[S().red])},category:"space_exploration",era:"early_space",reqs:{mars:2},grant:["mars",3],cost:{Knowledge(){return 195e3}},effect(){return t("tech_red_tower_effect",[S().red])},action(){return _($(this)[0])?(e.space.red_tower={count:0,on:0},!0):!1}},space_manufacturing:{id:"tech-space_manufacturing",title:t("tech_space_manufacturing"),desc:t("tech_space_manufacturing_desc"),category:"crafting",era:"early_space",reqs:{mars:3},grant:["mars",4],cost:{Knowledge(){return 22e4}},effect(){return t("tech_space_manufacturing_effect",[S().red])},action(){return _($(this)[0])?(e.space.red_factory={count:0,on:0},!0):!1}},exotic_lab:{id:"tech-exotic_lab",title:t("tech_exotic_lab"),desc:t("tech_exotic_lab_desc"),category:"science",era:"deep_space",reqs:{mars:4,asteroid:5},grant:["mars",5],cost:{Knowledge(){return 25e4}},effect:t("tech_exotic_lab_effect"),action(){return _($(this)[0])?(e.space.exotic_lab={count:0,on:0},!0):!1}},hydroponics:{id:"tech-hydroponics",title:t("tech_hydroponics"),desc(){return t("tech_hydroponics")},category:"agriculture",era:"intergalactic",reqs:{mars:5,gateway:3},grant:["mars",6],cost:{Knowledge(){return 3e6},Bolognium(){return 5e5}},effect(){return t("tech_hydroponics_effect")},action(){return!!_($(this)[0])}},dyson_sphere:{id:"tech-dyson_sphere",title:t("tech_dyson_sphere"),desc:t("tech_dyson_sphere"),category:"power_generation",era:"early_space",reqs:{solar:1},grant:["solar",2],cost:{Knowledge(){return 195e3}},effect:t("tech_dyson_sphere_effect"),action(){return!!_($(this)[0])}},dyson_swarm:{id:"tech-dyson_swarm",title:t("tech_dyson_swarm"),desc:t("tech_dyson_swarm"),category:"power_generation",era:"early_space",reqs:{solar:2},grant:["solar",3],cost:{Knowledge(){return 21e4}},effect:t("tech_dyson_swarm_effect"),action(){return _($(this)[0])?(e.space.swarm_satellite={count:0},!0):!1}},swarm_plant:{id:"tech-swarm_plant",title:t("tech_swarm_plant"),desc:t("tech_swarm_plant"),category:"power_generation",era:"deep_space",reqs:{solar:3,hell:1,gas_moon:1},grant:["solar",4],cost:{Knowledge(){return 25e4}},effect(){return t("tech_swarm_plant_effect",[x[e.race.species].home,S().hell])},action(){return _($(this)[0])?(e.space.swarm_plant={count:0},!0):!1}},space_sourced:{id:"tech-space_sourced",title:t("tech_space_sourced"),desc:t("tech_space_sourced_desc"),category:"power_generation",era:"deep_space",reqs:{solar:4,asteroid:3},grant:["solar",5],cost:{Knowledge(){return 3e5}},effect:t("tech_space_sourced_effect"),action(){return!!_($(this)[0])}},swarm_plant_ai:{id:"tech-swarm_plant_ai",title:t("tech_swarm_plant_ai"),desc:t("tech_swarm_plant_ai"),category:"power_generation",era:"deep_space",reqs:{solar:4,high_tech:10},grant:["swarm",1],cost:{Knowledge(){return 335e3}},effect:t("tech_swarm_plant_ai_effect"),action(){return!!_($(this)[0])}},swarm_control_ai:{id:"tech-swarm_control_ai",title:t("tech_swarm_control_ai"),desc:t("tech_swarm_control_ai"),category:"power_generation",era:"deep_space",reqs:{swarm:1},grant:["swarm",2],cost:{Knowledge(){return 36e4}},effect:t("tech_swarm_control_ai_effect"),action(){return!!_($(this)[0])}},quantum_swarm:{id:"tech-quantum_swarm",title:t("tech_quantum_swarm"),desc:t("tech_quantum_swarm"),category:"power_generation",era:"deep_space",reqs:{swarm:2,high_tech:11},grant:["swarm",3],cost:{Knowledge(){return 45e4}},effect:t("tech_quantum_swarm_effect"),action(){return!!_($(this)[0])}},perovskite_cell:{id:"tech-perovskite_cell",title:t("tech_perovskite_cell"),desc:t("tech_perovskite_cell"),category:"power_generation",era:"interstellar",reqs:{swarm:3},grant:["swarm",4],path:["standard","truepath"],cost:{Knowledge(){return 525e3},Titanium(){return 1e5}},effect:t("tech_perovskite_cell_effect"),action(){return!!_($(this)[0])}},swarm_convection:{id:"tech-swarm_convection",title:t("tech_swarm_convection"),desc:t("tech_swarm_convection"),category:"power_generation",era:"interstellar",reqs:{swarm:4,stanene:1},grant:["swarm",5],path:["standard","truepath"],cost:{Knowledge(){return 725e3},Stanene(){return 1e5}},effect:t("tech_swarm_convection_effect"),action(){return!!_($(this)[0])}},orichalcum_panels:{id:"tech-orichalcum_panels",title:t("tech_orichalcum_panels"),desc:t("tech_orichalcum_panels"),category:"power_generation",era:"intergalactic",reqs:{high_tech:17,swarm:5},grant:["swarm",6],cost:{Knowledge(){return 14e6},Orichalcum(){return 125e3}},effect(){return t("tech_orichalcum_panels_effect")},action(){return!!_($(this)[0])}},dyson_net:{id:"tech-dyson_net",title:t("tech_dyson_net"),desc:t("tech_dyson_net"),category:"power_generation",era:"interstellar",reqs:{solar:3,proxima:2,stanene:1},grant:["proxima",3],cost:{Knowledge(){return 8e5}},effect:t("tech_dyson_net_effect"),action(){return _($(this)[0])?(e.interstellar.dyson={count:0},!0):!1}},dyson_sphere2:{id:"tech-dyson_sphere2",title:t("tech_dyson_sphere"),desc:t("tech_dyson_sphere"),category:"power_generation",era:"intergalactic",reqs:{proxima:3,piracy:1},grant:["dyson",1],cost:{Knowledge(){return 5e6}},effect:t("tech_dyson_sphere2_effect"),action(){return _($(this)[0])?(e.interstellar.dyson_sphere={count:0},!0):!1}},orichalcum_sphere:{id:"tech-orichalcum_sphere",title:t("tech_orichalcum_sphere"),desc:t("tech_orichalcum_sphere"),category:"power_generation",era:"intergalactic",reqs:{dyson:1,science:19},condition(){return!!(e.interstellar.dyson_sphere&&e.interstellar.dyson_sphere.count>=100)},grant:["dyson",2],cost:{Knowledge(){return 175e5},Orichalcum(){return 25e4}},effect:t("tech_orichalcum_sphere_effect"),action(){return _($(this)[0])?(e.interstellar.orichalcum_sphere={count:0},!0):!1}},gps:{id:"tech-gps",title:t("tech_gps"),desc:t("tech_gps"),category:"market",era:"early_space",reqs:{space_explore:1},not_trait:["terrifying"],grant:["satellite",1],cost:{Knowledge(){return 15e4}},effect:t("tech_gps_effect"),action(){return _($(this)[0])?(e.space.gps={count:0},!0):!1}},nav_beacon:{id:"tech-nav_beacon",title:t("tech_nav_beacon"),desc:t("tech_nav_beacon"),category:"space_exploration",era:"early_space",reqs:{luna:1},grant:["luna",2],cost:{Knowledge(){return 18e4}},effect:t("tech_nav_beacon_effect"),action(){return _($(this)[0])?(e.space.nav_beacon={count:0,on:0},!0):!1}},subspace_signal:{id:"tech-subspace_signal",title:t("tech_subspace_signal"),desc:t("tech_subspace_signal"),category:"space_exploration",era:"interstellar",reqs:{science:13,luna:2,stanene:1},grant:["luna",3],cost:{Knowledge(){return 7e5},Stanene(){return 125e3}},effect(){return t("tech_subspace_signal_effect",[S().red])},action(){return!!_($(this)[0])}},atmospheric_mining:{id:"tech-atmospheric_mining",title:t("tech_atmospheric_mining"),desc:t("tech_atmospheric_mining"),category:"power_generation",era:"early_space",reqs:{space:5},grant:["gas_giant",1],cost:{Knowledge(){return 19e4}},effect:t("tech_atmospheric_mining_effect"),action(){return _($(this)[0])?(e.space.gas_mining={count:0,on:0},e.space.gas_storage={count:0},!0):!1}},helium_attractor:{id:"tech-helium_attractor",title:t("tech_helium_attractor"),desc:t("tech_helium_attractor"),category:"power_generation",era:"deep_space",reqs:{gas_giant:1,elerium:1},grant:["helium",1],cost:{Knowledge(){return 29e4},Elerium(){return 250}},effect(){return t("tech_helium_attractor_effect",[S().gas])},action(){return!!_($(this)[0])}},ram_scoops:{id:"tech-ram_scoops",title:t("tech_ram_scoops"),desc:t("tech_ram_scoops"),category:"power_generation",era:"interstellar",reqs:{nebula:2},grant:["ram_scoop",1],cost:{Knowledge(){return 58e4}},effect(){return t("tech_ram_scoops_effect")},action(){return!!_($(this)[0])}},elerium_prospecting:{id:"tech-elerium_prospecting",title:t("tech_elerium_prospecting"),desc:t("tech_elerium_prospecting"),category:"space_mining",era:"interstellar",reqs:{nebula:2},grant:["nebula",3],cost:{Knowledge(){return 61e4}},effect(){return t("tech_elerium_prospecting_effect")},action(){return _($(this)[0])?(e.interstellar.elerium_prospector={count:0,on:0},!0):!1}},zero_g_mining:{id:"tech-zero_g_mining",title:t("tech_zero_g_mining"),desc:t("tech_zero_g_mining"),category:"space_mining",era:"early_space",reqs:{asteroid:1,high_tech:8},grant:["asteroid",2],cost:{Knowledge(){return 21e4}},effect:t("tech_zero_g_mining_effect"),action(){return _($(this)[0])?(e.space.space_station={count:0,on:0,support:0,s_max:0},e.space.iridium_ship={count:0,on:0},e.space.iron_ship={count:0,on:0},!0):!1}},elerium_mining:{id:"tech-elerium_mining",title:t("tech_elerium_mining"),desc:t("tech_elerium_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:4},grant:["asteroid",5],cost:{Knowledge(){return 235e3},Elerium(){return e.race.truepath?.5:1}},effect:t("tech_elerium_mining_effect"),action(){return _($(this)[0])?(e.space.elerium_ship={count:0,on:0},e.race.cataclysm&&L("iron_will",!1,2),!0):!1}},laser_mining:{id:"tech-laser_mining",title:t("tech_laser_mining"),desc:t("tech_laser_mining"),category:"space_mining",era:"deep_space",reqs:{asteroid:5,elerium:1,high_tech:9},grant:["asteroid",6],cost:{Knowledge(){return 35e4}},effect:t("tech_laser_mining_effect"),action(){return!!_($(this)[0])}},plasma_mining:{id:"tech-plasma_mining",title:t("tech_plasma_mining"),desc:t("tech_plasma_mining"),category:"space_mining",era:"interstellar",reqs:{asteroid:6,high_tech:13},grant:["asteroid",7],path:["standard","truepath"],cost:{Knowledge(){return 825e3}},effect:t("tech_plasma_mining_effect"),action(){return!!_($(this)[0])}},elerium_tech:{id:"tech-elerium_tech",title:t("tech_elerium_tech"),desc:t("tech_elerium_tech"),category:"space_mining",era:"deep_space",reqs:{asteroid:5},grant:["elerium",1],cost:{Knowledge(){return 275e3},Elerium(){return 20}},effect:t("tech_elerium_tech_effect"),action(){return!!_($(this)[0])}},elerium_reactor:{id:"tech-elerium_reactor",title:t("tech_elerium_reactor"),desc:t("tech_elerium_reactor"),category:"power_generation",era:"deep_space",reqs:{dwarf:1,elerium:1},grant:["elerium",2],cost:{Knowledge(){return 325e3},Elerium(){return 180}},effect:t("tech_elerium_reactor_effect"),action(){return _($(this)[0])?(e.space.e_reactor={count:0,on:0},!0):!1}},neutronium_housing:{id:"tech-neutronium_housing",title:t("tech_neutronium_housing"),desc:t("tech_neutronium_housing"),category:"housing",era:"deep_space",reqs:{gas_moon:1},grant:["space_housing",1],cost:{Knowledge(){return 275e3},Neutronium(){return 350}},effect(){return t("tech_neutronium_housing_effect",[S().red])},action(){return!!_($(this)[0])}},unification:{id:"tech-unification",title:t("tech_unification"),desc(){return t("tech_unification_desc",[x[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{mars:2},grant:["unify",1],cost:{Knowledge(){return 2e5}},effect:t("tech_unification_effect"),action(){return!!_($(this)[0])}},unification2:{id:"tech-unification2",title:t("tech_unification"),desc(){return t("tech_unification_desc",[x[e.race.species].home])},category:"special",era:"early_space",path:["standard"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let a=0;for(let r=0;r<3;r++)(e.civic.foreign[`gov${r}`].occ||e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)&&a++;return a===3}},effect(){let a=e.race.banana?`
${t("tech_unification_banana")}
`:"";return`
${t("tech_unification_effect2")}
${t("tech_unification_warning")}
${a}`},action(){return _($(this)[0])?(e.race.banana&&(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),delete e.race.banana),e.civic.foreign.gov0.occ&&e.civic.foreign.gov1.occ&&e.civic.foreign.gov2.occ&&L("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&L("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&L("syndicate"),e.stats.attacks===0&&L("pacifist"),ko(),!0):!1}},unite:{id:"tech-unite",title:t("tech_unite"),desc(){return t("tech_unite_desc")},category:"special",era:"globalized",path:["truepath"],reqs:{unify:1},grant:["unify",2],cost:{Bool(){let a=0;for(let r=0;r<3;r++)(e.civic.foreign[`gov${r}`].occ||e.civic.foreign[`gov${r}`].buy||e.civic.foreign[`gov${r}`].anx)&&a++;return a===3}},effect(){return`
${t("tech_unite_effect")}
${t("tech_unification_effect2")}
`},action(){return _($(this)[0])?(e.race.banana&&(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),delete e.race.banana),e.civic.foreign.gov0.occ&&e.civic.foreign.gov1.occ&&e.civic.foreign.gov2.occ&&L("world_domination"),e.civic.foreign.gov0.anx&&e.civic.foreign.gov1.anx&&e.civic.foreign.gov2.anx&&L("illuminati"),e.civic.foreign.gov0.buy&&e.civic.foreign.gov1.buy&&e.civic.foreign.gov2.buy&&L("syndicate"),e.stats.attacks===0&&L("pacifist"),ko(),e.race.truepath&&!e.tech.rival&&(e.tech.rival=1,I(t("civics_rival_unlocked",[yt(3)]),"info",!1,["progress","combat"])),!0):!1}},genesis:{id:"tech-genesis",title:t("tech_genesis"),desc:t("tech_genesis"),category:"special",era:"deep_space",reqs:{high_tech:10,genesis:1},grant:["genesis",2],cost:{Knowledge(){return 35e4}},effect:t("tech_genesis_effect"),action(){return!!_($(this)[0])}},star_dock:{id:"tech-star_dock",title:t("tech_star_dock"),desc:t("tech_star_dock"),category:"special",era:"deep_space",reqs:{genesis:2,space:5,high_tech:10},grant:["genesis",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 38e4}},effect:t("tech_star_dock_effect"),action(){return _($(this)[0])?(e.space.star_dock={count:0,ship:0,probe:0,template:e.race.species},!0):!1}},interstellar:{id:"tech-interstellar",title:t("tech_interstellar"),desc:t("tech_interstellar"),category:"space_exploration",era:"deep_space",reqs:{genesis:3},grant:["genesis",4],cost:{Knowledge(){return 4e5}},effect:t("tech_interstellar_effect"),action(){return _($(this)[0])?(e.starDock.probes={count:0},!0):!1}},genesis_ship:{id:"tech-genesis_ship",title(){return e.race.cataclysm?t("tech_generational_ship"):t("tech_genesis_ship")},desc(){return e.race.cataclysm?t("tech_generational_ship"):t("tech_genesis_ship")},category:"special",era:"deep_space",reqs:{genesis:4},grant:["genesis",5],cost:{Knowledge(){return 425e3}},effect(){return e.race.cataclysm?t("tech_generational_effect"):t("tech_genesis_ship_effect")},action(){return _($(this)[0])?(e.starDock.seeder={count:0},e.race.cataclysm&&L("iron_will",!1,4),!0):!1}},geck:{id:"tech-geck",title(){return t("tech_geck")},desc(){return t("tech_geck_desc")},category:"special",era:"deep_space",reqs:{genesis:5},grant:["geck",1],condition(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)},cost:{Knowledge(){return 5e5}},effect(){return t("tech_geck_effect")},action(){return _($(this)[0])?(e.starDock.geck={count:0},!0):!1}},genetic_decay:{id:"tech-genetic_decay",title:t("tech_genetic_decay"),desc:t("tech_genetic_decay"),category:"genes",era:"early_space",reqs:{decay:1},grant:["decay",2],cost:{Knowledge(){return 2e5}},effect:t("tech_genetic_decay_effect"),action(){return!!_($(this)[0])}},stabilize_decay:{id:"tech-stabilize_decay",title:t("tech_stabilize_decay"),desc:t("tech_stabilize_decay"),category:"genes",era:"dimensional",reqs:{decay:2,high_tech:18},grant:["decay",3],cost:{Knowledge(){return 5e7},Blood_Stone(){return 1}},effect:t("tech_stabilize_decay_effect"),action(){return!!_($(this)[0])}},tachyon:{id:"tech-tachyon",title:t("tech_tachyon"),desc:t("tech_tachyon"),category:"progress",era:"interstellar",reqs:{wsc:1},grant:["ftl",1],cost:{Knowledge(){return 435e3}},effect:t("tech_tachyon_effect"),action(){return!!_($(this)[0])}},warp_drive:{id:"tech-warp_drive",title:t("tech_warp_drive"),desc:t("tech_warp_drive"),category:"space_exploration",era:"interstellar",reqs:{ftl:1},grant:["ftl",2],cost:{Knowledge(){return 45e4}},effect:t("tech_warp_drive_effect"),action(){return _($(this)[0])?(e.settings.showDeep=!0,e.settings.space.alpha=!0,e.interstellar.starport={count:0,on:0,support:0,s_max:0},!0):!1}},habitat:{id:"tech-habitat",title:t("tech_habitat"),desc:t("tech_habitat_desc"),category:"housing",era:"interstellar",reqs:{alpha:2,droids:1},grant:["alpha",3],cost:{Knowledge(){return 48e4}},effect:t("tech_habitat_effect"),action(){return _($(this)[0])?(e.interstellar.habitat={count:0,on:0},!0):!1}},graphene:{id:"tech-graphene",title:t("tech_graphene"),desc:t("tech_graphene"),category:"crafting",era:"interstellar",reqs:{alpha:3,infernite:1},grant:["graphene",1],cost:{Knowledge(){return 54e4},Adamantite(){return 1e4}},effect:t("tech_graphene_effect"),action(){return _($(this)[0])?(e.interstellar.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0):!1}},aerogel:{id:"tech-aerogel",title:t("tech_aerogel"),desc:t("tech_aerogel"),category:"crafting",era:"interstellar",reqs:{graphene:1,science:13},grant:["aerogel",1],cost:{Knowledge(){return 75e4},Graphene(){return 5e4},Infernite(){return 500}},effect:t("tech_aerogel_effect"),action(){return _($(this)[0])?(e.resource.Aerogel.display=!0,Xe(),!0):!1},post(){De()}},mega_manufacturing:{id:"tech-mega_manufacturing",title:t("tech_mega_manufacturing"),desc:t("tech_mega_manufacturing"),category:"crafting",era:"intergalactic",reqs:{high_tech:16,alpha:3},grant:["alpha",4],cost:{Knowledge(){return 565e4}},effect(){return t("tech_mega_manufacturing_effect")},action(){return _($(this)[0])?(e.interstellar.int_factory={count:0,on:0},!0):!1}},luxury_condo:{id:"tech-luxury_condo",title:t("tech_luxury_condo"),desc:t("tech_luxury_condo"),category:"housing",era:"intergalactic",reqs:{high_tech:17,alpha:4},grant:["alpha",5],cost:{Knowledge(){return 15e6}},effect(){return t("tech_luxury_condo_effect")},action(){return _($(this)[0])?(e.interstellar.luxury_condo={count:0,on:0},!0):!1}},stellar_engine:{id:"tech-stellar_engine",title:t("tech_stellar_engine"),desc:t("tech_stellar_engine"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:2},grant:["blackhole",3],cost:{Knowledge(){return 1e6}},effect:t("tech_stellar_engine_effect"),action(){return _($(this)[0])?(e.interstellar.stellar_engine={count:0,mass:8,exotic:0},!0):!1}},mass_ejector:{id:"tech-mass_ejector",title:t("tech_mass_ejector"),desc:t("tech_mass_ejector"),category:"stellar_engine",era:"interstellar",reqs:{blackhole:4},grant:["blackhole",5],cost:{Knowledge(){return 11e5}},effect:t("tech_mass_ejector_effect"),action(){return _($(this)[0])?(e.interstellar.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},!0):!1}},asteroid_redirect:{id:"tech-asteroid_redirect",title:t("tech_asteroid_redirect"),desc:t("tech_asteroid_redirect"),category:"stellar_engine",era:"intergalactic",reqs:{blackhole:5,gateway:3},grant:["blackhole",6],cost:{Knowledge(){return 35e5}},effect:t("tech_asteroid_redirect_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},exotic_infusion:{id:"tech-exotic_infusion",title:t("tech_exotic_infusion"),desc:t("tech_exotic_infusion"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["whitehole",2],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){return`
${t("tech_exotic_infusion_effect",[e.resource.Soul_Gem.name])}
${t("tech_exotic_infusion_effect2")}
`},action(){return!!Jt($(this)[0])},flair(){return t("tech_exotic_infusion_flair")}},infusion_check:{id:"tech-infusion_check",title:t("tech_infusion_check"),desc:t("tech_infusion_check"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:2},grant:["whitehole",3],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){return`
${t("tech_infusion_check_effect")}
${t("tech_exotic_infusion_effect2")}
`},action(){return!!Jt($(this)[0])},flair(){return t("tech_infusion_check_flair")}},infusion_confirm:{id:"tech-infusion_confirm",title:t("tech_infusion_confirm"),desc:t("tech_infusion_confirm"),category:"stellar_engine",era:"interstellar",reqs:{whitehole:3},grant:["whitehole",4],cost:{Knowledge(){return 15e5},Soul_Gem(){return 10}},effect(){let a=ke("bigbang"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`
${t("wiki_tech_infusion_confirm_gains",[a.plasmid,a.phage,a.dark,r])}
`;return`
${t("tech_infusion_confirm_effect")}
${t("tech_exotic_infusion_effect2")}
${i}`},action(){if(_($(this)[0])){if(e.tech.whitehole>=4)return;e.tech.whitehole=4;let a=$('
');return $("body").append(a),setTimeout(function(){a.addClass("burn")},125),setTimeout(function(){a.addClass("b")},150),setTimeout(function(){a.addClass("c")},2e3),setTimeout(function(){wc()},4e3),!1}return!1},flair(){return t("tech_infusion_confirm_flair")}},stabilize_blackhole:{id:"tech-stabilize_blackhole",title:t("tech_stabilize_blackhole"),desc(){return`
${t("tech_stabilize_blackhole")}
${t("tech_stabilize_blackhole2")}
`},category:"stellar_engine",era:"interstellar",reqs:{whitehole:1},grant:["stablized",1],cost:{Knowledge(){return 15e5},Neutronium(){return 2e4}},effect:t("tech_stabilize_blackhole_effect"),action(){if(_($(this)[0])){if(e.interstellar.stellar_engine.mass+=Re.Neutronium*2e4/1e10,e.interstellar.stellar_engine.mass+=e.interstellar.stellar_engine.exotic*40,e.interstellar.stellar_engine.exotic=0,delete e.tech.whitehole,e.race.banana&&e.interstellar.stellar_engine.mass>=12){let a=ue();e.stats.banana.b3[a]=!0,a!=="m"&&a!=="l"&&(e.stats.banana.b3.l=!0)}return!0}return!1}},veil:{id:"tech-veil",title:t("tech_veil"),desc:t("tech_veil"),category:"magic",era:"interstellar",reqs:{blackhole:2},condition(){return e.race.universe==="magic"},grant:["veil",1],cost:{Knowledge(){return 125e4}},effect:t("tech_veil_effect"),action(){return!!_($(this)[0])}},mana_syphon:{id:"tech-mana_syphon",title:t("tech_mana_syphon"),desc:t("tech_mana_syphon"),category:"magic",era:"interstellar",reqs:{veil:1},condition(){return e.race.universe==="magic"},grant:["veil",2],cost:{Knowledge(){return 15e5}},effect:t("tech_mana_syphon_effect"),action(){return!!_($(this)[0])},post(){ye("Physics")}},gravitational_waves:{id:"tech-gravitational_waves",title:t("tech_gravitational_waves"),desc:t("tech_gravitational_waves"),category:"power_generation",era:"interstellar",reqs:{blackhole:4},grant:["gravity",1],cost:{Knowledge(){return 125e4}},effect:t("tech_gravitational_waves_effect"),action(){return!!_($(this)[0])}},gravity_convection:{id:"tech-gravity_convection",title:t("tech_gravity_convection"),desc:t("tech_gravity_convection"),category:"power_generation",era:"interstellar",reqs:{gravity:1},grant:["gravity",2],cost:{Knowledge(){return 135e4}},effect:t("tech_gravity_convection_effect"),action(){return!!_($(this)[0])}},wormholes:{id:"tech-wormholes",title:t("tech_wormholes"),desc:t("tech_wormholes"),category:"space_exploration",era:"intergalactic",reqs:{gravity:1,science:15},grant:["stargate",1],cost:{Knowledge(){return 225e4}},effect:t("tech_wormholes_effect"),action(){return!!_($(this)[0])}},portal:{id:"tech-portal",title:t("tech_portal"),desc:t("tech_portal_desc"),category:"hell_dimension",era:"interstellar",reqs:{wsc:1},grant:["portal",1],cost:{Knowledge(){return 5e5}},effect:t("tech_portal_effect"),action(){return!!_($(this)[0])}},fortifications:{id:"tech-fortifications",title:t("tech_fort"),desc:t("tech_fort_desc"),category:"hell_dimension",era:"interstellar",reqs:{portal:1},grant:["portal",2],cost:{Knowledge(){return 55e4},Stone(){return 1e6}},effect:t("tech_fort_effect"),action(){return _($(this)[0])?(e.settings.showPortal=!0,e.settings.portal.fortress=!0,e.settings.msgFilters.hell.unlocked||(e.settings.msgFilters.hell.unlocked=!0,e.settings.msgFilters.hell.vis=!0),e.portal.fortress={threat:1e4,garrison:0,walls:100,repair:0,patrols:0,patrol_size:10,siege:999,notify:"Yes",s_ntfy:"Yes",nocrew:!1},e.portal.turret={count:0,on:0},e.portal.carport={count:0,damaged:0,repair:0},x[e.race.species].type==="demonic"?L("blood_war"):L("pandemonium"),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,surveyors: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,surveyors:0}}},graphID:0,graphs:{}},!0):!1},post(){$i()}},war_drones:{id:"tech-war_drones",title:t("tech_war_drones"),desc:t("tech_war_drones"),category:"hell_dimension",era:"interstellar",reqs:{portal:2,graphene:1},grant:["portal",3],cost:{Knowledge(){return 7e5}},effect:t("tech_war_drones_effect"),action(){return _($(this)[0])?(e.settings.portal.badlands=!0,e.portal.war_drone={count:0,on:0},!0):!1}},demon_attractor:{id:"tech-demon_attractor",title:t("tech_demon_attractor"),desc:t("tech_demon_attractor"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,stanene:1},grant:["portal",4],cost:{Knowledge(){return 745e3}},effect:t("tech_demon_attractor_effect"),action(){return _($(this)[0])?(e.portal.attractor={count:0,on:0},!0):!1}},combat_droids:{id:"tech-combat_droids",title:t("tech_combat_droids"),desc:t("tech_combat_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:4},grant:["portal",5],cost:{Knowledge(){return 762e3},Soul_Gem(){return 1}},effect:t("tech_combat_droids_effect"),action(){return _($(this)[0])?(e.portal.war_droid={count:0,on:0},!0):!1},flair(){return t("tech_combat_droids_flair")}},repair_droids:{id:"tech-repair_droids",title:t("tech_repair_droids"),desc:t("tech_repair_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5},grant:["portal",6],cost:{Knowledge(){return 794e3},Soul_Gem(){return 1}},effect:t("tech_repair_droids_effect"),action(){return _($(this)[0])?(e.portal.repair_droid={count:0,on:0},!0):!1}},advanced_predators:{id:"tech-advanced_predators",title:t("tech_advanced_predators"),desc:t("tech_advanced_predators"),category:"hell_dimension",era:"intergalactic",reqs:{portal:6,xeno:4},grant:["portal",7],cost:{Knowledge(){return 5e6},Bolognium(){return 5e5},Vitreloy(){return 25e4}},effect:t("tech_advanced_predators_effect"),action(){return!!_($(this)[0])}},enhanced_droids:{id:"tech-enhanced_droids",title:t("tech_enhanced_droids"),desc:t("tech_enhanced_droids"),category:"hell_dimension",era:"interstellar",reqs:{portal:5,military:9},grant:["hdroid",1],cost:{Knowledge(){return 105e4}},effect:t("tech_enhanced_droids_effect"),action(){return!!_($(this)[0])}},sensor_drone:{id:"tech-sensor_drone",title:t("tech_sensor_drone"),desc:t("tech_sensor_drone"),category:"hell_dimension",era:"interstellar",reqs:{portal:3,infernite:1,stanene:1,graphene:1},grant:["infernite",2],cost:{Knowledge(){return 725e3}},effect:t("tech_sensor_drone_effect"),action(){return _($(this)[0])?(e.portal.sensor_drone={count:0,on:0},!0):!1}},map_terrain:{id:"tech-map_terrain",title:t("tech_map_terrain"),desc:t("tech_map_terrain"),category:"hell_dimension",era:"interstellar",reqs:{infernite:2},grant:["infernite",3],cost:{Knowledge(){return 948e3}},effect(){return t("tech_map_terrain_effect")},action(){return!!_($(this)[0])}},calibrated_sensors:{id:"tech-calibrated_sensors",title:t("tech_calibrated_sensors"),desc:t("tech_calibrated_sensors"),category:"hell_dimension",era:"interstellar",reqs:{infernite:3},grant:["infernite",4],cost:{Knowledge(){return 1125e3},Infernite(){return 3500}},effect(){return t("tech_calibrated_sensors_effect")},action(){return!!_($(this)[0])}},shield_generator:{id:"tech-shield_generator",title:t("tech_shield_generator"),desc:t("tech_shield_generator"),category:"hell_dimension",era:"intergalactic",reqs:{high_tech:14,gateway:3,infernite:4},grant:["infernite",5],cost:{Knowledge(){return 268e4},Bolognium(){return 75e3}},effect(){return t("tech_shield_generator_effect")},action(){return!!_($(this)[0])}},enhanced_sensors:{id:"tech-enhanced_sensors",title:t("tech_enhanced_sensors"),desc:t("tech_enhanced_sensors"),category:"hell_dimension",era:"intergalactic",reqs:{infernite:5,xeno:4},grant:["infernite",6],cost:{Knowledge(){return 475e4},Vitreloy(){return 25e3}},effect(){return t("tech_enhanced_sensors_effect")},action(){return!!_($(this)[0])}},xeno_linguistics:{id:"tech-xeno_linguistics",title:t("tech_xeno_linguistics"),desc:t("tech_xeno_linguistics"),category:"andromeda",era:"intergalactic",reqs:{xeno:1},grant:["xeno",2],cost:{Knowledge(){return 3e6}},effect(){return t("tech_xeno_linguistics_effect")},action(){return _($(this)[0])?(e.settings.space.gorddon=!0,!0):!1}},xeno_culture:{id:"tech-xeno_culture",title:t("tech_xeno_culture"),desc:t("tech_xeno_culture"),category:"progress",era:"intergalactic",reqs:{xeno:3},grant:["xeno",4],cost:{Knowledge(){return 34e5}},effect(){let a=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name,r=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].entity;return t("tech_xeno_culture_effect",[a,r])},action(){return _($(this)[0])?(e.galaxy.embassy={count:0,on:0},!0):!1}},cultural_exchange:{id:"tech-cultural_exchange",title:t("tech_cultural_exchange"),desc:t("tech_cultural_exchange"),category:"andromeda",era:"intergalactic",reqs:{xeno:5},grant:["xeno",6],cost:{Knowledge(){return 355e4}},effect(){let a=x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name;return t("tech_cultural_exchange_effect",[a])},action(){return _($(this)[0])?(e.galaxy.symposium={count:0,on:0},e.galaxy.dormitory={count:0,on:0},!0):!1}},shore_leave:{id:"tech-shore_leave",title:t("tech_shore_leave"),desc:t("tech_shore_leave"),category:"science",era:"intergalactic",reqs:{andromeda:3,xeno:6},grant:["xeno",7],cost:{Knowledge(){return 46e5}},effect(){return t("tech_shore_leave_effect")},action(){return!!_($(this)[0])}},xeno_gift:{id:"tech-xeno_gift",title:t("tech_xeno_gift"),desc:t("tech_xeno_gift"),category:"andromeda",era:"intergalactic",reqs:{high_tech:16,xeno:7},grant:["xeno",8],cost:{Knowledge(){return 65e5},Infernite(){return 125e3}},effect(){return t("tech_xeno_gift_effect")},action(){return _($(this)[0])?(e.galaxy.consulate={count:0},e.settings.space.alien1=!0,I(t("tech_xeno_gift_msg",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name]),"info",!1,["progress"]),!0):!1}},industrial_partnership:{id:"tech-industrial_partnership",title:t("tech_industrial_partnership"),desc(){return t("tech_industrial_partnership")},category:"andromeda",era:"intergalactic",reqs:{xeno:9},grant:["xeno",10],cost:{Knowledge(){return 725e4}},effect(){return t("tech_industrial_partnership_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.vitreloy_plant={count:0,on:0},!0):!1}},embassy_housing:{id:"tech-embassy_housing",title:t("tech_embassy_housing"),desc(){return t("tech_embassy_housing")},category:"andromeda",era:"intergalactic",reqs:{xeno:10,science:18},grant:["xeno",11],cost:{Knowledge(){return 1075e4}},effect(){return t("tech_embassy_housing_effect",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].name])},action(){return!!_($(this)[0])}},advanced_telemetry:{id:"tech-advanced_telemetry",title:t("tech_advanced_telemetry"),desc:t("tech_advanced_telemetry"),category:"science",era:"intergalactic",reqs:{xeno:5},grant:["telemetry",1],cost:{Knowledge(){return 42e5},Vitreloy(){return 1e4}},effect(){return t("tech_advanced_telemetry_effect")},action(){return!!_($(this)[0])}},defense_platform:{id:"tech-defense_platform",title:t("galaxy_defense_platform"),desc:t("galaxy_defense_platform"),category:"andromeda",era:"intergalactic",reqs:{stargate:5,piracy:1},grant:["stargate",6],cost:{Knowledge(){return 485e4}},effect:t("tech_defense_platform_effect"),action(){return _($(this)[0])?(e.galaxy.defense_platform={count:0,on:0},!0):!1}},scout_ship:{id:"tech-scout_ship",title:t("galaxy_scout_ship"),desc:t("galaxy_scout_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3},grant:["andromeda",1],cost:{Knowledge(){return 26e5}},effect(){return t("tech_scout_ship_effect")},action(){return _($(this)[0])?(e.galaxy.scout_ship={count:0,on:0,crew:0,mil:0},!0):!1}},corvette_ship:{id:"tech-corvette_ship",title:t("galaxy_corvette_ship"),desc:t("galaxy_corvette_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:1,xeno:1},grant:["andromeda",2],cost:{Knowledge(){return 32e5}},effect(){return t("tech_corvette_ship_effect")},action(){return _($(this)[0])?(e.galaxy.corvette_ship={count:0,on:0,crew:0,mil:0},!0):!1}},frigate_ship:{id:"tech-frigate_ship",title:t("galaxy_frigate_ship"),desc:t("galaxy_frigate_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:2,xeno:6},grant:["andromeda",3],cost:{Knowledge(){return 4e6}},effect(){return t("tech_frigate_ship_effect")},action(){return _($(this)[0])?(e.galaxy.frigate_ship={count:0,on:0,crew:0,mil:0},ut(),!0):!1}},cruiser_ship:{id:"tech-cruiser_ship",title:t("galaxy_cruiser_ship"),desc:t("galaxy_cruiser_ship"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:3,xeno:10},grant:["andromeda",4],cost:{Knowledge(){return 75e5}},effect(){return t("tech_cruiser_ship_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.cruiser_ship={count:0,on:0,crew:0,mil:0},e.galaxy.foothold={count:0,on:0,support:0,s_max:0},e.settings.space.alien2=!0,ut(),!0):!1}},dreadnought:{id:"tech-dreadnought",title:t("galaxy_dreadnought"),desc:t("galaxy_dreadnought"),category:"andromeda_ships",era:"intergalactic",reqs:{andromeda:4,science:18},grant:["andromeda",5],cost:{Knowledge(){return 1e7}},effect(){return t("tech_dreadnought_effect")},action(){return _($(this)[0])?(e.galaxy.dreadnought={count:0,on:0,crew:0,mil:0},ut(),!0):!1}},ship_dock:{id:"tech-ship_dock",title:t("galaxy_ship_dock"),desc:t("galaxy_ship_dock"),category:"andromeda_ships",era:"intergalactic",reqs:{gateway:3,xeno:6},grant:["gateway",4],cost:{Knowledge(){return 39e5}},effect(){return t("tech_ship_dock_effect")},action(){return _($(this)[0])?(e.galaxy.ship_dock={count:0,on:0},!0):!1}},ore_processor:{id:"tech-ore_processor",title:t("galaxy_ore_processor"),desc:t("galaxy_ore_processor"),category:"space_mining",era:"intergalactic",reqs:{conflict:2},grant:["conflict",3],cost:{Knowledge(){return 75e5}},effect(){return t("tech_ore_processor_effect")},action(){return _($(this)[0])?(e.galaxy.ore_processor={count:0,on:0},!0):!1}},scavenger:{id:"tech-scavenger",title:t("galaxy_scavenger"),desc:t("galaxy_scavenger"),category:"science",era:"intergalactic",reqs:{conflict:3},grant:["conflict",4],cost:{Knowledge(){return 8e6}},effect(){return t("tech_scavenger_effect",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].name])},action(){return _($(this)[0])?(e.galaxy.scavenger={count:0,on:0,crew:0},!0):!1}},coordinates:{id:"tech-coordinates",title:t("tech_coordinates"),desc:t("tech_coordinates"),category:"andromeda",era:"intergalactic",reqs:{science:18,conflict:5},grant:["chthonian",1],cost:{Knowledge(){return 1e7}},effect(){return t("tech_coordinates_effect")},action(){return _($(this)[0])?(e.galaxy.minelayer={count:0,on:0,crew:0,mil:0},e.settings.space.chthonian=!0,!0):!1}},chthonian_survey:{id:"tech-chthonian_survey",title:t("tech_chthonian_survey"),desc:t("tech_chthonian_survey"),category:"space_mining",era:"intergalactic",reqs:{chthonian:2},grant:["chthonian",3],cost:{Knowledge(){return 118e5}},effect(){return t("tech_chthonian_survey_effect")},action(){return _($(this)[0])?(e.resource.Orichalcum.display=!0,e.galaxy.excavator={count:0,on:0},e.galaxy.raider={count:0,on:0,crew:0,mil:0},I(t("tech_chthonian_survey_result"),"info",!1,["progress"]),!0):!1},post(){De()}},gateway_depot:{id:"tech-gateway_depot",title:t("galaxy_gateway_depot"),desc:t("galaxy_gateway_depot"),category:"storage",era:"intergalactic",reqs:{gateway:4},grant:["gateway",5],cost:{Knowledge(){return 435e4}},effect(){return t("tech_gateway_depot_effect")},action(){return _($(this)[0])?(e.galaxy.gateway_depot={count:0,on:0},!0):!1}},soul_forge:{id:"tech-soul_forge",title:t("portal_soul_forge_title"),desc:t("portal_soul_forge_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:3},grant:["hell_pit",4],cost:{Knowledge(){return 275e4}},effect(){return t("tech_soul_forge_effect")},action(){return _($(this)[0])?(e.portal.soul_forge={count:0,on:0,kills:0},!0):!1}},soul_attractor:{id:"tech-soul_attractor",title:t("portal_soul_attractor_title"),desc:t("portal_soul_attractor_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4,high_tech:16},grant:["hell_pit",5],cost:{Knowledge(){return 55e5}},effect(){return t("tech_soul_attractor_effect")},action(){return _($(this)[0])?(e.portal.soul_attractor={count:0,on:0},!0):!1}},soul_absorption:{id:"tech-soul_absorption",title:t("tech_soul_absorption"),desc:t("tech_soul_absorption"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:5},grant:["hell_pit",6],cost:{Knowledge(){return 6e6},Infernite(){return 25e4}},effect(){return t("tech_soul_absorption_effect")},action(){return!!_($(this)[0])}},soul_link:{id:"tech-soul_link",title:t("tech_soul_link"),desc:t("tech_soul_link"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:6},grant:["hell_pit",7],cost:{Knowledge(){return 75e5},Vitreloy(){return 25e4}},effect(){return t("tech_soul_link_effect")},action(){return!!_($(this)[0])}},gun_emplacement:{id:"tech-gun_emplacement",title:t("portal_gun_emplacement_title"),desc:t("portal_gun_emplacement_title"),category:"hell_dimension",era:"intergalactic",reqs:{hell_pit:4},grant:["hell_gun",1],cost:{Knowledge(){return 3e6}},effect(){return t("tech_gun_emplacement_effect")},action(){return _($(this)[0])?(e.portal.gun_emplacement={count:0,on:0},!0):!1}},advanced_emplacement:{id:"tech-advanced_emplacement",title:t("tech_advanced_emplacement"),desc:t("tech_advanced_emplacement"),category:"hell_dimension",era:"intergalactic",reqs:{hell_gun:1,high_tech:17},grant:["hell_gun",2],cost:{Knowledge(){return 125e5},Orichalcum(){return 18e4}},effect(){return t("tech_advanced_emplacement_effect")},action(){return!!_($(this)[0])}},dial_it_to_11:{id:"tech-dial_it_to_11",title:t("tech_dial_it_to_11"),desc:t("tech_dial_it_to_11"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge(){return 5e5}},condition(){return!(e.race.sludge&&!e.race.cataclysm)},effect(){let a=ke("cataclysm"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${t("tech_dial_it_to_11_effect",[S().dwarf,e.race.cataclysm?S().red:x[e.race.species].home])}
${t("tech_dial_it_to_11_effect2")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){return _($(this)[0])?($("#main").addClass("earthquake"),setTimeout(function(){$("#main").removeClass("earthquake"),bc()},4e3),!0):!1},flair(){return t("tech_dial_it_to_11_flair")}},limit_collider:{id:"tech-limit_collider",title:t("tech_limit_collider"),desc:t("tech_limit_collider"),category:"science",wiki:!1,era:"deep_space",reqs:{quaked:1},grant:["quaked",2],cost:{Knowledge(){return 5e5}},effect(){return t("tech_limit_collider_effect")},action(){return!!_($(this)[0])}},mana:{id:"tech-mana",title:t("tech_mana"),desc:t("tech_mana"),category:"magic",era:"civilized",reqs:{primitive:3},grant:["magic",1],condition(){return e.race.universe==="magic"},cost:{Knowledge(){return 25}},effect(){return t("tech_mana_effect")},action(){return _($(this)[0])?(e.resource.Mana.display=!0,e.resource.Crystal.display=!0,e.civic.crystal_miner.display=!0,e.race.witch_hunter&&(e.resource.Sus.display=!0),!0):!1},flair:t("tech_mana_flair"),post(){De()}},ley_lines:{id:"tech-ley_lines",title:t("tech_ley_lines"),desc:t("tech_ley_lines"),category:"magic",era:"civilized",reqs:{magic:1},grant:["magic",2],condition(){return e.race.universe==="magic"},cost:{Knowledge(){return 40}},effect(){return t("tech_ley_lines_effect")},action(){return _($(this)[0])?(e.tech.isolation?e.tauceti.pylon={count:0}:e.race.cataclysm||e.race.orbit_decayed?e.space.pylon={count:0}:e.city.pylon={count:0},!0):!1}},rituals:{id:"tech-rituals",title:t("tech_rituals"),desc:t("tech_rituals"),category:"magic",era:"civilized",reqs:{magic:2},grant:["magic",3],condition(){return e.race.universe==="magic"},cost:{Mana(){return 25},Knowledge(){return 750},Crystal(){return 50}},effect(){return t("tech_rituals_effect")},action(){return _($(this)[0])?(e.race.casting={farmer:0,miner:0,lumberjack:0,science:0,factory:0,army:0,hunting:0,crafting:0,total:0},e.settings.showIndustry=!0,!0):!1},post(){Pe()}},crafting_ritual:{id:"tech-crafting_ritual",title:t("tech_crafting_ritual"),desc:t("tech_crafting_ritual"),category:"magic",era:"discovery",reqs:{magic:3,foundry:5},grant:["magic",4],condition(){return e.race.universe==="magic"},cost:{Mana(){return 100},Knowledge(){return 15e3},Crystal(){return 2500}},effect(){return t("tech_crafting_ritual_effect")},action(){return _($(this)[0])?(e.race.casting.crafting=0,!0):!1},post(){Pe()}},mana_nexus:{id:"tech-mana_nexus",title:t("tech_mana_nexus"),desc:t("tech_mana_nexus"),category:"magic",era:"early_space",reqs:{magic:4,space:3,luna:1},grant:["magic",5],condition(){return e.race.universe==="magic"},cost:{Mana(){return 500},Knowledge(){return 16e4},Crystal(){return 2500}},effect(){return t("tech_mana_nexus_effect")},action(){return!!_($(this)[0])},post(){ye("Physics")}},clerics:{id:"tech-clerics",title:t("tech_clerics"),desc:t("tech_clerics"),category:"magic",era:"civilized",reqs:{magic:3},grant:["cleric",1],condition(){return!!(e.race.universe==="magic"&&e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display)},cost:{Mana(){return 100},Knowledge(){return 2e3},Crystal(){return 100}},effect(){return t("tech_clerics_effect")},action(){return!!_($(this)[0])}},conjuring:{id:"tech-conjuring",title:t("tech_conjuring"),desc:t("tech_conjuring_desc"),category:"magic",era:"civilized",reqs:{magic:1},grant:["conjuring",1],not_trait:["cataclysm"],condition(){return e.race.universe==="magic"},cost:{Mana(){return 2},Crystal(){return 5}},effect(){return t("tech_conjuring_effect")},action(){return!!_($(this)[0])}},res_conjuring:{id:"tech-res_conjuring",title:t("tech_res_conjuring"),desc:t("tech_res_conjuring"),category:"magic",era:"civilized",reqs:{conjuring:1},grant:["conjuring",2],not_trait:["cataclysm"],condition(){return e.race.universe==="magic"},cost:{Mana(){return 5},Crystal(){return 10}},effect(){return t("tech_res_conjuring_effect")},action(){return!!_($(this)[0])}},alchemy:{id:"tech-alchemy",title:t("tech_alchemy"),desc:t("tech_alchemy"),category:"magic",era:"discovery",reqs:{magic:3,high_tech:1},grant:["alchemy",1],condition(){return e.race.universe==="magic"},cost:{Mana(){return 100},Knowledge(){return 1e4},Crystal(){return 250}},effect(){return t("tech_alchemy_effect")},action(){return _($(this)[0])?(e.race.alchemy={Food: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},e.settings.showAlchemy=!0,!0):!1},post(){ka("alchemy")}},transmutation:{id:"tech-transmutation",title:t("tech_transmutation"),desc:t("tech_transmutation"),category:"magic",era:"intergalactic",reqs:{alchemy:1,high_tech:16},grant:["alchemy",2],condition(){return e.race.universe==="magic"},cost:{Mana(){return 1250},Knowledge(){return 55e5},Crystal(){return 1e6}},effect(){return t("tech_transmutation_effect")},action(){return!!_($(this)[0])}},secret_society:{id:"tech-secret_society",title:t("tech_secret_society"),desc:t("tech_secret_society"),category:"magic",era:"civilized",reqs:{magic:1},grant:["roguemagic",1],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 10},Knowledge(){return 45}},effect(){return t("tech_secret_society_effect")},action(){return!!_($(this)[0])}},cultists:{id:"tech-cultists",title:t("tech_cultists"),desc:t("tech_cultists"),category:"magic",era:"civilized",reqs:{roguemagic:1,cleric:1},grant:["roguemagic",2],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 250},Knowledge(){return 2125}},effect(){return t("tech_cultists_effect")},action(){return!!_($(this)[0])}},conceal_ward:{id:"tech-conceal_ward",title:t("tech_conceal_ward"),desc:t("tech_conceal_ward"),category:"magic",era:"discovery",reqs:{roguemagic:2,theatre:3},grant:["roguemagic",3],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 500},Knowledge(){return 8200},Crystal(){return 1e3}},effect(){return t("tech_conceal_ward_effect")},action(){return _($(this)[0])?(e.city.conceal_ward={count:0},e.space.conceal_ward={count:0},!0):!1}},subtle_rituals:{id:"tech-subtle_rituals",title:t("tech_subtle_rituals"),desc:t("tech_subtle_rituals"),category:"magic",era:"discovery",reqs:{roguemagic:3,magic:4},grant:["roguemagic",4],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 100},Knowledge(){return 15e3},Crystal(){return 2500}},effect(){return t("tech_subtle_rituals_effect")},action(){return!!_($(this)[0])}},pylon_camouflage:{id:"tech-pylon_camouflage",title:t("tech_pylon_camouflage"),desc:t("tech_pylon_camouflage"),category:"magic",era:"industrialized",reqs:{roguemagic:4,high_tech:3},grant:["roguemagic",5],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 1e3},Knowledge(){return 3e4},Crystal(){return 3750}},effect(){return t("tech_pylon_camouflage_effect")},action(){return!!_($(this)[0])}},fake_tech:{id:"tech-fake_tech",title:t("tech_fake_tech"),desc:t("tech_fake_tech"),category:"magic",era:"industrialized",reqs:{roguemagic:5,high_tech:4},grant:["roguemagic",6],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 2250},Knowledge(){return 6e4}},effect(){return t("tech_fake_tech_effect")},action(){return!!_($(this)[0])}},concealment:{id:"tech-concealment",title:t("tech_concealment"),desc:t("tech_concealment"),category:"magic",era:"early_space",reqs:{roguemagic:6,magic:5},grant:["roguemagic",7],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return 3e3},Knowledge(){return 185e3}},effect(){return t("tech_concealment_effect")},action(){return!!_($(this)[0])}},improved_concealment:{id:"tech-improved_concealment",title:t("tech_improved_concealment"),desc:t("tech_improved_concealment"),category:"magic",era:"intergalactic",reqs:{roguemagic:7,forbidden:1},grant:["roguemagic",8],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return e.race.no_plasmid?6e3:15e3},Knowledge(){return 2e7}},effect(){return t("tech_improved_concealment_effect")},action(){return!!_($(this)[0])}},outerplane_summon:{id:"tech-outerplane_summon",title:t("tech_outerplane_summon"),desc:t("tech_outerplane_summon"),category:"magic",era:"dimensional",reqs:{roguemagic:8,forbidden:4,hell_spire:10,b_stone:2,waygate:3},grant:["forbidden",5],condition(){return!!(e.race.universe==="magic"&&e.race.witch_hunter)},cost:{Mana(){return e.race.no_plasmid?12e3:4e4},Knowledge(){return 6e7},Demonic_Essence(){return 1}},effect(){return t("tech_outerplane_summon_effect")},action(){return!!_($(this)[0])}},dark_bomb:{id:"tech-dark_bomb",title:t("tech_dark_bomb"),desc:t("tech_dark_bomb"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:10,b_stone:2,waygate:2,sphinx_bribe:1},condition(){let a=ue();return!!(e.portal.hasOwnProperty("waygate")&&e.portal.waygate.progress<100&&e.stats.spire.hasOwnProperty(a)&&e.stats.spire[a].hasOwnProperty("dlstr")&&e.stats.spire[a].dlstr>0)},grant:["dl_reset",1],cost:{Knowledge(){return 65e6},Soul_Gem(){return 5e3},Blood_Stone(){return 25},Dark(){return 1},Supply(){return 1e6}},effect(){return t("tech_dark_bomb_effect")},action(){return _($(this)[0])?(e.portal.waygate.progress=100,e.portal.waygate.on=0,e.tech.waygate=3,e.resource.Demonic_Essence.display=!0,e.resource.Demonic_Essence.amount=1,!0):!1},flair(){return t("tech_dark_bomb_flair")}},bribe_sphinx:{id:"tech-bribe_sphinx",title:t("portal_sphinx_bribe"),desc:t("portal_sphinx_bribe"),category:"hell_dimension",era:"dimensional",reqs:{hell_spire:8},grant:["sphinx_bribe",1],cost:{Soul_Gem(){return 250},Supply(){return 5e5}},effect(){return t("tech_bribe_sphinx_effect")},action(){return _($(this)[0])?(e.resource.Codex.display=!0,e.resource.Codex.amount=1,I(t("tech_bribe_sphinx_msg"),"info",!1,["progress","hell"]),!0):!1}},alien_biotech:{id:"tech-alien_biotech",title:t("tech_alien_biotech"),desc:t("tech_alien_biotech"),category:"science",era:"solar",reqs:{genetics:8,kuiper:1},grant:["biotech",1],path:["truepath"],cost:{Knowledge(){return 24e5},Orichalcum(){return 125e3},Cipher(){return 15e3}},effect(){return t(e.race.orbit_decayed?"tech_alien_biotech_effect_alt":"tech_alien_biotech_effect")},action(){return!!_($(this)[0])}},zero_g_lab:{id:"tech-zero_g_lab",title:t("tech_zero_g_lab"),desc:t("tech_zero_g_lab"),category:"science",era:"solar",path:["truepath"],reqs:{high_tech:13,graphene:1,enceladus:2},grant:["enceladus",3],cost:{Knowledge(){return 9e5}},effect:t("tech_zero_g_lab_effect"),action(){return _($(this)[0])?(e.space.zero_g_lab={count:0,on:0},!0):!1}},operating_base:{id:"tech-operating_base",title:t("tech_operating_base"),desc:t("tech_operating_base"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:3,triton:1},grant:["enceladus",4],cost:{Knowledge(){return 14e5}},effect(){return t("tech_operating_base_effect",[S().enceladus])},action(){return _($(this)[0])?(e.space.operating_base={count:0,on:0},!0):!1}},munitions_depot:{id:"tech-munitions_depot",title:t("tech_munitions_depot"),desc:t("tech_munitions_depot"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{enceladus:4},grant:["enceladus",5],cost:{Knowledge(){return 15e5}},effect(){return t("tech_munitions_depot_effect")},action(){return _($(this)[0])?(e.space.munitions_depot={count:0},!0):!1}},fob:{id:"tech-fob",title:t("tech_fob"),desc:t("tech_fob"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{triton:1},grant:["triton",2],cost:{Knowledge(){return 145e4}},effect(){return t("tech_fob_effect",[S().triton])},action(){return _($(this)[0])?(e.space.fob={count:0,on:0,troops:0,enemy:0},e.space.lander={count:0,on:0},e.space.crashed_ship={count:0},!0):!1}},bac_tanks_tp:{id:"tech-bac_tanks_tp",title:t("tech_bac_tanks"),desc:t("tech_bac_tanks_desc"),category:"military",era:"solar",path:["truepath"],reqs:{medic:1,triton:2},grant:["medic",2],cost:{Knowledge(){return 175e4}},effect:t("tech_bac_tanks_effect"),action(){return!!_($(this)[0])}},medkit:{id:"tech-medkit",title:t("tech_medkit"),desc:t("tech_medkit"),category:"military",era:"solar",path:["truepath"],reqs:{medic:2,outer:4},grant:["medic",3],cost:{Knowledge(){return 225e4},Quantium(){return 25e4},Cipher(){return 8e3}},effect:t("tech_medkit_effect"),action(){return!!_($(this)[0])}},sam_site:{id:"tech-sam_site",title:t("tech_sam_site"),desc:t("tech_sam_site"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{titan:6,triton:1},grant:["titan",7],cost:{Knowledge(){return 1475e3}},effect(){return t("tech_sam_site_effect",[S().titan])},action(){return _($(this)[0])?(e.space.sam={count:0,on:0},!0):!1}},data_cracker:{id:"tech-data_cracker",title:t("tech_data_cracker"),desc:t("tech_data_cracker"),category:"science",era:"solar",path:["truepath"],reqs:{titan:7,kuiper:1},grant:["titan",8],cost:{Knowledge(){return 275e4},Cipher(){return 25e3}},effect(){return t("tech_data_cracker_effect",[e.resource.Cipher.name])},action(){return _($(this)[0])?(e.space.decoder={count:0,on:0},!0):!1}},ai_core_tp:{id:"tech-ai_core_tp",title:t("tech_ai_core"),desc:t("tech_ai_core"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan:8},grant:["titan",9],cost:{Knowledge(){return 3e6},Cipher(){return 1e5}},effect:t("tech_ai_core_effect"),action(){return _($(this)[0])?(e.space.ai_core={count:0},!0):!1}},ai_optimizations:{id:"tech-ai_optimizations",title:t("tech_ai_optimizations"),desc:t("tech_ai_optimizations"),category:"ai_core",era:"solar",path:["truepath"],reqs:{eris:3,titan:9,titan_ai_core:1,dig_control:1},grant:["titan_ai_core",2],cost:{Knowledge(){return 375e4},Cipher(){return 75e3}},effect:t("tech_ai_optimizations_effect"),action(){return!!_($(this)[0])},class:"synth"},synthetic_life:{id:"tech-synthetic_life",title:t("tech_synthetic_life"),desc:t("tech_synthetic_life"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:2},grant:["titan_ai_core",3],cost:{Knowledge(){return 4e6},Cipher(){return 75e3}},effect:t("tech_synthetic_life_effect"),action(){return _($(this)[0])?(e.space.ai_colonist={count:0,on:0},!0):!1},class:"synth"},protocol66:{id:"tech-protocol66",title:t("tech_protocol66"),desc:t("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:1},grant:["corrupted_ai",2],cost:{Knowledge(){return 5e6}},effect:t("tech_protocol66_effect"),action(){return!!Jt($(this)[0])},flair:t("tech_protocol66_flair"),class:"synth"},protocol66a:{id:"tech-protocol66a",title:t("tech_protocol66"),desc:t("tech_protocol66"),category:"ai_core",era:"solar",path:["truepath"],reqs:{titan_ai_core:3,corrupted_ai:2},wiki:!1,grant:["corrupted_ai",3],cost:{Knowledge(){return 5e6}},effect(){let a=ke("ai"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name"),i=`
${t("tech_protocol66a_effect_gains",[a.plasmid,r,a.phage,a.cores])}
`;return`
${t("tech_protocol66a_effect")}
${i}`},action(){return _($(this)[0])?(ce.w&&ce.w.terminate(),ie(),$("body").append('
'),$("#aiAppoc").addClass("noise-wrapper"),$("#aiAppoc > div").addClass("noise"),setTimeout(function(){$("body").append('
'),$("body").append('
'),$("#deadAirTop").animate({height:"50%",opacity:1},400),$("#deadAirBottom").animate({height:"50%",opacity:1},400)},3e3),setTimeout(function(){xc()},4e3),!0):!1},flair:t("tech_protocol66a_flair"),class:"synth"},terraforming_tp:{id:"tech-terraforming_tp",title:t("tech_terraforming"),desc:t("tech_terraforming"),category:"special",era:"solar",reqs:{dig_control:1,eris:2,titan_ai_core:2},path:["truepath"],grant:["terraforming",1],trait:["orbit_decay"],cost:{Knowledge(){return 5e6}},effect(){return t("tech_terraforming_effect",[S().red])},action(){return _($(this)[0])?(e.space.terraformer={count:0},!0):!1}},quantium:{id:"tech-quantium",title:t("tech_quantium"),desc:t("tech_quantium"),category:"crafting",era:"solar",path:["truepath"],reqs:{supercollider:10,enceladus:3},grant:["quantium",1],cost:{Knowledge(){return 1e6},Elerium(){return 1e3},Nano_Tube(){return 1e6},Graphene(){return 1e6}},effect:t("tech_quantium_effect"),action(){return _($(this)[0])?(e.resource.Quantium.display=!0,!0):!1},post(){De()}},anitgrav_bunk:{id:"tech-anitgrav_bunk",title:t("tech_anitgrav_bunk"),desc:t("tech_anitgrav_bunk"),category:"military",era:"solar",path:["truepath"],reqs:{marines:1,quantium:1},grant:["marines",2],cost:{Knowledge(){return 125e4},Quantium(){return 5e5}},effect(){return t("tech_anitgrav_bunk_effect",[t("space_red_space_barracks_title")])},action(){return!!_($(this)[0])}},higgs_boson_tp:{id:"tech-higgs_boson_tp",title:t("tech_higgs_boson"),desc:t("tech_higgs_boson"),category:"science",era:"early_space",path:["truepath"],reqs:{supercollider:2},grant:["tp_particles",1],cost:{Knowledge(){return 125e3}},effect:t("tech_higgs_boson_effect"),action(){return!!_($(this)[0])}},long_range_probes:{id:"tech-long_range_probes",title:t("tech_long_range_probes"),desc:t("tech_long_range_probes"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{high_tech:10,elerium:1},grant:["outer",1],cost:{Knowledge(){return 4e5},Uranium(){return 2e4},Iridium(){return 25e4},Neutronium(){return 3e3},Elerium(){return 350}},effect:t("tech_long_range_probes_effect"),action(){return _($(this)[0])?(e.settings.space.titan=!0,e.settings.space.enceladus=!0,e.space.titan_spaceport={count:0,on:0,support:0,s_max:0},e.space.electrolysis={count:0,on:0,support:0,s_max:0},!0):!1}},strange_signal:{id:"tech-strange_signal",title:t("tech_strange_signal"),desc:t("tech_strange_signal"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:1,syard_sensor:4},grant:["outer",2],cost:{Knowledge(){return 135e4}},effect:t("tech_strange_signal_effect"),action(){return _($(this)[0])?(e.settings.space.triton=!0,!0):!1}},data_analysis:{id:"tech-data_analysis",title:t("tech_data_analysis"),desc:t("tech_data_analysis"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:3},grant:["outer",4],cost:{Knowledge(){return 18e5},Cipher(){return 12500}},effect:t("tech_data_analysis_effect"),action(){return _($(this)[0])?(I(t("tech_data_analysis_result"),"info",!1,["progress"]),e.space.syndicate.spc_titan+=500,e.space.syndicate.spc_enceladus+=250,e.space.syndicate.spc_triton+=1e3,!0):!1}},mass_relay:{id:"tech-mass_relay",title:t("tech_mass_relay"),desc:t("tech_mass_relay"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:4},grant:["outer",5],cost:{Knowledge(){return 22e5},Cipher(){return 4e4}},effect:t("tech_mass_relay_effect"),action(){return _($(this)[0])?(e.space.mass_relay={count:0},!0):!1}},nav_data:{id:"tech-nav_data",title:t("tech_nav_data"),desc:t("tech_nav_data"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:6},grant:["outer",7],cost:{Knowledge(){return 225e4},Cipher(){return 6e4}},effect:t("tech_nav_data_effect"),action(){return _($(this)[0])?(e.settings.space.eris=!0,e.settings.space.kuiper=!0,e.tech.eris_scan=0,e.space.drone_control={count:0,on:0,support:0,s_max:0},I(t("tech_nav_data_result",[S().eris]),"info",!1,["progress"]),!0):!1}},sensor_logs:{id:"tech-sensor_logs",title:t("tech_sensor_logs"),desc:t("tech_sensor_logs"),category:"space_exploration",era:"solar",path:["truepath"],reqs:{outer:7},grant:["outer",8],cost:{Knowledge(){return 35e5},Cipher(){return 65e3}},effect:t("tech_sensor_logs_effect"),action(){return _($(this)[0])?(I(t("tech_sensor_logs_result"),"info",!1,["progress"]),!0):!1}},dronewar:{id:"tech-dronewar",title:t("tech_dronewar"),desc:t("tech_dronewar"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:2,titan_ai_core:1},grant:["eris",3],cost:{Knowledge(){return 32e5},Cipher(){return 25e3}},effect(){return t("tech_dronewar_effect",[S().eris])},action(){return _($(this)[0])?(e.space.shock_trooper={count:0,on:0},e.space.digsite={count:0,enemy:1e4},!0):!1}},drone_tank:{id:"tech-drone_tank",title:t("tech_drone_tank"),desc:t("tech_drone_tank"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{eris:3},grant:["eris",4],cost:{Knowledge(){return 34e5},Cipher(){return 5e4}},effect:t("tech_drone_tank_effect"),action(){return _($(this)[0])?(e.space.tank={count:0,on:0},!0):!1}},stanene_tp:{id:"tech-stanene_tp",title:t("tech_stanene"),desc:t("tech_stanene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:1,enceladus:1},grant:["stanene",1],cost:{Knowledge(){return 525e3},Aluminium(){return 5e5},Nano_Tube(){return 1e5}},effect:t("tech_stanene_effect"),action(){return _($(this)[0])?(e.resource.Stanene.display=!0,I(t("tech_stanene_avail"),"info",!1,["progress"]),!0):!1},post(){Pe(),De()}},graphene_tp:{id:"tech-graphene_tp",title:t("tech_graphene"),desc:t("tech_graphene"),category:"crafting",era:"solar",path:["truepath"],reqs:{titan:5},grant:["graphene",1],cost:{Knowledge(){return 64e4},Adamantite(){return 25e3}},effect:t("tech_graphene_effect"),action(){return _($(this)[0])?(e.space.g_factory={count:0,on:0,Lumber:0,Coal:0,Oil:0},!0):!1}},virtual_reality_tp:{id:"tech-virtual_reality_tp",title:t("tech_virtual_reality"),desc:t("tech_virtual_reality"),category:"progress",era:"solar",path:["truepath"],reqs:{high_tech:11,titan:4,stanene:1},grant:["high_tech",12],cost:{Knowledge(){return 616e3},Nano_Tube(){return 1e6},Stanene(){return 125e3}},effect:t("tech_virtual_reality_effect"),action(){return!!_($(this)[0])},flair(){return t("tech_virtual_reality_flair")}},electrolysis:{id:"tech-electrolysis",title:t("tech_electrolysis"),desc:t("tech_electrolysis"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["titan",3],cost:{Knowledge(){return 465e3}},effect(){return t("tech_electrolysis_effect",[S().titan,e.resource.Water.name])},action(){return _($(this)[0])?(e.space.titan_quarters={count:0,on:0},e.space.titan_mine={count:0,on:0,ratio:90},!0):!1}},storehouse:{id:"tech-storehouse",title(){return t("tech_storehouse",[S().titan])},desc(){return t("tech_storehouse",[S().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:4},grant:["titan",5],cost:{Knowledge(){return 5e5}},effect(){return t("tech_storehouse_effect",[S().titan])},action(){return _($(this)[0])?(e.space.storehouse={count:0},!0):!1}},adamantite_vault_tp:{id:"tech-adamantite_vault_tp",title:t("tech_adamantite_vault"),desc:t("tech_adamantite_vault"),category:"banking",era:"solar",path:["truepath"],reqs:{vault:2,titan:4},grant:["vault",3],cost:{Money(){return 2e6},Knowledge(){return 56e4},Adamantite(){return 2e4}},effect:t("tech_adamantite_vault_effect"),action(){return!!_($(this)[0])}},titan_bank:{id:"tech-titan_bank",title(){return t("tech_titan_bank",[S().titan])},desc(){return t("tech_titan_bank",[S().titan])},category:"storage",era:"solar",path:["truepath"],reqs:{titan:5},grant:["titan",6],cost:{Knowledge(){return 6e5}},effect(){return t("tech_titan_bank_effect",[S().titan])},action(){return _($(this)[0])?(e.space.titan_bank={count:0},!0):!1}},hydrogen_plant:{id:"tech-hydrogen_plant",title:t("tech_hydrogen_plant"),desc:t("tech_hydrogen_plant"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:4,stanene:1},grant:["titan_power",1],cost:{Knowledge(){return 55e4}},effect(){return t("tech_hydrogen_plant_effect")},action(){return _($(this)[0])?(e.space.hydrogen_plant={count:0,on:0},!0):!1}},water_mining:{id:"tech-water_mining",title:t("tech_water_mining"),desc:t("tech_water_mining"),category:"power_generation",era:"solar",path:["truepath"],reqs:{titan:2,enceladus:1},grant:["enceladus",2],cost:{Knowledge(){return 45e4}},effect(){return t("tech_water_mining_effect",[S().enceladus,x[e.race.species].home,e.resource.Water.name])},action(){return _($(this)[0])?(e.space.water_freighter={count:0,on:0},!0):!1}},mercury_smelting:{id:"tech-mercury_smelting",title:t("tech_mercury_smelting"),desc:t("tech_mercury_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{hell:1,titan:4,smelting:6},grant:["m_smelting",1],cost:{Knowledge(){return 625e3},Adamantite(){return 5e4}},effect(){return t("tech_mercury_smelting_effect",[S().hell])},action(){return _($(this)[0])?(e.space.hell_smelter={count:0},!0):!1}},iridium_smelting:{id:"tech-iridium_smelting",title:t("tech_iridium_smelting"),desc:t("tech_iridium_smelting"),category:"mining",era:"solar",path:["truepath"],reqs:{m_smelting:1,graphene:1},grant:["m_smelting",2],cost:{Knowledge(){return 825e3},Graphene(){return 125e3}},effect:t("tech_iridium_smelting_effect"),action(){return!!_($(this)[0])}},adamantite_crates:{id:"tech-adamantite_crates",title:t("tech_adamantite_crates"),desc:t("tech_adamantite_crates_desc"),category:"storage",era:"solar",path:["truepath"],reqs:{container:5,titan:4},grant:["container",6],cost:{Knowledge(){return 525e3},Adamantite(){return 12500}},effect:t("tech_adamantite_crates_effect"),action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},bolognium_crates_tp:{id:"tech-bolognium_crates_tp",title(){return t("tech_crates",[e.resource.Bolognium.name])},desc(){return t("tech_crates",[e.resource.Bolognium.name])},category:"storage",era:"tauceti",path:["truepath"],reqs:{container:7,tauceti:4},grant:["container",8],cost:{Knowledge(){return 616e4},Bolognium(){return 75e4}},effect(){return t("tech_bolognium_crates_effect",[e.resource.Bolognium.name])},action(){return!!_($(this)[0])}},adamantite_containers_tp:{id:"tech-adamantite_containers_tp",title(){return t("tech_containers",[e.resource.Adamantite.name])},desc(){return t("tech_adamantite_containers_desc",[e.resource.Adamantite.name])},category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:4,titan:4},grant:["steel_container",5],cost:{Knowledge(){return 575e3},Adamantite(){return 17500}},effect(){return t("tech_adamantite_containers_effect",[e.resource.Adamantite.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},quantium_containers:{id:"tech-quantium_containers",title(){return t("tech_containers",[e.resource.Quantium.name])},desc(){return t("tech_containers",[e.resource.Quantium.name])},category:"storage",era:"solar",path:["truepath"],reqs:{steel_container:5,quantium:1},grant:["steel_container",6],cost:{Knowledge(){return 115e4},Quantium(){return 1e5}},effect(){return t("tech_quantium_containers_effect",[e.resource.Quantium.name])},action(){return _($(this)[0])?(C({el:"#createHead"},"update"),!0):!1}},unobtainium_containers:{id:"tech-unobtainium_containers",title(){return t("tech_containers",[e.resource.Unobtainium.name])},desc(){return t("tech_containers",[e.resource.Unobtainium.name])},category:"storage",era:"tauceti",path:["truepath"],reqs:{steel_container:6,tau_red:7},grant:["steel_container",7],cost:{Knowledge(){return 725e4},Unobtainium(){return 7500}},effect(){return t("tech_bolognium_containers_effect",[e.resource.Unobtainium.name])},action(){return!!_($(this)[0])}},reinforced_shelving:{id:"tech-reinforced_shelving",title:t("tech_reinforced_shelving"),desc:t("tech_reinforced_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{graphene:1,titan:5},grant:["shelving",1],cost:{Knowledge(){return 85e4},Adamantite(){return 35e4},Graphene(){return 25e4}},effect:t("tech_reinforced_shelving_effect"),action(){return!!_($(this)[0])}},garage_shelving:{id:"tech-garage_shelving",title:t("tech_garage_shelving"),desc:t("tech_garage_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:1,quantium:1},grant:["shelving",2],cost:{Knowledge(){return 125e4},Quantium(){return 75e3}},effect:t("tech_garage_shelving_effect"),action(){return!!_($(this)[0])}},warehouse_shelving:{id:"tech-warehouse_shelving",title:t("tech_warehouse_shelving"),desc:t("tech_warehouse_shelving"),category:"storage",era:"solar",path:["truepath"],reqs:{shelving:2,quantium:1,outer:4},grant:["shelving",3],cost:{Knowledge(){return 225e4},Quantium(){return 1e6},Cipher(){return 25e3}},effect:t("tech_warehouse_shelving_effect"),action(){return!!_($(this)[0])}},elerium_extraction:{id:"tech-elerium_extraction",title:t("tech_elerium_extraction"),desc:t("tech_elerium_extraction"),category:"mining",era:"solar",path:["truepath"],reqs:{kuiper:1},grant:["kuiper",2],cost:{Knowledge(){return 25e5},Orichalcum(){return 1e5},Cipher(){return 12e3}},effect(){return t("tech_elerium_extraction_effect")},action(){return _($(this)[0])?(e.space.elerium_mine={count:0,on:0},!0):!1}},orichalcum_panels_tp:{id:"tech-orichalcum_panels_tp",title:t("tech_orichalcum_panels"),desc:t("tech_orichalcum_panels"),category:"power_generation",era:"solar",path:["truepath"],reqs:{kuiper:1,swarm:5},grant:["swarm",6],cost:{Knowledge(){return 24e5},Orichalcum(){return 125e3}},effect(){return t("tech_orichalcum_panels_effect")},action(){return!!_($(this)[0])}},shipyard:{id:"tech-shipyard",title(){return t("tech_shipyard",[S().dwarf])},desc(){return t("tech_shipyard",[S().dwarf])},category:"space_militarization",era:"solar",path:["truepath"],reqs:{outer:1,syndicate:1},grant:["shipyard",1],cost:{Knowledge(){return 42e4}},effect(){return t("tech_shipyard_effect",[S().dwarf])},action(){return _($(this)[0])?(e.space.shipyard={count:0,on:0,ships:[],expand:!0,sort:!0},un(),!0):!1}},ship_lasers:{id:"tech-ship_lasers",title:t("tech_ship_lasers"),desc:t("tech_ship_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{military:7,syard_weapon:1},grant:["syard_weapon",2],cost:{Knowledge(){return 425e3},Elerium(){return 500}},effect:t("tech_ship_lasers_effect"),action(){return!!_($(this)[0])}},pulse_lasers:{id:"tech-pulse_lasers",title:t("tech_pulse_lasers"),desc:t("tech_pulse_lasers"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:2},grant:["syard_weapon",3],cost:{Knowledge(){return 5e5},Elerium(){return 750}},effect:t("tech_pulse_lasers_effect"),action(){return!!_($(this)[0])}},ship_plasma:{id:"tech-ship_plasma",title:t("tech_ship_plasma"),desc:t("tech_ship_plasma"),category:"space_militarization",era:"solar",reqs:{high_tech:13,syard_weapon:3},grant:["syard_weapon",4],path:["truepath"],cost:{Knowledge(){return 88e4},Elerium(){return 2500}},effect:t("tech_ship_plasma_effect"),action(){return!!_($(this)[0])}},ship_phaser:{id:"tech-ship_phaser",title:t("tech_ship_phaser"),desc:t("tech_ship_phaser"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:4,quantium:1},grant:["syard_weapon",5],cost:{Knowledge(){return 1225e3},Quantium(){return 75e3}},effect:t("tech_ship_phaser_effect"),action(){return!!_($(this)[0])}},ship_disruptor:{id:"tech-ship_disruptor",title:t("tech_ship_disruptor"),desc:t("tech_ship_disruptor"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_weapon:5,outer:4},grant:["syard_weapon",6],cost:{Knowledge(){return 2e6},Cipher(){return 25e3}},effect:t("tech_ship_disruptor_effect"),action(){return!!_($(this)[0])}},destroyer_ship:{id:"tech-destroyer_ship",title:t("tech_destroyer_ship"),desc:t("tech_destroyer_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:2},grant:["syard_class",3],cost:{Knowledge(){return 465e3}},effect:t("tech_destroyer_ship_effect"),action(){return!!_($(this)[0])}},cruiser_ship_tp:{id:"tech-cruiser_ship_tp",title:t("tech_cruiser_ship"),desc:t("tech_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:3,titan:4},grant:["syard_class",4],cost:{Knowledge(){return 75e4},Adamantite(){return 5e4}},effect:t("tech_cruiser_ship_tp"),action(){return!!_($(this)[0])}},h_cruiser_ship:{id:"tech-h_cruiser_ship",title:t("tech_h_cruiser_ship"),desc:t("tech_h_cruiser_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:4,triton:1},grant:["syard_class",5],cost:{Knowledge(){return 15e5}},effect:t("tech_h_cruiser_ship_effect"),action(){return!!_($(this)[0])}},dreadnought_ship:{id:"tech-dreadnought_ship",title:t("tech_dreadnought_ship"),desc:t("tech_dreadnought_ship"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_class:5,kuiper:1},grant:["syard_class",6],cost:{Knowledge(){return 25e5},Cipher(){return 1e4}},effect:t("tech_dreadnought_ship_effect"),action(){return!!_($(this)[0])}},pulse_engine:{id:"tech-pulse_engine",title:t("outer_shipyard_engine_pulse"),desc:t("outer_shipyard_engine_pulse"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:2,stanene:1},grant:["syard_engine",3],cost:{Knowledge(){return 555e3},Stanene(){return 25e4}},effect:t("tech_pulse_engine_effect"),action(){return!!_($(this)[0])}},photon_engine:{id:"tech-photon_engine",title:t("outer_shipyard_engine_photon"),desc:t("outer_shipyard_engine_photon"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:3,quantium:1},grant:["syard_engine",4],cost:{Knowledge(){return 115e4},Quantium(){return 5e4}},effect:t("tech_photon_engine_effect"),action(){return!!_($(this)[0])}},vacuum_drive:{id:"tech-vacuum_drive",title:t("outer_shipyard_engine_vacuum"),desc:t("outer_shipyard_engine_vacuum"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_engine:4,outer:4},grant:["syard_engine",5],cost:{Knowledge(){return 185e4},Cipher(){return 1e4}},effect:t("outer_shipyard_engine_vacuum_desc"),action(){return!!_($(this)[0])}},ship_fusion:{id:"tech-ship_fusion",title:t("tech_fusion_generator"),desc:t("tech_fusion_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:3,quantium:1},grant:["syard_power",4],cost:{Knowledge(){return 11e5},Quantium(){return 65e3}},effect:t("tech_fusion_generator_effect"),action(){return!!_($(this)[0])}},ship_elerium:{id:"tech-ship_elerium",title:t("tech_elerium_generator"),desc:t("tech_elerium_generator"),category:"space_militarization",era:"solar",path:["truepath"],reqs:{syard_power:4,outer:4},grant:["syard_power",5],cost:{Knowledge(){return 19e5},Cipher(){return 18e3}},effect:t("tech_elerium_generator_effect"),action(){return!!_($(this)[0])}},quantum_signatures:{id:"tech-quantum_signatures",title:t("tech_quantum_signatures"),desc:t("tech_quantum_signatures"),category:"progress",era:"solar",path:["truepath"],reqs:{quantium:1,syard_sensor:3},grant:["syard_sensor",4],cost:{Knowledge(){return 105e4},Quantium(){return 1e4}},effect:t("tech_quantum_signatures_effect"),action(){return!!_($(this)[0])}},interstellar_drive:{id:"tech-interstellar_drive",title:t("tech_interstellar_drive"),desc:t("tech_interstellar_drive"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outer:8,titan_ai_core:2,syard_sensor:4},grant:["tauceti",1],cost:{Knowledge(){return 45e5},Quantium(){return 25e4},Cipher(){return 75e3}},effect:t("tech_interstellar_drive_effect"),action(){return!!_($(this)[0])}},alien_outpost:{id:"tech-alien_outpost",title:t("tech_alien_outpost"),desc:t("tech_alien_outpost"),category:"science",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:3},grant:["tau_home",4],cost:{Knowledge(){return 5e6},Cipher(){return 1e5}},effect:t("tech_alien_outpost_effect"),action(){return _($(this)[0])?(e.tauceti.alien_outpost={count:1,on:0},e.tauceti.jump_gate={count:0},e.space.jump_gate={count:0},I(t("tech_alien_outpost_msg"),"info",!1,["progress"]),!0):!1}},jumpgates:{id:"tech-jumpgates",title:t("tech_jumpgates"),desc:t("tech_jumpgates"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:2,tau_home:4},grant:["tauceti",3],cost:{Knowledge(){return 6e6}},effect:t("tech_jumpgates_effect"),action(){return!!_($(this)[0])}},system_survey:{id:"tech-system_survey",title:t("tech_system_survey"),desc:t("tech_system_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tauceti:4,womling_tech:1},grant:["tauceti",5],cost:{Knowledge(){return 7e6}},effect:t("tech_system_survey_effect"),action(){return _($(this)[0])?(e.settings.tau.roid=!0,e.settings.tau.gas=!0,e.tauceti.patrol_ship={count:0,on:0,support:0,s_max:0},!0):!1}},repository:{id:"tech-repository",title:t("tech_repository"),desc:t("tech_repository"),category:"storage",era:"tauceti",path:["truepath"],reqs:{tauceti:4,tau_home:4},grant:["tau_home",5],cost:{Knowledge(){return 65e5}},effect:t("tech_repository_effect"),action(){return _($(this)[0])?(e.tauceti.repository={count:0},!0):!1}},fusion_generator:{id:"tech-fusion_generator",title:t("tech_fusion_power"),desc:t("tech_fusion_power"),category:"power_generation",era:"tauceti",path:["truepath"],reqs:{tau_home:5},grant:["tau_home",6],cost:{Knowledge(){return 675e4}},effect:t("tech_tau_fusion_power_effect"),action(){return _($(this)[0])?(e.tauceti.fusion_generator={count:0,on:0},!0):!1}},tau_cultivation:{id:"tech-tau_cultivation",title:t("tech_tau_cultivation"),desc:t("tech_tau_cultivation"),category:"agriculture",era:"tauceti",path:["truepath"],reqs:{tau_home:6},grant:["tau_home",7],cost:{Knowledge(){return 69e5}},effect(){return t("tech_tau_cultivation_effect",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.tau_farm={count:0,on:0},!0):!1}},tau_manufacturing:{id:"tech-tau_manufacturing",title:t("tech_tau_manufacturing"),desc:t("tech_tau_manufacturing"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{tau_home:7},grant:["tau_home",8],cost:{Knowledge(){return 725e4}},effect(){return t("tech_tau_manufacturing_effect",[x[e.race.species].home])},action(){return _($(this)[0])?(e.tauceti.tau_factory={count:0,on:0},!0):!1}},weasels:{id:"tech-weasels",title:t("tech_weasels"),desc:t("tech_weasels"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:2},grant:["tau_red",3],cost:{Knowledge(){return 625e4}},effect(){return t("tech_weasels_effect",[t("tau_planet",[S().red])])},action(){return _($(this)[0])?(I(t("tech_weasels_msg",[t("tau_planet",[S().red])]),"info",!1,["progress"]),!0):!1}},jeff:{id:"tech-jeff",title:t("tech_jeff"),desc:t("tech_jeff"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:3},grant:["tau_red",4],cost:{Knowledge(){return 638e4}},effect(){return t("tech_jeff_effect")},action(){return _($(this)[0])?(I(t("tech_jeff_effect_msg",[]),"info",!1,["progress"]),!0):!1}},womling_fun:{id:"tech-womling_fun",title:t("tech_womling_fun"),desc:t("tech_womling_fun"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:5},grant:["tau_red",6],cost:{Knowledge(){return 665e4}},effect(){return t("tech_womling_fun_effect")},action(){return!!_($(this)[0])}},womling_lab:{id:"tech-womling_lab",title:t("tech_womling_lab"),desc:t("tech_womling_lab"),category:"womling",era:"tauceti",path:["truepath"],reqs:{tau_red:6},grant:["tau_red",7],cost:{Knowledge(){return 69e5}},effect(){return t("tech_womling_lab_effect")},action(){return _($(this)[0])?(e.tauceti.womling_lab={count:0,on:0,scientist:0,tech:0},e.tech.womling_tech=0,!0):!1}},womling_mining:{id:"tech-womling_mining",title:t("tech_womling_mining"),desc:t("tech_womling_mining"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:1},grant:["womling_mining",1],cost:{Knowledge(){return 71e5}},effect(){return t("tech_womling_mining_effect")},action(){return!!_($(this)[0])}},womling_firstaid:{id:"tech-womling_firstaid",title:t("tech_womling_firstaid"),desc:t("tech_womling_firstaid"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:2},grant:["womling_firstaid",1],cost:{Knowledge(){return 735e4}},effect(){return t("tech_womling_firstaid_effect")},action(){return!!_($(this)[0])}},womling_logistics:{id:"tech-womling_logistics",title:t("tech_womling_logistics"),desc:t("tech_womling_logistics"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:3},grant:["womling_logistics",1],cost:{Knowledge(){return 765e4}},effect(){return t("tech_womling_logistics_effect",[t("tau_red_orbital_platform")])},action(){return!!_($(this)[0])}},womling_repulser:{id:"tech-womling_repulser",title:t("tech_womling_repulser"),desc:t("tech_womling_repulser"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:4,womling_logistics:1},grant:["womling_logistics",2],cost:{Knowledge(){return 79e5}},effect(){return t("tech_womling_repulser_effect",[e.resource.Oil.name,t("tau_red_orbital_platform")])},action(){return!!_($(this)[0])}},womling_farming:{id:"tech-womling_farming",title:t("tech_womling_farming"),desc:t("tech_womling_farming"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:5},grant:["womling_pop",1],cost:{Knowledge(){return 82e5}},effect(){return t("tech_womling_farming_effect")},action(){return!!_($(this)[0])}},womling_housing:{id:"tech-womling_housing",title:t("tech_womling_housing"),desc:t("tech_womling_housing"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:6,womling_pop:1},grant:["womling_pop",2],cost:{Knowledge(){return 85e5}},effect(){return t("tech_womling_housing_effect")},action(){return!!_($(this)[0])}},womling_support:{id:"tech-womling_support",title:t("tech_womling_support"),desc:t("tech_womling_support"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:7,tau_gas:4},grant:["womling_technicians",1],cost:{Knowledge(){return 885e4}},effect(){return`
${t("tech_womling_support_effect")}
`},action(){return _($(this)[0])?(e.tauceti.womling_station={count:0,on:0},!0):!1}},womling_recycling:{id:"tech-womling_recycling",title:t("tech_womling_recycling"),desc:t("tech_womling_recycling"),category:"womling",era:"tauceti",path:["truepath"],reqs:{womling_tech:8},grant:["womling_recycling",1],cost:{Knowledge(){return 955e4}},effect(){return`
${t("tech_womling_recycling_effect")}
`},action(){return!!_($(this)[0])}},asteroid_analysis:{id:"tech-asteroid_analysis",title:t("tech_asteroid_analysis"),desc:t("tech_asteroid_analysis"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:1},grant:["tau_roid",2],cost:{Knowledge(){return 735e4}},effect(){return t("tech_asteroid_analysis_effect")},action(){return _($(this)[0])?(I(t("tech_asteroid_analysis_msg"),"info",!1,["progress"]),!0):!1}},shark_repellent:{id:"tech-shark_repellent",title:t("tech_shark_repellent"),desc:t("tech_shark_repellent"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_roid:2},grant:["tau_roid",3],cost:{Knowledge(){return 74e5}},effect(){return t("tech_shark_repellent_effect")},action(){return _($(this)[0])?(I(t("tech_shark_repellent_msg"),"info",!1,["progress"]),!0):!1}},belt_mining:{id:"tech-belt_mining",title:t("tech_belt_mining"),desc:t("tech_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_gas",4],cost:{Knowledge(){return 765e4}},effect(){return t("tech_belt_mining_effect")},action(){return _($(this)[0])?(e.tauceti.ore_refinery={count:0,on:0,max:0,fill:0},e.tauceti.mining_ship={count:0,on:0,common:50,uncommon:50,rare:50},!0):!1}},adv_belt_mining:{id:"tech-adv_belt_mining",title:t("tech_adv_belt_mining"),desc:t("tech_adv_belt_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{tau_roid:4},grant:["tau_roid",5],cost:{Knowledge(){return 79e5}},effect(){return t("tech_adv_belt_mining_effect")},action(){return!!_($(this)[0])}},space_whaling:{id:"tech-space_whaling",title:t("tech_space_whaling"),desc:t("tech_space_whaling"),category:"whaling",era:"tauceti",path:["truepath"],reqs:{tau_gas:3,tau_roid:3},grant:["tau_whale",1],cost:{Knowledge(){return 75e5}},effect(){return t("tech_space_whaling_effect")},action(){return _($(this)[0])?(e.tauceti.whaling_station={count:0,on:0,max:0,fill:0},e.tauceti.whaling_ship={count:0,on:0},!0):!1}},infectious_disease_lab:{id:"tech-infectious_disease_lab",title(){return t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},desc(){return t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")},category:"science",era:"tauceti",path:["truepath"],reqs:{plague:2},grant:["disease",1],cost:{Knowledge(){return 825e4}},effect(){return t(e.race.artifical?"tech_infectious_disease_lab_effect_s":"tech_infectious_disease_lab_effect")},action(){return _($(this)[0])?(e.tauceti.infectious_disease_lab={count:0,on:0,cure:0},!0):!1}},isolation_protocol:{id:"tech-isolation_protocol",title:t("tech_isolation_protocol"),desc:t("tech_isolation_protocol"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 85e5}},effect(){return`
${t("tech_isolation_protocol_effect",[t("tab_tauceti")])}
${t("tech_isolation_protocol_warning")}
`},action(){return _($(this)[0])?(e.sim||oe.setItem("evolveBak",LZString.compressToUTF16(JSON.stringify(e))),e.tech.isolation=1,zc(),!0):!1}},focus_cure:{id:"tech-focus_cure",title:t("tech_focus_cure"),desc:t("tech_focus_cure"),category:"plague",era:"tauceti",path:["truepath"],reqs:{disease:2},grant:["disease",3],not_trait:["lone_survivor"],cost:{Knowledge(){return 85e5}},effect(){return`
${t("tech_focus_cure_effect",[t("tab_tauceti")])}
${t("tech_focus_cure_warning")}
`},action(){return _($(this)[0])?(e.tech.focus_cure=1,!0):!1}},decode_virus:{id:"tech-decode_virus",title:t("tech_decode_virus"),desc:t("tech_decode_virus"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:1},grant:["focus_cure",2],cost:{Knowledge(){return 9e6}},effect(){return`
${t(e.race.artifical?"tech_decode_virus_effect_s":"tech_decode_virus_effect")}
`},action(){return _($(this)[0])?(e.race.artifical?I(t("tech_decode_virus_msg1s",[q.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]):I(t("tech_decode_virus_msg1",[q.tauceti.tau_home.infectious_disease_lab.title()]),"info",!1,["progress"]),!0):!1}},vaccine_campaign:{id:"tech-vaccine_campaign",title:t("tech_vaccine_campaign"),desc:t("tech_vaccine_campaign"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:3},grant:["focus_cure",4],cost:{Knowledge(){return 925e4}},effect(){let a=e.race.artifical?q.city.boot_camp.title():q.city.hospital.title;return`
${t("tech_vaccine_campaign_effect",[a])}
`},action(){return _($(this)[0])?(e.race.vax=0,!0):!1}},vax_strat1:{id:"tech-vax_strat1",title:t("tech_vax_strat1"),desc:t("tech_vax_strat1"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat1_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_p=1,I(t("tech_vax_strat1_msg"),"info",!1,["progress"]),!0):!1}},vax_strat2:{id:"tech-vax_strat2",title:t("tech_vax_strat2"),desc:t("tech_vax_strat2"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat2_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_f=1,I(t("tech_vax_strat2_msg"),"info",!1,["progress"]),!0):!1}},vax_strat3:{id:"tech-vax_strat3",title:t("tech_vax_strat3"),desc:t("tech_vax_strat3"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat3_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_s=1,I(t("tech_vax_strat3_msg"),"info",!1,["progress"]),!0):!1}},vax_strat4:{id:"tech-vax_strat4",title:t("tech_vax_strat4"),desc:t("tech_vax_strat4"),category:"plague",era:"tauceti",path:["truepath"],reqs:{focus_cure:5},grant:["focus_cure",6],cost:{Knowledge(){return 95e5}},effect(){return`
${t("tech_vax_strat4_effect")}
${t("tech_vax_warning")}
`},action(){return _($(this)[0])?(e.tech.vax_c=1,I(t("tech_vax_strat4_msg"),"info",!1,["progress"]),!0):!1}},cloning:{id:"tech-cloning",title:t("tech_cloning"),desc:t("tech_cloning"),category:"housing",era:"tauceti",path:["truepath"],reqs:{focus_cure:7},grant:["cloning",1],cost:{Knowledge(){return 975e4}},effect(){return`
${t(e.race.artifical?"tech_cloning_effect_s":"tech_cloning_effect")}
`},action(){return _($(this)[0])?(e.tauceti.cloning_facility={count:0,on:0},!0):!1},post(){Te()}},clone_degradation:{id:"tech-clone_degradation",title:t("tech_clone_degradation"),desc:t("tech_clone_degradation"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:1},grant:["cloning",2],cost:{Knowledge(){return 1e7}},effect(){return`
${t("tech_clone_degradation_effect")}
`},action(){return _($(this)[0])?(I(t("tech_clone_degradation_msg"),"info",!1,["progress"]),!0):!1}},digital_paradise:{id:"tech-digital_paradise",title:t("tech_digital_paradise"),desc:t("tech_digital_paradise"),category:"progress",era:"tauceti",path:["truepath"],reqs:{cloning:2},grant:["matrix",1],cost:{Knowledge(){return 105e5},Cipher(){return 2e5}},effect(){return`
${t("tech_digital_paradise_effect")}
`},action(){return!!_($(this)[0])}},ringworld:{id:"tech-ringworld",title:t("tech_ringworld"),desc:t("tech_ringworld"),category:"progress",era:"tauceti",path:["truepath"],reqs:{matrix:1},grant:["matrix",2],cost:{Money(){return 3e9},Knowledge(){return 11e6}},effect(){return`
${t("tech_ringworld_effect")}
`},action(){return _($(this)[0])?(e.settings.tau.star=!0,e.tauceti.ringworld={count:0},!0):!1}},iso_gambling:{id:"tech-iso_gambling",title:t("tech_iso_gambling"),desc:t("tech_iso_gambling"),category:"banking",era:"tauceti",reqs:{gambling:4,isolation:1},grant:["iso_gambling",1],cost:{Knowledge(){return 865e4}},effect:t("tech_iso_gambling_effect",[5]),action(){return!!_($(this)[0])}},outpost_boost:{id:"tech-outpost_boost",title(){return t("tech_outpost_boost")},desc(){return t("tech_outpost_boost")},category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},grant:["outpost_boost",1],cost:{Knowledge(){return 89e5}},effect(){return t("tech_outpost_boost_effect")},action(){return!!_($(this)[0])},flair(){return t("tech_outpost_boost_flair")}},cultural_center:{id:"tech-cultural_center",title:t("tech_cultural_center"),desc:t("tech_cultural_center"),category:"banking",era:"tauceti",path:["truepath"],reqs:{iso_gambling:1,isolation:1},grant:["tau_culture",1],cost:{Knowledge(){return 885e4}},effect:t("tech_cultural_center_effect"),action(){return _($(this)[0])?(e.tauceti.tau_cultural_center={count:0,on:0},!0):!1},flair(){return t("tech_cultural_center_flair")}},outer_tau_survey:{id:"tech-outer_tau_survey",title:t("tech_outer_tau_survey"),desc:t("tech_outer_tau_survey"),category:"progress",era:"tauceti",path:["truepath"],reqs:{outpost_boost:1,plague:5},grant:["tau_gas2",1],cost:{Knowledge(){return 91e5},Helium_3(){return+de(5e6).toFixed(0)}},effect:t("tech_outer_tau_survey_effect"),action(){return _($(this)[0])?(e.settings.tau.gas2=!0,!0):!1}},alien_research:{id:"tech-alien_research",title:t("tech_alien_research"),desc:t("tech_alien_research"),category:"progress",era:"tauceti",path:["truepath"],reqs:{tau_gas2:5},grant:["tau_gas2",6],cost:{Knowledge(){return 935e4}},effect:t("tech_alien_research_effect"),action(){return _($(this)[0])?(e.tauceti.alien_space_station.decrypted=0,e.tauceti.alien_space_station.focus=95,I(t("tech_alien_research_msg"),"info",!1,["progress"]),!0):!1}},womling_gene_therapy:{id:"tech-womling_gene_therapy",title:t("tech_womling_gene_therapy"),desc:t("tech_womling_gene_therapy"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:1},grant:["womling_gene",1],cost:{Knowledge(){return 952e4}},effect:t("tech_womling_gene_therapy_effect"),action(){return!!_($(this)[0])}},food_culture:{id:"tech-food_culture",title(){return t("tech_food_culture",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])},desc(){return t("tech_food_culture",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`)])},category:"banking",era:"tauceti",path:["truepath"],reqs:{alien_data:2,tau_culture:1},grant:["tau_culture",2],cost:{Knowledge(){return 941e4}},effect(){return t("tech_food_culture_effect",[t(`tau_gas2_alien_station_data2_r${e.race.tau_food_item||0}`),t("tech_cultural_center")])},action(){return!!_($(this)[0])}},advanced_refinery:{id:"tech-advanced_refinery",title:t("tech_advanced_refinery"),desc:t("tech_advanced_refinery"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_ore_mining",1],cost:{Knowledge(){return 968e4}},effect(){return t("tech_advanced_refinery_effect")},action(){return!!_($(this)[0])}},advanced_pit_mining:{id:"tech-advanced_pit_mining",title:t("tech_advanced_pit_mining"),desc:t("tech_advanced_pit_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:3},grant:["tau_pit_mining",1],cost:{Knowledge(){return 972e4}},effect(){return t("tech_advanced_pit_mining_effect")},action(){return!!_($(this)[0])}},useless_junk:{id:"tech-useless_junk",title:t("tech_useless_junk"),desc:t("tech_useless_junk"),category:"womling",era:"tauceti",path:["truepath"],reqs:{alien_data:4},grant:["tau_junksale",1],cost:{Knowledge(){return 955e4}},effect(){return t("tech_useless_junk_effect",[t(`tau_gas2_alien_station_data4_r${e.race.tau_junk_item||0}`),t("tau_red_womlings")])},action(){return!!_($(this)[0])}},advanced_asteroid_mining:{id:"tech-advanced_asteroid_mining",title:t("tech_advanced_asteroid_mining"),desc:t("tech_advanced_asteroid_mining"),category:"space_mining",era:"tauceti",path:["truepath"],reqs:{alien_data:5,tau_ore_mining:1},grant:["tau_ore_mining",2],cost:{Knowledge(){return 975e4}},effect(){return t("tech_advanced_asteroid_mining_effect",[t("tau_roid_mining_ship")])},action(){return!!_($(this)[0])}},advanced_material_synthesis:{id:"tech-advanced_material_synthesis",title:t("tech_advanced_material_synthesis"),desc:t("tech_advanced_material_synthesis"),category:"crafting",era:"tauceti",path:["truepath"],reqs:{alien_data:5,disease:1},grant:["alien_crafting",1],cost:{Knowledge(){return 988e4}},effect(){return t("tech_advanced_material_synthesis_effect",[e.resource.Quantium.name])},action(){return!!_($(this)[0])}},matrioshka_brain:{id:"tech-matrioshka_brain",title:t("tech_matrioshka_brain"),desc:t("tech_matrioshka_brain"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:6},grant:["tau_gas2",7],not_trait:["lone_survivor"],cost:{Knowledge(){return 1e7}},effect(){return t("tech_matrioshka_brain_effect",[q.tauceti.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.matrioshka_brain={count:0},!0):!1}},ignition_device:{id:"tech-ignition_device",title:t("tech_ignition_device"),desc:t("tech_ignition_device"),category:"progress",era:"tauceti",path:["truepath"],reqs:{alien_data:6,tau_gas2:7},grant:["tau_gas2",8],cost:{Knowledge(){return 105e5}},effect(){return t("tech_ignition_device_effect",[q.tauceti.tau_gas2.info.name()])},action(){return _($(this)[0])?(e.tauceti.ignition_device={count:0},e.tauceti.hasOwnProperty("matrioshka_brain")||(e.tauceti.matrioshka_brain={count:0}),!0):!1}},replicator:{id:"tech-replicator",title(){return e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")},desc(){return e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")},category:"special",era:"tauceti",path:["truepath"],reqs:{tau_home:4,isolation:1},trait:["lone_survivor"],grant:["replicator",1],cost:{Knowledge(){return 625e4}},effect(){return e.race.universe==="antimatter"?t("tech_antireplicator_effect"):t("tech_replicator_effect")},action(){return _($(this)[0])?(e.race.replicator={res:"Unobtainium",pow:1},!0):!1}},womling_unlock:{id:"tech-womling_unlock",title:t("tech_womling_unlock"),desc:t("tech_womling_unlock"),category:"womling",era:"tauceti",path:["truepath"],reqs:{replicator:1},trait:["lone_survivor"],grant:["tau_red",4],cost:{Knowledge(){return 65e5}},effect(){return t("tech_womling_unlock_effect",[t("tau_planet",[S().red])])},action(){return _($(this)[0])?(e.settings.tau.red=!0,e.tauceti.orbital_platform.count=1,e.tauceti.orbital_platform.on=1,!0):!1}},garden_of_eden:{id:"tech-garden_of_eden",title:t("tech_garden_of_eden"),desc:t("tech_garden_of_eden"),category:"special",era:"tauceti",path:["truepath"],reqs:{eden:1},grant:["eden",2],cost:{Knowledge(){return 1e7}},effect(){return t("tech_garden_of_eden_effect")},action(){return _($(this)[0])?(e.tauceti.goe_facility={count:0},!0):!1}}};function ko(){e.tech.world_control=1,A($("#garrison")),A($("#c_garrison")),ha($("#garrison"),!0),ha($("#c_garrison"),!1);for(let a=0;a<3;a++){if(e.civic.foreign[`gov${a}`].occ){let r=F(e.civic.govern.type==="federation"?15:20);e.civic.garrison.max+=r,e.civic.garrison.workers+=r,e.civic.foreign[`gov${a}`].occ=!1}e.civic.foreign[`gov${a}`].buy=!1,e.civic.foreign[`gov${a}`].anx=!1,e.civic.foreign[`gov${a}`].sab=0,e.civic.foreign[`gov${a}`].act="none"}Ht("spy"),Ht("spyop")}function qr(a,r){let i=["swiss","gouda","cheddar","brie","feta","ricotta","goat","mascarpone","bleu","colby_jack","camembert","gorgonzola","mozzarella","roquefort","provolone","monterey_jack","muenster","cambozola","jarlsberg","bocconcini","cantal","emmental","havarti","burrata","cottage","asiago","wensleydale","pepper_jack","queso_blanco","pecorino","raclette","fontina","reblochon","port_salut","brillat_savarin","cream","stilton","taleggio","manchego","edam","gruyeye","parmigiano_reggiano","epoisses","comte","caciocavallo","teleme","grana_padano","chaumes","morbier","halloumi","lancashire","bleu_de_gex","fourme_d_ambert","fromage_blanc","red_leicester","bleu_d_auvergne","pont_l_eveque","jl_grubb","castello_blue","wagasi","ayibe","caravane","limburger","herve","kashkaval","sirene","paski_sir","akkawi","olomoucke_syrecky","anari","danbo","hermel\xEDn","trappista","stinking_bishop","banbury","sulguni","hofoingi","urda","golka","rokpol","telemea","bryndza","parenica","kackavalj","liptauer","greve","korbaciky","herrgardsost","vasterbottensost","mish","anejo","quesillo","nacho","reggianito","catupiry","queso_paipa","canastra","port_wine","cados","brie_de_meaux"];if(r)return i;let s=(e.stats.hasOwnProperty("reset")?e.stats.reset:0)%i.length;return a?t(`cheese_${i[s]}`):t("tech_swiss_bank",[t(`cheese_${i[s]}`)])}var In={standard:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","interstellar","intergalactic","dimensional"],truepath:["primitive","discovery","civilized","industrialized","globalized","early_space","deep_space","solar","tauceti"]};function Li(a){if(a){let r={};return Object.keys(or).forEach(function(i){(In[a].includes(or[i].era)||or[i].hasOwnProperty("path"))&&(!or[i].hasOwnProperty("path")||or[i].hasOwnProperty("path")&&or[i].path.includes(a))&&(r[i]=or[i])}),r}return or}var q={evolution:{rna:{id:"evolution-rna",title:t("resource_RNA_name"),desc(){let a=e.race.rapid_mutation?2:1;return t("evo_rna",[a])},condition(){return e.resource.hasOwnProperty("RNA")&&e.resource.RNA.display&&!e.race.evoFinalMenu},action(){return e.resource.RNA.amount=2&&e.resource.DNA.amount=2&&a++,t("evo_organelles_effect",[a])},action(){return _($(this)[0])?(e.evolution.organelles.count++,!0):!1}},nucleus:{id:"evolution-nucleus",title:t("evo_nucleus_title"),desc:t("evo_nucleus_desc"),condition(){return e.evolution.hasOwnProperty("nucleus")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("nucleus",38,e.tech.evo&&e.tech.evo>=4?16:32,a)},DNA(a){return Qa("nucleus",18,e.tech.evo&&e.tech.evo>=4?12:16,a)}},effect(){let a=e.tech.evo&&e.tech.evo>=5?2:1;return t("evo_nucleus_effect",[a])},action(){return _($(this)[0])?(e.evolution.nucleus.count++,!0):!1}},eukaryotic_cell:{id:"evolution-eukaryotic_cell",title:t("evo_eukaryotic_title"),desc:t("evo_eukaryotic_desc"),condition(){return e.evolution.hasOwnProperty("eukaryotic_cell")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("eukaryotic_cell",20,20,a)},DNA(a){return Qa("eukaryotic_cell",40,12,a)}},effect(){let a=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10;return t("evo_eukaryotic_effect",[a])},action(){return _($(this)[0])?(e.evolution.eukaryotic_cell.count++,e.resource.DNA.max+=e.evolution.mitochondria?e.evolution.mitochondria.count*10+10:10,!0):!1}},mitochondria:{id:"evolution-mitochondria",title:t("evo_mitochondria_title"),desc:t("evo_mitochondria_desc"),condition(){return e.evolution.hasOwnProperty("mitochondria")&&!e.race.evoFinalMenu},cost:{RNA(a){return Qa("mitochondria",75,50,a)},DNA(a){return Qa("mitochondria",65,35,a)}},effect:t("evo_mitochondria_effect"),action(){return _($(this)[0])?(e.evolution.mitochondria.count++,!0):!1}},sexual_reproduction:{id:"evolution-sexual_reproduction",title:t("evo_sexual_reproduction_title"),desc:t("evo_sexual_reproduction_desc"),reqs:{evo:1},grant:["evo",2],condition(){return e.tech.evo&&e.tech.evo===1},cost:{DNA(){return 150}},effect:t("evo_sexual_reproduction_effect"),action(){return _($(this)[0])?(e.evolution.final=20,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===1?1:0}},phagocytosis:{id:"evolution-phagocytosis",title:t("evo_phagocytosis_title"),desc:t("evo_phagocytosis_desc"),reqs:{evo:2},grant:["evo",3],condition(){return e.tech.evo&&e.tech.evo===2},cost:{DNA(){return 175}},effect:t("evo_phagocytosis_effect"),action(){return _($(this)[0])?(e.tech.evo_animal=1,e.evolution.final=40,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0}},chloroplasts:{id:"evolution-chloroplasts",title(){return e.evolution.gselect?t("genelab_genus_plant"):t("evo_chloroplasts_title")},desc:t("evo_chloroplasts_desc"),reqs:{evo:2},grant:["evo",3],condition(){return nt(2)},cost:{DNA(){return 175}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_chloroplasts_effect")}
${t("evo_warn_unwise")}
`:t("evo_chloroplasts_effect")},action(){return _($(this)[0])?(e.evolution.gselect?(e.tech.evo=7,e.tech.evo_plant=2,e.evolution.final=100):(e.tech.evo_plant=1,e.evolution.final=40),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_plant")}},chitin:{id:"evolution-chitin",title(){return e.evolution.gselect?t("genelab_genus_fungi"):t("evo_chitin_title")},desc:t("evo_chitin_desc"),reqs:{evo:2},grant:["evo",3],condition(){return nt(2)},cost:{DNA(){return 175}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_chitin_effect")}
${t("evo_warn_unwise")}
`:t("evo_chitin_effect")},action(){return _($(this)[0])?(e.evolution.gselect?(e.tech.evo=7,e.tech.evo_fungi=2,e.evolution.final=100):(e.tech.evo_fungi=1,e.evolution.final=40),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_fungi")}},exterminate:{id:"evolution-exterminate",title(){return e.evolution.gselect?t("genelab_genus_synthetic"):t("evo_exterminate_title")},desc:t("evo_exterminate_desc"),reqs:{evo:2},grant:["evo",7],condition(){return nt(2)&&e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5},cost:{DNA(){return 200}},effect(){return t("evo_exterminate_effect")},action(){return _($(this)[0])?(e.tech.evo_synthetic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===2?1:0},emblem(){return Ne("genus_synthetic")}},multicellular:{id:"evolution-multicellular",title:t("evo_multicellular_title"),desc:t("evo_multicellular_desc"),reqs:{evo:3},grant:["evo",4],condition(){return e.tech.evo&&e.tech.evo===3},cost:{DNA(){return 200}},effect:t("evo_multicellular_effect"),action(){return _($(this)[0])?(e.evolution.final=60,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===3?1:0}},spores:{id:"evolution-spores",title:t("evo_spores_title"),desc:t("evo_spores_desc"),reqs:{evo:4,evo_fungi:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},poikilohydric:{id:"evolution-poikilohydric",title:t("evo_poikilohydric_title"),desc:t("evo_poikilohydric_desc"),reqs:{evo:4,evo_plant:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},bilateral_symmetry:{id:"evolution-bilateral_symmetry",title:t("evo_bilateral_symmetry_title"),desc:t("evo_bilateral_symmetry_desc"),reqs:{evo:4,evo_animal:1},grant:["evo",5],condition(){return e.tech.evo&&e.tech.evo===4},cost:{DNA(){return 230}},effect:t("evo_nucleus_boost"),action(){return _($(this)[0])?(e.evolution.final=80,e.tech.evo_insectoid=1,e.tech.evo_mammals=1,e.tech.evo_eggshell=1,e.tech.evo_eldritch=1,e.tech.evo_aquatic=1,e.tech.evo_fey=1,e.tech.evo_sand=1,e.tech.evo_heat=1,e.tech.evo_polar=1,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===4?1:0}},bryophyte:{id:"evolution-bryophyte",title:t("evo_bryophyte_title"),desc:t("evo_bryophyte_desc"),reqs:{evo:5},grant:["evo",7],condition(){return!!(e.tech.evo_plant||e.tech.evo_fungi)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_bryophyte_effect"),action(){return _($(this)[0])?(e.evolution.final=100,e.tech.evo_fungi&&(e.tech.evo_fungi=2),e.tech.evo_plant&&(e.tech.evo_plant=2),!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},athropods:{id:"evolution-athropods",title:t("evo_athropods_title"),desc:t("evo_athropods_desc"),reqs:{evo:5,evo_insectoid:1},grant:["evo",7],condition(){return nt(5)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_athropods_effect")}
${t("evo_warn_unwise")}
`:t("evo_athropods_effect")},action(){return _($(this)[0])?(e.tech.evo_insectoid=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_insectoid")}},mammals:{id:"evolution-mammals",title:t("evo_mammals_title"),desc:t("evo_mammals_desc"),reqs:{evo:5,evo_mammals:1},grant:["evo",6],condition(){return e.tech.evo&&e.tech.evo===5},cost:{DNA(){return 245}},effect:t("evo_mammals_effect"),action(){return _($(this)[0])?(e.tech.evo_humanoid=1,e.tech.evo_giant=1,e.tech.evo_small=1,e.tech.evo_animalism=1,e.tech.evo_demonic=1,e.tech.evo_angelic=1,e.evolution.final=90,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},humanoid:{id:"evolution-humanoid",title:t("evo_humanoid_title"),desc:t("evo_humanoid_desc"),reqs:{evo:6,evo_humanoid:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_humanoid_effect")}
${t("evo_warn_unwise")}
`:t("evo_humanoid_effect")},action(){return _($(this)[0])?(e.tech.evo_humanoid=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_humanoid")}},gigantism:{id:"evolution-gigantism",title:t("evo_gigantism_title"),desc:t("evo_gigantism_desc"),reqs:{evo:6,evo_giant:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_gigantism_effect")}
${t("evo_warn_unwise")}
`:t("evo_gigantism_effect")},action(){return _($(this)[0])?(e.tech.evo_giant=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_giant")}},dwarfism:{id:"evolution-dwarfism",title:t("evo_dwarfism_title"),desc:t("evo_dwarfism_desc"),reqs:{evo:6,evo_small:1},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_dwarfism_effect")}
${t("evo_warn_unwise")}
`:t("evo_dwarfism_effect")},action(){return _($(this)[0])?(e.tech.evo_small=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_small")}},animalism:{id:"evolution-animalism",title:t("evo_animalism_title"),desc:t("evo_animalism_desc"),reqs:{evo:6,evo_animalism:1},grant:["evo",7],condition(){return nt(6)&&e.tech.evo_animalism&&e.tech.evo_animalism===1},cost:{DNA(){return 250}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_animalism_effect")}
${t("evo_warn_unwise")}
`:t("evo_animalism_effect")},action(){return _($(this)[0])?(e.tech.evo_animalism=2,e.evolution.final=95,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6&&e.tech.evo_animalism===1?1:0}},carnivore:{id:"evolution-carnivore",title:t("evo_carnivore_title"),desc:t("evo_carnivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_carnivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_carnivore_effect")},action(){return _($(this)[0])?(e.tech.evo=7,e.tech.evo_carnivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_carnivore")}},herbivore:{id:"evolution-herbivore",title:t("evo_herbivore_title"),desc:t("evo_herbivore_desc"),reqs:{evo_animalism:2},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_herbivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_herbivore_effect")},action(){return _($(this)[0])?(e.tech.evo=7,e.tech.evo_herbivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_herbivore")}},omnivore:{id:"evolution-omnivore",title:t("evo_omnivore_title"),desc:t("evo_omnivore_desc"),reqs:{evo_animalism:2,locked:1},grant:["evo_animalism",3],condition(){return nt(7)&&e.tech.evo_animalism&&e.tech.evo_animalism===2},cost:{DNA(){return 255}},wiki:!1,effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_omnivore_effect")}
${t("evo_warn_unwise")}
`:t("evo_omnivore_effect")},action(){return _($(this)[0])?(e.tech.evo_omnivore=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===7&&e.tech.evo_animalism===2?1:0},emblem(){return Ne("genus_omnivore")}},celestial:{id:"evolution-celestial",title:t("evo_celestial_title"),desc:t("evo_celestial_desc"),reqs:{evo:6,evo_angelic:1},grant:["evo",7],condition(){return!!(e.city.biome==="eden"||e.blood.unbound&&e.blood.unbound>=3)&&nt(6)},cost:{DNA(){return 260}},effect(){return t("evo_celestial_effect")},action(){return _($(this)[0])?(e.tech.evo_angelic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_angelic")}},demonic:{id:"evolution-demonic",title:t("evo_demonic_title"),desc:t("evo_demonic_desc"),reqs:{evo:6,evo_demonic:1},grant:["evo",7],condition(){return!!(e.city.biome==="hellscape"||e.blood.unbound&&e.blood.unbound>=3)&&nt(6)},cost:{DNA(){return 260}},effect(){return e.city.biome==="hellscape"&&e.race.universe==="evil"?`
${t("evo_demonic_effect")}
${t("evo_warn_unwise")}
`:t("evo_demonic_effect")},action(){return _($(this)[0])?(e.tech.evo_demonic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_demonic")}},eldritch:{id:"evolution-eldritch",title:t("evo_eldritch_title"),desc:t("evo_eldritch_desc"),reqs:{evo:5,evo_eldritch:1},grant:["evo",7],condition(){return!!(e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_eldritch_effect"),action(){return _($(this)[0])?(e.tech.evo_eldritch=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_eldritch")}},aquatic:{id:"evolution-aquatic",title:t("evo_aquatic_title"),desc:t("evo_aquatic_desc"),reqs:{evo:5,evo_aquatic:1},grant:["evo",7],condition(){return!!(["oceanic","swamp"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_aquatic_effect"),action(){return _($(this)[0])?(e.tech.evo_aquatic=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_aquatic")}},fey:{id:"evolution-fey",title:t("evo_fey_title"),desc:t("evo_fey_desc"),reqs:{evo:5,evo_fey:1},grant:["evo",7],condition(){return!!(["forest","swamp","taiga"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_fey_effect"),action(){return _($(this)[0])?(e.tech.evo_fey=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_fey")}},heat:{id:"evolution-heat",title:t("evo_heat_title"),desc:t("evo_heat_desc"),reqs:{evo:5,evo_heat:1},grant:["evo",7],condition(){return!!(["volcanic","ashland"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_heat_effect"),action(){return _($(this)[0])?(e.tech.evo_heat=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_heat")}},polar:{id:"evolution-polar",title:t("evo_polar_title"),desc:t("evo_polar_desc"),reqs:{evo:5,evo_polar:1},grant:["evo",7],condition(){return!!(["tundra","taiga"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_polar_effect"),action(){return _($(this)[0])?(e.tech.evo_polar=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_polar")}},sand:{id:"evolution-sand",title:t("evo_sand_title"),desc:t("evo_sand_desc"),reqs:{evo:5,evo_sand:1},grant:["evo",7],condition(){return!!(["desert","ashland"].includes(e.city.biome)||e.blood.unbound)&&nt(5)},cost:{DNA(){return 260}},effect:t("evo_sand_effect"),action(){return _($(this)[0])?(e.tech.evo_sand=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0},emblem(){return Ne("genus_sand")}},eggshell:{id:"evolution-eggshell",title:t("evo_eggshell_title"),desc:t("evo_eggshell_desc"),reqs:{evo:5,evo_eggshell:1},grant:["evo",6],condition(){return e.tech.evo&&e.tech.evo===5&&!e.evolution.gselect},cost:{DNA(){return 245}},effect(){return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_eggshell_effect")}
${t("evo_warn_unwise")}
`:t("evo_eggshell_effect")},action(){return _($(this)[0])?(e.tech.evo_eggshell=2,e.evolution.final=90,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===5?1:0}},endothermic:{id:"evolution-endothermic",title(){return e.evolution.gselect?t("genelab_genus_avian"):t("evo_endothermic_title")},desc:t("evo_endothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect:t("evo_endothermic_effect"),action(){return _($(this)[0])?(e.tech.evo_avian=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_avian")}},ectothermic:{id:"evolution-ectothermic",title(){return e.evolution.gselect?t("genelab_genus_reptilian"):t("evo_ectothermic_title")},desc:t("evo_ectothermic_desc"),reqs:{evo:6,evo_eggshell:2},grant:["evo",7],condition(){return nt(6)},cost:{DNA(){return 260}},effect:t("evo_ectothermic_effect"),action(){return _($(this)[0])?(e.tech.evo_reptilian=2,e.evolution.final=100,!0):!1},queue_complete(){return e.tech.evo&&e.tech.evo===6?1:0},emblem(){return Ne("genus_reptilian")}},sentience:{id:"evolution-sentience",title:t("evo_sentience_title"),desc:t("evo_sentience_desc"),reqs:{evo:7},grant:["evo",8],condition(){return e.tech.evo&&e.tech.evo===7&&e.evolution.final===100},cost:{RNA(){return 300},DNA(){return 300}},effect(){return e.evolution.exterminate?t("evo_sentience_ai_effect"):t("evo_sentience_effect")},action(){if(_($(this)[0])){let a=[],r="humanoid";for(let i in vt)if(e.tech[`evo_${i}`]&&e.tech[`evo_${i}`]>=2){r=i;break}if(e.race.junker||e.race.sludge){let i=e.race.sludge?"sludge":"junker";e.race.jtype=r,a.push(i)}else for(let i in ei){let s=ei[i];x[s].type===r&&a.push(s)}e.race.species=a[Math.floor(K(0,a.length))],e.stats.achieve[`extinct_${e.race.species}`]&&e.stats.achieve[`extinct_${e.race.species}`].l>=1&&(e.race.species=a[Math.floor(K(0,a.length))]),qs()}return!1},emblem(){for(let a in ei){let r=ei[a];if(e.tech[`evo_${x[r].type}`]&&e.tech[`evo_${x[r].type}`]>=2)return Ne(`genus_${x[r].type}`)}return""},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0}}},city:{gift:{id:"city-gift",title:t("city_gift"),desc:t("city_gift_desc"),wiki:!1,category:"outskirts",reqs:{primitive:1},queue_complete(){return 0},not_tech:["santa"],not_trait:["cataclysm","lone_survivor"],class:["hgift"],condition(){let a=new Date;if(a.getMonth()!==11||a.getMonth()===11&&(a.getDate()<=16||a.getDate()>=25)){let r=!1;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(r=!0)}),r}return!1},count(){let a=0;return e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(r){e.special.gift[r]&&a++}),a},action(){if(!e.settings.pause){let a=new Date,r=!1;if(e.special&&e.special.gift&&Object.keys(e.special.gift).forEach(function(i){e.special.gift[i]&&(r=i)}),a.getMonth()!==11||a.getMonth()===11&&(a.getDate()<=16||a.getDate()>=25)){if(r==="g2019")e.special&&e.special.gift&&(delete e.special.gift[r],e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=100,e.stats.antiplasmid+=100,I(t("city_gift_msg",[100,t("arpa_genepool_effect_antiplasmid")]),"info",!1,["events"])):(e.prestige.Plasmid.count+=100,e.stats.plasmid+=100,I(t("city_gift_msg",[100,t("arpa_genepool_effect_plasmid")]),"info",!1,["events"])),Rt());else if(e.special&&e.special.gift){delete e.special.gift[r];let i=e.stats.hasOwnProperty("reset")?e.stats.reset:0,s=e.stats.hasOwnProperty("mad")?e.stats.mad:0,n=e.stats.hasOwnProperty("bioseed")?e.stats.bioseed:0,c=e.stats.hasOwnProperty("cataclysm")?e.stats.cataclysm:0,o=100+i+s,l=n+c,u=[];if(e.stats.died+e.stats.tdied>0){let d=e.stats.died+e.stats.tdied;e.resource.Coal.amount+=d,u.push(`${d.toLocaleString()} ${t("resource_Coal_name")}`)}if(e.race.universe==="antimatter"?(e.prestige.AntiPlasmid.count+=o,e.stats.antiplasmid+=o,u.push(`${o.toLocaleString()} ${t("resource_AntiPlasmid_plural_name")}`)):(e.prestige.Plasmid.count+=o,e.stats.plasmid+=o,u.push(`${o.toLocaleString()} ${t("resource_Plasmid_plural_name")}`)),l>0&&(e.prestige.Phage.count+=l,e.stats.phage+=l,u.push(`${l.toLocaleString()} ${t("resource_Phage_name")}`)),e.stats.hasOwnProperty("achieve")){let d=e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:0;d+=e.stats.achieve.heavy?e.stats.achieve.heavy.l:0,d+=e.stats.achieve.canceled?e.stats.achieve.canceled.l:0,d+=e.stats.achieve.eviltwin?e.stats.achieve.eviltwin.l:0,d+=e.stats.achieve.microbang?e.stats.achieve.microbang.l:0,d+=e.stats.achieve.pw_apocalypse?e.stats.achieve.pw_apocalypse.l:0;let h=e.stats.achieve.ascended?e.stats.achieve.ascended.l:0,p=e.stats.achieve.corrupted?e.stats.achieve.corrupted.l:0,f=e.stats.achieve.obsolete?e.stats.achieve.obsolete.l:0;if(d>30&&(d=30),h>5&&(h=5),p>5&&(p=5),d>0){let g=+(d/7.5).toFixed(2);e.prestige.Dark.count+=g,e.stats.dark+=g,u.push(`${g} ${t("resource_Dark_name")}`)}if(h>0&&(e.prestige.Harmony.count+=h,e.stats.harmony+=h,u.push(`${h} ${t("resource_Harmony_name")}`)),p>0){let g=p*5,w=p;e.prestige.Blood_Stone.count+=g,e.stats.blood+=g,e.prestige.Artifact.count+=w,e.stats.artifact+=w,u.push(`${g} ${t("resource_Blood_Stone_name")}`),u.push(`${w} ${t("resource_Artifact_name")}`)}r!=="g2020"&&f>0&&(e.prestige.AICore.count+=f,e.stats.cores+=f,u.push(`${f} ${t("resource_AICore_name")}`))}I(t("city_gift2_msg",[u.join(", ")]),"info",!1,["events"]),Rt()}}}return!1},touchlabel:t("open")},food:{id:"city-food",title(){return oa().active?e.tech.conjuring?t("city_trick_conjure"):t("city_trick"):e.tech.conjuring?t("city_food_conjure"):t("city_food")},desc(){let a=$(this)[0].val(!1),r=oa();return e.race.fasting?t("city_food_fasting"):r.active?e.tech.conjuring?t("city_trick_conjure_desc",[a]):t("city_trick_desc",[a]):e.tech.conjuring?t("city_food_conjure_desc",[a]):t("city_food_desc",[a])},category:"outskirts",reqs:{primitive:1},not_trait:["soul_eater","cataclysm","artifical"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring?1:0}},action(){return e.settings.pause||(e.resource.Food.amount=1&&(r*=10,e.resource.Food.amount=2?t("city_dig_conjour"):t("city_dig"):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure"):t("city_lumber")},desc(){let a=$(this)[0].val(!1);return oa().active?e.tech.conjuring&&e.tech.conjuring>=2?t("city_dig_conjour_desc",[a]):t("city_dig_desc",[a]):e.tech.conjuring&&e.tech.conjuring>=2?t("city_lumber_conjure_desc",[a]):t("city_lumber_desc",[a])},category:"outskirts",reqs:{},not_trait:["evil","cataclysm"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||(e.resource.Lumber.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Lumber.amount=2?t("city_conjour",[e.resource.Stone.name]):t("city_gather",[e.resource.Stone.name])},desc(){let a=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[a,e.resource.Stone.name]):t(e.race.sappy?"city_amber_desc":"city_stone_desc",[a,e.resource.Stone.name])},category:"outskirts",reqs:{primitive:2},not_trait:["cataclysm","lone_survivor"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||(e.resource.Stone.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Stone.amount=2?t("city_chrysotile_conjour"):t("city_gather",[e.resource.Chrysotile.name])},desc(){let a=$(this)[0].val(!1);return e.tech.conjuring&&e.tech.conjuring>=2?t("city_stone_conjour_desc",[a,e.resource.Chrysotile.name]):t("city_stone_desc",[a,e.resource.Chrysotile.name])},category:"outskirts",reqs:{primitive:2},trait:["smoldering"],not_trait:["cataclysm","lone_survivor"],queue_complete(){return 0},cost:{Mana(){return e.tech.conjuring&&e.tech.conjuring>=2?1:0}},action(){return e.settings.pause||e.resource.Chrysotile.amount=2&&e.resource.Mana.amount>=1&&(r*=10,e.resource.Chrysotile.amounte.resource.Slave.amount&&_($(this)[0])?(e.resource.Slave.amount++,!0):!1},touchlabel:t("purchase")},s_alter:{id:"city-s_alter",title:t("city_s_alter"),desc(){return e.city.hasOwnProperty("s_alter")&&e.city.s_alter.count>=1?`
${t("city_s_alter")}
${t("city_s_alter_desc")}
`:t("city_s_alter")},category:"outskirts",reqs:{mining:1},trait:["cannibalize"],not_trait:["cataclysm","lone_survivor"],inflation:!1,cost:{Stone(a){return(a||0)+(e.city.hasOwnProperty("s_alter")?e.city.s_alter.count:0)>=1?0:100}},effect(){let a=e.civic[e.civic.d_job]?e.civic[e.civic.d_job].workers:0,r=`
${t("city_s_alter_sacrifice",[a])}
`;if(e.city.hasOwnProperty("s_alter")&&e.city.s_alter.rage>0&&(r=r+`
${t("city_s_alter_rage",[b.cannibalize.vars()[0],lt(e.city.s_alter.rage)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.regen>0&&(r=r+`
${t("city_s_alter_regen",[b.cannibalize.vars()[0],lt(e.city.s_alter.regen)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mind>0&&(r=r+`
${t("city_s_alter_mind",[b.cannibalize.vars()[0],lt(e.city.s_alter.mind)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.mine>0&&(r=r+`
${t("city_s_alter_mine",[b.cannibalize.vars()[0],lt(e.city.s_alter.mine)])}
`),e.city.hasOwnProperty("s_alter")&&e.city.s_alter.harvest>0){let i=e.race.evil&&!e.race.soul_eater?t("job_reclaimer"):t("job_lumberjack");r=r+`
${t("city_s_alter_harvest",[b.cannibalize.vars()[0],lt(e.city.s_alter.harvest),i])}
`}return r},action(){if(_($(this)[0])){if(e.city.s_alter.count===0)e.city.s_alter.count++;else if(e.civic[e.civic.d_job].workers>0){e.resource[e.race.species].amount--,e.civic[e.civic.d_job].workers--,e.stats.sac++,et("Food",Math.rand(250,1e3),!0);let r=300,i=600;if(e.tech.sacrifice)switch(e.tech.sacrifice){case 1:r=600,i=1500;break;case 2:r=1800,i=3600;break;case 3:r=5400,i=16200;break}switch(e.race.kindling_kindred||e.race.smoldering?Math.rand(0,4):Math.rand(0,5)){case 0:e.city.s_alter.rage+=Math.rand(r,i);break;case 1:e.city.s_alter.mind+=Math.rand(r,i);break;case 2:e.city.s_alter.regen+=Math.rand(r,i);break;case 3:e.city.s_alter.mine+=Math.rand(r,i);break;case 4:e.city.s_alter.harvest+=Math.rand(r,i);break}}return!0}return!1},touchlabel:t("tech_dist_sacrifice")},basic_housing:{id:"city-basic_housing",title(){return Co()},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},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.basic_housing?e.city.basic_housing.count:0)+a>=5?O("basic_housing",a,20,1.17):0},Lumber(a){return e.race.kindling_kindred||e.race.smoldering?0:O("basic_housing",a,10,1.23)},Stone(a){return e.race.kindling_kindred?O("basic_housing",a,10,1.23):0},Chrysotile(a){return e.race.smoldering?O("basic_housing",a,10,1.23):0},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.sappy?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_grove_effect",[2.5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.basic_housing.count++,e.settings.showCivic=!0,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},cottage:{id:"city-cottage",title(){return $e("medium")},desc(){return t("city_cottage_desc",[$(this)[0].citizens()])},category:"residential",reqs:{housing:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("cottage",a,900,1.15)},Plywood(a){return O("cottage",a,25,1.25)},Brick(a){return O("cottage",a,20,1.25)},Wrought_Iron(a){return O("cottage",a,15,1.25)},Iron(a){return e.city.ptrait.includes("unstable")?O("cottage",a,5,1.25):0},Horseshoe(){return e.race.hooved?2:0}},effect(){let a=$(this)[0].citizens();if(e.tech.home_safe){let r=E(e.tech.home_safe>=2?e.tech.home_safe>=3?5e3:2e3:1e3);return`
${t("plus_max_citizens",[a])}
${t("plus_max_resource",[`$${r.toLocaleString()}`,t("resource_Money_name")])}
`}else return t("plus_max_citizens",[a])},action(){return _($(this)[0])?(e.resource[e.race.species].max+=$(this)[0].citizens(),e.city.cottage.count++,!0):!1},citizens(){let a=2;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},apartment:{id:"city-apartment",title(){return $e("large")},desc(){return`
${t("city_apartment_desc",[$(this)[0].citizens()])}
${t("requires_power")}
`},category:"residential",reqs:{housing:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("apartment",a,1750,1.26)-500},Crystal(a){return e.race.universe==="magic"?O("apartment",a,25,1.22):0},Furs(a){return O("apartment",a,725,1.32)-500},Copper(a){return O("apartment",a,650,1.32)-500},Cement(a){return O("apartment",a,700,1.32)-500},Steel(a){return O("apartment",a,800,1.32)-500},Horseshoe(){return e.race.hooved?5:0}},effect(){let a=J("extravagant",2),r=$(this)[0].citizens();if(e.tech.home_safe){let i=E(e.tech.home_safe>=2?e.tech.home_safe>=3?1e4:5e3:2e3);return a&&(i*=2),`
${t("plus_max_citizens",[r])}. ${t("minus_power",[$(this)[0].powered()])}
${t("plus_max_resource",[`$${i.toLocaleString()}`,t("resource_Money_name")])}
`}else return`${t("plus_max_citizens",[r])}. ${t("minus_power",[$(this)[0].powered()])}`},powered(){let a=J("extravagant",1);return N(a||1)},action(){return _($(this)[0])?(e.city.apartment.count++,z($(this)[0])&&(e.resource[e.race.species].max+=$(this)[0].citizens()),!0):!1},citizens(){let a=J("extravagant",2),r=a?5+a:5;return e.race.high_pop&&(r*=b.high_pop.vars()[0]),r}},lodge:{id:"city-lodge",title:t("city_lodge"),desc(){return e.race.detritivore?t("city_lodge_desc_alt"):t("city_lodge_desc")},category:"residential",reqs:{housing:1,currency:1},not_trait:["cataclysm","lone_survivor"],condition(){return!!((e.race.soul_eater||e.race.detritivore||e.race.artifical||e.race.unfathomable)&&e.tech.s_lodge||e.tech.hunting&&e.tech.hunting>=2)},cost:{Money(a){return O("lodge",a,50,1.32)},Lumber(a){return O("lodge",a,20,1.36)},Stone(a){return O("lodge",a,10,1.36)},Horseshoe(){return e.race.hooved?1:0}},effect(){let a=$(this)[0].citizens();return e.race.carnivore&&!e.race.artifical?`
${t("plus_max_resource",[a,t("citizen")])}
${t("city_lodge_effect",[5])}
`:t("plus_max_resource",[a,t("citizen")])},action(){return _($(this)[0])?(e.city.lodge.count++,e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=1,e.settings.showCivic=!0,!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}},smokehouse:{id:"city-smokehouse",title(){return e.race.hrt&&["wolven","vulpine"].includes(e.race.hrt)?t("city_smokehouse_easter"):t("city_smokehouse")},desc:t("city_smokehouse_desc"),category:"trade",reqs:{hunting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("smokehouse",a,85,1.32)},Lumber(a){return O("smokehouse",a,65,1.36)},Stone(a){return O("smokehouse",a,50,1.36)}},effect(){let a=Et(E(100));return`
${t("plus_max_resource",[a,t("resource_Food_name")])}
${t("city_smokehouse_effect",[10])}
`},action(){return _($(this)[0])?(e.city.smokehouse.count++,e.resource.Food.max+=Et(E(100)),!0):!1}},soul_well:{id:"city-soul_well",title:t("city_soul_well"),desc:t("city_soul_well_desc"),category:"trade",reqs:{soul_eater:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.soul_well?e.city.soul_well.count:0)+a>=3?O("soul_well",a,50,1.32):0},Lumber(a){return O("soul_well",a,20,1.36)},Stone(a){return O("soul_well",a,10,1.36)}},effect(){let a=Et(E(500)),r=e.race.ghostly?2+b.ghostly.vars()[1]:2;return`
${t("city_soul_well_effect",[r])}
${t("plus_max_resource",[a,t("resource_Souls_name")])}
`},action(){return _($(this)[0])?(e.city.soul_well.count++,e.resource.Food.max+=Et(E(500)),!0):!1}},slave_pen:{id:"city-slave_pen",title:t("city_slave_pen"),desc:t("city_slave_pen"),category:"commercial",reqs:{slaves:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("slave_pen",a,250,1.32)},Lumber(a){return O("slave_pen",a,100,1.36)},Stone(a){return O("slave_pen",a,75,1.36)},Copper(a){return O("slave_pen",a,10,1.36)},Nanite(a){return e.race.deconstructor?O("slave_pen",a,4,1.36):0}},effect(){let a=e.city.slave_pen?e.city.slave_pen.count*4:4,r=e.city.slave_pen?e.resource.Slave.amount:0;return`
${t("city_slave_pen_effect",[4])}
${t("city_slave_pen_effect2",[r,a])}
`},action(){return _($(this)[0])?(e.city.slave_pen.count++,e.resource.Slave.display=!0,e.resource.Slave.max=e.city.slave_pen.count*4,!0):!1}},transmitter:{id:"city-transmitter",title:t("city_transmitter"),desc(){return`
${t("city_transmitter_desc")}
${t("requires_power")}
`},category:"residential",reqs:{high_tech:4},trait:["artifical"],cost:{Money(a){return e.city.transmitter&&e.city.transmitter.count>=3?O("transmitter",a,50,1.32):0},Copper(a){return O("transmitter",a,20,1.36)},Steel(a){return O("transmitter",a,10,1.36)}},effect(){let a=+te("transmitter").toFixed(2),r=E(100);return`
${t("gain",[a,e.resource.Food.name])}
${t("city_transmitter_effect",[r])}
${t("minus_power",[$(this)[0].powered()])}
`},powered(){return N(.5)},powerBalancer(){return[{r:"Food",k:"lpmod"}]},action(){return _($(this)[0])?(e.city.transmitter.count++,z($(this)[0]),!0):!1}},captive_housing:ft("captive_housing","city"),farm:{id:"city-farm",title:t("city_farm"),desc:t("city_farm_desc"),category:"residential",reqs:{agriculture:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.farm?e.city.farm.count:0)+a>=3?O("farm",a,50,1.32):0},Lumber(a){return O("farm",a,20,1.36)},Stone(a){return O("farm",a,10,1.36)},Horseshoe(a){return e.race.hooved&&(e.city.farm?e.city.farm.count:0)+(a||0)>=2?1:0}},effect(){let a=$(this)[0].citizens();return e.tech.farm?`
${t("city_farm_effect")}
${t("plus_max_resource",[a,t("citizen")])}
`:t("city_farm_effect")},action(){return _($(this)[0])?(e.city.farm.count++,e.race.fasting?(e.civic.farmer.display=!1,e.civic.farmer.assigned=0):e.civic.farmer.display=!0,e.tech.farm&&(e.resource[e.race.species].display=!0,e.resource[e.race.species].max+=$(this)[0].citizens(),e.settings.showCivic=!0),!0):!1},citizens(){let a=1;return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a},flair(){return e.tech.agriculture>=7?t("city_farm_flair2"):t("city_farm_flair1")}},compost:{id:"city-compost",title:t("city_compost_heap"),desc:t("city_compost_heap_desc"),category:"residential",reqs:{compost:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.compost?e.city.compost.count:0)+a>=3?O("compost",a,50,1.32):0},Lumber(a){return O("compost",a,12,1.36)},Stone(a){return O("compost",a,12,1.36)}},effect(){let a=1.2+(e.tech.compost?e.tech.compost:0)*.8;a*=e.city.biome==="grassland"?he.grassland.vars()[0]:1,a*=e.city.biome==="savanna"?he.savanna.vars()[0]:1,a*=e.city.biome==="ashland"?he.ashland.vars()[0]:1,a*=e.city.biome==="volcanic"?he.volcanic.vars()[0]:1,a*=e.city.biome==="hellscape"?he.hellscape.vars()[0]:1,a*=e.city.ptrait.includes("trashed")?Fe.trashed.vars()[0]:1,a=+a.toFixed(2);let r=Et(E(200)),i=e.race.kindling_kindred||e.race.smoldering?"":`
${t("city_compost_heap_effect2",[.5,e.resource.Lumber.name])}
`;return`
${t("city_compost_heap_effect",[a])}
${t("city_compost_heap_effect3",[r])}
${i}`},switchable(){return!0},action(){return _($(this)[0])?(e.city.compost.count++,e.city.compost.on++,e.resource.Food.max+=Et(E(200)),!0):!1}},mill:{id:"city-mill",title(){return e.tech.agriculture>=5?t("city_mill_title2"):t("city_mill_title1")},desc(){let a=e.tech.agriculture>=5?5:3;if(e.tech.agriculture>=6){let r=$(this)[0].powered()*-1;return t("city_mill_desc2",[a,r])}else return t("city_mill_desc1",[a])},category:"utility",reqs:{agriculture:4},not_tech:["wind_plant"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mill",a,1e3,1.31)},Lumber(a){return O("mill",a,600,1.33)},Iron(a){return O("mill",a,150,1.33)},Cement(a){return O("mill",a,125,1.33)}},powered(){return e.race.environmentalist?-1.5:-1},power_reqs:{agriculture:6},effect(){return e.tech.agriculture>=6?`${t("city_on")} ${t("city_mill_effect1")} ${t("city_off")} ${t("city_mill_effect2")}`:!1},action(){return _($(this)[0])?(e.city.mill.count++,!0):!1}},windmill:{id:"city-windmill",title(){return e.race.unfathomable?t("tech_watermill"):t("city_mill_title2")},desc(){return e.race.unfathomable?t("tech_watermill"):t("city_mill_title2")},wiki:!1,category:"utility",reqs:{wind_plant:1},not_trait:["cataclysm","lone_survivor"],powered(){return e.race.environmentalist?-1.5:-1},power_reqs:{false:1},cost:{Money(a){return O("windmill",a,1e3,1.31)},Lumber(a){return O("windmill",a,600,1.33)},Iron(a){return O("windmill",a,150,1.33)},Cement(a){return O("windmill",a,125,1.33)}},effect(){let a=$(this)[0].powered()*-1;return`
${t("space_dwarf_reactor_effect1",[a])}
`},action(){return _($(this)[0])?(e.city.windmill.count++,!0):!1}},silo:{id:"city-silo",title:t("city_silo"),desc:t("city_food_storage"),category:"trade",reqs:{agriculture:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("silo",a,85,1.32)},Lumber(a){return O("silo",a,65,1.36)},Stone(a){return O("silo",a,50,1.36)},Iron(a){return(e.city.silo?e.city.silo.count:0)+(a||0)>=4&&e.city.ptrait.includes("unstable")?O("silo",a,10,1.36):0}},effect(){let a=Et(E(500));return t("plus_max_resource",[a,t("resource_Food_name")])},action(){return _($(this)[0])?(e.city.silo.count++,e.resource.Food.max+=Et(E(500)),!0):!1}},assembly:ft("assembly","city"),garrison:{id:"city-garrison",title(){return e.race.flier?t("city_garrison_flier"):t("city_garrison")},desc:t("city_garrison_desc"),category:"military",reqs:{military:1,housing:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("garrison",a,240,1.5)},Stone(a){return O("garrison",a,260,1.46)},Iron(a){return(e.city.garrison?e.city.garrison.count:0)+(a||0)>=4&&e.city.ptrait.includes("unstable")?O("garrison",a,50,1.4):0},Horseshoe(){return e.race.hooved?e.race.chameleon?1:2:0}},effect(){let a=e.tech.military>=5?F(3):F(2);return e.race.chameleon&&a--,t("plus_max_resource",[a,t("civics_garrison_soldiers")])},switchable(){return!0},action(){if(_($(this)[0])){e.settings.showMil=!0,e.settings.msgFilters.combat.unlocked||(e.settings.msgFilters.combat.unlocked=!0,e.settings.msgFilters.combat.vis=!0),e.civic.garrison.display||(e.civic.garrison.display=!0,C({el:"#garrison"},"update"),C({el:"#c_garrison"},"update"));let a=e.tech.military>=5?3:2;return e.race.chameleon&&(a-=e.city.garrison.count),e.civic.garrison.max+=F(a),e.city.garrison.count++,e.city.garrison.on++,e.resource.Furs.display=!0,!0}return!1}},hospital:{id:"city-hospital",title:t("city_hospital"),desc:t("city_hospital_desc"),category:"military",reqs:{medic:1},not_trait:["cataclysm","artifical"],cost:{Money(a){return O("hospital",a,22e3,1.32)},Furs(a){return O("hospital",a,4e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("hospital",a,500,1.32):0},Aluminium(a){return O("hospital",a,1e4,1.32)}},effect(){let a=e.tech.reproduction&&e.tech.reproduction>=2?`
${t("city_hospital_effect2")}
`:"",r=e.tech.medic*5,i=`
${t("city_hospital_effect",[r])}
${a}`;return!e.race.artifical&&e.race.hasOwnProperty("vax")&&(i=i+`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return _($(this)[0])?(e.city.hospital.count++,!0):!1}},boot_camp:{id:"city-boot_camp",title(){return e.race.artifical?t("city_boot_camp_art"):t("city_boot_camp")},desc(){return e.race.artifical?t("city_boot_camp_art_desc",[x[e.race.species].name]):t("city_boot_camp_desc")},category:"military",reqs:{boot_camp:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("boot_camp",a,5e4,1.32)},Lumber(a){return O("boot_camp",a,21500,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("boot_camp",a,300,1.32):0},Aluminium(a){return O("boot_camp",a,12e3,1.32)},Brick(a){return O("boot_camp",a,1400,1.32)}},effect(){let a=e.tech.boot_camp>=2?8:5;e.blood.lust&&(a+=e.blood.lust*.2);let r=J("militant",0);r&&(a*=1+r/100);let i=e.tech.spy&&e.tech.spy>=3?`
${t("city_boot_camp_effect",[a])}
${t("city_boot_camp_effect2",[10])}
`:`
${t("city_boot_camp_effect",[a])}
`;if(e.race.artifical&&!e.race.orbit_decayed){let s=e.tech.medic||1;i+=`
${t("city_boot_camp_art_effect",[s*5])}
`}return e.race.artifical&&e.race.hasOwnProperty("vax")&&(i+=`
${t("tau_home_disease_lab_vax",[+e.race.vax.toFixed(2)])}
`),i},action(){return _($(this)[0])?(e.city.boot_camp.count++,!0):!1}},shed:{id:"city-shed",title(){return e.tech.storage<=2?t("city_shed_title1"):e.tech.storage>=4?t("city_shed_title3"):t("city_shed_title2")},desc(){let a=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",[a])},category:"trade",reqs:{storage:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("shed",a,75,1.22)},Lumber(a){return e.tech.storage&&e.tech.storage<4?O("shed",a,55,1.32):0},Stone(a){return e.tech.storage&&e.tech.storage<3?O("shed",a,45,1.32):0},Iron(a){return e.tech.storage&&e.tech.storage>=4?O("shed",a,22,1.32):0},Cement(a){return e.tech.storage&&e.tech.storage>=3?O("shed",a,18,1.32):0}},res(){let a=["Lumber","Stone","Chrysotile","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal"];return e.tech.storage>=3&&e.resource.Steel.display&&a.push("Steel"),e.tech.storage>=4&&e.resource.Titanium.display&&a.push("Titanium"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Graphene.display&&a.push("Graphene"),e.tech.shelving&&e.tech.shelving>=3&&e.resource.Stanene.display&&a.push("Stanene"),e.race.unfathomable&&a.push("Food"),a},val(a){switch(a){case"Food":return 50;case"Lumber":return 300;case"Stone":return 300;case"Chrysotile":return 300;case"Crystal":return 8;case"Furs":return 125;case"Copper":return 90;case"Iron":return 125;case"Aluminium":return 90;case"Cement":return 100;case"Coal":return 75;case"Steel":return 40;case"Titanium":return 20;case"Graphene":return 15;case"Stanene":return 25;default:return 0}},effect(a){let r='
',i=Oi(a);for(let s of $(this)[0].res())if(e.resource[s].display){let n=Y(+(E($(this)[0].val(s))*i).toFixed(0),1);r=r+`${t("plus_max_resource",[n,e.resource[s].name])}`}return r=r+"
",r},wide:!0,action(){if(_($(this)[0])){e.city.shed.count++;let a=Oi();for(let r of $(this)[0].res())e.resource[r].display&&(e.resource[r].max+=E($(this)[0].val(r)*a));return!0}return!1}},storage_yard:{id:"city-storage_yard",title:t("city_storage_yard"),desc:t("city_storage_yard_desc"),category:"trade",reqs:{container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("storage_yard",a,10,Xr(1.36))},Brick(a){return O("storage_yard",a,3,Xr(1.35))},Wrought_Iron(a){return O("storage_yard",a,5,Xr(1.35))}},effect(){let a=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.tech.trade&&e.tech.trade>=3?`
${t("plus_max_resource",[a,t("resource_Crates_name")])}
${t("city_trade_effect",[1])}
`:t("plus_max_resource",[a,t("resource_Crates_name")])},action(){if(_($(this)[0])){e.city.storage_yard.count++;let a=e.tech.container>=3?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Crates.max+=a,e.resource.Crates.display||bo(),!0}return!1}},warehouse:{id:"city-warehouse",title:t("city_warehouse"),desc:t("city_warehouse_desc"),category:"trade",reqs:{steel_container:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("warehouse",a,400,Xr(1.26))},Cement(a){return O("warehouse",a,75,Xr(1.26))},Sheet_Metal(a){return O("warehouse",a,25,Xr(1.25))}},effect(){let a=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),t("plus_max_resource",[a,t("resource_Containers_name")])},action(){if(_($(this)[0])){e.city.warehouse.count++;let a=e.tech.steel_container>=2?20:10;return e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2&&(a+=10),e.tech.world_control&&(a+=10),e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},bank:{id:"city-bank",title:t("city_bank"),desc(){let a=x[e.race.species].home;return t("city_bank_desc",[a])},category:"commercial",reqs:{banking:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("bank",a,250,1.35)},Lumber(a){return O("bank",a,75,1.32)},Stone(a){return O("bank",a,100,1.35)},Iron(a){return(e.city.bank?e.city.bank.count:0)+(a||0)>=2&&e.city.ptrait.includes("unstable")?O("bank",a,30,1.3):0}},effect(){let a=ja();return a=E(a),a=(+a.toFixed(0)).toLocaleString(),e.tech.banking>=2?`
${t("plus_max_resource",[`$${a}`,t("resource_Money_name")])}
${t("plus_max_resource",[F(1),t("banker_name")])}
`:t("plus_max_resource",[`$${a}`,t("resource_Money_name")])},action(){return _($(this)[0])?(e.resource.Money.max+=E(1800),e.city.bank.count++,e.civic.banker.max=F(e.city.bank.count),!0):!1}},pylon:{id:"city-pylon",title:t("city_pylon"),desc:t("city_pylon"),category:"industrial",reqs:{magic:2},not_trait:["cataclysm","orbit_decayed"],cost:{Money(a){return a=a||0,(e.city.pylon?e.city.pylon.count:0)+a>=2?O("pylon",a,10,1.48):0},Stone(a){return O("pylon",a,12,1.42)},Crystal(a){return O("pylon",a,8,1.42)-3}},effect(){let a=E(5),r=+(.01*fe("magic")).toFixed(3);return`
${t("gain",[r,e.resource.Mana.name])}
${t("plus_max_resource",[a,e.resource.Mana.name])}
`},special(){return!!(e.tech.magic&&e.tech.magic>=3)},action(){return _($(this)[0])?(e.city.pylon.count++,e.resource.Mana.max+=E(5),!0):!1}},conceal_ward:{id:"city-conceal_ward",title:t("city_conceal_ward"),desc:t("city_conceal_ward"),category:"industrial",reqs:{roguemagic:3},not_trait:["cataclysm","orbit_decayed"],cost:{Money(a){return O("conceal_ward",a,500,1.25)},Mana(a){return O("conceal_ward",a,yu(42),1.25)},Crystal(a){return O("conceal_ward",a,5,1.25)}},effect(){let a=e.tech.roguemagic&&e.tech.roguemagic>=8?1.25:1;return`
${t("city_conceal_ward_effect",[a])}
`},action(){return _($(this)[0])?(e.city.conceal_ward.count++,!0):!1}},graveyard:{id:"city-graveyard",title:t("city_graveyard"),desc:t("city_graveyard_desc"),category:"industrial",reqs:{reclaimer:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.graveyard?e.city.graveyard.count:0)+a>=5?O("graveyard",a,5,1.85):0},Lumber(a){return O("graveyard",a,2,1.95)},Stone(a){return O("graveyard",a,6,1.9)}},effect(){let a=Et(E(100));return`
${t("city_graveyard_effect",[8])}
${t("plus_max_resource",[a,e.resource.Lumber.name])}
`},action(){return _($(this)[0])?(e.city.graveyard.count++,e.resource.Lumber.max+=Et(E(100)),!0):!1}},lumber_yard:{id:"city-lumber_yard",title:t("city_lumber_yard"),desc:t("city_lumber_yard_desc"),category:"industrial",reqs:{axe:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return a=a||0,(e.city.lumber_yard?e.city.lumber_yard.count:0)+a>=5?O("lumber_yard",a,5,1.85):0},Lumber(a){return O("lumber_yard",a,6,1.9)},Stone(a){return O("lumber_yard",a,2,1.95)}},effect(){let a=Et(E(100));return`
${t("city_lumber_yard_effect",[2])}
${t("plus_max_resource",[a,e.resource.Lumber.name])}
`},action(){return _($(this)[0])?(e.city.lumber_yard.count++,e.civic.lumberjack.display=!0,e.resource.Lumber.max+=Et(E(100)),!0):!1}},sawmill:{id:"city-sawmill",title:t("city_sawmill"),desc:t("city_sawmill_desc"),category:"industrial",reqs:{saw:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("sawmill",a,3e3,1.26)},Iron(a){return O("sawmill",a,400,1.26)},Cement(a){return O("sawmill",a,420,1.26)}},effect(){let a=e.tech.saw>=2?8:5,r=Et(E(200)),i=`
${t("plus_max_resource",[r,e.resource.Lumber.name])}
${t("city_lumber_yard_effect",[a])}
`;return e.tech.foundry&&e.tech.foundry>=4&&(i=i+`
${t("city_sawmill_effect2",[2])}
`),e.city.powered&&(i=i+`
${t("city_sawmill_effect3",[4,$(this)[0].powered()])}
`),i},powered(){return N(1)},powerBalancer(){return e.city.sawmill.hasOwnProperty("psaw")?[{r:"Lumber",k:"psaw"}]:!1},action(){return _($(this)[0])?(e.city.sawmill.count++,e.resource.Lumber.max+=Et(E(200)),z($(this)[0]),!0):!1}},rock_quarry:{id:"city-rock_quarry",title(){return e.race.flier?t("city_rock_quarry_alt"):t("city_rock_quarry")},desc(){return e.race.flier?t("city_rock_quarry_desc_alt",[e.resource.Stone.name]):t("city_rock_quarry_desc")},category:"industrial",reqs:{mining:1},not_trait:["cataclysm","sappy"],cost:{Money(a){return a=a||0,(e.city.rock_quarry?e.city.rock_quarry.count:0)+a>=2?O("rock_quarry",a,20,1.45):0},Lumber(a){return O("rock_quarry",a,50,1.36)},Stone(a){return O("rock_quarry",a,10,1.36)}},effect(){let a=Et(E(100)),r=e.race.smoldering?`
${t("plus_max_resource",[a,e.resource.Chrysotile.name])}
`:"";return e.tech.mine_conveyor?`
${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[a,e.resource.Stone.name])}
${r}
${t("city_rock_quarry_effect2",[4,$(this)[0].powered()])}
`:`
${t("city_rock_quarry_effect1",[2])}
${t("plus_max_resource",[a,e.resource.Stone.name])}
${r}`},special(){return!!e.race.smoldering},powered(){return N(1)},powerBalancer(){return e.city.rock_quarry.hasOwnProperty("cnvay")?e.city.hasOwnProperty("metal_refinery")&&e.city.rock_quarry.hasOwnProperty("almcvy")?[{r:"Stone",k:"cnvay"},{r:"Aluminium",k:"almcvy"}]:[{r:"Stone",k:"cnvay"}]:!1},power_reqs:{mine_conveyor:1},action(){if(_($(this)[0])){e.city.rock_quarry.count++,e.civic.quarry_worker.display=!0;let a=Et(E(100));return e.resource.Stone.max+=a,e.race.smoldering&&e.resource.Chrysotile.display&&(e.settings.showCivic=!0,e.settings.showIndustry=!0,e.resource.Chrysotile.max+=a),e.tech.mine_conveyor&&z($(this)[0]),!0}return!1}},cement_plant:{id:"city-cement_plant",title:t("city_cement_plant"),desc:t("city_cement_plant_desc"),category:"industrial",reqs:{cement:1},not_trait:["cataclysm","lone_survivor","flier"],cost:{Money(a){return O("cement_plant",a,3e3,1.5)},Lumber(a){return O("cement_plant",a,1800,1.36)},Stone(a){return O("cement_plant",a,2e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("cement_plant",a,275,1.32):0}},effect(){if(e.tech.cement>=5){let a=e.tech.cement>=6?8:5;return`
${t("city_cement_plant_effect1",[F(2)])}
${t("city_cement_plant_effect2",[$(this)[0].powered(),a])}
`}else return t("city_cement_plant_effect1",[F(2)])},powered(){return N(2)},powerBalancer(){return e.city.cement_plant.hasOwnProperty("cnvay")?[{r:"Cement",k:"cnvay"}]:!1},power_reqs:{cement:5},action(){return _($(this)[0])?(e.resource.Cement.display=!0,e.city.cement_plant.count++,e.civic.cement_worker.display=!0,e.civic.cement_worker.max=e.city.cement_plant.count*F(2),e.tech.cement&&e.tech.cement>=5&&z($(this)[0]),!0):!1}},foundry:{id:"city-foundry",title:t("city_foundry"),desc:t("city_foundry_desc"),category:"industrial",reqs:{foundry:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("foundry",a,750,1.36)},Stone(a){return O("foundry",a,100,1.36)},Copper(a){return O("foundry",a,250,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("foundry",a,40,1.36):0}},effect(){let a=`
${t("city_foundry_effect1",[F(1)])}
`;if(e.tech.foundry>=2){let r=e.tech.foundry>=5?e.tech.foundry>=8?8:5:3;a=a+`
${t("city_crafted_mats",[r])}
`}return e.tech.foundry>=6&&(a=a+`
${t("city_foundry_effect2",[2])}
`),a},action(){return _($(this)[0])?(e.city.foundry.count===0&&(e.race.no_craft?I(t("city_foundry_msg2"),"info",!1,["progress"]):I(t("city_foundry_msg1"),"info",!1,["progress"])),e.city.foundry.count++,e.civic.craftsman.max+=F(1),e.civic.craftsman.display=!0,!e.race.kindling_kindred&&!e.race.smoldering&&(e.resource.Plywood.display=!0),e.resource.Brick.display=!0,e.resource.Iron.display&&(e.resource.Wrought_Iron.display=!0),e.resource.Aluminium.display&&(e.resource.Sheet_Metal.display=!0),Xe(),!0):!1}},factory:{id:"city-factory",title:t("city_factory"),desc:`
${t("city_factory_desc")}
${t("requires_power")}
`,category:"industrial",reqs:{high_tech:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("factory",a,25e3,Oe(1.32))},Cement(a){return O("factory",a,1e3,Oe(1.32))},Steel(a){return O("factory",a,7500,Oe(1.32))},Titanium(a){return O("factory",a,2500,Oe(1.32))}},effect(){let a=`
${t("city_factory_effect")}
${t("minus_power",[$(this)[0].powered()])}
`;return e.tech.foundry>=7&&(a=a+`
${t("city_crafted_mats",[5])}
`),a},powered(){return N(3)},special:!0,action(){return _($(this)[0])?(e.city.factory.count++,e.resource.Alloy.display=!0,e.tech.polymer&&(e.resource.Polymer.display=!0),z($(this)[0])&&e.city.factory.Alloy++,e.settings.showIndustry=!0,Pe(),!0):!1}},nanite_factory:ft("nanite_factory","city"),smelter:{id:"city-smelter",title:t("city_smelter"),desc:t("city_smelter_desc"),category:"industrial",reqs:{smelting:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("smelter",a,1e3,Oe(1.32))},Iron(a){return O("smelter",a,500,Oe(1.33))}},effect(){var a=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(a*=.9),e.tech.smelting>=2&&!e.race.steelen?t("city_smelter_effect2",[a]):t("city_smelter_effect1",[a])},special:!0,action(){return _($(this)[0])?(e.city.smelter.count++,e.race.kindling_kindred||e.race.smoldering||e.race.artifical?e.race.artifical?e.city.smelter.Oil++:e.race.evil?e.city.smelter.Wood++:e.city.smelter.Coal++:e.city.smelter.Wood++,e.city.smelter.Iron++,e.settings.showIndustry=!0,Pe(),!0):!1},flair:`
${t("city_smelter_flair1")}
${t("city_smelter_flair2")}
`},metal_refinery:{id:"city-metal_refinery",title:t("city_metal_refinery"),desc:t("city_metal_refinery_desc"),category:"industrial",reqs:{alumina:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("metal_refinery",a,2500,1.35)},Iron(a){return e.city.ptrait.includes("unstable")?O("metal_refinery",a,125,1.35):0},Steel(a){return O("metal_refinery",a,350,1.35)}},powered(){return N(2)},powerBalancer(){return e.city.metal_refinery.hasOwnProperty("pwr")?[{r:"Aluminium",k:"cnvay"}]:!1},power_reqs:{alumina:2},effect(){let a=e.race.sappy?"city_metal_refinery_effect_alt":"city_metal_refinery_effect";return e.tech.alumina>=2?`${t(a,[6])} ${t("city_metal_refinery_effect2",[6,12,$(this)[0].powered()])}`:t(a,[6])},action(){return _($(this)[0])?(e.city.metal_refinery.count++,e.resource.Aluminium.display=!0,e.city.foundry&&e.city.foundry.count>0&&!e.resource.Sheet_Metal.display&&(e.resource.Sheet_Metal.display=!0,Xe()),e.tech.alumina>=2&&z($(this)[0]),!0):!1}},mine:{id:"city-mine",title:t("city_mine"),desc:t("city_mine_desc"),category:"industrial",reqs:{mining:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mine",a,60,Oe(1.6))},Lumber(a){return O("mine",a,175,Oe(1.38))}},effect(){return e.tech.mine_conveyor?`
${t("city_mine_effect1",[F(1)])}
${t("city_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_mine_effect1",[F(1)])},powered(){return N(1)},powerBalancer(){return e.city.mine.hasOwnProperty("cpow")&&e.city.mine.hasOwnProperty("ipow")?[{r:"Copper",k:"cpow"},{r:"Iron",k:"ipow"}]:!1},power_reqs:{mine_conveyor:1},action(){return _($(this)[0])?(e.city.mine.count++,e.resource.Copper.display=!0,e.civic.miner.display=!0,e.civic.miner.max=F(e.city.mine.count),e.tech.mine_conveyor&&z($(this)[0]),!0):!1},flair(){return x[e.race.species].type==="avian"?t("city_mine_flair_avian"):""}},coal_mine:{id:"city-coal_mine",title:t("city_coal_mine"),desc:t("city_coal_mine_desc"),category:"industrial",reqs:{mining:4},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("coal_mine",a,480,Oe(1.4))},Lumber(a){return O("coal_mine",a,250,Oe(1.36))},Iron(a){return e.city.ptrait.includes("unstable")?O("coal_mine",a,28,Oe(1.36)):0},Wrought_Iron(a){return O("coal_mine",a,18,Oe(1.36))}},effect(){return e.tech.mine_conveyor?`
${t("city_coal_mine_effect1",[F(1)])}
${t("city_coal_mine_effect2",[$(this)[0].powered(),5])}
`:t("city_coal_mine_effect1",[F(1)])},powered(){return N(1)},powerBalancer(){return e.city.coal_mine.hasOwnProperty("cpow")&&e.city.coal_mine.hasOwnProperty("upow")&&e.resource.Uranium.display?[{r:"Coal",k:"cpow"},{r:"Uranium",k:"upow"}]:e.city.coal_mine.hasOwnProperty("cpow")?[{r:"Coal",k:"cpow"}]:!1},power_reqs:{mine_conveyor:1},action(){return _($(this)[0])?(e.city.coal_mine.count++,e.resource.Coal.display=!0,e.civic.coal_miner.display=!0,e.civic.coal_miner.max=F(e.city.coal_mine.count),e.tech.mine_conveyor&&z($(this)[0]),!0):!1}},oil_well:{id:"city-oil_well",title:t("city_oil_well"),desc:t("city_oil_well_desc"),category:"industrial",reqs:{oil:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_well",a,5e3,Oe(1.5))},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_well",a,450,Oe(1.5)):0},Cement(a){return O("oil_well",a,5250,Oe(1.5))},Steel(a){return O("oil_well",a,6e3,Oe(1.5))}},effect(){let a=+te("oil_well").toFixed(2),r=E(500);return t("city_oil_well_effect",[a,r])},action(){return _($(this)[0])?(e.city.oil_well.count++,e.resource.Oil.max+=E(500),e.city.oil_well.count===1&&(e.resource.Oil.display=!0,Pe()),!0):!1},flair:t("city_oil_well_flair")},oil_depot:{id:"city-oil_depot",title:t("city_oil_depot"),desc:t("city_oil_depot_desc"),category:"trade",reqs:{oil:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_depot",a,2500,Oe(1.46))},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_depot",a,325,Oe(1.36)):0},Cement(a){return O("oil_depot",a,3750,Oe(1.46))},Sheet_Metal(a){return O("oil_depot",a,100,Oe(1.45))}},effect(){let a=E(1e3);a*=e.tech.world_control?1.5:1;let r=`
${t("plus_max_resource",[a,e.resource.Oil.name])}.
`;if(e.resource.Helium_3.display){let i=E(400);i*=e.tech.world_control?1.5:1,r=r+`
${t("plus_max_resource",[i,e.resource.Helium_3.name])}.
`}if(e.tech.uranium>=2){let i=E(250);i*=e.tech.world_control?1.5:1,r=r+`
${t("plus_max_resource",[i,e.resource.Uranium.name])}.
`}return r},action(){return _($(this)[0])?(e.city.oil_depot.count++,e.resource.Oil.max+=E(1e3)*(e.tech.world_control?1.5:1),e.resource.Helium_3.display&&(e.resource.Helium_3.max+=E(400)*(e.tech.world_control?1.5:1)),e.tech.uranium>=2&&(e.resource.Uranium.max+=E(250)*(e.tech.world_control?1.5:1)),!0):!1}},trade:{id:"city-trade",title:t("city_trade"),desc:t("city_trade_desc"),category:"trade",reqs:{trade:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("trade",a,500,1.36)},Lumber(a){return O("trade",a,125,1.36)},Stone(a){return O("trade",a,50,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("trade",a,15,1.36):0},Furs(a){return O("trade",a,65,1.36)}},effect(){let a=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&a--,e.race.flier&&(a+=b.flier.vars()[1]),t("city_trade_effect",[a])},action(){if(_($(this)[0])){e.city.trade.count++;let a=e.race.xenophobic||e.race.nomadic?e.tech.trade:e.tech.trade+1;return e.tech.trade&&e.tech.trade>=3&&a--,e.city.market.mtrade+=a,!0}return!1}},wharf:{id:"city-wharf",title:t("city_wharf"),desc:t("city_wharf_desc"),category:"trade",era:"industrialized",reqs:{wharf:1},not_trait:["thalassophobia","cataclysm"],cost:{Money(a){return O("wharf",a,62e3,1.32)},Lumber(a){return O("wharf",a,44e3,1.32)},Iron(a){return e.city.ptrait.includes("unstable")?O("wharf",a,200,1.32):0},Cement(a){return O("wharf",a,3e3,1.32)},Oil(a){return O("wharf",a,750,1.32)}},effect(){let a=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(a*=2),`
${t("city_trade_effect",[2])}
${t("city_wharf_effect")}
${t("plus_max_crates",[a])}
${t("plus_max_containers",[a])}
`},action(){if(_($(this)[0])){e.city.wharf.count++,e.city.market.mtrade+=2;let a=e.tech.world_control?15:10;return e.tech.particles&&e.tech.particles>=2&&(a*=2),e.resource.Crates.max+=a,e.resource.Containers.max+=a,e.resource.Containers.display||sa(),!0}return!1}},tourist_center:{id:"city-tourist_center",title:t("city_tourist_center"),desc:t("city_tourist_center_desc"),category:"commercial",reqs:{monument:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("tourist_center",a,1e5,1.36)},Stone(a){return O("tourist_center",a,25e3,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("tourist_center",a,1e3,1.36):0},Furs(a){return O("tourist_center",a,7500,1.36)},Plywood(a){return O("tourist_center",a,5e3,1.36)}},effect(a){let r=e.tech.monument&&e.tech.monument>=3&&Qt(a)?3:1,i=(e.civic.govern.type==="corpocracy"?2:1)*r,s=(e.civic.govern.type==="corpocracy"?10:5)*r,n=(e.civic.govern.type==="corpocracy"?4:2)*r,c="";e.stats.achieve.banana&&e.stats.achieve.banana.l>=4&&(c=`
${t("city_tourist_center_effect5",[(e.civic.govern.type==="corpocracy"?6:3)*r])}
`);let o="",l=J("pious",1);return l&&(o=`
${t("city_tourist_center_effect6",[(e.civic.govern.type==="corpocracy"?l*2:l)*r])}
`),`
${t("city_tourist_center_effect1",[e.resource.Food.name])}
${t("city_tourist_center_effect2",[i,q.city.amphitheatre.title()])}
${t("city_tourist_center_effect3",[s])}
${t("city_tourist_center_effect4",[n])}
${c}${o}`},powered(){return 0},action(){return _($(this)[0])?(e.city.tourist_center.count++,e.city.tourist_center.on++,!0):!1}},amphitheatre:{id:"city-amphitheatre",title(){return J("athleticism",0)?t("city_stadium"):t("city_amphitheatre")},desc(){return J("athleticism",0)?t("city_stadium"):t("city_amphitheatre_desc")},category:"commercial",reqs:{theatre:1},not_trait:["joyless","cataclysm"],cost:{Money(a){return O("amphitheatre",a,500,1.55)},Lumber(a){return O("amphitheatre",a,50,1.75)},Stone(a){return O("amphitheatre",a,200,1.75)},Iron(a){return e.city.ptrait.includes("unstable")?O("amphitheatre",a,18,1.36):0}},effect(){let a=J("athleticism",0),r=J("athleticism",1);return`
${t("city_max_entertainer",[F(r||1)])}
${t("city_max_morale",[a||1])}
`},action(){if(_($(this)[0])){e.city.amphitheatre.count++;let a=J("athleticism",1);return e.civic.entertainer.max+=F(a||1),e.civic.entertainer.display=!0,!0}return!1},flair(){return J("athleticism",0)?t("city_stadium_flair"):t("city_amphitheatre_flair")}},casino:{id:"city-casino",title:t("city_casino"),desc:t("city_casino"),category:"commercial",reqs:{gambling:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("casino",a,35e4,1.35)},Iron(a){return e.city.ptrait.includes("unstable")?O("casino",a,2e3,1.35):0},Furs(a){return O("casino",a,6e4,1.35)},Plywood(a){return O("casino",a,1e4,1.35)},Brick(a){return O("casino",a,6e3,1.35)}},effect(){let a=vi();return a=a+`
${t("minus_power",[$(this)[0].powered()])}
`,a},powered(){return N(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2?2:3)},action(){return _($(this)[0])?(e.city.casino.count++,e.race.joyless||(e.civic.entertainer.max+=F(1),e.civic.entertainer.display=!0),z($(this)[0]),!0):!1},flair:t("city_casino_flair")},temple:{id:"city-temple",title:t("city_temple"),desc(){let a=e.race.gods!=="none"?x[e.race.gods.toLowerCase()].entity:x[e.race.species].entity;return t("city_temple_desc",[a])},category:"commercial",reqs:{theology:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("temple",a,50,1.36)},Lumber(a){return O("temple",a,25,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("temple",a,6,1.36):0},Furs(a){return O("temple",a,15,1.36)},Cement(a){return O("temple",a,10,1.36)}},effect(){let a=wn();return e.genes.ancients&&e.genes.ancients>=2&&(a=a+`
${t("city_temple_effect6",[F(1)])}
`),a},action(){return _($(this)[0])?(e.genes.ancients&&e.genes.ancients>=2&&(e.civic.priest.display=!0,e.civic.priest.max+=F(1)),e.city.temple.count++,!0):!1}},shrine:{id:"city-shrine",title:t("city_shrine"),desc(){return t("city_shrine_desc")},category:"commercial",reqs:{theology:2},trait:["magnificent"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("shrine",a,75,1.32)},Stone(a){return O("shrine",a,65,1.32)},Furs(a){return O("shrine",a,10,1.32)},Copper(a){return O("shrine",a,15,1.32)}},effect(){let a=`
${t("city_shrine_effect")}
`;if(e.city.shrine&&e.city.shrine.morale>0){let r=Yr("morale");a=a+`
${t("city_shrine_morale",[+r.add.toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.metal>0){let r=Yr("metal");a=a+`
${t("city_shrine_metal",[+((r.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.know>0){let r=Yr("know");a=a+`
${t("city_shrine_know",[(+r.add.toFixed(1)).toLocaleString()])}
`,a=a+`
${t("city_shrine_know2",[+((r.mult-1)*100).toFixed(1)])}
`}if(e.city.shrine&&e.city.shrine.tax>0){let r=Yr("tax");a=a+`
${t("city_shrine_tax",[+((r.mult-1)*100).toFixed(1)])}
`}return a},action(){if(_($(this)[0])){if(e.city.shrine.count++,e.city.calendar.moon>0&&e.city.calendar.moon<7)e.city.shrine.morale++;else if(e.city.calendar.moon>7&&e.city.calendar.moon<14)e.city.shrine.metal++;else if(e.city.calendar.moon>14&&e.city.calendar.moon<21)e.city.shrine.know++;else if(e.city.calendar.moon>21)e.city.shrine.tax++;else switch(Math.floor(K(0,4))){case 0:e.city.shrine.morale++;break;case 1:e.city.shrine.metal++;break;case 2:e.city.shrine.know++;break;case 3:e.city.shrine.tax++;break}return!0}return!1}},meditation:{id:"city-meditation",title:t("city_meditation"),desc:t("city_meditation"),category:"commercial",reqs:{primitive:3},trait:["calm"],not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("meditation",a,50,1.2)},Stone(a){return O("meditation",a,25,1.2)},Furs(a){return O("meditation",a,8,1.2)}},effect(){let a=e.resource.Zen.amount/(e.resource.Zen.amount+5e3);return`
${t("city_meditation_effect",[b.calm.vars()[0]])}
${t("city_meditation_effect2",[2])}
${t("city_meditation_effect3",[1])}
${t("city_meditation_effect4",[`${(a*100).toFixed(2)}%`])}
`},action(){return _($(this)[0])?(e.city.meditation.count++,e.resource.Zen.max+=b.calm.vars()[0],!0):!1}},banquet:{id:"city-banquet",title:t("city_banquet"),desc:t("city_banquet_desc"),category:"commercial",reqs:{banquet:1},queue_complete(){return e.stats.achieve.endless_hunger?e.stats.achieve.endless_hunger.l-e.city.banquet.count:0},no_multi:!0,condition(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)},cost:{Money(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 45e3;case 1:return 18e4;case 2:return 24e5;case 3:return 3e7;case 4:return 14e7;default:return 0}},Food(a){let r=(a||0)+(e.city.banquet?e.city.banquet.count:0);return(()=>{switch(r){case 0:return 4e4;case 1:return 124e3;case 2:return 3e5;case 3:return 72e4;case 4:return 12e5;default:return 0}})()*(e.race.artifical?.25:1)},Brick(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 1600;case 1:return 18e3;case 2:return 75e3;default:return 0}},Wrought_Iron(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 0:return 0;case 1:return 26e3;case 2:return 88e3;case 3:return 144e3;case 4:return 24e4;default:return 0}},Iridium(a){switch((a||0)+(e.city.banquet?e.city.banquet.count:0)){case 2:return 5e4;case 3:return 27e4;case 4:return 7e5;default:return 0}},Aerogel(a,r){let i=(a||0)+(e.city.banquet?e.city.banquet.count:0);if(r?r.truepath:e.race.truepath)return 0;switch(i){case 3:return 4e4;case 4:return 15e4;default:return 0}},Quantium(a,r){let i=(a||0)+(e.city.banquet?e.city.banquet.count:0);if(r?!r.truepath:!e.race.truepath)return 0;switch(i){case 3:return 4e4;case 4:return 15e4;default:return 0}},Bolognium(a){switch(a||0||(e.city.banquet?e.city.banquet.count:0)){case 4:return 15e4;default:return 0}}},effect(a){let r=e.city.banquet?e.city.banquet.strength:0,i=(a?.count??0)+(e.city.banquet?e.city.banquet.count:0),s=`
Strength: ${r}
`;return s+=`
${t("city_banquet_effect1",[Y(((i>=5?1.02:1.022)**r-1)*100)])}
`,i>=1&&(s+=`
${t("city_banquet_effect2",[(r**.75).toFixed(2)])}
`),i>=2&&(s+=`
${t("city_banquet_effect3",[(r**.65).toFixed(2)])}
`),i>=3&&(s+=`
${t("city_banquet_effect4",[(r**.65).toFixed(2)])}
`),i>=4&&(s+=`
${t("city_banquet_effect5",[(r**.75).toFixed(2)])}
`),s},powered(){return 0},action(){return e.city.banquet.count=3&&e.city.ptrait.includes("unstable")?O("university",a,25,1.36):0}},effect(a){let r=+$(this)[0].knowVal(a).toFixed(0);return`
${t("city_university_effect",[F(1)])}
${t("city_max_knowledge",[r.toLocaleString()])}
`},knowVal(a){let r=1,i=e.tech.science&&e.tech.science>=8?700:500;e.city.ptrait.includes("permafrost")&&(i+=Fe.permafrost.vars()[1]),e.tech.science>=4&&(r+=e.city.library.count*.02),e.space.observatory&&e.space.observatory.count>0&&(r+=(a?e.space.observatory.on:we.observatory)*.05),e.portal.sensor_drone&&e.tech.science>=14&&(r+=(a?e.portal.sensor_drone.on:G.sensor_drone)*.02),e.race.hard_of_hearing&&(r*=1-b.hard_of_hearing.vars()[0]/100),e.race.curious&&(r*=1+b.curious.vars()[0]/100*e.resource[e.race.species].amount);let s=X("cath");s>0&&(r*=1+b.curious.vars(3)[0]*s);let c=Qt(a)?a?e.galaxy?.scavenger?.on??0:la.scavenger:0;if(c>0){let d=Lt("gxy_alien2",!1,!1,a),h=c*d/4;r*=1+h}let o=J("teacher",0);o&&(r*=1+o/100);let l=J("athleticism",2);if(l&&(r*=1-l/100),Kn()){let d=Yr("know");r*=d.mult}let u=i*r;if(e.tech.supercollider){let d=e.tech.tp_particles||e.tech.particles&&e.tech.particles>=3?12.5:25;u*=e.tech.supercollider/d+1}return e.race.orbit_decayed&&(e.space.satellite&&(u*=1+e.space.satellite.count*.12),e.tech.biotech&&e.tech.biotech>=1&&(u*=2)),u},action(){if(_($(this)[0])){let a=e.tech.science&&e.tech.science>=8?700:500;if(e.tech.science>=4&&(a*=1+e.city.library.count*.02),e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,e.city.university.count++,e.civic.professor.display=!0,e.civic.professor.max=F(e.city.university.count),!0}return!1}},library:{id:"city-library",title:t("city_library"),desc(){let a=x[e.race.species].home;return t("city_library_desc",[a])},category:"science",reqs:{science:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("library",a,45,1.2)},Crystal(a){return e.race.universe==="magic"?O("library",a,2,1.2):0},Iron(a){return e.city.ptrait.includes("unstable")?O("library",a,4,1.2):0},Furs(a){return O("library",a,22,1.2)},Plywood(a){return O("library",a,20,1.2)},Brick(a){return O("library",a,15,1.2)}},effect(){let a=125;e.race.nearsighted&&(a*=1-b.nearsighted.vars()[0]/100),e.race.studious&&(a*=1+b.studious.vars()[1]/100);let r=X("elven");if(r>0&&(a*=1+b.studious.vars(1)[1]/100*r),e.tech.science&&e.tech.science>=8&&(a*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(a*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5){let l=He(e.civic.scientist.workers,"scientist");e.race.high_pop&&(l=ve(l)),a*=1+l*.12}let i=J("teacher",0);i&&(a*=1+i/100);let s=J("athleticism",2);s&&(a*=1-s/100);let n=J("muckraker",1);n&&(a*=1+n/100),a=+a.toFixed(0);let c=J("muckraker",2),o=c?5-c:5;return e.race.autoignition&&(o-=b.autoignition.vars()[0],o<0&&(o=0)),`
${t("city_max_knowledge",[a.toLocaleString()])}
${t("city_library_effect",[o])}
`},action(){if(_($(this)[0])){let a=125;return e.race.nearsighted&&(a*=1-b.nearsighted.vars()[0]/100),e.tech.science&&e.tech.science>=8&&(a*=1.4),e.tech.anthropology&&e.tech.anthropology>=2&&(a*=1+e.city.temple.count*.05),e.tech.science&&e.tech.science>=5&&(a*=1+He(e.civic.scientist.workers,"scientist")*.12),a=+a.toFixed(1),e.resource.Knowledge.max+=a,e.city.library.count++,e.tech.science&&e.tech.science>=3&&(e.civic.professor.impact=.5+e.city.library.count*.01),!0}return!1},flair:t("city_library_flair")},wardenclyffe:{id:"city-wardenclyffe",title(){return qt()},desc:t("city_wardenclyffe_desc"),category:"science",reqs:{high_tech:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("wardenclyffe",a,5e3,1.22)},Knowledge(a){return O("wardenclyffe",a,e.race.logical?1e3-b.logical.vars()[0]:1e3,1.22)},Crystal(a){return e.race.universe==="magic"?O("wardenclyffe",a,100,1.22):0},Copper(a){return O("wardenclyffe",a,500,1.22)},Iron(a){return e.city.ptrait.includes("unstable")?O("wardenclyffe",a,75,1.22):0},Cement(a){return O("wardenclyffe",a,350,1.22)},Sheet_Metal(a){return O("wardenclyffe",a,125,1.2)},Nanite(a){return e.race.deconstructor?O("wardenclyffe",a,50,1.18):0}},effect(){let a=1e3;if(e.city.ptrait.includes("magnetic")&&(a+=Fe.magnetic.vars()[1]),e.tech.supercollider){let s=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/s+1}e.space.satellite&&(a*=1+e.space.satellite.count*.04);let r=J("athleticism",2);r&&(a*=1-r/100),a=+a.toFixed(0);let i=`
${t("city_wardenclyffe_effect1",[F(1),e.civic.scientist?e.civic.scientist.name:t("job_scientist")])}
${t("city_max_knowledge",[a.toLocaleString()])}
`;if(e.city.powered){let s=e.tech.science>=7?2500:2e3;if(e.city.ptrait.includes("magnetic")&&(s+=Fe.magnetic.vars()[1]),e.space.satellite&&(s*=1+e.space.satellite.count*.04),e.tech.supercollider){let c=e.tech.particles&&e.tech.particles>=3?12.5:25;s*=e.tech.supercollider/c+1}let n=J("athleticism",2);if(n&&(s*=1-n/100),s=+s.toFixed(1),e.tech.science>=15&&(i=i+`
${t("city_wardenclyffe_effect4",[2])}
`),e.race.universe==="magic"){let c=E(8);i=i+`
${t("plus_max_resource",[c,e.resource.Mana.name])}
`}if(e.tech.broadcast){let c=e.tech.broadcast;i=i+`
${t("city_wardenclyffe_effect3",[$(this)[0].powered(),s.toLocaleString(),c])}
`}else i=i+`
${t("city_wardenclyffe_effect2",[$(this)[0].powered(),s.toLocaleString()])}
`;e.race.artifical&&(i=i+`
${t("city_transmitter_effect",[E(250)])}=7?2500:2e3),e.tech.supercollider){let r=e.tech.particles&&e.tech.particles>=3?12.5:25;a*=e.tech.supercollider/r+1}return e.resource.Knowledge.max+=a,!0}return!1},flair(){return e.race.universe==="magic"?`
${t("city_wizard_tower_flair")}
`:e.race.evil?`
${t("city_babel_flair")}
`:`
${t("city_wardenclyffe_flair1")}
${t("city_wardenclyffe_flair2")}
`}},biolab:{id:"city-biolab",title:t("city_biolab"),desc:`
${t("city_biolab_desc")}
${t("requires_power")}
`,category:"science",reqs:{genetics:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("biolab",a,25e3,1.3)},Knowledge(a){return O("biolab",a,5e3,1.3)},Copper(a){return O("biolab",a,1250,1.3)},Iron(a){return e.city.ptrait.includes("unstable")?O("biolab",a,160,1.3):0},Alloy(a){return O("biolab",a,350,1.3)}},effect(a){let r=3e3;return e.portal.sensor_drone&&e.tech.science>=14&&(r*=1+(a?e.portal.sensor_drone.on:G.sensor_drone)*.02),e.tech.science>=20&&(r*=3),e.tech.science>=21&&(r*=1.45),e.tech.biotech>=1&&(r*=2.5),r=+r.toFixed(0),`${t("city_max_knowledge",[r.toLocaleString()])}, ${t("minus_power",[$(this)[0].powered()])}`},powered(){return N(2)},action(){return _($(this)[0])?(e.city.biolab.count++,z($(this)[0])&&(e.resource.Knowledge.max+=3e3),!0):!1}},coal_power:{id:"city-coal_power",title(){return e.race.environmentalist?t("city_hydro_power"):t(e.race.universe==="magic"?"city_mana_engine":"city_coal_power")},desc(){return e.race.environmentalist?`
${t("city_hydro_power_desc")}
`:`
${t(e.race.universe==="magic"?"city_mana_engine_desc":"city_coal_power_desc")}
${t("requires_res",[t(e.race.universe==="magic"?"resource_Mana_name":"resource_Coal_name")])}
`},category:"utility",reqs:{high_tech:2},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("coal_power",a,1e4,Oe(1.22))},Crystal(a){return e.race.universe==="magic"?O("coal_power",a,125,Oe(1.22)):0},Copper(a){return O("coal_power",a,1800,Oe(1.22))-1e3},Iron(a){return e.city.ptrait.includes("unstable")?O("coal_power",a,175,Oe(1.22)):0},Cement(a){return O("coal_power",a,600,Oe(1.22))},Steel(a){return O("coal_power",a,2e3,Oe(1.22))-1e3}},effect(){let a=e.race.universe==="magic"?.05:.35,r=-$(this)[0].powered();return e.race.environmentalist?`+${r}MW`:`+${r}MW. ${t(e.race.universe==="magic"?"city_mana_engine_effect":"city_coal_power_effect",[a])}`},powered(){let a=e.race.environmentalist?e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1?-5:-4:e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1?-6:-5,r=J("dirty_jobs",1);return r&&(a-=r),at(a)},p_fuel(){return e.race.universe==="magic"?{r:"Mana",a:e.race.environmentalist?0:.05}:{r:"Coal",a:e.race.environmentalist?0:.35}},action(){return _($(this)[0])?(e.city.coal_power.count++,e.city.coal_power.on++,e.city.power+=5,!0):!1}},oil_power:{id:"city-oil_power",title(){return e.race.environmentalist?t("city_wind_power"):t("city_oil_power")},desc(){return e.race.environmentalist?`
${t("city_wind_power_desc")}
`:`
${t("city_oil_power_desc")}
${t("requires_res",[t("resource_Oil_name")])}
`},category:"utility",reqs:{oil:3},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("oil_power",a,5e4,Oe(1.22))},Copper(a){return O("oil_power",a,6500,Oe(1.22))+1e3},Iron(a){return e.city.ptrait.includes("unstable")?O("oil_power",a,180,Oe(1.22)):0},Aluminium(a){return O("oil_power",a,12e3,Oe(1.22))},Cement(a){return O("oil_power",a,5600,Oe(1.22))+1e3}},effect(){let a=.65,r=-$(this)[0].powered();return e.race.environmentalist?`+${r}MW`:`+${r}MW. ${t("city_oil_power_effect",[a])}`},powered(){let a=0;if(e.race.environmentalist)if(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3){let i=e.city.calendar.wind===1?-7:-5;a=e.stats.achieve.dissipated.l>=5?i-2:i-1}else a=e.city.calendar.wind===1?-7:-5;else e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3?a=e.stats.achieve.dissipated.l>=5?-8:-7:a=-6;let r=J("dirty_jobs",1);return r&&(a-=r),at(a)},p_fuel(){return{r:"Oil",a:e.race.environmentalist?0:.65}},action(){return _($(this)[0])?(e.city.oil_power.count++,e.city.oil_power.on++,e.city.power+=6,!0):!1}},fission_power:{id:"city-fission_power",title:t("city_fission_power"),desc:`
${t("city_fission_power_desc")}
${t("requires_res",[t("resource_Uranium_name")])}
`,category:"utility",reqs:{high_tech:5},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("fission_power",a,25e4,1.36)},Copper(a){return O("fission_power",a,13500,1.36)},Iron(a){return e.city.ptrait.includes("unstable")?O("fission_power",a,1750,1.36):0},Cement(a){return O("fission_power",a,10800,1.36)},Titanium(a){return O("fission_power",a,7500,1.36)}},effect(){let a=.1;return`+${-$(this)[0].powered()}MW. ${t("city_fission_power_effect",[a])}`},powered(){return at(e.tech.uranium>=4?-18:-14)},p_fuel(){return{r:"Uranium",a:.1}},action(){return _($(this)[0])?(e.city.fission_power.count++,e.city.fission_power.on++,e.city.power+=14,!0):!1}},mass_driver:{id:"city-mass_driver",title:t("city_mass_driver"),desc:`
${t("city_mass_driver_desc")}
${t("requires_power")}
`,category:"utility",reqs:{mass:1},not_trait:["cataclysm","lone_survivor"],cost:{Money(a){return O("mass_driver",a,375e3,1.32)},Copper(a){return O("mass_driver",a,33e3,1.32)},Iron(a){return O("mass_driver",a,42500,1.32)},Iridium(a){return O("mass_driver",a,2200,1.32)}},effect(){return`${e.tech.mass>=2?`
${t("city_mass_driver_effect2",[1,e.civic.scientist.name])}
`:""}${t("city_mass_driver_effect",[e.race.truepath?6:5,We("name")])} ${t("minus_power",[$(this)[0].powered()])}`},powered(){let a=e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4?4:5;return N(e.tech.mass>=2?a-1:a)},action(){return _($(this)[0])?(e.city.mass_driver.count++,z($(this)[0]),!0):!1}},replicator:{id:"city-replicator",title:t("tech_replicator"),desc:t("tech_replicator"),category:"utility",reqs:{special_hack:1},cost:{},wiki:!1,effect(){return"fake structure"},powered(){return 1},action(){return!1}}},tech:Li(),arpa:ye("PhysicsTech"),genes:ye("GeneTech"),blood:ye("BloodTech"),space:es(),interstellar:Kc(),galaxy:Gc(),starDock:{probes:{id:"starDock-probes",title:t("star_dock_probe"),desc(){return`
${t("star_dock_probe_desc")}
`},reqs:{genesis:4},cost:{Money(a){return O("probes",a,35e4,e.race.truepath?1.125:1.25,"starDock")},Alloy(a){return O("probes",a,75e3,e.race.truepath?1.125:1.25,"starDock")},Polymer(a){return O("probes",a,85e3,e.race.truepath?1.125:1.25,"starDock")},Iridium(a){return O("probes",a,12e3,e.race.truepath?1.125:1.25,"starDock")},Mythril(a){return O("probes",a,3500,e.race.truepath?1.125:1.25,"starDock")}},effect(){return`
${t("star_dock_probe_effect")}
`},action(){return _($(this)[0])?(e.starDock.probes.count++,!0):!1}},geck:{id:"starDock-geck",title:t("tech_geck"),desc(){return`
${t("tech_geck_desc")}
`},reqs:{geck:1},condition(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)},queue_complete(){return 0},no_multi:!0,cost:{Money(a){return O("geck",a,1e6,1.25,"starDock")},Elerium(a){return O("geck",a,1e3,1.25,"starDock")},Plasmid(a){return O("geck",a,25,1.4,"starDock")}},effect(){return`
${t("star_dock_geck_effect")}
`},action(){return _($(this)[0])?(e.starDock.geck.count++,!0):!1}},seeder:{id:"starDock-seeder",title(){return e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder")},desc(){let a=e.race.cataclysm?t("star_dock_exodus"):t("star_dock_seeder");return e.starDock.seeder&&e.starDock.seeder.count>=100?`
${a}
${t("star_dock_seeder_desc2")}
`:`
${a}
${t("star_dock_seeder_desc1")}
`},reqs:{genesis:5},queue_size:10,queue_complete(){return 100-e.starDock.seeder.count},cost:{Money(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?1e5:0},Steel(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?25e3:0},Neutronium(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?240:0},Elerium(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?10:0},Nano_Tube(a){return(a||0)+(e.starDock.hasOwnProperty("seeder")?e.starDock.seeder.count:0)<100?12e3:0}},effect(a){let r=(a?.count??0)+(e.starDock.seeder?e.starDock.seeder.count:0),i=r<100?t("star_dock_seeder_status1",[100-r]):t("star_dock_seeder_status2");return`
${e.race.cataclysm?t("star_dock_exodus_effect"):t("star_dock_seeder_effect")}
${i}
`},action(){if(e.starDock.seeder.count<100&&_($(this)[0])){if(e.starDock.seeder.count++,e.starDock.seeder.count>=100){e.tech.genesis=6,ie("starDock-seeder"),A($("#modalBox"));let a=q.space.spc_gas.star_dock;En(a,"star_dock")}return!0}return!1}},prep_ship:{id:"starDock-prep_ship",title:t("star_dock_prep"),desc(){return`
${e.race.cataclysm?t("star_dock_prep_cata_desc"):t("star_dock_prep_desc")}
${t("star_dock_genesis_desc2")}
`},reqs:{genesis:6},queue_complete(){return 0},cost:{Helium_3(a,r){return+_e(e.race.gravity_well?15e4:75e3,!1,r).toFixed(0)}},effect(){let a=ke("bioseed"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${e.race.cataclysm?t("star_dock_prep_cata_effect"):t("star_dock_prep_effect")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){if(_($(this)[0])){e.tech.genesis=7,ie("starDock-prep_ship"),A($("#modalBox"));let a=q.space.spc_gas.star_dock;return En(a,"star_dock"),!0}return!1}},launch_ship:{id:"starDock-launch_ship",title:t("star_dock_genesis"),desc(){return`
${e.race.cataclysm?t("star_dock_prep_cata_effect"):t("star_dock_genesis_desc1")}
${t("star_dock_genesis_desc2")}
`},reqs:{genesis:7},queue_complete(){return 0},cost:{},effect(){let a=ke("bioseed"),r=e.race.universe==="antimatter"?t("resource_AntiPlasmid_plural_name"):t("resource_Plasmid_plural_name");return`
${e.race.cataclysm?t("star_dock_genesis_cata_effect1"):t("star_dock_genesis_effect1")}
${t("star_dock_genesis_effect2",[a.plasmid,r])}
${t("star_dock_genesis_effect3",[a.phage])}
`},action(){return yc(),!1}}},portal:us(),tauceti:Oc()};function xs(){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach(function(r){A($(r),!0)}),A($("#evolution .evolving"),!0),e.evolution.bunker={count:1},Na(q.evolution.bunker.id),Mo(),e.race.truepath||e.race.lone_survivor?(e.evolution.nerfed={count:0},e.evolution.badgenes={count:0}):(e.race.universe==="antimatter"?e.evolution.mastery={count:0}:e.evolution.plasmid={count:0},e.evolution.crispr={count:0}),e.evolution.trade={count:0},e.evolution.craft={count:0},e.evolution.junker={count:0},e.evolution.joyless={count:0},e.evolution.steelen={count:0},(e.stats.achieve.whitehole||e.sim)&&(e.evolution.decay={count:0}),(e.stats.achieve.ascended||e.sim)&&(e.evolution.emfield={count:0}),(e.stats.achieve.scrooge||e.sim)&&(e.evolution.inflation={count:0}),(e.stats.achieve.shaken||e.sim)&&(e.evolution.cataclysm={count:0}),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&(e.evolution.banana={count:0},e.evolution.orbit_decay={count:0}),e.race.universe==="standard"&&(e.stats.achieve.whitehole||e.sim),e.race.universe==="heavy"&&(e.stats.achieve.seeder&&e.stats.achieve.seeder.h||e.sim)&&(e.evolution.gravity_well={count:0}),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&(e.evolution.witch_hunter={count:0}),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&(e.evolution.truepath={count:0}),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&(e.evolution.sludge={count:0}),(e.stats.achieve.bluepill||e.sim)&&(e.evolution.simulation={count:0}),(e.stats.achieve.retired||e.sim)&&(e.evolution.lone_survivor={count:0}),(e.stats.achieve.corrupted||e.sim)&&(e.evolution.fasting={count:0}),bu(),e.race.truepath||e.race.lone_survivor?je("evolution","nerfed"):e.race.universe==="antimatter"?je("evolution","mastery"):je("evolution","plasmid"),je("evolution","trade"),je("evolution","craft"),e.race.truepath||e.race.lone_survivor?je("evolution","badgenes"):je("evolution","crispr"),wu(),je("evolution","joyless"),je("evolution","steelen"),(e.stats.achieve.whitehole||e.sim)&&je("evolution","decay"),(e.stats.achieve.ascended||e.sim)&&je("evolution","emfield"),(e.stats.achieve.scrooge||e.sim)&&je("evolution","inflation"),((e.stats.achieve.ascended||e.stats.achieve.corrupted)&&e.stats.achieve.extinct_junker||e.sim)&&je("evolution","sludge"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&je("evolution","orbit_decay"),e.race.universe==="standard"&&(e.stats.achieve.whitehole||e.sim),e.race.universe==="heavy"&&(e.stats.achieve.seeder&&e.stats.achieve.seeder.h||e.sim)&&je("evolution","gravity_well"),e.race.universe==="magic"&&(e.stats.achieve.ascended&&e.stats.achieve.ascended.mg||e.sim)&&je("evolution","witch_hunter"),e.race.universe==="evil"&&(e.stats.achieve.corrupted&&e.stats.achieve.corrupted.e||e.sim),e.hasOwnProperty("beta")&&!e.sim&&je("evolution","simulation"),ku(),je("evolution","junker"),(e.stats.achieve.shaken||e.sim)&&je("evolution","cataclysm"),(e.stats.achieve.whitehole||e.stats.achieve.ascended||e.sim)&&je("evolution","banana"),(e.stats.achieve.ascended||e.stats.achieve.corrupted||e.sim)&&je("evolution","truepath"),(e.stats.achieve.retired||e.sim)&&je("evolution","lone_survivor"),(e.stats.achieve.corrupted||e.sim)&&je("evolution","fasting"),e.sim?$u():e.race.simulation&&xu()}function ft(a,r){let i=e.race.orbit_decay?"orbit_decayed":"cataclysm",s=function(n,c,o){return o==="space"?n.hasOwnProperty("trait")?n.trait.push(c):n.trait=[c]:o==="tauceti"?n.reqs.isolation=1:n.hasOwnProperty("not_trait")?n.not_trait.push(c):n.not_trait=[c],n};switch(a){case"bonfire":{let n={id:`${r}-bonfire`,title:t("city_bonfire"),desc:t("city_bonfire_desc"),category:"outskirts",wiki:!1,reqs:{primitive:3},condition(){return xe("summer")},queue_complete(){return 0},effect(){let c=e.resource.Thermite.diff*2.5/(e.resource.Thermite.diff*2.5+500)*500,o=1e5+e.stats.reset*9e3;o>1e6&&(o=1e6);let l=e.resource.Thermite.amount${t("city_bonfire_effect3",[o.toLocaleString()])}
${t("city_bonfire_effect4",[(+e.resource.Thermite.amount.toFixed(0)).toLocaleString(),o.toLocaleString()])}
`:"";return`
${t("city_bonfire_effect",[e.resource.Thermite.diff])}
${t("city_bonfire_effect2",[+c.toFixed(1)])}
${l}`},action(){return!1},flair(){return t("city_bonfire_flair")}};return s(n,i,r)}case"firework":{let n={id:`${r}-firework`,title:t("city_firework"),desc:t("city_firework"),category:"outskirts",wiki:!1,reqs:{mining:3},condition(){return xe("firework")&&e[r].firework&&(e.tech.cement||e.race.flier)},cost:{Money(){return e[r].firework.count===0?5e4:0},Iron(){return e[r].firework.count===0?7500:0},Cement(){return e[r].firework.count===0?1e4:0}},queue_complete(){return 1-e[r].firework.count},switchable(){return!0},effect(){return e[r].firework.count===0?t("city_firework_build"):t("city_firework_effect")},action(){return e[r].firework.count===0&&_($(this)[0])?(e[r].firework.count=1,!0):!1}};return s(n,i,r)}case"assembly":{let n=function(o){let l=ve(o);return e.race.promiscuous&&(l/=1+b.promiscuous.vars()[1]*e.race.promiscuous),Math.round(l)},c={id:`${r}-assembly`,title:t("city_assembly"),desc(){return t("city_assembly_desc",[x[e.race.species].name])},category:"military",reqs:{},trait:["artifical"],queue_complete(){return e.resource[e.race.species].max-e.resource[e.race.species].amount},cost:{Money(o){return e.resource[e.race.species].amount?O("citizen",o,n(125),1.01):0},Copper(o){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?O("citizen",o,n(50),1.01):0},Aluminium(o){return e.race.deconstructor?0:e.resource[e.race.species].amount>=5?O("citizen",o,n(50),1.01):0},Nanite(o){return e.race.deconstructor&&e.resource[e.race.species].amount>=3?O("citizen",o,n(500),1.01):0}},effect(){let o="";return e.resource[e.race.species].max===e.resource[e.race.species].amount&&(o=`
${t("city_assembly_effect_warn")}
`),`
${t("city_assembly_effect",[x[e.race.species].name])}
${o}`},action(){return e.race.vax&&e.race.vax>=100?!0:e.resource[e.race.species].max>e.resource[e.race.species].amount&&_($(this)[0])?(e.resource[e.race.species].amount++,!0):!1}};return s(c,i,r)}case"nanite_factory":{let n={id:`${r}-nanite_factory`,title:t("city_nanite_factory"),desc:t("city_nanite_factory"),category:"industrial",reqs:{},trait:["deconstructor"],region:"city",cost:{Money(c){return O("nanite_factory",c,25e3,Oe(1.25))},Copper(c){return O("nanite_factory",c,1200,Oe(1.25))},Steel(c){return O("nanite_factory",c,1e3,Oe(1.25))}},effect(){let c=E(2500);return`
${t("city_nanite_factory_effect",[e.resource.Nanite.name])}
${t("plus_max_resource",[c,e.resource.Nanite.name])}.
`},special:!0,action(){return _($(this)[0])?(e.city.nanite_factory.count++,e.settings.showIndustry=!0,Pe(),!0):!1},flair:t("city_nanite_factory_flair")};return s(n,i,r)}case"captive_housing":{let n={id:`${r}-captive_housing`,title:t("city_captive_housing"),desc:t("city_captive_housing_desc"),category:"residential",reqs:{unfathomable:1},trait:["unfathomable"],region:"city",cost:{Money(c){return O("captive_housing",c,40,1.35)},Lumber(c){return O("captive_housing",c,30,1.35)},Stone(c){return O("captive_housing",c,18,1.35)}},effect(){let c="";if(!e.race.artifical&&!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater){let u=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattle:0,d=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.cattleCap:0;c+=`
${t("city_captive_housing_cattle",[u,d])}
`}let o=0;if(e.city.hasOwnProperty("surfaceDwellers"))for(let u=0;u${t("city_captive_housing_broken",[x[d].name,h])}
`,c+=`
${t("city_captive_housing_untrained",[x[d].name,p])}
`}let l=e.city.hasOwnProperty("captive_housing")?e.city.captive_housing.raceCap:0;return c+=`
${t("city_captive_housing_capacity",[o,l])}
`,e.tech.unfathomable&&e.tech.unfathomable>=2&&(c+=`
${t("plus_max_resource",[1,t("job_torturer")])}
`),c},action(){if(_($(this)[0])){e.city.captive_housing.count++;let c=e.city.captive_housing.count;return e.city.captive_housing.raceCap=c*(e.tech.unfathomable&&e.tech.unfathomable>=3?3:2),e.city.captive_housing.cattleCap=c*5,!0}return!1}};return s(n,i,r)}case"horseshoe":{let n={id:`${r}-horseshoe`,title(){return t(`city_${xt(!0)}`,[xt(!1)])},desc(){return t(`city_${xt(!0)}_desc`,[xt(!1)])},category:"outskirts",reqs:{primitive:3},condition(){return e.race.hooved||xe("fool",2023)},inflation:!1,cost:{Lumber(c){let o=(e.race.shoecnt||0)+(c||0);return!e.race.kindling_kindred&&!e.race.smoldering&&(!e.resource.Copper.display||o<=12)?Math.round((o>12?25:5)*(o<=5?1:o-4)*(b.hooved.vars()[0]/100)):0},Copper(c){let o=(e.race.shoecnt||0)+(c||0),l=!(e.race.kindling_kindred||e.race.smoldering);return!!((!l||l&&o>12&&e.resource.Copper.display)&&(!e.resource.Iron.display||o<=75))?Math.round((o>75?20:5)*(o<=12?1:o-11)*(b.hooved.vars()[0]/100)):0},Iron(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Iron.display&&o>75&&(!e.resource.Steel.display||o<=150)?Math.round((o<=150?12:28)*o*(b.hooved.vars()[0]/100)):0},Steel(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Steel.display&&o>150&&(!e.resource.Adamantite.display||o<=500)?Math.round((o<=500?40:100)*o*(b.hooved.vars()[0]/100)):0},Adamantite(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Adamantite.display&&o>500&&(!e.resource.Orichalcum.display||o<=5e3)?Math.round((o<=5e3?5:25)*o*(b.hooved.vars()[0]/100)):0},Orichalcum(c){let o=(e.race.shoecnt||0)+(c||0);return e.resource.Orichalcum.display&&o>5e3?Math.round((25*o-12e4)*(b.hooved.vars()[0]/100)):0}},action(){return!e.race.hooved&&xe("fool",2023)?!0:e.resource.Horseshoe.display&&_($(this)[0])?(e.resource.Horseshoe.amount++,e.race.shoecnt++,e.race.shoecnt===5001&&e.resource.Orichalcum.display||e.race.shoecnt===501&&e.resource.Adamantite.display||e.race.shoecnt===151&&e.resource.Steel.display||e.race.shoecnt===76&&e.resource.Iron.display||e.race.shoecnt===13&&e.resource.Copper.display&&e.resource.Lumber.display?0:!0):!1}};return s(n,i,r)}}}function nt(a,r){r=r||"evo";let i=e.evolution.final||0;return(e.tech[r]&&e.tech[r]===a||e.evolution.gselect)&&i<100}var ei=["human","orc","elven","troll","ogre","cyclops","kobold","goblin","gnome","cath","wolven","vulpine","centaur","rhinotaur","capybara","tortoisan","gecko","slitheryn","arraak","pterodacti","dracnid","sporgar","shroomi","moldling","mantis","scorpid","antid","entish","cacti","pinguicula","sharkin","octigoran","dryad","satyr","phoenix","salamander","yeti","wendigo","tuskin","kamel","imp","balorg","seraph","unicorn","synth","nano","ghast","shoggoth","custom"];ei.forEach(function(a){(a!=="custom"||e.custom.hasOwnProperty("race0"))&&(q.evolution[a]={id:`evolution-${a}`,title(){return x[a].name},desc(){return`${t("evo_evolve")} ${x[a].name}`},reqs:{evo:7},grant:["evo",8],condition(){return(e.race.seeded||e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>=1||e.stats.achieve[`extinct_${a}`]&&e.stats.achieve[`extinct_${a}`].l>=1)&&e.tech[`evo_${x[a].type}`]>=2&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{RNA(){return 320},DNA(){return 320}},race:!0,effect(){return`${typeof x[a].desc=="string"?x[a].desc:x[a].desc()} ${t("evo_complete")}`},action(){if(_($(this)[0])){if(["synth","custom"].includes(a))return Cu(a);e.race.species=a,qs()}return!1},queue_complete(){return e.tech.evo&&e.tech.evo===7?1:0},emblem(){return Ne(`extinct_${a}`)}})});if(Object.keys(e.stats.synth).length>1){let a=Be(ei);a.push("junker"),a.push("sludge"),a.forEach(r=>q.evolution[`s-${r}`]={id:`evolution-s-${r}`,title(){return x[r].name},desc(){return`${t("evo_imitate")} ${x[r].name}`},reqs:{evo:8},grant:["evo",9],condition(){return e.stats.synth[r]&&e.race.evoFinalMenu},cost:{},race:!0,effect(){return t("evo_imitate_race",[x[r].name])},action(){return e.stats.synth[r]&&(e.race.species=e.race.evoFinalMenu,e.race.srace=r,qs()),!1},queue_complete(){return e.tech.evo&&e.tech.evo===8?1:0}})}var Ba={plasmid:"no_plasmid",mastery:"weak_mastery",trade:"no_trade",craft:"no_craft",crispr:"no_crispr",nerfed:"nerfed",badgenes:"badgenes"};Object.keys(Ba).forEach(a=>q.evolution[a]={id:`evolution-${a}`,title:t(`evo_challenge_${a}`),desc:t(`evo_challenge_${a}`),condition(){return e.evolution.hasOwnProperty(a)},cost:{DNA(){return 10}},challenge:!0,effect(){return xo(a)},action(){return _($(this)[0])&&(e.race[Ba[a]]?(delete e.race[Ba[a]],$(`#${$(this)[0].id}`).removeClass("hl"),(e.race.truepath||e.race.lone_survivor)&&(delete e.race.nerfed,delete e.race.badgenes),["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(r){delete e.race[r],$(`#evolution-${r}`).removeClass("hl")})):(e.race[Ba[a]]=1,$(`#${$(this)[0].id}`).addClass("hl")),xs(),Ms()),!1},highlight(){return!!e.race[Ba[a]]},queue_complete(){return 0}});var ks={joyless:{t:"c",e:"joyless"},steelen:{t:"c",e:"steelen"},decay:{t:"c",e:"dissipated"},emfield:{t:"c",e:"technophobe"},inflation:{t:"c",e:"wheelbarrow"},sludge:{t:"c",e:"extinct_sludge"},orbit_decay:{t:"c",e:"lamentis"},gravity_well:{t:"c",e:"escape_velocity"},witch_hunter:{t:"c",e:"soul_sponge"},simulation:{t:"c",e:"thereisnospoon"},junker:{t:"s",e:"extinct_junker"},cataclysm:{t:"s",e:"iron_will"},banana:{t:"s",e:"banana"},truepath:{t:"s",e:"pathfinder"},lone_survivor:{t:"s",e:"adam_eve"},fasting:{t:"s",e:"endless_hunger"}};Object.keys(ks).forEach(a=>q.evolution[a]={id:`evolution-${a}`,title:t(`evo_challenge_${a}`),desc(){let r="";return e.race.universe==="micro"&&(r=r+`
${t("evo_challenge_micro_warn")}
`),r=r+`
${t(`evo_challenge_${a}_desc`)}
`,["sludge","junker"].includes(a)&&(r=r+`
${t("evo_start")}
`),r},condition(){return e.evolution.hasOwnProperty(a)},cost:{DNA(){return ks[a].t==="c"?25:50}},challenge:!0,effect(){return xo(a)},action(){return _($(this)[0])&&(ks[a].t==="c"?uu(a):_u(a)),!1},emblem(){return Ne(ks[a].e)},highlight(){return!!e.race[a]},queue_complete(){return 0}});q.evolution.bunker={id:"evolution-bunker",title:t("evo_bunker"),desc(){return`
${t("evo_bunker")}
${t("evo_challenge")}
`},reqs:{evo:6},grant:["evo_challenge",1],condition(){return e.genes.challenge&&e.evolution.final===100&&!e.race.evoFinalMenu},cost:{DNA(){return 10}},effect:t("evo_bunker_effect"),action(){return!!_($(this)[0])},queue_complete(){return e.tech.evo_challenge?0:1},flair:t("evo_bunker_flair")};function ss(){if(!(!e.settings.tabLoad&&e.settings.civTabs!==0)&&!(e.race.universe==="bigbang"||e.race.seeded&&!e.race.chose)){if(e.tech.evo_challenge){let a=$("#evolution .evolving").nextAll();Object.values(a).forEach(function(r){A($(r),!0)}),A($("#evolution .evolving"),!0)}Object.keys(q.evolution).forEach(function(a){if(!q.evolution[a].challenge){Na(q.evolution[a].id);var r=!0;q.evolution[a].hasOwnProperty("reqs")&&Object.keys(q.evolution[a].reqs).forEach(function(i){(!e.tech[i]||e.tech[i]=2&&Mo(),e.tech.evo_challenge&&xs())}}function xo(a){switch(a){case"nerfed":let r=e.race.universe==="antimatter"?["20%","50%","50%","33%"]:["50%","20%","50%","33%"];return t(`evo_challenge_${a}_effect`,r);case"badgenes":return t(`evo_challenge_${a}_effect`,[1,2]);case"orbit_decay":return mt()>=100?`
${t("evo_challenge_orbit_decay_effect",[5e3])}
${t("evo_challenge_scenario_failwarn")}
`:`
${t("evo_challenge_orbit_decay_effect",[5e3])}
${t("evo_challenge_scenario_failwarn")}
${t("evo_challenge_scenario_warn")}
`;case"junker":return e.city.biome==="hellscape"&&e.race.universe!=="evil"?`
${t("evo_challenge_junker_effect")}
${t("evo_warn_unwise")}
`:t("evo_challenge_junker_effect");case"cataclysm":return mt()>=50?`
${t("evo_challenge_cataclysm_effect")}
${t("evo_challenge_cataclysm_warn")}
`:`
${t("evo_challenge_cataclysm_effect")}
${t("evo_challenge_scenario_warn")}
`;default:return t(`evo_challenge_${a}_effect`)}}function wn(){let a;if(e.race.universe==="antimatter"||e.race.no_plasmid){let r=An(100);if(r=+r.toFixed(3),a=`
${t("city_temple_effect1",[r])}
`,e.race.universe==="antimatter"){let i=6;if(e.genes.ancients&&e.genes.ancients>=2&&e.civic.priest.display){let s=e.genes.ancients>=5?.12:e.genes.ancients>=3?.1:.08;e.race.high_pop&&(s=ve(s)),i+=s*He(e.civic.priest.workers,"priest")}a+=`
${t("city_temple_effect5",[i.toFixed(2)])}
`}}else{let r=Tn(100);r=+r.toFixed(3),a=`
${t("city_temple_effect2",[r])}
`}return e.tech.fanaticism&&e.tech.fanaticism>=3&&(a=a+`
${t("city_temple_effect3")}
`),e.tech.anthropology&&e.tech.anthropology>=4&&(a=a+`
${e.race.truepath?t("city_temple_effect_tp",[2,25]):t("city_temple_effect4")}
`),a}function vi(){let a=e.tech.gambling>=3?6e4:4e4;e.tech.gambling>=5&&(a+=e.tech.gambling>=6?24e4:6e4),a=E(a),e.race.gambler&&(a*=1+e.race.gambler*.04),e.tech.world_control&&(a=a*1.25),e.race.truepath&&(a=a*1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(a*=1+e.tech.stock_exchange*.05),e.race.inflation&&(a*=1+e.race.inflation/100),e.tech.isolation&&(a*=5.5),a=Math.round(a);let r=e.race.joyless?"":`
${t("city_max_entertainer",[F(1)])}
`,i=e.race.orbit_decayed||e.tech.isolation?`
${t("plus_max_resource",[F(1),t("banker_name")])}
`:"",s=`
${t("plus_max_resource",[`$${a.toLocaleString()}`,t("resource_Money_name")])}
${r}${i}
${t("city_max_morale",[1])}
`,n=Math.log2(1+e.resource[e.race.species].amount)*(e.race.gambler?2.5+e.race.gambler/10:2.5);return e.tech.gambling&&e.tech.gambling>=2&&(n*=e.tech.gambling>=5?2:1.5),e.tech.stock_exchange&&e.tech.gambling>=4&&(n*=1+e.tech.stock_exchange*.01),e.civic.govern.type==="corpocracy"&&(n*=3),e.civic.govern.type==="socialist"&&(n*=.8),e.race.inflation&&(n*=1+e.race.inflation/1250),e.tech.isolation&&(n*=1.25,e.tech.iso_gambling&&(n*=1+He(e.civic.banker.workers,"banker")*.05)),n=+n.toFixed(2),s=s+`
${t("tech_casino_effect2",[n])}
`,s}function Qa(a,r,i,s){return((e.evolution.hasOwnProperty(a)?e.evolution[a].count:0)+(s||0))*i+r}function uu(a){e.race[a]?(delete e.race[a],$(`#evolution-${a}`).removeClass("hl"),a==="sludge"&&Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).removeClass("is-hidden")})):(e.race[a]=1,$(`#evolution-${a}`).addClass("hl"),a==="sludge"&&(Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).addClass("is-hidden")}),e.race.junker&&delete e.race.junker),a==="orbit_decay"&&(delete e.race.cataclysm,e.race.lone_survivor&&(delete e.race.lone_survivor,["nerfed","badgenes"].forEach(function(r){delete e.race[Ba[r]]})))),xs(),Ms()}function _u(a){if(e.race.sludge||Object.keys(x).forEach(function(r){r!=="junker"&&r!=="sludge"&&$(`#evolution-${r}`).removeClass("is-hidden")}),e.race[a])delete e.race[a],$(`#evolution-${a}`).removeClass("hl"),["nerfed","badgenes"].forEach(function(r){delete e.race[Ba[r]]});else{["junker","cataclysm","banana","truepath","lone_survivor","fasting"].forEach(function(i){delete e.race[i],$(`#evolution-${i}`).removeClass("hl")}),e.race[a]=1,$(`#evolution-${a}`).addClass("hl"),a==="junker"&&(Object.keys(x).forEach(function(i){i!=="junker"&&i!=="sludge"&&$(`#evolution-${i}`).addClass("is-hidden")}),e.race.sludge&&delete e.race.sludge),(a==="cataclysm"||a==="lone_survivor")&&delete e.race.orbit_decay,a==="truepath"||a==="lone_survivor"?(e.race.nerfed=1,["crispr","plasmid","mastery"].forEach(function(i){delete e.race[Ba[i]]})):(["nerfed","badgenes"].forEach(function(i){delete e.race[Ba[i]]}),e.race.universe==="antimatter"?(e.race.weak_mastery=1,$("#evolution-mastery").hasClass("hl")||$("#evolution-mastery").addClass("hl")):(e.race.no_plasmid=1,$("#evolution-plasmid").hasClass("hl")||$("#evolution-plasmid").addClass("hl")));let r=a==="truepath"||a==="lone_survivor"?["badgenes","trade","craft"]:["crispr","trade","craft"];for(let i=0;i=3&&(r*=e.tech.storage>=4?3:1.5),e.race.pack_rat&&(r*=1+b.pack_rat.vars()[1]/100);let i=X("kobold");return i>0&&(r*=1+b.pack_rat.vars(1)[1]/100*i),e.tech.storage>=6&&(r*=1+e.tech.supercollider/20),e.tech.tp_depot&&(r*=1+e.tech.tp_depot/20),e.tech.shelving&&e.tech.shelving>=3&&(r*=1.5),e.stats.achieve.blackhole&&(r*=1+e.stats.achieve.blackhole.l*.05),r*=e.tech.world_control?3:1,e.race.ascended&&(r*=1.1),e.blood.hoarder&&(r*=1+e.blood.hoarder/100),e.tech.storage>=7&&e.interstellar.cargo_yard&&(r*=1+e.interstellar.cargo_yard.count*pa(a)/100),r}function Da(a){if((e.race.kindling_kindred||e.race.smoldering)&&a==="lumber")return!1;if((e.race.kindling_kindred||e.race.smoldering)&&a==="stone")return!0;let r=e.race.truepath?"truepath":"standard";if(q.city[a].hasOwnProperty("path")&&!q.city[a].path.includes(r))return!1;var i=!0;return Object.keys(q.city[a].reqs).forEach(function(s){(!e.tech[s]||e.tech[s]=3&&(s=!0,e.r_queue.queue.forEach(function(c){Ln(c.type,!1)&&(r[q[c.action][c.type].grant[0]]={v:q[c.action][c.type].grant[1],a:c.type})}),Object.keys(n).forEach(function(c){let o=e.tech[c]||0;$o(c,e.tech[c]||0)||(!r[c]||r[c].vo+1)&&(s=!1)})),(i||s)&&(!e.tech[q.tech[a].grant[0]]||e.tech[q.tech[a].grant[0]]=q.tech[a].grant[1]){if(a!=="fanaticism"&&a!=="anthropology"&&a!=="deify"&&a!=="study")return!0;if(a==="fanaticism"&&e.tech.fanaticism)return!0;if(a==="anthropology"&&e.tech.anthropology)return!0;if(a==="deify"&&e.tech.ancient_deify)return!0;if(a==="study"&&e.tech.ancient_study)return!0}return!1}function Dn(a){let r=!0;return a.power_reqs&&Object.keys(a.power_reqs).forEach(function(i){(!e.tech[i]||e.tech[i]`).appendTo("#city").append(`

${t(`city_dist_${i}`)}

`),a[i].forEach(function(s){je("city",s)}),B(`dist-${i}`,function(){return t(`city_dist_${i}_desc`)},{elm:`#city-dist-${i} h3`,classes:"has-background-light has-text-dark"})}})}function le(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;let a={},r={},i={},s=[],n=[],c=[];["primitive","civilized","discovery","industrialized","globalized","early_space","deep_space","interstellar","intergalactic"].forEach(function(u){i[u]=[]});let o={interstellar:"solar"},l={};Object.keys(q.tech).forEach(function(u){if(!du(u))return;Na(q.tech[u].id);let d=pu(u),h=q.tech[u],p="category"in h?h.category:"research";if(!d&&s.indexOf(p)===-1&&s.push(p),d&&n.indexOf(p)===-1&&n.push(p),c.indexOf(p)===-1&&c.push(p),d===!0)p in r||(r[p]=[]),r[p].push(u);else{let f=q.tech[u];if(!Ja(f,u))return;let g=Ln(u,l);if(!g)return;p in a||(a[p]=[]);let w=e.race.truepath&&o[f.era]?o[f.era]:f.era;i.hasOwnProperty(w)||(i[w]=[]),i[w].push({t:u,p:g==="precog"})}}),A($("#tech")),Object.keys(i).forEach(function(u){i[u].length>0&&($("#tech").append(`

${t(`tech_era_${u}`)}

`),i[u].sort(function(d,h){return q.tech[d.t].cost.Knowledge==null?-1:q.tech[h.t].cost.Knowledge==null||q.tech[d.t].cost.Knowledge()>q.tech[h.t].cost.Knowledge()?1:-1}),i[u].forEach(function(d){je("tech",d.t,!1,d.p?l:!1)}))}),c.forEach(function(u){A($(`#tech-dist-${u}`),!0),A($(`#tech-dist-old-${u}`),!0)}),n.forEach(function(u){if(!(u in r))return;$(`
`).appendTo("#oldTech").append(`

${t(`tech_dist_${u}`)}

`);let d=pt(4,12,!1);d.length>0&&u==="science"&&$("#tech-dist-old-science h3").append(d),r[u].forEach(function(h){je("tech",h,!0,!1)})})}function je(a,r,i,s){let n=q[a][r];Ut(n,a,r,i,s)}function Ut(a,r,i,s,n){if(Ja(a,i)===!1)return;let c=r;r==="outerSol"&&(r="space"),a.region&&(r=a.region),a.powered&&!e[r][i].on&&(e[r][i].on=0);let o=a.id;Na(o);let l="";n&&a&&a.reqs&&Object.keys(a.reqs).forEach(function(p){n[p]&&(l+=` data-req-${p}="${n[p].a}"`)});let u=a.highlight&&a.highlight()?$(`
`):$(`
`);Jt(a,!1,["genes","blood"].includes(r))||u.addClass("cna"),Jt(a,!0,["genes","blood"].includes(r))||u.addClass("cnam");let d;if(s)d=$('{{ title }}');else{let p="",f="";if(a.cost){let v=r!=="genes"&&r!=="blood"?_t(a):a.cost;Object.keys(v).forEach(function(k){let P=v[k]();P>0&&(p=p+` res-${k}`,f=f+` data-${k}="${P}"`)})}let g="";a.class&&(g=typeof a.class=="function"?` ${a.class()}`:` ${a.class}`),n&&(g=" precog");let w=a.highlight?a.highlight()?`${t("active")}`:`${t("not_active")}`:"";d=$(`${w}{{ title }} description`)}if(u.append(d),a.hasOwnProperty("special")&&(typeof a.special=="function"&&a.special()||a.special===!0)){let p=$(`
-
`);u.append(p)}if(a.on||a.off){if(a.on){let p=$(``);u.append(p)}if(a.off){let p=$(``);u.append(p)}}else if(a.powered&&e.tech.high_tech&&e.tech.high_tech>=2&&Dn(a)||a.switchable&&a.switchable()){let p=$(``),f=$(``);u.append(p),u.append(f)}if(a.count){let p=a.count();p>1&&d.append($(`${p}`))}else r!=="tech"&&e[r]&&e[r][i]&&e[r][i].count>=0?d.append($('{{ act.count }}')):r==="blood"&&e[r]&&e[r][a.grant[0]]&&e[r][a.grant[0]]>0&&a.grant[1]==="*"&&d.append($(` ${e[r][a.grant[0]]} `));if(r!=="tech"&&e[r]&&e[r][i]&&typeof e[r][i].repair<"u"&&d.append($('
')),s?$("#oldTech").append(u):$("#"+c).append(u),r!=="tech"&&e[r]&&e[r][i]&&e[r][i].count===0&&($(`#${o} .count`).css("display","none"),$(`#${o} .special`).css("display","none"),$(`#${o} .on`).css("display","none"),$(`#${o} .off`).css("display","none")),a.emblem){let p=a.emblem();u.append($(p))}let h={template:''};C({el:"#"+o,data:{title:typeof a.title=="string"?a.title:a.title(),act:e[r][i]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)||qo(a,r,i)},describe(){pi(gu(a,s))},trigModal(){if(a.sAction&&typeof a.sAction=="function")a.sAction();else{this.$buefy.modal.open({parent:this,component:h});let p=setInterval(function(){$("#modalBox").length>0&&(clearInterval(p),En(a,i))},50)}},on_label(){return`on: ${e[r][i].on}`},off_label(){return`off: ${e[r][i].count-e[r][i].on}`},power_on(){if(i==="banquet")e[r][i].on=1;else{let p=V();for(let f=0;f0;f++)e[r][i].on--;a.postPower&&setTimeout(function(){a.postPower(!1)},250)},repair(){return e[r][i].repair},repairMax(){return a.repair()}},filters:{val(p){switch(p){case"on":return a.on();case"off":return a.off()}},p_off(p,f){let g=e[r][i].count-p;if(f==="city-casino"&&!e.race.cataclysm&&!e.race.orbit_decayed||f==="space-spc_casino"&&(e.race.cataclysm||e.race.orbit_decayed)||f==="tauceti-tauceti_casino"&&e.tech.isolation){let w=Ze(5,12);if(g===0&&w.length>0)return w}else if(f==="city-banquet")return p?0:1;return g},p_on(p,f){if(f==="city-biolab"&&!e.race.cataclysm&&!e.race.orbit_decayed||(e.race.cataclysm||e.race.orbit_decayed)&&f==="space-exotic_lab"||e.tech.isolation&&f==="tauceti-infectious_disease_lab"){let g=Ze(12,12);if(p===0&&g.length>0)return g}else if(f==="city-garrison"||f==="space-space_barracks"){let g=pt(1,14,!0);if(p===(f==="city-garrison"?13:0)&&g.length>0)return g}else if(f==="city-banquet")return p?1:0;return p},title(p){return p},options(p){return t("action_options",[p])}}}),B(o,function(){},{in:function(p){$r(p.popper,a,e[r][i],s,r,i)},out:function(){C({el:"#popTimer"},"destroy")},attach:r==="starDock"?"body .modal":"#main",wide:a.wide})}function qo(a,r,i){if(a.id==="spcdock-launch_ship")a.action();else switch(r){case"tech":if(!(e.settings.qKey&&tr.q)&&Ln(i,!1)&&a.action())mu(i),a.post&&setTimeout(function(){a.post()},250);else if(!(a.no_queue&&a.no_queue())&&e.tech.r_queue&&e.r_queue.queue.length0){let p=e.settings.qKey?s:1;p>e.queue.max-d&&(p=e.queue.max-d);let f=a.queue_size?a.queue_size:1;if(a.region&&(r=a.id.split("-")[0]),e.settings.q_merge!=="merge_never")e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===a.id?e.queue.queue[e.queue.queue.length-1].q+=Math.min(h,f*p):e.queue.queue.push({id:a.id,action:r,type:i,label:typeof a.title=="string"?a.title:a.title(),cna:!1,time:0,q:Math.min(h,f*p),qs:f,t_max:0,bres:!1});else for(let g=0;g0;g++)e.queue.queue.push({id:a.id,action:r,type:i,label:typeof a.title=="string"?a.title:a.title(),cna:!1,time:0,q:Math.min(h,f),qs:f,t_max:0,bres:!1}),h-=f;c=!0}}break}else e.race.inflation&&e.tech.primitive&&(!a.hasOwnProperty("inflation")||a.inflation)&&e.race.inflation++;n=!0}if(n&&(fu(a,r,i),e.tech.queue&&a.queue_complete)){let l=a.queue_complete();for(let u=0,d=0;dl?(h.q=l,l=0):l-=h.q)}}c&&Tr();break}}}function fu(a,r,i){if(!Jt(a)){let s=a.id;$(`#${s}`).addClass("cna")}if(a.grant){let s=a.grant[0];(!e.tech[s]||e.tech[s]0,n=!s,c=e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks")&&e.race.hasOwnProperty("replicator")&&Object.values(e.race.governor.tasks).includes("replicate")&&e.race.governor.config.replicate.pow.on&&e.race.replicator.pow>0;if(s&&e.city.hasOwnProperty("powered")){let u=e.city.power;c&&(u+=e.race.replicator.pow),n=a.powered()<=u}let o=a.hasOwnProperty("s_type")&&a.hasOwnProperty("support")&&a.support()<0,l=!o;if(o){let u=Fa(),d=u[a.s_type].r,h=u[a.s_type].rs;l=e[d][h].support-a.support()<=e[d][h].s_max}return n&&l||e.settings.alwaysPower?(e[i[0]][i[1]].on++,s&&(e.city.power-=a.powered(),c&&La.replicate.task()),r&&typeof r=="function"?r(a):!0):!1}function gu(a,r){let i=typeof a.desc=="string"?a.desc:a.desc();if(i=i+". ",a.cost&&!r){Jt(a)?i=i+t("affordable")+". ":i=i+t("not_affordable")+". ",i=i+"Costs: ";let n=a.id.split("-")[0];var s=n!=="genes"&&n!=="blood"?_t(a):a.cost;Object.keys(s).forEach(function(c){if(c==="Custom"){let o=s[c]();i=i+o.label}else if(c==="Structs"){let o=s[c]();Object.keys(o).forEach(function(l){Object.keys(o[l]).forEach(function(u){let d="";if(o[l][u].hasOwnProperty("s")){let h=o[l][u].s;d=typeof q[l][h][u].title=="string"?q[l][h][u].title:q[l][h][u].title()}else d=typeof q[l][u].title=="string"?q[l][u].title:q[l][u].title();i=i+`${d}. `,e[l][u]?o[l][u].count>e[l][u].count?i=i+`${t("insufficient")} ${d}. `:o[l][u].hasOwnProperty("on")&&o[l][u].on>e[l][u].on&&(i=i+`${t("insufficient")} ${d} enabled. `):i=i+`${t("insufficient")} ${d}. `})})}else if(e.prestige.hasOwnProperty(c)){let o=s[c]();if(o>0){c==="Plasmid"&&e.race.universe==="antimatter"&&(c="AntiPlasmid");let l=t(`resource_${c}_name`);i=i+`${l}: ${o}. `,e.prestige[c].count0){let l=t(`resource_${c}_name`);i=i+`${l}: ${o}. `,e.portal.purifier.supply0){let u=l==="Money"?"$":e.resource[l].name+": ";u=u.replace("_"," ");let d=Y(o,1);i=i+`${u}${d}. `,e.resource[l].amount${r.hasOwnProperty("touchlabel")?r.touchlabel:t("construct")}`),a.append(u),$("#touchButton").on("touchstart",function(){qo(r,n,c)})),a.append($(`
${l}
`));let d=r.id.split("-")[0];r.category&&d==="tech"&&!s&&a.append($(`
${t("tech_dist_category")}: ${t(`tech_dist_${r.category}`)}
`));let h=_s(r,!1,!0);if(r.cost&&!s){let v=!0;var p=$('
'),f=d!=="genes"&&d!=="blood"?_t(r):r.cost;Object.keys(f).forEach(function(k){if(k==="Custom"){let P=f[k]();p.append($(`
${P.label}
`)),v=!1}else if(k==="Structs"){let P=f[k]();Object.keys(P).forEach(function(j){Object.keys(P[j]).forEach(function(D){let U=P[j][D].hasOwnProperty("on")?P[j][D].on:P[j][D].count,Q="has-text-dark",R="";e[j][D]?P[j][D].count>e[j][D].count?(Q="has-text-danger",R=' (blocking resource)'):P[j][D].hasOwnProperty("on")&&P[j][D].on>e[j][D].on&&(Q="has-text-alert"):(Q="has-text-danger",R=' (blocking resource)');let wt="";if(P[j][D].hasOwnProperty("s")){let Rs=P[j][D].s;wt=typeof q[j][Rs][D].title=="string"?q[j][Rs][D].title:q[j][Rs][D].title()}else wt=typeof q[j][D].title=="string"?q[j][D].title:q[j][D].title();v=!1,p.append($(`
${wt}: ${U}${R}
`))})})}else if(e.prestige.hasOwnProperty(k)){let P=f[k]();if(P>0){k==="Plasmid"&&e.race.universe==="antimatter"&&(k="AntiPlasmid");let j=t(`resource_${k}_name`),D="has-text-dark",U="";e.prestige[k].count(blocking resource)'),v=!1,p.append($(`
${j}: ${P}${U}
`))}}else if(k==="Supply"){let P=f[k]();if(P>0){let j=t(`resource_${k}_name`),D="has-text-dark",U="";e.portal.purifier.supply(blocking resource)'),v=!1,p.append($(`
${j}: ${P}${U}
`))}}else if(k!=="Morale"&&k!=="Army"&&k!=="Bool"){let P=f[k]();if(P>0){let j="",D=k==="Species"?e.race.species:k;if(k==="HellArmy"){let U=t("fortress_troops"),Q="has-text-dark";e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size(blocking resource)'):Q="has-text-alert"),v=!1,p.append($(`
${U}: ${P}${j}
`))}else{let U=D==="Money"?"$":e.resource[D].name+": ";U=U.replace("_"," ");let Q="has-text-dark",R="";e.resource[D].amount(blocking resource)'):Q="has-text-alert",o&&o!==k&&h.r===D?(Q+=" grad-from-left",R=' (first blocking resource)'):o&&o===k&&h.r!==D&&(Q+=" grad-from-left-warn")):o&&o===k&&(Q+=" grad-from-right",R=' (last blocking resource)');let wt=Y(P,1);v=!1,p.append($(`
${U}${wt}${R}
`))}}}}),v||a.append(p)}if(r.effect){var g=typeof r.effect=="string"?r.effect:r.effect();g&&a.append($(`
${g}
`))}if(r.flair){var w=typeof r.flair=="string"?r.flair:r.flair();a.append($(`
${w}
`)),a.addClass("flair")}if(r.reqs){let v=[];if(Object.keys(r.reqs).forEach(function(k){let P=$(`#${r.id}`).attr(`data-req-${k}`);P&&v.push(typeof q.tech[P].title=="string"?q.tech[P].title:q.tech[P].title())}),v.length>0){let k=v.join(", ");a.append($(`
${t("requires_tech",[k])}
`))}}if(!s&&r.id.substring(0,5)!=="blood"&&!Jt(r)&&Jt(r,!0)){if(typeof i=="string"&&i==="notimer")return;if(i&&i.time)a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){return t("action_ready",[v])}}});else{let v=lt(h.t);a.append($(`
${t("action_ready",[v])}
`))}}(r.id==="portal-spire"||r.id==="portal-waygate"&&e.tech.waygate>=2)&&i&&i.time&&(a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){let k=!r.hasOwnProperty("mscan")||r.hasOwnProperty("mscan")&&r.mscan()>0?v:"???";return t("floor_clearing",[k])}}})),r.id==="portal-devilish_dish"&&i&&i.time&&(a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){let k=!r.hasOwnProperty("mscan")||r.hasOwnProperty("mscan")&&r.mscan()>0?v:"???";return t("action_done",[k])}}}))}function Na(a){A($(`#${a}`),!0),ie(a)}function ji(a,r,i){var s=a.id;e[r]&&e[r][i]&&e[r][i].count&&($(`#${s} .count`).html(e[r][i].count),e[r][i]&&e[r][i].count>0&&($(`#${s} .count`).css("display","inline-block"),$(`#${s} .special`).css("display","block"),$(`#${s} .on`).css("display","block"),$(`#${s} .off`).css("display","block"))),$("#popper").data("id")===s&&$r($("#popper"),a,e[r][i],!1,r,i)}function _(a,r){return r=r||_t(a),Wi(r)?(Object.keys(r).forEach(function(i){if(e.prestige.hasOwnProperty(i)){let s=r[i]();i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count-=s}else if(i==="Supply"){let s=r[i]();e.portal.purifier.supply-=s}else if(i!=="Morale"&&i!=="Army"&&i!=="HellArmy"&&i!=="Structs"&&i!=="Bool"&&i!=="Custom"){let s=r[i](),n=i==="Species"?e.race.species:i;e.resource[n].amount-=s,n==="Knowledge"&&(e.stats.know+=s)}}),!0):!1}function Jt(a,r,i){if(a.cost){let s=i?a.cost:_t(a);return r?vu(s):Wi(s)}return!0}function vu(a){var r=!0;return Object.keys(a).forEach(function(i){if(i!=="Custom")if(i==="Structs"){if(!Po(a[i]())){r=!1;return}}else if(e.prestige.hasOwnProperty(i)){let n=i;if(i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count"u"||e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size0||e.resource[n].max>=0&&s>Number(e.resource[n].max)&&Number(e.resource[n].max)!==-1){r=!1;return}}}),r}function Wi(a){var r=!0;return Object.keys(a).forEach(function(i){if(i==="Custom"){if(!a[i]().met){r=!1;return}}else if(i==="Structs"){if(!Po(a[i]())){r=!1;return}}else if(e.prestige.hasOwnProperty(i)){let n=i;if(i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count"u"||e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size=0&&s>e.resource[n].max;if(s>Number(e.resource[n].amount)+e.resource[n].diff||c){r=!1;return}}}),r}function Po(a){let r=!0;return Object.keys(a).forEach(function(i){if(e.hasOwnProperty(i))Object.keys(a[i]).forEach(function(s){if(e[i].hasOwnProperty(s)){if(e[i][s].count=7&&(a*=.92**e.tech.nexus),a}function Oe(a){let r=J("dirty_jobs",0);return r&&(a-=r),a}function bu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_genes")}

`)),a.append($(`
${t("evo_challenge_genes_desc")}
`)),e.genes.challenge&&e.genes.challenge>=2&&a.append($(`
${t("evo_challenge_genes_mastery")}
`))}function wu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_run")}

`)),a.append($(`
${t("evo_challenge_run_desc")}
`))}function ku(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_scenario")}

`)),a.append($(`
${t("evo_scenario_desc")}
`))}function $u(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_simulation")}

`)),a.append($(`
${t("evo_challenge_simulation_desc")}
`)),a.append($(``)),C({el:"#simSection",data:{},methods:{exitsim(){Su()}}})}function xu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_simulation")}

`)),a.append($(`
${t("evo_challenge_simulation_desc")}
`));let r=$($('
'));a.append(r),e.race.simConfig||(e.race.simConfig={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(i){e.race.simConfig[i]=e.race.simConfig[i]||0,r.append($(`
${t(`resource_${i}_name`)}
`))}),C({el:"#simSection",data:e.race.simConfig})}function En(a,r){let i=typeof a.title=="string"?a.title:a.title();$("#modalBox").append($(`

${i}

`));var s=$('
');switch($("#modalBox").append(s),r){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":it("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":it("factory",s);break;case"star_dock":qu(s);break;case"mining_droid":it("droid",s);break;case"g_factory":case"refueling_station":it("graphene",s);break;case"freighter":case"super_freighter":jn(s);break;case"pylon":it("pylon",s);break;case"rock_quarry":it("rock_quarry",s);break;case"titan_mine":it("titan_mine",s);break;case"mining_ship":it("mining_ship",s);break;case"alien_space_station":it("alien_space_station",s);break;case"nanite_factory":it("nanite_factory",s);break;case"alien_outpost":it("replicator",s);break}}function qu(a){if(e.tech.genesis<4){let s=$(`
${t("stardock_warn")}
`);a.append(s);return}let r=$('
');a.append(r);let i=q.starDock.probes;if(Ut(i,"starDock","probes"),e.tech.geck&&e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5){let s=q.starDock.geck;Ut(s,"starDock","geck")}if(e.tech.genesis>=5){let s=q.starDock.seeder;Ut(s,"starDock","seeder")}if(e.tech.genesis===6){let s=q.starDock.prep_ship;Ut(s,"starDock","prep_ship")}if(e.tech.genesis>=7){let s=q.starDock.launch_ship;Ut(s,"starDock","launch_ship")}}function Mo(){A($("#evolution .evolving"),!0);let a=$(`
${e.evolution.final}%
`);$("#evolution").append(a)}function qt(){return e.race.universe==="magic"?t("city_wizard_tower_title"):e.race.evil?t("city_babel_title"):t("city_wardenclyffe")}function Co(){switch(e.race.species){case"orc":return t("city_basic_housing_orc_title");case"wolven":return t("city_basic_housing_wolven_title");case"sporgar":return t("city_basic_housing_sporgar_title");case"dracnid":return t("city_basic_housing_title7");case"balorg":return t("city_basic_housing_title7");case"imp":return t("city_basic_housing_title8");case"seraph":return t("city_basic_housing_seraph_title");case"unicorn":return t("city_basic_housing_unicorn_title")}switch(x[e.race.species].type){case"avian":return t("city_basic_housing_nest_title");case"plant":return t("city_basic_housing_entish_title");case"sand":return t("city_basic_housing_sand_title");case"polar":return t("city_basic_housing_polar_title");case"eldritch":return t("city_basic_housing_eldritch_title")}return e.city.ptrait.includes("trashed")?t("city_basic_housing_trash_title"):t("city_basic_housing_title")}function Pu(){switch(e.race.species){case"sporgar":return t("city_cottage_title2");case"balorg":return t("city_cottage_title3");case"imp":return t("city_basic_housing_title7");case"seraph":return t("city_cottage_title4");case"unicorn":return t("city_cottage_title5");case"dracnid":return t("city_cottage_title7")}switch(x[e.race.species].type){case"avian":return t("city_cottage_title6");case"eldritch":return t("city_cottage_title8")}return t("city_cottage_title1")}function Mu(a){if(!a&&J("extravagant",0))return t("city_mansion");switch(e.race.species){case"sporgar":return t("city_apartment_title2")}switch(x[e.race.species].type){case"avian":return t("city_apartment_title5");case"sand":return t("city_apartment_title6");case"demonic":return t("city_apartment_title3");case"angelic":return t("city_apartment_title4");case"giant":return t("city_apartment_title7");case"eldritch":return t("city_apartment_title8")}return t("city_apartment_title1")}function $e(a,r){switch(a){case"small":return Co();case"medium":return Pu();case"large":return Mu(r)}}function ba(a,r){if(e.tech.queue&&e.queue.display){let i=["space","interstellar","galaxy","portal","tauceti"];for(let s=0;s-1)if(i.includes(n.action)){let c=!0;Object.keys(q[n.action]).forEach(function(o){q[n.action][o][n.type]&&c&&(e.queue.queue[s].label=typeof q[n.action][o][n.type].title=="string"?q[n.action][o][n.type].title:q[n.action][o][n.type].title(),c=!1)})}else q[n.action][n.type]&&(e.queue.queue[s].label=typeof q[n.action][n.type].title=="string"?q[n.action][n.type].title:q[n.action][n.type].title())}}if(a&&e.tech.r_queue&&e.r_queue.display)for(let i=0;i1)return e.race.evoFinalMenu=a,ss(),!0;e.race.species=a,qs()}function qs(){e.race.simulation&&Ou(),e.sim&&(e.settings.showGenetics=!0,e.settings.arpa.physics=!1,e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2),e.resource.hasOwnProperty("RNA")&&(e.resource.RNA.display=!1),e.resource.hasOwnProperty("DNA")&&(e.resource.DNA.display=!1),(e.race.species==="junker"||e.race.species==="sludge")&&Oo(),e.race.species!=="junker"&&delete e.race.junker,e.race.species!=="sludge"&&delete e.race.sludge;for(var a=["rna","dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"],r=0;r=4&&Se(d)}),Object.keys(x[e.race.species].traits).forEach(function(d){Se(d,{set:x[e.race.species].traits[d]})}),e.race.imitation&&e.race.srace&&Ps(!1),Object.keys(e.tech).forEach(function(d){d.substring(0,4)==="evo_"&&delete e.tech[d]}),delete e.tech.evo,e.evolution={};let i=new Date;!e.settings.boring&&i.getMonth()===11&&i.getDate()>=17&&(e.race.species==="elven"?(Se("slaver",{set:2}),Se("resourceful",{set:.5}),Se("small",{set:.25})):e.race.species==="capybara"?(Se("beast_of_burden",{set:1}),Se("pack_rat",{set:.5}),Se("musical",{set:.25})):e.race.species==="centaur"?(Se("beast_of_burden",{set:1}),Se("curious",{set:.5}),Se("blissful",{set:.25})):e.race.species==="wendigo"?(Se("immoral",{set:3}),Se("cannibalize",{set:.5}),Se("claws",{set:.25})):e.race.species==="yeti"?(Se("scavenger",{set:3}),Se("regenerative",{set:.5}),Se("musical",{set:.25})):e.race.species==="entish"&&(Se("photosynth",{set:3}),Se("optimistic",{set:.5}),Se("armored",{set:.25})));let s=xe("easter");if(e.race.species==="wolven"&&s.active?(Se("hyper",{set:1}),Se("fast_growth",{set:1}),Se("rainbow",{set:1}),Se("optimistic",{set:1})):e.race.species==="vulpine"&&s.active&&(Se("cannibalize",{set:2}),Se("rage",{set:1}),Se("blood_thirst",{set:1}),Se("sticky",{set:1})),e.race.no_crispr||e.race.badgenes){let d=e.race.badgenes?3:1;for(let h=0;h=2)for(let d=1;d<8;d++)e.genes.evolve>=d+1&&Bi(d);let o=xa();e.civic.foreign.gov0.name={s0:o.s0,s1:o.s1};let l=xa();for(;o.s0===l.s0&&o.s1===l.s1;)l=xa();e.civic.foreign.gov1.name={s0:l.s0,s1:l.s1};let u=xa();for(;o.s0===u.s0&&o.s1===u.s1||l.s0===u.s0&&l.s1===u.s1;)u=xa();if(e.civic.foreign.gov2.name={s0:u.s0,s1:u.s1},e.race.truepath||e.race.lone_survivor){e.civic.foreign.gov0.mil=Math.round(e.civic.foreign.gov0.mil*1.5),e.civic.foreign.gov1.mil=Math.round(e.civic.foreign.gov1.mil*1.4),e.civic.foreign.gov2.mil=Math.round(e.civic.foreign.gov2.mil*1.25),e.civic.foreign.gov3={unrest:0,hstl:Math.floor(K(20,40)),mil:Math.floor(K(650,750)),eco:Math.floor(K(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let d=xa(!0);e.civic.foreign.gov3.name={s0:d.s0,s1:d.s1},e.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let h=xa(!0);for(;h.s1===d.s1;)h=xa(!0);e.civic.foreign.gov4.name={s0:99,s1:h.s1}}if(e.race.cataclysm?I(t("cataclysm_sentience",[x[e.race.species].home,We("name")]),"info",!1,["progress"]):I(t("sentience",[t("genelab_genus_"+x[e.race.species].type),x[e.race.species].entity,We("name")]),"info",!1,["progress"]),e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(e.resource.Steel.display=!0,e.resource.Steel.amount=25,e.stats.achieve.technophobe.l>=3)){e.race.truepath||(e.resource.Soul_Gem.display=!0);let d=1;for(let h=1;h=5&&d++;e.resource.Soul_Gem.amount=d}if(e.race.species==="tortoisan"){let d=Math.floor(K(100));d===99?e.race.shell_color="rainbow":d>=97&&d<=98?e.race.shell_color="white":d>=93&&d<=96?e.race.shell_color="red":d>=89&&d<=92?e.race.shell_color="orange":d>=85&&d<=88?e.race.shell_color="yellow":d>=75&&d<=84?e.race.shell_color="purple":d>=65&&d<=74?e.race.shell_color="blue":e.race.shell_color="green"}if(e.race.species==="vulpine"){let d=Math.floor(K(100));d>=85?e.race.fox_color="white":d>=70&&d<=84?e.race.fox_color="tan":d>=55&&d<=69?e.race.fox_color="silver":d>=35&&d<=54?e.race.fox_color="grey":e.race.fox_color="red"}if(na(!0),e.blood.aware&&(e.settings.arpa.blood=!0,e.tech.b_stone=2),wi(!0),xi(),Vr(!0),e.race.shapeshifter&&za(!1,!0),e.race.carnivore||e.race.soul_eater||e.race.unfathomable?(e.civic.d_job="hunter",e.civic.hunter.display=!0):e.race.forager?(e.civic.d_job="forager",e.civic.forager.display=!0):(e.civic.d_job="unemployed",e.civic.unemployed.display=!0),e.race.hooved&&(e.resource.Horseshoe.display=!0,e.resource.Horseshoe.amount=5,e.race.shoecnt=5),e.race.deconstructor&&(e.resource.Nanite.display=!0,e.city.nanite_factory={count:1,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,Water:0,Deuterium:0,Neutronium:0,Adamantite:0,Bolognium:0,Orichalcum:0},e.settings.showIndustry=!0),mt(!0),(e.race.truepath||e.race.lone_survivor)&&Object.keys(Wa).forEach(function(d){e.resource.hasOwnProperty(d)&&(e.resource[d].value=Wa[d]*2)}),H(e.race.species,!0),Ie("sentience",{species:e.race.species,challenge:dt()-1}),e.stats.feat.adept){let d=Cs();e.resource.Food.amount+=d*100,e.resource.Stone.max+=d*60,e.resource.Stone.amount+=d*100,e.race.smoldering?(e.resource.Chrysotile.max+=d*60,e.resource.Chrysotile.amount+=d*100):(e.resource.Lumber.max+=d*60,e.resource.Lumber.amount+=d*100)}e.race.fasting&&(e.resource.Food.amount=0),e.race.cataclysm?Fu():e.race.lone_survivor?Ac():e.race.artifical&&ju(),e.settings.tabLoad?(Rt(),yi(),ha($("#c_garrison"),!1),bi(),e.race.cataclysm||e.race.lone_survivor?(A($("#r_civics")),Vr(),Pe(),Aa("market"),Aa("storage"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(d){let h=ge.resource[d].color,p=ge.resource[d].tradable;if(ge.resource[d].stackable){var g=$(`
`);$("#resStorage").append(g),Pi(`#stack-${d}`,g,d,h,!0)}if(p){var g=$(`
`);$("#market").append(g),qi(`#market-${d}`,g,d,h,!0)}}),Wr(),ye("Genetics"),ye("Crispr"),ye("Blood")):e.sim&&(ye("Crispr"),ye("Blood"))):ir("mTabCivil"),e.queue.hasOwnProperty("queue")&&(e.queue.queue=[]),(e.race.slow||e.race.hyper||e.race.species==="junker")&&(oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),ce.w&&ce.w.terminate(),window.location.reload())}function Ou(){e.race.simulation&&(e.hasOwnProperty("sim")||(e.sim={stats:Be(e.stats),prestige:Be(e.prestige),genes:Be(e.genes),blood:Be(e.blood),pillars:Be(e.pillars),race:Be(e.race)},e.stats={start:Date.now(),days:0,tdays:0},Ws(),e.genes={minor:{},challenge:1},e.blood={aware:1},e.pillars={},delete e.race.ancient_ruins,delete e.race.rapid_mutation,delete e.race.corruption,delete e.race.rejuvenated,e.race.ascended=!1,e.race.gods="none",e.race.old_gods="none",["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(a){e.prestige[a]={count:Number(e.race.simConfig[a])}})))}function Su(){e.hasOwnProperty("sim")&&(e.stats=Be(e.sim.stats),e.prestige=Be(e.sim.prestige),e.genes=Be(e.sim.genes),e.blood=Be(e.sim.blood),e.pillars=Be(e.sim.pillars),e.race=Be(e.sim.race),delete e.sim,e.race.species="protoplasm",delete e.race.simulation,oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),ce.w&&ce.w.terminate(),window.location.reload())}function ju(){e.race.artifical&&(e.tech.spy=5,e.tech.primitive=3,e.tech.currency=6,e.tech.govern=3,e.tech.boot_camp=1,e.tech.medic=1,e.tech.military=5,e.tech.explosives=3,e.tech.trade=3,e.tech.banking=6,e.tech.home_safe=1,e.tech.housing=3,e.tech.smelting=3,e.tech.copper=1,e.tech.storage=5,e.tech.container=4,e.tech.steel_container=3,e.tech.mining=4,e.tech.pickaxe=2,e.tech.hammer=2,e.tech.oil=3,e.tech.alumina=1,e.tech.titanium=1,e.tech.foundry=7,e.tech.factory=1,e.tech.theatre=3,e.tech.broadcast=1,e.tech.science=7,e.tech.high_tech=4,e.tech.theology=2,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.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.display=!0,e.resource.Food.display=!0,e.resource.Money.amount=1e3,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.Steel.display=!0,e.resource.Titanium.display=!0,e.resource.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.race.flier||(e.tech.cement=5,e.resource.Cement.display=!0),!e.race.kindling_kindred&&!e.race.smoldering&&(e.race.evil?(e.tech.reclaimer=3,e.city.graveyard={count:1}):(e.tech.axe=3,e.tech.saw=2,e.city.lumber_yard={count:1},e.city.sawmill={count:0,on:0}),e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.civic.lumberjack.display=!0),e.race.smoldering&&(e.resource.Chrysotile.display=!0),e.resource[e.race.species].max=0,e.resource[e.race.species].amount=0,e.resource.Crates.amount=10,e.resource.Containers.amount=10,e.civic.taxes.display=!0,e.civic.miner.display=!0,e.civic.coal_miner.display=!0,e.civic.quarry_worker.display=!0,e.civic.professor.display=!0,e.civic.scientist.display=!0,e.race.flier||(e.civic.cement_worker.display=!0),e.civic.banker.display=!0,e.city.calendar.day++,e.city.market.active=!0,e.city.power=7.5,e.city.powered=!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:1,cap:0,Wood:0,Coal:0,Oil:1,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:0,Iridium:0},e.city.oil_power={count:1,on:1},e.city.coal_power={count:0,on:0},e.city.transmitter={count:1,on:1},e.city.mine={count:1,on:0},e.city.coal_mine={count:1,on:0},e.city.oil_well={count:1},e.city.oil_depot={count:1},e.city.cement_plant={count:1,on:0},e.city.garrison={count:0,on:0},e.city.boot_camp={count:0},e.city.basic_housing={count:0},e.city.cottage={count:0},e.city.apartment={count:0,on:0},e.city.amphitheatre={count:0},e.city.rock_quarry={count:1,on:0,asbestos:50},e.city.metal_refinery={count:1,on:0},e.city.shed={count:2},e.city.storage_yard={count:1},e.city.warehouse={count:1},e.city.trade={count:0},e.city.wharf={count:0},e.city.bank={count:1},e.city.university={count:1},e.city.library={count:1},e.city.wardenclyffe={count:0,on:0},e.city.temple={count:0},e.race.calm&&(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}),e.civic.govern.type="technocracy",e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0},Rt(),pe(),Xe())}function Fu(){e.race.cataclysm&&(e.tech.unify=2,e.tech.spy=5,e.tech.primitive=3,e.tech.currency=6,e.tech.govern=3,e.tech.boot_camp=1,e.tech.medic=1,e.tech.military=5,e.tech.marines=1,e.tech.explosives=3,e.tech.trade=3,e.tech.wharf=1,e.tech.banking=6,e.tech.gambling=1,e.tech.home_safe=1,e.tech.housing=3,e.tech.smelting=3,e.tech.copper=1,e.tech.storage=5,e.tech.container=4,e.tech.steel_container=3,e.tech.mining=4,e.tech.oil=7,e.tech.mass=1,e.tech.alumina=1,e.tech.titanium=2,e.tech.polymer=2,e.tech.uranium=4,e.tech.foundry=7,e.tech.factory=1,e.tech.theatre=3,e.tech.broadcast=2,e.tech.mine_conveyor=1,e.tech.science=9,e.tech.high_tech=7,e.tech.genetics=1,e.tech.theology=2,e.tech.space=6,e.tech.solar=3,e.tech.luna=2,e.tech.hell=1,e.tech.mars=5,e.tech.gas_giant=1,e.tech.gas_moon=2,e.tech.asteroid=3,e.tech.satellite=1,e.tech.space_explore=4,e.tech.genesis=2,e.settings.showSpace=!0,e.settings.space.home=!0,e.settings.space.moon=!0,e.settings.space.red=!0,e.settings.space.hell=!0,e.settings.space.sun=!0,e.settings.space.gas=!0,e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.settings.space.dwarf=!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=1,e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.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.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Mythril.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.race.flier||(e.resource.Cement.display=!0,e.resource.Cement.max=75e3,e.resource.Cement.amount=75e3),!e.race.kindling_kindred&&!e.race.smoldering&&(e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.resource.Lumber.max=9e4,e.resource.Lumber.amount=9e4,e.resource.Plywood.amount=5e4),e.race.smoldering&&(e.resource.Chrysotile.display=!0,e.resource.Chrysotile.max=9e4,e.resource.Chrysotile.amount=9e4),e.resource[e.race.species].max=8,e.resource[e.race.species].amount=8,e.resource.Crates.amount=20,e.resource.Containers.amount=20,e.resource.Money.max=225e3,e.resource.Money.amount=225e3,e.resource.Food.max=1e3,e.resource.Food.amount=1e3,e.resource.Oil.max=1e3,e.resource.Oil.amount=1e3,e.resource.Helium_3.max=1e3,e.resource.Helium_3.amount=1e3,e.resource.Uranium.max=1e3,e.resource.Uranium.amount=1e3,e.resource.Stone.max=9e4,e.resource.Stone.amount=9e4,e.resource.Furs.max=4e4,e.resource.Furs.amount=4e4,e.resource.Copper.max=75e3,e.resource.Copper.amount=75e3,e.resource.Iron.max=75e3,e.resource.Iron.amount=75e3,e.resource.Steel.max=75e3,e.resource.Steel.amount=75e3,e.resource.Aluminium.max=75e3,e.resource.Aluminium.amount=75e3,e.resource.Titanium.max=75e3,e.resource.Titanium.amount=75e3,e.resource.Coal.max=1e4,e.resource.Coal.amount=1e4,e.resource.Alloy.max=2e4,e.resource.Alloy.amount=2e4,e.resource.Polymer.max=2e4,e.resource.Polymer.amount=2e4,e.resource.Iridium.max=1e3,e.resource.Iridium.amount=1e3,e.resource.Brick.amount=5e4,e.resource.Wrought_Iron.amount=5e4,e.resource.Sheet_Metal.amount=5e4,e.resource.Mythril.amount=8e3,e.resource.Iridium.crates=5,e.resource.Iridium.containers=5,e.civic.taxes.display=!0,e.civic.professor.display=!0,e.civic.scientist.display=!0,e.civic.colonist.display=!0,e.civic.space_miner.display=!0,e.civic.craftsman.display=!0,e.race.flier||(e.tech.cement=5,e.civic.cement_worker.display=!0,e.civic.cement_worker.max=F(1),e.civic.cement_worker.workers=F(1)),e.civic.colonist.max=F(4),e.civic.colonist.workers=F(4),e.civic.space_miner.max=F(3),e.civic.space_miner.workers=F(2),e.civic.professor.max=F(1),e.civic.professor.workers=F(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.fission_power={count:0,on:0},e.city.oil_power={count:0,on:0},e.city.coal_power={count:0,on:0},e.city.mass_driver={count:0,on:0},e.city.mine={count:0,on:0},e.city.coal_mine={count:0,on:0},e.city.oil_well={count:0},e.city.oil_depot={count:0},e.city.garrison={count:0,on:0},e.city.basic_housing={count:0},e.city.cottage={count:0},e.city.apartment={count:0,on:0},e.city.amphitheatre={count:0},e.city.casino={count:0,on:0},e.city.rock_quarry={count:0,on:0,asbestos:50},e.city.metal_refinery={count:0,on:0},e.city.storage_yard={count:0},e.city.warehouse={count:0},e.city.trade={count:0},e.city.wharf={count:0},e.city.bank={count:0},e.city.tourist_center={count:0,on:0},e.city.university={count:0},e.city.library={count:0},e.city.wardenclyffe={count:0,on:0},e.city.biolab={count:0,on:0},e.city.lumber_yard={count:0},e.city.sawmill={count:0,on:0},e.city.temple={count:0},e.space.satellite={count:1},e.space.propellant_depot={count:1},e.space.gps={count:4},e.space.nav_beacon={count:1,on:1},e.space.moon_base={count:1,on:1,support:3,s_max:3},e.space.iridium_mine={count:1,on:1},e.space.helium_mine={count:1,on:1},e.space.observatory={count:1,on:1},e.space.spaceport={count:2,on:2,support:8,s_max:10},e.space.red_tower={count:1,on:1},e.space.living_quarters={count:4,on:4},e.space.vr_center={count:0,on:0},e.space.garage={count:1},e.space.red_mine={count:1,on:1},e.space.fabrication={count:1,on:1},e.space.red_factory={count:1,on:1},e.space.exotic_lab={count:1,on:1},e.space.ziggurat={count:0},e.space.space_barracks={count:1,on:1},e.space.biodome={count:2,on:2},e.space.laboratory={count:0,on:0},e.space.geothermal={count:2,on:2},e.space.spc_casino={count:0,on:0},e.space.swarm_plant={count:0},e.space.swarm_control={count:5,support:40,s_max:50},e.space.swarm_satellite={count:40},e.space.gas_mining={count:2,on:2},e.space.gas_storage={count:1},e.space.outpost={count:0,on:0},e.space.drone={count:0},e.space.oil_extractor={count:2,on:2},e.space.space_station={count:1,on:1,support:0,s_max:3},e.space.iridium_ship={count:1,on:1},e.space.elerium_ship={count:0,on:0},e.space.elerium_prospector={count:0,on:0},e.space.iron_ship={count:1,on:1},e.space.elerium_contain={count:0,on:0},e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},Rt(),pe(),ut(),ye("Physics"),Xe())}function ws(a){switch(x[a].fanaticism){case"smart":e.race.dumb?(Bi(5),ye("Genetics")):$s("smart");break;case"infectious":$s("infectious"),e.race.species==="human"&&L("infested");break;case"blood_thirst":$s("blood_thirst"),e.race.species==="entish"&&L("madagascar_tree");break;case"none":Bi(5),ye("Genetics");break;default:$s(x[a].fanaticism);break}}function $s(a){e.race[a]?Se(a)?a==="imitation"?Ps(!0):a==="shapeshifter"&&za(e.race.ss_genus):(Bi(5),ye("Genetics")):(e.race[a]=1,Ar(a))}function Mi(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;mn(),A($("#resQueue")),$("#resQueue").append($(` + `);u.append(p)}if(a.on||a.off){if(a.on){let p=$(``);u.append(p)}if(a.off){let p=$(``);u.append(p)}}else if(a.powered&&e.tech.high_tech&&e.tech.high_tech>=2&&Dn(a)||a.switchable&&a.switchable()){let p=$(``),f=$(``);u.append(p),u.append(f)}if(a.count){let p=a.count();p>1&&d.append($(`${p}`))}else r!=="tech"&&e[r]&&e[r][i]&&e[r][i].count>=0?d.append($('{{ act.count }}')):r==="blood"&&e[r]&&e[r][a.grant[0]]&&e[r][a.grant[0]]>0&&a.grant[1]==="*"&&d.append($(` ${e[r][a.grant[0]]} `));if(r!=="tech"&&e[r]&&e[r][i]&&typeof e[r][i].repair<"u"&&d.append($('
')),s?$("#oldTech").append(u):$("#"+c).append(u),r!=="tech"&&e[r]&&e[r][i]&&e[r][i].count===0&&($(`#${o} .count`).css("display","none"),$(`#${o} .special`).css("display","none"),$(`#${o} .on`).css("display","none"),$(`#${o} .off`).css("display","none")),a.emblem){let p=a.emblem();u.append($(p))}let h={template:''};C({el:"#"+o,data:{title:typeof a.title=="string"?a.title:a.title(),act:e[r][i]},methods:{action(){"ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)||qo(a,r,i)},describe(){pi(gu(a,s))},trigModal(){if(a.sAction&&typeof a.sAction=="function")a.sAction();else{this.$buefy.modal.open({parent:this,component:h});let p=setInterval(function(){$("#modalBox").length>0&&(clearInterval(p),En(a,i))},50)}},on_label(){return`on: ${e[r][i].on}`},off_label(){return`off: ${e[r][i].count-e[r][i].on}`},power_on(){if(i==="banquet")e[r][i].on=1;else{let p=V();for(let f=0;f0;f++)e[r][i].on--;a.postPower&&setTimeout(function(){a.postPower(!1)},250)},repair(){return e[r][i].repair},repairMax(){return a.repair()}},filters:{val(p){switch(p){case"on":return a.on();case"off":return a.off()}},p_off(p,f){let g=e[r][i].count-p;if(f==="city-casino"&&!e.race.cataclysm&&!e.race.orbit_decayed||f==="space-spc_casino"&&(e.race.cataclysm||e.race.orbit_decayed)||f==="tauceti-tauceti_casino"&&e.tech.isolation){let w=Ze(5,12);if(g===0&&w.length>0)return w}else if(f==="city-banquet")return p?0:1;return g},p_on(p,f){if(f==="city-biolab"&&!e.race.cataclysm&&!e.race.orbit_decayed||(e.race.cataclysm||e.race.orbit_decayed)&&f==="space-exotic_lab"||e.tech.isolation&&f==="tauceti-infectious_disease_lab"){let g=Ze(12,12);if(p===0&&g.length>0)return g}else if(f==="city-garrison"||f==="space-space_barracks"){let g=pt(1,14,!0);if(p===(f==="city-garrison"?13:0)&&g.length>0)return g}else if(f==="city-banquet")return p?1:0;return p},title(p){return p},options(p){return t("action_options",[p])}}}),B(o,function(){},{in:function(p){$r(p.popper,a,e[r][i],s,r,i)},out:function(){C({el:"#popTimer"},"destroy")},attach:r==="starDock"?"body .modal":"#main",wide:a.wide})}function qo(a,r,i){if(a.id==="spcdock-launch_ship")a.action();else switch(r){case"tech":if(!(e.settings.qKey&&tr.q)&&Ln(i,!1)&&a.action())mu(i),a.post&&setTimeout(function(){a.post()},250);else if(!(a.no_queue&&a.no_queue())&&e.tech.r_queue&&e.r_queue.queue.length0){let p=e.settings.qKey?s:1;p>e.queue.max-d&&(p=e.queue.max-d);let f=a.queue_size?a.queue_size:1;if(a.region&&(r=a.id.split("-")[0]),e.settings.q_merge!=="merge_never")e.queue.queue.length>0&&e.queue.queue[e.queue.queue.length-1].id===a.id?e.queue.queue[e.queue.queue.length-1].q+=Math.min(h,f*p):e.queue.queue.push({id:a.id,action:r,type:i,label:typeof a.title=="string"?a.title:a.title(),cna:!1,time:0,q:Math.min(h,f*p),qs:f,t_max:0,bres:!1});else for(let g=0;g0;g++)e.queue.queue.push({id:a.id,action:r,type:i,label:typeof a.title=="string"?a.title:a.title(),cna:!1,time:0,q:Math.min(h,f),qs:f,t_max:0,bres:!1}),h-=f;c=!0}}break}else e.race.inflation&&e.tech.primitive&&(!a.hasOwnProperty("inflation")||a.inflation)&&e.race.inflation++;n=!0}if(n&&(fu(a,r,i),e.tech.queue&&a.queue_complete)){let l=a.queue_complete();for(let u=0,d=0;dl?(h.q=l,l=0):l-=h.q)}}c&&Tr();break}}}function fu(a,r,i){if(!Jt(a)){let s=a.id;$(`#${s}`).addClass("cna")}if(a.grant){let s=a.grant[0];(!e.tech[s]||e.tech[s]0,n=!s,c=e.race.hasOwnProperty("governor")&&e.race.governor.hasOwnProperty("tasks")&&e.race.hasOwnProperty("replicator")&&Object.values(e.race.governor.tasks).includes("replicate")&&e.race.governor.config.replicate.pow.on&&e.race.replicator.pow>0;if(s&&e.city.hasOwnProperty("powered")){let u=e.city.power;c&&(u+=e.race.replicator.pow),n=a.powered()<=u}let o=a.hasOwnProperty("s_type")&&a.hasOwnProperty("support")&&a.support()<0,l=!o;if(o){let u=Fa(),d=u[a.s_type].r,h=u[a.s_type].rs;l=e[d][h].support-a.support()<=e[d][h].s_max}return n&&l||e.settings.alwaysPower?(e[i[0]][i[1]].on++,s&&(e.city.power-=a.powered(),c&&La.replicate.task()),r&&typeof r=="function"?r(a):!0):!1}function gu(a,r){let i=typeof a.desc=="string"?a.desc:a.desc();if(i=i+". ",a.cost&&!r){Jt(a)?i=i+t("affordable")+". ":i=i+t("not_affordable")+". ",i=i+"Costs: ";let n=a.id.split("-")[0];var s=n!=="genes"&&n!=="blood"?_t(a):a.cost;Object.keys(s).forEach(function(c){if(c==="Custom"){let o=s[c]();i=i+o.label}else if(c==="Structs"){let o=s[c]();Object.keys(o).forEach(function(l){Object.keys(o[l]).forEach(function(u){let d="";if(o[l][u].hasOwnProperty("s")){let h=o[l][u].s;d=typeof q[l][h][u].title=="string"?q[l][h][u].title:q[l][h][u].title()}else d=typeof q[l][u].title=="string"?q[l][u].title:q[l][u].title();i=i+`${d}. `,e[l][u]?o[l][u].count>e[l][u].count?i=i+`${t("insufficient")} ${d}. `:o[l][u].hasOwnProperty("on")&&o[l][u].on>e[l][u].on&&(i=i+`${t("insufficient")} ${d} enabled. `):i=i+`${t("insufficient")} ${d}. `})})}else if(e.prestige.hasOwnProperty(c)){let o=s[c]();if(o>0){c==="Plasmid"&&e.race.universe==="antimatter"&&(c="AntiPlasmid");let l=t(`resource_${c}_name`);i=i+`${l}: ${o}. `,e.prestige[c].count0){let l=t(`resource_${c}_name`);i=i+`${l}: ${o}. `,e.portal.purifier.supply0){let u=l==="Money"?"$":e.resource[l].name+": ";u=u.replace("_"," ");let d=Y(o,1);i=i+`${u}${d}. `,e.resource[l].amount${r.hasOwnProperty("touchlabel")?r.touchlabel:t("construct")}`),a.append(u),$("#touchButton").on("touchstart",function(){qo(r,n,c)})),a.append($(`
${l}
`));let d=r.id.split("-")[0];r.category&&d==="tech"&&!s&&a.append($(`
${t("tech_dist_category")}: ${t(`tech_dist_${r.category}`)}
`));let h=_s(r,!1,!0);if(r.cost&&!s){let v=!0;var p=$('
'),f=d!=="genes"&&d!=="blood"?_t(r):r.cost;Object.keys(f).forEach(function(k){if(k==="Custom"){let P=f[k]();p.append($(`
${P.label}
`)),v=!1}else if(k==="Structs"){let P=f[k]();Object.keys(P).forEach(function(j){Object.keys(P[j]).forEach(function(D){let U=P[j][D].hasOwnProperty("on")?P[j][D].on:P[j][D].count,Q="has-text-dark",R="";e[j][D]?P[j][D].count>e[j][D].count?(Q="has-text-danger",R=' (blocking resource)'):P[j][D].hasOwnProperty("on")&&P[j][D].on>e[j][D].on&&(Q="has-text-alert"):(Q="has-text-danger",R=' (blocking resource)');let wt="";if(P[j][D].hasOwnProperty("s")){let Rs=P[j][D].s;wt=typeof q[j][Rs][D].title=="string"?q[j][Rs][D].title:q[j][Rs][D].title()}else wt=typeof q[j][D].title=="string"?q[j][D].title:q[j][D].title();v=!1,p.append($(`
${wt}: ${U}${R}
`))})})}else if(e.prestige.hasOwnProperty(k)){let P=f[k]();if(P>0){k==="Plasmid"&&e.race.universe==="antimatter"&&(k="AntiPlasmid");let j=t(`resource_${k}_name`),D="has-text-dark",U="";e.prestige[k].count(blocking resource)'),v=!1,p.append($(`
${j}: ${P}${U}
`))}}else if(k==="Supply"){let P=f[k]();if(P>0){let j=t(`resource_${k}_name`),D="has-text-dark",U="";e.portal.purifier.supply(blocking resource)'),v=!1,p.append($(`
${j}: ${P}${U}
`))}}else if(k!=="Morale"&&k!=="Army"&&k!=="Bool"){let P=f[k]();if(P>0){let j="",D=k==="Species"?e.race.species:k;if(k==="HellArmy"){let U=t("fortress_troops"),Q="has-text-dark";e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size(blocking resource)'):Q="has-text-alert"),v=!1,p.append($(`
${U}: ${P}${j}
`))}else{let U=D==="Money"?"$":e.resource[D].name+": ";U=U.replace("_"," ");let Q="has-text-dark",R="";e.resource[D].amount(blocking resource)'):Q="has-text-alert",o&&o!==k&&h.r===D?(Q+=" grad-from-left",R=' (first blocking resource)'):o&&o===k&&h.r!==D&&(Q+=" grad-from-left-warn")):o&&o===k&&(Q+=" grad-from-right",R=' (last blocking resource)');let wt=Y(P,1);v=!1,p.append($(`
${U}${wt}${R}
`))}}}}),v||a.append(p)}if(r.effect){var g=typeof r.effect=="string"?r.effect:r.effect();g&&a.append($(`
${g}
`))}if(r.flair){var w=typeof r.flair=="string"?r.flair:r.flair();a.append($(`
${w}
`)),a.addClass("flair")}if(r.reqs){let v=[];if(Object.keys(r.reqs).forEach(function(k){let P=$(`#${r.id}`).attr(`data-req-${k}`);P&&v.push(typeof q.tech[P].title=="string"?q.tech[P].title:q.tech[P].title())}),v.length>0){let k=v.join(", ");a.append($(`
${t("requires_tech",[k])}
`))}}if(!s&&r.id.substring(0,5)!=="blood"&&!Jt(r)&&Jt(r,!0)){if(typeof i=="string"&&i==="notimer")return;if(i&&i.time)a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){return t("action_ready",[v])}}});else{let v=lt(h.t);a.append($(`
${t("action_ready",[v])}
`))}}(r.id==="portal-spire"||r.id==="portal-waygate"&&e.tech.waygate>=2)&&i&&i.time&&(a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){let k=!r.hasOwnProperty("mscan")||r.hasOwnProperty("mscan")&&r.mscan()>0?v:"???";return t("floor_clearing",[k])}}})),r.id==="portal-devilish_dish"&&i&&i.time&&(a.append($('
{{ time | timer }}
')),C({el:"#popTimer",data:i,filters:{timer(v){let k=!r.hasOwnProperty("mscan")||r.hasOwnProperty("mscan")&&r.mscan()>0?v:"???";return t("action_done",[k])}}}))}function Na(a){A($(`#${a}`),!0),ie(a)}function ji(a,r,i){var s=a.id;e[r]&&e[r][i]&&e[r][i].count&&($(`#${s} .count`).html(e[r][i].count),e[r][i]&&e[r][i].count>0&&($(`#${s} .count`).css("display","inline-block"),$(`#${s} .special`).css("display","block"),$(`#${s} .on`).css("display","block"),$(`#${s} .off`).css("display","block"))),$("#popper").data("id")===s&&$r($("#popper"),a,e[r][i],!1,r,i)}function _(a,r){return r=r||_t(a),Wi(r)?(Object.keys(r).forEach(function(i){if(e.prestige.hasOwnProperty(i)){let s=r[i]();i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count-=s}else if(i==="Supply"){let s=r[i]();e.portal.purifier.supply-=s}else if(i!=="Morale"&&i!=="Army"&&i!=="HellArmy"&&i!=="Structs"&&i!=="Bool"&&i!=="Custom"){let s=r[i](),n=i==="Species"?e.race.species:i;e.resource[n].amount-=s,n==="Knowledge"&&(e.stats.know+=s)}}),!0):!1}function Jt(a,r,i){if(a.cost){let s=i?a.cost:_t(a);return r?vu(s):Wi(s)}return!0}function vu(a){var r=!0;return Object.keys(a).forEach(function(i){if(i!=="Custom")if(i==="Structs"){if(!Po(a[i]())){r=!1;return}}else if(e.prestige.hasOwnProperty(i)){let n=i;if(i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count"u"||e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size0||e.resource[n].max>=0&&s>Number(e.resource[n].max)&&Number(e.resource[n].max)!==-1){r=!1;return}}}),r}function Wi(a){var r=!0;return Object.keys(a).forEach(function(i){if(i==="Custom"){if(!a[i]().met){r=!1;return}}else if(i==="Structs"){if(!Po(a[i]())){r=!1;return}}else if(e.prestige.hasOwnProperty(i)){let n=i;if(i==="Plasmid"&&e.race.universe==="antimatter"&&(i="AntiPlasmid"),e.prestige[i].count"u"||e.portal.fortress.garrison-e.portal.fortress.patrols*e.portal.fortress.patrol_size=0&&s>e.resource[n].max;if(s>Number(e.resource[n].amount)+e.resource[n].diff||c){r=!1;return}}}),r}function Po(a){let r=!0;return Object.keys(a).forEach(function(i){if(e.hasOwnProperty(i))Object.keys(a[i]).forEach(function(s){if(e[i].hasOwnProperty(s)){if(e[i][s].count=7&&(a*=.92**e.tech.nexus),a}function Oe(a){let r=J("dirty_jobs",0);return r&&(a-=r),a}function bu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_genes")}

`)),a.append($(`
${t("evo_challenge_genes_desc")}
`)),e.genes.challenge&&e.genes.challenge>=2&&a.append($(`
${t("evo_challenge_genes_mastery")}
`))}function wu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_run")}

`)),a.append($(`
${t("evo_challenge_run_desc")}
`))}function ku(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_scenario")}

`)),a.append($(`
${t("evo_scenario_desc")}
`))}function $u(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_simulation")}

`)),a.append($(`
${t("evo_challenge_simulation_desc")}
`)),a.append($(``)),C({el:"#simSection",data:{},methods:{exitsim(){Su()}}})}function xu(){let a=$('
');$("#evolution").append(a),a.append($(`

${t("evo_challenge_simulation")}

`)),a.append($(`
${t("evo_challenge_simulation_desc")}
`));let r=$($('
'));a.append(r),e.race.simConfig||(e.race.simConfig={}),["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(i){e.race.simConfig[i]=e.race.simConfig[i]||0,r.append($(`
${t(`resource_${i}_name`)}
`))}),C({el:"#simSection",data:e.race.simConfig})}function En(a,r){let i=typeof a.title=="string"?a.title:a.title();$("#modalBox").append($(`

${i}

`));var s=$('
');switch($("#modalBox").append(s),r){case"smelter":case"hell_smelter":case"stellar_forge":case"hell_forge":case"geothermal":case"ore_refinery":it("smelter",s);break;case"factory":case"red_factory":case"int_factory":case"tau_factory":it("factory",s);break;case"star_dock":qu(s);break;case"mining_droid":it("droid",s);break;case"g_factory":case"refueling_station":it("graphene",s);break;case"freighter":case"super_freighter":jn(s);break;case"pylon":it("pylon",s);break;case"rock_quarry":it("rock_quarry",s);break;case"titan_mine":it("titan_mine",s);break;case"mining_ship":it("mining_ship",s);break;case"alien_space_station":it("alien_space_station",s);break;case"nanite_factory":it("nanite_factory",s);break;case"alien_outpost":it("replicator",s);break}}function qu(a){if(e.tech.genesis<4){let s=$(`
${t("stardock_warn")}
`);a.append(s);return}let r=$('
');a.append(r);let i=q.starDock.probes;if(Ut(i,"starDock","probes"),e.tech.geck&&e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5){let s=q.starDock.geck;Ut(s,"starDock","geck")}if(e.tech.genesis>=5){let s=q.starDock.seeder;Ut(s,"starDock","seeder")}if(e.tech.genesis===6){let s=q.starDock.prep_ship;Ut(s,"starDock","prep_ship")}if(e.tech.genesis>=7){let s=q.starDock.launch_ship;Ut(s,"starDock","launch_ship")}}function Mo(){A($("#evolution .evolving"),!0);let a=$(`
${e.evolution.final}%
`);$("#evolution").append(a)}function qt(){return e.race.universe==="magic"?t("city_wizard_tower_title"):e.race.evil?t("city_babel_title"):t("city_wardenclyffe")}function Co(){switch(e.race.species){case"orc":return t("city_basic_housing_orc_title");case"wolven":return t("city_basic_housing_wolven_title");case"sporgar":return t("city_basic_housing_sporgar_title");case"dracnid":return t("city_basic_housing_title7");case"balorg":return t("city_basic_housing_title7");case"imp":return t("city_basic_housing_title8");case"seraph":return t("city_basic_housing_seraph_title");case"unicorn":return t("city_basic_housing_unicorn_title")}switch(x[e.race.species].type){case"avian":return t("city_basic_housing_nest_title");case"plant":return t("city_basic_housing_entish_title");case"sand":return t("city_basic_housing_sand_title");case"polar":return t("city_basic_housing_polar_title");case"eldritch":return t("city_basic_housing_eldritch_title")}return e.city.ptrait.includes("trashed")?t("city_basic_housing_trash_title"):t("city_basic_housing_title")}function Pu(){switch(e.race.species){case"sporgar":return t("city_cottage_title2");case"balorg":return t("city_cottage_title3");case"imp":return t("city_basic_housing_title7");case"seraph":return t("city_cottage_title4");case"unicorn":return t("city_cottage_title5");case"dracnid":return t("city_cottage_title7")}switch(x[e.race.species].type){case"avian":return t("city_cottage_title6");case"eldritch":return t("city_cottage_title8")}return t("city_cottage_title1")}function Mu(a){if(!a&&J("extravagant",0))return t("city_mansion");switch(e.race.species){case"sporgar":return t("city_apartment_title2")}switch(x[e.race.species].type){case"avian":return t("city_apartment_title5");case"sand":return t("city_apartment_title6");case"demonic":return t("city_apartment_title3");case"angelic":return t("city_apartment_title4");case"giant":return t("city_apartment_title7");case"eldritch":return t("city_apartment_title8")}return t("city_apartment_title1")}function $e(a,r){switch(a){case"small":return Co();case"medium":return Pu();case"large":return Mu(r)}}function ba(a,r){if(e.tech.queue&&e.queue.display){let i=["space","interstellar","galaxy","portal","tauceti"];for(let s=0;s-1)if(i.includes(n.action)){let c=!0;Object.keys(q[n.action]).forEach(function(o){q[n.action][o][n.type]&&c&&(e.queue.queue[s].label=typeof q[n.action][o][n.type].title=="string"?q[n.action][o][n.type].title:q[n.action][o][n.type].title(),c=!1)})}else q[n.action][n.type]&&(e.queue.queue[s].label=typeof q[n.action][n.type].title=="string"?q[n.action][n.type].title:q[n.action][n.type].title())}}if(a&&e.tech.r_queue&&e.r_queue.display)for(let i=0;i1)return e.race.evoFinalMenu=a,ss(),!0;e.race.species=a,qs()}function qs(){e.race.simulation&&Ou(),e.sim&&(e.settings.showGenetics=!0,e.settings.arpa.physics=!1,e.settings.arpa.crispr=!0,e.settings.arpa.arpaTabs=2),e.resource.hasOwnProperty("RNA")&&(e.resource.RNA.display=!1),e.resource.hasOwnProperty("DNA")&&(e.resource.DNA.display=!1),(e.race.species==="junker"||e.race.species==="sludge")&&Oo(),e.race.species!=="junker"&&delete e.race.junker,e.race.species!=="sludge"&&delete e.race.sludge;for(var a=["rna","dna","membrane","organelles","nucleus","eukaryotic_cell","mitochondria"],r=0;r=4&&Se(d)}),Object.keys(x[e.race.species].traits).forEach(function(d){Se(d,{set:x[e.race.species].traits[d]})}),e.race.imitation&&e.race.srace&&Ps(!1),Object.keys(e.tech).forEach(function(d){d.substring(0,4)==="evo_"&&delete e.tech[d]}),delete e.tech.evo,e.evolution={};let i=new Date;!e.settings.boring&&i.getMonth()===11&&i.getDate()>=17&&(e.race.species==="elven"?(Se("slaver",{set:2}),Se("resourceful",{set:.5}),Se("small",{set:.25})):e.race.species==="capybara"?(Se("beast_of_burden",{set:1}),Se("pack_rat",{set:.5}),Se("musical",{set:.25})):e.race.species==="centaur"?(Se("beast_of_burden",{set:1}),Se("curious",{set:.5}),Se("blissful",{set:.25})):e.race.species==="wendigo"?(Se("immoral",{set:3}),Se("cannibalize",{set:.5}),Se("claws",{set:.25})):e.race.species==="yeti"?(Se("scavenger",{set:3}),Se("regenerative",{set:.5}),Se("musical",{set:.25})):e.race.species==="entish"&&(Se("photosynth",{set:3}),Se("optimistic",{set:.5}),Se("armored",{set:.25})));let s=xe("easter");if(e.race.species==="wolven"&&s.active?(Se("hyper",{set:1}),Se("fast_growth",{set:1}),Se("rainbow",{set:1}),Se("optimistic",{set:1})):e.race.species==="vulpine"&&s.active&&(Se("cannibalize",{set:2}),Se("rage",{set:1}),Se("blood_thirst",{set:1}),Se("sticky",{set:1})),e.race.no_crispr||e.race.badgenes){let d=e.race.badgenes?3:1;for(let h=0;h=2)for(let d=1;d<8;d++)e.genes.evolve>=d+1&&Bi(d);let o=xa();e.civic.foreign.gov0.name={s0:o.s0,s1:o.s1};let l=xa();for(;o.s0===l.s0&&o.s1===l.s1;)l=xa();e.civic.foreign.gov1.name={s0:l.s0,s1:l.s1};let u=xa();for(;o.s0===u.s0&&o.s1===u.s1||l.s0===u.s0&&l.s1===u.s1;)u=xa();if(e.civic.foreign.gov2.name={s0:u.s0,s1:u.s1},e.race.truepath||e.race.lone_survivor){e.civic.foreign.gov0.mil=Math.round(e.civic.foreign.gov0.mil*1.5),e.civic.foreign.gov1.mil=Math.round(e.civic.foreign.gov1.mil*1.4),e.civic.foreign.gov2.mil=Math.round(e.civic.foreign.gov2.mil*1.25),e.civic.foreign.gov3={unrest:0,hstl:Math.floor(K(20,40)),mil:Math.floor(K(650,750)),eco:Math.floor(K(250,300)),spy:0,esp:0,trn:0,sab:0,act:"none"};let d=xa(!0);e.civic.foreign.gov3.name={s0:d.s0,s1:d.s1},e.civic.foreign.gov4={unrest:0,hstl:100,mil:300,eco:100,spy:0,esp:0,trn:0,sab:0,act:"none"};let h=xa(!0);for(;h.s1===d.s1;)h=xa(!0);e.civic.foreign.gov4.name={s0:99,s1:h.s1}}if(e.race.cataclysm?I(t("cataclysm_sentience",[x[e.race.species].home,We("name")]),"info",!1,["progress"]):I(t("sentience",[t("genelab_genus_"+x[e.race.species].type),x[e.race.species].entity,We("name")]),"info",!1,["progress"]),e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1&&(e.resource.Steel.display=!0,e.resource.Steel.amount=25,e.stats.achieve.technophobe.l>=3)){e.race.truepath||(e.resource.Soul_Gem.display=!0);let d=1;for(let h=1;h=5&&d++;e.resource.Soul_Gem.amount=d}if(e.race.species==="tortoisan"){let d=Math.floor(K(100));d===99?e.race.shell_color="rainbow":d>=97&&d<=98?e.race.shell_color="white":d>=93&&d<=96?e.race.shell_color="red":d>=89&&d<=92?e.race.shell_color="orange":d>=85&&d<=88?e.race.shell_color="yellow":d>=75&&d<=84?e.race.shell_color="purple":d>=65&&d<=74?e.race.shell_color="blue":e.race.shell_color="green"}if(e.race.species==="vulpine"){let d=Math.floor(K(100));d>=85?e.race.fox_color="white":d>=70&&d<=84?e.race.fox_color="tan":d>=55&&d<=69?e.race.fox_color="silver":d>=35&&d<=54?e.race.fox_color="grey":e.race.fox_color="red"}if(na(!0),e.blood.aware&&(e.settings.arpa.blood=!0,e.tech.b_stone=2),wi(!0),xi(),Vr(!0),e.race.shapeshifter&&za(!1,!0),e.race.carnivore||e.race.soul_eater||e.race.unfathomable?(e.civic.d_job="hunter",e.civic.hunter.display=!0):e.race.forager?(e.civic.d_job="forager",e.civic.forager.display=!0):(e.civic.d_job="unemployed",e.civic.unemployed.display=!0),e.race.hooved&&(e.resource.Horseshoe.display=!0,e.resource.Horseshoe.amount=5,e.race.shoecnt=5),e.race.deconstructor&&(e.resource.Nanite.display=!0,e.city.nanite_factory={count:1,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,Water:0,Deuterium:0,Neutronium:0,Adamantite:0,Bolognium:0,Orichalcum:0},e.settings.showIndustry=!0),mt(!0),(e.race.truepath||e.race.lone_survivor)&&Object.keys(Wa).forEach(function(d){e.resource.hasOwnProperty(d)&&(e.resource[d].value=Wa[d]*2)}),H(e.race.species,!0),Ie("sentience",{species:e.race.species,challenge:dt()-1}),e.stats.feat.adept){let d=Cs();e.resource.Food.amount+=d*100,e.resource.Stone.max+=d*60,e.resource.Stone.amount+=d*100,e.race.smoldering?(e.resource.Chrysotile.max+=d*60,e.resource.Chrysotile.amount+=d*100):(e.resource.Lumber.max+=d*60,e.resource.Lumber.amount+=d*100)}e.race.fasting&&(e.resource.Food.amount=0),e.race.cataclysm?Fu():e.race.lone_survivor?Ac():e.race.artifical&&ju(),e.settings.tabLoad?(Rt(),yi(),ha($("#c_garrison"),!1),bi(),e.race.cataclysm||e.race.lone_survivor?(A($("#r_civics")),Vr(),Pe(),Aa("market"),Aa("storage"),ge.hasOwnProperty("resource")&&Object.keys(ge.resource).forEach(function(d){let h=ge.resource[d].color,p=ge.resource[d].tradable;if(ge.resource[d].stackable){var g=$(`
`);$("#resStorage").append(g),Pi(`#stack-${d}`,g,d,h,!0)}if(p){var g=$(`
`);$("#market").append(g),qi(`#market-${d}`,g,d,h,!0)}}),Wr(),ye("Genetics"),ye("Crispr"),ye("Blood")):e.sim&&(ye("Crispr"),ye("Blood"))):ir("mTabCivil"),e.queue.hasOwnProperty("queue")&&(e.queue.queue=[]),(e.race.slow||e.race.hyper||e.race.species==="junker")&&(oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),ce.w&&ce.w.terminate(),window.location.reload())}function Ou(){e.race.simulation&&(e.hasOwnProperty("sim")||(e.sim={stats:Be(e.stats),prestige:Be(e.prestige),genes:Be(e.genes),blood:Be(e.blood),pillars:Be(e.pillars),race:Be(e.race)},e.stats={start:Date.now(),days:0,tdays:0},Ws(),e.genes={minor:{},challenge:1},e.blood={aware:1},e.pillars={},delete e.race.ancient_ruins,delete e.race.rapid_mutation,delete e.race.corruption,delete e.race.rejuvenated,e.race.ascended=!1,e.race.gods="none",e.race.old_gods="none",["Plasmid","AntiPlasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone"].forEach(function(a){e.prestige[a]={count:Number(e.race.simConfig[a])}})))}function Su(){e.hasOwnProperty("sim")&&(e.stats=Be(e.sim.stats),e.prestige=Be(e.sim.prestige),e.genes=Be(e.sim.genes),e.blood=Be(e.sim.blood),e.pillars=Be(e.sim.pillars),e.race=Be(e.sim.race),delete e.sim,e.race.species="protoplasm",delete e.race.simulation,oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(e))),ce.w&&ce.w.terminate(),window.location.reload())}function ju(){e.race.artifical&&(e.tech.spy=5,e.tech.primitive=3,e.tech.currency=6,e.tech.govern=3,e.tech.boot_camp=1,e.tech.medic=1,e.tech.military=5,e.tech.explosives=3,e.tech.trade=3,e.tech.banking=6,e.tech.home_safe=1,e.tech.housing=3,e.tech.smelting=3,e.tech.copper=1,e.tech.storage=5,e.tech.container=4,e.tech.steel_container=3,e.tech.mining=4,e.tech.pickaxe=2,e.tech.hammer=2,e.tech.oil=3,e.tech.alumina=1,e.tech.titanium=1,e.tech.foundry=7,e.tech.factory=1,e.tech.theatre=3,e.tech.broadcast=1,e.tech.science=7,e.tech.high_tech=4,e.tech.theology=2,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.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.display=!0,e.resource.Food.display=!0,e.resource.Money.amount=1e3,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.Steel.display=!0,e.resource.Titanium.display=!0,e.resource.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.race.flier||(e.tech.cement=5,e.resource.Cement.display=!0),!e.race.kindling_kindred&&!e.race.smoldering&&(e.race.evil?(e.tech.reclaimer=3,e.city.graveyard={count:1}):(e.tech.axe=3,e.tech.saw=2,e.city.lumber_yard={count:1},e.city.sawmill={count:0,on:0}),e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.civic.lumberjack.display=!0),e.race.smoldering&&(e.resource.Chrysotile.display=!0),e.resource[e.race.species].max=0,e.resource[e.race.species].amount=0,e.resource.Crates.amount=10,e.resource.Containers.amount=10,e.civic.taxes.display=!0,e.civic.miner.display=!0,e.civic.coal_miner.display=!0,e.civic.quarry_worker.display=!0,e.civic.professor.display=!0,e.civic.scientist.display=!0,e.race.flier||(e.civic.cement_worker.display=!0),e.civic.banker.display=!0,e.city.calendar.day++,e.city.market.active=!0,e.city.power=7.5,e.city.powered=!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:1,cap:0,Wood:0,Coal:0,Oil:1,Star:0,StarCap:0,Inferno:0,Iron:1,Steel:0,Iridium:0},e.city.oil_power={count:1,on:1},e.city.coal_power={count:0,on:0},e.city.transmitter={count:1,on:1},e.city.mine={count:1,on:0},e.city.coal_mine={count:1,on:0},e.city.oil_well={count:1},e.city.oil_depot={count:1},e.city.cement_plant={count:1,on:0},e.city.garrison={count:0,on:0},e.city.boot_camp={count:0},e.city.basic_housing={count:0},e.city.cottage={count:0},e.city.apartment={count:0,on:0},e.city.amphitheatre={count:0},e.city.rock_quarry={count:1,on:0,asbestos:50},e.city.metal_refinery={count:1,on:0},e.city.shed={count:2},e.city.storage_yard={count:1},e.city.warehouse={count:1},e.city.trade={count:0},e.city.wharf={count:0},e.city.bank={count:1},e.city.university={count:1},e.city.library={count:1},e.city.wardenclyffe={count:0,on:0},e.city.temple={count:0},e.race.calm&&(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}),e.civic.govern.type="technocracy",e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:0,wounded:0,raid:0,max:0},Rt(),le(),Xe())}function Fu(){e.race.cataclysm&&(e.tech.unify=2,e.tech.spy=5,e.tech.primitive=3,e.tech.currency=6,e.tech.govern=3,e.tech.boot_camp=1,e.tech.medic=1,e.tech.military=5,e.tech.marines=1,e.tech.explosives=3,e.tech.trade=3,e.tech.wharf=1,e.tech.banking=6,e.tech.gambling=1,e.tech.home_safe=1,e.tech.housing=3,e.tech.smelting=3,e.tech.copper=1,e.tech.storage=5,e.tech.container=4,e.tech.steel_container=3,e.tech.mining=4,e.tech.oil=7,e.tech.mass=1,e.tech.alumina=1,e.tech.titanium=2,e.tech.polymer=2,e.tech.uranium=4,e.tech.foundry=7,e.tech.factory=1,e.tech.theatre=3,e.tech.broadcast=2,e.tech.mine_conveyor=1,e.tech.science=9,e.tech.high_tech=7,e.tech.genetics=1,e.tech.theology=2,e.tech.space=6,e.tech.solar=3,e.tech.luna=2,e.tech.hell=1,e.tech.mars=5,e.tech.gas_giant=1,e.tech.gas_moon=2,e.tech.asteroid=3,e.tech.satellite=1,e.tech.space_explore=4,e.tech.genesis=2,e.settings.showSpace=!0,e.settings.space.home=!0,e.settings.space.moon=!0,e.settings.space.red=!0,e.settings.space.hell=!0,e.settings.space.sun=!0,e.settings.space.gas=!0,e.settings.space.gas_moon=!0,e.settings.space.belt=!0,e.settings.space.dwarf=!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=1,e.settings.showGenetics=!0,e.settings.arpa.physics=!0,e.resource[e.race.species].display=!0,e.resource.Knowledge.display=!0,e.resource.Money.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.Brick.display=!0,e.resource.Wrought_Iron.display=!0,e.resource.Sheet_Metal.display=!0,e.resource.Mythril.display=!0,e.resource.Crates.display=!0,e.resource.Containers.display=!0,e.race.flier||(e.resource.Cement.display=!0,e.resource.Cement.max=75e3,e.resource.Cement.amount=75e3),!e.race.kindling_kindred&&!e.race.smoldering&&(e.resource.Lumber.display=!0,e.resource.Plywood.display=!0,e.resource.Lumber.max=9e4,e.resource.Lumber.amount=9e4,e.resource.Plywood.amount=5e4),e.race.smoldering&&(e.resource.Chrysotile.display=!0,e.resource.Chrysotile.max=9e4,e.resource.Chrysotile.amount=9e4),e.resource[e.race.species].max=8,e.resource[e.race.species].amount=8,e.resource.Crates.amount=20,e.resource.Containers.amount=20,e.resource.Money.max=225e3,e.resource.Money.amount=225e3,e.resource.Food.max=1e3,e.resource.Food.amount=1e3,e.resource.Oil.max=1e3,e.resource.Oil.amount=1e3,e.resource.Helium_3.max=1e3,e.resource.Helium_3.amount=1e3,e.resource.Uranium.max=1e3,e.resource.Uranium.amount=1e3,e.resource.Stone.max=9e4,e.resource.Stone.amount=9e4,e.resource.Furs.max=4e4,e.resource.Furs.amount=4e4,e.resource.Copper.max=75e3,e.resource.Copper.amount=75e3,e.resource.Iron.max=75e3,e.resource.Iron.amount=75e3,e.resource.Steel.max=75e3,e.resource.Steel.amount=75e3,e.resource.Aluminium.max=75e3,e.resource.Aluminium.amount=75e3,e.resource.Titanium.max=75e3,e.resource.Titanium.amount=75e3,e.resource.Coal.max=1e4,e.resource.Coal.amount=1e4,e.resource.Alloy.max=2e4,e.resource.Alloy.amount=2e4,e.resource.Polymer.max=2e4,e.resource.Polymer.amount=2e4,e.resource.Iridium.max=1e3,e.resource.Iridium.amount=1e3,e.resource.Brick.amount=5e4,e.resource.Wrought_Iron.amount=5e4,e.resource.Sheet_Metal.amount=5e4,e.resource.Mythril.amount=8e3,e.resource.Iridium.crates=5,e.resource.Iridium.containers=5,e.civic.taxes.display=!0,e.civic.professor.display=!0,e.civic.scientist.display=!0,e.civic.colonist.display=!0,e.civic.space_miner.display=!0,e.civic.craftsman.display=!0,e.race.flier||(e.tech.cement=5,e.civic.cement_worker.display=!0,e.civic.cement_worker.max=F(1),e.civic.cement_worker.workers=F(1)),e.civic.colonist.max=F(4),e.civic.colonist.workers=F(4),e.civic.space_miner.max=F(3),e.civic.space_miner.workers=F(2),e.civic.professor.max=F(1),e.civic.professor.workers=F(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.fission_power={count:0,on:0},e.city.oil_power={count:0,on:0},e.city.coal_power={count:0,on:0},e.city.mass_driver={count:0,on:0},e.city.mine={count:0,on:0},e.city.coal_mine={count:0,on:0},e.city.oil_well={count:0},e.city.oil_depot={count:0},e.city.garrison={count:0,on:0},e.city.basic_housing={count:0},e.city.cottage={count:0},e.city.apartment={count:0,on:0},e.city.amphitheatre={count:0},e.city.casino={count:0,on:0},e.city.rock_quarry={count:0,on:0,asbestos:50},e.city.metal_refinery={count:0,on:0},e.city.storage_yard={count:0},e.city.warehouse={count:0},e.city.trade={count:0},e.city.wharf={count:0},e.city.bank={count:0},e.city.tourist_center={count:0,on:0},e.city.university={count:0},e.city.library={count:0},e.city.wardenclyffe={count:0,on:0},e.city.biolab={count:0,on:0},e.city.lumber_yard={count:0},e.city.sawmill={count:0,on:0},e.city.temple={count:0},e.space.satellite={count:1},e.space.propellant_depot={count:1},e.space.gps={count:4},e.space.nav_beacon={count:1,on:1},e.space.moon_base={count:1,on:1,support:3,s_max:3},e.space.iridium_mine={count:1,on:1},e.space.helium_mine={count:1,on:1},e.space.observatory={count:1,on:1},e.space.spaceport={count:2,on:2,support:8,s_max:10},e.space.red_tower={count:1,on:1},e.space.living_quarters={count:4,on:4},e.space.vr_center={count:0,on:0},e.space.garage={count:1},e.space.red_mine={count:1,on:1},e.space.fabrication={count:1,on:1},e.space.red_factory={count:1,on:1},e.space.exotic_lab={count:1,on:1},e.space.ziggurat={count:0},e.space.space_barracks={count:1,on:1},e.space.biodome={count:2,on:2},e.space.laboratory={count:0,on:0},e.space.geothermal={count:2,on:2},e.space.spc_casino={count:0,on:0},e.space.swarm_plant={count:0},e.space.swarm_control={count:5,support:40,s_max:50},e.space.swarm_satellite={count:40},e.space.gas_mining={count:2,on:2},e.space.gas_storage={count:1},e.space.outpost={count:0,on:0},e.space.drone={count:0},e.space.oil_extractor={count:2,on:2},e.space.space_station={count:1,on:1,support:0,s_max:3},e.space.iridium_ship={count:1,on:1},e.space.elerium_ship={count:0,on:0},e.space.elerium_prospector={count:0,on:0},e.space.iron_ship={count:1,on:1},e.space.elerium_contain={count:0,on:0},e.civic.garrison={display:!0,disabled:!1,progress:0,tactic:0,workers:2,wounded:0,raid:0,max:2},Rt(),le(),ut(),ye("Physics"),Xe())}function ws(a){switch(x[a].fanaticism){case"smart":e.race.dumb?(Bi(5),ye("Genetics")):$s("smart");break;case"infectious":$s("infectious"),e.race.species==="human"&&L("infested");break;case"blood_thirst":$s("blood_thirst"),e.race.species==="entish"&&L("madagascar_tree");break;case"none":Bi(5),ye("Genetics");break;default:$s(x[a].fanaticism);break}}function $s(a){e.race[a]?Se(a)?a==="imitation"?Ps(!0):a==="shapeshifter"&&za(e.race.ss_genus):(Bi(5),ye("Genetics")):(e.race[a]=1,Ar(a))}function Mi(){if(!e.settings.tabLoad&&e.settings.civTabs!==3)return;mn(),A($("#resQueue")),$("#resQueue").append($(`

${t("research_queue")} ({{ queue.length }}/{{ max }})

- `));let a=$('
    ');$("#resQueue").append(a),a.append($(`
  • {{ item.label }} [{{ item.time | time }}]
  • `));try{C({el:"#resQueue",data:e.r_queue,methods:{remove(r){ie(`rq${e.r_queue.queue[r].id}`),e.r_queue.queue.splice(r,1),Mi(),pe()},setID(r){return`rq${e.r_queue.queue[r].id}`},pauseRQueue(){$("#pauserqueue").removeClass("play"),$("#pauserqueue").removeClass("pause"),e.r_queue.pause?(e.r_queue.pause=!1,$("#pauserqueue").addClass("play")):(e.r_queue.pause=!0,$("#pauserqueue").addClass("pause"))},pausedesc(){return e.r_queue.pause?t("r_queue_play"):t("r_queue_pause")}},filters:{time(r){return lt(r)}}}),zu()}catch{e.r_queue.queue=[]}}function mn(){let a=$("#resQueue .buildList")[0];if(a){let r=Sortable.get(a);r&&r.destroy()}}function zu(){let a=$("#resQueue .buildList")[0];Sortable.create(a,{onEnd(r){let i=e.r_queue.queue;i.splice(r.newDraggableIndex,0,i.splice(r.oldDraggableIndex,1)[0]),e.r_queue.queue=i,Mi()}}),Au()}function Au(){for(let a=0;a=5?a-.01:a}function ja(){let a=1800;e.tech.vault>=1?a=(e.tech.vault+1)*7500:e.tech.banking>=5?a=9e3:e.tech.banking>=3&&(a=4e3),e.race.paranoid&&(a*=1-b.paranoid.vars()[0]/100),e.race.hoarder&&(a*=1+b.hoarder.vars()[0]/100);let r=X("dracnid");r>0&&(a*=1+b.hoarder.vars(1)[0]/100*r),e.tech.banking>=7&&(a*=1+ve(He(e.civic.banker.workers,"banker")*.05)),e.tech.banking>=8&&(a+=ve(25*e.resource[e.race.species].amount)),e.tech.stock_exchange&&(a*=1+e.tech.stock_exchange*.1),e.tech.world_control&&(a*=1.25),e.race.truepath&&(a*=1.25),e.blood.greed&&(a*=1+e.blood.greed/100),e.stats.achieve.wheelbarrow&&(a*=1+e.stats.achieve.wheelbarrow.l/50),e.race.inflation&&(a*=1+e.race.inflation/125);let i=J("risktaker",0);return i&&(a*=1+i/100),a}function it(a,r,i){switch(a){case"smelter":Tu(r,i);break;case"factory":Iu(r,i);break;case"droid":Du(r,i);break;case"graphene":Bu(r,i);break;case"pylon":Ku(r,i);break;case"rock_quarry":Gu(r,i);break;case"titan_mine":Nu(r,i);break;case"nanite_factory":Lu(r,i);break;case"mining_ship":Ru(r,i);break;case"alien_space_station":Hu(r,i);break;case"replicator":Vu(r,i);break}}function Pe(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==1))){if(A($("#industry")),e.city.smelter&&(e.city.smelter.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)){var a=$(`

    ${t("city_smelter")}

    `);$("#industry").append(a),it("smelter",a,"#iSmelter")}if(e.city.factory&&e.city.factory.count>0||e.space.red_factory&&e.space.red_factory.count>0||e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0){var r=$(`

    ${t("city_factory")}

    `);$("#industry").append(r),it("factory",r,"#iFactory")}if(e.interstellar.mining_droid&&e.interstellar.mining_droid.count>0){var i=$(`

    ${t("interstellar_mining_droid_title")}

    `);$("#industry").append(i),it("droid",i,"#iDroid")}if(e.interstellar.g_factory&&e.interstellar.g_factory.count>0||e.space.g_factory&&(e.space.g_factory.count>0||e.tauceti.refueling_station&&e.tauceti.refueling_station.count>0)){var s=$(`

    ${t("interstellar_g_factory_title")}

    `);$("#industry").append(s),it("graphene",s,"#iGraphene")}if(e.race.casting&&(e.city.pylon||e.space.pylon||e.tauceti.pylon)){var n=$(`

    ${t("city_pylon")}

    `);$("#industry").append(n),it("pylon",n,"#iPylon")}if(e.race.smoldering&&e.city.rock_quarry&&!e.race.cataclysm&&!e.race.orbit_decayed&&!e.tech.isolation){var c=$(`

    ${t("city_rock_quarry")}

    `);$("#industry").append(c),it("rock_quarry",c,"#iQuarry")}if(e.space.titan_mine&&e.space.titan_mine.count>0){var c=$(`

    ${t("city_mine")}

    `);$("#industry").append(c),it("titan_mine",c,"#iTMine")}if(e.tech.tau_roid&&e.tech.tau_roid>=4&&e.tauceti.mining_ship){var o=$(`

    ${t("tau_roid_mining_ship")}

    `);$("#industry").append(o),it("mining_ship",o,"#iMiningShip")}if(e.tech.tau_gas2&&e.tech.tau_gas2===6&&e.tauceti.alien_space_station&&(!e.tech.alien_data||e.tech.alien_data<6)){var l=$(`

    ${t("tau_gas2_alien_station")}

    `);$("#industry").append(l),it("alien_space_station",l,"#iAlienSpaceStation")}if(e.race.deconstructor&&e.city.nanite_factory){var u=$(`

    ${t("city_nanite_factory")}

    `);$("#industry").append(u),it("nanite_factory",u,"#iNFactory")}if(e.race.replicator&&e.tech.replicator){var d=$(`

    ${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}

    `);$("#industry").append(d),it("replicator",d,"#iReplicator")}}}var Ve={Lux:{demand:[.14,.21,.28,.35,.42],fur:[2,3,4,5,6]},Furs:{money:[10,15,20,25,30],polymer:[1.5,2.25,3,3.75,4.5],output:[1,1.5,2,2.5,3]},Alloy:{copper:[.75,1.12,1.49,1.86,2.23],aluminium:[1,1.5,2,2.5,3],output:[.075,.112,.149,.186,.223]},Polymer:{oil_kk:[.22,.33,.44,.55,.66],oil:[.18,.27,.36,.45,.54],lumber:[15,22,29,36,43],output:[.125,.187,.249,.311,.373]},Nano_Tube:{coal:[8,12,16,20,24],neutronium:[.05,.075,.1,.125,.15],output:[.2,.3,.4,.5,.6]},Stanene:{aluminium:[30,45,60,75,90],nano:[.02,.03,.04,.05,.06],output:[.6,.9,1.2,1.5,1.8]}};function Tu(a,r){let i=$(`
    ${t("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
    `);if(a.append(i),a.hasClass("modalBody")){let h=Ze(10);h.length>0&&i.prepend(h)}if(r&&e.race.forge&&e.race.steelen){let h=pt(3,12,!0);h.length>0&&i.prepend(h)}let s=a.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",n=$(`
    `);if(a.append(n),!e.race.forge){if(!e.race.kindling_kindred&&!e.race.smoldering||e.race.evil){let h=e.race.evil?e.race.soul_eater&&e.race.species!=="wendigo"&&!e.race.artifical?e.resource.Food.name:e.resource.Furs.name:e.resource.Lumber.name,p=$(`${h} {{ s.Wood }}`),f=$(`«`),g=$(`»`);n.append(f),n.append(p),n.append(g)}if(e.resource.Coal.display){let h=$(`${e.resource.Coal.name} `),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}}if(e.race.forge){let h=$(`${t("trait_forge_name")} {{ s.Oil }}`);n.append(h)}else if(e.resource.Oil.display){let h=$(`${e.resource.Oil.name} {{ s.Oil }}`),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}if(e.tech.star_forge&&e.tech.star_forge>=2){let h=$(`${t("star")} {{ s.Star }}`);n.append(h)}if(e.tech.smelting&&e.tech.smelting>=8){let h=$(`${t("modal_smelter_inferno")} {{ s.Inferno }}`),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}let c=$('
    ');a.append(c);let o=!!(e.tech.irid_smelting||e.tech.m_smelting&&e.tech.m_smelting>=2);if(e.resource.Iridium.display&&o||e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let h=$(`
    `);a.append(h),h.append(`
    ${t("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
    `);let p=$('
    ');h.append(p);let f=$(`${e.resource.Iron.name} {{ s.Iron }}`),g=$(`«`),w=$(`»`);if(p.append(g),p.append(f),p.append(w),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let v=$(`${e.resource.Steel.name} {{ s.Steel }}`),k=$(`«`),P=$(`»`);p.append(k),p.append(v),p.append(P)}if(e.resource.Iridium.display&&o){let v=$(`${e.resource.Iridium.name} {{ s.Iridium }}`),k=$(`«`),P=$(`»`);p.append(k),p.append(v),p.append(P)}}C({el:r||"#specialModal",data:{s:e.city.smelter,lum:e.resource.Lumber,coal:e.resource.Coal,oil:e.resource.Oil,food:e.resource.Food,fur:e.resource.Furs},methods:{addFuel(h){let p=V();for(let f=0;f=e.city.smelter.StarCap)break;if(g0)h!=="Wood"&&e.city.smelter.Wood>0?(e.city.smelter.Wood--,e.city.smelter[h]++):h!=="Coal"&&e.city.smelter.Coal>0?(e.city.smelter.Coal--,e.city.smelter[h]++):h!=="Oil"&&e.city.smelter.Oil>0?(e.city.smelter.Oil--,e.city.smelter[h]++):h!=="Inferno"&&e.city.smelter.Inferno>0&&(e.city.smelter.Inferno--,e.city.smelter[h]++);else break}},subFuel(h){let p=V();for(let f=0;f0;f++){e.city.smelter[h]--,e.race.forge&&h==="Inferno"&&e.city.smelter.Oil++;let g=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium>g&&(e.city.smelter.Iron>0?e.city.smelter.Iron--:e.city.smelter.Steel>0?e.city.smelter.Steel--:e.city.smelter.Iridium>0&&e.city.smelter.Iridium--)}},mLabel(h){return u(h)},addMetal(h){let p=V();for(let f=0;f0&&h!=="Iron")e.city.smelter.Iron--,e.city.smelter[h]++;else if(e.city.smelter.Steel>0&&h!=="Steel")e.city.smelter.Steel--,e.city.smelter[h]++;else if(e.city.smelter.Iridium>0&&h!=="Iridium")e.city.smelter.Iridium--,e.city.smelter[h]++;else break}},subMetal(h){let p=V();e.city.smelter[h]-=p,e.city.smelter[h]<0&&(e.city.smelter[h]=0)},buildLabel(h){return l(h)},ariaCount(h){return` ${e.city.smelter[h]} ${h} fueled.`},ariaProd(h){return`. ${e.city.smelter[h]} producing ${h}.`},net(h){return e.resource[h].diff>=0?"has-text-success":"has-text-danger"},level(){let h=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;return ai(h,e.city.smelter.count)}},filters:{on(h){return e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno},son(h){return e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium},diffSize(h){return h>0?`+${Y(h,2)}`:Y(h,2)},spook(h){if(r&&((e.race.kindling_kindred||e.race.smoldering)&&(e.city.smelter.Steel===6||e.city.smelter.Iron===6)||e.city.smelter.Wood===6)&&e.city.smelter.Coal===6&&e.city.smelter.Oil===6){let p=pt(3,12,!0);if(p.length>0)return p}return h},altspook(h){if(r&&e.race.forge&&e.city.smelter.Steel===6){let p=pt(3,12,!0);if(p.length>0)return p}return h}}});function l(h){switch(h){case"wood":return t("modal_build_wood",[e.race.evil?e.race.soul_eater&&e.race.species!=="wendigo"&&!e.race.artifical?e.resource.Food.name:e.resource.Furs.name:e.resource.Lumber.name,e.race.evil&&!e.race.soul_eater||e.race.species==="wendigo"?1:3]);case"coal":{let p=e.race.kindling_kindred?.15:.25;return e.tech.uranium&&e.tech.uranium>=3?t("modal_build_coal2",[p,t("resource_Coal_name"),t("resource_Uranium_name")]):t("modal_build_coal1",[p,t("resource_Coal_name")])}case"oil":return e.race.forge?t("modal_build_forge"):t("modal_build_oil",["0.35",t("resource_Oil_name")]);case"star":return e.tech.irid_smelting?t("modal_build_star2",[t("resource_Titanium_name"),t("resource_Iridium_name")]):t("modal_build_star",[t("resource_Titanium_name")]);case"inferno":{let p=50,f=35,g=.5;return t("modal_build_inferno",[p,t("resource_Coal_name"),f,t("resource_Oil_name"),g,t("resource_Infernite_name")])}}}function u(h){if(h==="steel"){let p=e.tech.smelting>=4?1.2:1;return e.tech.smelting>=5&&(p*=1.2),e.tech.smelting>=6&&(p*=1.2),e.tech.smelting>=7&&(p*=1.25),e.race.pyrophobia&&(p*=.9),t("modal_smelter_steel",[+p.toFixed(3),t("resource_Steel_name"),t("resource_Coal_name"),t("resource_Iron_name")])}else if(h==="iridium"){let p=e.tech.smelting>=7?6.25:5;return e.race.pyrophobia&&(p*=.9),t("modal_smelter_iron",[+p.toFixed(3),t("resource_Iridium_name")])}else{let p=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(p*=.9),t("modal_smelter_iron",[+p.toFixed(3),t("resource_Iron_name")])}}let d=a.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach(function(h){B(`${d}${h}`,function(){return l(h)},{elm:$(`#${d} > .${h}`),attach:"#main"})}),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen||e.resource.Iridium.display&&o){let h=a.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach(function(p){p==="steel"&&(!e.resource.Steel.display||e.race.steelen)||p==="iridium"&&!(e.resource.Iridium.display&&o)||B(`${h}${p}`,function(){return u(p)},{elm:$(`#${h} span.${p}`),attach:"#main"})})}}function Iu(a,r){let i=$(`
    ${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
    `);a.append(i);let s=$(`
    ${t("modal_factory_lux")}
    `);a.append(s);let n=$(''),c=$(`«`),o=$(`»`);if(s.append(c),s.append(n),s.append(o),e.tech.synthetic_fur){let f=$(`
    ${e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")}
    `);a.append(f);let g=$('{{ Furs }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}let l=$(`
    ${t("resource_Alloy_name")}
    `);a.append(l);let u=$('{{ Alloy }}'),d=$(`«`),h=$(`»`);if(l.append(d),l.append(u),l.append(h),e.tech.polymer){let f=$(`
    ${t("resource_Polymer_name")}
    `);a.append(f);let g=$('{{ Polymer }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}if(e.tech.nano){let f=$(`
    ${t("resource_Nano_Tube_name")}
    `);a.append(f);let g=$('{{ Nano }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}if(e.tech.stanene){let f=$(`
    ${t("resource_Stanene_name")}
    `);a.append(f);let g=$('{{ Stanene }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}C({el:r||"#specialModal",data:e.city.factory,methods:{subItem:function(f){let g=V();for(var w=0;w0;w++)e.city.factory[f]--},addItem:function(f){let g=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;e.interstellar.int_factory&&G.int_factory&&(g+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(g+=we.tau_factory*(e.tech.isolation?5:3));let w=V();for(var v=0;v0)e.city.factory.Alloy--,e.city.factory[f]++;else break}},buildLabel:function(f){return p(f)},ariaProd(f){return`. ${e.city.factory[f]} factories producing ${f}.`},level(){let f=e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene,g=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&G.int_factory&&(g+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(g+=we.tau_factory*(e.tech.isolation?5:3)),ai(f,g)}},filters:{on(){return e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene},max(){let f=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&G.int_factory&&(f+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(f+=we.tau_factory*(e.tech.isolation?5:3)),f},spook(f){if(e.city.factory.Lux===3&&r){let g=pt(6,12,!0);if(g.length>0)return g}return f}}});function p(f){let g=!!e.tech.factory;switch(f){case"Lux":{let w=+(e.resource[e.race.species].amount*(g?Ve.Lux.demand[e.tech.factory]:Ve.Lux.demand[0]));w=Eu(w).toFixed(2);let v=g?Ve.Lux.fur[e.tech.factory]:Ve.Lux.fur[0];return t("modal_factory_lux_label",[v,e.resource.Furs.name,w])}case"Furs":{let w=g?Ve.Furs.money[e.tech.factory]:Ve.Furs.money[0],v=g?Ve.Furs.polymer[e.tech.factory]:Ve.Furs.polymer[0];return t("modal_factory_alloy_label",[w,t("resource_Money_name"),v,t("resource_Polymer_name"),e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")])}case"Alloy":{let w=g?Ve.Alloy.copper[e.tech.factory]:Ve.Alloy.copper[0],v=g?Ve.Alloy.aluminium[e.tech.factory]:Ve.Alloy.aluminium[0];return t("modal_factory_alloy_label",[w,t("resource_Copper_name"),v,t("resource_Aluminium_name"),t("resource_Alloy_name")])}case"Polymer":if(e.race.kindling_kindred||e.race.smoldering){let w=g?Ve.Polymer.oil_kk[e.tech.factory]:Ve.Polymer.oil_kk[0];return t("modal_factory_polymer_label2",[w,t("resource_Oil_name"),t("resource_Polymer_name")])}else{let w=g?Ve.Polymer.oil[e.tech.factory]:Ve.Polymer.oil[0],v=g?Ve.Polymer.lumber[e.tech.factory]:Ve.Polymer.lumber[0];return t("modal_factory_polymer_label1",[w,t("resource_Oil_name"),v,e.resource.Lumber.name,t("resource_Polymer_name")])}case"Nano":{let w=g?Ve.Nano_Tube.coal[e.tech.factory]:Ve.Nano_Tube.coal[0],v=g?Ve.Nano_Tube.neutronium[e.tech.factory]:Ve.Nano_Tube.neutronium[0];return t("modal_factory_nano_label",[w,t("resource_Coal_name"),v,t("resource_Neutronium_name"),t("resource_Nano_Tube_name")])}case"Stanene":{let w=g?Ve.Stanene.aluminium[e.tech.factory]:Ve.Stanene.aluminium[0],v=g?Ve.Stanene.nano[e.tech.factory]:Ve.Stanene.nano[0];return t("modal_factory_stanene_label",[w,t("resource_Aluminium_name"),v,t("resource_Nano_Tube_name"),t("resource_Stanene_name")])}}}["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach(function(f){let g=a.hasClass("modalBody")?"specialModal":"iFactory";B(`${g}${f}`,function(){return p(f)},{elm:$(`#${g} .factory > .${f}`),attach:"#main"})})}function Eu(a){e.race.toxic&&(a*=1+b.toxic.vars()[0]/100);let r=X("shroomi");return r>0&&(a*=1+b.toxic.vars(1)[0]/100*r),e.civic.govern.type==="corpocracy"&&(a*=2.5),e.civic.govern.type==="socialist"&&(a*=.8),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(a*=1.1),e.race.inflation&&(a*=1+e.race.inflation/1250),e.tech.isolation&&(a*=1+(we.colony||0)*.5),e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=4&&e.city.banquet&&e.city.banquet.count>=4&&e.city.banquet.strength&&(a*=1+e.city.banquet.strength**.75/100),a*=te("psychic_cash"),a}var rr=["Lumber","Chrysotile","Stone","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium","Helium_3","Water","Deuterium","Neutronium","Adamantite","Bolognium","Orichalcum"];function Lu(a,r){let i=$(`
    ${t("modal_factory_operate")}: {{count | on}}/{{ count | max }}
    `);a.append(i);let s=a.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",n=$(`
    `);a.append(n),rr.forEach(function(o){if(e.resource[o].display){let l=$(`${e.resource[o].name} {{ ${o} }}`),u=$(`«`),d=$(`»`);n.append(u),n.append(l),n.append(d)}}),C({el:r||"#specialModal",data:e.city.nanite_factory,methods:{subItem:function(o){let l=V();e.city.nanite_factory[o]-=l,e.city.nanite_factory[o]<0&&(e.city.nanite_factory[o]=0)},addItem:function(o){let l=V(),u=0;rr.forEach(function(h){u+=e.city.nanite_factory[h]});let d=e.city.nanite_factory.count*50-u;l>d&&(l=d),l>0&&(e.city.nanite_factory[o]+=l)},eatLabel(o){return`Consume ${o} to produce ${e.resource.Nanite.name}`},level(){let o=0;rr.forEach(function(u){o+=e.city.nanite_factory[u]});let l=e.city.nanite_factory.count;return ai(o,l)}},filters:{on(){let o=0;return rr.forEach(function(l){o+=e.city.nanite_factory[l]}),o},max(){return e.city.nanite_factory.count*50}}});function c(o){let l=+(Re[o]/100*(b.deconstructor.vars()[0]/100)).toFixed(4),u=+(e.city.nanite_factory[o]*l).toFixed(4);return t("modal_nfactory_resource_label",[1,e.resource[o].name,l,e.resource.Nanite.name,e.city.nanite_factory[o],u])}rr.forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iNFactory";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > .fuels > .${o}`),attach:"#main"})})}function Du(a,r){let i=$(`
    ${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
    `);a.append(i);let s=$(`
    ${t("resource_Adamantite_name")}
    `);a.append(s);let n=$('{{ adam }}'),c=$(`«`),o=$(`»`);s.append(c),s.append(n),s.append(o);let l=$(`
    ${t("resource_Uranium_name")}
    `);a.append(l);let u=$('{{ uran }}'),d=$(`«`),h=$(`»`);l.append(d),l.append(u),l.append(h);let p=$(`
    ${t("resource_Coal_name")}
    `);a.append(p);let f=$('{{ coal }}'),g=$(`«`),w=$(`»`);p.append(g),p.append(f),p.append(w);let v=$(`
    ${t("resource_Aluminium_name")}
    `);a.append(v);let k=$('{{ alum }}'),P=$(`«`),j=$(`»`);v.append(P),v.append(k),v.append(j),C({el:r||"#specialModal",data:e.interstellar.mining_droid,methods:{subItem:function(U){let Q=V();for(var R=0;R0;R++)e.interstellar.mining_droid[U]--},addItem:function(U){let Q=V();for(var R=0;R .${U}`),attach:"#main"})})}function Bu(a,r){let i=e.race.truepath?"space":"interstellar",s=$(`
    ${t("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
    `);a.append(s);let n=$("
    ");if(a.append(n),!e.race.kindling_kindred&&!e.race.smoldering){let o=e.resource.Lumber.name,l=$(`${o} {{ Lumber }}`),u=$('«'),d=$('»');n.append(u),n.append(l),n.append(d)}if(e.resource.Coal.display){let o=$(`${e.resource.Coal.name} {{ Coal }}`),l=$('«'),u=$('»');n.append(l),n.append(o),n.append(u)}if(e.resource.Oil.display){let o=$(`${e.resource.Oil.name} {{ Oil }}`),l=$('«'),u=$('»');n.append(l),n.append(o),n.append(u)}C({el:r||"#specialModal",data:e[i].g_factory,methods:{subWood(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Lumber--},addWood(){let o=V();for(let l=0;l0)e[i].g_factory.Oil>e[i].g_factory.Coal?e[i].g_factory.Coal>0?e[i].g_factory.Coal--:e[i].g_factory.Oil--:e[i].g_factory.Oil>0?e[i].g_factory.Oil--:e[i].g_factory.Coal--,e[i].g_factory.Lumber++;else break},subCoal(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Coal--},addCoal(){let o=V();for(let l=0;l0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Oil--,e[i].g_factory.Coal++;else break},subOil(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Oil--},addOil(){let o=V();for(let l=0;l0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Coal--,e[i].g_factory.Oil++;else break},buildLabel(o){return c(o)},ariaCount(o){return` ${e[i].g_factory[o]} ${o} fueled.`},ariaProd(o){return`. ${e[i].g_factory[o]} producing ${o}.`},level(){let o=e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil,l=e[i].g_factory.on;return ai(o,l)}},filters:{on:function(o){return e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil}}});function c(o){switch(o){case"wood":return t("modal_graphene_produce",[350,e.race.evil?t("resource_Bones_name"):t("resource_Lumber_name"),t("resource_Graphene_name")]);case"coal":return t("modal_graphene_produce",[25,t("resource_Coal_name"),t("resource_Graphene_name")]);case"oil":return t("modal_graphene_produce",[15,t("resource_Oil_name"),t("resource_Graphene_name")])}}["wood","coal","oil"].forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iGraphene";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > div > .${o}`),attach:"#main"})})}function Ku(a,r){let i=$(`
    ${t("modal_pylon_casting")}: {{total | drain}}
    `);a.append(i);let s=$('
    ');a.append(s);let n=["science","army","hunting"];!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater&&!e.race.artifical&&!e.race.unfathomable&&!e.race.cataclysm&&!e.race.orbit_decayed&&n.push("farmer"),e.race.cataclysm||n.push("miner"),!e.race.kindling_kindred&&!e.race.smoldering&&!e.race.evil&&!e.race.cataclysm&&!e.race.orbit_decayed&&n.push("lumberjack"),e.race.flier||n.push("factory"),e.tech.magic>=4&&n.push("crafting"),e.tech.magic&&e.tech.magic>=3&&n.forEach(function(o){let l=$(`${t(`modal_pylon_spell_${o}`)} {{ ${o} }}`),u=$(`«`),d=$(`»`);s.append(u),s.append(l),s.append(d)}),C({el:r||"#specialModal",data:e.race.casting,methods:{buildLabel(o){return c(o)},addSpell(o){let l=V();for(let u=0;u=d)e.race.casting[o]++,e.race.casting.total++,e.resource.Mana.diff-=d;else break}},subSpell(o){let l=V();for(let u=0;u0;u++)e.race.casting[o]--,e.race.casting.total--},ariaCount(o){return` ${o} casting.`},level(){return ai(e.race.casting.total,e.resource.Mana.gen,!0)}},filters:{drain:function(o){let l=0;return n.forEach(function(u){e.race.casting[u]&&e.race.casting[u]>0&&(l+=ti(e.race.casting[u]))}),t("modal_pylon_casting_cost",[+l.toFixed(3)])}}});function c(o){let l=+ti(e.race.casting[o]).toFixed(4),u=+(ti(e.race.casting[o]+1)-ti(e.race.casting[o])).toFixed(4),d=+(100*(e.race.casting[o]/(e.race.casting[o]+75))).toFixed(2);if(o==="crafting"){let h=+(100*(2*e.race.casting[o]/(2*e.race.casting[o]+75))).toFixed(2);return t("modal_pylon_casting_label_crafting",[l,d,h,u])}return t("modal_pylon_casting_label",[t(`modal_pylon_spell_${o}`),l,u,d])}n.forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iPylon";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > .pylon > .${o}`),attach:"#main"})})}function Gu(a,r){a.append($(`
    ${t("modal_quarry_ratio",[e.resource.Chrysotile.name])}
    `));let i=$('
    «»
    ');a.append(i),C({el:r||"#specialModal",data:e.city.rock_quarry,methods:{sub(){let s=V();e.city.rock_quarry.asbestos>0&&(e.city.rock_quarry.asbestos-=s,e.city.rock_quarry.asbestos<0&&(e.city.rock_quarry.asbestos=0))},add(){let s=V();e.city.rock_quarry.asbestos<100&&(e.city.rock_quarry.asbestos+=s,e.city.rock_quarry.asbestos>100&&(e.city.rock_quarry.asbestos=100))}}})}function Nu(a,r){a.append($(`
    ${t("modal_quarry_ratio",[e.resource.Adamantite.name])}
    `));let i=$('
    «»
    ');a.append(i),C({el:r||"#specialModal",data:e.space.titan_mine,methods:{sub(){let s=V();e.space.titan_mine.ratio>0&&(e.space.titan_mine.ratio-=s,e.space.titan_mine.ratio<0&&(e.space.titan_mine.ratio=0))},add(){let s=V();e.space.titan_mine.ratio<100&&(e.space.titan_mine.ratio+=s,e.space.titan_mine.ratio>100&&(e.space.titan_mine.ratio=100))}}})}function Ru(a,r){a.append($(`
    ${t("tau_roid_mining_ship_ratio",[e.resource.Iron.name,e.resource.Aluminium.name])}
    `));let i=$(`
    «»
    `);a.append(i),a.append($(`
    ${t("tau_roid_mining_ship_ratio",[e.resource.Iridium.name,e.resource.Neutronium.name])}
    `));let s=$(`
    «»
    `);if(a.append(s),e.tech.tau_roid>=5){a.append($(`
    ${t("tau_roid_mining_ship_ratio",[e.resource.Orichalcum.name,e.resource.Elerium.name])}
    `));let n=$(`
    «»
    `);a.append(n)}C({el:r||"#specialModal",data:e.tauceti.mining_ship,methods:{sub(n){let c=V();e.tauceti.mining_ship[n]>0&&(e.tauceti.mining_ship[n]-=c,e.tauceti.mining_ship[n]<0&&(e.tauceti.mining_ship[n]=0))},add(n){let c=V();e.tauceti.mining_ship[n]<100&&(e.tauceti.mining_ship[n]+=c,e.tauceti.mining_ship[n]>100&&(e.tauceti.mining_ship[n]=100))}}})}function Hu(a,r){a.append($(`
    ${t("tau_gas2_alien_station_focus",[e.resource.Knowledge.name])}
    `));let i=$(`
    «»
    `);a.append(i),C({el:r||"#specialModal",data:e.tauceti.alien_space_station,methods:{sub(s){let n=V();e.tauceti.alien_space_station[s]>0&&(e.tauceti.alien_space_station[s]-=n,e.tauceti.alien_space_station[s]<0&&(e.tauceti.alien_space_station[s]=0))},add(s){let n=V();e.tauceti.alien_space_station[s]<100&&(e.tauceti.alien_space_station[s]+=n,e.tauceti.alien_space_station[s]>100&&(e.tauceti.alien_space_station[s]=100))}}})}function Vu(a,r){if(e.race.replicator){a.append($(`
    ${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}
    `));let i=$('
    ');if(a.append(i),r){let l="";Object.keys(Re).forEach(function(u){l+=`${e.resource[u].name}`}),i.append(`
    + `));let a=$('
      ');$("#resQueue").append(a),a.append($(`
    • {{ item.label }} [{{ item.time | time }}]
    • `));try{C({el:"#resQueue",data:e.r_queue,methods:{remove(r){ie(`rq${e.r_queue.queue[r].id}`),e.r_queue.queue.splice(r,1),Mi(),le()},setID(r){return`rq${e.r_queue.queue[r].id}`},pauseRQueue(){$("#pauserqueue").removeClass("play"),$("#pauserqueue").removeClass("pause"),e.r_queue.pause?(e.r_queue.pause=!1,$("#pauserqueue").addClass("play")):(e.r_queue.pause=!0,$("#pauserqueue").addClass("pause"))},pausedesc(){return e.r_queue.pause?t("r_queue_play"):t("r_queue_pause")}},filters:{time(r){return lt(r)}}}),zu()}catch{e.r_queue.queue=[]}}function mn(){let a=$("#resQueue .buildList")[0];if(a){let r=Sortable.get(a);r&&r.destroy()}}function zu(){let a=$("#resQueue .buildList")[0];Sortable.create(a,{onEnd(r){let i=e.r_queue.queue;i.splice(r.newDraggableIndex,0,i.splice(r.oldDraggableIndex,1)[0]),e.r_queue.queue=i,Mi()}}),Au()}function Au(){for(let a=0;a=5?a-.01:a}function ja(){let a=1800;e.tech.vault>=1?a=(e.tech.vault+1)*7500:e.tech.banking>=5?a=9e3:e.tech.banking>=3&&(a=4e3),e.race.paranoid&&(a*=1-b.paranoid.vars()[0]/100),e.race.hoarder&&(a*=1+b.hoarder.vars()[0]/100);let r=X("dracnid");r>0&&(a*=1+b.hoarder.vars(1)[0]/100*r),e.tech.banking>=7&&(a*=1+ve(He(e.civic.banker.workers,"banker")*.05)),e.tech.banking>=8&&(a+=ve(25*e.resource[e.race.species].amount)),e.tech.stock_exchange&&(a*=1+e.tech.stock_exchange*.1),e.tech.world_control&&(a*=1.25),e.race.truepath&&(a*=1.25),e.blood.greed&&(a*=1+e.blood.greed/100),e.stats.achieve.wheelbarrow&&(a*=1+e.stats.achieve.wheelbarrow.l/50),e.race.inflation&&(a*=1+e.race.inflation/125);let i=J("risktaker",0);return i&&(a*=1+i/100),a}function it(a,r,i){switch(a){case"smelter":Tu(r,i);break;case"factory":Iu(r,i);break;case"droid":Du(r,i);break;case"graphene":Bu(r,i);break;case"pylon":Ku(r,i);break;case"rock_quarry":Gu(r,i);break;case"titan_mine":Nu(r,i);break;case"nanite_factory":Lu(r,i);break;case"mining_ship":Ru(r,i);break;case"alien_space_station":Hu(r,i);break;case"replicator":Vu(r,i);break}}function Pe(){if(!(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==1))){if(A($("#industry")),e.city.smelter&&(e.city.smelter.count>0||e.race.cataclysm||e.race.orbit_decayed||e.tech.isolation)){var a=$(`

      ${t("city_smelter")}

      `);$("#industry").append(a),it("smelter",a,"#iSmelter")}if(e.city.factory&&e.city.factory.count>0||e.space.red_factory&&e.space.red_factory.count>0||e.tauceti.tau_factory&&e.tauceti.tau_factory.count>0){var r=$(`

      ${t("city_factory")}

      `);$("#industry").append(r),it("factory",r,"#iFactory")}if(e.interstellar.mining_droid&&e.interstellar.mining_droid.count>0){var i=$(`

      ${t("interstellar_mining_droid_title")}

      `);$("#industry").append(i),it("droid",i,"#iDroid")}if(e.interstellar.g_factory&&e.interstellar.g_factory.count>0||e.space.g_factory&&(e.space.g_factory.count>0||e.tauceti.refueling_station&&e.tauceti.refueling_station.count>0)){var s=$(`

      ${t("interstellar_g_factory_title")}

      `);$("#industry").append(s),it("graphene",s,"#iGraphene")}if(e.race.casting&&(e.city.pylon||e.space.pylon||e.tauceti.pylon)){var n=$(`

      ${t("city_pylon")}

      `);$("#industry").append(n),it("pylon",n,"#iPylon")}if(e.race.smoldering&&e.city.rock_quarry&&!e.race.cataclysm&&!e.race.orbit_decayed&&!e.tech.isolation){var c=$(`

      ${t("city_rock_quarry")}

      `);$("#industry").append(c),it("rock_quarry",c,"#iQuarry")}if(e.space.titan_mine&&e.space.titan_mine.count>0){var c=$(`

      ${t("city_mine")}

      `);$("#industry").append(c),it("titan_mine",c,"#iTMine")}if(e.tech.tau_roid&&e.tech.tau_roid>=4&&e.tauceti.mining_ship){var o=$(`

      ${t("tau_roid_mining_ship")}

      `);$("#industry").append(o),it("mining_ship",o,"#iMiningShip")}if(e.tech.tau_gas2&&e.tech.tau_gas2===6&&e.tauceti.alien_space_station&&(!e.tech.alien_data||e.tech.alien_data<6)){var l=$(`

      ${t("tau_gas2_alien_station")}

      `);$("#industry").append(l),it("alien_space_station",l,"#iAlienSpaceStation")}if(e.race.deconstructor&&e.city.nanite_factory){var u=$(`

      ${t("city_nanite_factory")}

      `);$("#industry").append(u),it("nanite_factory",u,"#iNFactory")}if(e.race.replicator&&e.tech.replicator){var d=$(`

      ${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}

      `);$("#industry").append(d),it("replicator",d,"#iReplicator")}}}var Ve={Lux:{demand:[.14,.21,.28,.35,.42],fur:[2,3,4,5,6]},Furs:{money:[10,15,20,25,30],polymer:[1.5,2.25,3,3.75,4.5],output:[1,1.5,2,2.5,3]},Alloy:{copper:[.75,1.12,1.49,1.86,2.23],aluminium:[1,1.5,2,2.5,3],output:[.075,.112,.149,.186,.223]},Polymer:{oil_kk:[.22,.33,.44,.55,.66],oil:[.18,.27,.36,.45,.54],lumber:[15,22,29,36,43],output:[.125,.187,.249,.311,.373]},Nano_Tube:{coal:[8,12,16,20,24],neutronium:[.05,.075,.1,.125,.15],output:[.2,.3,.4,.5,.6]},Stanene:{aluminium:[30,45,60,75,90],nano:[.02,.03,.04,.05,.06],output:[.6,.9,1.2,1.5,1.8]}};function Tu(a,r){let i=$(`
      ${t("modal_smelter_fuel")}: {{s.count | on}}/{{ s.cap }}
      `);if(a.append(i),a.hasClass("modalBody")){let h=Ze(10);h.length>0&&i.prepend(h)}if(r&&e.race.forge&&e.race.steelen){let h=pt(3,12,!0);h.length>0&&i.prepend(h)}let s=a.hasClass("modalBody")?"mSmelterFuels":"smelterFuels",n=$(`
      `);if(a.append(n),!e.race.forge){if(!e.race.kindling_kindred&&!e.race.smoldering||e.race.evil){let h=e.race.evil?e.race.soul_eater&&e.race.species!=="wendigo"&&!e.race.artifical?e.resource.Food.name:e.resource.Furs.name:e.resource.Lumber.name,p=$(`${h} {{ s.Wood }}`),f=$(`«`),g=$(`»`);n.append(f),n.append(p),n.append(g)}if(e.resource.Coal.display){let h=$(`${e.resource.Coal.name} `),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}}if(e.race.forge){let h=$(`${t("trait_forge_name")} {{ s.Oil }}`);n.append(h)}else if(e.resource.Oil.display){let h=$(`${e.resource.Oil.name} {{ s.Oil }}`),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}if(e.tech.star_forge&&e.tech.star_forge>=2){let h=$(`${t("star")} {{ s.Star }}`);n.append(h)}if(e.tech.smelting&&e.tech.smelting>=8){let h=$(`${t("modal_smelter_inferno")} {{ s.Inferno }}`),p=$(`«`),f=$(`»`);n.append(p),n.append(h),n.append(f)}let c=$('
      ');a.append(c);let o=!!(e.tech.irid_smelting||e.tech.m_smelting&&e.tech.m_smelting>=2);if(e.resource.Iridium.display&&o||e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let h=$(`
      `);a.append(h),h.append(`
      ${t("modal_smelter_type")}: {{s.count | son}}/{{ s.cap | on }}
      `);let p=$('
      ');h.append(p);let f=$(`${e.resource.Iron.name} {{ s.Iron }}`),g=$(`«`),w=$(`»`);if(p.append(g),p.append(f),p.append(w),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen){let v=$(`${e.resource.Steel.name} {{ s.Steel }}`),k=$(`«`),P=$(`»`);p.append(k),p.append(v),p.append(P)}if(e.resource.Iridium.display&&o){let v=$(`${e.resource.Iridium.name} {{ s.Iridium }}`),k=$(`«`),P=$(`»`);p.append(k),p.append(v),p.append(P)}}C({el:r||"#specialModal",data:{s:e.city.smelter,lum:e.resource.Lumber,coal:e.resource.Coal,oil:e.resource.Oil,food:e.resource.Food,fur:e.resource.Furs},methods:{addFuel(h){let p=V();for(let f=0;f=e.city.smelter.StarCap)break;if(g0)h!=="Wood"&&e.city.smelter.Wood>0?(e.city.smelter.Wood--,e.city.smelter[h]++):h!=="Coal"&&e.city.smelter.Coal>0?(e.city.smelter.Coal--,e.city.smelter[h]++):h!=="Oil"&&e.city.smelter.Oil>0?(e.city.smelter.Oil--,e.city.smelter[h]++):h!=="Inferno"&&e.city.smelter.Inferno>0&&(e.city.smelter.Inferno--,e.city.smelter[h]++);else break}},subFuel(h){let p=V();for(let f=0;f0;f++){e.city.smelter[h]--,e.race.forge&&h==="Inferno"&&e.city.smelter.Oil++;let g=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium>g&&(e.city.smelter.Iron>0?e.city.smelter.Iron--:e.city.smelter.Steel>0?e.city.smelter.Steel--:e.city.smelter.Iridium>0&&e.city.smelter.Iridium--)}},mLabel(h){return u(h)},addMetal(h){let p=V();for(let f=0;f0&&h!=="Iron")e.city.smelter.Iron--,e.city.smelter[h]++;else if(e.city.smelter.Steel>0&&h!=="Steel")e.city.smelter.Steel--,e.city.smelter[h]++;else if(e.city.smelter.Iridium>0&&h!=="Iridium")e.city.smelter.Iridium--,e.city.smelter[h]++;else break}},subMetal(h){let p=V();e.city.smelter[h]-=p,e.city.smelter[h]<0&&(e.city.smelter[h]=0)},buildLabel(h){return l(h)},ariaCount(h){return` ${e.city.smelter[h]} ${h} fueled.`},ariaProd(h){return`. ${e.city.smelter[h]} producing ${h}.`},net(h){return e.resource[h].diff>=0?"has-text-success":"has-text-danger"},level(){let h=e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno;return ai(h,e.city.smelter.count)}},filters:{on(h){return e.city.smelter.Wood+e.city.smelter.Coal+e.city.smelter.Oil+e.city.smelter.Star+e.city.smelter.Inferno},son(h){return e.city.smelter.Iron+e.city.smelter.Steel+e.city.smelter.Iridium},diffSize(h){return h>0?`+${Y(h,2)}`:Y(h,2)},spook(h){if(r&&((e.race.kindling_kindred||e.race.smoldering)&&(e.city.smelter.Steel===6||e.city.smelter.Iron===6)||e.city.smelter.Wood===6)&&e.city.smelter.Coal===6&&e.city.smelter.Oil===6){let p=pt(3,12,!0);if(p.length>0)return p}return h},altspook(h){if(r&&e.race.forge&&e.city.smelter.Steel===6){let p=pt(3,12,!0);if(p.length>0)return p}return h}}});function l(h){switch(h){case"wood":return t("modal_build_wood",[e.race.evil?e.race.soul_eater&&e.race.species!=="wendigo"&&!e.race.artifical?e.resource.Food.name:e.resource.Furs.name:e.resource.Lumber.name,e.race.evil&&!e.race.soul_eater||e.race.species==="wendigo"?1:3]);case"coal":{let p=e.race.kindling_kindred?.15:.25;return e.tech.uranium&&e.tech.uranium>=3?t("modal_build_coal2",[p,t("resource_Coal_name"),t("resource_Uranium_name")]):t("modal_build_coal1",[p,t("resource_Coal_name")])}case"oil":return e.race.forge?t("modal_build_forge"):t("modal_build_oil",["0.35",t("resource_Oil_name")]);case"star":return e.tech.irid_smelting?t("modal_build_star2",[t("resource_Titanium_name"),t("resource_Iridium_name")]):t("modal_build_star",[t("resource_Titanium_name")]);case"inferno":{let p=50,f=35,g=.5;return t("modal_build_inferno",[p,t("resource_Coal_name"),f,t("resource_Oil_name"),g,t("resource_Infernite_name")])}}}function u(h){if(h==="steel"){let p=e.tech.smelting>=4?1.2:1;return e.tech.smelting>=5&&(p*=1.2),e.tech.smelting>=6&&(p*=1.2),e.tech.smelting>=7&&(p*=1.25),e.race.pyrophobia&&(p*=.9),t("modal_smelter_steel",[+p.toFixed(3),t("resource_Steel_name"),t("resource_Coal_name"),t("resource_Iron_name")])}else if(h==="iridium"){let p=e.tech.smelting>=7?6.25:5;return e.race.pyrophobia&&(p*=.9),t("modal_smelter_iron",[+p.toFixed(3),t("resource_Iridium_name")])}else{let p=e.tech.smelting>=3?e.tech.smelting>=7?15:12:10;return e.race.pyrophobia&&(p*=.9),t("modal_smelter_iron",[+p.toFixed(3),t("resource_Iron_name")])}}let d=a.hasClass("modalBody")?"mSmelterFuels":"smelterFuels";if(["wood","coal","oil","star","inferno"].forEach(function(h){B(`${d}${h}`,function(){return l(h)},{elm:$(`#${d} > .${h}`),attach:"#main"})}),e.resource.Steel.display&&e.tech.smelting>=2&&!e.race.steelen||e.resource.Iridium.display&&o){let h=a.hasClass("modalBody")?"mSmelterMats":"smelterMats";["iron","steel","iridium"].forEach(function(p){p==="steel"&&(!e.resource.Steel.display||e.race.steelen)||p==="iridium"&&!(e.resource.Iridium.display&&o)||B(`${h}${p}`,function(){return u(p)},{elm:$(`#${h} span.${p}`),attach:"#main"})})}}function Iu(a,r){let i=$(`
      ${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
      `);a.append(i);let s=$(`
      ${t("modal_factory_lux")}
      `);a.append(s);let n=$(''),c=$(`«`),o=$(`»`);if(s.append(c),s.append(n),s.append(o),e.tech.synthetic_fur){let f=$(`
      ${e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")}
      `);a.append(f);let g=$('{{ Furs }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}let l=$(`
      ${t("resource_Alloy_name")}
      `);a.append(l);let u=$('{{ Alloy }}'),d=$(`«`),h=$(`»`);if(l.append(d),l.append(u),l.append(h),e.tech.polymer){let f=$(`
      ${t("resource_Polymer_name")}
      `);a.append(f);let g=$('{{ Polymer }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}if(e.tech.nano){let f=$(`
      ${t("resource_Nano_Tube_name")}
      `);a.append(f);let g=$('{{ Nano }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}if(e.tech.stanene){let f=$(`
      ${t("resource_Stanene_name")}
      `);a.append(f);let g=$('{{ Stanene }}'),w=$(`«`),v=$(`»`);f.append(w),f.append(g),f.append(v)}C({el:r||"#specialModal",data:e.city.factory,methods:{subItem:function(f){let g=V();for(var w=0;w0;w++)e.city.factory[f]--},addItem:function(f){let g=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;e.interstellar.int_factory&&G.int_factory&&(g+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(g+=we.tau_factory*(e.tech.isolation?5:3));let w=V();for(var v=0;v0)e.city.factory.Alloy--,e.city.factory[f]++;else break}},buildLabel:function(f){return p(f)},ariaProd(f){return`. ${e.city.factory[f]} factories producing ${f}.`},level(){let f=e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene,g=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&G.int_factory&&(g+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(g+=we.tau_factory*(e.tech.isolation?5:3)),ai(f,g)}},filters:{on(){return e.city.factory.Lux+e.city.factory.Furs+e.city.factory.Alloy+e.city.factory.Polymer+e.city.factory.Nano+e.city.factory.Stanene},max(){let f=e.space.red_factory?e.space.red_factory.on+e.city.factory.on:e.city.factory.on;return e.interstellar.int_factory&&G.int_factory&&(f+=G.int_factory*2),e.tauceti.tau_factory&&we.tau_factory&&(f+=we.tau_factory*(e.tech.isolation?5:3)),f},spook(f){if(e.city.factory.Lux===3&&r){let g=pt(6,12,!0);if(g.length>0)return g}return f}}});function p(f){let g=!!e.tech.factory;switch(f){case"Lux":{let w=+(e.resource[e.race.species].amount*(g?Ve.Lux.demand[e.tech.factory]:Ve.Lux.demand[0]));w=Eu(w).toFixed(2);let v=g?Ve.Lux.fur[e.tech.factory]:Ve.Lux.fur[0];return t("modal_factory_lux_label",[v,e.resource.Furs.name,w])}case"Furs":{let w=g?Ve.Furs.money[e.tech.factory]:Ve.Furs.money[0],v=g?Ve.Furs.polymer[e.tech.factory]:Ve.Furs.polymer[0];return t("modal_factory_alloy_label",[w,t("resource_Money_name"),v,t("resource_Polymer_name"),e.race.evil?t("resource_Flesh_name"):t("resource_Furs_name")])}case"Alloy":{let w=g?Ve.Alloy.copper[e.tech.factory]:Ve.Alloy.copper[0],v=g?Ve.Alloy.aluminium[e.tech.factory]:Ve.Alloy.aluminium[0];return t("modal_factory_alloy_label",[w,t("resource_Copper_name"),v,t("resource_Aluminium_name"),t("resource_Alloy_name")])}case"Polymer":if(e.race.kindling_kindred||e.race.smoldering){let w=g?Ve.Polymer.oil_kk[e.tech.factory]:Ve.Polymer.oil_kk[0];return t("modal_factory_polymer_label2",[w,t("resource_Oil_name"),t("resource_Polymer_name")])}else{let w=g?Ve.Polymer.oil[e.tech.factory]:Ve.Polymer.oil[0],v=g?Ve.Polymer.lumber[e.tech.factory]:Ve.Polymer.lumber[0];return t("modal_factory_polymer_label1",[w,t("resource_Oil_name"),v,e.resource.Lumber.name,t("resource_Polymer_name")])}case"Nano":{let w=g?Ve.Nano_Tube.coal[e.tech.factory]:Ve.Nano_Tube.coal[0],v=g?Ve.Nano_Tube.neutronium[e.tech.factory]:Ve.Nano_Tube.neutronium[0];return t("modal_factory_nano_label",[w,t("resource_Coal_name"),v,t("resource_Neutronium_name"),t("resource_Nano_Tube_name")])}case"Stanene":{let w=g?Ve.Stanene.aluminium[e.tech.factory]:Ve.Stanene.aluminium[0],v=g?Ve.Stanene.nano[e.tech.factory]:Ve.Stanene.nano[0];return t("modal_factory_stanene_label",[w,t("resource_Aluminium_name"),v,t("resource_Nano_Tube_name"),t("resource_Stanene_name")])}}}["Lux","Furs","Alloy","Polymer","Nano","Stanene"].forEach(function(f){let g=a.hasClass("modalBody")?"specialModal":"iFactory";B(`${g}${f}`,function(){return p(f)},{elm:$(`#${g} .factory > .${f}`),attach:"#main"})})}function Eu(a){e.race.toxic&&(a*=1+b.toxic.vars()[0]/100);let r=X("shroomi");return r>0&&(a*=1+b.toxic.vars(1)[0]/100*r),e.civic.govern.type==="corpocracy"&&(a*=2.5),e.civic.govern.type==="socialist"&&(a*=.8),e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2&&(a*=1.1),e.race.inflation&&(a*=1+e.race.inflation/1250),e.tech.isolation&&(a*=1+(we.colony||0)*.5),e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=4&&e.city.banquet&&e.city.banquet.count>=4&&e.city.banquet.strength&&(a*=1+e.city.banquet.strength**.75/100),a*=te("psychic_cash"),a}var rr=["Lumber","Chrysotile","Stone","Crystal","Furs","Copper","Iron","Aluminium","Cement","Coal","Oil","Uranium","Steel","Titanium","Alloy","Polymer","Iridium","Helium_3","Water","Deuterium","Neutronium","Adamantite","Bolognium","Orichalcum"];function Lu(a,r){let i=$(`
      ${t("modal_factory_operate")}: {{count | on}}/{{ count | max }}
      `);a.append(i);let s=a.hasClass("modalBody")?"mNFactoryRes":"NFactoryRes",n=$(`
      `);a.append(n),rr.forEach(function(o){if(e.resource[o].display){let l=$(`${e.resource[o].name} {{ ${o} }}`),u=$(`«`),d=$(`»`);n.append(u),n.append(l),n.append(d)}}),C({el:r||"#specialModal",data:e.city.nanite_factory,methods:{subItem:function(o){let l=V();e.city.nanite_factory[o]-=l,e.city.nanite_factory[o]<0&&(e.city.nanite_factory[o]=0)},addItem:function(o){let l=V(),u=0;rr.forEach(function(h){u+=e.city.nanite_factory[h]});let d=e.city.nanite_factory.count*50-u;l>d&&(l=d),l>0&&(e.city.nanite_factory[o]+=l)},eatLabel(o){return`Consume ${o} to produce ${e.resource.Nanite.name}`},level(){let o=0;rr.forEach(function(u){o+=e.city.nanite_factory[u]});let l=e.city.nanite_factory.count;return ai(o,l)}},filters:{on(){let o=0;return rr.forEach(function(l){o+=e.city.nanite_factory[l]}),o},max(){return e.city.nanite_factory.count*50}}});function c(o){let l=+(Re[o]/100*(b.deconstructor.vars()[0]/100)).toFixed(4),u=+(e.city.nanite_factory[o]*l).toFixed(4);return t("modal_nfactory_resource_label",[1,e.resource[o].name,l,e.resource.Nanite.name,e.city.nanite_factory[o],u])}rr.forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iNFactory";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > .fuels > .${o}`),attach:"#main"})})}function Du(a,r){let i=$(`
      ${t("modal_factory_operate")}: {{count | on}}/{{ on | max }}
      `);a.append(i);let s=$(`
      ${t("resource_Adamantite_name")}
      `);a.append(s);let n=$('{{ adam }}'),c=$(`«`),o=$(`»`);s.append(c),s.append(n),s.append(o);let l=$(`
      ${t("resource_Uranium_name")}
      `);a.append(l);let u=$('{{ uran }}'),d=$(`«`),h=$(`»`);l.append(d),l.append(u),l.append(h);let p=$(`
      ${t("resource_Coal_name")}
      `);a.append(p);let f=$('{{ coal }}'),g=$(`«`),w=$(`»`);p.append(g),p.append(f),p.append(w);let v=$(`
      ${t("resource_Aluminium_name")}
      `);a.append(v);let k=$('{{ alum }}'),P=$(`«`),j=$(`»`);v.append(P),v.append(k),v.append(j),C({el:r||"#specialModal",data:e.interstellar.mining_droid,methods:{subItem:function(U){let Q=V();for(var R=0;R0;R++)e.interstellar.mining_droid[U]--},addItem:function(U){let Q=V();for(var R=0;R .${U}`),attach:"#main"})})}function Bu(a,r){let i=e.race.truepath?"space":"interstellar",s=$(`
      ${t("modal_smelter_fuel")}: {{count | on}}/{{ on | max }}
      `);a.append(s);let n=$("
      ");if(a.append(n),!e.race.kindling_kindred&&!e.race.smoldering){let o=e.resource.Lumber.name,l=$(`${o} {{ Lumber }}`),u=$('«'),d=$('»');n.append(u),n.append(l),n.append(d)}if(e.resource.Coal.display){let o=$(`${e.resource.Coal.name} {{ Coal }}`),l=$('«'),u=$('»');n.append(l),n.append(o),n.append(u)}if(e.resource.Oil.display){let o=$(`${e.resource.Oil.name} {{ Oil }}`),l=$('«'),u=$('»');n.append(l),n.append(o),n.append(u)}C({el:r||"#specialModal",data:e[i].g_factory,methods:{subWood(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Lumber--},addWood(){let o=V();for(let l=0;l0)e[i].g_factory.Oil>e[i].g_factory.Coal?e[i].g_factory.Coal>0?e[i].g_factory.Coal--:e[i].g_factory.Oil--:e[i].g_factory.Oil>0?e[i].g_factory.Oil--:e[i].g_factory.Coal--,e[i].g_factory.Lumber++;else break},subCoal(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Coal--},addCoal(){let o=V();for(let l=0;l0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Oil--,e[i].g_factory.Coal++;else break},subOil(){let o=V();for(let l=0;l0;l++)e[i].g_factory.Oil--},addOil(){let o=V();for(let l=0;l0)e[i].g_factory.Lumber>0?e[i].g_factory.Lumber--:e[i].g_factory.Coal--,e[i].g_factory.Oil++;else break},buildLabel(o){return c(o)},ariaCount(o){return` ${e[i].g_factory[o]} ${o} fueled.`},ariaProd(o){return`. ${e[i].g_factory[o]} producing ${o}.`},level(){let o=e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil,l=e[i].g_factory.on;return ai(o,l)}},filters:{on:function(o){return e[i].g_factory.Lumber+e[i].g_factory.Coal+e[i].g_factory.Oil}}});function c(o){switch(o){case"wood":return t("modal_graphene_produce",[350,e.race.evil?t("resource_Bones_name"):t("resource_Lumber_name"),t("resource_Graphene_name")]);case"coal":return t("modal_graphene_produce",[25,t("resource_Coal_name"),t("resource_Graphene_name")]);case"oil":return t("modal_graphene_produce",[15,t("resource_Oil_name"),t("resource_Graphene_name")])}}["wood","coal","oil"].forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iGraphene";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > div > .${o}`),attach:"#main"})})}function Ku(a,r){let i=$(`
      ${t("modal_pylon_casting")}: {{total | drain}}
      `);a.append(i);let s=$('
      ');a.append(s);let n=["science","army","hunting"];!e.race.detritivore&&!e.race.carnivore&&!e.race.soul_eater&&!e.race.artifical&&!e.race.unfathomable&&!e.race.cataclysm&&!e.race.orbit_decayed&&n.push("farmer"),e.race.cataclysm||n.push("miner"),!e.race.kindling_kindred&&!e.race.smoldering&&!e.race.evil&&!e.race.cataclysm&&!e.race.orbit_decayed&&n.push("lumberjack"),e.race.flier||n.push("factory"),e.tech.magic>=4&&n.push("crafting"),e.tech.magic&&e.tech.magic>=3&&n.forEach(function(o){let l=$(`${t(`modal_pylon_spell_${o}`)} {{ ${o} }}`),u=$(`«`),d=$(`»`);s.append(u),s.append(l),s.append(d)}),C({el:r||"#specialModal",data:e.race.casting,methods:{buildLabel(o){return c(o)},addSpell(o){let l=V();for(let u=0;u=d)e.race.casting[o]++,e.race.casting.total++,e.resource.Mana.diff-=d;else break}},subSpell(o){let l=V();for(let u=0;u0;u++)e.race.casting[o]--,e.race.casting.total--},ariaCount(o){return` ${o} casting.`},level(){return ai(e.race.casting.total,e.resource.Mana.gen,!0)}},filters:{drain:function(o){let l=0;return n.forEach(function(u){e.race.casting[u]&&e.race.casting[u]>0&&(l+=ti(e.race.casting[u]))}),t("modal_pylon_casting_cost",[+l.toFixed(3)])}}});function c(o){let l=+ti(e.race.casting[o]).toFixed(4),u=+(ti(e.race.casting[o]+1)-ti(e.race.casting[o])).toFixed(4),d=+(100*(e.race.casting[o]/(e.race.casting[o]+75))).toFixed(2);if(o==="crafting"){let h=+(100*(2*e.race.casting[o]/(2*e.race.casting[o]+75))).toFixed(2);return t("modal_pylon_casting_label_crafting",[l,d,h,u])}return t("modal_pylon_casting_label",[t(`modal_pylon_spell_${o}`),l,u,d])}n.forEach(function(o){let l=a.hasClass("modalBody")?"specialModal":"iPylon";B(`${l}${o}`,function(){return c(o)},{elm:$(`#${l} > .pylon > .${o}`),attach:"#main"})})}function Gu(a,r){a.append($(`
      ${t("modal_quarry_ratio",[e.resource.Chrysotile.name])}
      `));let i=$('
      «»
      ');a.append(i),C({el:r||"#specialModal",data:e.city.rock_quarry,methods:{sub(){let s=V();e.city.rock_quarry.asbestos>0&&(e.city.rock_quarry.asbestos-=s,e.city.rock_quarry.asbestos<0&&(e.city.rock_quarry.asbestos=0))},add(){let s=V();e.city.rock_quarry.asbestos<100&&(e.city.rock_quarry.asbestos+=s,e.city.rock_quarry.asbestos>100&&(e.city.rock_quarry.asbestos=100))}}})}function Nu(a,r){a.append($(`
      ${t("modal_quarry_ratio",[e.resource.Adamantite.name])}
      `));let i=$('
      «»
      ');a.append(i),C({el:r||"#specialModal",data:e.space.titan_mine,methods:{sub(){let s=V();e.space.titan_mine.ratio>0&&(e.space.titan_mine.ratio-=s,e.space.titan_mine.ratio<0&&(e.space.titan_mine.ratio=0))},add(){let s=V();e.space.titan_mine.ratio<100&&(e.space.titan_mine.ratio+=s,e.space.titan_mine.ratio>100&&(e.space.titan_mine.ratio=100))}}})}function Ru(a,r){a.append($(`
      ${t("tau_roid_mining_ship_ratio",[e.resource.Iron.name,e.resource.Aluminium.name])}
      `));let i=$(`
      «»
      `);a.append(i),a.append($(`
      ${t("tau_roid_mining_ship_ratio",[e.resource.Iridium.name,e.resource.Neutronium.name])}
      `));let s=$(`
      «»
      `);if(a.append(s),e.tech.tau_roid>=5){a.append($(`
      ${t("tau_roid_mining_ship_ratio",[e.resource.Orichalcum.name,e.resource.Elerium.name])}
      `));let n=$(`
      «»
      `);a.append(n)}C({el:r||"#specialModal",data:e.tauceti.mining_ship,methods:{sub(n){let c=V();e.tauceti.mining_ship[n]>0&&(e.tauceti.mining_ship[n]-=c,e.tauceti.mining_ship[n]<0&&(e.tauceti.mining_ship[n]=0))},add(n){let c=V();e.tauceti.mining_ship[n]<100&&(e.tauceti.mining_ship[n]+=c,e.tauceti.mining_ship[n]>100&&(e.tauceti.mining_ship[n]=100))}}})}function Hu(a,r){a.append($(`
      ${t("tau_gas2_alien_station_focus",[e.resource.Knowledge.name])}
      `));let i=$(`
      «»
      `);a.append(i),C({el:r||"#specialModal",data:e.tauceti.alien_space_station,methods:{sub(s){let n=V();e.tauceti.alien_space_station[s]>0&&(e.tauceti.alien_space_station[s]-=n,e.tauceti.alien_space_station[s]<0&&(e.tauceti.alien_space_station[s]=0))},add(s){let n=V();e.tauceti.alien_space_station[s]<100&&(e.tauceti.alien_space_station[s]+=n,e.tauceti.alien_space_station[s]>100&&(e.tauceti.alien_space_station[s]=100))}}})}function Vu(a,r){if(e.race.replicator){a.append($(`
      ${e.race.universe==="antimatter"?t("tech_antireplicator"):t("tech_replicator")}
      `));let i=$('
      ');if(a.append(i),r){let l="";Object.keys(Re).forEach(function(u){l+=`${e.resource[u].name}`}),i.append(`
      ${l} @@ -393,10 +393,10 @@ `),C({el:"#sshifter",data:e.race,methods:{setShape(n){za(n)}},filters:{genus(n){return t(`genelab_genus_${n}`)}}})}e.race.ss_traits=i}function Se(a,r){if(r=r||{},e.race[a]&&!r.force)switch(e.race[a]){case .25:return e.race[a]=r.down?.25:.5,!r.down;case .5:return e.race[a]=r.down?.25:1,!0;case 1:return e.race[a]=r.down?.5:2,!0;case 2:return e.race[a]=r.down?1:3,!0;case 3:return e.race[a]=r.down?2:3,!!r.down}else if(r.set)return e.race[a]=r.set,!0;return!1}function X(a){if(e.race.unfathomable&&e.city.surfaceDwellers&&e.city.surfaceDwellers.includes(a)&&e.city.captive_housing){let r=e.city.surfaceDwellers.indexOf(a),i=e.city.captive_housing[`race${r}`];if(i>100&&(i=100),i>e.civic.torturer.workers){let n=i-e.civic.torturer.workers;i-=Math.ceil(n/3)}let s=(e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0)/5;return i/100*s}return 0}function Tt(a,r){switch(a){case"name":{let i={hooved:Os(!1),promiscuous:e.race.artifical?t("trait_promiscuous_synth_name"):b.promiscuous.name};return r?i[r]?i[r]:b[r].name:i}case"desc":{let i={hooved:Os(!0),promiscuous:e.race.artifical?t("trait_promiscuous_synth"):b.promiscuous.desc};return r?i[r]?i[r]:b[r].desc:i}}}function Os(a){return e.race.sludge?a?t("trait_hooved_slime"):t("trait_hooved_slime_name"):["cath","wolven","dracnid","seraph","cyclops","kobold","tuskin","sharkin"].includes(e.race.species)?a?t(`trait_hooved_${e.race.species}`):t(`trait_hooved_${e.race.species}_name`):["humanoid","avian","plant","fungi","reptilian","fey","synthetic"].includes(x[e.race.species].type)?a?t(`trait_hooved_${x[e.race.species].type}`):t(`trait_hooved_${x[e.race.species].type}_name`):a?b.hooved.desc:b.hooved.name}var he={grassland:{label:t("biome_grassland_name"),desc:t("biome_grassland"),vars(){return e.race.rejuvenated?[1.25]:[1.2]},wiki:["%"]},oceanic:{label:t("biome_oceanic_name"),desc:t("biome_oceanic"),vars(){return e.race.rejuvenated?[1.25,1.12,.92]:[1.12,1.06,.95]},wiki:["%","%","%"]},forest:{label:t("biome_forest_name"),desc:t("biome_forest"),vars(){return e.race.rejuvenated?[1.35]:[1.2]},wiki:["%"]},desert:{label:t("biome_desert_name"),desc:t("biome_desert"),vars(){return e.race.rejuvenated?[1.35,1.18,.6]:[1.2,1.1,.75]},wiki:["%","%","%"]},volcanic:{label:t("biome_volcanic_name"),desc:t("biome_volcanic"),vars(){return e.race.rejuvenated?[.8,1.25,1.15]:[.9,1.12,1.08]},wiki:["%","%","%"]},tundra:{label:t("biome_tundra_name"),desc:t("biome_tundra"),vars(){return e.race.rejuvenated?[1.5,.8]:[1.25,.9]},wiki:["%","%"]},savanna:{label:t("biome_savanna_name"),desc:t("biome_savanna"),vars(){return e.race.rejuvenated?[1.18,1.25,.75]:[1.1,1.18,.8]},wiki:["%","%","%"]},swamp:{label:t("biome_swamp_name"),desc:t("biome_swamp"),vars(){return e.race.rejuvenated?[1.6,1.35,1.15,.78]:[1.4,1.25,1.1,.88]},wiki:["%","%","%","%"]},ashland:{label:t("biome_ashland_name"),desc:t("biome_ashland"),vars(){return e.race.rejuvenated?[.55,1.35,1.2]:[.62,1.25,1.1]},wiki:["%","%","%"]},taiga:{label:t("biome_taiga_name"),desc:t("biome_taiga"),vars(){return e.race.rejuvenated?[1.2,1.65,.88]:[1.1,1.5,.92]},wiki:["%","%","%"]},hellscape:{label:t("biome_hellscape_name"),desc:t("biome_hellscape"),vars(){return e.race.rejuvenated?[.2]:[.25]},wiki:["%"]},eden:{label:t("biome_eden_name"),desc:t("biome_eden")}},Fe={toxic:{label:t("planet_toxic"),desc:t("planet_toxic_desc"),vars(){return e.race.rejuvenated?[2,1.5]:[1,1.25]},wiki:["A","-%"]},mellow:{label:t("planet_mellow"),desc:t("planet_mellow_desc"),vars(){return e.race.rejuvenated?[2,3,.88]:[1.5,2,.9]},wiki:["%","A","%"]},rage:{label:t("planet_rage"),desc:t("planet_rage_desc"),vars(){return e.race.rejuvenated?[1.1,1.05,1]:[1.05,1.02,1]},wiki:["%","%","A"]},stormy:{label:t("planet_stormy"),desc:t("planet_stormy_desc")},ozone:{label:t("planet_ozone"),desc:t("planet_ozone_desc"),vars(){return e.race.rejuvenated?[.18]:[.25]},wiki:["-A"]},magnetic:{label:t("planet_magnetic"),desc:t("planet_magnetic_desc"),vars(){return e.race.rejuvenated?[2,150,.98]:[1,100,.985]},wiki:["A","A","%"]},trashed:{label:t("planet_trashed"),desc:t("planet_trashed_desc"),vars(){return e.race.rejuvenated?[.8,1.2]:[.75,1]},wiki:["%","%"]},elliptical:{label:t("planet_elliptical"),desc:t("planet_elliptical_desc")},flare:{label:t("planet_flare"),desc:t("planet_flare_desc")},dense:{label:t("planet_dense"),desc:t("planet_dense_desc"),vars(){return e.race.rejuvenated?[1.5,1.2,1.35]:[1.2,1,1.2]},wiki:["%","A","%"]},unstable:{label:t("planet_unstable"),desc:t("planet_unstable_desc")},permafrost:{label:t("planet_permafrost"),desc:t("planet_permafrost_desc"),vars(){return e.race.rejuvenated?[.7,125]:[.75,100]},wiki:["%","A"]},retrograde:{label:t("planet_retrograde"),desc:t("planet_retrograde_desc")}};function Xu(){return e.race.hasOwnProperty("shell_color")?t(`color_${e.race.shell_color}`):t("color_green")}function Yu(){return e.race.hasOwnProperty("fox_color")?t(`color_${e.race.fox_color}`):t("color_red")}function Bn(a){a=a||[];let r=Object.keys(x).filter(function(s){return x[s].basic()&&!a.includes(s)}),i=Si(r);return r[i]}function De(){if(!e.settings.tabLoad&&(e.settings.civTabs!==2||e.settings.govTabs!==6))return;let a=$("#psychicPowers");A(a),e.race.psychic&&e.tech.psychic&&(e_(a),t_(a),e.tech.psychic>=2&&a_(a),e.tech.psychic>=3&&(e.race.psychicPowers.cash||(e.race.psychicPowers.cash=0),r_(a)),e.tech.psychicthrall&&e.tech.unfathomable&&e.race.unfathomable&&(e.tech.psychicthrall>=2&&s_(a),i_(a)))}function e_(a){let r=$('
      ');a.append(r),r.append($(`
      ${t("psychic_boost_title")}
      `));let i=$("
      ");r.append(i);let s="";if(Object.keys(Re).forEach(function(l){e.resource[l].display&&(s+=`${e.resource[l].name}`)}),i.append(`
      ${s}
      `),r.append('
      '),e.tech.psychic>=4){let l=$(`
      ${t("psychic_channel")}
      `),u=$('{{ c.boost }}'),d=$(`«`),h=$(`»`);l.append(d),l.append(u),l.append(h),r.append(l)}let n=e.tech.psychic>=5?60:75,c=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;C({el:"#psychicBoost",data:{b:e.race.psychicPowers.boost,c:e.tech.psychic>=4?e.race.psychicPowers.channel:{}},methods:{boostVal(){e.resource.Energy.amount>=n&&(e.resource.Energy.amount-=n,e.race.psychicPowers.boostTime=72*c)},add(){let l=V();for(let u=0;u0;u++)e.race.psychicPowers.channel.boost--}},filters:{boost(l){return t("psychic_boost_button",[e.resource[l]?e.resource[l].name:"N/A",n])},boostTime(){return e.race.psychicPowers.boostTime>0?t("psychic_boost_time",[e.race.psychicPowers.boostTime]):""}}});let o=document.getElementById("psyhscrolltarget");o.addEventListener("wheel",l=>{l.preventDefault(),o.scrollLeft+=l.deltaY}),B("psychicBoost",function(){return t("psychic_boost_desc",[b.psychic.vars()[3]])},{elm:"#psychicBoost > div > button"})}function t_(a){let r=$('
      ');a.append(r),r.append($(`
      ${t("psychic_murder_title")}
      `)),r.append('
      ');let i=e.tech.psychic>=5?8:10;C({el:"#psychicKill",data:{},methods:{murder(){e.resource.Energy.amount>=i&&e.resource[e.race.species].amount>=1&&(e.resource.Energy.amount-=i,e.resource[e.race.species].amount--,e.stats.psykill++,e.race.anthropophagite&&et("Food",1e4*b.anthropophagite.vars()[0]),e.stats.psykill===10&&De())}},filters:{kill(){return t("psychic_murder_button",[i])}}}),B("psychicKill",function(){return t("psychic_murder_desc")},{elm:"#psychicKill > div > button"})}function a_(a){let r=$('
      ');if(a.append(r),r.append($(`
      ${t("psychic_assault_title")}
      `)),r.append('
      '),e.tech.psychic>=4){let n=$(`
      ${t("psychic_channel")}
      `),c=$('{{ assault }}'),o=$(`«`),l=$(`»`);n.append(o),n.append(c),n.append(l),r.append(n)}let i=e.tech.psychic>=5?36:45,s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;C({el:"#psychicAssault",data:e.tech.psychic>=4?e.race.psychicPowers.channel:{},methods:{boostVal(){e.resource.Energy.amount>=i&&(e.resource.Energy.amount-=i,e.race.psychicPowers.assaultTime=72*s)},add(){let n=V();for(let c=0;c0;c++)e.race.psychicPowers.channel.assault--}},filters:{boost(){return t("psychic_boost_button",[t("psychic_attack"),i])},boostTime(){return e.race.psychicPowers.assaultTime>0?t("psychic_boost_time",[e.race.psychicPowers.assaultTime]):""}}}),B("psychicAssault",function(){return t("psychic_assault_desc",[b.psychic.vars()[3]])},{elm:"#psychicAssault > div > button"})}function r_(a){let r=$('
      ');if(a.append(r),r.append($(`
      ${t("psychic_profit_title")}
      `)),r.append('
      '),e.tech.psychic>=4){let n=$(`
      ${t("psychic_channel")}
      `),c=$('{{ cash }}'),o=$(`«`),l=$(`»`);n.append(o),n.append(c),n.append(l),r.append(n)}let i=e.tech.psychic>=5?52:65,s=e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg?e.stats.achieve.nightmare.mg:0;C({el:"#psychicFinance",data:e.tech.psychic>=4?e.race.psychicPowers.channel:{},methods:{boostVal(){e.resource.Energy.amount>=i&&(e.resource.Energy.amount-=i,e.race.psychicPowers.cash=72*s)},add(){let n=V();for(let c=0;c0;c++)e.race.psychicPowers.channel.cash--}},filters:{boost(){return t("psychic_boost_button",[t("psychic_profit"),i])},boostTime(){return e.race.psychicPowers.cash>0?t("psychic_boost_time",[e.race.psychicPowers.cash]):""}}}),B("psychicFinance",function(){return t("psychic_profit_desc",[b.psychic.vars()[3]])},{elm:"#psychicFinance > div > button"})}function i_(a){let r=$('
      ');a.append(r),r.append($(`
      ${t("psychic_mind_break_title")}
      `)),r.append('
      ');let i=e.tech.psychic>=5?64:80;C({el:"#psychicMindBreak",data:{},methods:{breakMind(){if(e.resource.Energy.amount>=i&&e.tech.unfathomable){let s=[];if(e.city.hasOwnProperty("surfaceDwellers"))for(let n=0;n0&&s.push(n);if(s.length>0){let n=s[Math.rand(0,s.length)];e.city.captive_housing[`jailrace${n}`]--,e.city.captive_housing[`race${n}`]++,e.resource.Energy.amount-=i}}}},filters:{break(){return t("psychic_mind_break_button",[i])}}}),B("psychicMindBreak",function(){return t("psychic_mind_break_desc")},{elm:"#psychicMindBreak > div > button"})}function s_(a){let r=$('
      ');a.append(r),r.append($(`
      ${t("psychic_stun_title")}
      `)),r.append('
      ');let i=e.tech.psychic>=5?80:100;C({el:"#psychicCapture",data:{},methods:{stun(){if(e.resource.Energy.amount>=i&&e.tech.unfathomable){let s=0;if(e.city.hasOwnProperty("surfaceDwellers"))for(let n=0;n div > button"})}var Ki=!1;function B(a,r,i){i||(i={}),i.hasOwnProperty("elm")||(i.elm="#"+a),i.hasOwnProperty("bind")||(i.bind=!0),i.hasOwnProperty("unbind")||(i.unbind=!0),i.hasOwnProperty("placement")||(i.placement="bottom"),i.bind&&$(i.elm).on(i.bind_mouse_enter?"mouseenter":"mouseover",function(){(Ki||$("#popper").length>0)&&ie();let s=i.wide?" wide":"",n=i.classes?i.classes:"has-background-light has-text-dark pop-desc";var c=$(`
      `);i.attach?$(i.attach).append(c):$("#main").append(c),r&&c.append(typeof r=="function"?r({this:this,popper:c}):r),Ki=Popper.createPopper(i.self?this:$(i.elm)[0],document.querySelector("#popper"),{placement:i.placement,modifiers:[{name:"flip",enabled:!0},{name:"offset",options:{offset:i.offset?i.offset:[0,0]}}]}),c.show(),i.hasOwnProperty("in")&&typeof i.in=="function"&&i.in({this:this,popper:c,id:"popper"}),xe("firework")&&e[e.race.cataclysm||e.race.orbit_decayed?"space":"city"].firework.on>0&&$(c).append('')}),i.unbind&&("ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)?$(i.elm).on("touchend",function(s){ie(),i.hasOwnProperty("out")&&typeof i.out=="function"&&i.out({this:this,popper:$("#popper"),id:"popper"})}):$(i.elm).on(i.bind_mouse_enter?"mouseleave":"mouseout",function(){ie(),i.hasOwnProperty("out")&&typeof i.out=="function"&&i.out({this:this,popper:$("#popper"),id:"popper"})}))}"ontouchstart"in document.documentElement&&navigator.userAgent.match(e.settings.touch)&&$(document).on("touchend",function(a){if($(".popper").length===1){ie();return}});function ie(a){a&&$("#popper").data("id")!==a||($("#popper").hide(),Ki&&(Ki.destroy(),Ki=!1),A($("#popper"),!0))}function Ta(a){switch(a){case"stop":ce.w?ce.w.postMessage({loop:"clear"}):(clearInterval(vr.main_loop),clearInterval(vr.mid_loop),clearInterval(vr.long_loop)),e.settings.at>0&&(e.settings.at=Hi.t),ce.s=!1;break;case"start":{Io(Date.now());let r=To();ce.mt=r.webWorkerMainTimer,ce.w?(ce.w.postMessage({loop:"short",period:r.mainTimer}),ce.w.postMessage({loop:"mid",period:r.midTimer}),ce.w.postMessage({loop:"long",period:r.longTimer})):(vr.main_loop=setInterval(function(){fastLoop()},r.mainTimer),vr.mid_loop=setInterval(function(){midLoop()},r.midTimer),vr.long_loop=setInterval(function(){longLoop()},r.longTimer)),ce.s=!0}}}function To(){let a=1;e.race.slow&&(a*=1+b.slow.vars()[0]/100),e.race.hyper&&(a*=1-b.hyper.vars()[0]/100);let r=Math.floor(250*a),i=4*r,s=20*r,n=2,c=Hi.t>0?1/n:1;return{webWorkerMainTimer:r,mainTimer:Math.ceil(r*c),midTimer:Math.ceil(i*c),longTimer:Math.ceil(s*c),baseLongTimer:s,timeAccelerationFactor:n}}function Io(a){if(n_(a)||e.stats.hasOwnProperty("current")&&e.settings.at>0){let r=a-e.stats.current;if(e.settings.at>11520&&(e.settings.at=0),r>=12e4){let i=To(),s=i.baseLongTimer;e.settings.at+=Math.floor(2/3*r*i.timeAccelerationFactor/s)}e.settings.at>11520&&(e.settings.at=11520),Hi.t=e.settings.at,e.stats.current=a}}function n_(a){return e.stats.hasOwnProperty("current")&&a-e.stats.current>=12e4}window.exportGame=function(){return e.race.noexport?`Export is not available during ${e.race.noexport} Creation`:(Io(Date.now()),LZString.compressToBase64(JSON.stringify(e)))};window.importGame=function(r,i){let s=JSON.parse(i?LZString.decompressFromUTF16(r):LZString.decompressFromBase64(r));s&&"evolution"in s&&"settings"in s&&"stats"in s&&"plasmid"in s.stats&&(ce.w&&ce.w.terminate(),s.hasOwnProperty("tech")&&i&&(s.tech.hasOwnProperty("whitehole")&&s.tech.whitehole>=4&&(s.tech.whitehole=3,s.resource.Soul_Gem.amount+=10,s.resource.Knowledge.amount+=15e5,s.stats.know-=15e5),s.tech.hasOwnProperty("quaked")&&s.tech.quaked===2&&(s.tech.quaked=1,s.resource.Knowledge.amount+=5e5,s.stats.know-=5e5),s.tech.hasOwnProperty("corrupted_ai")&&s.tech.corrupted_ai===3&&(s.tech.corrupted_ai=1,s.resource.Knowledge.amount+=5e6,s.stats.know-=5e6)),oe.setItem("evolved",LZString.compressToUTF16(JSON.stringify(s))),window.location.reload())};function ki(a,r){let i=Fa(),s=[];switch(a){case"power":s=["city:transmitter","prtl_ruins:arcology","city:apartment","int_alpha:habitat","int_alpha:luxury_condo","spc_red:spaceport","spc_titan:titan_spaceport","spc_titan:electrolysis","int_alpha:starport","spc_dwarf:shipyard","spc_titan:ai_core2","spc_eris:drone_control","spc_titan:ai_colonist","int_blackhole:s_gate","gxy_gateway:starbase","spc_triton:fob","spc_enceladus:operating_base","spc_enceladus:zero_g_lab","spc_titan:sam","gxy_gateway:ship_dock","prtl_ruins:hell_forge","int_neutron:stellar_forge","int_neutron:citadel","tau_home:orbital_station","tau_red:orbital_platform","tau_gas:refueling_station","tau_home:tau_farm","tau_gas:ore_refinery","tau_gas:whaling_station","city:coal_mine","spc_moon:moon_base","spc_red:red_tower","spc_home:nav_beacon","int_proxima:xfer_station","gxy_stargate:telemetry_beacon","int_nebula:nexus","gxy_stargate:gateway_depot","spc_dwarf:elerium_contain","spc_gas:gas_mining","spc_belt:space_station","spc_gas_moon:outpost","gxy_gorddon:embassy","gxy_gorddon:dormitory","gxy_alien1:resort","spc_gas_moon:oil_extractor","int_alpha:int_factory","city:factory","spc_red:red_factory","spc_dwarf:world_controller","prtl_fortress:turret","prtl_badlands:war_drone","city:wardenclyffe","city:biolab","city:mine","city:rock_quarry","city:cement_plant","city:sawmill","city:mass_driver","int_neutron:neutron_miner","prtl_fortress:war_droid","prtl_pit:soul_forge","gxy_chthonian:excavator","int_blackhole:far_reach","prtl_badlands:sensor_drone","prtl_badlands:attractor","city:metal_refinery","gxy_stargate:gateway_station","gxy_alien1:vitreloy_plant","gxy_alien2:foothold","gxy_gorddon:symposium","int_blackhole:mass_ejector","city:casino","spc_hell:spc_casino","tau_home:tauceti_casino","prtl_fortress:repair_droid","gxy_stargate:defense_platform","prtl_ruins:guard_post","prtl_lake:cooling_tower","prtl_lake:harbor","prtl_spire:purifier","prtl_ruins:archaeology","prtl_pit:gun_emplacement","prtl_gate:gate_turret","prtl_pit:soul_attractor","prtl_gate:infernite_mine","int_sirius:ascension_trigger","spc_kuiper:orichalcum_mine","spc_kuiper:elerium_mine","spc_kuiper:uranium_mine","spc_kuiper:neutronium_mine","spc_dwarf:m_relay","tau_home:tau_factory","tau_home:infectious_disease_lab","tau_home:alien_outpost","tau_gas:womling_station","spc_red:atmo_terraformer","tau_star:matrix","tau_home:tau_cultural_center","prtl_pit:soul_capacitor","prtl_lake:oven_complete","city:replicator"];break;case"moon":s=["spc_moon:helium_mine","spc_moon:iridium_mine","spc_moon:observatory"];break;case"red":s=["spc_red:living_quarters","spc_red:exotic_lab","spc_red:red_mine","spc_red:fabrication","spc_red:biodome","spc_red:vr_center"];break;case"belt":s=["spc_belt:elerium_ship","spc_belt:iridium_ship","spc_belt:iron_ship"];break;case"alpha":s=["int_alpha:fusion","int_alpha:mining_droid","int_alpha:processing","int_alpha:laboratory","int_alpha:g_factory","int_alpha:exchange","int_alpha:zoo"];break;case"nebula":s=["int_nebula:harvester","int_nebula:elerium_prospector"];break;case"gateway":s=["gxy_gateway:bolognium_ship","gxy_gateway:dreadnought","gxy_gateway:cruiser_ship","gxy_gateway:frigate_ship","gxy_gateway:corvette_ship","gxy_gateway:scout_ship"];break;case"alien2":s=["gxy_alien2:armed_miner","gxy_alien2:ore_processor","gxy_alien2:scavenger"];break;case"lake":s=["prtl_lake:bireme","prtl_lake:transport"];break;case"spire":s=["prtl_spire:port","prtl_spire:base_camp","prtl_spire:mechbay"];break;case"titan":s=["spc_titan:titan_quarters","spc_titan:titan_mine","spc_titan:g_factory","spc_titan:decoder"];break;case"enceladus":s=["spc_enceladus:water_freighter","spc_enceladus:operating_base","spc_enceladus:zero_g_lab"];break;case"eris":s=["spc_eris:shock_trooper","spc_eris:tank"];break;case"tau_home":s=["tau_home:colony","tau_home:tau_factory","tau_home:mining_pit","tau_home:infectious_disease_lab"];break;case"tau_red":s=["tau_red:womling_village","tau_red:womling_farm","tau_red:overseer","tau_red:womling_mine","tau_red:womling_fun","tau_red:womling_lab"];break;case"tau_roid":s=["tau_roid:mining_ship","tau_roid:whaling_ship"];break}r&&(i[a].l.length=0),s.forEach(function(n){i[a].l.includes(n)||i[a].l.push(n)}),i[a].l.length>s.length&&i[a].l.forEach(function(n){s.includes(n)||i[a].l.splice(i[a].l.indexOf(n),1)})}function I(a,r,i,s,n){if(s=s||[],!n&&!s.includes("all")&&s.push("all"),r=r||"warning",s.includes(gr.view)){let c=$('

      '+a+"

      ");$("#msgQueueLog").prepend(c),$("#msgQueueLog").children().length>e.settings.msgFilters[gr.view].max&&$("#msgQueueLog").children().last().remove()}s.forEach(function(c){gr[c].unshift({msg:a,color:r}),gr[c].length>e.settings.msgFilters[c].max&&gr[c].pop()}),i||s.forEach(function(c){e.lastMsg[c]&&(e.lastMsg[c].unshift({m:a,c:r}),e.lastMsg[c].length>e.settings.msgFilters[c].save&&e.lastMsg[c].splice(e.settings.msgFilters[c].save))})}function aa(a){for(let r=e.queue.queue.length-1;r>=0;r--)a.includes(e.queue.queue[r].id)&&e.queue.queue.splice(r,1)}function lr(a){for(let r=e.r_queue.queue.length-1;r>=0;r--)a.includes(q.tech[e.r_queue.queue[r].type].grant[0])&&e.r_queue.queue.splice(r,1)}function ua(){let a=e.tech.queue>=2?e.tech.queue>=3?8:5:3;if(e.stats.feat.journeyman&&e.stats.feat.journeyman>=2&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>=2){let i=Math.min(e.stats.achieve.seeder.l,e.stats.feat.journeyman);a+=i>=4?2:1}e.genes.queue&&e.genes.queue>=2&&(a*=2);let r=J("pragmatist",0);r&&(a=Math.round(a*(1+r/100))),e.queue.max=a}function Ra(){let a=3;if(e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0){let i=Math.min(e.stats.achieve.seeder.l,e.stats.feat.journeyman);a+=i>=3?i>=5?3:2:1}e.genes.queue&&e.genes.queue>=2&&(a*=2);let r=J("theorist",0);r&&(a=Math.round(a*(1+r/100))),e.r_queue.max=a}function Tr(){c_(),A($("#buildQueue")),$("#buildQueue").append($(`

      ${t("building_queue")} ({{ | used_q }}/{{ max }})

      - `)),e.settings.queuestyle&&$("#buildQueue").addClass(e.settings.queuestyle);let a=$('
        ');$("#buildQueue").append(a),a.append($(`
      • {{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }}]
      • `));try{C({el:"#buildQueue",data:e.queue,methods:{remove(r){let i=V();for(let s=0;s0&&(e.queue.queue[r].q-=e.queue.queue[r].qs),e.queue.queue[r].q<=0){ie(`q${e.queue.queue[r].id}${r}`),e.queue.queue.splice(r,1),Tr();break}},setID(r){return`q${e.queue.queue[r].id}${r}`},setData(r,i){let s,n=e.queue.queue[r].id.split("-");n[0].substring(0,4)==="arpa"?s=n[0].substring(4):n[0]==="city"||n[0]==="evolution"||n[0]==="starDock"?s=q[n[0]][n[1]]:Object.keys(q[n[0]]).forEach(function(o){q[n[0]][o].hasOwnProperty(n[1])&&(s=q[n[0]][o][n[1]])});let c={};if(s.cost){let o=_t(s);Object.keys(o).forEach(function(l){let u=o[l]();u>0&&(c[`${i}-${l}`]=u)})}return c},pauseQueue(){$("#pausequeue").removeClass("play"),$("#pausequeue").removeClass("pause"),e.queue.pause?(e.queue.pause=!1,$("#pausequeue").addClass("play")):(e.queue.pause=!0,$("#pausequeue").addClass("pause"))},pausedesc(){return e.queue.pause?t("queue_play"):t("queue_pause")}},filters:{time(r){return lt(r)},count(r){return r>1?` (${r})`:""},max_t(r,i){return i===r||i<0?"":` / ${lt(r)}`},used_q(){let r=0;for(let i=0;ie.resource[a].max&&e.resource[a].max!=-1?n=e.resource[a].max:n<0&&((!s||s&&n*-1>s)&&(c=!1),n=0),Number.isNaN(n)||(e.resource[a].amount=n,i||(e.resource[a].delta+=r,a==="Mana"&&r>0&&(e.resource[a].gen_d+=r))),c}function xa(a){let r=x[e.race.species].type;switch(r){case"animal":r="animalism";break;case"small":r="dwarfism";break;case"giant":r="gigantism";break;case"avian":case"reptilian":r="eggshell";break;case"fungi":r="chitin";break;case"insectoid":r="athropods";break;case"angelic":r="celestial";break;case"organism":r="sentience";break}let i=a?[t("civics_gov_tp_name0"),t("civics_gov_tp_name1"),t("civics_gov_tp_name2"),t("civics_gov_tp_name3"),t("civics_gov_tp_name4"),t("civics_gov_tp_name5"),t("civics_gov_tp_name6"),t("civics_gov_tp_name7"),t("civics_gov_tp_name8"),t("civics_gov_tp_name9")]:[x[e.race.species].name,x[e.race.species].home,t(`biome_${e.city.biome}_name`),t(`evo_${r}_title`),t("civics_gov_name0"),t("civics_gov_name1"),t("civics_gov_name2"),t("civics_gov_name3"),t("civics_gov_name4"),t("civics_gov_name5"),t("civics_gov_name6"),t("civics_gov_name7"),t("civics_gov_name8"),t("civics_gov_name9"),t("civics_gov_name10"),t("civics_gov_name11")];return{s0:Math.rand(0,14),s1:i[Math.rand(0,i.length)]}}function O(a,r,i,s,n){n||(n="city"),e.race.universe==="micro"&&(s-=fe("micro",!1)),e.race.small?s-=b.small.vars()[0]:e.race.large&&(s+=b.large.vars()[0]),e.race.compact&&(s-=b.compact.vars()[0]),e.race.tunneler&&(a==="mine"||a==="coal_mine")&&(s-=b.tunneler.vars()[0]),e.tech.housing_reduction&&(a==="basic_housing"||a==="cottage")&&(s-=e.tech.housing_reduction*.02),e.tech.housing_reduction&&a==="captive_housing"&&(s-=e.tech.housing_reduction*.01),a==="basic_housing"&&(e.race.solitary&&(s-=b.solitary.vars()[0]),e.race.pack_mentality&&(s+=b.pack_mentality.vars()[0])),a==="cottage"&&(e.race.solitary&&(s+=b.solitary.vars()[1]),e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1])),a==="apartment"&&e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1]),e.genes.creep&&!e.race.no_crispr?s-=e.genes.creep*.01:e.genes.creep&&e.race.no_crispr&&(s-=e.genes.creep*.002);let c=J("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var o=a==="citizen"?e.resource[e.race.species].amount:e[n][a]?e[n][a].count:0;return r&&(o+=r),Math.round(s**o*i)}function m(a,r,i,s,n,c){n||(n="space"),c=c||1.005,e.race.universe==="micro"&&(s-=fe("micro",!0)),e.genes.creep&&!e.race.no_crispr?s-=e.genes.creep*.01:e.genes.creep&&e.race.no_crispr&&(s-=e.genes.creep*.002),e.race.small&&(s-=b.small.vars()[1]),e.race.compact&&(s-=b.compact.vars()[1]),e.prestige.Harmony.count>0&&e.stats.achieve.ascended&&(s-=Ei());let o=J("noquestions",0);o&&(s-=o),s0&&e.stats.achieve.ascended){let a=0;switch(e.race.universe){case"heavy":e.stats.achieve.ascended.hasOwnProperty("h")&&(a=e.stats.achieve.ascended.h*e.prestige.Harmony.count);break;case"antimatter":e.stats.achieve.ascended.hasOwnProperty("a")&&(a=e.stats.achieve.ascended.a*e.prestige.Harmony.count);break;case"evil":e.stats.achieve.ascended.hasOwnProperty("e")&&(a=e.stats.achieve.ascended.e*e.prestige.Harmony.count);break;case"micro":e.stats.achieve.ascended.hasOwnProperty("m")&&(a=e.stats.achieve.ascended.m*e.prestige.Harmony.count);break;case"magic":e.stats.achieve.ascended.hasOwnProperty("mg")&&(a=e.stats.achieve.ascended.mg*e.prestige.Harmony.count);break;default:e.stats.achieve.ascended.hasOwnProperty("l")&&(a=e.stats.achieve.ascended.l*e.prestige.Harmony.count);break}if(a>0)return a=(Math.log(50+a)-3.912023005428146)*.01,+a.toFixed(5)}return 0}function _s(a,r,i,s){if(s=typeof s>"u"?!0:s,a.cost){let n=0,c=!1,o=r&&r.id[a.id]?r.id[a.id]:!1,l=_t(a,o),u=r?{}:!1,d=r?{}:!1;r&&(Object.keys(r.r).forEach(function(f){u[f]=r.r[f]}),Object.keys(r.rr).forEach(function(f){d[f]=r.rr[f]}));let h=!1;e.interstellar.hasOwnProperty("mass_ejector")&&e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks&&Object.keys(e.race.governor.tasks).forEach(function(f){e.race.governor.tasks[f]==="trash"&&(h=!0)});let p={};return Object.keys(l).forEach(function(f){if(n>=0&&!e.prestige.hasOwnProperty(f)&&!["Morale","HellArmy","Structs","Bool"].includes(f)){var g=Number(o?l[f](o):l[f]());if(g>0){let w=f==="Species"?e.race.species:f,v=f==="Supply"?e.portal.purifier.supply:Number(e.resource[w].amount),k=f==="Supply"?e.portal.purifier.sup_max:e.resource[w].max,P=f==="Supply"?e.portal.purifier.diff:e.resource[w].diff;if(h&&e.interstellar.mass_ejector[f]&&(P+=e.interstellar.mass_ejector[f],e.race.governor.config.trash.hasOwnProperty(f)&&(P-=Math.min(e.race.governor.config.trash[f].v,e.interstellar.mass_ejector[f]))),r&&(v+=P*(s?r.t.t:r.t.rt),r.r.hasOwnProperty(w)||(r.r[w]=0),r.rr.hasOwnProperty(w)||(r.rr[w]=0),s?(v-=Number(r.r[w]),r.r[w]+=g,r.rr[w]+=g):(v-=Number(r.rr[w]),r.rr[w]+=g),k>=0&&v>k&&(v=k)),g>v)if(P>0){let j=(g-v)/P;j>n&&(c=w,n=j),p[w]=j}else r&&(r.r=u,r.rr=d),n=-9999999,p[w]=99999999-P,(p[c]&&p[w]>p[c]||!p[c])&&(c=w)}}}),r&&n>=0&&(typeof r.id[a.id]>"u"?r.id[a.id]=1:r.id[a.id]++,s&&(r.t.t+=n),r.t.rt+=n),i?{t:n,r:c,s:p}:n}else return 0}function Ji(a,r,i,s){let n=i&&i.id[a.id]?i.id[a.id]:!1,c=Ca(a.cost,n),o=0,l=i?{}:!1,u=i?{}:!1,d=!1;i&&(Object.keys(i.r).forEach(function(f){l[f]=i.r[f]}),Object.keys(i.rr).forEach(function(f){u[f]=i.rr[f]}));let h=!1;e.interstellar.hasOwnProperty("mass_ejector")&&e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks&&Object.keys(e.race.governor.tasks).forEach(function(f){e.race.governor.tasks[f]==="trash"&&(h=!0)});let p={};return Object.keys(c).forEach(function(f){if(o>=0){let g=Number(c[f](n))*r;if(g>0){let w=Number(e.resource[f].amount),v=e.resource[f].diff;if(i&&(h&&e.interstellar.mass_ejector[f]&&(v+=e.interstellar.mass_ejector[f],e.race.governor.config.trash.hasOwnProperty(f)&&(v-=Math.min(e.race.governor.config.trash[f].v,e.interstellar.mass_ejector[f]))),w+=v*i.t.t,i.r[f]?(w-=Number(i.r[f]),i.r[f]+=g):i.r[f]=g,i.rr[f]?i.rr[f]+=g:i.rr[f]=g,e.resource[f].max>=0&&w>e.resource[f].max&&(w=e.resource[f].max)),g>w)if(v>0){let k=(g-w)/v;k>o&&(o=k,d=f),p[f]=k}else i&&(i.r=l,i.rr=u),o=-9999999,p[f]=99999999-v,(p[d]&&p[f]>p[d]||!p[d])&&(d=f)}}}),i&&o>=0&&(typeof i.id[a.id]>"u"?i.id[a.id]=1:i.id[a.id]++,i.t.t+=o,i.t.rt+=o),s?{t:o,r:d,s:p}:o}function A(a,r){if(a.find(".vb").each(function(){try{$(this)[0].__vue__.$destroy()}catch{}}),r){try{a[0].__vue__.$destroy()}catch{}a.remove()}else a.empty()}function C(a,r){if(r=r||"create",$(a.el).length>0&&typeof $(a.el)[0].__vue__<"u")try{r==="update"?$(a.el)[0].__vue__.$forceUpdate():$(a.el)[0].__vue__.$destroy()}catch{}r==="create"&&(new Vue(a),$(a.el).addClass("vb"))}function lt(a){let r;if(a<0)r=t("time_never");else{a=+a.toFixed(0);let i=60;if(a0?r=`${o}m ${c}s`:r=`${o}m`;else{let u=n*24,d=Math.floor(a/n)%24;if(a0?r=`${d}h ${o}m`:c>0?r=`${d}h ${c}s`:r=`${d}h`;else{let h=Math.floor(a/u);d>0?r=`${h}d ${d}h`:o>0?r=`${h}d ${o}m`:c>0?r=`${h}d ${c}s`:r=`${h}d`}}}}return r}function at(a){return e.race.universe==="antimatter"&&(a*=fe("antimatter"),a=+a.toFixed(2)),xr()==="leo"&&(a*=1+zt("leo")[0]/100,a=+a.toFixed(2)),a}function N(a){return e.race.emfield?+(a*1.5).toFixed(2):a}function __(a){if(e.tech.high_tech&&e.tech.high_tech>=11){let r=e.resource.Knowledge.max,i=25e4,s=0;for(;r>i;)r-=i,i*=1.1,s++;if(s+=+(r/i).toFixed(2),e.interstellar.citadel){let n=a?e.interstellar.citadel.on:G.citadel;e.tech.high_tech&&e.tech.high_tech>=15&&n>0&&(s*=1+n*.05)}if(e.space.ai_core2){let n=a?e.space.ai_core2.on:G.ai_core2;e.tech.titan_ai_core&&n>0&&(s*=1.25)}if(e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5&&e.prestige.AICore.count>0&&(s*=2-.99**e.prestige.AICore.count),e.race.linked){let n=b.linked.vars()[0]/100*e.resource[e.race.species].amount;n>b.linked.vars()[1]/100&&(n-=b.linked.vars()[1]/100,n=n/(n+200-b.linked.vars()[1]),n+=b.linked.vars()[1]/100),s*=1+n}return+s.toFixed(3)}return 0}function pa(a){return a?__(a):_i}function fe(a,r,i,s){s||(s={});let n=s.dark!==void 0?s.dark:e.prestige.Dark.count,c=s.harmony!==void 0?s.harmony:e.prestige.Harmony.count,o=s.sludge!==void 0?s.sludge:e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[le(a)]?e.stats.achieve.extinct_sludge[le(a)]:0;switch(a){case"standard":return e.race.universe==="standard"||i?(c>0&&(n*=1+c*.001),o&&(n*=1+o*.03),1+n/200):0;case"evil":return e.race.universe==="evil"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log2(10+n)-3.321928094887362)/5):1;case"micro":return e.race.universe==="micro"||i?r?(c>0&&(n*=1+c*.01),n=.01+(Math.log(100+n)-4.605170185988092)/35,o&&(n*=1+o*.03),n>.04&&(n=.04),+n.toFixed(5)):(c>0&&(n*=1+c*.01),n=.02+(Math.log(100+n)-4.605170185988092)/20,o&&(n*=1+o*.03),n>.06&&(n=.06),+n.toFixed(5)):0;case"heavy":return e.race.universe==="heavy"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),.995**n):1;case"antimatter":return e.race.universe==="antimatter"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log(50+n)-3.912023005428146)/5):0;case"magic":return e.race.universe==="magic"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log(50+n)-3.912023005428146)/3):0}return 0}var mt=function(){var a;return function(r){return a&&!r?a:e.genes.challenge&&e.genes.challenge>=2?(a=Hn(e.race.universe),a):0}}();function Hn(a,r,i){if(e.genes.challenge&&e.genes.challenge>=2){a=a||e.race.universe;let s=Vn(a),n=a==="standard"?.25:.15,c=e.genes.challenge>=3?.15:.1;e.genes.challenge>=4&&a!=="standard"&&(n+=.05,c-=.05);let o=e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0?Math.min(e.stats.achieve.corrupted.l,e.stats.feat.grandmaster):0;o>0&&(n*=1+o/100,c*=1+o/100),i||(e.race.weak_mastery&&a==="antimatter"&&(n/=10,c/=10),e.race.nerfed&&(n/=a==="antimatter"?5:2,c/=a==="antimatter"?5:2),e.race.ooze&&(n*=1-b.ooze.vars()[2]/100,c*=1-b.ooze.vars()[2]/100),e.genes.challenge>=5&&e.race.hasOwnProperty("mastery")&&(n*=1+b.mastery.vars()[0]*e.race.mastery/100,c*=1+b.mastery.vars()[0]*e.race.mastery/100));let l=s.aLvl*n,u=0;return a!=="standard"&&(u=s.uLvl*c),r?{g:l,u,m:l+u}:l+u}return r?{g:0,u:0,m:0}:0}var na=function(){var a;return function(r){if(!a||r){let i=0;Object.keys(e.pillars).forEach(function(s){x[s]&&e.race.species===s?i+=4:x[s]&&i++}),a=[1+i/100,1+i*2/100]}return a}}();function ur(a,r,i,s){i=i||0,s=s||{};let n=s.genes;n===void 0&&(n=dt()-1,n>4&&(n=4));let c=s.uni||e.race.universe;if(c==="micro"&&(a=a*.25),c==="antimatter"&&(a=a*1.1),c==="heavy"&&r!=="mad")switch(n){case 1:a=a*1.1;break;case 2:a=a*1.15;break;case 3:a=a*1.2;break;case 4:a=a*1.25;break;default:a=a*1.05;break}switch((s.tp!==void 0?s.tp:e.race.truepath)&&(a=a*1.1),n){case 1:return+(a*1.05).toFixed(i);case 2:return+(a*1.12).toFixed(i);case 3:return+(a*1.25).toFixed(i);case 4:return+(a*1.45).toFixed(i);default:return+a.toFixed(i)}}function _r(a,r){r||(r={});let i={pop_divisor:999,k_inc:1e6,k_mult:100,phage_mult:0,plasmid_cap:150};switch(a){case"mad":i.pop_divisor=3,i.k_inc=1e5,i.k_mult=1.1,i.plasmid_cap=150,r.synth&&(i.pop_divisor=5,i.k_inc=125e3,i.plasmid_cap=100);break;case"cataclysm":case"bioseed":i.pop_divisor=3,i.k_inc=5e4,i.k_mult=1.015,i.phage_mult=1,i.plasmid_cap=400;break;case"ai":i.pop_divisor=2.5,i.k_inc=45e3,i.k_mult=1.014,i.phage_mult=2,i.plasmid_cap=600;break;case"vacuum":case"bigbang":i.pop_divisor=2.2,i.k_inc=4e4,i.k_mult=1.012,i.phage_mult=2.5,i.plasmid_cap=800;break;case"ascend":case"terraform":i.pop_divisor=1.15,i.k_inc=3e4,i.k_mult=1.008,i.phage_mult=4,i.plasmid_cap=2e3;break;case"matrix":i.pop_divisor=1.5,i.k_inc=32e3,i.k_mult=1.01,i.phage_mult=3.2,i.plasmid_cap=1800;break;case"retired":i.pop_divisor=1.15,i.k_inc=32e3,i.k_mult=1.006,i.phage_mult=3.2,i.plasmid_cap=1800;break;case"eden":i.pop_divisor=1,i.k_inc=18e3,i.k_mult=1.004,i.phage_mult=2.5,i.plasmid_cap=1800;break;default:i.unknown=!0;break}return i}function ke(a,r){let i={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};r||(r={}),r.synth!==void 0&&(r.synth=x[e.race.species].type==="synthetic");let s=r.genes,n=r.uni;n=n||e.race.universe;let c=0;if(r.cit===void 0){let f=e.civic.hasOwnProperty("garrison")?e.civic.garrison.workers:0;for(let g=0;g<3;g++)e.civic.foreign[`gov${g}`].occ&&(f+=F(e.civic.govern.type==="federation"?15:20));e.race.high_pop?c=Math.round(e.resource[e.race.species].amount/b.high_pop.vars()[0])+Math.round(f/b.high_pop.vars()[0]):c=e.resource[e.race.species].amount+f}else r.high_pop?c=Math.round(r.cit/b.high_pop.vars(r.high_pop)[0])+Math.round(r.sol/b.high_pop.vars(r.high_pop)[0]):c=r.cit+r.sol;let o=_r(a,r),l=o.pop_divisor,u=o.k_inc,d=o.k_mult,h=o.phage_mult,p=o.plasmid_cap;if(s!==void 0?p=Math.floor(p*(1+(s+(r.tp?1:0))/8)):p=Math.floor(p*(1+(dt()-(e.race.truepath?0:1))/8)),r.plas===void 0){let f=r.know!==void 0?r.know:e.stats.know,g=Math.round(c/l);for(;f>u;)g++,f-=u,u*=d;if(e.race.cataclysm?g+=300:e.race.lone_survivor&&(g+=800),i.plasmid=ur(g,a,!1,r),!r.rawPlasmids&&i.plasmid>p){let w=i.plasmid-p;i.plasmid=p,w=Math.floor(w/(w+p)*p),i.plasmid+=w}}else i.plasmid=r.plas;if(i.phage=i.plasmid>0?ur(Math.floor(Math.log2(i.plasmid)*Math.E*h),a,!1,r):0,a==="bigbang"){let f=r.exotic,g=r.mass;f===void 0&&e.interstellar&&e.interstellar.stellar_engine&&(f=e.interstellar.stellar_engine.exotic,g=e.interstellar.stellar_engine.mass);let w=+Math.log(1+f*40).toFixed(3);w+=+(Math.log2(g-7)/2.5).toFixed(3),w=ur(w,"bigbang",3,r),i.dark=w}else if(a==="vacuum"){let f=r.mana!==void 0?r.mana:e.resource.Mana.gen,g=+(Math.log2(f)/5).toFixed(3);g=ur(g,"vacuum",3,r),i.dark=g}if(["ascend","descend","terraform"].includes(a)){let f=1;if(s===void 0?(f=dt(),f>5&&(f=5)):f=s+1,a==="ascend"||a==="terraform"){switch(n){case"micro":f*=.25;break;case"heavy":f*=1.2;break;case"antimatter":f*=1.1;break;default:break}i.harmony=parseFloat(f.toFixed(2))}else if(a==="descend"){let g=n==="micro"?1:f,w=r.floor;w!==void 0?w++:w=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,[50,100].forEach(function(v){w>v&&g++}),i.artifact=g}}return a==="ai"&&(i.cores=n==="micro"?2:5),i}function _t(a,r,i){let s=a.cost||{};if((s.RNA||s.DNA)&&e.genes.evolve){var n={};return Object.keys(s).forEach(function(c){(c==="RNA"||c==="DNA")&&(n[c]=function(){return Math.round(s[c](r,i)*.8)})}),n}return s=d_(s,r,i),s=h_(s,a,r,i),s=p_(s,r,i),s=m_(s,r,i),s=g_(s,r,i),s=w_(s,r,i),s=b_(s,r,i),s=y_(s,r,i),s=v_(s,r,i),s=x_(s,r,i),s=f_(s,r,i),s=$_(s,r,i),k_(s,r,i)}function d_(a,r,i){if(e.race.bloated){let n=1+b.bloated.vars()[0]/100;var s={};return Object.keys(a).forEach(function(c){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(c)?s[c]=function(){return a[c](r,i)*n}:s[c]=function(){return a[c](r,i)}}),s}return a}function p_(a,r,i){if(e.race.lone_survivor){var s={};return Object.keys(a).forEach(function(n){["Structs","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(n)?s[n]=function(){return a[n](r,i)}:["Knowledge"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.5)}:["Money"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.22)}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.14)}:s[n]=function(){return Math.round(a[n](r,i)*.28)}}),s}return a}function h_(a,r,i,s){if((s?s.truepath:e.race.truepath)&&(!r.hasOwnProperty("path")||!r.path.includes("truepath"))){var n={};return Object.keys(a).forEach(function(c){c==="Money"?n[c]=function(){return Math.round(a[c](i,s)*3)}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(c)?n[c]=function(){return a[c](i,s)}:n[c]=function(){return Math.round(a[c](i,s)*2)}}),n}return a}function m_(a,r,i){if(e.race.inflation){var s={};return Object.keys(a).forEach(function(n){if(n==="Money"){let c=1+e.race.inflation/75;s[n]=function(){return Math.round(a[n](r,i)*c)}}else s[n]=function(){return a[n](r,i)}}),s}return a}function f_(a,r,i){let s=J("extravagant",0);if(s){var n={};return Object.keys(a).forEach(function(c){if(c==="Money"){let o=1+s/100;n[c]=function(){return Math.round(a[c](r,i)*o)}}else n[c]=function(){return a[c](r,i)}}),n}return a}function g_(a,r,i){if(e.civic.govern.type==="technocracy"){let n=1+Ee.technocracy()[1]/100;var s={};return Object.keys(a).forEach(function(c){if(c==="Knowledge"){let o=1-Ee.technocracy()[0]/100;s[c]=function(){return Math.round(a[c](r,i)*o)}}else c==="Money"||c==="Structs"||c==="Custom"?s[c]=function(){return a[c](r,i)}:s[c]=function(){return Math.round(a[c](r,i)*n)}}),s}return a}function v_(a,r,i){let s=J("pragmatist",1),n=X("gnome");if((e.race.smart||e.race.dumb||s||n>0)&&a.Knowledge){var c={};return Object.keys(a).forEach(function(o){o==="Knowledge"?c[o]=function(){let l=a[o](r,i);return e.race.smart&&(l*=1-b.smart.vars()[0]/100),n>0&&(l*=1-b.smart.vars(1)[0]/100*n),e.race.dumb&&(l*=1+b.dumb.vars()[0]/100),s&&(l*=1+s/100),Math.round(l)}:c[o]=function(){return a[o](r,i)}}),c}return a}function y_(a,r,i){if(e.race.smoldering){let s={};return Object.keys(a).forEach(function(n){if(n==="Lumber"||n==="Plywood"){let c=n==="Plywood"?2:1;s.Chrysotile=function(){return Math.round(a[n](r,i)*c)||0}}else["HellArmy","Structs","Chrysotile","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe","Mana","Energy"].includes(n)?s[n]=function(){return a[n](r,i)}:s[n]=function(){return Math.round(a[n](r,i)*.9)}}),!s.hasOwnProperty("Chrysotile")&&a.hasOwnProperty("Money")&&e.tech.primitive&&e.tech.primitive>=3&&(s.Chrysotile=function(){let n=a.Money(r,i)||0;return n>0?Math.round(n/50):0}),s}return a}function b_(a,r,i){if(e.race.kindling_kindred&&(a.Lumber||a.Plywood)){var s={};let n=1+b.kindling_kindred.vars()[0]/100;return Object.keys(a).forEach(function(c){c!=="Lumber"&&c!=="Plywood"&&c!=="Structs"?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:c==="Structs"&&(s[c]=function(){return a[c](r,i)})}),s}else if(e.race.unfathomable&&e.city.captive_housing){let n=X("entish");if(n>0){var s={};let o=1-.4*n;return Object.keys(a).forEach(function(l){l==="Lumber"&&l==="Plywood"?s[l]=function(){return Math.round(a[l](r,i)*o)||0}:s[l]=function(){return a[l](r,i)}}),s}}return a}function w_(a,r,i){if(e.race.flier&&(a.Stone||a.Cement)){var s={};let n=1-b.flier.vars()[0]/100;return Object.keys(a).forEach(function(c){c==="Stone"&&!a.Cement?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:c==="Cement"?a.Stone?s.Stone=function(){return Math.round(a.Stone(r,i)*n+a[c](r,i)*1.8*n)||0}:s.Stone=function(){return Math.round(a[c](r,i)*1.75*n)}:s[c]=function(){return a[c](r,i)}}),s}return a}function k_(a,r,i){let s=X("pterodacti");if((e.race.hollow_bones||s>0)&&(a.Plywood||a.Brick||a.Wrought_Iron||a.Sheet_Metal||a.Mythril||a.Aerogel||a.Nanoweave||a.Scarletite||a.Quantium)){var n={};return Object.keys(a).forEach(function(c){c==="Plywood"||c==="Brick"||c==="Wrought_Iron"||c==="Sheet_Metal"||c==="Mythril"||c==="Aerogel"||c==="Nanoweave"||c==="Scarletite"||c==="Quantium"?n[c]=function(){let o=a[c](r,i);return e.race.hollow_bones&&(o*=1-b.hollow_bones.vars()[0]/100),s>0&&(o*=1-b.hollow_bones.vars(3)[0]/100*s),Math.round(o)}:n[c]=function(){return a[c](r,i)}}),n}return a}function sr(a){return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}function $_(a,r,i){if(e.race.heavy){var s={};return Object.keys(a).forEach(function(n){n==="Stone"||n==="Cement"||n==="Wrought_Iron"?s[n]=function(){return Math.round(a[n](r,i)*(1+b.heavy.vars()[1]/100))}:s[n]=function(){return a[n](r,i)}}),s}return a}function x_(a,r,i){if(a.Cement&&e.tech.cement&&e.tech.cement>=2){let n=e.tech.cement>=3?.8:.9;var s={};return Object.keys(a).forEach(function(c){c==="Cement"?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:s[c]=function(){return a[c](r,i)}}),s}return a}function Zt(a){switch(a){case"star":return'';case"atom":return'';case"heavy":return'';case"evil":return'';case"micro":return'';case"magic":return'';case"rocket":return'';case"heart":return'';case"clover":return'';case"candy":return'';case"ghost":return'';case"turkey":return'';case"present":return'';case"nuclear":return'';case"zombie":return'';case"fire":return'';case"mask":return'';case"skull":return'';case"taijitu":return'';case"trash":return'';case"martini":return'';case"lightbulb":return'';case"bunny":return'';case"egg":return'';case"turtle":return'';case"candycorn":return'';case"banana":return` + `)),e.settings.queuestyle&&$("#buildQueue").addClass(e.settings.queuestyle);let a=$('
          ');$("#buildQueue").append(a),a.append($(`
        • {{ item.label }}{{ item.q | count }} [{{ item.time | time }}{{ item.t_max | max_t(item.time) }}]
        • `));try{C({el:"#buildQueue",data:e.queue,methods:{remove(r){let i=V();for(let s=0;s0&&(e.queue.queue[r].q-=e.queue.queue[r].qs),e.queue.queue[r].q<=0){ie(`q${e.queue.queue[r].id}${r}`),e.queue.queue.splice(r,1),Tr();break}},setID(r){return`q${e.queue.queue[r].id}${r}`},setData(r,i){let s,n=e.queue.queue[r].id.split("-");n[0].substring(0,4)==="arpa"?s=n[0].substring(4):n[0]==="city"||n[0]==="evolution"||n[0]==="starDock"?s=q[n[0]][n[1]]:Object.keys(q[n[0]]).forEach(function(o){q[n[0]][o].hasOwnProperty(n[1])&&(s=q[n[0]][o][n[1]])});let c={};if(s.cost){let o=_t(s);Object.keys(o).forEach(function(l){let u=o[l]();u>0&&(c[`${i}-${l}`]=u)})}return c},pauseQueue(){$("#pausequeue").removeClass("play"),$("#pausequeue").removeClass("pause"),e.queue.pause?(e.queue.pause=!1,$("#pausequeue").addClass("play")):(e.queue.pause=!0,$("#pausequeue").addClass("pause"))},pausedesc(){return e.queue.pause?t("queue_play"):t("queue_pause")}},filters:{time(r){return lt(r)},count(r){return r>1?` (${r})`:""},max_t(r,i){return i===r||i<0?"":` / ${lt(r)}`},used_q(){let r=0;for(let i=0;ie.resource[a].max&&e.resource[a].max!=-1?n=e.resource[a].max:n<0&&((!s||s&&n*-1>s)&&(c=!1),n=0),Number.isNaN(n)||(e.resource[a].amount=n,i||(e.resource[a].delta+=r,a==="Mana"&&r>0&&(e.resource[a].gen_d+=r))),c}function xa(a){let r=x[e.race.species].type;switch(r){case"animal":r="animalism";break;case"small":r="dwarfism";break;case"giant":r="gigantism";break;case"avian":case"reptilian":r="eggshell";break;case"fungi":r="chitin";break;case"insectoid":r="athropods";break;case"angelic":r="celestial";break;case"organism":r="sentience";break}let i=a?[t("civics_gov_tp_name0"),t("civics_gov_tp_name1"),t("civics_gov_tp_name2"),t("civics_gov_tp_name3"),t("civics_gov_tp_name4"),t("civics_gov_tp_name5"),t("civics_gov_tp_name6"),t("civics_gov_tp_name7"),t("civics_gov_tp_name8"),t("civics_gov_tp_name9")]:[x[e.race.species].name,x[e.race.species].home,t(`biome_${e.city.biome}_name`),t(`evo_${r}_title`),t("civics_gov_name0"),t("civics_gov_name1"),t("civics_gov_name2"),t("civics_gov_name3"),t("civics_gov_name4"),t("civics_gov_name5"),t("civics_gov_name6"),t("civics_gov_name7"),t("civics_gov_name8"),t("civics_gov_name9"),t("civics_gov_name10"),t("civics_gov_name11")];return{s0:Math.rand(0,14),s1:i[Math.rand(0,i.length)]}}function O(a,r,i,s,n){n||(n="city"),e.race.universe==="micro"&&(s-=fe("micro",!1)),e.race.small?s-=b.small.vars()[0]:e.race.large&&(s+=b.large.vars()[0]),e.race.compact&&(s-=b.compact.vars()[0]),e.race.tunneler&&(a==="mine"||a==="coal_mine")&&(s-=b.tunneler.vars()[0]),e.tech.housing_reduction&&(a==="basic_housing"||a==="cottage")&&(s-=e.tech.housing_reduction*.02),e.tech.housing_reduction&&a==="captive_housing"&&(s-=e.tech.housing_reduction*.01),a==="basic_housing"&&(e.race.solitary&&(s-=b.solitary.vars()[0]),e.race.pack_mentality&&(s+=b.pack_mentality.vars()[0])),a==="cottage"&&(e.race.solitary&&(s+=b.solitary.vars()[1]),e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1])),a==="apartment"&&e.race.pack_mentality&&(s-=b.pack_mentality.vars()[1]),e.genes.creep&&!e.race.no_crispr?s-=e.genes.creep*.01:e.genes.creep&&e.race.no_crispr&&(s-=e.genes.creep*.002);let c=J("noquestions",0);c&&(s-=c),s<1.005&&(s=1.005);var o=a==="citizen"?e.resource[e.race.species].amount:e[n][a]?e[n][a].count:0;return r&&(o+=r),Math.round(s**o*i)}function m(a,r,i,s,n,c){n||(n="space"),c=c||1.005,e.race.universe==="micro"&&(s-=fe("micro",!0)),e.genes.creep&&!e.race.no_crispr?s-=e.genes.creep*.01:e.genes.creep&&e.race.no_crispr&&(s-=e.genes.creep*.002),e.race.small&&(s-=b.small.vars()[1]),e.race.compact&&(s-=b.compact.vars()[1]),e.prestige.Harmony.count>0&&e.stats.achieve.ascended&&(s-=Ei());let o=J("noquestions",0);o&&(s-=o),s0&&e.stats.achieve.ascended){let a=0;switch(e.race.universe){case"heavy":e.stats.achieve.ascended.hasOwnProperty("h")&&(a=e.stats.achieve.ascended.h*e.prestige.Harmony.count);break;case"antimatter":e.stats.achieve.ascended.hasOwnProperty("a")&&(a=e.stats.achieve.ascended.a*e.prestige.Harmony.count);break;case"evil":e.stats.achieve.ascended.hasOwnProperty("e")&&(a=e.stats.achieve.ascended.e*e.prestige.Harmony.count);break;case"micro":e.stats.achieve.ascended.hasOwnProperty("m")&&(a=e.stats.achieve.ascended.m*e.prestige.Harmony.count);break;case"magic":e.stats.achieve.ascended.hasOwnProperty("mg")&&(a=e.stats.achieve.ascended.mg*e.prestige.Harmony.count);break;default:e.stats.achieve.ascended.hasOwnProperty("l")&&(a=e.stats.achieve.ascended.l*e.prestige.Harmony.count);break}if(a>0)return a=(Math.log(50+a)-3.912023005428146)*.01,+a.toFixed(5)}return 0}function _s(a,r,i,s){if(s=typeof s>"u"?!0:s,a.cost){let n=0,c=!1,o=r&&r.id[a.id]?r.id[a.id]:!1,l=_t(a,o),u=r?{}:!1,d=r?{}:!1;r&&(Object.keys(r.r).forEach(function(f){u[f]=r.r[f]}),Object.keys(r.rr).forEach(function(f){d[f]=r.rr[f]}));let h=!1;e.interstellar.hasOwnProperty("mass_ejector")&&e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks&&Object.keys(e.race.governor.tasks).forEach(function(f){e.race.governor.tasks[f]==="trash"&&(h=!0)});let p={};return Object.keys(l).forEach(function(f){if(n>=0&&!e.prestige.hasOwnProperty(f)&&!["Morale","HellArmy","Structs","Bool"].includes(f)){var g=Number(o?l[f](o):l[f]());if(g>0){let w=f==="Species"?e.race.species:f,v=f==="Supply"?e.portal.purifier.supply:Number(e.resource[w].amount),k=f==="Supply"?e.portal.purifier.sup_max:e.resource[w].max,P=f==="Supply"?e.portal.purifier.diff:e.resource[w].diff;if(h&&e.interstellar.mass_ejector[f]&&(P+=e.interstellar.mass_ejector[f],e.race.governor.config.trash.hasOwnProperty(f)&&(P-=Math.min(e.race.governor.config.trash[f].v,e.interstellar.mass_ejector[f]))),r&&(v+=P*(s?r.t.t:r.t.rt),r.r.hasOwnProperty(w)||(r.r[w]=0),r.rr.hasOwnProperty(w)||(r.rr[w]=0),s?(v-=Number(r.r[w]),r.r[w]+=g,r.rr[w]+=g):(v-=Number(r.rr[w]),r.rr[w]+=g),k>=0&&v>k&&(v=k)),g>v)if(P>0){let j=(g-v)/P;j>n&&(c=w,n=j),p[w]=j}else r&&(r.r=u,r.rr=d),n=-9999999,p[w]=99999999-P,(p[c]&&p[w]>p[c]||!p[c])&&(c=w)}}}),r&&n>=0&&(typeof r.id[a.id]>"u"?r.id[a.id]=1:r.id[a.id]++,s&&(r.t.t+=n),r.t.rt+=n),i?{t:n,r:c,s:p}:n}else return 0}function Ji(a,r,i,s){let n=i&&i.id[a.id]?i.id[a.id]:!1,c=Ca(a.cost,n),o=0,l=i?{}:!1,u=i?{}:!1,d=!1;i&&(Object.keys(i.r).forEach(function(f){l[f]=i.r[f]}),Object.keys(i.rr).forEach(function(f){u[f]=i.rr[f]}));let h=!1;e.interstellar.hasOwnProperty("mass_ejector")&&e.genes.governor&&e.tech.governor&&e.race.governor&&e.race.governor.g&&e.race.governor.tasks&&Object.keys(e.race.governor.tasks).forEach(function(f){e.race.governor.tasks[f]==="trash"&&(h=!0)});let p={};return Object.keys(c).forEach(function(f){if(o>=0){let g=Number(c[f](n))*r;if(g>0){let w=Number(e.resource[f].amount),v=e.resource[f].diff;if(i&&(h&&e.interstellar.mass_ejector[f]&&(v+=e.interstellar.mass_ejector[f],e.race.governor.config.trash.hasOwnProperty(f)&&(v-=Math.min(e.race.governor.config.trash[f].v,e.interstellar.mass_ejector[f]))),w+=v*i.t.t,i.r[f]?(w-=Number(i.r[f]),i.r[f]+=g):i.r[f]=g,i.rr[f]?i.rr[f]+=g:i.rr[f]=g,e.resource[f].max>=0&&w>e.resource[f].max&&(w=e.resource[f].max)),g>w)if(v>0){let k=(g-w)/v;k>o&&(o=k,d=f),p[f]=k}else i&&(i.r=l,i.rr=u),o=-9999999,p[f]=99999999-v,(p[d]&&p[f]>p[d]||!p[d])&&(d=f)}}}),i&&o>=0&&(typeof i.id[a.id]>"u"?i.id[a.id]=1:i.id[a.id]++,i.t.t+=o,i.t.rt+=o),s?{t:o,r:d,s:p}:o}function A(a,r){if(a.find(".vb").each(function(){try{$(this)[0].__vue__.$destroy()}catch{}}),r){try{a[0].__vue__.$destroy()}catch{}a.remove()}else a.empty()}function C(a,r){if(r=r||"create",$(a.el).length>0&&typeof $(a.el)[0].__vue__<"u")try{r==="update"?$(a.el)[0].__vue__.$forceUpdate():$(a.el)[0].__vue__.$destroy()}catch{}r==="create"&&(new Vue(a),$(a.el).addClass("vb"))}function lt(a){let r;if(a<0)r=t("time_never");else{a=+a.toFixed(0);let i=60;if(a0?r=`${o}m ${c}s`:r=`${o}m`;else{let u=n*24,d=Math.floor(a/n)%24;if(a0?r=`${d}h ${o}m`:c>0?r=`${d}h ${c}s`:r=`${d}h`;else{let h=Math.floor(a/u);d>0?r=`${h}d ${d}h`:o>0?r=`${h}d ${o}m`:c>0?r=`${h}d ${c}s`:r=`${h}d`}}}}return r}function at(a){return e.race.universe==="antimatter"&&(a*=fe("antimatter"),a=+a.toFixed(2)),xr()==="leo"&&(a*=1+zt("leo")[0]/100,a=+a.toFixed(2)),a}function N(a){return e.race.emfield?+(a*1.5).toFixed(2):a}function __(a){if(e.tech.high_tech&&e.tech.high_tech>=11){let r=e.resource.Knowledge.max,i=25e4,s=0;for(;r>i;)r-=i,i*=1.1,s++;if(s+=+(r/i).toFixed(2),e.interstellar.citadel){let n=a?e.interstellar.citadel.on:G.citadel;e.tech.high_tech&&e.tech.high_tech>=15&&n>0&&(s*=1+n*.05)}if(e.space.ai_core2){let n=a?e.space.ai_core2.on:G.ai_core2;e.tech.titan_ai_core&&n>0&&(s*=1.25)}if(e.stats.achieve.obsolete&&e.stats.achieve.obsolete.l>=5&&e.prestige.AICore.count>0&&(s*=2-.99**e.prestige.AICore.count),e.race.linked){let n=b.linked.vars()[0]/100*e.resource[e.race.species].amount;n>b.linked.vars()[1]/100&&(n-=b.linked.vars()[1]/100,n=n/(n+200-b.linked.vars()[1]),n+=b.linked.vars()[1]/100),s*=1+n}return+s.toFixed(3)}return 0}function pa(a){return a?__(a):_i}function fe(a,r,i,s){s||(s={});let n=s.dark!==void 0?s.dark:e.prestige.Dark.count,c=s.harmony!==void 0?s.harmony:e.prestige.Harmony.count,o=s.sludge!==void 0?s.sludge:e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[ue(a)]?e.stats.achieve.extinct_sludge[ue(a)]:0;switch(a){case"standard":return e.race.universe==="standard"||i?(c>0&&(n*=1+c*.001),o&&(n*=1+o*.03),1+n/200):0;case"evil":return e.race.universe==="evil"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log2(10+n)-3.321928094887362)/5):1;case"micro":return e.race.universe==="micro"||i?r?(c>0&&(n*=1+c*.01),n=.01+(Math.log(100+n)-4.605170185988092)/35,o&&(n*=1+o*.03),n>.04&&(n=.04),+n.toFixed(5)):(c>0&&(n*=1+c*.01),n=.02+(Math.log(100+n)-4.605170185988092)/20,o&&(n*=1+o*.03),n>.06&&(n=.06),+n.toFixed(5)):0;case"heavy":return e.race.universe==="heavy"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),.995**n):1;case"antimatter":return e.race.universe==="antimatter"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log(50+n)-3.912023005428146)/5):0;case"magic":return e.race.universe==="magic"||i?(c>0&&(n*=1+c*.01),o&&(n*=1+o*.03),1+(Math.log(50+n)-3.912023005428146)/3):0}return 0}var mt=function(){var a;return function(r){return a&&!r?a:e.genes.challenge&&e.genes.challenge>=2?(a=Hn(e.race.universe),a):0}}();function Hn(a,r,i){if(e.genes.challenge&&e.genes.challenge>=2){a=a||e.race.universe;let s=Vn(a),n=a==="standard"?.25:.15,c=e.genes.challenge>=3?.15:.1;e.genes.challenge>=4&&a!=="standard"&&(n+=.05,c-=.05);let o=e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0?Math.min(e.stats.achieve.corrupted.l,e.stats.feat.grandmaster):0;o>0&&(n*=1+o/100,c*=1+o/100),i||(e.race.weak_mastery&&a==="antimatter"&&(n/=10,c/=10),e.race.nerfed&&(n/=a==="antimatter"?5:2,c/=a==="antimatter"?5:2),e.race.ooze&&(n*=1-b.ooze.vars()[2]/100,c*=1-b.ooze.vars()[2]/100),e.genes.challenge>=5&&e.race.hasOwnProperty("mastery")&&(n*=1+b.mastery.vars()[0]*e.race.mastery/100,c*=1+b.mastery.vars()[0]*e.race.mastery/100));let l=s.aLvl*n,u=0;return a!=="standard"&&(u=s.uLvl*c),r?{g:l,u,m:l+u}:l+u}return r?{g:0,u:0,m:0}:0}var na=function(){var a;return function(r){if(!a||r){let i=0;Object.keys(e.pillars).forEach(function(s){x[s]&&e.race.species===s?i+=4:x[s]&&i++}),a=[1+i/100,1+i*2/100]}return a}}();function ur(a,r,i,s){i=i||0,s=s||{};let n=s.genes;n===void 0&&(n=dt()-1,n>4&&(n=4));let c=s.uni||e.race.universe;if(c==="micro"&&(a=a*.25),c==="antimatter"&&(a=a*1.1),c==="heavy"&&r!=="mad")switch(n){case 1:a=a*1.1;break;case 2:a=a*1.15;break;case 3:a=a*1.2;break;case 4:a=a*1.25;break;default:a=a*1.05;break}switch((s.tp!==void 0?s.tp:e.race.truepath)&&(a=a*1.1),n){case 1:return+(a*1.05).toFixed(i);case 2:return+(a*1.12).toFixed(i);case 3:return+(a*1.25).toFixed(i);case 4:return+(a*1.45).toFixed(i);default:return+a.toFixed(i)}}function _r(a,r){r||(r={});let i={pop_divisor:999,k_inc:1e6,k_mult:100,phage_mult:0,plasmid_cap:150};switch(a){case"mad":i.pop_divisor=3,i.k_inc=1e5,i.k_mult=1.1,i.plasmid_cap=150,r.synth&&(i.pop_divisor=5,i.k_inc=125e3,i.plasmid_cap=100);break;case"cataclysm":case"bioseed":i.pop_divisor=3,i.k_inc=5e4,i.k_mult=1.015,i.phage_mult=1,i.plasmid_cap=400;break;case"ai":i.pop_divisor=2.5,i.k_inc=45e3,i.k_mult=1.014,i.phage_mult=2,i.plasmid_cap=600;break;case"vacuum":case"bigbang":i.pop_divisor=2.2,i.k_inc=4e4,i.k_mult=1.012,i.phage_mult=2.5,i.plasmid_cap=800;break;case"ascend":case"terraform":i.pop_divisor=1.15,i.k_inc=3e4,i.k_mult=1.008,i.phage_mult=4,i.plasmid_cap=2e3;break;case"matrix":i.pop_divisor=1.5,i.k_inc=32e3,i.k_mult=1.01,i.phage_mult=3.2,i.plasmid_cap=1800;break;case"retired":i.pop_divisor=1.15,i.k_inc=32e3,i.k_mult=1.006,i.phage_mult=3.2,i.plasmid_cap=1800;break;case"eden":i.pop_divisor=1,i.k_inc=18e3,i.k_mult=1.004,i.phage_mult=2.5,i.plasmid_cap=1800;break;default:i.unknown=!0;break}return i}function ke(a,r){let i={plasmid:0,phage:0,dark:0,harmony:0,artifact:0,cores:0};r||(r={}),r.synth!==void 0&&(r.synth=x[e.race.species].type==="synthetic");let s=r.genes,n=r.uni;n=n||e.race.universe;let c=0;if(r.cit===void 0){let f=e.civic.hasOwnProperty("garrison")?e.civic.garrison.workers:0;for(let g=0;g<3;g++)e.civic.foreign[`gov${g}`].occ&&(f+=F(e.civic.govern.type==="federation"?15:20));e.race.high_pop?c=Math.round(e.resource[e.race.species].amount/b.high_pop.vars()[0])+Math.round(f/b.high_pop.vars()[0]):c=e.resource[e.race.species].amount+f}else r.high_pop?c=Math.round(r.cit/b.high_pop.vars(r.high_pop)[0])+Math.round(r.sol/b.high_pop.vars(r.high_pop)[0]):c=r.cit+r.sol;let o=_r(a,r),l=o.pop_divisor,u=o.k_inc,d=o.k_mult,h=o.phage_mult,p=o.plasmid_cap;if(s!==void 0?p=Math.floor(p*(1+(s+(r.tp?1:0))/8)):p=Math.floor(p*(1+(dt()-(e.race.truepath?0:1))/8)),r.plas===void 0){let f=r.know!==void 0?r.know:e.stats.know,g=Math.round(c/l);for(;f>u;)g++,f-=u,u*=d;if(e.race.cataclysm?g+=300:e.race.lone_survivor&&(g+=800),i.plasmid=ur(g,a,!1,r),!r.rawPlasmids&&i.plasmid>p){let w=i.plasmid-p;i.plasmid=p,w=Math.floor(w/(w+p)*p),i.plasmid+=w}}else i.plasmid=r.plas;if(i.phage=i.plasmid>0?ur(Math.floor(Math.log2(i.plasmid)*Math.E*h),a,!1,r):0,a==="bigbang"){let f=r.exotic,g=r.mass;f===void 0&&e.interstellar&&e.interstellar.stellar_engine&&(f=e.interstellar.stellar_engine.exotic,g=e.interstellar.stellar_engine.mass);let w=+Math.log(1+f*40).toFixed(3);w+=+(Math.log2(g-7)/2.5).toFixed(3),w=ur(w,"bigbang",3,r),i.dark=w}else if(a==="vacuum"){let f=r.mana!==void 0?r.mana:e.resource.Mana.gen,g=+(Math.log2(f)/5).toFixed(3);g=ur(g,"vacuum",3,r),i.dark=g}if(["ascend","descend","terraform"].includes(a)){let f=1;if(s===void 0?(f=dt(),f>5&&(f=5)):f=s+1,a==="ascend"||a==="terraform"){switch(n){case"micro":f*=.25;break;case"heavy":f*=1.2;break;case"antimatter":f*=1.1;break;default:break}i.harmony=parseFloat(f.toFixed(2))}else if(a==="descend"){let g=n==="micro"?1:f,w=r.floor;w!==void 0?w++:w=e.portal.hasOwnProperty("spire")?e.portal.spire.count:0,[50,100].forEach(function(v){w>v&&g++}),i.artifact=g}}return a==="ai"&&(i.cores=n==="micro"?2:5),i}function _t(a,r,i){let s=a.cost||{};if((s.RNA||s.DNA)&&e.genes.evolve){var n={};return Object.keys(s).forEach(function(c){(c==="RNA"||c==="DNA")&&(n[c]=function(){return Math.round(s[c](r,i)*.8)})}),n}return s=d_(s,r,i),s=h_(s,a,r,i),s=p_(s,r,i),s=m_(s,r,i),s=g_(s,r,i),s=w_(s,r,i),s=b_(s,r,i),s=y_(s,r,i),s=v_(s,r,i),s=x_(s,r,i),s=f_(s,r,i),s=$_(s,r,i),k_(s,r,i)}function d_(a,r,i){if(e.race.bloated){let n=1+b.bloated.vars()[0]/100;var s={};return Object.keys(a).forEach(function(c){["Food","Lumber","Stone","Furs","Copper","Iron","Aluminium","Cement","Coal","Steel","Titanium","Alloy","Polymer","Iridium"].includes(c)?s[c]=function(){return a[c](r,i)*n}:s[c]=function(){return a[c](r,i)}}),s}return a}function p_(a,r,i){if(e.race.lone_survivor){var s={};return Object.keys(a).forEach(function(n){["Structs","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(n)?s[n]=function(){return a[n](r,i)}:["Knowledge"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.5)}:["Money"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.22)}:["Plywood","Brick","Wrought_Iron","Sheet_Metal","Mythril","Quantium"].includes(n)?s[n]=function(){return Math.round(a[n](r,i)*.14)}:s[n]=function(){return Math.round(a[n](r,i)*.28)}}),s}return a}function h_(a,r,i,s){if((s?s.truepath:e.race.truepath)&&(!r.hasOwnProperty("path")||!r.path.includes("truepath"))){var n={};return Object.keys(a).forEach(function(c){c==="Money"?n[c]=function(){return Math.round(a[c](i,s)*3)}:["Structs","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe"].includes(c)?n[c]=function(){return a[c](i,s)}:n[c]=function(){return Math.round(a[c](i,s)*2)}}),n}return a}function m_(a,r,i){if(e.race.inflation){var s={};return Object.keys(a).forEach(function(n){if(n==="Money"){let c=1+e.race.inflation/75;s[n]=function(){return Math.round(a[n](r,i)*c)}}else s[n]=function(){return a[n](r,i)}}),s}return a}function f_(a,r,i){let s=J("extravagant",0);if(s){var n={};return Object.keys(a).forEach(function(c){if(c==="Money"){let o=1+s/100;n[c]=function(){return Math.round(a[c](r,i)*o)}}else n[c]=function(){return a[c](r,i)}}),n}return a}function g_(a,r,i){if(e.civic.govern.type==="technocracy"){let n=1+Ee.technocracy()[1]/100;var s={};return Object.keys(a).forEach(function(c){if(c==="Knowledge"){let o=1-Ee.technocracy()[0]/100;s[c]=function(){return Math.round(a[c](r,i)*o)}}else c==="Money"||c==="Structs"||c==="Custom"?s[c]=function(){return a[c](r,i)}:s[c]=function(){return Math.round(a[c](r,i)*n)}}),s}return a}function v_(a,r,i){let s=J("pragmatist",1),n=X("gnome");if((e.race.smart||e.race.dumb||s||n>0)&&a.Knowledge){var c={};return Object.keys(a).forEach(function(o){o==="Knowledge"?c[o]=function(){let l=a[o](r,i);return e.race.smart&&(l*=1-b.smart.vars()[0]/100),n>0&&(l*=1-b.smart.vars(1)[0]/100*n),e.race.dumb&&(l*=1+b.dumb.vars()[0]/100),s&&(l*=1+s/100),Math.round(l)}:c[o]=function(){return a[o](r,i)}}),c}return a}function y_(a,r,i){if(e.race.smoldering){let s={};return Object.keys(a).forEach(function(n){if(n==="Lumber"||n==="Plywood"){let c=n==="Plywood"?2:1;s.Chrysotile=function(){return Math.round(a[n](r,i)*c)||0}}else["HellArmy","Structs","Chrysotile","Knowledge","Custom","Soul_Gem","Plasmid","Phage","Dark","Harmony","Blood_Stone","Artifact","Corrupt_Gem","Codex","Demonic_Essence","Horseshoe","Mana","Energy"].includes(n)?s[n]=function(){return a[n](r,i)}:s[n]=function(){return Math.round(a[n](r,i)*.9)}}),!s.hasOwnProperty("Chrysotile")&&a.hasOwnProperty("Money")&&e.tech.primitive&&e.tech.primitive>=3&&(s.Chrysotile=function(){let n=a.Money(r,i)||0;return n>0?Math.round(n/50):0}),s}return a}function b_(a,r,i){if(e.race.kindling_kindred&&(a.Lumber||a.Plywood)){var s={};let n=1+b.kindling_kindred.vars()[0]/100;return Object.keys(a).forEach(function(c){c!=="Lumber"&&c!=="Plywood"&&c!=="Structs"?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:c==="Structs"&&(s[c]=function(){return a[c](r,i)})}),s}else if(e.race.unfathomable&&e.city.captive_housing){let n=X("entish");if(n>0){var s={};let o=1-.4*n;return Object.keys(a).forEach(function(l){l==="Lumber"&&l==="Plywood"?s[l]=function(){return Math.round(a[l](r,i)*o)||0}:s[l]=function(){return a[l](r,i)}}),s}}return a}function w_(a,r,i){if(e.race.flier&&(a.Stone||a.Cement)){var s={};let n=1-b.flier.vars()[0]/100;return Object.keys(a).forEach(function(c){c==="Stone"&&!a.Cement?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:c==="Cement"?a.Stone?s.Stone=function(){return Math.round(a.Stone(r,i)*n+a[c](r,i)*1.8*n)||0}:s.Stone=function(){return Math.round(a[c](r,i)*1.75*n)}:s[c]=function(){return a[c](r,i)}}),s}return a}function k_(a,r,i){let s=X("pterodacti");if((e.race.hollow_bones||s>0)&&(a.Plywood||a.Brick||a.Wrought_Iron||a.Sheet_Metal||a.Mythril||a.Aerogel||a.Nanoweave||a.Scarletite||a.Quantium)){var n={};return Object.keys(a).forEach(function(c){c==="Plywood"||c==="Brick"||c==="Wrought_Iron"||c==="Sheet_Metal"||c==="Mythril"||c==="Aerogel"||c==="Nanoweave"||c==="Scarletite"||c==="Quantium"?n[c]=function(){let o=a[c](r,i);return e.race.hollow_bones&&(o*=1-b.hollow_bones.vars()[0]/100),s>0&&(o*=1-b.hollow_bones.vars(3)[0]/100*s),Math.round(o)}:n[c]=function(){return a[c](r,i)}}),n}return a}function sr(a){return e.race.high_pop&&(a*=b.high_pop.vars()[0]),a}function $_(a,r,i){if(e.race.heavy){var s={};return Object.keys(a).forEach(function(n){n==="Stone"||n==="Cement"||n==="Wrought_Iron"?s[n]=function(){return Math.round(a[n](r,i)*(1+b.heavy.vars()[1]/100))}:s[n]=function(){return a[n](r,i)}}),s}return a}function x_(a,r,i){if(a.Cement&&e.tech.cement&&e.tech.cement>=2){let n=e.tech.cement>=3?.8:.9;var s={};return Object.keys(a).forEach(function(c){c==="Cement"?s[c]=function(){return Math.round(a[c](r,i)*n)||0}:s[c]=function(){return a[c](r,i)}}),s}return a}function Zt(a){switch(a){case"star":return'';case"atom":return'';case"heavy":return'';case"evil":return'';case"micro":return'';case"magic":return'';case"rocket":return'';case"heart":return'';case"clover":return'';case"candy":return'';case"ghost":return'';case"turkey":return'';case"present":return'';case"nuclear":return'';case"zombie":return'';case"fire":return'';case"mask":return'';case"skull":return'';case"taijitu":return'';case"trash":return'';case"martini":return'';case"lightbulb":return'';case"bunny":return'';case"egg":return'';case"turtle":return'';case"candycorn":return'';case"banana":return` `;case"sun":return'';case"firework":return'';case"floppy":return'';case"slime":return'';case"lightning":return` - `;case"meat":return''}}function Xt(a){switch(a){case"star":return"0 0 640 640";case"atom":return"0 0 100 88.379";case"heavy":return"0 0 24 24";case"evil":return"0 0 240 240";case"micro":return"0 0 276 276";case"magic":return"0 0 2666 2666";case"rocket":return"0 0 165 173";case"sun":return"0 0 48 48";case"heart":return"0 0 20 16";case"clover":return"0 0 660.51 780.1";case"candy":return"0 0 200 200";case"ghost":return"0 0 399 432.23";case"turkey":return"0 0 250 300";case"present":return"0 0 410.98 434.75";case"nuclear":return"0 0 101.22 101.22";case"zombie":return"0 0 175 304";case"fire":return"0 0 615.18 879.36";case"mask":return"0 0 24 24";case"skull":return"0 0 256.27 300.86";case"taijitu":return"0 -10 256 256 ";case"pizza":return"0 0 217.444 144.397";case"trash":return"0 0 15 15";case"party":return"0 0 528.69 983.1";case"martini":return"0 0 15 15";case"lightbulb":return"0 0 100 156";case"bunny":return"0 0 128 128";case"egg":return"0 0 273.61 295.02";case"ant":return"0 0 128 128";case"turtle":return"20 40 270 50";case"candycorn":return"0 0 325 449.98";case"banana":return"0 0 113.38582 111.81719";case"firework":return"0 10 12 35";case"floppy":return"0 0 60 60";case"slime":return"0 0 552 495";case"lightning":return"0 0 16 16";case"meat":return"0 0 200 200"}}function Mr(a,r){if(r==="feat")switch(a){case"steelem":return"nuclear";case"the_misery":return"zombie";case"ill_advised":return"fire";case"garbage_pie":return"trash";case"demon_slayer":return"skull";case"equilibrium":return"taijitu";case"utopia":return"martini";case"energetic":return"lightbulb";case"finish_line":return"turtle";case"banana":return"banana";case"digital_ascension":return"floppy";case"slime_lord":return"slime";case"annihilation":return"lightning";case"friday":return"mask";case"valentine":return"heart";case"leprechaun":return"clover";case"easter":return"bunny";case"launch_day":return"rocket";case"solstice":return"sun";case"firework":return"firework";case"egghunt":return"egg";case"halloween":return"ghost";case"trickortreat":return"candy";case"thanksgiving":return"turkey";case"xmas":return"present";case"immortal":return"meat";default:return"star"}return e.settings.icon}function fn(a,r,i,s,n){let c="";return s&&(c=`id="${s}" `),n=n||"",`${Zt(a)}`}function Ze(a,r){let i=ri(),s=new Date;return i.active&&!e.special.egg[s.getFullYear()][`egg${a}`]?fn("egg",r||16,2,`egg${a}`,'role="button" aria-label="Egg" '):""}function pt(a,r,i){let s=oa(),c=new Date().getFullYear(),o=i?"trick":"treat";if(s.active&&!e.special.trick[c][`${o}${a}`]){let l=i?"Ghost":"Candy Corn";return fn(i?"ghost":"candycorn",r||16,2,`${o}${a}`,`role="button" aria-label="${l}" `)}return""}function ga(a,r,i,s,n,c){return e.stats.achieve[a]&&(n?e.stats.achieve[a][c]-1:e.stats.achieve[a][c])>0?`

          ${Zt(i)}${ii(e.stats.achieve[a][c])} ${s}

          `:""}function Ne(a,r,i,s,n){r||(r=10),i||(i=Mr(a,"achievement"));let c="";if(!n)c=c+ga(a,r,i,t(e.settings.icon),s,"l"),c=c+ga(a,r,"atom",t("universe_antimatter"),s,"a"),c=c+ga(a,r,"evil",t("universe_evil"),s,"e"),c=c+ga(a,r,"heavy",t("universe_heavy"),s,"h"),c=c+ga(a,r,"micro",t("universe_micro"),s,"m"),c=c+ga(a,r,"magic",t("universe_magic"),s,"mg");else switch(n){case"standard":c=c+ga(a,r,i,t(e.settings.icon),s,"l");break;case"antimatter":c=c+ga(a,r,"atom",t("universe_antimatter"),s,"a");break;case"evil":c=c+ga(a,r,"evil",t("universe_evil"),s,"e");break;case"heavy":c=c+ga(a,r,"heavy",t("universe_heavy"),s,"h");break;case"micro":c=c+ga(a,r,"micro",t("universe_micro"),s,"m");break;case"magic":c=c+ga(a,r,"magic",t("universe_magic"),s,"mg");break}return c}function Ka(a,r){return r=r||{},r[a]?r[a]:a<=1?1:r[a]=Ka(a-1,r)+Ka(a-2,r)}function Si(a){var r=Object.keys(a);return r[r.length*Math.random()<<0]}function ii(a){switch(a){case 1:return t("basic");case 2:return t("plain");case 3:return t("bronze");case 4:return t("silver");case 5:return t("gold");default:return""}}function Ia(a,r){let i=0;if(r)Object.keys(r.ascended).forEach(function(c){i+=r.ascended[c]});else if(e.stats.achieve.ascended)for(let c=0;c=1&&(s+=e.stats.achieve.technophobe.l);let n=0;for(let c=0;c=0&&(n>s&&(o-=s-n),n++),i-=o}return i}function _a(){e.stats.reset++,e.stats.tdays+=e.stats.days,e.stats.days=0,e.stats.tknow+=e.stats.know,e.stats.know=0,e.stats.tstarved+=e.stats.starved,e.stats.starved=0,e.stats.tdied+=e.stats.died,e.stats.died=0,e.stats.tsac+=e.stats.sac,e.stats.sac=0,e.stats.tcattle+=e.stats.cattle,e.stats.cattle=0,e.stats.tmurders+=e.stats.murders,e.stats.murders=0,e.stats.tpsykill+=e.stats.psykill,e.stats.psykill=0}function Be(a){if(a===null||typeof a!="object")return a;if(a instanceof Date)return new Date(a.getTime());if(Array.isArray(a)){var r=[];return a.forEach(function(n){r.push(Be(n))}),r}let i=new a.constructor;for(var s in a)a.hasOwnProperty(s)&&(i[s]=Be(a[s]));return i}function We(a,r,i){switch(a){case"reverse":{let s=r.toLowerCase().split("").reverse().join("");return s.charAt(0).toUpperCase()+s.slice(1)}case"name":return xe("fool",2021)?We("reverse",x[e.race.species].name):x[e.race.species].name;case"curve":{let s=i||1.5;return 1-(1-r)**s}}return!1}function xe(a,r){switch(a){case"easter":return ri();case"halloween":return oa();case"fool":{let i=new Date;return!e.settings.boring&&i.getMonth()===3&&i.getDate()===1?r?i.getFullYear()===r:!0:!1}case"launch_day":{let i=new Date;return!e.settings.boring&&i.getMonth()===4&&i.getDate()===6}case"summer":{let i=new Date;return!e.settings.boring&&i.getMonth()===5&&[20,21,22].includes(i.getDate())?(e.city.hasOwnProperty("foundry")&&!e.city.foundry.hasOwnProperty("Thermite")&&(e.city.foundry.Thermite=0),e.resource.hasOwnProperty("Thermite")||(e.resource.Thermite={name:t("resource_Thermite_name"),display:!1,value:0,amount:0,crates:0,diff:0,delta:0,max:-1,rate:0}),!0):(e.city.hasOwnProperty("foundry")&&e.city.foundry.hasOwnProperty("Thermite")&&(e.city.foundry.crafting-=e.city.foundry.Thermite,e.civic.craftsman.workers-=e.city.foundry.Thermite,e.civic[e.civic.d_job].workers+=e.city.foundry.Thermite,delete e.city.foundry.Thermite),!1)}case"firework":{let i=new Date;if(!e.settings.boring&&i.getMonth()===6&&[1,2,3,4].includes(i.getDate())){let s=e.race.cataclysm||e.race.orbit_decayed?"space":"city";return e[s].hasOwnProperty("firework")||(e[s].firework={count:0,on:0}),!0}else(e.city.hasOwnProperty("firework")||e.space.hasOwnProperty("firework"))&&(delete e.city.firework,delete e.space.firework);return!1}}return!1}function ri(){let a=new Date,r=a.getFullYear();e.special.egg.hasOwnProperty(r)||(e.special.egg[r]={egg1:!1,egg2:!1,egg3:!1,egg4:!1,egg5:!1,egg6:!1,egg7:!1,egg8:!1,egg9:!1,egg10:!1,egg11:!1,egg12:!1}),e.special.egg.hasOwnProperty(r)&&!e.special.egg[r].hasOwnProperty("egg13")&&(e.special.egg[r].egg13=!1,e.special.egg[r].egg14=!1,e.special.egg[r].egg15=!1),e.special.egg.hasOwnProperty(r)&&!e.special.egg[r].hasOwnProperty("egg16")&&(e.special.egg[r].egg16=!1,e.special.egg[r].egg17=!1,e.special.egg[r].egg18=!1);let i=Math.floor,s=r%19,n=i(r/100),c=(n-i(n/4)-i((8*n+13)/25)+19*s+15)%30,o=c-i(c/28)*(1-i(29/(c+1))*i((21-s)/11)),l=(r+i(r/4)+o+2-n+i(n/4))%7,u=o-l,d=3+i((u+40)/44),h=u+28-31*i(d/4),p={date:[d-1,h],active:!1,endDate:[d-1,h],hint:!1,hintDate:[d-1,h],solve:!1,solveDate:[d-1,h]};if(e.settings.boring)return p;p.endDate[1]+=10,(p.endDate[0]===2&&p.endDate[1]>31||p.endDate[0]===3&&p.endDate[1]>30)&&(p.endDate[1]-=p.endDate[0]===2?31:30,p.endDate[0]++),p.hintDate[1]+=1,(p.hintDate[0]===2&&p.hintDate[1]>31||p.hintDate[0]===3&&p.hintDate[1]>30)&&(p.hintDate[1]-=p.hintDate[0]===2?31:30,p.hintDate[0]++),p.solveDate[1]+=3,(p.solveDate[0]===2&&p.solveDate[1]>31||p.solveDate[0]===3&&p.solveDate[1]>30)&&(p.solveDate[1]-=p.solveDate[0]===2?31:30,p.solveDate[0]++);let f=a.getDate(),g=a.getMonth(),w=g>p.date[0]||g===p.date[0]&&f>=p.date[1],v=g=p.hintDate[0]&&f>=p.hintDate[1]&&g<=p.endDate[0]&&f<=p.endDate[1]&&(p.hint=!0),g>=p.solveDate[0]&&f>=p.solveDate[1]&&g<=p.endDate[0]&&f<=p.endDate[1]&&(p.solve=!0)),p}function oa(){let a=new Date,r=a.getFullYear();e.special.trick.hasOwnProperty(r)||(e.special.trick[r]={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,treat1:!1,treat2:!1,treat3:!1,treat4:!1,treat5:!1,treat6:!1,treat7:!1});let i={date:[9,28],active:!1,endDate:[10,4],hint:!1,hintDate:[9,29],solve:!1,solveDate:[9,31]};if(e.settings.boring)return i;let s=new Date(`${i.date[0]+1}/${i.date[1]}/${r}`),n=new Date(`${i.endDate[0]+1}/${i.endDate[1]}/${r}`);if(a>=s&&a<=n){i.active=!0;let c=new Date(`${i.hintDate[0]+1}/${i.hintDate[1]}/${r}`);a>=c&&a<=n&&(i.hint=!0);let o=new Date(`${i.solveDate[0]+1}/${i.solveDate[1]}/${r}`);a>=o&&a<=n&&(i.solve=!0)}return i}function Kn(){return e.race.magnificent&&e.city.hasOwnProperty("shrine")&&e.city.shrine.count>0}function Yr(a){let r={mult:1,add:0};if(Kn())switch(a){case"metal":r.mult+=+(e.city.shrine.metal/100*b.magnificent.vars()[3]);break;case"tax":r.mult+=+(e.city.shrine.tax/100*b.magnificent.vars()[2]);break;case"know":r.add+=+(e.city.shrine.know*b.magnificent.vars()[0]),r.mult+=+(e.city.shrine.know*b.magnificent.vars()[1]/100);break;case"morale":r.add+=e.city.shrine.morale*b.magnificent.vars()[4];break;default:break}return r}var Fo={promiscuous:!1,revive:!1,fast_growth:!1,spores:!1,terrifying:!1,fibroblast:!0,hivemind:!0,imitation:!0,elusive:!0,chameleon:!0,blood_thirst:!0,selenophobia:!0,hooved:!0,anthropophagite:!0,unfathomable:!1,darkness:!1,living_tool:!1};function zo(a,r){let i=b[a].hasOwnProperty("vars")?b[a].vars(r):[];return Fo.hasOwnProperty(a)&&(a==="fibroblast"?i=[i[0]*5]:a==="hivemind"&&e.race.high_pop?i=[i[0]*b.high_pop.vars()[0]]:a==="imitation"?i.push(x[e.race.srace||"protoplasm"].name):a==="elusive"?i=[Math.round((1/30/(1/(30+i[0]))-1)*100)]:a==="chameleon"?i=[i[0],Math.round((1/30/(1/(30+i[1]))-1)*100)]:a==="blood_thirst"?i=[Math.ceil(Math.log2(i[0]))]:a==="selenophobia"?i=[14-i[0],i[0]]:a==="hooved"?i.unshift(xt()):a==="anthropophagite"?i=[i[0]*1e4]:Fo[a]||(i=[])),i}function xt(a){return e.race.sludge?a?"craft":t("resource_Beaker_name"):e.race.species==="cath"?a?"craft":t("resource_Box_name"):e.race.species==="wolven"?a?"craft":t("resource_ChewToy_name"):e.race.species==="dracnid"?a?"craft":t("resource_Hoard_name"):e.race.species==="seraph"?a?"forge":t("resource_Halo_name"):e.race.species==="cyclops"?a?"craft":t("resource_Monocle_name"):e.race.species==="kobold"?a?"craft":t("resource_Candle_name"):e.race.species==="tuskin"?a?"craft":t("resource_Goggles_name"):e.race.species==="sharkin"?a?"craft":t("resource_ToothSharpener_name"):x[e.race.species].type==="humanoid"?a?"craft":t("resource_Sandals_name"):x[e.race.species].type==="avian"?a?"craft":t("resource_Perch_name"):x[e.race.species].type==="plant"?a?"craft":t("resource_Planter_name"):x[e.race.species].type==="fungi"?a?"craft":t("resource_DampCloth_name"):x[e.race.species].type==="reptilian"?a?"craft":t("resource_HeatRock_name"):x[e.race.species].type==="fey"?a?"craft":t("resource_PixieDust_name"):x[e.race.species].type==="synthetic"?a?"craft":t("resource_Battery_name"):a?"forge":t("resource_Horseshoe_name")}var Ao={infiltrator:[t("wiki_trait_effect_infiltrator_ex1"),t("wiki_trait_effect_infiltrator_ex2",[[`${t("tech_steel")}`,`${t("tech_electricity")}`,`${t("tech_electronics")}`,`${t("tech_fission")}`,`${t("tech_rocketry")}`,`${t("tech_artificial_intelligence")}`,`${t("tech_quantum_computing")}`,`${t("tech_virtual_reality")}`,`${t("tech_shields")}`,`${t("tech_ai_core")}`,`${t("tech_graphene_processing")}`,`${t("tech_nanoweave")}`,`${t("tech_orichalcum_analysis")}`,`${t("tech_infernium_fuel")}`].join(", ")])],heavy:[t("wiki_trait_effect_heavy_ex1",[Rn("Stone"),Rn("Cement"),Rn("Wrought_Iron")])],sniper:[t("wiki_trait_effect_sniper_ex1")],hooved:[t("wiki_trait_effect_hooved_ex1",[xt(!1)]),t("wiki_trait_effect_hooved_ex2",[`${e.resource.hasOwnProperty("Lumber")?e.resource.Lumber.name:t("resource_Lumber_name")}`,`${e.resource.hasOwnProperty("Copper")?e.resource.Copper.name:t("resource_Copper_name")}`,`${e.resource.hasOwnProperty("Iron")?e.resource.Iron.name:t("resource_Iron_name")}`,`${e.resource.hasOwnProperty("Steel")?e.resource.Steel.name:t("resource_Steel_name")}`,`${e.resource.hasOwnProperty("Adamantite")?e.resource.Adamantite.name:t("resource_Adamantite_name")}`,`${e.resource.hasOwnProperty("Orichalcum")?e.resource.Orichalcum.name:t("resource_Orichalcum_name")}`,12,75,150,500,5e3]),t("wiki_trait_effect_hooved_ex3"),t("wiki_trait_effect_hooved_ex4",['5',xt(!1)]),t("wiki_trait_effect_hooved_ex5",[`${e.resource.hasOwnProperty("Lumber")?e.resource.Lumber.name:t("resource_Lumber_name")}`,`${e.resource.hasOwnProperty("Copper")?e.resource.Copper.name:t("resource_Copper_name")}`])],instinct:[t("wiki_trait_effect_instinct_ex1",[6.67,t("galaxy_chthonian"),10])],logical:[t("wiki_trait_effect_logical_ex1",[e.tech.hasOwnProperty("science")?e.tech.science:0,e.tech.hasOwnProperty("high_tech")?e.tech.high_tech:0])],high_pop:[t("wiki_trait_effect_high_pop_ex1")],flier:[t("wiki_trait_effect_flier_ex1")],unfathomable:[t("wiki_trait_effect_unfathomable_ex1"),t("wiki_trait_effect_unfathomable_ex2")]};function Rn(a){return`${e.hasOwnProperty("resource")&&e.resource.hasOwnProperty(a)?e.resource[a].name:t(`resource_${a}_name`)}`}function Ma(a,r,i){let s=i.fanatic||!1,n=i.tpage||!1,c=i.trank||!1,o=i.wiki||!1,l="",u=Tt("name",r),d=Tt("desc",r);n&&["genus","major"].includes(b[r].type)&&(l=`«${t("wiki_trait_rank")} {{ rank }}»`),o&&a.append(`

          ${u}

          ${l}
          `),o&&(n&&b[r].hasOwnProperty("val")?a.append(`
          ${t(`wiki_trait_${b[r].type}`)}${t("wiki_trait_value",[b[r].val])}
          `):a.append(`
          ${t(`wiki_trait_${b[r].type}`)}
          `)),s&&o&&a.append(`
          ${t("wiki_trait_fanaticism",[s])}
          `),a.append(`
          ${d}
          `);let h="warning";if(b[r].hasOwnProperty("val")&&(h=b[r].val>=0?"success":"danger"),n&&["genus","major"].includes(b[r].type)?a.append(`
          `):(o||e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0)&&a.append(`
          ${t(`wiki_trait_effect_${r}`,zo(r,c))}
          `),Ao[r]&&o&&Ao[r].forEach(function(p){a.append(`
          ${p}
          `)}),n&&["genus","major"].includes(b[r].type)){let p={rank:e.race[r]||1};C({el:`#${b[r].type}_${r}`,data:p,methods:{getTraitDesc(f){return t(`wiki_trait_effect_${r}`,zo(r,f))},up(){switch(p.rank){case .25:p.rank=.5;break;case .5:p.rank=1;break;case 1:p.rank=2;break;case 2:p.rank=3;break;case 3:p.rank=3;break}},down(){switch(p.rank){case .25:p.rank=.25;break;case .5:p.rank=.25;break;case 1:p.rank=.5;break;case 2:p.rank=1;break;case 3:p.rank=2;break}}}})}}var Eo={misc:["apocalypse","ascended","dreaded","anarchist","second_evolution","blackhole","warmonger","red_tactics","pacifist","neutralized","paradise","scrooge","madagascar_tree","godwin","laser_shark","infested","mass_starvation","colonist","world_domination","illuminati","syndicate","cult_of_personality","doomed","pandemonium","blood_war","landfill","seeder","miners_dream","shaken","blacken_the_sun","trade","resonance","enlightenment","gladiator","corrupted","red_dead"],species:["mass_extinction","extinct_human","extinct_elven","extinct_orc","extinct_cath","extinct_wolven","extinct_vulpine","extinct_centaur","extinct_rhinotaur","extinct_capybara","extinct_kobold","extinct_goblin","extinct_gnome","extinct_ogre","extinct_cyclops","extinct_troll","extinct_tortoisan","extinct_gecko","extinct_slitheryn","extinct_arraak","extinct_pterodacti","extinct_dracnid","extinct_entish","extinct_cacti","extinct_pinguicula","extinct_sporgar","extinct_shroomi","extinct_moldling","extinct_mantis","extinct_scorpid","extinct_antid","extinct_sharkin","extinct_octigoran","extinct_dryad","extinct_satyr","extinct_phoenix","extinct_salamander","extinct_yeti","extinct_wendigo","extinct_tuskin","extinct_kamel","extinct_balorg","extinct_imp","extinct_seraph","extinct_unicorn","extinct_synth","extinct_nano","extinct_ghast","extinct_shoggoth","extinct_junker","extinct_sludge","extinct_custom"],genus:["creator","genus_humanoid","genus_carnivore","genus_herbivore","genus_small","genus_giant","genus_reptilian","genus_avian","genus_insectoid","genus_plant","genus_fungi","genus_aquatic","genus_fey","genus_heat","genus_polar","genus_sand","genus_demonic","genus_angelic","genus_synthetic","genus_eldritch"],planet:["explorer","biome_grassland","biome_oceanic","biome_forest","biome_desert","biome_volcanic","biome_tundra","biome_savanna","biome_swamp","biome_ashland","biome_taiga","biome_hellscape","biome_eden","atmo_toxic","atmo_mellow","atmo_rage","atmo_stormy","atmo_ozone","atmo_magnetic","atmo_trashed","atmo_elliptical","atmo_flare","atmo_dense","atmo_unstable","atmo_permafrost","atmo_retrograde"],universe:["vigilante","squished","double_density","cross","macro","marble","heavyweight","whitehole","heavy","canceled","eviltwin","microbang","pw_apocalypse","fullmetal","pass","soul_sponge","nightmare","escape_velocity"],challenge:["joyless","steelen","dissipated","technophobe","wheelbarrow","iron_will","failed_history","banana","pathfinder","ashanddust","exodus","obsolete","bluepill","retired","gross","lamentis","overlord","adam_eve","endless_hunger"]},Lo={colonist:[We("name")]},Do={trade:[750,50]},ze={};Object.keys(Eo).forEach(function(a){Eo[a].forEach(r=>ze[r]={name:t(`achieve_${r}_name`),desc:Do[r]?t(`achieve_${r}_desc`,Do[r]):t(`achieve_${r}_desc`),flair:Lo[r]?t(`achieve_${r}_flair`,Lo[r]):t(`achieve_${r}_flair`),type:a})});var Yt={utopia:{name:t("feat_utopia_name"),desc:t("feat_utopia_desc"),flair:t("feat_utopia_flair")},take_no_advice:{name:t("feat_take_no_advice_name"),desc:t("feat_take_no_advice_desc"),flair:t("feat_take_no_advice_flair")},ill_advised:{name:t("feat_ill_advised_name"),desc:t("feat_ill_advised_desc"),flair:t("feat_ill_advised_flair")},organ_harvester:{name:t("feat_organ_harvester_name"),desc:t("feat_organ_harvester_desc"),flair:t("feat_organ_harvester_flair")},the_misery:{name:t("feat_the_misery_name"),desc:t("feat_the_misery_desc"),flair:t("feat_the_misery_flair")},energetic:{name:t("feat_energetic_name"),desc:t("feat_energetic_desc"),flair:t("feat_energetic_flair")},garbage_pie:{name:t("feat_garbage_pie_name"),desc:t("feat_garbage_pie_desc"),flair:t("feat_garbage_pie_flair")},finish_line:{name:t("feat_finish_line_name"),desc:t("feat_finish_line_desc"),flair:t("feat_finish_line_flair")},blank_slate:{name:t("feat_blank_slate_name"),desc:t("feat_blank_slate_desc"),flair:t("feat_blank_slate_flair")},supermassive:{name:t("feat_supermassive_name"),desc:t("feat_supermassive_desc"),flair:t("feat_supermassive_flair")},steelem:{name:t("feat_steelem_name"),desc:t("feat_steelem_desc"),flair:t("feat_steelem_flair")},banana:{name:t("feat_banana_name"),desc:t("feat_banana_desc",[500,500]),flair:t("feat_banana_flair")},rocky_road:{name:t("feat_rocky_road_name"),desc:t("feat_rocky_road_desc"),flair:t("feat_rocky_road_flair")},demon_slayer:{name:t("feat_demon_slayer_name"),desc:t("feat_demon_slayer_desc"),flair:t("feat_demon_slayer_flair")},equilibrium:{name:t("feat_equilibrium_name"),desc:t("feat_equilibrium_desc"),flair:t("feat_equilibrium_flair")},digital_ascension:{name:t("feat_digital_ascension_name"),desc:t("feat_digital_ascension_desc"),flair:t("feat_digital_ascension_flair")},novice:{name:t("feat_novice_name"),desc:t("feat_achievement_hunter_desc",[10]),flair:t("feat_novice_flair")},journeyman:{name:t("feat_journeyman_name"),desc:t("feat_achievement_hunter_desc",[25]),flair:t("feat_journeyman_flair")},adept:{name:t("feat_adept_name"),desc:t("feat_achievement_hunter_desc",[50]),flair:t("feat_adept_flair")},master:{name:t("feat_master_name"),desc:t("feat_achievement_hunter_desc",[75]),flair:t("feat_master_flair")},grandmaster:{name:t("feat_grandmaster_name"),desc:t("feat_achievement_hunter_desc",[100]),flair:t("feat_grandmaster_flair")},nephilim:{name:t("feat_nephilim_name"),desc:t("feat_nephilim_desc"),flair:t("feat_nephilim_flair")},twisted:{name:t("feat_twisted_name"),desc:t("feat_twisted_desc"),flair:t("feat_twisted_flair")},slime_lord:{name:t("feat_slime_lord_name"),desc:t("feat_slime_lord_desc"),flair:t("feat_slime_lord_flair")},annihilation:{name:t("feat_annihilation_name"),desc:t("feat_annihilation_desc"),flair:t("feat_annihilation_flair")},immortal:{name:t("feat_immortal_name"),desc:t("feat_immortal_desc"),flair:t("feat_immortal_flair")},friday:{name:t("feat_friday_name"),desc:t("feat_friday_desc"),flair:t("feat_friday_flair")},valentine:{name:t("feat_love_name"),desc:t("feat_love_desc"),flair:t("feat_love_flair")},leprechaun:{name:t("feat_leprechaun_name"),desc:t("feat_leprechaun_desc"),flair:t("feat_leprechaun_flair")},easter:{name:t("feat_easter_name"),desc:t("feat_easter_desc"),flair:t("feat_easter_flair")},egghunt:{name:t("feat_egghunt_name"),desc:t("feat_egghunt_desc"),flair:t("feat_egghunt_flair")},launch_day:{name:t("feat_launch_day_name"),desc:t("feat_launch_day_desc"),flair:t("feat_launch_day_flair")},solstice:{name:t("feat_solstice_name"),desc:t("feat_solstice_desc"),flair:t("feat_solstice_flair")},firework:{name:t("feat_firework_name"),desc:t("feat_firework_desc"),flair:t("feat_firework_flair")},halloween:{name:t("feat_boo_name"),desc:t("feat_boo_desc"),flair:t("feat_boo_flair")},trickortreat:{name:t("feat_trickortreat_name"),desc:t("feat_trickortreat_desc"),flair:t("feat_trickortreat_flair")},thanksgiving:{name:t("feat_gobble_gobble_name"),desc:t("feat_gobble_gobble_desc"),flair:t("feat_gobble_gobble_flair")},xmas:{name:t("feat_xmas_name"),desc:t("feat_xmas_desc"),flair:t("feat_xmas_flair")},fool:{name:t("feat_fool_name"),desc:t("feat_fool_desc"),flair:t("feat_fool_flair")}};{let a=Vn();Vs(a.aLvl),Us(a.uLvl)}function Vn(a){a=a||e.race.universe;let r=le(a),i=0,s=0;return Object.keys(ze).forEach(function(n){e.stats.achieve[n]&&(i+=e.stats.achieve[n].l>5?5:e.stats.achieve[n].l,e.stats.achieve[n][r]&&(s+=e.stats.achieve[n][r]>5?5:e.stats.achieve[n][r]))}),{aLvl:i,uLvl:s}}function le(a){switch(a=a||e.race.universe,a){case"evil":return"e";case"antimatter":return"a";case"heavy":return"h";case"micro":return"m";case"magic":return"mg";default:return"l"}}function L(a,r,i,s){if(e.race.universe!=="micro"&&r===!0)return!1;e.settings.msgFilters.achievements.unlocked||(e.settings.msgFilters.achievements.unlocked=!0,e.settings.msgFilters.achievements.vis=!0);let n=dt(),c=!1,o=!1;(typeof i>"u"||i>n)&&(i=n);let l=!0;if(typeof e.stats.achieve[a]>"u"&&(e.stats.achieve[a]={l:0},l=!1),(e.race.universe==="micro"&&r===!0||e.race.universe!=="micro"&&r!==!0)&&e.stats.achieve[a]&&e.stats.achieve[a].l"u"||i>s)&&(i=s),!e.stats.feat[a]||e.stats.feat[a]&&e.stats.feat[a]
          ');$("#stats").append(a);let r=$('
          ');$("#perks").append(r);let i=$('
          ');$("#achieve").append(i),q_(),Qn(),$("body").hasClass("fool")?Gi({fool:!0}):Gi()}function Gi(a){A($("#achievePanel"));let r=$("#achievePanel"),i=0,s=0,n=0,c=0,o=le(),l=typeof a=="object"&&a.fool?a.fool:!1;if(Object.keys(ze).forEach(function(d){let h=Mr(d,"achievement");if(s++,e.stats.achieve[d]){i++,n+=e.stats.achieve[d].l>5?5:e.stats.achieve[d].l,e.stats.achieve[d][o]&&(c+=e.stats.achieve[d][o]>5?5:e.stats.achieve[d][o]);let p=Ne(d,16,h,l);l&&e.stats.achieve[d].l>1||!l?r.append($(`
          ${ze[d].name}${ze[d].desc}${p}
          `)):l&&e.stats.achieve[d].l===1&&i--}}),Vs(n),Us(c),l&&!e.stats.feat.fool){let d=$(`
          ${Yt.fool.name}${t("feat_fool_spoof")}
          `);r.append(d)}else Object.keys(Yt).forEach(function(d){let h=Mr(d,"feat");if(e.stats.feat[d]){let p=e.stats.feat[d]>1?`

          ${Zt(h)}

          `:"";if(d==="easter"){let f=Ze(4,14);f.length>0&&(p=f)}r.append($(`
          ${Yt[d].name}${Yt[d].desc}${p}
          `))}});let u=pt(5,12,!1);r.prepend(`
          ${t("achieve_draw_achieve_earned",[i,s])}${u}
          `),C({el:"#achievePanel",methods:{flair(d){return ze[d].flair},feat(d){return Yt[d].flair}}}),l&&!e.stats.feat.fool&&$("#thefool").on("mouseover",function(){e.race.universe==="micro"?se("fool",!0):se("fool"),Gi()})}function Ms(){let a=dt();$("#topBar span.flair")&&A($("#topBar span.flair"),!0);let r=Ze(1,14);if(r.length>0&&$("#topBar .planet").after($(r)),a>1&&$("#topBar .planet .flair").length===0){if(r.length===0){let s=Mr("topbar","challenge");$("#topBar .planet").after(`${Zt(s)}`)}let i="";e.race.no_plasmid&&(i+=`
          ${t("evo_challenge_plasmid")}
          `),e.race.weak_mastery&&(i+=`
          ${t("evo_challenge_mastery")}
          `),e.race.no_trade&&(i+=`
          ${t("evo_challenge_trade")}
          `),e.race.no_craft&&(i+=`
          ${t("evo_challenge_craft")}
          `),e.race.no_crispr&&(i+=`
          ${t("evo_challenge_crispr")}
          `),e.race.nerfed&&(i+=`
          ${t("evo_challenge_nerfed")}
          `),e.race.badgenes&&(i+=`
          ${t("evo_challenge_badgenes")}
          `),i.length>0&&$("#topBar .planetWrap .flair").append($(`
          Active Challenge Genes
          ${i}
          `)),B("topbarPlanet",function(s){let n=$('
          ');s.popper.append(n),n.append($(i))},{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function dt(){let a=1;return e.race.no_plasmid&&a++,e.race.no_trade&&a++,e.race.no_craft&&a++,e.race.no_crispr&&a++,e.race.weak_mastery&&a++,e.race.nerfed&&a++,e.race.badgenes&&a++,a>5&&(a=5),a}function da(){let a=dt();for(let c=a;c>=0;c--)Un("extinct_","mass_extinction",25,c),e.race.universe==="evil"&&Wn("extinct_","vigilante",12,c),Un("genus_","creator",9,c),Un("biome_","explorer",6,c),e.race.universe==="heavy"&&Wn("genus_","heavyweight",8,c);if(e.tech.supercollider&&e.tech.supercollider>=99&&L("blackhole"),e.stats.starved>=100&&L("mass_starvation"),Math.round(Math.log2(e.civic.garrison.protest+e.civic.garrison.fatigue))>=8&&L("warmonger"),e.stats.died>=250&&L("red_tactics"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=12&&L("landfill"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=100&&se("supermassive"),e.tech.piracy&&e.tech.chthonian&&e.tech.chthonian>=2&&e.galaxy){let c=Lt("gxy_chthonian"),o=Lt("gxy_stargate");if(o===1&&Lt("gxy_gateway")===1&&Lt("gxy_gorddon")===1&&Lt("gxy_alien1")===1&&Lt("gxy_alien2")===1&&c===1&&L("neutralized"),e.race.fasting&&c-o===0){let l=le();e.stats.endless_hunger.b2[l]=!0,l!=="m"&&l!=="l"&&(e.stats.endless_hunger.b2.l=!0)}}if(xe("summer")&&e.resource.hasOwnProperty("Thermite")){let c=1e5+e.stats.reset*9e3;c>1e6&&(c=1e6),e.resource.Thermite.amount>c&&se("solstice",e.race.universe==="micro")}if(xe("firework")&&e[e.race.cataclysm||e.race.orbit_decayed?"space":"city"].firework.on>0&&se("firework",e.race.universe==="micro"),e.city.morale.current>=200&&(L("paradise"),e.city.morale.current>=500&&se("utopia")),e.resource.hasOwnProperty("Money")&&e.resource.Money.amount>=1e9&&L("scrooge"),e.resource.hasOwnProperty("Money")&&e.race.inflation&&e.resource.Money.amount>=25e10&&L("wheelbarrow"),e.civic.hasOwnProperty("govern")&&e.galaxy.hasOwnProperty("trade")&&e.city.hasOwnProperty("market")&&e.galaxy.trade.cur>=50&&e.city.market.trade>=750&&e.civic.govern.type==="federation"&&L("trade"),e.tech.pillars){let c={},o=0,l=Array(5+1).fill(0);if(Object.keys(e.pillars).forEach(function(u){x[u]&&((!c[x[u].type]||e.pillars[u]>c[x[u].type])&&(c[x[u].type]=e.pillars[u]),o++,l[e.pillars[u]]++)}),Object.keys(c).length>=Object.keys(vt).length){let u=5;Object.keys(c).forEach(function(d){c[d]=Object.keys(x).length-1&&L("resonance"),o>=50){let u=0;for(let d=5;d>0;d--)if(u+=l[d],u>=50){se("equilibrium",!1,d);break}}}if(e.portal.hasOwnProperty("mechbay")&&e.tech.hasOwnProperty("hell_spire")&&e.tech.hell_spire>=9){let c=Object.keys(jt).length,o={};Object.keys(e.stats.spire).forEach(function(l){let u={};Object.keys(e.stats.spire[l]).forEach(function(d){jt[d]&&((!o.hasOwnProperty(d)||o[d]0&&(u[d]=e.stats.spire[l][d]))}),Object.keys(u).length===c&&L("gladiator",!1,Math.min(...Object.values(u)),l)}),Object.keys(o).length===c&&L("gladiator",!1,Math.min(...Object.values(o)),"l")}if(e.race.banana){let c=le();e.tech.hasOwnProperty("monuments")&&e.tech.monuments>=50&&(e.stats.banana.b5[c]=!0,c!=="m"&&c!=="l"&&(e.stats.banana.b5.l=!0));let o=0,l=0;["b1","b2","b3","b4","b5"].forEach(function(u){e.stats.banana[u].l&&o++,c!=="l"&&e.stats.banana[u][c]&&l++}),o>0&&L("banana",!1,o,"l"),l>0&&c!=="l"&&L("banana",!1,l,c),e.interstellar.hasOwnProperty("stellar_engine")&&e.interstellar.stellar_engine.mass>=12&&e.interstellar.stellar_engine.exotic===0&&(e.stats.banana.b3[c]=!0,c!=="m"&&c!=="l"&&(e.stats.banana.b3.l=!0))}if(["l",le()].forEach(function(o){let l=0;["ashanddust","exodus","obsolete","bluepill","retired"].forEach(function(u){e.stats.achieve[u]&&e.stats.achieve[u][o]&&e.stats.achieve[u][o]>=5&&l++}),l>0&&L("pathfinder",!1,l,o)}),e.race.fasting){let c=le();e.tech.hasOwnProperty("stock_exchange")&&e.tech.stock_exchange>=80&&(e.stats.endless_hunger.b3[c]=!0,c!=="m"&&c!=="l"&&(e.stats.endless_hunger.b3.l=!0)),e.resource[e.race.species].amount>=1200&&(e.stats.endless_hunger.b4[c]=!0,c!=="m"&&c!=="l"&&(e.stats.endless_hunger.b4.l=!0));let o=0,l=0;["b1","b2","b3","b4","b5"].forEach(function(u){e.stats.endless_hunger[u].l&&o++,c!=="l"&&e.stats.endless_hunger[u][c]&&l++}),o>0&&L("endless_hunger",!1,o,"l"),l>0&&c!=="l"&&L("endless_hunger",!1,l,c)}let r=new Date,i=xe("easter"),s=xe("halloween"),n=r.getFullYear();if(!e.settings.boring&&r.getDate()===13&&r.getDay()===5&&e.resource[e.race.species].amount>=1){let c=!1;c=se("friday",e.race.universe==="micro"),c&&e.resource[e.race.species].amount--}else if(!e.settings.boring&&r.getMonth()===1&&r.getDate()===14)se("valentine",e.race.universe==="micro");else if(!e.settings.boring&&r.getMonth()===2&&r.getDate()===17)se("leprechaun",e.race.universe==="micro");else if(i.active){se("easter",e.race.universe==="micro");let c=0;for(let o=1;o<=18;o++)e.special.egg[n][`egg${o}`]&&c++;c>=12&&se("egghunt",e.race.universe==="micro")}else if(xe("launch_day"))se("launch_day",e.race.universe==="micro");else if(s.active){let c=0;for(let o=1;o<=7;o++)e.special.trick[n][`trick${o}`]&&c++;for(let o=1;o<=7;o++)e.special.trick[n][`treat${o}`]&&c++;c>=12&&se("trickortreat",e.race.universe==="micro"),r.getMonth()===9&&r.getDate()===31&&se("halloween",e.race.universe==="micro")}else!e.settings.boring&&r.getMonth()===10&&r.getDate()>=22&&r.getDate()<=28?se("thanksgiving",e.race.universe==="micro"):!e.settings.boring&&r.getMonth()===11&&r.getDate()==25&&se("xmas",e.race.universe==="micro");!e.settings.boring&&r.getMonth()===3&&r.getDate()>=1&&r.getDate()<=3&&e.stats.feat.hasOwnProperty("fool")&&e.stats.feat.fool>0&&se("fool",e.race.universe==="micro"),e.stats.dkills>=666e6&&se("demon_slayer");for(let c=a;c>=1;c--){let o=0,l=Object.keys(ze);for(let d of l)e.stats.achieve[d]&&e.stats.achieve[d].l>=c&&o++;let u=[{c:10,f:"novice"},{c:25,f:"journeyman"},{c:50,f:"adept"},{c:75,f:"master"},{c:100,f:"grandmaster"}];for(let d=0;d<5;d++)o>=u[d].c&&(!e.stats.feat[u[d].f]||e.stats.feat[u[d].f]=s&&n++;if(n>=i&&(L(r,!1,s),e.race.universe!=="standard"))switch(e.race.universe){case"evil":e.stats.achieve[r].e=void 0;break;case"antimatter":e.stats.achieve[r].a=void 0;break;case"heavy":e.stats.achieve[r].h=void 0;break;case"micro":e.stats.achieve[r].m=void 0;break;case"magic":e.stats.achieve[r].mg=void 0;break;default:break}}e.race.universe!=="standard"&&Wn(a,r,i,s)}function Wn(a,r,i,s){let n=!1;switch(e.race.universe){case"evil":(typeof e.stats.achieve[r]>"u"||typeof e.stats.achieve[r].e>"u"||e.stats.achieve[r].e"u"||typeof e.stats.achieve[r].a>"u"||e.stats.achieve[r].a"u"||typeof e.stats.achieve[r].h>"u"||e.stats.achieve[r].h"u"||typeof e.stats.achieve[r].m>"u"||e.stats.achieve[r].m"u"||typeof e.stats.achieve[r].mg>"u"||e.stats.achieve[r].mg=s&&c++;break;case"antimatter":e.stats.achieve[l]&&e.stats.achieve[l].a&&e.stats.achieve[l].a>=s&&c++;break;case"heavy":e.stats.achieve[l]&&e.stats.achieve[l].h&&e.stats.achieve[l].h>=s&&c++;break;case"micro":e.stats.achieve[l]&&e.stats.achieve[l].m&&e.stats.achieve[l].m>=s&&c++;break;case"magic":e.stats.achieve[l]&&e.stats.achieve[l].mg&&e.stats.achieve[l].mg>=s&&c++;break;default:break}c>=i&&L(r,!1,s)}}var Mt={mastery:{name:t("mastery"),desc(){let a="";return Object.keys(ma).forEach(function(r){let i=Hn(r,!0,!0);r==="standard"?a+=`${ma[r].name}: ${t("perks_mastery_general",[`${+i.g.toFixed(2)}%`])}`:e.stats.achieve.whitehole&&(a+=`${ma[r].name}: ${t("perks_mastery_general",[`${+i.g.toFixed(2)}%`])}, ${t("perks_mastery_universe",[`${+i.u.toFixed(2)}%`])}`)}),a},active(){return!!(e.genes.challenge&&e.genes.challenge>=2)},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_unlocked_title")}`])]},blackhole:{name:t("achieve_blackhole_name"),desc(a){let r=a?"5/10/15/20/25":e.stats.achieve.blackhole?e.stats.achieve.blackhole.l*5:5;return t("achieve_perks_blackhole",[r])},active(){return!!(e.stats.achieve.blackhole&&e.stats.achieve.blackhole.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_blackhole_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_blackhole_name")}`])]},trade:{name:t("achieve_trade_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.trade?e.stats.achieve.trade.l*2:2,i=a?"1/2/3/4/5":e.stats.achieve.trade?e.stats.achieve.trade.l:1;return t("achieve_perks_trade",[r,i])},active(){return!!(e.stats.achieve.trade&&e.stats.achieve.trade.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_trade_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_trade_name")}`])]},creator:{name:t("achieve_creator_name"),desc(a){let r=a?"1.5/2/2.5/3/3.5":1+(e.stats.achieve.creator?e.stats.achieve.creator.l*.5:.5);return t("achieve_perks_creator",[r])},active(){return!!(e.stats.achieve.creator&&e.stats.achieve.creator.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_creator_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_creator_name")}`])]},mass_extinction:{name:t("achieve_mass_extinction_name"),group:[{desc(){return t("achieve_perks_mass_extinction")},active(){return!!(e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>=1)}},{desc(a){let r=e.stats.achieve.mass_extinction?e.stats.achieve.mass_extinction.l:1,i=a?"0/50/100/150/200":(r-1)*50;return t("achieve_perks_mass_extinction2",[i])},active(){return!!(e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_mass_extinction_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_mass_extinction_name")}`])]},doomed:{name:t("achieve_doomed_name"),desc(a){return t("achieve_perks_doomed")},active(){return e.stats.portals>=1},notes:[t("wiki_perks_achievement_note",[`${t("achieve_doomed_name")}`])]},explorer:{name:t("achieve_explorer_name"),desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.explorer?e.stats.achieve.explorer.l:1;return t("achieve_perks_explorer",[r])},active(){return!!(e.stats.achieve.explorer&&e.stats.achieve.explorer.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_explorer_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_explorer_name")}`])]},miners_dream:{name:t("achieve_miners_dream_name"),desc(a){let r=a?"1/2/3/5/7":e.stats.achieve.miners_dream?e.stats.achieve.miners_dream.l>=4?e.stats.achieve.miners_dream.l*2-3:e.stats.achieve.miners_dream.l:0;return t("achieve_perks_miners_dream",[r])},active(){return!!(e.stats.achieve.miners_dream&&e.stats.achieve.miners_dream.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_miners_dream_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_miners_dream_name")}`])]},extinct_junker:{name:t("achieve_extinct_junker_name"),desc(){return t("achieve_perks_enlightened")},active(){return!!(e.stats.achieve.extinct_junker&&e.stats.achieve.extinct_junker.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_extinct_junker_name")}`])]},joyless:{name:t("achieve_joyless_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.joyless?e.stats.achieve.joyless.l*2:2;return t("achieve_perks_joyless",[r])},active(){return!!(e.stats.achieve.joyless&&e.stats.achieve.joyless.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_joyless_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_joyless_name")}`])]},steelen:{name:t("achieve_steelen_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.steelen?e.stats.achieve.steelen.l*2:2;return t("achieve_perks_steelen",[r])},active(){return!!(e.stats.achieve.steelen&&e.stats.achieve.steelen.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_steelen_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_steelen_name")}`])]},wheelbarrow:{name:t("achieve_wheelbarrow_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.wheelbarrow?e.stats.achieve.wheelbarrow.l*2:2;return t("achieve_perks_wheelbarrow",[r])},active(){return!!(e.stats.achieve.wheelbarrow&&e.stats.achieve.wheelbarrow.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_wheelbarrow_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:t("achieve_extinct_sludge_name"),group:[{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.l*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_standard")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.l>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.h*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_heavy")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.h>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.a*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_antimatter")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.a>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.e*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_evil")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.e>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.m*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_micro")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.m>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.mg*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_magic")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.mg>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_extinct_sludge_name")}`]),t("wiki_perks_achievement_note_universe_scale",[`${t("achieve_extinct_sludge_name")}`])]},whitehole:{name:t("achieve_whitehole_name"),group:[{desc(){return t("achieve_perks_whitehole")},active(){return!!e.stats.achieve.whitehole}},{desc(a){let r=a?"5/10/15/20/25":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l*5:5;return t("achieve_perks_whitehole2",[r])},active(){return!!e.stats.achieve.whitehole}},{desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:1;return t("achieve_perks_whitehole3",[r])},active(){return!!e.stats.achieve.whitehole}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_whitehole_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_whitehole_name")}`])]},heavyweight:{name:t("achieve_heavyweight_name"),desc(a){let r=a?"4/8/12/16/20":e.stats.achieve.heavyweight?e.stats.achieve.heavyweight.l*4:4;return t("achieve_perks_heavyweight",[r])},active(){return!!e.stats.achieve.heavyweight},notes:[t("wiki_perks_achievement_note",[`${t("achieve_heavyweight_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_heavyweight_name")}`])]},dissipated:{name:t("achieve_dissipated_name"),group:[{desc(){return t("achieve_perks_dissipated1",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1)}},{desc(a){let r=a?"1/2":e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=5?2:1;return t("achieve_perks_dissipated2",[r])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3)}},{desc(){return t("achieve_perks_dissipated3",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2)}},{desc(){return t("achieve_perks_dissipated4",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_dissipated_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_dissipated_name")}`])]},banana:{name:t("achieve_banana_name"),group:[{desc(){return t("achieve_perks_banana1",[50])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=1)}},{desc(){return t("achieve_perks_banana2",[1])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=2)}},{desc(){return t("achieve_perks_banana3",[10])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=3)}},{desc(){return t("achieve_perks_banana4",[3])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=4)}},{desc(){return t("achieve_perks_banana5",[.01])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_banana_name")}`]),t("wiki_perks_achievement_note_task",[`${t("achieve_banana_name")}`]),t("wiki_perks_achievement_note_task_num",[1,`${t("wiki_achieve_banana1")}`]),t("wiki_perks_achievement_note_task_num",[2,`${t("wiki_achieve_banana2")}`]),t("wiki_perks_achievement_note_task_num",[3,`${t("wiki_achieve_banana3")}`]),t("wiki_perks_achievement_note_task_num",[4,`${t("wiki_achieve_banana4",[500])}`]),t("wiki_perks_achievement_note_task_num",[5,`${t("wiki_achieve_banana5",[50])}`])]},anarchist:{name:t("achieve_anarchist_name"),desc(a){let r=a?"10/20/30/40/50":e.stats.achieve.anarchist?e.stats.achieve.anarchist.l*10:10;return t("achieve_perks_anarchist",[r])},active(){return!!(e.stats.achieve.anarchist&&e.stats.achieve.anarchist.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_anarchist_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_anarchist_name")}`])]},ascended:{name:t("achieve_ascended_name"),group:[{desc(a){let r;if(a)r="1-30";else if(r=0,e.stats.achieve.ascended)for(let i=0;i=1)}},{desc(){return t("achieve_perks_ascended2",[Ei()])},active(){return!!(e.stats.achieve.ascended&&e.stats.achieve.ascended[le()]>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_ascended_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_ascended_name")}`]),t("wiki_perks_achievement_note_universe",[`${t("achieve_ascended_name")}`])]},technophobe:{name:t("achieve_technophobe_name"),group:[{desc(){return t("achieve_perks_technophobe1",[25])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1)}},{desc(a){let r;if(a)r="10/25/30/35/40/45/50";else{r=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}return t("achieve_perks_technophobe2",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2)}},{desc(a){let r;if(a)r="1/2/3/4/5/6";else{r=1;for(let i=1;i=5&&(r+=1)}return a||r>1?t("achieve_perks_technophobe3a",[r]):t("achieve_perks_technophobe3",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=3)}},{desc(){return t("achieve_perks_technophobe4",[10])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5)}},{desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.technophobe?e.stats.achieve.technophobe.l:0;return t("achieve_perks_technophobe5",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_technophobe_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_technophobe_name")}`]),t("wiki_perks_achievement_note_universe",[`${t("achieve_technophobe_name")}`])]},iron_will:{name:t("achieve_iron_will_name"),group:[{desc(){return t("achieve_perks_iron_will1",[.15])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1)}},{desc(){return t("achieve_perks_iron_will2",[10])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2)}},{desc(){return t("achieve_perks_iron_will3",[6])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3)}},{desc(){return t("achieve_perks_iron_will4",[1])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4)}},{desc(){return t("achieve_perks_iron_will5")},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_iron_will_name")}`]),t("wiki_perks_achievement_note_ironwill",[`${t("evo_challenge_cataclysm")}`]),t("wiki_perks_achievement_note_ironwill2",[1,`${t("space_red_ziggurat_title")}`]),t("wiki_perks_achievement_note_ironwill3",[2,`${t("tech_elerium_mining")}`]),t("wiki_perks_achievement_note_ironwill3",[3,`${t("tech_lasers")}`]),t("wiki_perks_achievement_note_ironwill3",[4,`${t("tech_generational_ship")}`]),t("wiki_perks_achievement_note_ironwill4",[5,`${t("wiki_resets_bioseed")}`])]},failed_history:{name:t("achieve_failed_history_name"),desc(){return t("achieve_perks_failed_history",[2])},active(){return!!(e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_failed_history_name")}`]),t("wiki_perks_achievement_note_failed_history",[`${t("evo_challenge_cataclysm")}`])]},lamentis:{name:t("achieve_lamentis_name"),group:[{desc(){return t("achieve_perks_lamentis1",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=1)}},{desc(){return t("achieve_perks_lamentis2",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=2)}},{desc(){return t("achieve_perks_lamentis3",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=3)}},{desc(){return t("achieve_perks_lamentis4")},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4)}},{desc(){return t("achieve_perks_lamentis5")},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_lamentis_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_lamentis_name")}`])]},soul_sponge:{name:t("achieve_soul_sponge_name"),desc(a){let r=a?"100/200/300/400/500":e.stats.achieve.soul_sponge?e.stats.achieve.soul_sponge.mg*100:100;return t("achieve_perks_soul_sponge",[r])},active(){return!!(e.stats.achieve.soul_sponge&&e.stats.achieve.soul_sponge.mg>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_soul_sponge_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_soul_sponge_name")}`])]},nightmare:{name:t("achieve_nightmare_name"),desc(){return t("achieve_perks_nightmare")},active(){return!!(e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_nightmare_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_nightmare_name")}`])]},escape_velocity:{name:t("achieve_escape_velocity_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.escape_velocity?e.stats.achieve.escape_velocity.h*2:2;return t("achieve_perks_escape_velocity",[r])},active(){return!!(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_escape_velocity_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_escape_velocity_name")}`])]},endless_hunger:{name:t("achieve_endless_hunger_name"),group:[{desc(){return t("achieve_perks_endless_hunger1")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)}},{desc(){return t("achieve_perks_endless_hunger2")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=2)}},{desc(){return t("achieve_perks_endless_hunger3")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=3)}},{desc(){return t("achieve_perks_endless_hunger4")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=4)}},{desc(){return t("achieve_perks_endless_hunger5")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_endless_hunger_name")}`]),t("wiki_perks_achievement_note_task",[`${t("achieve_endless_hunger_name")}`]),t("wiki_perks_achievement_note_task_num",[1,`${t("wiki_achieve_endless_hunger1")}`]),t("wiki_perks_achievement_note_task_num",[2,`${t("wiki_achieve_endless_hunger2")}`]),t("wiki_perks_achievement_note_task_num",[3,`${t("wiki_achieve_endless_hunger3",[80])}`]),t("wiki_perks_achievement_note_task_num",[4,`${t("wiki_achieve_endless_hunger4",[1200])}`]),t("wiki_perks_achievement_note_task_num",[5,`${t("wiki_achieve_endless_hunger5")}`])]},gladiator:{name:t("achieve_gladiator_name"),desc(a){let r=a?"20/40/60/80/100":e.stats.achieve.gladiator?e.stats.achieve.gladiator.l*20:20;return t("achieve_perks_gladiator",[r])},active(){return!!(e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_gladiator_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_gladiator_name")}`])]},pathfinder:{name:t("achieve_pathfinder_name"),group:[{desc(){return t("achieve_perks_pathfinder1",[10])},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1)}},{desc(){return t("achieve_perks_pathfinder2",[10])},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2)}},{desc(){return t("achieve_perks_pathfinder3")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=3)}},{desc(){return t("achieve_perks_pathfinder4")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=4)}},{desc(){return t("achieve_perks_pathfinder5")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_pathfinder_name")}`]),t("wiki_perks_achievement_note_pathfinder",[`${t("evo_challenge_truepath")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_mad")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_bioseed")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_ai")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_matrix")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_retired")}`])]},overlord:{name:t("achieve_overlord_name"),desc(){let a=`
          ${t("achieve_perks_overlord1",[10])}
          `;return a+=`
          ${t("achieve_perks_overlord2")}
          `,a+=`
          ${t("achieve_perks_overlord3")}
          `,a+=`
          ${t("achieve_perks_overlord4")}
          `,a},active(){return!!(e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_overlord_name")}`])]},adam_eve:{name:t("achieve_adam_eve_name"),desc(){return t("achieve_perks_adam_eve")},active(){return!!(e.stats.achieve.adam_eve&&e.stats.achieve.adam_eve.l>=5)},notes:[]},creep:{name:t("wiki_arpa_crispr_creep"),desc(a){let r=a?"0.01/0.02/0.03/0.04/0.05":e.genes.creep?e.genes.creep*.01:0;return t("arpa_perks_creep",[r])},active(){return!!e.genes.creep},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_genetic_memory_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_animus_title")}`,`${t("arpa_genepool_divine_remembrance_title")}`,`${t("arpa_genepool_divine_proportion_title")}`,`${t("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:t("wiki_arpa_crispr_store"),desc(a){let r=a?"0.04/0.06/0.08":e.genes.store&&e.genes.store>1?e.genes.store===2?.06:.08:.04;return t(e.genes.store&&e.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[r])},active(){return!!e.genes.store},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_spatial_reasoning_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_spatial_superiority_title")}`,`${t("arpa_genepool_spatial_supremacy_title")}`,`${t("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:t("wiki_arpa_crispr_evolve"),group:[{desc(){return t("arpa_perks_evolve")},active(){return!!e.genes.evolve}},{desc(){return t("arpa_genepool_recombination_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=2)}},{desc(){return t("arpa_genepool_homologous_recombination_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=3)}},{desc(){return t("arpa_genepool_genetic_reshuffling_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=4)}},{desc(){return t("arpa_genepool_recombinant_dna_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=5)}},{desc(){return t("arpa_genepool_chimeric_dna_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=6)}},{desc(){return t("arpa_genepool_molecular_cloning_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=7)}},{desc(){return t("arpa_genepool_transgenes_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=8)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_morphogenesis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_recombination_title")}`,`${t("arpa_genepool_homologous_recombination_title")}`,`${t("arpa_genepool_genetic_reshuffling_title")}`,`${t("arpa_genepool_recombinant_dna_title")}`,`${t("arpa_genepool_chimeric_dna_title")}`,`${t("arpa_genepool_molecular_cloning_title")}`,`${t("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:t("wiki_arpa_crispr_birth"),desc(){return t("arpa_perks_birth")},active(){return!!e.genes.birth},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_replication_title")}`])]},enhance:{name:t("wiki_arpa_crispr_enhance"),desc(){return t("arpa_perks_enhance")},active(){return!!e.genes.enhance},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:t("wiki_arpa_crispr_crafty"),group:[{desc(){return t("arpa_genepool_artificer_desc")},active(){return!!e.genes.crafty}},{desc(a){let r=a?"50/100":e.genes.crafty&&e.genes.crafty>=3?100:50;return t("arpa_genepool_crafting_desc",[r])},active(){return!!(e.genes.crafty&&e.genes.crafty>=2)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_artificer_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_detail_oriented_title")}`,`${t("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:t("wiki_arpa_crispr_governor"),desc(){return t("arpa_perks_governor")},active(){return!!e.genes.governor},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_governance_title")}`])]},synthesis:{name:t("wiki_arpa_crispr_synthesis"),desc(a){let r=a?"2/3/4":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?4:3:2,i=a?"10/25/50":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?50:25:10;return t("arpa_genepool_synthesis_desc",[r,i])},active(){return!!e.genes.synthesis},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_synthesis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_karyokinesis_title")}`,`${t("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:t("wiki_arpa_crispr_challenge"),group:[{desc(){return t("arpa_perks_challenge")},active(){return!!e.genes.challenge}},{desc(){return t("arpa_genepool_unlocked_desc")},active(){return!!(e.genes.challenge&&e.genes.challenge>=2)}},{desc(a){return t("arpa_perks_challenge2",[a?"60/80":e.genes.challenge&&e.genes.challenge>=4?80:60,a?"60/40":e.genes.challenge&&e.genes.challenge>=4?40:60])},active(){return!!(e.genes.challenge&&e.genes.challenge>=3)}},{desc(){return t("arpa_perks_challenge3")},active(){return!!(e.genes.challenge&&e.genes.challenge>=5)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_hardened_genes_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_unlocked_title")}`,`${t("arpa_genepool_universal_title")}`,`${t("arpa_genepool_standard_title")}`,`${t("arpa_genepool_mastered_title")}`].join(", ")]),t("wiki_perks_crispr_note_challenge",[t("arpa_genepool_universal_title"),t("arpa_genepool_standard_title")])]},ancients:{name:t("wiki_arpa_crispr_ancients"),group:[{desc(){return t("arpa_perks_ancients")},active(){return!!e.genes.ancients}},{desc(){return e.genes.ancients&&e.genes.ancients>=4?t("arpa_perks_ancients3"):t("arpa_perks_ancients2")},active(){return!!(e.genes.ancients&&e.genes.ancients>=2)}},{desc(a){return t("arpa_perks_ancients4",[a?"25/50":e.genes.ancients&&e.genes.ancients>=5?50:25])},active(){return!!(e.genes.ancients&&e.genes.ancients>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_ancients_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_faith_title")}`,`${t("arpa_genepool_devotion_title")}`,`${t("arpa_genepool_acolyte_title")}`,`${t("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:t("wiki_arpa_crispr_trader"),desc(){return t("arpa_genepool_negotiator_desc")},active(){return!!e.genes.trader},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_negotiator_title")}`])]},transcendence:{name:t("wiki_arpa_crispr_transcendence"),desc(){return t("arpa_genepool_transcendence_desc")},active(){return!!e.genes.transcendence},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_transcendence_title")}`])]},queue:{name:t("wiki_arpa_crispr_queue"),group:[{desc(){return t("arpa_genepool_geographer_desc")},active(){return!!e.genes.queue}},{desc(){return t("arpa_genepool_architect_desc")},active(){return!!(e.genes.queue&&e.genes.queue>=2)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_geographer_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:t("wiki_arpa_crispr_plasma"),desc(a){let r=a?"3/5":e.genes.plasma>=2?5:3;return t("arpa_genepool_mitosis_desc",[r])},active(){return!!e.genes.plasma},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_mitosis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:t("wiki_arpa_crispr_mutation"),group:[{desc(){return e.genes.mutation&&e.genes.mutation>1?t("arpa_perks_mutation2"):t("arpa_perks_mutation1")},active(){return!!e.genes.mutation}},{desc(){return t("arpa_perks_mutation3")},active(){return!!(e.genes.mutation&&e.genes.mutation>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_mutation_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_transformation_title")}`,`${t("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:t("wiki_arpa_crispr_bleed"),group:[{desc(){return t("arpa_genepool_bleeding_effect_desc",[2.5])},active(){return!!e.genes.bleed}},{desc(){return t("arpa_genepool_synchronicity_desc",[25])},active(){return!!(e.genes.bleed&&e.genes.bleed>=2)}},{desc(){return t("arpa_genepool_astral_awareness_desc")},active(){return!!(e.genes.bleed&&e.genes.bleed>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_bleeding_effect_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_synchronicity_title")}`,`${t("arpa_genepool_astral_awareness_title")}`].join(", ")]),t("wiki_perks_crispr_note_bleed",[`${t("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:t("wiki_arpa_crispr_blood"),group:[{desc(){return t("arpa_genepool_blood_remembrance_desc")},active(){return!!e.genes.blood}},{desc(){return t("arpa_genepool_blood_sacrifice_desc")},active(){return!!(e.genes.blood&&e.genes.blood>=2)}},{desc(){return t("arpa_genepool_essence_absorber_desc")},active(){return!!(e.genes.blood&&e.genes.blood>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_blood_remembrance_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_blood_sacrifice_title")}`,`${t("arpa_genepool_essence_absorber_title")}`].join(", ")]),t("wiki_perks_crispr_note_blood",[t("arpa_genepool_blood_remembrance_title")])]},spire:{name:t("wiki_arpa_blood_spire"),group:[{desc(){return t("arpa_blood_purify_desc")},active(){return!!e.blood.spire}},{desc(){return t("arpa_blood_chum_desc")},active(){return!!(e.blood.spire&&e.blood.spire>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_purify_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:t("wiki_arpa_blood_lust"),group:[{desc(a){return t("arpa_perks_lust",[a?.2:.2*(e.blood.lust?e.blood.lust:1)])},active(){return!!e.blood.lust}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_lust_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_lust_title")])]},illuminate:{name:t("wiki_arpa_blood_illuminate"),group:[{desc(a){return t("arpa_perks_illuminate",[a?.01:.01*(e.blood.illuminate?e.blood.illuminate:1)])},active(){return!!e.blood.illuminate}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_illuminate_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_illuminate_title")])]},greed:{name:t("wiki_arpa_blood_greed"),group:[{desc(a){return t("arpa_perks_greed",[a?1:1*(e.blood.greed?e.blood.greed:1)])},active(){return!!e.blood.greed}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_greed_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_greed_title")])]},hoarder:{name:t("wiki_arpa_blood_hoarder"),group:[{desc(a){return t("arpa_perks_hoarder",[a?1:1*(e.blood.hoarder?e.blood.hoarder:1)])},active(){return!!e.blood.hoarder}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_hoarder_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_hoarder_title")])]},artisan:{name:t("wiki_arpa_blood_artisan"),group:[{desc(a){return t("arpa_perks_artisan",[a?1:1*(e.blood.artisan?e.blood.artisan:1)])},active(){return!!e.blood.artisan}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_artisan_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_artisan_title")])]},attract:{name:t("wiki_arpa_blood_attract"),group:[{desc(a){return t("arpa_perks_attract",[a?5:5*(e.blood.attract?e.blood.attract:1)])},active(){return!!e.blood.attract}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_attract_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_attract_title")])]},wrath:{name:t("wiki_arpa_blood_wrath"),group:[{desc(a){return t("arpa_perks_wrath",[a?5:5*(e.blood.wrath?e.blood.wrath:1)])},active(){return!!e.blood.wrath}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_wrath_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_wrath_title")])]},prepared:{name:t("wiki_arpa_blood_prepared"),group:[{desc(){return t("arpa_blood_prepared_desc")},active(){return!!e.blood.prepared}},{desc(){return t("arpa_blood_compact_desc")},active(){return!!(e.blood.prepared&&e.blood.prepared>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_prepared_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:t("wiki_arpa_blood_unbound"),group:[{desc(){return t("arpa_blood_unbound_desc")},active(){return!!e.blood.unbound}},{desc(){return t("arpa_blood_shadow_war_desc")},active(){return!!(e.blood.unbound&&e.blood.unbound>=3)}},{desc(a){return t("arpa_perks_unbound_resist",[a?"10/5":e.blood.unbound&&e.blood.unbound>=4?5:10])},active(){return!!(e.blood.unbound&&e.blood.unbound>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_unbound_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_unbound_resistance_title")}`,`${t("arpa_blood_shadow_war_title")}`,`${t("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:t("wiki_arpa_blood_aware"),group:[{desc(){return t("arpa_blood_blood_aware_desc")},active(){return!!e.blood.aware}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_blood_aware_title")}`])]},harmonic:{name:t("harmonic"),group:[{desc(a){let r=na();return t("perks_harmonic",[a?`1-${Object.keys(x).length+2}`:+((r[0]-1)*100).toFixed(0),a?`2-${(Object.keys(x).length+2)*2}`:+((r[1]-1)*100).toFixed(0)])},active(){let a=na();return!!(e.pillars&&a[0]>1)}},{desc(a){let r=na();return t("perks_harmonic2",[t("portal_west_tower"),t("portal_east_tower"),a?`12-${(Object.keys(x).length-1)*12}`:+(Object.keys(e.pillars).length*12)])},active(){let a=na();return!!(e.pillars&&a[0]>1)}}],notes:[t("wiki_perks_harmonic_note1"),t("wiki_perks_harmonic_note2")]},novice:{name:t("perk_novice"),desc(a){let r=e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?Math.min(e.stats.achieve.apocalypse.l,e.stats.feat.novice):1,i=a?"0.5/1/1.5/2/2.5":r/2,s=a?"0.25/0.5/0.75/1/1.25":r/4;return`
          ${t("achieve_perks_novice",[i,s])}
          ${t("achieve_perks_novice2")}
          `},active(){return!!(e.stats.feat.novice&&e.stats.mad>0)},notes:[t("wiki_perks_progress_note1",[10,t("wiki_resets_mad")]),t("wiki_perks_progress_note2")]},journeyman:{name:t("perk_journeyman"),desc(a){let r=e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0?Math.min(e.stats.achieve.seeder.l,e.stats.feat.journeyman):1;if(a||r>1){let i=a?"1/2/3":r>=3?r>=5?3:2:1,s=a?"1/2":r>=4?2:1;return`
          ${t("achieve_perks_journeyman2",[i,s])}
          ${t("achieve_perks_journeyman3")}
          `}else return`
          ${t("achieve_perks_journeyman1",[1])}
          ${t("achieve_perks_journeyman3")}
          `},active(){return!!(e.stats.feat.journeyman&&e.stats.bioseed>0)},notes:[t("wiki_perks_progress_note1",[25,t("wiki_resets_bioseed")]),t("wiki_perks_progress_note2")]},adept:{name:t("perk_adept"),desc(a){let r=Cs()||1,i=a?"100/200/300/400/500":r*100,s=a?"60/120/180/240/300":r*60;return t("achieve_perks_adept",[i,s])},active(){return Cs()>0},notes:[t("wiki_perks_progress_note1",[50,t("wiki_resets_blackhole")]),t("wiki_perks_progress_note2")]},master:{name:t("perk_master"),desc(a){let r=e.stats.feat.master&&e.stats.achieve.ascended&&e.stats.achieve.ascended.l>0?Math.min(e.stats.achieve.ascended.l,e.stats.feat.master):1,i=a?"1/2/3/4/5":r,s=a?"2/4/6/8/10":r*2;return t("achieve_perks_master",[i,s,t("evo_mitochondria_title"),t("evo_eukaryotic_title"),t("evo_membrane_title"),t("evo_organelles_title"),t("evo_nucleus_title")])},active(){return!!(e.stats.feat.master&&e.stats.achieve.ascended&&e.stats.achieve.ascended.l>0)},notes:[t("wiki_perks_progress_note1",[75,t("wiki_resets_ascension")]),t("wiki_perks_progress_note2")]},grandmaster:{name:t("perk_grandmaster"),desc(a){let r=e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0?Math.min(e.stats.achieve.corrupted.l,e.stats.feat.grandmaster):1;return t("achieve_perks_grandmaster",[a?"1/2/3/4/5":r])},active(){return!!(e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0)},notes:[t("wiki_perks_progress_note1",[100,t("wiki_resets_infusion")]),t("wiki_perks_progress_note2")]}};function Qn(){A($("#perksPanel"));let a=$("#perksPanel"),r=!1;Object.keys(Mt).forEach(function(i){if(Mt[i].hasOwnProperty("group")){let s=!1,n=$(`
          ${Mt[i].name}
          `);Mt[i].group.forEach(function(c){c.active()&&(s=!0,n.append($(`
          ${c.desc()}
          `)))}),s&&(r=!0,a.append(n))}else Mt[i].active()&&(r=!0,a.append($(`
          ${Mt[i].name}${Mt[i].desc()}
          `)))}),r||a.append($(`
          ${t("perks_none")}
          `))}function q_(){A($("#statsPanel"));let a=$("#statsPanel");if(a.append(`
          ${t("achieve_stats_overall")}
          `),a.append(`
          ${t("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
          `),e.stats.antiplasmid>0&&a.append(`
          ${t("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
          `),e.stats.phage>0&&a.append(`
          ${t("achieve_stats_phage_earned")} {{ s.phage | format }}
          `),e.stats.dark>0&&a.append(`
          ${t("achieve_stats_dark_earned")} {{ s.dark | format }}
          `),e.stats.harmony>0&&a.append(`
          ${t("achieve_stats_harmony_earned")} {{ s.harmony | format }}
          `),e.stats.blood>0&&a.append(`
          ${t("achieve_stats_blood_earned")} {{ s.blood | format }}
          `),e.stats.artifact>0&&a.append(`
          ${t("achieve_stats_artifact_earned")} {{ s.artifact | format }}
          `),a.append(`
          ${t("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
          `),a.append(`
          ${t("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
          `),a.append(`
          ${t("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
          `),a.append(`
          ${t("achieve_stats_game_days_played")} {{ s.days | played | format }}
          `),e.stats.portals>0&&a.append(`
          ${t("achieve_stats_portals")} {{ s.portals | format }}
          `),a.append(`
          ${t("achieve_stats_total_resets")} {{ s.reset | format }}
          `),e.stats.mad>0&&a.append(`
          ${t("achieve_stats_mad_resets")} {{ s.mad | format }}
          `),e.stats.bioseed>0&&a.append(`
          ${t("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
          `),e.stats.cataclysm>0&&a.append(`
          ${t("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
          `),e.stats.blackhole>0&&a.append(`
          ${t("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
          `),e.stats.ascend>0&&a.append(`
          ${t("achieve_stats_ascension_resets")} {{ s.ascend | format }}
          `),e.stats.descend>0&&a.append(`
          ${t("achieve_stats_descension_resets")} {{ s.descend | format }}
          `),e.stats.aiappoc>0&&a.append(`
          ${t("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
          `),e.stats.matrix>0&&a.append(`
          ${t("achieve_stats_matrix_resets")} {{ s.matrix | format }}
          `),e.stats.retire>0&&a.append(`
          ${t("achieve_stats_retire_resets")} {{ s.retire | format }}
          `),e.stats.eden>0&&a.append(`
          ${t("achieve_stats_eden_resets")} {{ s.eden | format }}
          `),e.stats.terraform>0&&a.append(`
          ${t("achieve_stats_terraform_resets")} {{ s.terraform | format }}
          `),e.stats.geck>0&&a.append(`
          ${t("achieve_stats_gecks")} {{ s.geck | format }}
          `),a.append(`
          ${t("achieve_stats_current_game")}
          `),a.append(`
          ${t("achieve_stats_knowledge_spent")} {{ s.know | format }}
          `),a.append(`
          ${t("achieve_stats_starved_to_death")} {{ s.starved | format }}
          `),a.append(`
          ${t("achieve_stats_died_in_combat")} {{ s.died | format }}
          `),a.append(`
          ${t("achieve_stats_attacks_made")} {{ s.attacks | format }}
          `),a.append(`
          ${t("achieve_stats_game_days_played")} {{ s.days | format }}
          `),e.stats.dkills>0&&a.append(`
          ${t("achieve_stats_demons_kills")} {{ s.dkills | format }}
          `),e.stats.sac>0&&a.append(`
          ${t("achieve_stats_sacrificed")} {{ s.sac | format }}
          `),e.stats.murders>0&&a.append(`
          ${t("achieve_stats_murders")} {{ s.murders | format }}
          `),e.stats.psykill>0&&a.append(`
          ${t("achieve_stats_psymurders")} {{ s.psykill | format }}
          `),e.resource.hasOwnProperty("Thermite")&&e.resource.Thermite.amount>0&&a.append(`
          ${t("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
          `),oa().active){let i="";(e.stats.cfood>=13||e.race.cataclysm||e.race.orbit_decayed)&&(i=`${pt(7,12,!0)}`),a.append(`
          ${t("achieve_stats_trickortreat")} {{ s.cfood | format }} ${i}
          `)}C({el:"#statsPanel",data:{s:e.stats,r:e.resource},filters:{played(i){return i+e.stats.tdays},t_know(i){return i+e.stats.tknow},t_starved(i){return i+e.stats.tstarved},t_died(i){return i+e.stats.tdied},format(i){return i.toLocaleString()},res(i){return(+i.toFixed(2)).toLocaleString()}}})}vs(!0);function si(){let a=$("#content");A(a);let r=["update","hotkeys","sethotkeys","offline","moonphase","orbital","lumber","farm","steel","aluminium","titanium","titanium_balorg","polymer","mythril","neutronium","adamantite","infernite","graphene","stanene","aerogel","crates","soft_reset","hard_reset","combat","morale","stress","genetic_decay","cache","aphrodisiac","religion","tax_riots","race","weather","sundial","plasmid","plasmid_keep","plasmid_earn","crispr","creep","phage","phage_earn","phage_benefit","anti_plasmids","temple","temple_break","demonic","celestial","mastery","challenges","perks","feats","support","micro","valdi","quantum","quantum_level","exotic","soul_gem","soul_gem_spend","hell_patrol","surveyors","defense","infusion","dark_energy"],i={neutronium:[x[e.race.species].solar.gas_moon]};for(let s=0;s
          ');a.append(n);let c=[];i.hasOwnProperty(r[s])&&(c=i[r[s]]),n.append(`

          ${t(`wiki_faq_q_${r[s]}`)}

          `),n.append(`
          ${t(`wiki_faq_a_${r[s]}`,c)}
          `)}}function Bo(a,r,i){return r.hasOwnProperty("h_level")||(r.h_level=2),r.header=!0,y(a,r,i)}function y(a,r,i){if(!r.hasOwnProperty("name")||!r.hasOwnProperty("template"))return;r.hasOwnProperty("paragraphs")||(r.paragraphs=0),r.hasOwnProperty("text")||(r.text={}),r.hasOwnProperty("rawtext")||(r.rawtext={}),r.hasOwnProperty("para_data")||(r.para_data={}),r.hasOwnProperty("data_color")||(r.data_color={}),r.hasOwnProperty("data_link")||(r.data_link={}),r.hasOwnProperty("h_level")||(r.h_level=3),r.hasOwnProperty("header")||(r.header=!1),r.hasOwnProperty("full")||(r.full=!1),r.hasOwnProperty("break")||(r.break=!1),r.hasOwnProperty("default_color")||(r.default_color="warning"),r.hasOwnProperty("examples")||(r.examples=!1);let s=!1;i?s=i:(s=$(`
          `),r.h_level&&s.append(`${r.label?r.label:t(`wiki_${r.template}_${r.name}`)}`));let n=[{s:1,e:r.break?r.break[0]-1:r.paragraphs}];if(r.break)for(let c=0;c');for(let l=c.s;l<=c.e;l++)if((r.text[l]||r.rawtext[l]||r.para_data[l])&&Array.isArray(r.para_data[l])){let u=r.para_data[l];if(r.data_link[l]&&Array.isArray(r.data_link[l]))for(let p=0;p${u[p]}`);let d=r.data_color[l]&&Array.isArray(r.data_color[l])?r.data_color[l]:r.para_data[l].map(p=>r.default_color);for(let p=0;p${u[p]}`);let h=r.rawtext[l]?r.rawtext[l]:t(r.text[l]?r.text[l]:`wiki_${r.template}_${r.name}_para${l}`,u);o.append(`${h}`)}else{let u=r.rawtext[l]?r.rawtext[l]:t(r.text[l]?r.text[l]:`wiki_${r.template}_${r.name}_para${l}`);o.append(`${u}`)}s.append(o)}),r.examples&&(s.append($(`
          ${t("wiki_examples")}
          `)),r.examples.forEach(function(c){s.append($(`
          - ${c}
          `))})),i||a.append(s),s}function qa(a,r,i,s){let n=typeof r.title=="string"?r.title:r.title();if(i)a.append(`

          ${n}

          ${i}
          `);else if(s)a.append(`

          ${n}

          `);else{let u=e.tech[r.grant[0]]&&e.tech[r.grant[0]]>=r.grant[1];a.append(`

          ${n}

          ${u?`${t("wiki_arpa_purchased")}`:""}${t(`wiki_tech_tree_${r.grant[0]}`)}: ${r.grant[1]}
          `)}let c=typeof r.desc=="string"?r.desc:r.desc(!0);c!==n&&a.append(`
          ${c}
          `);let o=$('
          '),l=!1;if(r.hasOwnProperty("effect")){if(s){let u=typeof r.effect=="string"?r.effect:!1;u!==!1?o.append(`
          ${u}
          `):o.append('
          '),l=!0}else{let u=typeof r.effect=="string"?r.effect:r.effect(!0);u!==!1&&(o.append(`
          ${u}
          `),l=!0)}a.append(o)}if(r.hasOwnProperty("cost")){let u=_t(r,!0),d=l?$(`
          `):$(`
          `),h="";s&&(d.append($(`

          ${t("wiki_calc_cost")}

          `)),h=$(`

          ${t("wiki_calc_cost_creep")}

          `));let p=!1,f=function(w,v,k,P,j){s?(d.append($(`
          ${k}{{ r.${w}.cost }}
          `)),h.append($(`
          {{ r.${w}.creep }}
          `)),p=!0):v>0&&(d.append($(`
          ${k}${Y(v,1)}
          `)),p=!0)},g="has-text-success";Object.keys(u).forEach(function(w){if(w==="Structs"){let v=u[w]();Object.keys(v).forEach(function(k){Object.keys(v[k]).forEach(function(P){let j=v[k][P].hasOwnProperty("on")?v[k][P].on:v[k][P].count,D="";if(v[k][P].hasOwnProperty("s")){let U=v[k][P].s;D=typeof q[k][U][P].title=="string"?q[k][U][P].title:q[k][U][P].title()}else D=typeof q[k][P].title=="string"?q[k][P].title:q[k][P].title();d.append($(`
          ${D}: ${j}
          `)),s&&h.append($(`
          ${t("wiki_calc_none")}
          `)),p=!0})})}else if(["Plasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone","AntiPlasmid"].includes(w)){let v=w;w==="Plasmid"&&e.race.universe==="antimatter"&&(v="AntiPlasmid"),f(w,u[w](),t(`resource_${v}_name`)+": ",g)}else if(w==="Supply")f(w,u[w](),t(`resource_${w}_name`)+": ",g);else if(w==="Custom")d.append($(`
          ${u[w]().label}
          `)),p=!0;else if(w!=="Morale"&&w!=="Army"&&w!=="Bool"){let v=w==="Species"?e.race.species:w,k=v==="Money"?"$":(w==="HellArmy"?t("fortress_troops"):e.resource[v].name)+": ";k=k.replace("_"," "),f(w,u[w](),k,g)}}),p&&(r.hasOwnProperty("effect")||a.append(o),o.append(d),s&&o.append(h))}}function P_(a,r){a.click(function(){window.location.hash=`#${r}`,document.getElementById(r).scrollIntoView({block:"start",behavior:"smooth"})})}function M(a,r,i,s){if(a==="create"){let n=r?typeof r=="string"?$(`#${r}`):r:$("#content");A(n),n.addClass("flex");let c=$('
          '),o=$('
          '),l=$("
            ");return n.append(c),n.append(o),o.append(l),c}else{let n=$(`${s}`),c=$("
          • ");c.append(n),$("#sideContent ul").append(c),P_(n,i)}}function st(a,r,i,s){M(a,r,i,"\u1102"+s)}function ee(a){return["moon","belt"].includes(a)?t("space_"+a+"_info_name"):["kuiper"].includes(a)?t("space_"+a+"_title"):S()[a]}function Jn(a,r,i,s){let n=$("
            ");a.append(n),n.append(`{{ vis | label }}`);let c=$(``);n.append(c);let o=document.getElementById(r+i+"Section"),l={vis:!1};return C({el:`#${r}${i}Button`,data:l,methods:{show(){o.style.display==="block"?(o.style.display="none",l.vis=!1):(o.style.display="block",l.vis=!0)}},filters:{label(u){return u?t("wiki_reveal_hide",[s]):t("wiki_reveal_show",[s])}}}),c}function ne(a,r,i,s){s=s||t("wiki_calc_insert_"+i);let n=$("
            ");a.append(n),n.append(`{{ vis | label }}`);let c=$(``);n.append(c);let o=document.getElementById(r+i+"Section"),l={vis:!1};return C({el:`#${r}${i}Button`,data:l,methods:{show(){o.style.display==="block"?(o.style.display="none",l.vis=!1):(o.style.display="block",l.vis=!0)}},filters:{label(u){return u?t("wiki_calc_hide",[s]):t("wiki_calc_show",[s])}}}),c}function Ko(a){let r=$("#content");switch(A(r),a){case"races":Zn(r);break;case"traits":Xn(r);break;case"custom":M_(r);break}}function M_(a){y(a,{name:"custom",template:"mechanics",label:t("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],full:!0,h_level:2,para_data:{1:[t("wiki_resets_ascension")],2:[t("wiki_resets_ascension")],5:[t("resource_Genes_name")],6:[t("resource_Genes_name")],7:[2],8:[t("achieve_technophobe_name"),5,7],9:[t("tech_fanaticism"),t("tech_deify")],11:[0,t("resource_Genes_name")],12:[t("resource_Genes_name"),t("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[e.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}});let r=$('
            ');a.append(r),br(r)}var Ss={angelic:["phagocytosis","mammals","celestial"],aquatic:["phagocytosis","aquatic"],avian:["phagocytosis","eggshell","endothermic"],carnivore:["phagocytosis","mammals","animalism","carnivore"],demonic:["phagocytosis","mammals","demonic"],eldritch:["phagocytosis","eldritch"],fey:["phagocytosis","fey"],fungi:["chitin"],giant:["phagocytosis","mammals","gigantism"],heat:["phagocytosis","heat"],herbivore:["phagocytosis","mammals","animalism","herbivore"],humanoid:["phagocytosis","mammals","humanoid"],insectoid:["phagocytosis","athropods"],plant:["chloroplasts"],polar:["phagocytosis","polar"],reptilian:["phagocytosis","eggshell","ectothermic"],sand:["phagocytosis","sand"],small:["phagocytosis","mammals","dwarfism"],synthetic:["exterminate"]};Object.keys(Ss).forEach(function(a){Ss[a]=Ss[a].map(function(r){return typeof q.evolution[r].title=="function"?q.evolution[r].title():q.evolution[r].title}).join(" -> ")});function Zn(a){a=M("create",a);let r=[];Object.keys(x).forEach(function(i){if(i==="custom"&&!e.custom.hasOwnProperty("race0")||i==="protoplasm")return;let s=$(`
            `);a.append(s),s.append(`

            ${x[i].name}

            ${t(`genelab_genus_${x[i].type}`)}
            `),s.append(`
            ${typeof x[i].desc=="string"?x[i].desc:x[i].desc()}
            `);let n=[],c=C_(i),o=$('
            ');Object.keys(vt[x[i].type]).sort().forEach(function(l){let u=`raceTrait${i}${l}`,d=x[i].fanaticism===l?"danger":"caution";o.append(`${b[l].name}`),n.push({t:l,r:1})}),Object.keys(x[i].traits).sort().forEach(function(l){let u=`raceTrait${i}${l}`,d=x[i].fanaticism===l?"danger":"info";o.append(`${b[l].name}`),n.push({t:l,r:x[i].traits[l]})});for(let l=0;l${b[c[l].t].name}`),n.push(c[l])}s.append(o),r.push(i),B(`genus${i}`,$(`
            ${t(`genelab_genus_${x[i].type}_desc`)}

            ${Ss[x[i].type]}
            `),{wide:!0,classes:"w25"});for(let l=0;l");Ma(d,n[l].t,{fanatic:n[l].t===x[i].fanaticism?x[i].name:!1,trank:n[l].r,wiki:!0}),B(u,d,{wide:!0,classes:"w25"})}}),r.sort((i,s)=>x[i].name=17?[{t:"slaver",r:2},{t:"resourceful",r:.5},{t:"small",r:.25}]:[];case"capybara":return r.getMonth()===11&&r.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"pack_rat",r:.5},{t:"musical",r:.25}]:[];case"centaur":return r.getMonth()===11&&r.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"curious",r:.5},{t:"blissful",r:.25}]:[];case"wendigo":return r.getMonth()===11&&r.getDate()>=17?[{t:"immoral",r:3},{t:"cannibalize",r:.5},{t:"claws",r:.25}]:[];case"yeti":return r.getMonth()===11&&r.getDate()>=17?[{t:"scavenger",r:3},{t:"regenerative",r:.5},{t:"musical",r:.25}]:[];case"entish":return r.getMonth()===11&&r.getDate()>=17?[{t:"photosynth",r:3},{t:"optimistic",r:.5},{t:"armored",r:.25}]:[];default:return[]}}function Xn(a){a=M("create",a);let r=[["genus","major"],["minor"],["special"]];for(let i=0;iTt("name",s).localeCompare(Tt("name",n))).forEach(function(s){if(r[i].includes(b[s].type)){let n=$(`
            `);a.append(n),Ma(n,s,{tpage:!0,wiki:!0}),M("add","traits-species",`${b[s].type}_${s}`,Tt("name",s))}})}function dr(a){let r=$('
            '),i=Bo(a,{name:"planet",template:"planet",paragraphs:4,full:!0,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});y(a,{name:"geology",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},i);let s=No(he,$(`

            ${t("wiki_planet_biome")}

            `)),n=No(Fe,$(`

            ${t("wiki_planet_trait")}

            `));r.append(s),r.append(n),a.append(r)}var Go={oceanic:["trait","genus"],forest:["genus"],desert:["trait","genus"],volcanic:["weather","genus"],tundra:["weather","genus"],savanna:["condition"],swamp:["trait","trait2","genus","condition"],ashland:["weather","trait","genus","condition"],taiga:["weather","genus","condition"],hellscape:["weather","genus","universe"],eden:["geology","genus","universe"],stormy:["trait"],ozone:["trait"],trashed:["trait"],elliptical:["trait"],flare:["event"],unstable:["trait","event"],permafrost:["trait"],retrograde:["trait"]};function No(a,r){return Object.keys(a).forEach(function(i){let s=a[i],n=$(`
            `);r.append(n),n.append(`

            ${s.label}

            `),n.append(`
            ${s.desc}
            `);let c=$('
            ');if(s.vars&&s.wiki)for(let o=0;o${t(`wiki_planet_${i}${o}`,[O_(s.vars()[o],l)])}
            `))}n.append(c),Go[i]&&Go[i].forEach(function(o){n.append($(`
            ${t(`wiki_planet_${i}_${o}`)}
            `))})}),r}function O_(a,r){let i=a-1*(r==="percent"||r==="inverted"?1:0);(r==="inverted"||r==="inverted-decimal")&&(i*=-1,r==="inverted"?r="percent":r="decimal");let s=(i>=0?"+":"")+i.toLocaleString(e.settings.locale,{style:r,maximumFractionDigits:2});return`${s}`}function ec(a,r){let i=M("create");switch(a){case"prehistoric":S_(i,r);break;case"planetary":j_(i,r);break;case"space":F_(i,r);break;case"interstellar":z_(i);break;case"intergalactic":A_(i);break;case"hell":T_(i);break;case"tauceti":I_(i);break}}var Yn={prehistoric:{},planetary:{slaughter:[t("wiki_structure_planetary_slaughter")]},space:{terraformer:[t("wiki_structure_space_terraformer")],terraform:[t("wiki_structure_space_terraformer")]},starDock:{geck:[t("wiki_structure_stardock_geck")]},interstellar:{},intergalactic:{},hell:{},tauceti:{}};function pr(a,r,i){if(Yn[r].hasOwnProperty(i)){let s=$('
            ');a.append(s);for(let n=0;n${Yn[r][i][n]}`)}}var Nt={include:{prehistoric:["membrane","organelles","nucleus","eukaryotic_cell","mitochondria"]},exclude:{planetary:["food","lumber","stone","chrysotile","slaughter","slave_market",""],space:["test_launch","moon_mission","terraform","red_mission","hell_mission","sun_mission","gas_mission","gas_moon_mission","belt_mission","dwarf_mission","titan_mission","enceladus_mission","triton_mission","kuiper_mission","eris_mission","crashed_ship","digsite"],starDock:["prep_ship","launch_ship"],interstellar:["alpha_mission","proxima_mission","nebula_mission","neutron_mission","blackhole_mission","jump_ship","wormhole_mission","sirius_mission","sirius_b","ascend"],intergalactic:["gateway_mission","gorddon_mission","alien2_mission","chthonian_mission"],hell:["pit_mission","assault_forge","ruins_mission","gate_mission","lake_mission","spire_mission","bribe_sphinx","spire_survey","spire","devilish_dish","oven_done"],tauceti:["home_mission","dismantle","excavate","alien_outpost","red_mission","matrix","roid_mission","alien_station_survey","contact","introduce","subjugate","gas_contest","gas_contest2","ignite_gas_giant","jeff","goe_facility"]},excludeCreep:{planetary:["horseshoe"],space:["horseshoe"],hell:["ancient_pillars","sphinx","waygate"],tauceti:["horseshoe"]},max:{prehistoric:{},planetary:{s_alter:1,banquet:5},space:{star_dock:1,terraformer:100,world_collider:1859,shipyard:1,mass_relay:100,fob:1,ai_core:100,jump_gate:100},starDock:{seeder:100},interstellar:{dyson:100,dyson_sphere:100,orichalcum_sphere:100,stellar_engine:100,stargate:200,space_elevator:100,gravity_dome:100,ascension_machine:100},intergalactic:{embassy:1,consulate:1},hell:{soul_forge:1,vault:2,ancient_pillars:Object.keys(x).length-1,west_tower:Ke(),east_tower:Ke(),bridge:10,sphinx:2,waygate:10,oven:100},tauceti:{alien_outpost:1,jump_gate:100,ringworld:1e3,alien_station:100,matrioshka_brain:1e3,ignition_device:10}},count:{planetary:{horseshoe:e.race.shoecnt?e.race.shoecnt:0,assembly:e.resource[e.race.species]?e.resource[e.race.species].amount:0},space:{horseshoe:e.race.shoecnt?e.race.shoecnt:0,assembly:e.resource[e.race.species]?e.resource[e.race.species].amount:0},interstellar:{},intergalactic:{},hell:{ancient_pillars:Object.keys(e.pillars).length,sphinx:!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2,waygate:e.tech.waygate&&e.tech.waygate>=2?10:e.portal.waygate?e.portal.waygate.count:0},tauceti:{}},creepCalc:{planetary:{assembly:1e3},space:{assembly:1e3,swarm_satellite:200}}},Ro={terraformer:["truepath"]};function hr(a,r,i,s,n){let c=Nt.max[i]&&Nt.max[i][r]?Nt.max[i][r]:!1,o={owned:0,costVis:!1,creepVis:!1,extra:{isWiki:!0,truepath:n==="truepath"}},l={},u=!1;switch(i){case"prehistoric":u=q.evolution[r],o.real_owned=e.evolution[r]?e.evolution[r].count:0;break;case"planetary":u=q.city[r],o.real_owned=e.city[r]?e.city[r].count:0;break;case"space":u=q.space[s][r],o.real_owned=e.space[r]?e.space[r].count:0;break;case"starDock":u=q.starDock[r],o.real_owned=e.starDock[r]?e.starDock[r].count:0;break;case"interstellar":u=q.interstellar[s][r],o.real_owned=e.interstellar[r]?e.interstellar[r].count:0;break;case"intergalactic":u=q.galaxy[s][r],o.real_owned=e.galaxy[r]?e.galaxy[r].count:0;break;case"hell":u=q.portal[s][r],o.real_owned=e.portal[r]?e.portal[r].count:0;break;case"tauceti":u=q.tauceti[s][r],o.real_owned=e.tauceti[r]?e.tauceti[r].count:0;break}Nt.count[i]&&Nt.count[i][r]&&(o.real_owned=Nt.count[i][r]);let d=function(){if(u.hasOwnProperty("effect")&&typeof u.effect!="string"){let g=$(".effect",`#${r}`);A(g);let w={isWiki:!0,count:o.owned-o.real_owned};Ro[r]&&Ro[r].forEach(function(v){switch(v){case"truepath":w[v]=n==="truepath";break}}),g.append(u.effect(w))}};d();let h=u.cost;h&&Object.keys(_t(u)).forEach(function(g){l[g]={}});let p=function(){let g=!1;if(h){let w=_t(u,o.owned-o.real_owned,o.extra);Object.keys(l).forEach(function(v){if(v==="Custom")l[v].vis=!0;else{let k=w[v]?w[v](o.owned-o.real_owned,o.extra):0;l[v].vis=k>0,l[v].cost=Y(k,1)}g=g||l[v].vis})}o.costVis=g};p();let f=function(){let g=!1;if(h&&!c&&!(Nt.excludeCreep[i]&&Nt.excludeCreep[i].includes(r))&&i!=="prehistoric"){let w=Nt.creepCalc[i]&&Nt.creepCalc[i][r]?Nt.creepCalc[i][r]:100,v=w-1,k=_t(u,w,o.extra),P=_t(u,v,o.extra);Object.keys(l).forEach(function(j){k[j]&&(l[j].creep=+(k[j](w,o.extra)/P[j](v,o.extra)).toFixed(5),l[j].creep===1?l[j].creep=t("wiki_calc_none"):l[j].creep<1.005&&(l[j].creep=1.005),g=g||l[j].vis)})}o.creepVis=g};(Nt.include[i]&&Nt.include[i].includes(r)||Nt.exclude[i]&&!Nt.exclude[i].includes(r))&&(f(),a.append($(` + `;case"meat":return''}}function Xt(a){switch(a){case"star":return"0 0 640 640";case"atom":return"0 0 100 88.379";case"heavy":return"0 0 24 24";case"evil":return"0 0 240 240";case"micro":return"0 0 276 276";case"magic":return"0 0 2666 2666";case"rocket":return"0 0 165 173";case"sun":return"0 0 48 48";case"heart":return"0 0 20 16";case"clover":return"0 0 660.51 780.1";case"candy":return"0 0 200 200";case"ghost":return"0 0 399 432.23";case"turkey":return"0 0 250 300";case"present":return"0 0 410.98 434.75";case"nuclear":return"0 0 101.22 101.22";case"zombie":return"0 0 175 304";case"fire":return"0 0 615.18 879.36";case"mask":return"0 0 24 24";case"skull":return"0 0 256.27 300.86";case"taijitu":return"0 -10 256 256 ";case"pizza":return"0 0 217.444 144.397";case"trash":return"0 0 15 15";case"party":return"0 0 528.69 983.1";case"martini":return"0 0 15 15";case"lightbulb":return"0 0 100 156";case"bunny":return"0 0 128 128";case"egg":return"0 0 273.61 295.02";case"ant":return"0 0 128 128";case"turtle":return"20 40 270 50";case"candycorn":return"0 0 325 449.98";case"banana":return"0 0 113.38582 111.81719";case"firework":return"0 10 12 35";case"floppy":return"0 0 60 60";case"slime":return"0 0 552 495";case"lightning":return"0 0 16 16";case"meat":return"0 0 200 200"}}function Mr(a,r){if(r==="feat")switch(a){case"steelem":return"nuclear";case"the_misery":return"zombie";case"ill_advised":return"fire";case"garbage_pie":return"trash";case"demon_slayer":return"skull";case"equilibrium":return"taijitu";case"utopia":return"martini";case"energetic":return"lightbulb";case"finish_line":return"turtle";case"banana":return"banana";case"digital_ascension":return"floppy";case"slime_lord":return"slime";case"annihilation":return"lightning";case"friday":return"mask";case"valentine":return"heart";case"leprechaun":return"clover";case"easter":return"bunny";case"launch_day":return"rocket";case"solstice":return"sun";case"firework":return"firework";case"egghunt":return"egg";case"halloween":return"ghost";case"trickortreat":return"candy";case"thanksgiving":return"turkey";case"xmas":return"present";case"immortal":return"meat";default:return"star"}return e.settings.icon}function fn(a,r,i,s,n){let c="";return s&&(c=`id="${s}" `),n=n||"",`${Zt(a)}`}function Ze(a,r){let i=ri(),s=new Date;return i.active&&!e.special.egg[s.getFullYear()][`egg${a}`]?fn("egg",r||16,2,`egg${a}`,'role="button" aria-label="Egg" '):""}function pt(a,r,i){let s=oa(),c=new Date().getFullYear(),o=i?"trick":"treat";if(s.active&&!e.special.trick[c][`${o}${a}`]){let l=i?"Ghost":"Candy Corn";return fn(i?"ghost":"candycorn",r||16,2,`${o}${a}`,`role="button" aria-label="${l}" `)}return""}function ga(a,r,i,s,n,c){return e.stats.achieve[a]&&(n?e.stats.achieve[a][c]-1:e.stats.achieve[a][c])>0?`

            ${Zt(i)}${ii(e.stats.achieve[a][c])} ${s}

            `:""}function Ne(a,r,i,s,n){r||(r=10),i||(i=Mr(a,"achievement"));let c="";if(!n)c=c+ga(a,r,i,t(e.settings.icon),s,"l"),c=c+ga(a,r,"atom",t("universe_antimatter"),s,"a"),c=c+ga(a,r,"evil",t("universe_evil"),s,"e"),c=c+ga(a,r,"heavy",t("universe_heavy"),s,"h"),c=c+ga(a,r,"micro",t("universe_micro"),s,"m"),c=c+ga(a,r,"magic",t("universe_magic"),s,"mg");else switch(n){case"standard":c=c+ga(a,r,i,t(e.settings.icon),s,"l");break;case"antimatter":c=c+ga(a,r,"atom",t("universe_antimatter"),s,"a");break;case"evil":c=c+ga(a,r,"evil",t("universe_evil"),s,"e");break;case"heavy":c=c+ga(a,r,"heavy",t("universe_heavy"),s,"h");break;case"micro":c=c+ga(a,r,"micro",t("universe_micro"),s,"m");break;case"magic":c=c+ga(a,r,"magic",t("universe_magic"),s,"mg");break}return c}function Ka(a,r){return r=r||{},r[a]?r[a]:a<=1?1:r[a]=Ka(a-1,r)+Ka(a-2,r)}function Si(a){var r=Object.keys(a);return r[r.length*Math.random()<<0]}function ii(a){switch(a){case 1:return t("basic");case 2:return t("plain");case 3:return t("bronze");case 4:return t("silver");case 5:return t("gold");default:return""}}function Ia(a,r){let i=0;if(r)Object.keys(r.ascended).forEach(function(c){i+=r.ascended[c]});else if(e.stats.achieve.ascended)for(let c=0;c=1&&(s+=e.stats.achieve.technophobe.l);let n=0;for(let c=0;c=0&&(n>s&&(o-=s-n),n++),i-=o}return i}function _a(){e.stats.reset++,e.stats.tdays+=e.stats.days,e.stats.days=0,e.stats.tknow+=e.stats.know,e.stats.know=0,e.stats.tstarved+=e.stats.starved,e.stats.starved=0,e.stats.tdied+=e.stats.died,e.stats.died=0,e.stats.tsac+=e.stats.sac,e.stats.sac=0,e.stats.tcattle+=e.stats.cattle,e.stats.cattle=0,e.stats.tmurders+=e.stats.murders,e.stats.murders=0,e.stats.tpsykill+=e.stats.psykill,e.stats.psykill=0}function Be(a){if(a===null||typeof a!="object")return a;if(a instanceof Date)return new Date(a.getTime());if(Array.isArray(a)){var r=[];return a.forEach(function(n){r.push(Be(n))}),r}let i=new a.constructor;for(var s in a)a.hasOwnProperty(s)&&(i[s]=Be(a[s]));return i}function We(a,r,i){switch(a){case"reverse":{let s=r.toLowerCase().split("").reverse().join("");return s.charAt(0).toUpperCase()+s.slice(1)}case"name":return xe("fool",2021)?We("reverse",x[e.race.species].name):x[e.race.species].name;case"curve":{let s=i||1.5;return 1-(1-r)**s}}return!1}function xe(a,r){switch(a){case"easter":return ri();case"halloween":return oa();case"fool":{let i=new Date;return!e.settings.boring&&i.getMonth()===3&&i.getDate()===1?r?i.getFullYear()===r:!0:!1}case"launch_day":{let i=new Date;return!e.settings.boring&&i.getMonth()===4&&i.getDate()===6}case"summer":{let i=new Date;return!e.settings.boring&&i.getMonth()===5&&[20,21,22].includes(i.getDate())?(e.city.hasOwnProperty("foundry")&&!e.city.foundry.hasOwnProperty("Thermite")&&(e.city.foundry.Thermite=0),e.resource.hasOwnProperty("Thermite")||(e.resource.Thermite={name:t("resource_Thermite_name"),display:!1,value:0,amount:0,crates:0,diff:0,delta:0,max:-1,rate:0}),!0):(e.city.hasOwnProperty("foundry")&&e.city.foundry.hasOwnProperty("Thermite")&&(e.city.foundry.crafting-=e.city.foundry.Thermite,e.civic.craftsman.workers-=e.city.foundry.Thermite,e.civic[e.civic.d_job].workers+=e.city.foundry.Thermite,delete e.city.foundry.Thermite),!1)}case"firework":{let i=new Date;if(!e.settings.boring&&i.getMonth()===6&&[1,2,3,4].includes(i.getDate())){let s=e.race.cataclysm||e.race.orbit_decayed?"space":"city";return e[s].hasOwnProperty("firework")||(e[s].firework={count:0,on:0}),!0}else(e.city.hasOwnProperty("firework")||e.space.hasOwnProperty("firework"))&&(delete e.city.firework,delete e.space.firework);return!1}}return!1}function ri(){let a=new Date,r=a.getFullYear();e.special.egg.hasOwnProperty(r)||(e.special.egg[r]={egg1:!1,egg2:!1,egg3:!1,egg4:!1,egg5:!1,egg6:!1,egg7:!1,egg8:!1,egg9:!1,egg10:!1,egg11:!1,egg12:!1}),e.special.egg.hasOwnProperty(r)&&!e.special.egg[r].hasOwnProperty("egg13")&&(e.special.egg[r].egg13=!1,e.special.egg[r].egg14=!1,e.special.egg[r].egg15=!1),e.special.egg.hasOwnProperty(r)&&!e.special.egg[r].hasOwnProperty("egg16")&&(e.special.egg[r].egg16=!1,e.special.egg[r].egg17=!1,e.special.egg[r].egg18=!1);let i=Math.floor,s=r%19,n=i(r/100),c=(n-i(n/4)-i((8*n+13)/25)+19*s+15)%30,o=c-i(c/28)*(1-i(29/(c+1))*i((21-s)/11)),l=(r+i(r/4)+o+2-n+i(n/4))%7,u=o-l,d=3+i((u+40)/44),h=u+28-31*i(d/4),p={date:[d-1,h],active:!1,endDate:[d-1,h],hint:!1,hintDate:[d-1,h],solve:!1,solveDate:[d-1,h]};if(e.settings.boring)return p;p.endDate[1]+=10,(p.endDate[0]===2&&p.endDate[1]>31||p.endDate[0]===3&&p.endDate[1]>30)&&(p.endDate[1]-=p.endDate[0]===2?31:30,p.endDate[0]++),p.hintDate[1]+=1,(p.hintDate[0]===2&&p.hintDate[1]>31||p.hintDate[0]===3&&p.hintDate[1]>30)&&(p.hintDate[1]-=p.hintDate[0]===2?31:30,p.hintDate[0]++),p.solveDate[1]+=3,(p.solveDate[0]===2&&p.solveDate[1]>31||p.solveDate[0]===3&&p.solveDate[1]>30)&&(p.solveDate[1]-=p.solveDate[0]===2?31:30,p.solveDate[0]++);let f=a.getDate(),g=a.getMonth(),w=g>p.date[0]||g===p.date[0]&&f>=p.date[1],v=g=p.hintDate[0]&&f>=p.hintDate[1]&&g<=p.endDate[0]&&f<=p.endDate[1]&&(p.hint=!0),g>=p.solveDate[0]&&f>=p.solveDate[1]&&g<=p.endDate[0]&&f<=p.endDate[1]&&(p.solve=!0)),p}function oa(){let a=new Date,r=a.getFullYear();e.special.trick.hasOwnProperty(r)||(e.special.trick[r]={trick1:!1,trick2:!1,trick3:!1,trick4:!1,trick5:!1,trick6:!1,trick7:!1,treat1:!1,treat2:!1,treat3:!1,treat4:!1,treat5:!1,treat6:!1,treat7:!1});let i={date:[9,28],active:!1,endDate:[10,4],hint:!1,hintDate:[9,29],solve:!1,solveDate:[9,31]};if(e.settings.boring)return i;let s=new Date(`${i.date[0]+1}/${i.date[1]}/${r}`),n=new Date(`${i.endDate[0]+1}/${i.endDate[1]}/${r}`);if(a>=s&&a<=n){i.active=!0;let c=new Date(`${i.hintDate[0]+1}/${i.hintDate[1]}/${r}`);a>=c&&a<=n&&(i.hint=!0);let o=new Date(`${i.solveDate[0]+1}/${i.solveDate[1]}/${r}`);a>=o&&a<=n&&(i.solve=!0)}return i}function Kn(){return e.race.magnificent&&e.city.hasOwnProperty("shrine")&&e.city.shrine.count>0}function Yr(a){let r={mult:1,add:0};if(Kn())switch(a){case"metal":r.mult+=+(e.city.shrine.metal/100*b.magnificent.vars()[3]);break;case"tax":r.mult+=+(e.city.shrine.tax/100*b.magnificent.vars()[2]);break;case"know":r.add+=+(e.city.shrine.know*b.magnificent.vars()[0]),r.mult+=+(e.city.shrine.know*b.magnificent.vars()[1]/100);break;case"morale":r.add+=e.city.shrine.morale*b.magnificent.vars()[4];break;default:break}return r}var Fo={promiscuous:!1,revive:!1,fast_growth:!1,spores:!1,terrifying:!1,fibroblast:!0,hivemind:!0,imitation:!0,elusive:!0,chameleon:!0,blood_thirst:!0,selenophobia:!0,hooved:!0,anthropophagite:!0,unfathomable:!1,darkness:!1,living_tool:!1};function zo(a,r){let i=b[a].hasOwnProperty("vars")?b[a].vars(r):[];return Fo.hasOwnProperty(a)&&(a==="fibroblast"?i=[i[0]*5]:a==="hivemind"&&e.race.high_pop?i=[i[0]*b.high_pop.vars()[0]]:a==="imitation"?i.push(x[e.race.srace||"protoplasm"].name):a==="elusive"?i=[Math.round((1/30/(1/(30+i[0]))-1)*100)]:a==="chameleon"?i=[i[0],Math.round((1/30/(1/(30+i[1]))-1)*100)]:a==="blood_thirst"?i=[Math.ceil(Math.log2(i[0]))]:a==="selenophobia"?i=[14-i[0],i[0]]:a==="hooved"?i.unshift(xt()):a==="anthropophagite"?i=[i[0]*1e4]:Fo[a]||(i=[])),i}function xt(a){return e.race.sludge?a?"craft":t("resource_Beaker_name"):e.race.species==="cath"?a?"craft":t("resource_Box_name"):e.race.species==="wolven"?a?"craft":t("resource_ChewToy_name"):e.race.species==="dracnid"?a?"craft":t("resource_Hoard_name"):e.race.species==="seraph"?a?"forge":t("resource_Halo_name"):e.race.species==="cyclops"?a?"craft":t("resource_Monocle_name"):e.race.species==="kobold"?a?"craft":t("resource_Candle_name"):e.race.species==="tuskin"?a?"craft":t("resource_Goggles_name"):e.race.species==="sharkin"?a?"craft":t("resource_ToothSharpener_name"):x[e.race.species].type==="humanoid"?a?"craft":t("resource_Sandals_name"):x[e.race.species].type==="avian"?a?"craft":t("resource_Perch_name"):x[e.race.species].type==="plant"?a?"craft":t("resource_Planter_name"):x[e.race.species].type==="fungi"?a?"craft":t("resource_DampCloth_name"):x[e.race.species].type==="reptilian"?a?"craft":t("resource_HeatRock_name"):x[e.race.species].type==="fey"?a?"craft":t("resource_PixieDust_name"):x[e.race.species].type==="synthetic"?a?"craft":t("resource_Battery_name"):a?"forge":t("resource_Horseshoe_name")}var Ao={infiltrator:[t("wiki_trait_effect_infiltrator_ex1"),t("wiki_trait_effect_infiltrator_ex2",[[`${t("tech_steel")}`,`${t("tech_electricity")}`,`${t("tech_electronics")}`,`${t("tech_fission")}`,`${t("tech_rocketry")}`,`${t("tech_artificial_intelligence")}`,`${t("tech_quantum_computing")}`,`${t("tech_virtual_reality")}`,`${t("tech_shields")}`,`${t("tech_ai_core")}`,`${t("tech_graphene_processing")}`,`${t("tech_nanoweave")}`,`${t("tech_orichalcum_analysis")}`,`${t("tech_infernium_fuel")}`].join(", ")])],heavy:[t("wiki_trait_effect_heavy_ex1",[Rn("Stone"),Rn("Cement"),Rn("Wrought_Iron")])],sniper:[t("wiki_trait_effect_sniper_ex1")],hooved:[t("wiki_trait_effect_hooved_ex1",[xt(!1)]),t("wiki_trait_effect_hooved_ex2",[`${e.resource.hasOwnProperty("Lumber")?e.resource.Lumber.name:t("resource_Lumber_name")}`,`${e.resource.hasOwnProperty("Copper")?e.resource.Copper.name:t("resource_Copper_name")}`,`${e.resource.hasOwnProperty("Iron")?e.resource.Iron.name:t("resource_Iron_name")}`,`${e.resource.hasOwnProperty("Steel")?e.resource.Steel.name:t("resource_Steel_name")}`,`${e.resource.hasOwnProperty("Adamantite")?e.resource.Adamantite.name:t("resource_Adamantite_name")}`,`${e.resource.hasOwnProperty("Orichalcum")?e.resource.Orichalcum.name:t("resource_Orichalcum_name")}`,12,75,150,500,5e3]),t("wiki_trait_effect_hooved_ex3"),t("wiki_trait_effect_hooved_ex4",['5',xt(!1)]),t("wiki_trait_effect_hooved_ex5",[`${e.resource.hasOwnProperty("Lumber")?e.resource.Lumber.name:t("resource_Lumber_name")}`,`${e.resource.hasOwnProperty("Copper")?e.resource.Copper.name:t("resource_Copper_name")}`])],instinct:[t("wiki_trait_effect_instinct_ex1",[6.67,t("galaxy_chthonian"),10])],logical:[t("wiki_trait_effect_logical_ex1",[e.tech.hasOwnProperty("science")?e.tech.science:0,e.tech.hasOwnProperty("high_tech")?e.tech.high_tech:0])],high_pop:[t("wiki_trait_effect_high_pop_ex1")],flier:[t("wiki_trait_effect_flier_ex1")],unfathomable:[t("wiki_trait_effect_unfathomable_ex1"),t("wiki_trait_effect_unfathomable_ex2")]};function Rn(a){return`${e.hasOwnProperty("resource")&&e.resource.hasOwnProperty(a)?e.resource[a].name:t(`resource_${a}_name`)}`}function Ma(a,r,i){let s=i.fanatic||!1,n=i.tpage||!1,c=i.trank||!1,o=i.wiki||!1,l="",u=Tt("name",r),d=Tt("desc",r);n&&["genus","major"].includes(b[r].type)&&(l=`«${t("wiki_trait_rank")} {{ rank }}»`),o&&a.append(`

            ${u}

            ${l}
            `),o&&(n&&b[r].hasOwnProperty("val")?a.append(`
            ${t(`wiki_trait_${b[r].type}`)}${t("wiki_trait_value",[b[r].val])}
            `):a.append(`
            ${t(`wiki_trait_${b[r].type}`)}
            `)),s&&o&&a.append(`
            ${t("wiki_trait_fanaticism",[s])}
            `),a.append(`
            ${d}
            `);let h="warning";if(b[r].hasOwnProperty("val")&&(h=b[r].val>=0?"success":"danger"),n&&["genus","major"].includes(b[r].type)?a.append(`
            `):(o||e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0)&&a.append(`
            ${t(`wiki_trait_effect_${r}`,zo(r,c))}
            `),Ao[r]&&o&&Ao[r].forEach(function(p){a.append(`
            ${p}
            `)}),n&&["genus","major"].includes(b[r].type)){let p={rank:e.race[r]||1};C({el:`#${b[r].type}_${r}`,data:p,methods:{getTraitDesc(f){return t(`wiki_trait_effect_${r}`,zo(r,f))},up(){switch(p.rank){case .25:p.rank=.5;break;case .5:p.rank=1;break;case 1:p.rank=2;break;case 2:p.rank=3;break;case 3:p.rank=3;break}},down(){switch(p.rank){case .25:p.rank=.25;break;case .5:p.rank=.25;break;case 1:p.rank=.5;break;case 2:p.rank=1;break;case 3:p.rank=2;break}}}})}}var Eo={misc:["apocalypse","ascended","dreaded","anarchist","second_evolution","blackhole","warmonger","red_tactics","pacifist","neutralized","paradise","scrooge","madagascar_tree","godwin","laser_shark","infested","mass_starvation","colonist","world_domination","illuminati","syndicate","cult_of_personality","doomed","pandemonium","blood_war","landfill","seeder","miners_dream","shaken","blacken_the_sun","trade","resonance","enlightenment","gladiator","corrupted","red_dead"],species:["mass_extinction","extinct_human","extinct_elven","extinct_orc","extinct_cath","extinct_wolven","extinct_vulpine","extinct_centaur","extinct_rhinotaur","extinct_capybara","extinct_kobold","extinct_goblin","extinct_gnome","extinct_ogre","extinct_cyclops","extinct_troll","extinct_tortoisan","extinct_gecko","extinct_slitheryn","extinct_arraak","extinct_pterodacti","extinct_dracnid","extinct_entish","extinct_cacti","extinct_pinguicula","extinct_sporgar","extinct_shroomi","extinct_moldling","extinct_mantis","extinct_scorpid","extinct_antid","extinct_sharkin","extinct_octigoran","extinct_dryad","extinct_satyr","extinct_phoenix","extinct_salamander","extinct_yeti","extinct_wendigo","extinct_tuskin","extinct_kamel","extinct_balorg","extinct_imp","extinct_seraph","extinct_unicorn","extinct_synth","extinct_nano","extinct_ghast","extinct_shoggoth","extinct_junker","extinct_sludge","extinct_custom"],genus:["creator","genus_humanoid","genus_carnivore","genus_herbivore","genus_small","genus_giant","genus_reptilian","genus_avian","genus_insectoid","genus_plant","genus_fungi","genus_aquatic","genus_fey","genus_heat","genus_polar","genus_sand","genus_demonic","genus_angelic","genus_synthetic","genus_eldritch"],planet:["explorer","biome_grassland","biome_oceanic","biome_forest","biome_desert","biome_volcanic","biome_tundra","biome_savanna","biome_swamp","biome_ashland","biome_taiga","biome_hellscape","biome_eden","atmo_toxic","atmo_mellow","atmo_rage","atmo_stormy","atmo_ozone","atmo_magnetic","atmo_trashed","atmo_elliptical","atmo_flare","atmo_dense","atmo_unstable","atmo_permafrost","atmo_retrograde"],universe:["vigilante","squished","double_density","cross","macro","marble","heavyweight","whitehole","heavy","canceled","eviltwin","microbang","pw_apocalypse","fullmetal","pass","soul_sponge","nightmare","escape_velocity"],challenge:["joyless","steelen","dissipated","technophobe","wheelbarrow","iron_will","failed_history","banana","pathfinder","ashanddust","exodus","obsolete","bluepill","retired","gross","lamentis","overlord","adam_eve","endless_hunger"]},Lo={colonist:[We("name")]},Do={trade:[750,50]},ze={};Object.keys(Eo).forEach(function(a){Eo[a].forEach(r=>ze[r]={name:t(`achieve_${r}_name`),desc:Do[r]?t(`achieve_${r}_desc`,Do[r]):t(`achieve_${r}_desc`),flair:Lo[r]?t(`achieve_${r}_flair`,Lo[r]):t(`achieve_${r}_flair`),type:a})});var Yt={utopia:{name:t("feat_utopia_name"),desc:t("feat_utopia_desc"),flair:t("feat_utopia_flair")},take_no_advice:{name:t("feat_take_no_advice_name"),desc:t("feat_take_no_advice_desc"),flair:t("feat_take_no_advice_flair")},ill_advised:{name:t("feat_ill_advised_name"),desc:t("feat_ill_advised_desc"),flair:t("feat_ill_advised_flair")},organ_harvester:{name:t("feat_organ_harvester_name"),desc:t("feat_organ_harvester_desc"),flair:t("feat_organ_harvester_flair")},the_misery:{name:t("feat_the_misery_name"),desc:t("feat_the_misery_desc"),flair:t("feat_the_misery_flair")},energetic:{name:t("feat_energetic_name"),desc:t("feat_energetic_desc"),flair:t("feat_energetic_flair")},garbage_pie:{name:t("feat_garbage_pie_name"),desc:t("feat_garbage_pie_desc"),flair:t("feat_garbage_pie_flair")},finish_line:{name:t("feat_finish_line_name"),desc:t("feat_finish_line_desc"),flair:t("feat_finish_line_flair")},blank_slate:{name:t("feat_blank_slate_name"),desc:t("feat_blank_slate_desc"),flair:t("feat_blank_slate_flair")},supermassive:{name:t("feat_supermassive_name"),desc:t("feat_supermassive_desc"),flair:t("feat_supermassive_flair")},steelem:{name:t("feat_steelem_name"),desc:t("feat_steelem_desc"),flair:t("feat_steelem_flair")},banana:{name:t("feat_banana_name"),desc:t("feat_banana_desc",[500,500]),flair:t("feat_banana_flair")},rocky_road:{name:t("feat_rocky_road_name"),desc:t("feat_rocky_road_desc"),flair:t("feat_rocky_road_flair")},demon_slayer:{name:t("feat_demon_slayer_name"),desc:t("feat_demon_slayer_desc"),flair:t("feat_demon_slayer_flair")},equilibrium:{name:t("feat_equilibrium_name"),desc:t("feat_equilibrium_desc"),flair:t("feat_equilibrium_flair")},digital_ascension:{name:t("feat_digital_ascension_name"),desc:t("feat_digital_ascension_desc"),flair:t("feat_digital_ascension_flair")},novice:{name:t("feat_novice_name"),desc:t("feat_achievement_hunter_desc",[10]),flair:t("feat_novice_flair")},journeyman:{name:t("feat_journeyman_name"),desc:t("feat_achievement_hunter_desc",[25]),flair:t("feat_journeyman_flair")},adept:{name:t("feat_adept_name"),desc:t("feat_achievement_hunter_desc",[50]),flair:t("feat_adept_flair")},master:{name:t("feat_master_name"),desc:t("feat_achievement_hunter_desc",[75]),flair:t("feat_master_flair")},grandmaster:{name:t("feat_grandmaster_name"),desc:t("feat_achievement_hunter_desc",[100]),flair:t("feat_grandmaster_flair")},nephilim:{name:t("feat_nephilim_name"),desc:t("feat_nephilim_desc"),flair:t("feat_nephilim_flair")},twisted:{name:t("feat_twisted_name"),desc:t("feat_twisted_desc"),flair:t("feat_twisted_flair")},slime_lord:{name:t("feat_slime_lord_name"),desc:t("feat_slime_lord_desc"),flair:t("feat_slime_lord_flair")},annihilation:{name:t("feat_annihilation_name"),desc:t("feat_annihilation_desc"),flair:t("feat_annihilation_flair")},immortal:{name:t("feat_immortal_name"),desc:t("feat_immortal_desc"),flair:t("feat_immortal_flair")},friday:{name:t("feat_friday_name"),desc:t("feat_friday_desc"),flair:t("feat_friday_flair")},valentine:{name:t("feat_love_name"),desc:t("feat_love_desc"),flair:t("feat_love_flair")},leprechaun:{name:t("feat_leprechaun_name"),desc:t("feat_leprechaun_desc"),flair:t("feat_leprechaun_flair")},easter:{name:t("feat_easter_name"),desc:t("feat_easter_desc"),flair:t("feat_easter_flair")},egghunt:{name:t("feat_egghunt_name"),desc:t("feat_egghunt_desc"),flair:t("feat_egghunt_flair")},launch_day:{name:t("feat_launch_day_name"),desc:t("feat_launch_day_desc"),flair:t("feat_launch_day_flair")},solstice:{name:t("feat_solstice_name"),desc:t("feat_solstice_desc"),flair:t("feat_solstice_flair")},firework:{name:t("feat_firework_name"),desc:t("feat_firework_desc"),flair:t("feat_firework_flair")},halloween:{name:t("feat_boo_name"),desc:t("feat_boo_desc"),flair:t("feat_boo_flair")},trickortreat:{name:t("feat_trickortreat_name"),desc:t("feat_trickortreat_desc"),flair:t("feat_trickortreat_flair")},thanksgiving:{name:t("feat_gobble_gobble_name"),desc:t("feat_gobble_gobble_desc"),flair:t("feat_gobble_gobble_flair")},xmas:{name:t("feat_xmas_name"),desc:t("feat_xmas_desc"),flair:t("feat_xmas_flair")},fool:{name:t("feat_fool_name"),desc:t("feat_fool_desc"),flair:t("feat_fool_flair")}};{let a=Vn();Vs(a.aLvl),Us(a.uLvl)}function Vn(a){a=a||e.race.universe;let r=ue(a),i=0,s=0;return Object.keys(ze).forEach(function(n){e.stats.achieve[n]&&(i+=e.stats.achieve[n].l>5?5:e.stats.achieve[n].l,e.stats.achieve[n][r]&&(s+=e.stats.achieve[n][r]>5?5:e.stats.achieve[n][r]))}),{aLvl:i,uLvl:s}}function ue(a){switch(a=a||e.race.universe,a){case"evil":return"e";case"antimatter":return"a";case"heavy":return"h";case"micro":return"m";case"magic":return"mg";default:return"l"}}function L(a,r,i,s){if(e.race.universe!=="micro"&&r===!0)return!1;e.settings.msgFilters.achievements.unlocked||(e.settings.msgFilters.achievements.unlocked=!0,e.settings.msgFilters.achievements.vis=!0);let n=dt(),c=!1,o=!1;(typeof i>"u"||i>n)&&(i=n);let l=!0;if(typeof e.stats.achieve[a]>"u"&&(e.stats.achieve[a]={l:0},l=!1),(e.race.universe==="micro"&&r===!0||e.race.universe!=="micro"&&r!==!0)&&e.stats.achieve[a]&&e.stats.achieve[a].l"u"||i>s)&&(i=s),!e.stats.feat[a]||e.stats.feat[a]&&e.stats.feat[a]');$("#stats").append(a);let r=$('
            ');$("#perks").append(r);let i=$('
            ');$("#achieve").append(i),q_(),Qn(),$("body").hasClass("fool")?Gi({fool:!0}):Gi()}function Gi(a){A($("#achievePanel"));let r=$("#achievePanel"),i=0,s=0,n=0,c=0,o=ue(),l=typeof a=="object"&&a.fool?a.fool:!1;if(Object.keys(ze).forEach(function(d){let h=Mr(d,"achievement");if(s++,e.stats.achieve[d]){i++,n+=e.stats.achieve[d].l>5?5:e.stats.achieve[d].l,e.stats.achieve[d][o]&&(c+=e.stats.achieve[d][o]>5?5:e.stats.achieve[d][o]);let p=Ne(d,16,h,l);l&&e.stats.achieve[d].l>1||!l?r.append($(`
            ${ze[d].name}${ze[d].desc}${p}
            `)):l&&e.stats.achieve[d].l===1&&i--}}),Vs(n),Us(c),l&&!e.stats.feat.fool){let d=$(`
            ${Yt.fool.name}${t("feat_fool_spoof")}
            `);r.append(d)}else Object.keys(Yt).forEach(function(d){let h=Mr(d,"feat");if(e.stats.feat[d]){let p=e.stats.feat[d]>1?`

            ${Zt(h)}

            `:"";if(d==="easter"){let f=Ze(4,14);f.length>0&&(p=f)}r.append($(`
            ${Yt[d].name}${Yt[d].desc}${p}
            `))}});let u=pt(5,12,!1);r.prepend(`
            ${t("achieve_draw_achieve_earned",[i,s])}${u}
            `),C({el:"#achievePanel",methods:{flair(d){return ze[d].flair},feat(d){return Yt[d].flair}}}),l&&!e.stats.feat.fool&&$("#thefool").on("mouseover",function(){e.race.universe==="micro"?se("fool",!0):se("fool"),Gi()})}function Ms(){let a=dt();$("#topBar span.flair")&&A($("#topBar span.flair"),!0);let r=Ze(1,14);if(r.length>0&&$("#topBar .planet").after($(r)),a>1&&$("#topBar .planet .flair").length===0){if(r.length===0){let s=Mr("topbar","challenge");$("#topBar .planet").after(`${Zt(s)}`)}let i="";e.race.no_plasmid&&(i+=`
            ${t("evo_challenge_plasmid")}
            `),e.race.weak_mastery&&(i+=`
            ${t("evo_challenge_mastery")}
            `),e.race.no_trade&&(i+=`
            ${t("evo_challenge_trade")}
            `),e.race.no_craft&&(i+=`
            ${t("evo_challenge_craft")}
            `),e.race.no_crispr&&(i+=`
            ${t("evo_challenge_crispr")}
            `),e.race.nerfed&&(i+=`
            ${t("evo_challenge_nerfed")}
            `),e.race.badgenes&&(i+=`
            ${t("evo_challenge_badgenes")}
            `),i.length>0&&$("#topBar .planetWrap .flair").append($(`
            Active Challenge Genes
            ${i}
            `)),B("topbarPlanet",function(s){let n=$('
            ');s.popper.append(n),n.append($(i))},{elm:"#topBar .planetWrap .flair",classes:"has-background-light has-text-dark"})}}function dt(){let a=1;return e.race.no_plasmid&&a++,e.race.no_trade&&a++,e.race.no_craft&&a++,e.race.no_crispr&&a++,e.race.weak_mastery&&a++,e.race.nerfed&&a++,e.race.badgenes&&a++,a>5&&(a=5),a}function da(){let a=dt();for(let c=a;c>=0;c--)Un("extinct_","mass_extinction",25,c),e.race.universe==="evil"&&Wn("extinct_","vigilante",12,c),Un("genus_","creator",9,c),Un("biome_","explorer",6,c),e.race.universe==="heavy"&&Wn("genus_","heavyweight",8,c);if(e.tech.supercollider&&e.tech.supercollider>=99&&L("blackhole"),e.stats.starved>=100&&L("mass_starvation"),Math.round(Math.log2(e.civic.garrison.protest+e.civic.garrison.fatigue))>=8&&L("warmonger"),e.stats.died>=250&&L("red_tactics"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=12&&L("landfill"),e.interstellar.stellar_engine&&e.interstellar.stellar_engine.mass>=100&&se("supermassive"),e.tech.piracy&&e.tech.chthonian&&e.tech.chthonian>=2&&e.galaxy){let c=Lt("gxy_chthonian"),o=Lt("gxy_stargate");if(o===1&&Lt("gxy_gateway")===1&&Lt("gxy_gorddon")===1&&Lt("gxy_alien1")===1&&Lt("gxy_alien2")===1&&c===1&&L("neutralized"),e.race.fasting&&c-o===0){let l=ue();e.stats.endless_hunger.b2[l]=!0,l!=="m"&&l!=="l"&&(e.stats.endless_hunger.b2.l=!0)}}if(xe("summer")&&e.resource.hasOwnProperty("Thermite")){let c=1e5+e.stats.reset*9e3;c>1e6&&(c=1e6),e.resource.Thermite.amount>c&&se("solstice",e.race.universe==="micro")}if(xe("firework")&&e[e.race.cataclysm||e.race.orbit_decayed?"space":"city"].firework.on>0&&se("firework",e.race.universe==="micro"),e.city.morale.current>=200&&(L("paradise"),e.city.morale.current>=500&&se("utopia")),e.resource.hasOwnProperty("Money")&&e.resource.Money.amount>=1e9&&L("scrooge"),e.resource.hasOwnProperty("Money")&&e.race.inflation&&e.resource.Money.amount>=25e10&&L("wheelbarrow"),e.civic.hasOwnProperty("govern")&&e.galaxy.hasOwnProperty("trade")&&e.city.hasOwnProperty("market")&&e.galaxy.trade.cur>=50&&e.city.market.trade>=750&&e.civic.govern.type==="federation"&&L("trade"),e.tech.pillars){let c={},o=0,l=Array(5+1).fill(0);if(Object.keys(e.pillars).forEach(function(u){x[u]&&((!c[x[u].type]||e.pillars[u]>c[x[u].type])&&(c[x[u].type]=e.pillars[u]),o++,l[e.pillars[u]]++)}),Object.keys(c).length>=Object.keys(vt).length){let u=5;Object.keys(c).forEach(function(d){c[d]=Object.keys(x).length-1&&L("resonance"),o>=50){let u=0;for(let d=5;d>0;d--)if(u+=l[d],u>=50){se("equilibrium",!1,d);break}}}if(e.portal.hasOwnProperty("mechbay")&&e.tech.hasOwnProperty("hell_spire")&&e.tech.hell_spire>=9){let c=Object.keys(jt).length,o={};Object.keys(e.stats.spire).forEach(function(l){let u={};Object.keys(e.stats.spire[l]).forEach(function(d){jt[d]&&((!o.hasOwnProperty(d)||o[d]0&&(u[d]=e.stats.spire[l][d]))}),Object.keys(u).length===c&&L("gladiator",!1,Math.min(...Object.values(u)),l)}),Object.keys(o).length===c&&L("gladiator",!1,Math.min(...Object.values(o)),"l")}if(e.race.banana){let c=ue();e.tech.hasOwnProperty("monuments")&&e.tech.monuments>=50&&(e.stats.banana.b5[c]=!0,c!=="m"&&c!=="l"&&(e.stats.banana.b5.l=!0));let o=0,l=0;["b1","b2","b3","b4","b5"].forEach(function(u){e.stats.banana[u].l&&o++,c!=="l"&&e.stats.banana[u][c]&&l++}),o>0&&L("banana",!1,o,"l"),l>0&&c!=="l"&&L("banana",!1,l,c),e.interstellar.hasOwnProperty("stellar_engine")&&e.interstellar.stellar_engine.mass>=12&&e.interstellar.stellar_engine.exotic===0&&(e.stats.banana.b3[c]=!0,c!=="m"&&c!=="l"&&(e.stats.banana.b3.l=!0))}if(["l",ue()].forEach(function(o){let l=0;["ashanddust","exodus","obsolete","bluepill","retired"].forEach(function(u){e.stats.achieve[u]&&e.stats.achieve[u][o]&&e.stats.achieve[u][o]>=5&&l++}),l>0&&L("pathfinder",!1,l,o)}),e.race.fasting){let c=ue();e.tech.hasOwnProperty("stock_exchange")&&e.tech.stock_exchange>=80&&(e.stats.endless_hunger.b3[c]=!0,c!=="m"&&c!=="l"&&(e.stats.endless_hunger.b3.l=!0)),e.resource[e.race.species].amount>=1200&&(e.stats.endless_hunger.b4[c]=!0,c!=="m"&&c!=="l"&&(e.stats.endless_hunger.b4.l=!0));let o=0,l=0;["b1","b2","b3","b4","b5"].forEach(function(u){e.stats.endless_hunger[u].l&&o++,c!=="l"&&e.stats.endless_hunger[u][c]&&l++}),o>0&&L("endless_hunger",!1,o,"l"),l>0&&c!=="l"&&L("endless_hunger",!1,l,c)}let r=new Date,i=xe("easter"),s=xe("halloween"),n=r.getFullYear();if(!e.settings.boring&&r.getDate()===13&&r.getDay()===5&&e.resource[e.race.species].amount>=1){let c=!1;c=se("friday",e.race.universe==="micro"),c&&e.resource[e.race.species].amount--}else if(!e.settings.boring&&r.getMonth()===1&&r.getDate()===14)se("valentine",e.race.universe==="micro");else if(!e.settings.boring&&r.getMonth()===2&&r.getDate()===17)se("leprechaun",e.race.universe==="micro");else if(i.active){se("easter",e.race.universe==="micro");let c=0;for(let o=1;o<=18;o++)e.special.egg[n][`egg${o}`]&&c++;c>=12&&se("egghunt",e.race.universe==="micro")}else if(xe("launch_day"))se("launch_day",e.race.universe==="micro");else if(s.active){let c=0;for(let o=1;o<=7;o++)e.special.trick[n][`trick${o}`]&&c++;for(let o=1;o<=7;o++)e.special.trick[n][`treat${o}`]&&c++;c>=12&&se("trickortreat",e.race.universe==="micro"),r.getMonth()===9&&r.getDate()===31&&se("halloween",e.race.universe==="micro")}else!e.settings.boring&&r.getMonth()===10&&r.getDate()>=22&&r.getDate()<=28?se("thanksgiving",e.race.universe==="micro"):!e.settings.boring&&r.getMonth()===11&&r.getDate()==25&&se("xmas",e.race.universe==="micro");!e.settings.boring&&r.getMonth()===3&&r.getDate()>=1&&r.getDate()<=3&&e.stats.feat.hasOwnProperty("fool")&&e.stats.feat.fool>0&&se("fool",e.race.universe==="micro"),e.stats.dkills>=666e6&&se("demon_slayer");for(let c=a;c>=1;c--){let o=0,l=Object.keys(ze);for(let d of l)e.stats.achieve[d]&&e.stats.achieve[d].l>=c&&o++;let u=[{c:10,f:"novice"},{c:25,f:"journeyman"},{c:50,f:"adept"},{c:75,f:"master"},{c:100,f:"grandmaster"}];for(let d=0;d<5;d++)o>=u[d].c&&(!e.stats.feat[u[d].f]||e.stats.feat[u[d].f]=s&&n++;if(n>=i&&(L(r,!1,s),e.race.universe!=="standard"))switch(e.race.universe){case"evil":e.stats.achieve[r].e=void 0;break;case"antimatter":e.stats.achieve[r].a=void 0;break;case"heavy":e.stats.achieve[r].h=void 0;break;case"micro":e.stats.achieve[r].m=void 0;break;case"magic":e.stats.achieve[r].mg=void 0;break;default:break}}e.race.universe!=="standard"&&Wn(a,r,i,s)}function Wn(a,r,i,s){let n=!1;switch(e.race.universe){case"evil":(typeof e.stats.achieve[r]>"u"||typeof e.stats.achieve[r].e>"u"||e.stats.achieve[r].e"u"||typeof e.stats.achieve[r].a>"u"||e.stats.achieve[r].a"u"||typeof e.stats.achieve[r].h>"u"||e.stats.achieve[r].h"u"||typeof e.stats.achieve[r].m>"u"||e.stats.achieve[r].m"u"||typeof e.stats.achieve[r].mg>"u"||e.stats.achieve[r].mg=s&&c++;break;case"antimatter":e.stats.achieve[l]&&e.stats.achieve[l].a&&e.stats.achieve[l].a>=s&&c++;break;case"heavy":e.stats.achieve[l]&&e.stats.achieve[l].h&&e.stats.achieve[l].h>=s&&c++;break;case"micro":e.stats.achieve[l]&&e.stats.achieve[l].m&&e.stats.achieve[l].m>=s&&c++;break;case"magic":e.stats.achieve[l]&&e.stats.achieve[l].mg&&e.stats.achieve[l].mg>=s&&c++;break;default:break}c>=i&&L(r,!1,s)}}var Mt={mastery:{name:t("mastery"),desc(){let a="";return Object.keys(ma).forEach(function(r){let i=Hn(r,!0,!0);r==="standard"?a+=`${ma[r].name}: ${t("perks_mastery_general",[`${+i.g.toFixed(2)}%`])}`:e.stats.achieve.whitehole&&(a+=`${ma[r].name}: ${t("perks_mastery_general",[`${+i.g.toFixed(2)}%`])}, ${t("perks_mastery_universe",[`${+i.u.toFixed(2)}%`])}`)}),a},active(){return!!(e.genes.challenge&&e.genes.challenge>=2)},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_unlocked_title")}`])]},blackhole:{name:t("achieve_blackhole_name"),desc(a){let r=a?"5/10/15/20/25":e.stats.achieve.blackhole?e.stats.achieve.blackhole.l*5:5;return t("achieve_perks_blackhole",[r])},active(){return!!(e.stats.achieve.blackhole&&e.stats.achieve.blackhole.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_blackhole_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_blackhole_name")}`])]},trade:{name:t("achieve_trade_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.trade?e.stats.achieve.trade.l*2:2,i=a?"1/2/3/4/5":e.stats.achieve.trade?e.stats.achieve.trade.l:1;return t("achieve_perks_trade",[r,i])},active(){return!!(e.stats.achieve.trade&&e.stats.achieve.trade.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_trade_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_trade_name")}`])]},creator:{name:t("achieve_creator_name"),desc(a){let r=a?"1.5/2/2.5/3/3.5":1+(e.stats.achieve.creator?e.stats.achieve.creator.l*.5:.5);return t("achieve_perks_creator",[r])},active(){return!!(e.stats.achieve.creator&&e.stats.achieve.creator.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_creator_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_creator_name")}`])]},mass_extinction:{name:t("achieve_mass_extinction_name"),group:[{desc(){return t("achieve_perks_mass_extinction")},active(){return!!(e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>=1)}},{desc(a){let r=e.stats.achieve.mass_extinction?e.stats.achieve.mass_extinction.l:1,i=a?"0/50/100/150/200":(r-1)*50;return t("achieve_perks_mass_extinction2",[i])},active(){return!!(e.stats.achieve.mass_extinction&&e.stats.achieve.mass_extinction.l>1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_mass_extinction_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_mass_extinction_name")}`])]},doomed:{name:t("achieve_doomed_name"),desc(a){return t("achieve_perks_doomed")},active(){return e.stats.portals>=1},notes:[t("wiki_perks_achievement_note",[`${t("achieve_doomed_name")}`])]},explorer:{name:t("achieve_explorer_name"),desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.explorer?e.stats.achieve.explorer.l:1;return t("achieve_perks_explorer",[r])},active(){return!!(e.stats.achieve.explorer&&e.stats.achieve.explorer.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_explorer_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_explorer_name")}`])]},miners_dream:{name:t("achieve_miners_dream_name"),desc(a){let r=a?"1/2/3/5/7":e.stats.achieve.miners_dream?e.stats.achieve.miners_dream.l>=4?e.stats.achieve.miners_dream.l*2-3:e.stats.achieve.miners_dream.l:0;return t("achieve_perks_miners_dream",[r])},active(){return!!(e.stats.achieve.miners_dream&&e.stats.achieve.miners_dream.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_miners_dream_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_miners_dream_name")}`])]},extinct_junker:{name:t("achieve_extinct_junker_name"),desc(){return t("achieve_perks_enlightened")},active(){return!!(e.stats.achieve.extinct_junker&&e.stats.achieve.extinct_junker.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_extinct_junker_name")}`])]},joyless:{name:t("achieve_joyless_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.joyless?e.stats.achieve.joyless.l*2:2;return t("achieve_perks_joyless",[r])},active(){return!!(e.stats.achieve.joyless&&e.stats.achieve.joyless.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_joyless_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_joyless_name")}`])]},steelen:{name:t("achieve_steelen_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.steelen?e.stats.achieve.steelen.l*2:2;return t("achieve_perks_steelen",[r])},active(){return!!(e.stats.achieve.steelen&&e.stats.achieve.steelen.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_steelen_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_steelen_name")}`])]},wheelbarrow:{name:t("achieve_wheelbarrow_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.wheelbarrow?e.stats.achieve.wheelbarrow.l*2:2;return t("achieve_perks_wheelbarrow",[r])},active(){return!!(e.stats.achieve.wheelbarrow&&e.stats.achieve.wheelbarrow.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_wheelbarrow_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_wheelbarrow_name")}`])]},extinct_sludge:{name:t("achieve_extinct_sludge_name"),group:[{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.l*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_standard")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.l>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.h*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_heavy")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.h>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.a*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_antimatter")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.a>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.e*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_evil")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.e>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.m*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_micro")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.m>=1)}},{desc(a){let r=a?"3/6/9/12/15":e.stats.achieve.extinct_sludge?e.stats.achieve.extinct_sludge.mg*3:3;return t("achieve_perks_extinct_sludge",[r,t("universe_magic")])},active(){return!!(e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge.mg>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_extinct_sludge_name")}`]),t("wiki_perks_achievement_note_universe_scale",[`${t("achieve_extinct_sludge_name")}`])]},whitehole:{name:t("achieve_whitehole_name"),group:[{desc(){return t("achieve_perks_whitehole")},active(){return!!e.stats.achieve.whitehole}},{desc(a){let r=a?"5/10/15/20/25":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l*5:5;return t("achieve_perks_whitehole2",[r])},active(){return!!e.stats.achieve.whitehole}},{desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.whitehole?e.stats.achieve.whitehole.l:1;return t("achieve_perks_whitehole3",[r])},active(){return!!e.stats.achieve.whitehole}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_whitehole_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_whitehole_name")}`])]},heavyweight:{name:t("achieve_heavyweight_name"),desc(a){let r=a?"4/8/12/16/20":e.stats.achieve.heavyweight?e.stats.achieve.heavyweight.l*4:4;return t("achieve_perks_heavyweight",[r])},active(){return!!e.stats.achieve.heavyweight},notes:[t("wiki_perks_achievement_note",[`${t("achieve_heavyweight_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_heavyweight_name")}`])]},dissipated:{name:t("achieve_dissipated_name"),group:[{desc(){return t("achieve_perks_dissipated1",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=1)}},{desc(a){let r=a?"1/2":e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=5?2:1;return t("achieve_perks_dissipated2",[r])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=3)}},{desc(){return t("achieve_perks_dissipated3",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=2)}},{desc(){return t("achieve_perks_dissipated4",[1])},active(){return!!(e.stats.achieve.dissipated&&e.stats.achieve.dissipated.l>=4)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_dissipated_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_dissipated_name")}`])]},banana:{name:t("achieve_banana_name"),group:[{desc(){return t("achieve_perks_banana1",[50])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=1)}},{desc(){return t("achieve_perks_banana2",[1])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=2)}},{desc(){return t("achieve_perks_banana3",[10])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=3)}},{desc(){return t("achieve_perks_banana4",[3])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=4)}},{desc(){return t("achieve_perks_banana5",[.01])},active(){return!!(e.stats.achieve.banana&&e.stats.achieve.banana.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_banana_name")}`]),t("wiki_perks_achievement_note_task",[`${t("achieve_banana_name")}`]),t("wiki_perks_achievement_note_task_num",[1,`${t("wiki_achieve_banana1")}`]),t("wiki_perks_achievement_note_task_num",[2,`${t("wiki_achieve_banana2")}`]),t("wiki_perks_achievement_note_task_num",[3,`${t("wiki_achieve_banana3")}`]),t("wiki_perks_achievement_note_task_num",[4,`${t("wiki_achieve_banana4",[500])}`]),t("wiki_perks_achievement_note_task_num",[5,`${t("wiki_achieve_banana5",[50])}`])]},anarchist:{name:t("achieve_anarchist_name"),desc(a){let r=a?"10/20/30/40/50":e.stats.achieve.anarchist?e.stats.achieve.anarchist.l*10:10;return t("achieve_perks_anarchist",[r])},active(){return!!(e.stats.achieve.anarchist&&e.stats.achieve.anarchist.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_anarchist_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_anarchist_name")}`])]},ascended:{name:t("achieve_ascended_name"),group:[{desc(a){let r;if(a)r="1-30";else if(r=0,e.stats.achieve.ascended)for(let i=0;i=1)}},{desc(){return t("achieve_perks_ascended2",[Ei()])},active(){return!!(e.stats.achieve.ascended&&e.stats.achieve.ascended[ue()]>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_ascended_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_ascended_name")}`]),t("wiki_perks_achievement_note_universe",[`${t("achieve_ascended_name")}`])]},technophobe:{name:t("achieve_technophobe_name"),group:[{desc(){return t("achieve_perks_technophobe1",[25])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1)}},{desc(a){let r;if(a)r="10/25/30/35/40/45/50";else{r=e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=4?25:10;for(let i=1;i=5&&(r+=5)}return t("achieve_perks_technophobe2",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=2)}},{desc(a){let r;if(a)r="1/2/3/4/5/6";else{r=1;for(let i=1;i=5&&(r+=1)}return a||r>1?t("achieve_perks_technophobe3a",[r]):t("achieve_perks_technophobe3",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=3)}},{desc(){return t("achieve_perks_technophobe4",[10])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=5)}},{desc(a){let r=a?"1/2/3/4/5":e.stats.achieve.technophobe?e.stats.achieve.technophobe.l:0;return t("achieve_perks_technophobe5",[r])},active(){return!!(e.stats.achieve.technophobe&&e.stats.achieve.technophobe.l>=1)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_technophobe_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_technophobe_name")}`]),t("wiki_perks_achievement_note_universe",[`${t("achieve_technophobe_name")}`])]},iron_will:{name:t("achieve_iron_will_name"),group:[{desc(){return t("achieve_perks_iron_will1",[.15])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=1)}},{desc(){return t("achieve_perks_iron_will2",[10])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=2)}},{desc(){return t("achieve_perks_iron_will3",[6])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=3)}},{desc(){return t("achieve_perks_iron_will4",[1])},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=4)}},{desc(){return t("achieve_perks_iron_will5")},active(){return!!(e.stats.achieve.iron_will&&e.stats.achieve.iron_will.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_iron_will_name")}`]),t("wiki_perks_achievement_note_ironwill",[`${t("evo_challenge_cataclysm")}`]),t("wiki_perks_achievement_note_ironwill2",[1,`${t("space_red_ziggurat_title")}`]),t("wiki_perks_achievement_note_ironwill3",[2,`${t("tech_elerium_mining")}`]),t("wiki_perks_achievement_note_ironwill3",[3,`${t("tech_lasers")}`]),t("wiki_perks_achievement_note_ironwill3",[4,`${t("tech_generational_ship")}`]),t("wiki_perks_achievement_note_ironwill4",[5,`${t("wiki_resets_bioseed")}`])]},failed_history:{name:t("achieve_failed_history_name"),desc(){return t("achieve_perks_failed_history",[2])},active(){return!!(e.stats.achieve.failed_history&&e.stats.achieve.failed_history.l>=5)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_failed_history_name")}`]),t("wiki_perks_achievement_note_failed_history",[`${t("evo_challenge_cataclysm")}`])]},lamentis:{name:t("achieve_lamentis_name"),group:[{desc(){return t("achieve_perks_lamentis1",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=1)}},{desc(){return t("achieve_perks_lamentis2",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=2)}},{desc(){return t("achieve_perks_lamentis3",["10%"])},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=3)}},{desc(){return t("achieve_perks_lamentis4")},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=4)}},{desc(){return t("achieve_perks_lamentis5")},active(){return!!(e.stats.achieve.lamentis&&e.stats.achieve.lamentis.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_lamentis_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_lamentis_name")}`])]},soul_sponge:{name:t("achieve_soul_sponge_name"),desc(a){let r=a?"100/200/300/400/500":e.stats.achieve.soul_sponge?e.stats.achieve.soul_sponge.mg*100:100;return t("achieve_perks_soul_sponge",[r])},active(){return!!(e.stats.achieve.soul_sponge&&e.stats.achieve.soul_sponge.mg>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_soul_sponge_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_soul_sponge_name")}`])]},nightmare:{name:t("achieve_nightmare_name"),desc(){return t("achieve_perks_nightmare")},active(){return!!(e.stats.achieve.nightmare&&e.stats.achieve.nightmare.mg>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_nightmare_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_nightmare_name")}`])]},escape_velocity:{name:t("achieve_escape_velocity_name"),desc(a){let r=a?"2/4/6/8/10":e.stats.achieve.escape_velocity?e.stats.achieve.escape_velocity.h*2:2;return t("achieve_perks_escape_velocity",[r])},active(){return!!(e.stats.achieve.escape_velocity&&e.stats.achieve.escape_velocity.h>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_escape_velocity_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_escape_velocity_name")}`])]},endless_hunger:{name:t("achieve_endless_hunger_name"),group:[{desc(){return t("achieve_perks_endless_hunger1")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=1)}},{desc(){return t("achieve_perks_endless_hunger2")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=2)}},{desc(){return t("achieve_perks_endless_hunger3")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=3)}},{desc(){return t("achieve_perks_endless_hunger4")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=4)}},{desc(){return t("achieve_perks_endless_hunger5")},active(){return!!(e.stats.achieve.endless_hunger&&e.stats.achieve.endless_hunger.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_endless_hunger_name")}`]),t("wiki_perks_achievement_note_task",[`${t("achieve_endless_hunger_name")}`]),t("wiki_perks_achievement_note_task_num",[1,`${t("wiki_achieve_endless_hunger1")}`]),t("wiki_perks_achievement_note_task_num",[2,`${t("wiki_achieve_endless_hunger2")}`]),t("wiki_perks_achievement_note_task_num",[3,`${t("wiki_achieve_endless_hunger3",[80])}`]),t("wiki_perks_achievement_note_task_num",[4,`${t("wiki_achieve_endless_hunger4",[1200])}`]),t("wiki_perks_achievement_note_task_num",[5,`${t("wiki_achieve_endless_hunger5")}`])]},gladiator:{name:t("achieve_gladiator_name"),desc(a){let r=a?"20/40/60/80/100":e.stats.achieve.gladiator?e.stats.achieve.gladiator.l*20:20;return t("achieve_perks_gladiator",[r])},active(){return!!(e.stats.achieve.gladiator&&e.stats.achieve.gladiator.l>=1)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_gladiator_name")}`]),t("wiki_perks_achievement_note_scale",[`${t("achieve_gladiator_name")}`])]},pathfinder:{name:t("achieve_pathfinder_name"),group:[{desc(){return t("achieve_perks_pathfinder1",[10])},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=1)}},{desc(){return t("achieve_perks_pathfinder2",[10])},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=2)}},{desc(){return t("achieve_perks_pathfinder3")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=3)}},{desc(){return t("achieve_perks_pathfinder4")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=4)}},{desc(){return t("achieve_perks_pathfinder5")},active(){return!!(e.stats.achieve.pathfinder&&e.stats.achieve.pathfinder.l>=5)}}],notes:[t("wiki_perks_achievement_note",[`${t("achieve_pathfinder_name")}`]),t("wiki_perks_achievement_note_pathfinder",[`${t("evo_challenge_truepath")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_mad")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_bioseed")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_ai")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_matrix")}`]),t("wiki_perks_achievement_note_pathfinder_reset",[`${t("wiki_resets_retired")}`])]},overlord:{name:t("achieve_overlord_name"),desc(){let a=`
            ${t("achieve_perks_overlord1",[10])}
            `;return a+=`
            ${t("achieve_perks_overlord2")}
            `,a+=`
            ${t("achieve_perks_overlord3")}
            `,a+=`
            ${t("achieve_perks_overlord4")}
            `,a},active(){return!!(e.stats.achieve.overlord&&e.stats.achieve.overlord.l>=5)},notes:[t("wiki_perks_achievement_note",[`${t("achieve_overlord_name")}`])]},adam_eve:{name:t("achieve_adam_eve_name"),desc(){return t("achieve_perks_adam_eve")},active(){return!!(e.stats.achieve.adam_eve&&e.stats.achieve.adam_eve.l>=5)},notes:[]},creep:{name:t("wiki_arpa_crispr_creep"),desc(a){let r=a?"0.01/0.02/0.03/0.04/0.05":e.genes.creep?e.genes.creep*.01:0;return t("arpa_perks_creep",[r])},active(){return!!e.genes.creep},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_genetic_memory_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_animus_title")}`,`${t("arpa_genepool_divine_remembrance_title")}`,`${t("arpa_genepool_divine_proportion_title")}`,`${t("arpa_genepool_genetic_repository_title")}`].join(", ")])]},store:{name:t("wiki_arpa_crispr_store"),desc(a){let r=a?"0.04/0.06/0.08":e.genes.store&&e.genes.store>1?e.genes.store===2?.06:.08:.04;return t(e.genes.store&&e.genes.store>=4?"arpa_perks_store2":"arpa_perks_store1",[r])},active(){return!!e.genes.store},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_spatial_reasoning_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_spatial_superiority_title")}`,`${t("arpa_genepool_spatial_supremacy_title")}`,`${t("arpa_genepool_dimensional_warping_title")}`].join(", ")])]},evolve:{name:t("wiki_arpa_crispr_evolve"),group:[{desc(){return t("arpa_perks_evolve")},active(){return!!e.genes.evolve}},{desc(){return t("arpa_genepool_recombination_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=2)}},{desc(){return t("arpa_genepool_homologous_recombination_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=3)}},{desc(){return t("arpa_genepool_genetic_reshuffling_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=4)}},{desc(){return t("arpa_genepool_recombinant_dna_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=5)}},{desc(){return t("arpa_genepool_chimeric_dna_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=6)}},{desc(){return t("arpa_genepool_molecular_cloning_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=7)}},{desc(){return t("arpa_genepool_transgenes_desc")},active(){return!!(e.genes.evolve&&e.genes.evolve>=8)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_morphogenesis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_recombination_title")}`,`${t("arpa_genepool_homologous_recombination_title")}`,`${t("arpa_genepool_genetic_reshuffling_title")}`,`${t("arpa_genepool_recombinant_dna_title")}`,`${t("arpa_genepool_chimeric_dna_title")}`,`${t("arpa_genepool_molecular_cloning_title")}`,`${t("arpa_genepool_transgenes_title")}`].join(", ")])]},birth:{name:t("wiki_arpa_crispr_birth"),desc(){return t("arpa_perks_birth")},active(){return!!e.genes.birth},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_replication_title")}`])]},enhance:{name:t("wiki_arpa_crispr_enhance"),desc(){return t("arpa_perks_enhance")},active(){return!!e.genes.enhance},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_enhanced_muscle_fiber_title")}`])]},crafty:{name:t("wiki_arpa_crispr_crafty"),group:[{desc(){return t("arpa_genepool_artificer_desc")},active(){return!!e.genes.crafty}},{desc(a){let r=a?"50/100":e.genes.crafty&&e.genes.crafty>=3?100:50;return t("arpa_genepool_crafting_desc",[r])},active(){return!!(e.genes.crafty&&e.genes.crafty>=2)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_artificer_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_detail_oriented_title")}`,`${t("arpa_genepool_rigorous_title")}`].join(", ")])]},governor:{name:t("wiki_arpa_crispr_governor"),desc(){return t("arpa_perks_governor")},active(){return!!e.genes.governor},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_governance_title")}`])]},synthesis:{name:t("wiki_arpa_crispr_synthesis"),desc(a){let r=a?"2/3/4":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?4:3:2,i=a?"10/25/50":e.genes.synthesis&&e.genes.synthesis>=2?e.genes.synthesis>=3?50:25:10;return t("arpa_genepool_synthesis_desc",[r,i])},active(){return!!e.genes.synthesis},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_synthesis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_karyokinesis_title")}`,`${t("arpa_genepool_cytokinesis_title")}`].join(", ")])]},challenge:{name:t("wiki_arpa_crispr_challenge"),group:[{desc(){return t("arpa_perks_challenge")},active(){return!!e.genes.challenge}},{desc(){return t("arpa_genepool_unlocked_desc")},active(){return!!(e.genes.challenge&&e.genes.challenge>=2)}},{desc(a){return t("arpa_perks_challenge2",[a?"60/80":e.genes.challenge&&e.genes.challenge>=4?80:60,a?"60/40":e.genes.challenge&&e.genes.challenge>=4?40:60])},active(){return!!(e.genes.challenge&&e.genes.challenge>=3)}},{desc(){return t("arpa_perks_challenge3")},active(){return!!(e.genes.challenge&&e.genes.challenge>=5)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_hardened_genes_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_unlocked_title")}`,`${t("arpa_genepool_universal_title")}`,`${t("arpa_genepool_standard_title")}`,`${t("arpa_genepool_mastered_title")}`].join(", ")]),t("wiki_perks_crispr_note_challenge",[t("arpa_genepool_universal_title"),t("arpa_genepool_standard_title")])]},ancients:{name:t("wiki_arpa_crispr_ancients"),group:[{desc(){return t("arpa_perks_ancients")},active(){return!!e.genes.ancients}},{desc(){return e.genes.ancients&&e.genes.ancients>=4?t("arpa_perks_ancients3"):t("arpa_perks_ancients2")},active(){return!!(e.genes.ancients&&e.genes.ancients>=2)}},{desc(a){return t("arpa_perks_ancients4",[a?"25/50":e.genes.ancients&&e.genes.ancients>=5?50:25])},active(){return!!(e.genes.ancients&&e.genes.ancients>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_ancients_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_faith_title")}`,`${t("arpa_genepool_devotion_title")}`,`${t("arpa_genepool_acolyte_title")}`,`${t("arpa_genepool_conviction_title")}`].join(", ")])]},trader:{name:t("wiki_arpa_crispr_trader"),desc(){return t("arpa_genepool_negotiator_desc")},active(){return!!e.genes.trader},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_negotiator_title")}`])]},transcendence:{name:t("wiki_arpa_crispr_transcendence"),desc(){return t("arpa_genepool_transcendence_desc")},active(){return!!e.genes.transcendence},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_transcendence_title")}`])]},queue:{name:t("wiki_arpa_crispr_queue"),group:[{desc(){return t("arpa_genepool_geographer_desc")},active(){return!!e.genes.queue}},{desc(){return t("arpa_genepool_architect_desc")},active(){return!!(e.genes.queue&&e.genes.queue>=2)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_geographer_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_architect_title")}`].join(", ")])]},plasma:{name:t("wiki_arpa_crispr_plasma"),desc(a){let r=a?"3/5":e.genes.plasma>=2?5:3;return t("arpa_genepool_mitosis_desc",[r])},active(){return!!e.genes.plasma},notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_mitosis_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_metaphase_title")}`].join(", ")])]},mutation:{name:t("wiki_arpa_crispr_mutation"),group:[{desc(){return e.genes.mutation&&e.genes.mutation>1?t("arpa_perks_mutation2"):t("arpa_perks_mutation1")},active(){return!!e.genes.mutation}},{desc(){return t("arpa_perks_mutation3")},active(){return!!(e.genes.mutation&&e.genes.mutation>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_mutation_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_transformation_title")}`,`${t("arpa_genepool_metamorphosis_title")}`].join(", ")])]},bleed:{name:t("wiki_arpa_crispr_bleed"),group:[{desc(){return t("arpa_genepool_bleeding_effect_desc",[2.5])},active(){return!!e.genes.bleed}},{desc(){return t("arpa_genepool_synchronicity_desc",[25])},active(){return!!(e.genes.bleed&&e.genes.bleed>=2)}},{desc(){return t("arpa_genepool_astral_awareness_desc")},active(){return!!(e.genes.bleed&&e.genes.bleed>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_bleeding_effect_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_synchronicity_title")}`,`${t("arpa_genepool_astral_awareness_title")}`].join(", ")]),t("wiki_perks_crispr_note_bleed",[`${t("arpa_genepool_bleeding_effect_title")}`])]},blood:{name:t("wiki_arpa_crispr_blood"),group:[{desc(){return t("arpa_genepool_blood_remembrance_desc")},active(){return!!e.genes.blood}},{desc(){return t("arpa_genepool_blood_sacrifice_desc")},active(){return!!(e.genes.blood&&e.genes.blood>=2)}},{desc(){return t("arpa_genepool_essence_absorber_desc")},active(){return!!(e.genes.blood&&e.genes.blood>=3)}}],notes:[t("wiki_perks_crispr_note",[`${t("arpa_genepool_blood_remembrance_title")}`]),t("wiki_perks_crispr_note_upgrade",[[`${t("arpa_genepool_blood_sacrifice_title")}`,`${t("arpa_genepool_essence_absorber_title")}`].join(", ")]),t("wiki_perks_crispr_note_blood",[t("arpa_genepool_blood_remembrance_title")])]},spire:{name:t("wiki_arpa_blood_spire"),group:[{desc(){return t("arpa_blood_purify_desc")},active(){return!!e.blood.spire}},{desc(){return t("arpa_blood_chum_desc")},active(){return!!(e.blood.spire&&e.blood.spire>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_purify_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_chum_title")}`].join(", ")])]},lust:{name:t("wiki_arpa_blood_lust"),group:[{desc(a){return t("arpa_perks_lust",[a?.2:.2*(e.blood.lust?e.blood.lust:1)])},active(){return!!e.blood.lust}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_lust_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_lust_title")])]},illuminate:{name:t("wiki_arpa_blood_illuminate"),group:[{desc(a){return t("arpa_perks_illuminate",[a?.01:.01*(e.blood.illuminate?e.blood.illuminate:1)])},active(){return!!e.blood.illuminate}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_illuminate_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_illuminate_title")])]},greed:{name:t("wiki_arpa_blood_greed"),group:[{desc(a){return t("arpa_perks_greed",[a?1:1*(e.blood.greed?e.blood.greed:1)])},active(){return!!e.blood.greed}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_greed_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_greed_title")])]},hoarder:{name:t("wiki_arpa_blood_hoarder"),group:[{desc(a){return t("arpa_perks_hoarder",[a?1:1*(e.blood.hoarder?e.blood.hoarder:1)])},active(){return!!e.blood.hoarder}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_hoarder_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_hoarder_title")])]},artisan:{name:t("wiki_arpa_blood_artisan"),group:[{desc(a){return t("arpa_perks_artisan",[a?1:1*(e.blood.artisan?e.blood.artisan:1)])},active(){return!!e.blood.artisan}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_artisan_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_artisan_title")])]},attract:{name:t("wiki_arpa_blood_attract"),group:[{desc(a){return t("arpa_perks_attract",[a?5:5*(e.blood.attract?e.blood.attract:1)])},active(){return!!e.blood.attract}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_attract_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_attract_title")])]},wrath:{name:t("wiki_arpa_blood_wrath"),group:[{desc(a){return t("arpa_perks_wrath",[a?5:5*(e.blood.wrath?e.blood.wrath:1)])},active(){return!!e.blood.wrath}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_wrath_title")}`]),t("wiki_perks_blood_note_repeat",[t("arpa_blood_wrath_title")])]},prepared:{name:t("wiki_arpa_blood_prepared"),group:[{desc(){return t("arpa_blood_prepared_desc")},active(){return!!e.blood.prepared}},{desc(){return t("arpa_blood_compact_desc")},active(){return!!(e.blood.prepared&&e.blood.prepared>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_prepared_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_compact_title")}`].join(", ")])]},unbound:{name:t("wiki_arpa_blood_unbound"),group:[{desc(){return t("arpa_blood_unbound_desc")},active(){return!!e.blood.unbound}},{desc(){return t("arpa_blood_shadow_war_desc")},active(){return!!(e.blood.unbound&&e.blood.unbound>=3)}},{desc(a){return t("arpa_perks_unbound_resist",[a?"10/5":e.blood.unbound&&e.blood.unbound>=4?5:10])},active(){return!!(e.blood.unbound&&e.blood.unbound>=2)}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_unbound_title")}`]),t("wiki_perks_blood_note_upgrade",[[`${t("arpa_blood_unbound_resistance_title")}`,`${t("arpa_blood_shadow_war_title")}`,`${t("arpa_blood_unbound_immunity_title")}`].join(", ")])]},aware:{name:t("wiki_arpa_blood_aware"),group:[{desc(){return t("arpa_blood_blood_aware_desc")},active(){return!!e.blood.aware}}],notes:[t("wiki_perks_blood_note",[`${t("arpa_blood_blood_aware_title")}`])]},harmonic:{name:t("harmonic"),group:[{desc(a){let r=na();return t("perks_harmonic",[a?`1-${Object.keys(x).length+2}`:+((r[0]-1)*100).toFixed(0),a?`2-${(Object.keys(x).length+2)*2}`:+((r[1]-1)*100).toFixed(0)])},active(){let a=na();return!!(e.pillars&&a[0]>1)}},{desc(a){let r=na();return t("perks_harmonic2",[t("portal_west_tower"),t("portal_east_tower"),a?`12-${(Object.keys(x).length-1)*12}`:+(Object.keys(e.pillars).length*12)])},active(){let a=na();return!!(e.pillars&&a[0]>1)}}],notes:[t("wiki_perks_harmonic_note1"),t("wiki_perks_harmonic_note2")]},novice:{name:t("perk_novice"),desc(a){let r=e.stats.feat.novice&&e.stats.achieve.apocalypse&&e.stats.achieve.apocalypse.l>0?Math.min(e.stats.achieve.apocalypse.l,e.stats.feat.novice):1,i=a?"0.5/1/1.5/2/2.5":r/2,s=a?"0.25/0.5/0.75/1/1.25":r/4;return`
            ${t("achieve_perks_novice",[i,s])}
            ${t("achieve_perks_novice2")}
            `},active(){return!!(e.stats.feat.novice&&e.stats.mad>0)},notes:[t("wiki_perks_progress_note1",[10,t("wiki_resets_mad")]),t("wiki_perks_progress_note2")]},journeyman:{name:t("perk_journeyman"),desc(a){let r=e.stats.feat.journeyman&&e.stats.achieve.seeder&&e.stats.achieve.seeder.l>0?Math.min(e.stats.achieve.seeder.l,e.stats.feat.journeyman):1;if(a||r>1){let i=a?"1/2/3":r>=3?r>=5?3:2:1,s=a?"1/2":r>=4?2:1;return`
            ${t("achieve_perks_journeyman2",[i,s])}
            ${t("achieve_perks_journeyman3")}
            `}else return`
            ${t("achieve_perks_journeyman1",[1])}
            ${t("achieve_perks_journeyman3")}
            `},active(){return!!(e.stats.feat.journeyman&&e.stats.bioseed>0)},notes:[t("wiki_perks_progress_note1",[25,t("wiki_resets_bioseed")]),t("wiki_perks_progress_note2")]},adept:{name:t("perk_adept"),desc(a){let r=Cs()||1,i=a?"100/200/300/400/500":r*100,s=a?"60/120/180/240/300":r*60;return t("achieve_perks_adept",[i,s])},active(){return Cs()>0},notes:[t("wiki_perks_progress_note1",[50,t("wiki_resets_blackhole")]),t("wiki_perks_progress_note2")]},master:{name:t("perk_master"),desc(a){let r=e.stats.feat.master&&e.stats.achieve.ascended&&e.stats.achieve.ascended.l>0?Math.min(e.stats.achieve.ascended.l,e.stats.feat.master):1,i=a?"1/2/3/4/5":r,s=a?"2/4/6/8/10":r*2;return t("achieve_perks_master",[i,s,t("evo_mitochondria_title"),t("evo_eukaryotic_title"),t("evo_membrane_title"),t("evo_organelles_title"),t("evo_nucleus_title")])},active(){return!!(e.stats.feat.master&&e.stats.achieve.ascended&&e.stats.achieve.ascended.l>0)},notes:[t("wiki_perks_progress_note1",[75,t("wiki_resets_ascension")]),t("wiki_perks_progress_note2")]},grandmaster:{name:t("perk_grandmaster"),desc(a){let r=e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0?Math.min(e.stats.achieve.corrupted.l,e.stats.feat.grandmaster):1;return t("achieve_perks_grandmaster",[a?"1/2/3/4/5":r])},active(){return!!(e.stats.feat.grandmaster&&e.stats.achieve.corrupted&&e.stats.achieve.corrupted.l>0)},notes:[t("wiki_perks_progress_note1",[100,t("wiki_resets_infusion")]),t("wiki_perks_progress_note2")]}};function Qn(){A($("#perksPanel"));let a=$("#perksPanel"),r=!1;Object.keys(Mt).forEach(function(i){if(Mt[i].hasOwnProperty("group")){let s=!1,n=$(`
            ${Mt[i].name}
            `);Mt[i].group.forEach(function(c){c.active()&&(s=!0,n.append($(`
            ${c.desc()}
            `)))}),s&&(r=!0,a.append(n))}else Mt[i].active()&&(r=!0,a.append($(`
            ${Mt[i].name}${Mt[i].desc()}
            `)))}),r||a.append($(`
            ${t("perks_none")}
            `))}function q_(){A($("#statsPanel"));let a=$("#statsPanel");if(a.append(`
            ${t("achieve_stats_overall")}
            `),a.append(`
            ${t("achieve_stats_plasmid_earned")} {{ s.plasmid | format }}
            `),e.stats.antiplasmid>0&&a.append(`
            ${t("achieve_stats_antiplasmid_earned")} {{ s.antiplasmid | format }}
            `),e.stats.phage>0&&a.append(`
            ${t("achieve_stats_phage_earned")} {{ s.phage | format }}
            `),e.stats.dark>0&&a.append(`
            ${t("achieve_stats_dark_earned")} {{ s.dark | format }}
            `),e.stats.harmony>0&&a.append(`
            ${t("achieve_stats_harmony_earned")} {{ s.harmony | format }}
            `),e.stats.blood>0&&a.append(`
            ${t("achieve_stats_blood_earned")} {{ s.blood | format }}
            `),e.stats.artifact>0&&a.append(`
            ${t("achieve_stats_artifact_earned")} {{ s.artifact | format }}
            `),a.append(`
            ${t("achieve_stats_knowledge_spent")} {{ s.know | t_know | format }}
            `),a.append(`
            ${t("achieve_stats_starved_to_death")} {{ s.starved | t_starved | format }}
            `),a.append(`
            ${t("achieve_stats_died_in_combat")} {{ s.died | t_died | format }}
            `),a.append(`
            ${t("achieve_stats_game_days_played")} {{ s.days | played | format }}
            `),e.stats.portals>0&&a.append(`
            ${t("achieve_stats_portals")} {{ s.portals | format }}
            `),a.append(`
            ${t("achieve_stats_total_resets")} {{ s.reset | format }}
            `),e.stats.mad>0&&a.append(`
            ${t("achieve_stats_mad_resets")} {{ s.mad | format }}
            `),e.stats.bioseed>0&&a.append(`
            ${t("achieve_stats_bioseed_resets")} {{ s.bioseed | format }}
            `),e.stats.cataclysm>0&&a.append(`
            ${t("achieve_stats_cataclysm_resets")} {{ s.cataclysm | format }}
            `),e.stats.blackhole>0&&a.append(`
            ${t("achieve_stats_blackhole_resets")} {{ s.blackhole | format }}
            `),e.stats.ascend>0&&a.append(`
            ${t("achieve_stats_ascension_resets")} {{ s.ascend | format }}
            `),e.stats.descend>0&&a.append(`
            ${t("achieve_stats_descension_resets")} {{ s.descend | format }}
            `),e.stats.aiappoc>0&&a.append(`
            ${t("achieve_stats_aiappoc_resets")} {{ s.aiappoc | format }}
            `),e.stats.matrix>0&&a.append(`
            ${t("achieve_stats_matrix_resets")} {{ s.matrix | format }}
            `),e.stats.retire>0&&a.append(`
            ${t("achieve_stats_retire_resets")} {{ s.retire | format }}
            `),e.stats.eden>0&&a.append(`
            ${t("achieve_stats_eden_resets")} {{ s.eden | format }}
            `),e.stats.terraform>0&&a.append(`
            ${t("achieve_stats_terraform_resets")} {{ s.terraform | format }}
            `),e.stats.geck>0&&a.append(`
            ${t("achieve_stats_gecks")} {{ s.geck | format }}
            `),a.append(`
            ${t("achieve_stats_current_game")}
            `),a.append(`
            ${t("achieve_stats_knowledge_spent")} {{ s.know | format }}
            `),a.append(`
            ${t("achieve_stats_starved_to_death")} {{ s.starved | format }}
            `),a.append(`
            ${t("achieve_stats_died_in_combat")} {{ s.died | format }}
            `),a.append(`
            ${t("achieve_stats_attacks_made")} {{ s.attacks | format }}
            `),a.append(`
            ${t("achieve_stats_game_days_played")} {{ s.days | format }}
            `),e.stats.dkills>0&&a.append(`
            ${t("achieve_stats_demons_kills")} {{ s.dkills | format }}
            `),e.stats.sac>0&&a.append(`
            ${t("achieve_stats_sacrificed")} {{ s.sac | format }}
            `),e.stats.murders>0&&a.append(`
            ${t("achieve_stats_murders")} {{ s.murders | format }}
            `),e.stats.psykill>0&&a.append(`
            ${t("achieve_stats_psymurders")} {{ s.psykill | format }}
            `),e.resource.hasOwnProperty("Thermite")&&e.resource.Thermite.amount>0&&a.append(`
            ${t("achieve_stats_thermite")} {{ r.Thermite.amount | res }}
            `),oa().active){let i="";(e.stats.cfood>=13||e.race.cataclysm||e.race.orbit_decayed)&&(i=`${pt(7,12,!0)}`),a.append(`
            ${t("achieve_stats_trickortreat")} {{ s.cfood | format }} ${i}
            `)}C({el:"#statsPanel",data:{s:e.stats,r:e.resource},filters:{played(i){return i+e.stats.tdays},t_know(i){return i+e.stats.tknow},t_starved(i){return i+e.stats.tstarved},t_died(i){return i+e.stats.tdied},format(i){return i.toLocaleString()},res(i){return(+i.toFixed(2)).toLocaleString()}}})}vs(!0);function si(){let a=$("#content");A(a);let r=["update","hotkeys","sethotkeys","offline","moonphase","orbital","lumber","farm","steel","aluminium","titanium","titanium_balorg","polymer","mythril","neutronium","adamantite","infernite","graphene","stanene","aerogel","crates","soft_reset","hard_reset","combat","morale","stress","genetic_decay","cache","aphrodisiac","religion","tax_riots","race","weather","sundial","plasmid","plasmid_keep","plasmid_earn","crispr","creep","phage","phage_earn","phage_benefit","anti_plasmids","temple","temple_break","demonic","celestial","mastery","challenges","perks","feats","support","micro","valdi","quantum","quantum_level","exotic","soul_gem","soul_gem_spend","hell_patrol","surveyors","defense","infusion","dark_energy"],i={neutronium:[x[e.race.species].solar.gas_moon]};for(let s=0;s');a.append(n);let c=[];i.hasOwnProperty(r[s])&&(c=i[r[s]]),n.append(`

            ${t(`wiki_faq_q_${r[s]}`)}

            `),n.append(`
            ${t(`wiki_faq_a_${r[s]}`,c)}
            `)}}function Bo(a,r,i){return r.hasOwnProperty("h_level")||(r.h_level=2),r.header=!0,y(a,r,i)}function y(a,r,i){if(!r.hasOwnProperty("name")||!r.hasOwnProperty("template"))return;r.hasOwnProperty("paragraphs")||(r.paragraphs=0),r.hasOwnProperty("text")||(r.text={}),r.hasOwnProperty("rawtext")||(r.rawtext={}),r.hasOwnProperty("para_data")||(r.para_data={}),r.hasOwnProperty("data_color")||(r.data_color={}),r.hasOwnProperty("data_link")||(r.data_link={}),r.hasOwnProperty("h_level")||(r.h_level=3),r.hasOwnProperty("header")||(r.header=!1),r.hasOwnProperty("full")||(r.full=!1),r.hasOwnProperty("break")||(r.break=!1),r.hasOwnProperty("default_color")||(r.default_color="warning"),r.hasOwnProperty("examples")||(r.examples=!1);let s=!1;i?s=i:(s=$(`
            `),r.h_level&&s.append(`${r.label?r.label:t(`wiki_${r.template}_${r.name}`)}`));let n=[{s:1,e:r.break?r.break[0]-1:r.paragraphs}];if(r.break)for(let c=0;c');for(let l=c.s;l<=c.e;l++)if((r.text[l]||r.rawtext[l]||r.para_data[l])&&Array.isArray(r.para_data[l])){let u=r.para_data[l];if(r.data_link[l]&&Array.isArray(r.data_link[l]))for(let p=0;p${u[p]}`);let d=r.data_color[l]&&Array.isArray(r.data_color[l])?r.data_color[l]:r.para_data[l].map(p=>r.default_color);for(let p=0;p${u[p]}
            `);let h=r.rawtext[l]?r.rawtext[l]:t(r.text[l]?r.text[l]:`wiki_${r.template}_${r.name}_para${l}`,u);o.append(`${h}`)}else{let u=r.rawtext[l]?r.rawtext[l]:t(r.text[l]?r.text[l]:`wiki_${r.template}_${r.name}_para${l}`);o.append(`${u}`)}s.append(o)}),r.examples&&(s.append($(`
            ${t("wiki_examples")}
            `)),r.examples.forEach(function(c){s.append($(`
            - ${c}
            `))})),i||a.append(s),s}function qa(a,r,i,s){let n=typeof r.title=="string"?r.title:r.title();if(i)a.append(`

            ${n}

            ${i}
            `);else if(s)a.append(`

            ${n}

            `);else{let u=e.tech[r.grant[0]]&&e.tech[r.grant[0]]>=r.grant[1];a.append(`

            ${n}

            ${u?`${t("wiki_arpa_purchased")}`:""}${t(`wiki_tech_tree_${r.grant[0]}`)}: ${r.grant[1]}
            `)}let c=typeof r.desc=="string"?r.desc:r.desc(!0);c!==n&&a.append(`
            ${c}
            `);let o=$('
            '),l=!1;if(r.hasOwnProperty("effect")){if(s){let u=typeof r.effect=="string"?r.effect:!1;u!==!1?o.append(`
            ${u}
            `):o.append('
            '),l=!0}else{let u=typeof r.effect=="string"?r.effect:r.effect(!0);u!==!1&&(o.append(`
            ${u}
            `),l=!0)}a.append(o)}if(r.hasOwnProperty("cost")){let u=_t(r,!0),d=l?$(`
            `):$(`
            `),h="";s&&(d.append($(`

            ${t("wiki_calc_cost")}

            `)),h=$(`

            ${t("wiki_calc_cost_creep")}

            `));let p=!1,f=function(w,v,k,P,j){s?(d.append($(`
            ${k}{{ r.${w}.cost }}
            `)),h.append($(`
            {{ r.${w}.creep }}
            `)),p=!0):v>0&&(d.append($(`
            ${k}${Y(v,1)}
            `)),p=!0)},g="has-text-success";Object.keys(u).forEach(function(w){if(w==="Structs"){let v=u[w]();Object.keys(v).forEach(function(k){Object.keys(v[k]).forEach(function(P){let j=v[k][P].hasOwnProperty("on")?v[k][P].on:v[k][P].count,D="";if(v[k][P].hasOwnProperty("s")){let U=v[k][P].s;D=typeof q[k][U][P].title=="string"?q[k][U][P].title:q[k][U][P].title()}else D=typeof q[k][P].title=="string"?q[k][P].title:q[k][P].title();d.append($(`
            ${D}: ${j}
            `)),s&&h.append($(`
            ${t("wiki_calc_none")}
            `)),p=!0})})}else if(["Plasmid","Phage","Dark","Harmony","AICore","Artifact","Blood_Stone","AntiPlasmid"].includes(w)){let v=w;w==="Plasmid"&&e.race.universe==="antimatter"&&(v="AntiPlasmid"),f(w,u[w](),t(`resource_${v}_name`)+": ",g)}else if(w==="Supply")f(w,u[w](),t(`resource_${w}_name`)+": ",g);else if(w==="Custom")d.append($(`
            ${u[w]().label}
            `)),p=!0;else if(w!=="Morale"&&w!=="Army"&&w!=="Bool"){let v=w==="Species"?e.race.species:w,k=v==="Money"?"$":(w==="HellArmy"?t("fortress_troops"):e.resource[v].name)+": ";k=k.replace("_"," "),f(w,u[w](),k,g)}}),p&&(r.hasOwnProperty("effect")||a.append(o),o.append(d),s&&o.append(h))}}function P_(a,r){a.click(function(){window.location.hash=`#${r}`,document.getElementById(r).scrollIntoView({block:"start",behavior:"smooth"})})}function M(a,r,i,s){if(a==="create"){let n=r?typeof r=="string"?$(`#${r}`):r:$("#content");A(n),n.addClass("flex");let c=$('
            '),o=$('
            '),l=$("
              ");return n.append(c),n.append(o),o.append(l),c}else{let n=$(`${s}`),c=$("
            • ");c.append(n),$("#sideContent ul").append(c),P_(n,i)}}function st(a,r,i,s){M(a,r,i,"\u1102"+s)}function ee(a){return["moon","belt"].includes(a)?t("space_"+a+"_info_name"):["kuiper"].includes(a)?t("space_"+a+"_title"):S()[a]}function Jn(a,r,i,s){let n=$("
              ");a.append(n),n.append(`{{ vis | label }}`);let c=$(``);n.append(c);let o=document.getElementById(r+i+"Section"),l={vis:!1};return C({el:`#${r}${i}Button`,data:l,methods:{show(){o.style.display==="block"?(o.style.display="none",l.vis=!1):(o.style.display="block",l.vis=!0)}},filters:{label(u){return u?t("wiki_reveal_hide",[s]):t("wiki_reveal_show",[s])}}}),c}function ne(a,r,i,s){s=s||t("wiki_calc_insert_"+i);let n=$("
              ");a.append(n),n.append(`{{ vis | label }}`);let c=$(``);n.append(c);let o=document.getElementById(r+i+"Section"),l={vis:!1};return C({el:`#${r}${i}Button`,data:l,methods:{show(){o.style.display==="block"?(o.style.display="none",l.vis=!1):(o.style.display="block",l.vis=!0)}},filters:{label(u){return u?t("wiki_calc_hide",[s]):t("wiki_calc_show",[s])}}}),c}function Ko(a){let r=$("#content");switch(A(r),a){case"races":Zn(r);break;case"traits":Xn(r);break;case"custom":M_(r);break}}function M_(a){y(a,{name:"custom",template:"mechanics",label:t("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],full:!0,h_level:2,para_data:{1:[t("wiki_resets_ascension")],2:[t("wiki_resets_ascension")],5:[t("resource_Genes_name")],6:[t("resource_Genes_name")],7:[2],8:[t("achieve_technophobe_name"),5,7],9:[t("tech_fanaticism"),t("tech_deify")],11:[0,t("resource_Genes_name")],12:[t("resource_Genes_name"),t("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[e.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}});let r=$('
              ');a.append(r),br(r)}var Ss={angelic:["phagocytosis","mammals","celestial"],aquatic:["phagocytosis","aquatic"],avian:["phagocytosis","eggshell","endothermic"],carnivore:["phagocytosis","mammals","animalism","carnivore"],demonic:["phagocytosis","mammals","demonic"],eldritch:["phagocytosis","eldritch"],fey:["phagocytosis","fey"],fungi:["chitin"],giant:["phagocytosis","mammals","gigantism"],heat:["phagocytosis","heat"],herbivore:["phagocytosis","mammals","animalism","herbivore"],humanoid:["phagocytosis","mammals","humanoid"],insectoid:["phagocytosis","athropods"],plant:["chloroplasts"],polar:["phagocytosis","polar"],reptilian:["phagocytosis","eggshell","ectothermic"],sand:["phagocytosis","sand"],small:["phagocytosis","mammals","dwarfism"],synthetic:["exterminate"]};Object.keys(Ss).forEach(function(a){Ss[a]=Ss[a].map(function(r){return typeof q.evolution[r].title=="function"?q.evolution[r].title():q.evolution[r].title}).join(" -> ")});function Zn(a){a=M("create",a);let r=[];Object.keys(x).forEach(function(i){if(i==="custom"&&!e.custom.hasOwnProperty("race0")||i==="protoplasm")return;let s=$(`
              `);a.append(s),s.append(`

              ${x[i].name}

              ${t(`genelab_genus_${x[i].type}`)}
              `),s.append(`
              ${typeof x[i].desc=="string"?x[i].desc:x[i].desc()}
              `);let n=[],c=C_(i),o=$('
              ');Object.keys(vt[x[i].type]).sort().forEach(function(l){let u=`raceTrait${i}${l}`,d=x[i].fanaticism===l?"danger":"caution";o.append(`${b[l].name}`),n.push({t:l,r:1})}),Object.keys(x[i].traits).sort().forEach(function(l){let u=`raceTrait${i}${l}`,d=x[i].fanaticism===l?"danger":"info";o.append(`${b[l].name}`),n.push({t:l,r:x[i].traits[l]})});for(let l=0;l${b[c[l].t].name}`),n.push(c[l])}s.append(o),r.push(i),B(`genus${i}`,$(`
              ${t(`genelab_genus_${x[i].type}_desc`)}

              ${Ss[x[i].type]}
              `),{wide:!0,classes:"w25"});for(let l=0;l");Ma(d,n[l].t,{fanatic:n[l].t===x[i].fanaticism?x[i].name:!1,trank:n[l].r,wiki:!0}),B(u,d,{wide:!0,classes:"w25"})}}),r.sort((i,s)=>x[i].name=17?[{t:"slaver",r:2},{t:"resourceful",r:.5},{t:"small",r:.25}]:[];case"capybara":return r.getMonth()===11&&r.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"pack_rat",r:.5},{t:"musical",r:.25}]:[];case"centaur":return r.getMonth()===11&&r.getDate()>=17?[{t:"beast_of_burden",r:1},{t:"curious",r:.5},{t:"blissful",r:.25}]:[];case"wendigo":return r.getMonth()===11&&r.getDate()>=17?[{t:"immoral",r:3},{t:"cannibalize",r:.5},{t:"claws",r:.25}]:[];case"yeti":return r.getMonth()===11&&r.getDate()>=17?[{t:"scavenger",r:3},{t:"regenerative",r:.5},{t:"musical",r:.25}]:[];case"entish":return r.getMonth()===11&&r.getDate()>=17?[{t:"photosynth",r:3},{t:"optimistic",r:.5},{t:"armored",r:.25}]:[];default:return[]}}function Xn(a){a=M("create",a);let r=[["genus","major"],["minor"],["special"]];for(let i=0;iTt("name",s).localeCompare(Tt("name",n))).forEach(function(s){if(r[i].includes(b[s].type)){let n=$(`
              `);a.append(n),Ma(n,s,{tpage:!0,wiki:!0}),M("add","traits-species",`${b[s].type}_${s}`,Tt("name",s))}})}function dr(a){let r=$('
              '),i=Bo(a,{name:"planet",template:"planet",paragraphs:4,full:!0,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});y(a,{name:"geology",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},i);let s=No(he,$(`

              ${t("wiki_planet_biome")}

              `)),n=No(Fe,$(`

              ${t("wiki_planet_trait")}

              `));r.append(s),r.append(n),a.append(r)}var Go={oceanic:["trait","genus"],forest:["genus"],desert:["trait","genus"],volcanic:["weather","genus"],tundra:["weather","genus"],savanna:["condition"],swamp:["trait","trait2","genus","condition"],ashland:["weather","trait","genus","condition"],taiga:["weather","genus","condition"],hellscape:["weather","genus","universe"],eden:["geology","genus","universe"],stormy:["trait"],ozone:["trait"],trashed:["trait"],elliptical:["trait"],flare:["event"],unstable:["trait","event"],permafrost:["trait"],retrograde:["trait"]};function No(a,r){return Object.keys(a).forEach(function(i){let s=a[i],n=$(`
              `);r.append(n),n.append(`

              ${s.label}

              `),n.append(`
              ${s.desc}
              `);let c=$('
              ');if(s.vars&&s.wiki)for(let o=0;o${t(`wiki_planet_${i}${o}`,[O_(s.vars()[o],l)])}
              `))}n.append(c),Go[i]&&Go[i].forEach(function(o){n.append($(`
              ${t(`wiki_planet_${i}_${o}`)}
              `))})}),r}function O_(a,r){let i=a-1*(r==="percent"||r==="inverted"?1:0);(r==="inverted"||r==="inverted-decimal")&&(i*=-1,r==="inverted"?r="percent":r="decimal");let s=(i>=0?"+":"")+i.toLocaleString(e.settings.locale,{style:r,maximumFractionDigits:2});return`${s}`}function ec(a,r){let i=M("create");switch(a){case"prehistoric":S_(i,r);break;case"planetary":j_(i,r);break;case"space":F_(i,r);break;case"interstellar":z_(i);break;case"intergalactic":A_(i);break;case"hell":T_(i);break;case"tauceti":I_(i);break}}var Yn={prehistoric:{},planetary:{slaughter:[t("wiki_structure_planetary_slaughter")]},space:{terraformer:[t("wiki_structure_space_terraformer")],terraform:[t("wiki_structure_space_terraformer")]},starDock:{geck:[t("wiki_structure_stardock_geck")]},interstellar:{},intergalactic:{},hell:{},tauceti:{}};function pr(a,r,i){if(Yn[r].hasOwnProperty(i)){let s=$('
              ');a.append(s);for(let n=0;n${Yn[r][i][n]}`)}}var Nt={include:{prehistoric:["membrane","organelles","nucleus","eukaryotic_cell","mitochondria"]},exclude:{planetary:["food","lumber","stone","chrysotile","slaughter","slave_market",""],space:["test_launch","moon_mission","terraform","red_mission","hell_mission","sun_mission","gas_mission","gas_moon_mission","belt_mission","dwarf_mission","titan_mission","enceladus_mission","triton_mission","kuiper_mission","eris_mission","crashed_ship","digsite"],starDock:["prep_ship","launch_ship"],interstellar:["alpha_mission","proxima_mission","nebula_mission","neutron_mission","blackhole_mission","jump_ship","wormhole_mission","sirius_mission","sirius_b","ascend"],intergalactic:["gateway_mission","gorddon_mission","alien2_mission","chthonian_mission"],hell:["pit_mission","assault_forge","ruins_mission","gate_mission","lake_mission","spire_mission","bribe_sphinx","spire_survey","spire","devilish_dish","oven_done"],tauceti:["home_mission","dismantle","excavate","alien_outpost","red_mission","matrix","roid_mission","alien_station_survey","contact","introduce","subjugate","gas_contest","gas_contest2","ignite_gas_giant","jeff","goe_facility"]},excludeCreep:{planetary:["horseshoe"],space:["horseshoe"],hell:["ancient_pillars","sphinx","waygate"],tauceti:["horseshoe"]},max:{prehistoric:{},planetary:{s_alter:1,banquet:5},space:{star_dock:1,terraformer:100,world_collider:1859,shipyard:1,mass_relay:100,fob:1,ai_core:100,jump_gate:100},starDock:{seeder:100},interstellar:{dyson:100,dyson_sphere:100,orichalcum_sphere:100,stellar_engine:100,stargate:200,space_elevator:100,gravity_dome:100,ascension_machine:100},intergalactic:{embassy:1,consulate:1},hell:{soul_forge:1,vault:2,ancient_pillars:Object.keys(x).length-1,west_tower:Ke(),east_tower:Ke(),bridge:10,sphinx:2,waygate:10,oven:100},tauceti:{alien_outpost:1,jump_gate:100,ringworld:1e3,alien_station:100,matrioshka_brain:1e3,ignition_device:10}},count:{planetary:{horseshoe:e.race.shoecnt?e.race.shoecnt:0,assembly:e.resource[e.race.species]?e.resource[e.race.species].amount:0},space:{horseshoe:e.race.shoecnt?e.race.shoecnt:0,assembly:e.resource[e.race.species]?e.resource[e.race.species].amount:0},interstellar:{},intergalactic:{},hell:{ancient_pillars:Object.keys(e.pillars).length,sphinx:!e.tech.hell_spire||e.tech.hell_spire<7?0:e.tech.hell_spire===7?1:2,waygate:e.tech.waygate&&e.tech.waygate>=2?10:e.portal.waygate?e.portal.waygate.count:0},tauceti:{}},creepCalc:{planetary:{assembly:1e3},space:{assembly:1e3,swarm_satellite:200}}},Ro={terraformer:["truepath"]};function hr(a,r,i,s,n){let c=Nt.max[i]&&Nt.max[i][r]?Nt.max[i][r]:!1,o={owned:0,costVis:!1,creepVis:!1,extra:{isWiki:!0,truepath:n==="truepath"}},l={},u=!1;switch(i){case"prehistoric":u=q.evolution[r],o.real_owned=e.evolution[r]?e.evolution[r].count:0;break;case"planetary":u=q.city[r],o.real_owned=e.city[r]?e.city[r].count:0;break;case"space":u=q.space[s][r],o.real_owned=e.space[r]?e.space[r].count:0;break;case"starDock":u=q.starDock[r],o.real_owned=e.starDock[r]?e.starDock[r].count:0;break;case"interstellar":u=q.interstellar[s][r],o.real_owned=e.interstellar[r]?e.interstellar[r].count:0;break;case"intergalactic":u=q.galaxy[s][r],o.real_owned=e.galaxy[r]?e.galaxy[r].count:0;break;case"hell":u=q.portal[s][r],o.real_owned=e.portal[r]?e.portal[r].count:0;break;case"tauceti":u=q.tauceti[s][r],o.real_owned=e.tauceti[r]?e.tauceti[r].count:0;break}Nt.count[i]&&Nt.count[i][r]&&(o.real_owned=Nt.count[i][r]);let d=function(){if(u.hasOwnProperty("effect")&&typeof u.effect!="string"){let g=$(".effect",`#${r}`);A(g);let w={isWiki:!0,count:o.owned-o.real_owned};Ro[r]&&Ro[r].forEach(function(v){switch(v){case"truepath":w[v]=n==="truepath";break}}),g.append(u.effect(w))}};d();let h=u.cost;h&&Object.keys(_t(u)).forEach(function(g){l[g]={}});let p=function(){let g=!1;if(h){let w=_t(u,o.owned-o.real_owned,o.extra);Object.keys(l).forEach(function(v){if(v==="Custom")l[v].vis=!0;else{let k=w[v]?w[v](o.owned-o.real_owned,o.extra):0;l[v].vis=k>0,l[v].cost=Y(k,1)}g=g||l[v].vis})}o.costVis=g};p();let f=function(){let g=!1;if(h&&!c&&!(Nt.excludeCreep[i]&&Nt.excludeCreep[i].includes(r))&&i!=="prehistoric"){let w=Nt.creepCalc[i]&&Nt.creepCalc[i][r]?Nt.creepCalc[i][r]:100,v=w-1,k=_t(u,w,o.extra),P=_t(u,v,o.extra);Object.keys(l).forEach(function(j){k[j]&&(l[j].creep=+(k[j](w,o.extra)/P[j](v,o.extra)).toFixed(5),l[j].creep===1?l[j].creep=t("wiki_calc_none"):l[j].creep<1.005&&(l[j].creep=1.005),g=g||l[j].vis)})}o.creepVis=g};(Nt.include[i]&&Nt.include[i].includes(r)||Nt.exclude[i]&&!Nt.exclude[i].includes(r))&&(f(),a.append($(`
              {{ | ownedLabel }} -+
              @@ -405,7 +405,7 @@
              - `))),C({el:`#${r}`,data:{i:o,r:l},methods:{val(g){o[g]=Math.round(o[g]),o[g]&&o[g]<0?o[g]=0:c&&o[g]>c&&(o[g]=c),d(),p()},less(g){o[g]>0&&o[g]--},more(g){(!c||c&&o[g]`);a.append(c),qa(c,q.evolution[s],!1,!0),pr(c,"prehistoric",s),hr(c,s,"prehistoric",!1,r),M("add",`prehistoric-${i}`,n[1],typeof q.evolution[s].title=="function"?q.evolution[s].title():q.evolution[s].title)}})}function j_(a,r){let i=r==="truepath"?"tp_structures":"structures";Object.keys(q.city).forEach(function(s){if((!q.city[s].hasOwnProperty("wiki")||q.city[s].wiki)&&(!q.city[s].hasOwnProperty("path")||q.city[s].path.includes(r))){let n=q.city[s].id.split("-"),c=$(`
              `);a.append(c),qa(c,q.city[s],!1,!0),pr(c,"planetary",s),hr(c,s,"planetary",!1,r),M("add",`planetary-${i}`,n[1],typeof q.city[s].title=="function"?q.city[s].title():q.city[s].title)}})}function F_(a,r){let i=r==="truepath"?"tp_structures":"structures";Object.keys(q.space).forEach(function(s){let n=typeof q.space[s].info.name=="string"?q.space[s].info.name:q.space[s].info.name(),c=typeof q.space[s].info.desc=="string"?q.space[s].info.desc:q.space[s].info.desc();Object.keys(q.space[s]).forEach(function(o){if(o!=="info"&&(!q.space[s][o].hasOwnProperty("wiki")||q.space[s][o].wiki)&&(!q.space[s][o].hasOwnProperty("path")||q.space[s][o].path.includes(r))){let l=q.space[s][o].id.split("-"),u=$(`
              `);a.append(u),qa(u,q.space[s][o],`${n}`,!0),pr(u,"space",o),hr(u,o,"space",s,r),M("add",`space-${i}`,l[1],typeof q.space[s][o].title=="function"?q.space[s][o].title():q.space[s][o].title),B(`pop${q.space[s][o].id}`,$(`
              ${c}
              `))}})}),Object.keys(q.starDock).forEach(function(s){if(s!=="info"&&(!q.starDock[s].hasOwnProperty("wiki")||q.starDock[s].wiki)&&(!q.starDock[s].hasOwnProperty("path")||q.starDock[s].path.includes(r))){let n=q.starDock[s].id.split("-"),c=$(`
              `);a.append(c),qa(c,q.starDock[s],`${t("space_gas_star_dock_title")}`,!0),pr(c,"starDock",s),hr(c,s,"starDock",!1,r),M("add",`space-${i}`,n[1],typeof q.starDock[s].title=="function"?q.starDock[s].title():q.starDock[s].title),B(`pop${q.starDock[s].id}`,$(`
              ${t("space_gas_star_dock_wiki")}
              `))}})}function z_(a){Object.keys(q.interstellar).forEach(function(r){let i=typeof q.interstellar[r].info.name=="string"?q.interstellar[r].info.name:q.interstellar[r].info.name(),s=typeof q.interstellar[r].info.desc=="string"?q.interstellar[r].info.desc:q.interstellar[r].info.desc();Object.keys(q.interstellar[r]).forEach(function(n){if(n!=="info"&&(!q.interstellar[r][n].hasOwnProperty("wiki")||q.interstellar[r][n].wiki)){let c=q.interstellar[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.interstellar[r][n],`${i}`,!0),pr(o,"interstellar",n),hr(o,n,"interstellar",r),M("add","interstellar-structures",c[1],typeof q.interstellar[r][n].title=="function"?q.interstellar[r][n].title():q.interstellar[r][n].title),B(`pop${q.interstellar[r][n].id}`,$(`
              ${s}
              `))}})})}function A_(a){Object.keys(q.galaxy).forEach(function(r){let i=typeof q.galaxy[r].info.name=="string"?q.galaxy[r].info.name:q.galaxy[r].info.name(),s=typeof q.galaxy[r].info.desc=="string"?q.galaxy[r].info.desc:q.galaxy[r].info.desc();Object.keys(q.galaxy[r]).forEach(function(n){if(n!=="info"&&(!q.galaxy[r][n].hasOwnProperty("wiki")||q.galaxy[r][n].wiki)){let c=q.galaxy[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.galaxy[r][n],`${i}`,!0),pr(o,"intergalactic",n),hr(o,n,"intergalactic",r),M("add","intergalactic-structures",c[1],typeof q.galaxy[r][n].title=="function"?q.galaxy[r][n].title():q.galaxy[r][n].title),B(`pop${q.galaxy[r][n].id}`,$(`
              ${s}
              `))}})})}function T_(a){Object.keys(q.portal).forEach(function(r){let i=typeof q.portal[r].info.name=="string"?q.portal[r].info.name:q.portal[r].info.name(),s=typeof q.portal[r].info.desc=="string"?q.portal[r].info.desc:q.portal[r].info.desc();Object.keys(q.portal[r]).forEach(function(n){if(n!=="info"&&(!q.portal[r][n].hasOwnProperty("wiki")||q.portal[r][n].wiki)){let c=q.portal[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.portal[r][n],`${i}`,!0),pr(o,"hell",n),hr(o,n,"hell",r),M("add","hell-structures",c[1],typeof q.portal[r][n].title=="function"?q.portal[r][n].title():q.portal[r][n].title),B(`pop${q.portal[r][n].id}`,$(`
              ${s}
              `))}})})}function I_(a){Object.keys(q.tauceti).forEach(function(r){let i=typeof q.tauceti[r].info.name=="string"?q.tauceti[r].info.name:q.tauceti[r].info.name(),s=typeof q.tauceti[r].info.desc=="string"?q.tauceti[r].info.desc:q.tauceti[r].info.desc();Object.keys(q.tauceti[r]).forEach(function(n){if(n!=="info"&&(!q.tauceti[r][n].hasOwnProperty("wiki")||q.tauceti[r][n].wiki)){let c=q.tauceti[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.tauceti[r][n],`${i}`,!0),pr(o,"tauceti",n),hr(o,n,"tauceti",r),M("add","tauceti-structures",c[1],typeof q.tauceti[r][n].title=="function"?q.tauceti[r][n].title():q.tauceti[r][n].title),B(`pop${q.tauceti[r][n].id}`,$(`
              ${s}
              `))}})})}var Ho=oa(),Qo=Li("standard"),Jo=Li("truepath"),tc={club:e.race.soul_eater?[t("wiki_tech_resource_unlock",[t("resource_Souls_name")])]:[t("wiki_tech_club"),t("wiki_tech_resource_unlock",[t("resource_Food_name")])],bone_tools:e.race.smoldering?[t("wiki_tech_bone_tools_alt"),t("wiki_tech_resource_unlock",[t("resource_Chrysotile_name")])]:[t("wiki_tech_bone_tools"),t("wiki_tech_resource_unlock",[t("resource_Stone_name")])],wooden_tools:[t("wiki_tech_bone_tools"),t("wiki_tech_resource_unlock",[t("resource_Stone_name")])],sundial:[t("wiki_tech_sundial1"),t("wiki_tech_sundial2"),t("wiki_tech_sundial3"),t("wiki_tech_sundial4"),t("wiki_tech_sundial5")],housing:[t("wiki_tech_building_unlock",[$e("small")])],cottage:[t("wiki_tech_building_unlock",[$e("medium")])],apartment:[t("wiki_tech_building_unlock",[$e("large")])],arcology:[t("wiki_tech_building_unlock",[t("portal_arcology_title")])],steel_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],mythril_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],neutronium_walls:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],bolognium_alloy_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],aphrodisiac:[t("wiki_tech_aphrodisiac")],fertility_clinic:[t("wiki_tech_fertility_clinic")],smokehouse:[t("wiki_tech_building_unlock",[t("city_smokehouse")])],lodge:[t("wiki_tech_building_unlock",[t("city_lodge")])],alt_lodge:[t("wiki_tech_building_unlock",[t("city_lodge")])],soul_well:[t("wiki_tech_building_unlock",[t("city_soul_well")])],compost:[t("wiki_tech_building_unlock",[t("city_compost_heap")])],hot_compost:[t("wiki_tech_hot_compost",[100])],mulching:[t("wiki_tech_hot_compost",[50])],adv_mulching:[t("wiki_tech_hot_compost",[33.33])],agriculture:[t("wiki_tech_building_unlock",[t("city_farm")])],farm_house:[t("wiki_tech_farm_house")],irrigation:[t("wiki_tech_irrigation")],silo:[t("wiki_tech_building_unlock",[t("city_silo")])],mill:[t("wiki_tech_building_unlock",[t("city_mill_title1")])],windmill:[t("wiki_tech_windmill1"),t("wiki_tech_windmill2")],windturbine:[t("wiki_tech_windturbine")],wind_plant:[t("wiki_tech_building_unlock",[t("city_mill_title2")])],evil_wind_plant:[t("wiki_tech_building_unlock",[t("city_mill_title2")])],gmfood:[t("wiki_tech_gmfood")],foundry:[t("wiki_tech_building_unlock",[t("city_foundry")])],artisans:[t("wiki_tech_artisans")],apprentices:[t("wiki_tech_apprentices")],carpentry:[t("wiki_tech_carpentry")],demonic_craftsman:[t("wiki_tech_master_craftsman")],master_craftsman:[t("wiki_tech_master_craftsman")],brickworks:[t("wiki_tech_brickworks")],machinery:[t("wiki_tech_machinery")],cnc_machine:[t("wiki_tech_cnc_machine")],vocational_training:[t("wiki_tech_vocational_training")],stellar_forge:[t("wiki_tech_building_unlock",[t("interstellar_stellar_forge_title")])],stellar_smelting:[t("wiki_tech_stellar_smelting"),t("wiki_tech_fuel_unlock",[t("star")])],assembly_line:[t("wiki_tech_factory_upgrade1",[50]),t("wiki_tech_factory_upgrade2",[50])],automation:[t("wiki_tech_factory_upgrade1",[33]),t("wiki_tech_factory_upgrade2",[33])],laser_cutters:[t("wiki_tech_factory_upgrade1",[25]),t("wiki_tech_factory_upgrade2",[25])],high_tech_factories:[t("wiki_tech_factory_upgrade1",[20]),t("wiki_tech_factory_upgrade2",[20])],theatre:[t("wiki_tech_building_unlock",[t("city_amphitheatre")])],playwright:[t("wiki_tech_entertain1",[2])],magic:[t("wiki_tech_entertain1",[3])],superstars:[t("wiki_tech_entertain2",[1])],radio:[t("wiki_tech_entertain3",[1])],tv:[t("wiki_tech_entertain3",[2])],vr_center:[t("wiki_tech_building_unlock",[t("space_red_vr_center_title")]),t("wiki_tech_entertain3",[3])],zoo:[t("wiki_tech_building_unlock",[t("tech_zoo")])],casino:[t("wiki_tech_building_unlock",[t("city_casino")])],dazzle:[t("wiki_tech_dazzle",[50])],casino_vault:[t("wiki_tech_casino_vault",[4e4,6e4])],otb:[t("wiki_tech_otb")],online_gambling:[t("wiki_tech_dazzle",[33.33]),t("wiki_tech_casino_vault",[6e4,12e4])],bolognium_vaults:[t("wiki_tech_casino_vault",[12e4,24e4])],mining:[t("wiki_tech_building_unlock",[t("city_rock_quarry")])],bayer_process:[t("wiki_tech_building_unlock",[t("city_metal_refinery")])],elysis_process:[t("wiki_tech_elysis_process")],smelting:[t("wiki_tech_building_unlock",[t("city_smelter")])],steel:[t("wiki_tech_steel")],blast_furnace:[t("wiki_tech_smelt_boost1",[t("resource_Iron_name")])],bessemer_process:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],oxygen_converter:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],electric_arc_furnace:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],hellfire_furnace:[t("wiki_tech_smelt_boost2")],infernium_fuel:[t("wiki_tech_fuel_unlock",[t("modal_smelter_inferno")])],iridium_smelting_perk:[t("wiki_tech_iridium_smelting")],rotary_kiln:[t("wiki_tech_rotary_kiln")],metal_working:[t("wiki_tech_building_unlock",[t("city_mine")])],iron_mining:[t("wiki_tech_iron_mining"),t("wiki_tech_resource_unlock",[t("resource_Iron_name")])],coal_mining:[t("wiki_tech_building_unlock",[t("city_coal_mine")]),t("wiki_tech_resource_unlock",[t("resource_Coal_name")])],storage:[t("wiki_tech_building_unlock",[t("city_shed_title1")])],reinforced_shed:[t("wiki_tech_store_upgrade",[t("city_shed_title1"),125])],barns:[t("wiki_tech_name_change",[t("city_shed_title1"),t("city_shed_title2")]),t("wiki_tech_store_upgrade",[t("city_shed_title2"),133])],warehouse:[t("wiki_tech_name_change",[t("city_shed_title2"),t("city_shed_title3")]),t("wiki_tech_store_upgrade",[t("city_shed_title3"),171])],cameras:[t("wiki_tech_store_upgrade",[t("city_shed_title3"),26])],pocket_dimensions:[t("wiki_tech_store_upgrade",[t("city_shed_title3"),21]),t("wiki_tech_pocket_dimensions")],ai_logistics:[t("wiki_tech_ai_logistics")],containerization:[t("wiki_tech_building_unlock",[t("city_storage_yard")])],reinforced_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),500,300])],cranes:[t("wiki_tech_cranes",[t("city_storage_yard"),t("resource_Crates_name")])],titanium_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),750,500])],mythril_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1e3,750])],infernite_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1500,1e3])],graphene_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),2200,1500])],bolognium_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),6200,2200])],steel_containers:[t("wiki_tech_building_unlock",[t("city_warehouse")])],gantry_crane:[t("wiki_tech_cranes",[t("city_warehouse"),t("resource_Containers_name")])],alloy_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),1200,800])],mythril_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),1600,1200])],adamantite_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),2200,1600])],aerogel_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),3200,2200])],bolognium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),9700,3200])],nanoweave_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),17700,9700])],evil_planning:[t("wiki_tech_urban_planning")],urban_planning:[t("wiki_tech_urban_planning")],zoning_permits:[t("wiki_tech_zoning_permits",[2])],urbanization:[t("wiki_tech_zoning_permits",[3])],assistant:[t("wiki_tech_assistant")],government:[t("wiki_tech_government")],theocracy:[t("wiki_tech_gov_unlock",[t("govern_theocracy")])],republic:[t("wiki_tech_gov_unlock",[t("govern_republic")])],socialist:[t("wiki_tech_gov_unlock",[t("govern_socialist")])],corpocracy:[t("wiki_tech_gov_unlock",[t("govern_corpocracy")])],technocracy:[t("wiki_tech_gov_unlock",[t("govern_technocracy")])],federation:[t("wiki_tech_gov_unlock",[t("govern_federation")])],magocracy:[t("wiki_tech_gov_unlock",[t("govern_magocracy")])],governor:[t("wiki_tech_governor")],spy:[t("wiki_tech_spy")],espionage:[t("wiki_tech_espionage")],spy_training:[t("wiki_tech_spy_training")],spy_gadgets:[t("wiki_tech_spy_gadgets")],code_breakers:[t("wiki_tech_code_breakers")],currency:[t("wiki_tech_resource_unlock",[t("resource_Money_name")])],market:[t("wiki_tech_subtab_unlock",[t("tab_market"),t("tab_resources")])],tax_rates:[t("wiki_tech_tax_rates")],large_trades:[t("wiki_tech_large_trades",[5e3,100])],corruption:[t("wiki_tech_corruption")],massive_trades:[t("wiki_tech_large_trades",[1e6,1e6])],trade:[t("wiki_tech_building_unlock",[t("city_trade")])],diplomacy:[t("wiki_tech_diplomacy")],freight:[t("wiki_tech_freight")],wharf:[t("wiki_tech_building_unlock",[t("city_wharf")])],banking:[t("wiki_tech_building_unlock",[t("city_bank")])],investing:[t("wiki_tech_job_unlock",[t("job_banker")])],vault:[t("wiki_tech_vault",[1800,4e3])],bonds:[t("wiki_tech_bonds",[250])],steel_vault:[t("wiki_tech_vault",[4e3,9e3])],eebonds:[t("wiki_tech_bonds",[600])],swiss_banking:[t("wiki_tech_swiss_banking")],safety_deposit:[t("wiki_tech_safety_deposit")],stock_market:[t("wiki_tech_project_unlock",[t("arpa_projects_stock_exchange_title")])],hedge_funds:[t("wiki_tech_hedge_funds")],four_oh_one:[t("wiki_tech_bonds",[1e3])],exchange:[t("wiki_tech_building_unlock",[t("interstellar_exchange_title")])],foreign_investment:[t("wiki_tech_foreign_investment",[t("galaxy_freighter"),3]),t("wiki_tech_foreign_investment",[t("galaxy_super_freighter"),8])],mythril_vault:[t("wiki_tech_vault",[9e3,15e3])],neutronium_vault:[t("wiki_tech_vault",[15e3,22500])],adamantite_vault:[t("wiki_tech_vault",[22500,3e4])],graphene_vault:[t("wiki_tech_vault",[3e4,37500])],home_safe:[t("wiki_tech_home_safe",[$e("medium"),1e3]),t("wiki_tech_home_safe",[$e("large"),2e3])],fire_proof_safe:[t("wiki_tech_home_safe",[$e("medium"),2e3]),t("wiki_tech_home_safe",[$e("large"),5e3])],tamper_proof_safe:[t("wiki_tech_home_safe",[$e("medium"),5e3]),t("wiki_tech_home_safe",[$e("large"),1e4])],monument:[t("wiki_tech_project_unlock",[t("arpa_project_monument_title")])],tourism:[t("wiki_tech_building_unlock",[t("city_tourist_center")])],xeno_tourism:[t("wiki_tech_xeno_tourism")],science:[t("wiki_tech_building_unlock",[t("city_university")])],library:[t("wiki_tech_building_unlock",[t("city_library")])],thesis:[t("wiki_tech_thesis")],research_grant:[t("wiki_tech_research_grant")],scientific_journal:[t("wiki_tech_scientific_journal")],adjunct_professor:[t("wiki_tech_adjunct_professor")],tesla_coil:[t("wiki_tech_tesla_coil")],internet:[t("wiki_tech_internet",[t("city_university")]),t("wiki_tech_internet",[t("city_library")])],observatory:[t("wiki_tech_building_unlock",[t("space_moon_observatory_title")])],world_collider:[t("wiki_tech_building_unlock",[t("space_dwarf_collider_title")])],laboratory:[t("wiki_tech_building_unlock",[t("interstellar_laboratory_title")])],virtual_assistant:[t("wiki_tech_virtual_assistant")],dimensional_readings:[t("wiki_tech_dimensional_readings1"),t("wiki_tech_dimensional_readings2",[t("city_university")]),t("wiki_tech_dimensional_readings2",[t("city_biolab")])],quantum_entanglement:[t("wiki_tech_quantum_entanglement")],expedition:[t("wiki_tech_expedition")],subspace_sensors:[t("wiki_tech_subspace_sensors")],orichalcum_capacitor:[t("wiki_tech_orichalcum_capacitor")],advanced_biotech:[t("wiki_tech_advanced_biotech")],codex_infinium:[t("wiki_tech_codex_infinium")],hell_oven:[t("wiki_tech_building_unlock",[t("portal_oven_title")])],preparation_methods:[t("wiki_tech_building_unlock",[t("portal_dish_soul_steeper_title")]),t("wiki_tech_building_unlock",[t("portal_dish_life_infuser_title")])],final_ingredient:[t("wiki_tech_final_ingredient")],bioscience:[t("wiki_tech_building_unlock",[t("city_biolab")])],genetics:[t("wiki_tech_subtab_unlock",[t("tab_arpa_genetics"),t("tech_arpa")])],crispr:[t("wiki_tech_subtab_unlock",[t("tab_arpa_crispr"),t("tech_arpa")])],shotgun_sequencing:[t("wiki_tech_shotgun_sequencing")],de_novo_sequencing:[t("wiki_tech_de_novo_sequencing")],dna_sequencer:[t("wiki_tech_dna_sequencer")],rapid_sequencing:[t("wiki_tech_rapid_sequencing")],mad_science:[t("wiki_tech_building_unlock",[t("city_wardenclyffe")]),t("wiki_tech_gov_time")],electricity:[t("wiki_tech_building_unlock",[t("city_coal_power")]),t("wiki_tech_subtab_unlock",[t("tab_power_grid"),t("tab_civics")]),t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")])],industrialization:[t("wiki_tech_resource_unlock",[t("resource_Titanium_name")]),t("wiki_tech_building_unlock",[t("city_factory")]),t("wiki_tech_gov_time")],fission:[t("wiki_tech_building_unlock",[t("city_fission_power")])],arpa:[t("wiki_tech_tab_unlock",[t("tech_arpa")]),t("wiki_tech_subtab_unlock",[t("tab_arpa_projects"),t("tech_arpa")]),t("wiki_tech_project_unlock",[t("arpa_projects_lhc_title")]),t("wiki_tech_gov_time")],rocketry:[t("wiki_tech_project_unlock",[t("arpa_projects_launch_facility_title")])],quantum_computing:[t("wiki_tech_quantum_computing")],virtual_reality:[t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")]),t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],shields:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_neutron_name")]),t("interstellar_neutron_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_blackhole_name")]),t("interstellar_blackhole_name")])],ai_core:[t("wiki_tech_building_unlock",[t("interstellar_citadel_title")])],metaphysics:[t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],cybernetics:[t("wiki_tech_cybernetics")],blood_pact:[t("wiki_tech_subtab_unlock",[t("tab_arpa_blood"),t("tech_arpa")])],purify:[t("wiki_tech_purify")],waygate:[t("wiki_tech_building_unlock",[t("portal_waygate_title")])],demonic_infusion:[t("wiki_tech_demonic_infusion")],dark_bomb:[t("wiki_tech_dark_bomb"),t("wiki_tech_dark_bomb2"),t("wiki_tech_dark_bomb3")],gate_key:[t("wiki_tech_building_unlock",[t("portal_west_tower")]),t("wiki_tech_building_unlock",[t("portal_east_tower")])],gate_turret:[t("wiki_tech_building_unlock",[t("portal_gate_turret_title")])],infernite_mine:[t("wiki_tech_building_unlock",[t("portal_infernite_mine_title")])],hell_search:[t("wiki_tech_destination_unlock",[t("portal_ruins_mission_title"),t("portal_ruins_name")]),t("wiki_tech_hell_search"),t("wiki_tech_building_unlock",[t("portal_guard_post_title")])],lake_threat:[t("wiki_tech_building_unlock",[t("portal_bireme_title")])],lake_transport:[t("wiki_tech_building_unlock",[t("portal_transport_title")])],cooling_tower:[t("wiki_tech_building_unlock",[t("portal_cooling_tower_title")])],miasma:[t("wiki_tech_building_unlock",[t("portal_port_title")])],tech_ascension:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_sirius_name")]),t("interstellar_sirius_b_name")])],cement_processing:[t("wiki_tech_cement_processing")],adamantite_processing:[t("wiki_tech_adamantite_processing")],graphene_processing:[t("wiki_tech_graphene_processing")],fusion_power:[t("wiki_tech_building_unlock",[t("interstellar_fusion_title")])],infernium_power:[t("wiki_tech_building_unlock",[t("portal_inferno_power_title")])],thermomechanics:[t("wiki_tech_thermomechanics")],quantum_manufacturing:[t("wiki_tech_quantum_manufacturing")],worker_drone:[t("wiki_tech_building_unlock",[t("space_gas_moon_drone_title")])],uranium:[t("wiki_tech_resource_unlock",[t("resource_Uranium_name")])],uranium_storage:[t("wiki_tech_uranium_storage")],uranium_ash:[t("wiki_tech_uranium_ash")],breeder_reactor:[t("wiki_tech_breeder_reactor")],mine_conveyor:[t("wiki_tech_power_upgrade",[t("city_rock_quarry"),1]),t("wiki_tech_power_upgrade",[t("city_mine"),1]),t("wiki_tech_power_upgrade",[t("city_coal_mine"),1])],oil_well:[t("wiki_tech_building_unlock",[t("city_oil_well")])],oil_depot:[t("wiki_tech_building_unlock",[t("city_oil_depot")])],oil_power:[t("wiki_tech_building_unlock",[t("city_oil_power")])],titanium_drills:[t("wiki_tech_titanium_drills")],alloy_drills:[t("wiki_tech_alloy_drills")],fracking:[t("wiki_tech_fracking")],mythril_drills:[t("wiki_tech_mythril_drills")],mass_driver:[t("wiki_tech_building_unlock",[t("city_mass_driver")])],orichalcum_driver:[t("wiki_tech_orichalcum_driver1"),t("wiki_tech_orichalcum_driver2")],polymer:[t("wiki_tech_resource_unlock",[t("resource_Polymer_name")]),t("wiki_tech_factory_unlock",[t("resource_Polymer_name")])],fluidized_bed_reactor:[t("wiki_tech_fluidized_bed_reactor")],synthetic_fur:[t("wiki_tech_factory_unlock",[t("resource_Furs_name")])],nanoweave:[t("wiki_tech_resource_unlock",[t("resource_Nanoweave_name")])],stanene:[t("wiki_tech_resource_unlock",[t("resource_Stanene_name")]),t("wiki_tech_factory_unlock",[t("resource_Stanene_name")])],nano_tubes:[t("wiki_tech_resource_unlock",[t("resource_Nano_Tube_name")]),t("wiki_tech_factory_unlock",[t("resource_Nano_Tube_name")])],scarletite:[t("wiki_tech_resource_unlock",[t("resource_Scarletite_name")]),t("wiki_tech_building_unlock",[t("portal_hell_forge_title")])],pillars:[t("wiki_tech_pillars")],reclaimer:[t("wiki_tech_job_unlock",[t("job_reclaimer")]),t("wiki_tech_building_unlock",[t("city_graveyard")])],shovel:[t("wiki_tech_shovel",[40])],iron_shovel:[t("wiki_tech_shovel",[80])],steel_shovel:[t("wiki_tech_shovel",[120])],titanium_shovel:[t("wiki_tech_shovel",[160])],alloy_shovel:[t("wiki_tech_shovel",[200])],mythril_shovel:[t("wiki_tech_shovel",[240])],adamantite_shovel:[t("wiki_tech_shovel",[280])],stone_axe:[t("wiki_tech_building_unlock",[t("city_lumber_yard")])],copper_axes:[t("wiki_tech_copper_axes",[35])],iron_saw:[t("wiki_tech_building_unlock",[t("city_sawmill")])],steel_saw:[t("wiki_tech_steel_saw")],iron_axes:[t("wiki_tech_copper_axes",[70])],steel_axes:[t("wiki_tech_copper_axes",[105])],titanium_axes:[t("wiki_tech_copper_axes",[140])],chainsaws:[t("wiki_tech_copper_axes",[175])],copper_sledgehammer:[t("wiki_tech_copper_sledgehammer",[40])],iron_sledgehammer:[t("wiki_tech_copper_sledgehammer",[80])],steel_sledgehammer:[t("wiki_tech_copper_sledgehammer",[120])],titanium_sledgehammer:[t("wiki_tech_copper_sledgehammer",[160])],copper_pickaxe:[t("wiki_tech_copper_pickaxe1",[15]),t("wiki_tech_copper_pickaxe2",[12])],iron_pickaxe:[t("wiki_tech_copper_pickaxe1",[30]),t("wiki_tech_copper_pickaxe2",[24])],steel_pickaxe:[t("wiki_tech_copper_pickaxe1",[45]),t("wiki_tech_copper_pickaxe2",[36])],jackhammer:[t("wiki_tech_copper_pickaxe1",[60]),t("wiki_tech_copper_pickaxe2",[48])],jackhammer_mk2:[t("wiki_tech_copper_pickaxe1",[75]),t("wiki_tech_copper_pickaxe2",[60])],adamantite_hammer:[t("wiki_tech_copper_pickaxe1",[90]),t("wiki_tech_copper_pickaxe2",[72])],copper_hoe:[t("wiki_tech_copper_hoe",[33.33])],iron_hoe:[t("wiki_tech_copper_hoe",[66.67])],steel_hoe:[t("wiki_tech_copper_hoe",[100])],titanium_hoe:[t("wiki_tech_copper_hoe",[133.33])],adamantite_hoe:[t("wiki_tech_copper_hoe",[166.67])],cyber_limbs:[t("wiki_tech_cyber_limbs")],slave_pens:[t("wiki_tech_building_unlock",[t("city_slave_pen")])],slave_market:[t("wiki_tech_slave_market")],ceremonial_dagger:[t("wiki_tech_ceremonial_dagger",[600,1500])],last_rites:[t("wiki_tech_ceremonial_dagger",[1800,3600])],ancient_infusion:[t("wiki_tech_ceremonial_dagger",[5400,16200])],garrison:[t("wiki_tech_building_unlock",[t("city_garrison")])],mercs:[t("wiki_tech_mercs")],signing_bonus:[t("wiki_tech_signing_bonus")],hospital:[t("wiki_tech_building_unlock",[t("city_hospital")])],bac_tanks:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),10])],boot_camp:[t("wiki_tech_building_unlock",[t("city_boot_camp")])],vr_training:[t("wiki_tech_vr_training",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("city_boot_camp")])],bows:[t("wiki_tech_bows",[100])],flintlock_rifle:[t("wiki_tech_bows",[200])],machine_gun:[t("wiki_tech_bows",[300])],bunk_beds:[t("wiki_tech_bunk_beds")],rail_guns:[t("wiki_tech_bows",[400])],laser_rifles:[t("wiki_tech_bows",[500])],plasma_rifles:[t("wiki_tech_bows",[600])],disruptor_rifles:[t("wiki_tech_bows",[700])],gauss_rifles:[t("wiki_tech_bows",[800])],cyborg_soldiers:[t("wiki_tech_bows",[900])],space_marines:[t("wiki_tech_building_unlock",[t("space_red_space_barracks_title")])],hammocks:[t("wiki_tech_hammocks",[2,t("space_red_space_barracks_title")]),t("wiki_tech_hammocks",[3,t("galaxy_starbase")])],cruiser:[t("wiki_tech_building_unlock",[t("interstellar_cruiser_title")])],armor:[t("wiki_tech_armor",[1])],plate_armor:[t("wiki_tech_armor",[2])],kevlar:[t("wiki_tech_armor",[3])],nanoweave_vest:[t("wiki_tech_armor",[4])],laser_turret:[t("wiki_tech_name_change",[t("portal_turret_title1"),t("portal_turret_title2")]),t("wiki_tech_laser_turret",[50])],plasma_turret:[t("wiki_tech_name_change",[t("portal_turret_title2"),t("portal_turret_title3")]),t("wiki_tech_laser_turret",[70])],dynamite:[t("wiki_tech_dynamite1",[50]),t("wiki_tech_dynamite2",[25]),t("wiki_tech_dynamite3",[25])],anfo:[t("wiki_tech_dynamite1",[75]),t("wiki_tech_dynamite2",[40]),t("wiki_tech_dynamite3",[40])],mad:[t("wiki_tech_mad")],cement:[t("wiki_tech_building_unlock",[t("city_cement_plant")])],rebar:[t("wiki_tech_rebar",[10])],steel_rebar:[t("wiki_tech_rebar",[20])],portland_cement:[t("wiki_tech_portland_cement")],screw_conveyor:[t("wiki_tech_power_upgrade",[t("city_cement_plant"),2]),t("wiki_tech_screw_conveyor",[5])],adamantite_screws:[t("wiki_tech_screw_conveyor",[8])],hunter_process:[t("wiki_tech_hunter_process",[t("resource_Steel_name"),25])],kroll_process:[t("wiki_tech_kroll_process",[t("resource_Iron_name"),25])],cambridge_process:[t("wiki_tech_hunter_process",[t("resource_Steel_name"),10]),t("wiki_tech_kroll_process",[t("resource_Iron_name"),10])],matter_compression:[t("wiki_tech_matter_compression",[t("resource_Crates_name"),t("city_storage_yard")]),t("wiki_tech_matter_compression",[t("resource_Containers_name"),t("city_warehouse")])],higgs_boson:[t("wiki_tech_higgs_boson")],dimensional_compression:[t("wiki_tech_dimensional_compression")],theology:[t("wiki_tech_building_unlock",[t("city_temple")])],fanaticism:[t("wiki_tech_fanaticism")],alt_fanaticism:[t("wiki_tech_fanaticism")],ancient_theology:[t("wiki_tech_building_unlock",[t("space_red_ziggurat_title")])],study:[t("wiki_tech_study")],encoding:[t("wiki_tech_encoding")],deify:[t("wiki_tech_deify")],infusion:[t("wiki_tech_infusion")],indoctrination:[e.race.no_plasmid?t("wiki_tech_indoctrination2"):t("wiki_tech_indoctrination1")],missionary:[t("wiki_tech_missionary")],zealotry:[t("wiki_tech_zealotry")],anthropology:[e.race.no_plasmid?t("wiki_tech_anthropology2"):t("wiki_tech_anthropology1")],alt_anthropology:[e.race.no_plasmid?t("wiki_tech_anthropology2"):t("wiki_tech_anthropology1")],mythology:[t("wiki_tech_mythology")],archaeology:[t("wiki_tech_archaeology")],merchandising:[t("wiki_tech_merchandising")],astrophysics:[t("wiki_tech_building_unlock",[t("space_home_propellant_depot_title")])],rover:[t("wiki_tech_destination_unlock",[t("space_moon_mission_title"),t("space_moon_info_name")])],probes:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("red")]),ee("red")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("hell")]),ee("hell")]),t("wiki_tech_gov_time")],starcharts:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_sun_info_name")]),t("space_sun_info_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("gas")]),ee("gas")])],colonization:[t("wiki_tech_building_unlock",[e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")])],red_tower:[t("wiki_tech_building_unlock",[t("space_red_tower_title")])],space_manufacturing:[t("wiki_tech_space_manufacturing",[ee("red")])],exotic_lab:[t("wiki_tech_building_unlock",[t("space_red_exotic_lab_title")])],hydroponics:[t("wiki_tech_hydroponics")],dyson_swarm:[t("wiki_tech_building_unlock",[t("space_sun_swarm_control_title")]),t("wiki_tech_building_unlock",[t("space_sun_swarm_satellite_title")])],swarm_plant:[t("wiki_tech_building_unlock",[t("space_hell_swarm_plant_title")])],space_sourced:[t("wiki_tech_space_sourced")],swarm_plant_ai:[t("wiki_tech_swarm_plant_ai")],swarm_control_ai:[t("wiki_tech_swarm_control_ai")],quantum_swarm:[t("wiki_tech_quantum_swarm")],perovskite_cell:[t("wiki_tech_perovskite_cell",[.5])],swarm_convection:[t("wiki_tech_perovskite_cell",[.65])],orichalcum_panels:[t("wiki_tech_perovskite_cell",[.8])],dyson_net:[t("wiki_tech_building_unlock",[t("interstellar_dyson_title")])],dyson_sphere2:[t("wiki_tech_name_change",[t("interstellar_dyson_title"),t("interstellar_dyson_sphere_title")]),t("wiki_tech_dyson_sphere2")],orichalcum_sphere:[t("wiki_tech_dyson_sphere2")],gps:[t("wiki_tech_building_unlock",[t("space_home_gps_title")])],nav_beacon:[t("wiki_tech_building_unlock",[t("space_home_nav_beacon_title")])],subspace_signal:[t("wiki_tech_subspace_signal",[ee("red")])],atmospheric_mining:[t("wiki_tech_building_unlock",[t("space_gas_mining_title")]),t("wiki_tech_building_unlock",[t("space_gas_storage_title",[ee("gas")])])],helium_attractor:[t("wiki_tech_helium_attractor")],ram_scoops:[t("wiki_tech_ram_scoops")],elerium_prospecting:[t("wiki_tech_building_unlock",[t("interstellar_elerium_prospector_title")])],zero_g_mining:[t("wiki_tech_building_unlock",[t("space_belt_station_title")]),t("wiki_tech_building_unlock",[t("space_belt_iridium_ship_title")]),t("wiki_tech_building_unlock",[t("space_belt_iron_ship_title")])],elerium_mining:[t("wiki_tech_building_unlock",[t("space_belt_elerium_ship_title")]),t("wiki_tech_elerium_mining")],laser_mining:[t("wiki_tech_laser_mining",[t("space_belt_elerium_ship_title"),.0075,.005]),t("wiki_tech_laser_mining",[t("space_belt_iridium_ship_title"),.08,.055]),t("wiki_tech_laser_mining",[t("space_belt_iron_ship_title"),3,2])],plasma_mining:[t("wiki_tech_laser_mining",[t("space_belt_elerium_ship_title"),.009,.0075]),t("wiki_tech_laser_mining",[t("space_belt_iridium_ship_title"),.1,.08]),t("wiki_tech_laser_mining",[t("space_belt_iron_ship_title"),4,3])],elerium_tech:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("dwarf")]),ee("dwarf")])],elerium_reactor:[t("wiki_tech_building_unlock",[t("space_dwarf_reactor_title")])],neutronium_housing:[t("wiki_tech_neutronium_housing")],unification2:[t("wiki_tech_unification2a"),t("wiki_tech_unification2b"),t("wiki_tech_unification2c"),t("wiki_tech_unification2d"),t("wiki_tech_unification2e"),t("wiki_tech_unification2f",[ee("gas")]),t("wiki_tech_unification2g"),t("wiki_tech_unification2h"),t("wiki_tech_unification2i")],unite:[t("wiki_tech_rival_unlock"),t("wiki_tech_unite_a"),t("wiki_tech_unification2b"),t("wiki_tech_unite_b"),t("wiki_tech_unification2d"),t("wiki_tech_unification2e"),t("wiki_tech_unite_c"),t("wiki_tech_unite_d"),t("wiki_tech_unite_e")],star_dock:[t("wiki_tech_building_unlock",[t("space_gas_star_dock_title")])],interstellar:[t("wiki_tech_interstellar")],genesis_ship:[t("wiki_tech_genesis_ship")],genetic_decay:[t("wiki_tech_genetic_decay")],stabilize_decay:[t("wiki_tech_stabilize_decay")],warp_drive:[t("wiki_tech_subtab_unlock",[t("tab_interstellar"),t("tab_civil")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_alpha_name")]),t("interstellar_alpha_name")])],habitat:[t("wiki_tech_building_unlock",[t("interstellar_habitat_title")])],graphene:[t("wiki_tech_building_unlock",[t("interstellar_g_factory_title")])],aerogel:[t("wiki_tech_resource_unlock",[t("resource_Aerogel_name")])],mega_manufacturing:[t("wiki_tech_building_unlock",[t("interstellar_int_factory_title")])],luxury_condo:[t("wiki_tech_building_unlock",[t("tech_luxury_condo")])],stellar_engine:[t("wiki_tech_building_unlock",[t("interstellar_stellar_engine")])],mass_ejector:[t("wiki_tech_building_unlock",[t("interstellar_mass_ejector")])],asteroid_redirect:[t("wiki_tech_project_unlock",[t("arpa_projects_roid_eject_title",[t("arpa_projects_roid_eject_asteroid")])])],exotic_infusion:[t("wiki_tech_confirmation")],infusion_check:[t("wiki_tech_confirmation")],infusion_confirm:[t("wiki_tech_infusion_confirm")],stabilize_blackhole:[t("wiki_tech_stabilize_blackhole1"),t("wiki_tech_stabilize_blackhole2"),t("wiki_tech_stabilize_blackhole3")],mana_syphon:[t("wiki_tech_project_unlock",[t("arpa_syphon_title")])],gravity_convection:[t("wiki_tech_gravitational_convection")],wormholes:[t("wiki_tech_building_unlock",[t("interstellar_jump_ship")])],fortifications:[t("wiki_tech_subtab_unlock",[t("tab_portal"),t("tab_civil")]),t("wiki_tech_fortifications"),t("wiki_tech_building_unlock",[t("portal_turret_title1")]),t("wiki_tech_building_unlock",[t("portal_carport_title")])],war_drones:[t("wiki_tech_building_unlock",[t("portal_war_drone_title")])],demon_attractor:[t("wiki_tech_building_unlock",[t("portal_attractor_title")])],combat_droids:[t("wiki_tech_building_unlock",[t("portal_war_droid_title")])],repair_droids:[t("wiki_tech_building_unlock",[t("portal_repair_droid_title")])],advanced_predators:[t("wiki_tech_advanced_predators")],enhanced_droids:[t("wiki_tech_enhanced_droids")],sensor_drone:[t("wiki_tech_building_unlock",[t("portal_sensor_drone_title")])],map_terrain:[t("wiki_tech_map_terrain")],calibrated_sensors:[t("wiki_tech_calibrated_sensors",[20])],shield_generator:[t("wiki_tech_shield_generator")],enhanced_sensors:[t("wiki_tech_enhanced_sensors1"),t("wiki_tech_calibrated_sensors",[50])],xeno_linguistics:[t("wiki_tech_destination_unlock",[t("galaxy_gorddon_mission"),t("galaxy_gorddon")])],xeno_culture:[t("wiki_tech_building_unlock",[t("galaxy_embassy")])],cultural_exchange:[t("wiki_tech_building_unlock",[t("galaxy_dormitory")]),t("wiki_tech_building_unlock",[t("galaxy_symposium")])],shore_leave:[t("wiki_tech_shore_leave")],xeno_gift:[t("wiki_tech_xeno_gift",[e.galaxy.alien1?x[e.galaxy.alien1.id].name:t("galaxy_alien1_proxy")]),t("wiki_tech_building_unlock",[t("galaxy_consulate")])],industrial_partnership:[t("wiki_tech_building_unlock",[t("galaxy_vitreloy_plant")])],embassy_housing:[t("wiki_tech_embassy_housing")],advanced_telemetry:[t("wiki_tech_advanced_telemetry")],defense_platform:[t("wiki_tech_building_unlock",[t("galaxy_defense_platform")])],scout_ship:[t("wiki_tech_building_unlock",[t("galaxy_scout_ship")])],corvette_ship:[t("wiki_tech_building_unlock",[t("galaxy_corvette_ship")])],frigate_ship:[t("wiki_tech_building_unlock",[t("galaxy_frigate_ship")])],cruiser_ship:[t("wiki_tech_building_unlock",[t("galaxy_cruiser_ship")]),t("wiki_tech_destination_unlock",[t("galaxy_alien2_mission",[e.galaxy.alien2?x[e.galaxy.alien2.id].name:t("galaxy_alien2_proxy")]),t("galaxy_alien",[e.galaxy.alien2?x[e.galaxy.alien2.id].name:t("galaxy_alien2_proxy")])])],dreadnought:[t("wiki_tech_building_unlock",[t("galaxy_dreadnought")])],ship_dock:[t("wiki_tech_building_unlock",[t("galaxy_ship_dock")])],ore_processor:[t("wiki_tech_building_unlock",[t("galaxy_ore_processor")])],scavenger:[t("wiki_tech_building_unlock",[t("galaxy_scavenger")])],coordinates:[t("wiki_tech_destination_unlock",[t("galaxy_alien2_mission",[t("galaxy_chthonian")]),t("galaxy_chthonian")])],chthonian_survey:[t("wiki_tech_resource_unlock",[t("resource_Orichalcum_name")]),t("wiki_tech_building_unlock",[t("galaxy_excavator")]),t("wiki_tech_building_unlock",[t("galaxy_raider")])],gateway_depot:[t("wiki_tech_building_unlock",[t("galaxy_gateway_depot")])],soul_forge:[t("wiki_tech_building_unlock",[t("portal_soul_forge_title")])],soul_attractor:[t("wiki_tech_building_unlock",[t("portal_soul_attractor_title")])],soul_absorption:[t("wiki_tech_soul_absorption")],soul_link:[t("wiki_tech_soul_link1"),t("wiki_tech_soul_link2")],gun_emplacement:[t("wiki_tech_building_unlock",[t("portal_gun_emplacement_title")])],advanced_emplacement:[t("wiki_tech_advanced_emplacement1"),t("wiki_tech_advanced_emplacement2"),t("wiki_tech_advanced_emplacement3")],mana:[t("wiki_tech_resource_unlock",[t("resource_Mana_name")]),t("wiki_tech_resource_unlock",[t("resource_Crystal_name")]),t("wiki_tech_job_unlock",[t("job_crystal_miner")])],ley_lines:[t("wiki_tech_building_unlock",[e.race.cataclysm||e.race.orbit_decayed?t("space_red_pylon"):t("city_pylon")])],rituals:[t("wiki_tech_rituals")],crafting_ritual:[t("wiki_tech_crafting_ritual")],mana_nexus:[t("wiki_tech_project_unlock",[t("tech_mana_nexus")])],clerics:[t("wiki_tech_clerics")],conjuring:[t("wiki_tech_conjuring",Ho.active?[t("city_trick"),t("city_trick_conjure")]:[t("city_food"),t("city_food_conjure")])],res_conjuring:[t("wiki_tech_conjuring",Ho.active?[t("city_dig"),t("city_dig_conjour")]:[t("city_lumber"),t("city_lumber_conjure")]),t("wiki_tech_conjuring",e.race.sappy?[t("city_amber"),t("city_amber_conjour")]:[t("city_stone"),t("city_stone_conjour")])],alchemy:[t("wiki_tech_subtab_unlock",[t("tab_alchemy"),t("tab_resources")])],transmutation:[t("wiki_tech_transmutation1"),t("wiki_tech_transmutation2")],bribe_sphinx:[t("wiki_tech_bribe_sphinx")],alien_biotech:[t("wiki_tech_alien_biotech")],zero_g_lab:[t("wiki_tech_building_unlock",[t("tech_zero_g_lab")])],operating_base:[t("wiki_tech_building_unlock",[t("tech_operating_base")])],munitions_depot:[t("wiki_tech_building_unlock",[t("tech_munitions_depot")])],fob:[t("wiki_tech_building_unlock",[t("space_fob_title")])],bac_tanks_tp:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),10])],medkit:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),15])],sam_site:[t("wiki_tech_building_unlock",[t("space_sam_title")])],data_cracker:[t("wiki_tech_building_unlock",[t("space_decoder_title")])],ai_core_tp:[t("wiki_tech_building_unlock",[t("space_ai_core")])],ai_optimizations:[t("wiki_tech_ai_optimizations")],synthetic_life:[t("wiki_tech_building_unlock",[t("space_ai_colonist_title")])],protocol66a:[t("wiki_tech_protocol66a")],quantium:[t("wiki_tech_resource_unlock",[t("resource_Quantium_name")]),t("wiki_tech_quantium")],anitgrav_bunk:[t("wiki_tech_hammocks",[2,t("space_red_space_barracks_title")])],higgs_boson_tp:[t("wiki_tech_higgs_boson")],strange_signal:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("triton")]),ee("triton")])],data_analysis:[t("wiki_tech_data_analysis",[ee("triton")]),t("wiki_tech_syndicate_increase",[ee("titan"),1e3,500]),t("wiki_tech_syndicate_increase",[ee("enceladus"),500,250]),t("wiki_tech_syndicate_increase",[ee("triton"),2e3,1e3])],mass_relay:[t("wiki_tech_building_unlock",[t("space_dwarf_mass_relay_title")])],nav_data:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("eris")]),ee("eris")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_kuiper_title")]),t("space_kuiper_title")])],dronewar:[t("wiki_tech_building_unlock",[t("space_drone_control",[ee("eris")])]),t("wiki_tech_building_unlock",[t("space_shock_trooper_title")]),t("wiki_tech_control_unlock",[t("space_digsite_title")])],drone_tank:[t("wiki_tech_building_unlock",[t("space_tank_title")])],stanene_tp:[t("wiki_tech_resource_unlock",[t("resource_Stanene_name")]),t("wiki_tech_factory_unlock",[t("resource_Stanene_name")])],graphene_tp:[t("wiki_tech_building_unlock",[t("interstellar_g_factory_title")])],virtual_reality_tp:[t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")]),t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],electrolysis:[t("wiki_tech_building_unlock",[t("space_electrolysis_title")])],storehouse:[t("wiki_tech_building_unlock",[t("space_storehouse_title")])],adamantite_vault_tp:[t("wiki_tech_vault",[22500,3e4])],titan_bank:[t("wiki_tech_building_unlock",[t("city_bank")])],hydrogen_plant:[t("wiki_tech_building_unlock",[t("space_hydrogen_plant_title")])],water_mining:[t("wiki_tech_building_unlock",[t("space_water_freighter_title")])],mercury_smelting:[t("wiki_tech_building_unlock",[t("space_hell_smelter_title",[ee("hell")])])],iridium_smelting:[t("wiki_tech_iridium_smelting")],adamantite_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1500,1e3])],bolognium_crates_tp:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),6200,2200])],adamantite_containers_tp:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),2200,1600])],quantium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),3200,2200])],unobtainium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),9700,3200])],reinforced_shelving:[t("wiki_tech_reinforced_shelving")],garage_shelving:[t("wiki_tech_garage_shelving")],warehouse_shelving:[t("wiki_tech_warehouse_shelving1"),t("wiki_tech_warehouse_shelving2")],elerium_extraction:[t("wiki_tech_building_unlock",[t("space_kuiper_mine",[e.resource.Elerium.name])])],orichalcum_panels_tp:[t("wiki_tech_perovskite_cell",[.8])],shipyard:[t("wiki_tech_building_unlock",[t("outer_shipyard_title")])],ship_lasers:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_laser")])],pulse_lasers:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_p_laser")])],ship_plasma:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_plasma")])],ship_phaser:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_phaser")])],ship_disruptor:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_disruptor")])],destroyer_ship:[t("wiki_tech_building_unlock",[t("outer_shipyard_class_destroyer")])],cruiser_ship_tp:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_cruiser")])],h_cruiser_ship:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_battlecruiser")])],dreadnought_ship:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_dreadnought")])],pulse_engine:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_pulse")])],photon_engine:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_photon")])],vacuum_drive:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_vacuum")])],ship_fusion:[t("wiki_tech_ship_power_unlock",[t("outer_shipyard_power_fusion")])],ship_elerium:[t("wiki_tech_ship_power_unlock",[t("outer_shipyard_power_elerium")])],quantum_signatures:[t("wiki_tech_ship_sensor_unlock",[t("outer_shipyard_sensor_quantum")])],interstellar_drive:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_explorer")]),t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_emdrive")])],alien_outpost:[t("wiki_tech_building_unlock",[t("tech_alien_outpost")])],jumpgates:[t("wiki_tech_building_unlock",[t("tau_jump_gate")]),t("wiki_tech_building_unlock",[t("tau_jump_gate")])],system_survey:[t("wiki_tech_destination_unlock",[t("tau_gas_contest_title"),t("tau_gas_title")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("tau_roid_title")]),t("tau_roid_title")])],repository:[t("wiki_tech_building_unlock",[t("tech_repository")])],fusion_generator:[t("wiki_tech_building_unlock",[t("tech_fusion_generator")])],tau_cultivation:[t("wiki_tech_building_unlock",[t("tau_home_tau_farm")])],tau_manufacturing:[t("wiki_tech_building_unlock",[t("tau_home_tau_factory")])],jeff:[t("wiki_tech_jeff")],womling_fun:[t("wiki_tech_building_unlock",[t("wiki_tech_multi_unlock",[t("wiki_tech_multi_unlock",[t("tau_red_womling_fun1"),t("tau_red_womling_fun2")]),t("tau_red_womling_fun3")])])],womling_lab:[t("wiki_tech_building_unlock",[t("interstellar_laboratory_title")]),t("wiki_tech_womling_lab")],womling_mining:[t("wiki_tech_womling_mining",[15,t("wiki_tech_tree_womling_mining")])],womling_firstaid:[t("wiki_tech_womling_firstaid")],womling_logistics:[t("wiki_tech_womling_logistics")],womling_repulser:[t("wiki_tech_womling_repulser")],womling_farming:[t("wiki_tech_womling_farming1"),t("wiki_tech_womling_farming2")],womling_housing:[t("wiki_tech_womling_housing")],womling_support:[t("wiki_tech_building_unlock",[t("tau_gas_womling_station_title")])],womling_recycling:[t("wiki_tech_womling_recycling")],belt_mining:[t("wiki_tech_building_unlock",[t("tau_gas_ore_refinery_title")])],adv_belt_mining:[t("wiki_tech_adv_belt_mining")],space_whaling:[t("wiki_tech_building_unlock",[t("tau_gas_whaling_station_title")])],infectious_disease_lab:[t("wiki_tech_building_unlock",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")])],isolation_protocol:[t("wiki_tech_isolation_protocol1"),t("wiki_tech_isolation_protocol2")],decode_virus:[t("wiki_tech_decode_virus",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")])],vaccine_campaign:[t("wiki_tech_vaccine_campaign1",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vaccine_campaign2",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")])],vax_strat1:[t("wiki_tech_vax_strat",["250",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")])],vax_strat2:[t("wiki_tech_vax_strat",["25",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["-50%"])],vax_strat3:[t("wiki_tech_vax_strat",["390",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["+20%"])],vax_strat4:[t("wiki_tech_vax_strat",["125",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["-10%"])],cloning:[t("wiki_tech_building_unlock",[t("tau_home_cloning")])],ringworld:[t("wiki_tech_destination_unlock2",[t("tab_tauceti")]),t("wiki_tech_building_unlock",[t("tau_star_ringworld")])],iso_gambling:[t("wiki_tech_iso_gambling")],outpost_boost:[t("wiki_tech_outpost_boost")],cultural_center:[t("wiki_tech_building_unlock",[t("tech_cultural_center")])],outer_tau_survey:[t("wiki_tech_destination_unlock",[t("tau_gas2_contest_title"),t("tau_gas2_title")])],alien_research:[t("wiki_tech_alien_research")],womling_gene_therapy:[t("wiki_tech_womling_gene_therapy1"),t("wiki_tech_womling_gene_therapy2"),t("wiki_tech_womling_gene_therapy3"),t("wiki_tech_womling_gene_therapy4",[t("tau_gas_title")])],food_culture:[t("wiki_tech_food_culture")],advanced_refinery:[t("wiki_tech_advanced_refinery")],advanced_pit_mining:[t("wiki_tech_advanced_pit_mining")],useless_junk:[t("wiki_tech_useless_junk")],advanced_asteroid_mining:[t("wiki_tech_advanced_asteroid_mining")],matrioshka_brain:[t("wiki_tech_building_unlock",[t("tech_matrioshka_brain")])],ignition_device:[t("wiki_tech_building_unlock",[t("tech_ignition_device")])],replicator:[t("wiki_tech_replicator")],womling_unlock:[t("wiki_tech_destination_unlock2",[t("tau_planet",[ee("red")])]),t("wiki_tech_building_unlock",[t("tau_red_orbital_platform")]),t("wiki_tech_womling_unlock")],garden_of_eden:[t("wiki_tech_building_unlock",[t("tau_star_goe_facility")])],geck:[t("wiki_tech_geck")]},ac={rocketry:[t("wiki_tech_project_unlock",[t("arpa_projects_launch_facility_title")]),t("wiki_tech_rival_unlock")],merchandising:[t("tech_merchandising_effect_tp")],starcharts:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_sun_info_name")]),t("space_sun_info_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("gas")]),ee("gas")]),t("wiki_tech_subtab_unlock",[t("outer_sol_system",[ee("home")]),t("tab_civil")])]},rc={theology1:{title:t("wiki_tech_req_theology1"),link:"wiki.html#resets-prestige-intro"},genetics3:{title:t("wiki_tech_req_genetics3")},supercollider1:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),1]),link:"wiki.html#projects-arpa-lhc"},supercollider2:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),2]),link:"wiki.html#projects-arpa-lhc"},supercollider3:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),3]),link:"wiki.html#projects-arpa-lhc"},supercollider10:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),10]),link:"wiki.html#projects-arpa-lhc"},stock_exchange1:{title:t("wiki_tech_req_arpa",[t("arpa_projects_stock_exchange_title"),1]),link:"wiki.html#projects-arpa-stock_exchange"},monuments2:{title:t("wiki_tech_req_arpa",[t("arpa_project_monument_title"),2]),link:"wiki.html#projects-arpa-monument"},monuments10:{title:t("wiki_tech_req_arpa",[t("arpa_project_monument_title"),10]),link:"wiki.html#projects-arpa-monument"},space2:{title:t("wiki_tech_req_mission",[t("space_home_test_launch_title")]),link:"wiki.html#space-structures-test_launch"},space3:{title:t("wiki_tech_req_mission",[t("space_moon_mission_title")]),link:"wiki.html#space-structures-moon_mission"},space4:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("red")])]),link:"wiki.html#space-structures-red_mission"},space5:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("gas")])]),link:"wiki.html#space-structures-gas_mission"},luna1:{title:t("wiki_tech_req_building",[t("space_moon_base_title")]),link:"wiki.html#space-structures-moon_base"},mars1:{title:t("wiki_tech_req_building",[t("space_red_spaceport_title")]),link:"wiki.html#space-structures-spaceport"},hell1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("hell")])]),link:"wiki.html#space-structures-hell_mission"},solar1:{title:t("wiki_tech_req_mission",[t("space_sun_mission_title")]),link:"wiki.html#space-structures-sun_mission"},gas_moon1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("gas_moon")])]),link:"wiki.html#space-structures-gas_moon_mission"},asteroid1:{title:t("wiki_tech_req_mission",[t("space_belt_mission_title")]),link:"wiki.html#space-structures-belt_mission"},asteroid3:{title:t("wiki_tech_req_building",[t("space_belt_station_title")]),link:"wiki.html#space-structures-space_station"},asteroid4:{title:t("wiki_tech_req_asteroid4"),link:"wiki.html#progress-events-elerium"},dwarf1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("dwarf")])]),link:"wiki.html#space-structures-dwarf_mission"},science11:{title:t("wiki_tech_req_megabuilding",[t("space_dwarf_collider_title")]),link:"wiki.html#space-structures-world_collider"},wsc1:{title:t("wiki_tech_req_wsc1"),link:"wiki.html#space-structures-world_collider"},alpha2:{title:t("wiki_tech_req_building",[t("interstellar_alpha_starport_title")]),link:"wiki.html#interstellar-structures-starport"},droids1:{title:t("wiki_tech_req_building",[t("interstellar_mining_droid_title")]),link:"wiki.html#interstellar-structures-mining_droid"},proxima2:{title:t("wiki_tech_req_building",[t("interstellar_xfer_station_title")]),link:"wiki.html#interstellar-structures-xfer_station"},nebula2:{title:t("wiki_tech_req_building",[t("interstellar_nexus_title")]),link:"wiki.html#interstellar-structures-nexus"},neutron1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("interstellar_neutron_name")])]),link:"wiki.html#interstellar-structures-neutron_mission"},blackhole2:{title:t("wiki_tech_req_building",[t("interstellar_far_reach")]),link:"wiki.html#interstellar-structures-far_reach"},blackhole4:{title:t("wiki_tech_req_megabuilding",[t("interstellar_stellar_engine")]),link:"wiki.html#interstellar-structures-stellar_engine"},whitehole1:{title:t("wiki_tech_req_whitehole1")},gateway3:{title:t("wiki_tech_req_building",[t("galaxy_starbase")]),link:"wiki.html#intergalactic-structures-starbase"},stargate5:{title:t("wiki_tech_req_building",[t("galaxy_gateway_station")]),link:"wiki.html#intergalactic-structures-gateway_station"},xeno1:{title:t("wiki_tech_req_xeno1"),link:"wiki.html#progress-events-alien_encounter"},xeno3:{title:t("wiki_tech_req_mission",[t("galaxy_gorddon_mission")]),link:"wiki.html#intergalactic-structures-gorddon_mission"},xeno5:{title:t("wiki_tech_req_building",[t("galaxy_embassy")]),link:"wiki.html#intergalactic-structures-embassy"},xeno9:{title:t("wiki_tech_req_building",[t("galaxy_consulate")]),link:"wiki.html#intergalactic-structures-consulate"},piracy1:{title:t("wiki_tech_req_piracy1"),link:"wiki.html#progress-events-piracy"},conflict2:{title:t("wiki_tech_req_building",[t("galaxy_foothold")]),link:"wiki.html#intergalactic-structures-foothold"},conflict5:{title:t("wiki_tech_req_conflict5"),link:"wiki.html#progress-events-alien_database"},chthonian2:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("galaxy_chthonian")])]),link:"wiki.html#intergalactic-structures-chthonian_mission"},infernite1:{title:t("wiki_tech_req_building",[t("portal_carport_title")]),link:"wiki.html#hell-structures-carport"},hell_pit3:{title:t("wiki_tech_req_mission",[t("portal_assault_forge_title")]),link:"wiki.html#hell-structures-assault_forge"},corrupt1:{title:t("wiki_tech_req_corrupt1"),link:"wiki.html#progress-events-corrupt_gem"},hell_ruins2:{title:t("wiki_tech_req_mission",[t("portal_ruins_mission_title")]),link:"wiki.html#hell-structures-ruins_mission"},hell_ruins3:{title:t("wiki_tech_req_hell_ruins3")},hell_gate1:{title:t("wiki_tech_req_mission",[t("portal_gate_mission_title")]),link:"wiki.html#hell-structures-gate_mission"},hell_lake2:{title:t("wiki_tech_req_mission",[t("portal_lake_mission_title")]),link:"wiki.html#hell-structures-lake_mission"},hell_spire2:{title:t("wiki_tech_req_mission",[t("portal_spire_mission_title")]),link:"wiki.html#hell-structures-spire_mission"},hell_spire8:{title:t("wiki_tech_req_hell_spire8"),link:"wiki.html#hell-structures-sphinx"},hell_spire10:{title:t("wiki_tech_req_hell_spire10")},b_stone1:{title:t("wiki_tech_req_b_stone1")},waygate2:{title:t("wiki_tech_req_megabuilding",[t("portal_waygate_title")]),link:"wiki.html#hell-structures-waygate"},waygate3:{title:t("wiki_tech_req_waygate3"),link:"wiki.html#mechanics-gameplay-dlord"},titan_ai_core1:{title:t("wiki_tech_req_megabuilding",[t("space_ai_core")]),link:"wiki.html#space-tp_structures-ai_core"},syard_class2:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_armor3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_weapon1:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_engine2:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_power3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_sensor3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syndicate1:{title:t("wiki_tech_req_syndicate1")},outer3:{title:t("wiki_tech_req_outer3"),link:"wiki.html#space-tp_structures-crashed_ship"},outer6:{title:t("wiki_tech_req_megabuilding",[t("space_dwarf_mass_relay_title")]),link:"wiki.html#space-tp_structures-mass_relay"},titan1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("titan")])]),link:"wiki.html#space-tp_structures-titan_mission"},titan2:{title:t("wiki_tech_req_building",[t("space_red_spaceport_title")]),link:"wiki.html#space-tp_structures-titan_spaceport"},titan4:{title:t("wiki_tech_req_building",[t("space_electrolysis_title")]),link:"wiki.html#space-tp_structures-electrolysis"},enceladus1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("enceladus")])]),link:"wiki.html#space-tp_structures-enceladus_mission"},triton1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("triton")])]),link:"wiki.html#space-tp_structures-triton_mission"},kuiper1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("space_kuiper_title")])]),link:"wiki.html#space-tp_structures-kuiper_mission"},eris2:{title:t("wiki_tech_req_eris2",[ee("eris")])},dig_control1:{title:t("wiki_tech_req_dig_control1"),link:"wiki.html#space-tp_structures-digsite"},corrupted_ai1:{title:t("wiki_tech_req_corrupted_ai1")},tauceti2:{title:t("wiki_tech_req_tauceti2")},tauceti4:{title:t("wiki_tech_req_tauceti4"),link:"wiki.html#space-tp_structures-jump_gate"},tau_home3:{title:t("wiki_tech_req_task",[t("tau_home_excavate")]),link:"wiki.html#tauceti-structures-excavate"},tau_red2:{title:t("wiki_tech_req_building",[t("tau_red_orbital_platform")]),link:"wiki.html#tauceti-structures-orbital_platform"},tau_gas3:{title:t("wiki_tech_req_building",[t("tau_gas_refueling_station_title")]),link:"wiki.html#tauceti-structures-refueling_station"},tau_gas25:{title:t("wiki_tech_req_megabuilding",[t("tau_gas2_alien_station")]),link:"wiki.html#tauceti-structures-alien_station"},tau_roid1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("tau_roid_title")])]),link:"wiki.html#tauceti-structures-roid_mission"},tau_roid4:{title:t("wiki_tech_req_building",[t("tau_gas_ore_refinery_title")]),link:"wiki.html#tauceti-structures-ore_refinery"},womling_tech1:{title:t("wiki_tech_req_womling_tech",[1]),link:"wiki.html#tauceti-structures-jeff"},womling_tech2:{title:t("wiki_tech_req_womling_tech",[2]),link:"wiki.html#tauceti-structures-jeff"},womling_tech3:{title:t("wiki_tech_req_womling_tech",[3]),link:"wiki.html#tauceti-structures-jeff"},womling_tech4:{title:t("wiki_tech_req_womling_tech",[4]),link:"wiki.html#tauceti-structures-jeff"},womling_tech5:{title:t("wiki_tech_req_womling_tech",[5]),link:"wiki.html#tauceti-structures-jeff"},womling_tech6:{title:t("wiki_tech_req_womling_tech",[6]),link:"wiki.html#tauceti-structures-jeff"},womling_tech7:{title:t("wiki_tech_req_womling_tech",[7]),link:"wiki.html#tauceti-structures-jeff"},womling_tech8:{title:t("wiki_tech_req_womling_tech",[8]),link:"wiki.html#tauceti-structures-jeff"},plague2:{title:t("wiki_tech_req_plague",[2]),link:"wiki.html#progress-events-plague"},plague5:{title:t("wiki_tech_req_plague5"),link:"wiki.html#tauceti-tp_tech-isolation_protocol"},disease2:{title:t("wiki_tech_req_building",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")]),link:"wiki.html#tauceti-structures-infectious_disease_lab"},focus_cure3:{title:t("wiki_tech_req_focus_cure3")},focus_cure5:{title:t("wiki_tech_req_focus_cure",[25])},focus_cure7:{title:t("wiki_tech_req_focus_cure",[100])},alien_data1:{title:t("wiki_tech_req_alien_data",[10]),link:"wiki.html#tauceti-structures-alien_station"},alien_data2:{title:t("wiki_tech_req_alien_data",[20]),link:"wiki.html#tauceti-structures-alien_station"},alien_data3:{title:t("wiki_tech_req_alien_data",[30]),link:"wiki.html#tauceti-structures-alien_station"},alien_data4:{title:t("wiki_tech_req_alien_data",[48]),link:"wiki.html#tauceti-structures-alien_station"},alien_data5:{title:t("wiki_tech_req_alien_data",[60]),link:"wiki.html#tauceti-structures-alien_station"},alien_data6:{title:t("wiki_tech_req_alien_data",[100]),link:"wiki.html#tauceti-structures-alien_station"},eden1:{title:t("wiki_tech_req_megabuilding",[t("tau_star_ringworld")]),link:"wiki.html#tauceti-structures-ringworld"},decay1:{title:t("wiki_tech_req_decay1"),link:"wiki.html#mechanics-gameplay-genome_decay"},locked1:{title:t("unavailable_content")}},Vo={bone_tools:[{category:"unique",subreqs:[{title:t("wiki_tech_special_trait",[t("trait_evil_name")]),color:!!e.race.evil,link:"wiki.html#traits-species-genus_evil"},{title:t("wiki_tech_special_trait_not",[t("trait_soul_eater_name")]),color:!e.race.soul_eater,link:"wiki.html#traits-species-special_soul_eater"}]}],wooden_tools:[{category:"trait",not:!0,subreqs:[{name:"evil"}]},{category:"trait",subreqs:[{name:"soul_eater"}]}],smokehouse:[{category:"trait",subreqs:[{name:"carnivore"}]}],lodge:[{category:"trait",subreqs:[{name:"carnivore"}]}],alt_lodge:[{category:"unique",subreqs:[{title:t("wiki_tech_special_species",[t("race_wendigo")]),color:e.race.species==="wendigo",link:"wiki.html#races-species-wendigo"},{title:t("wiki_tech_special_trait",[t("trait_detritivore_name")]),color:!!e.race.detritivore,link:"wiki.html#traits-species-genus_detritivore"}]}],soul_well:[{category:"trait",subreqs:[{name:"soul_eater"}]}],compost:[{category:"trait",subreqs:[{name:"detritivore"}]}],hot_compost:[{category:"trait",subreqs:[{name:"detritivore"}]}],mulching:[{category:"trait",subreqs:[{name:"detritivore"}]}],adv_mulching:[{category:"trait",subreqs:[{name:"detritivore"}]}],agriculture:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],farm_house:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],irrigation:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],silo:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],mill:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],windmill:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],windturbine:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],wind_plant:[{category:"trait",subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],gmfood:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iridium_smelting_perk:[{category:"achieve",subreqs:[{name:"pathfinder",val:3}]}],republic:[{category:"unique",subreqs:[{title:t("wiki_tech_special_tech",[t("tech_diplomacy")]),color:e.tech.trade&&e.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:t("wiki_tech_special_trait",[t("trait_terrifying_name")]),color:!!e.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],socialist:[{category:"unique",subreqs:[{title:t("wiki_tech_special_tech",[t("tech_diplomacy")]),color:e.tech.trade&&e.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:t("wiki_tech_special_trait",[t("trait_terrifying_name")]),color:!!e.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],federation:[{category:"unique",subreqs:[{title:t("wiki_tech_special_occupy"),color:Ua(),link:"wiki.html#mechanics-gameplay-occupying"}]}],magocracy:[{category:"universe",subreqs:[{name:"magic"}]}],governor:[{category:"crispr",subreqs:[{name:"governance",tree:"governor",val:1}]},{category:"government",not:!0,subreqs:[{name:"anarchy"}]}],market:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],tax_rates:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],large_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],corruption:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"noble"}]}],massive_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],trade:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],diplomacy:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],freight:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],wharf:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"thalassophobia"}]}],reclaimer:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],iron_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],steel_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],titanium_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],alloy_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],mythril_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],adamantite_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],stone_axe:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],titanium_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],chainsaws:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],iron_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],steel_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],titanium_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],copper_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iron_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],steel_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],titanium_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],adamantite_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],slave_pens:[{category:"trait",subreqs:[{name:"slaver"}]}],slave_market:[{category:"trait",subreqs:[{name:"slaver"}]}],ceremonial_dagger:[{category:"trait",subreqs:[{name:"cannibalize"}]}],last_rites:[{category:"trait",subreqs:[{name:"cannibalize"}]}],ancient_infusion:[{category:"trait",subreqs:[{name:"cannibalize"}]}],armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],plate_armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],kevlar:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],nanoweave_vest:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],mad:[{truepath:!0,category:"unique",subreqs:[{title:t("wiki_tech_special_unify"),color:!!e.tech.world_control,link:"wiki.html#globalized-tp_tech-unite"}]}],ancient_theology:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],study:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],encoding:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],deify:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],infusion:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],gps:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],genesis:[{category:"unique",subreqs:[{title:t("wiki_tech_special_genesis"),color:e.race.deterioration>=1}]}],veil:[{category:"universe",subreqs:[{name:"magic"}]}],mana_syphon:[{category:"universe",subreqs:[{name:"magic"}]}],mana:[{category:"universe",subreqs:[{name:"magic"}]}],ley_lines:[{category:"universe",subreqs:[{name:"magic"}]}],rituals:[{category:"universe",subreqs:[{name:"magic"}]}],crafting_ritual:[{category:"universe",subreqs:[{name:"magic"}]}],mana_nexus:[{category:"universe",subreqs:[{name:"magic"}]}],clerics:[{category:"universe",subreqs:[{name:"magic"}]},{category:"crispr",subreqs:[{name:"faith",tree:"ancients",val:2}]}],conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],res_conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],alchemy:[{category:"universe",subreqs:[{name:"magic"}]}],transmutation:[{category:"universe",subreqs:[{name:"magic"}]}],dark_bomb:[{category:"unique",subreqs:[{title:t("wiki_tech_special_demon_lord"),color:e.stats.hasOwnProperty("spire")&&e.stats.spire.hasOwnProperty(le())&&e.stats.spire[le()].hasOwnProperty("dlstr")&&e.stats.spire[le()].dlstr>0,link:"wiki.html#mechanics-gameplay-dlord"}]}],terraforming:[{category:"challenge",subreqs:[{name:"orbitdecay"}]}],geck:[{category:"achieve",subreqs:[{name:"lamentis",val:5}]}],womling_fun:[{category:"unique",subreqs:[{title:t("tau_red_contact"),color:!!e.race.womling_friend,link:"wiki.html#tauceti-structures-contact"},{title:t("tau_red_introduce"),color:!!e.race.womling_god,link:"wiki.html#tauceti-structures-introduce"},{title:t("tau_red_subjugate"),color:!!e.race.womling_lord,link:"wiki.html#tauceti-structures-subjugate"}]}],isolation_protocol:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],focus_cure:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],decode_virus:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vaccine_campaign:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat1:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat2:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat3:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat4:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],cloning:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],clone_degredation:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],digital_paradise:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ringworld:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],matrioshka_brain:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ignition_device:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],replicator:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],womling_unlock:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],garden_of_eden:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],wheel:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],wagon:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],steam_engine:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],combustion_engine:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],hover_cart:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],osha:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],blackmarket:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],pipelines:[{category:"challenge",subreqs:[{name:"gravity_well"}]}]},Uo={unification2:"unification",conjuring:"ley_lines",res_conjuring:"conjuring",bribe_sphinx:"miasma"};function E_(a){let r={};return Object.keys(a==="truepath"?Jo:Qo).forEach(function(s){let n=q.tech[s];r[n.grant[0]]||(r[n.grant[0]]={});let c=typeof q.tech[s].title=="string"?q.tech[s].title:q.tech[s].title();r[n.grant[0]][n.grant[1]]=[{name:s,title:c,era:q.tech[s].era}]}),r.primitive[2]=[{name:"bone_tools",title:t("tech_bone_tools"),era:"primitive"},{name:"wooden_tools",title:t("tech_wooden_tools"),era:"primitive"}],r.theology[3]=[{name:q.tech.fanaticism.wiki?"fanaticism":"alt_fanaticism",title:t("tech_fanaticism"),era:"civilized"},{name:q.tech.anthropology.wiki?"anthropology":"alt_anthropology",title:t("tech_anthropology"),era:"civilized"}],r.theology[5]=[{name:"deify",title:t("tech_deify"),era:"early_space"},{name:"study",title:t("tech_study"),era:"early_space"}],r.ancient_study[1]=[{name:"study",title:t("tech_study"),era:"early_space"}],r.ancient_deify[1]=[{name:"deify",title:t("tech_deify"),era:"early_space"}],a==="truepath"&&(r.unify[1]=[{name:"arpa",title:t("tech_arpa"),era:"globalized"}],r.isolation={},r.isolation[1]=[{name:"isolation_protocol",title:t("tech_isolation_protocol"),era:"tauceti"}],r.focus_cure={},r.focus_cure[1]=[{name:"focus_cure",title:t("tech_focus_cure"),era:"tauceti"}]),r}function L_(a,r,i){let s=$('
              ');if(a.append(s),ac.hasOwnProperty(r)&&i==="truepath")for(let n=0;n${ac[r][n]}`);else if(tc.hasOwnProperty(r))for(let n=0;n${tc[r][n]}`);else s.append(`
              ${t("wiki_tech_empty")}
              `)}function D_(a,r,i,s){let n=E_(s);if(Object.keys(r.reqs).length>0){let c={},o={};if(Object.keys(r.reqs).forEach(function(l){let u=e.tech[l]&&e.tech[l]>=r.reqs[l]?"success":"danger",d=l+r.reqs[l];n[l]&&n[l][r.reqs[l]]?(c[d]=[],n[l][r.reqs[l]].forEach(function(p){c[d].push({name:p.name,title:p.title,era:p.era,color:u})})):rc[d]&&(o[d]={title:rc[d].title,link:rc[d].link,color:u})}),Object.keys(c).length>0){let l=!1,u=$(`
              ${t("wiki_tech_req_tech")}
              `);a.append(u),Object.keys(c).forEach(function(d){let h="",p=!1,f=!1;c[d].forEach(function(g){let w=`${g.title}`;f=g.color,p?h=t("wiki_tech_req_or",[h,w]):(p=!0,h=w)}),u.append(`${l?", ":""}${h}`),l=!0})}if(Object.keys(o).length>0){let l=!1,u=$(`
              ${t("wiki_tech_req_other")}
              `);a.append(u),Object.keys(o).forEach(function(d){let h=o[d].link;h&&s==="truepath"&&(h=h.replace("-structures-","-tp_structures-"));let p=h?`${o[d].title}`:o[d].title;u.append(`${l?", ":""}${p}`),l=!0})}}if(Vo.hasOwnProperty(i)){let c=!1,o=$(`
              ${t("wiki_tech_req_special")}
              `),l=!1;Vo[i].forEach(function(u){if(u.truepath&&s!=="truepath")return;l=!0;let d=!1,h=!1,p="";u.subreqs.forEach(function(f){let g="",w=!1,v=!1;switch(u.category){case"species":g=t(`race_${f.name}`),w=`wiki.html#races-species-${f.name}`,v=e.race.species===f.name;break;case"genus":g=t(`genelab_genus_${f.name}`),v=x[e.race.species].type===f.name;break;case"trait":g=t(`trait_${f.name}_name`),w=`wiki.html#traits-species-${b[f.name].type}_${f.name}`,v=e.race[f.name];break;case"tech":g=typeof q.tech[f.name].title=="string"?q.tech[f.name].title:q.tech[f.name].title(),w=`wiki.html#${q.tech[f.name].era}-tech-${f.name}`,v=e.tech[f.tree]&&e.genes[f.tree]>=f.val;break;case"universe":g=t(`universe_${f.name}`),w=`wiki.html#universes-gameplay-${f.name}`,v=e.race.universe===f.name;break;case"crispr":g=t(`arpa_genepool_${f.name}_title`),w=`wiki.html#crispr-prestige-${f.name}`,v=e.genes[f.tree]&&e.genes[f.tree]>=f.val;break;case"achieve":g=f.val+` ${Zt("star")} `+t(`achieve_${f.name}_name`),w=`wiki.html#perks-prestige-${f.name}`,v=e.stats.achieve[f.name]&&e.stats.achieve[f.name].l>=f.val;break;case"government":g=t(`govern_${f.name}`),w=`wiki.html#government-gameplay-${f.name}`,v=e.civic.govern&&e.civic.govern.type&&e.civic.govern.type===f.name;break;case"scenario":g=t(`wiki_challenges_scenarios_${f.name}`),w=`wiki.html#challenges-gameplay-scenarios_${f.name}`,v=e.race[f.name];break;case"challenge":g=t(`wiki_challenges_modes_${f.name}`),w=`wiki.html#challenges-gameplay-modes_${f.name}`,v=e.race[f.name];break;case"unique":g=f.title,w=f.link,v=f.color;break}w&&s==="truepath"&&(w=w.replace("-tech-","-tp_tech-")),h=h||v,u.not&&(v=!v),v=v?"success":"danger",w?g=`${g}`:g=`${g}`,d?p=t("wiki_tech_req_or",[p,g]):(d=!0,p=g)}),u.not&&(h=!h),h=h?"success":"danger",u.category!=="unique"&&(p=t(`wiki_tech_special_${u.category}${u.not?"_not":""}`,[p])),o.append(`${c?", ":""}${p}`),c=!0}),l&&a.append(o)}}var B_={solar:"interstellar"},Wo={interstellar:"solar"};function Ue(a,r){let i=M("create"),s=[],n=[],c=r==="truepath"?Jo:Qo,o=r==="truepath"?"tp_tech":"tech";if(Object.keys(c).forEach(function(l){let u=c[l];if(u.hasOwnProperty("era")&&(u.era===a||u.era===B_[a])&&(!u.hasOwnProperty("wiki")||u.wiki)){let d=c[l].id.split("-"),h=$(`
              `);if(qa(h,u),L_(h,l,r),D_(h,u,l,r),u.cost.Knowledge)if(s.length===0)s[0]=[u,h];else{let p=u.cost.Knowledge(),f=s.length-1;for(;f>=0&&s[f][0].cost.Knowledge()>p;)s[f+1]=s[f],f--;s[f+1]=[u,h]}else n.push([u,h])}}),n.length>0)for(let l=0;lc&&(o[g]=c),d(),p()},less(g){o[g]>0&&o[g]--},more(g){(!c||c&&o[g]`);a.append(c),qa(c,q.evolution[s],!1,!0),pr(c,"prehistoric",s),hr(c,s,"prehistoric",!1,r),M("add",`prehistoric-${i}`,n[1],typeof q.evolution[s].title=="function"?q.evolution[s].title():q.evolution[s].title)}})}function j_(a,r){let i=r==="truepath"?"tp_structures":"structures";Object.keys(q.city).forEach(function(s){if((!q.city[s].hasOwnProperty("wiki")||q.city[s].wiki)&&(!q.city[s].hasOwnProperty("path")||q.city[s].path.includes(r))){let n=q.city[s].id.split("-"),c=$(`
              `);a.append(c),qa(c,q.city[s],!1,!0),pr(c,"planetary",s),hr(c,s,"planetary",!1,r),M("add",`planetary-${i}`,n[1],typeof q.city[s].title=="function"?q.city[s].title():q.city[s].title)}})}function F_(a,r){let i=r==="truepath"?"tp_structures":"structures";Object.keys(q.space).forEach(function(s){let n=typeof q.space[s].info.name=="string"?q.space[s].info.name:q.space[s].info.name(),c=typeof q.space[s].info.desc=="string"?q.space[s].info.desc:q.space[s].info.desc();Object.keys(q.space[s]).forEach(function(o){if(o!=="info"&&(!q.space[s][o].hasOwnProperty("wiki")||q.space[s][o].wiki)&&(!q.space[s][o].hasOwnProperty("path")||q.space[s][o].path.includes(r))){let l=q.space[s][o].id.split("-"),u=$(`
              `);a.append(u),qa(u,q.space[s][o],`${n}`,!0),pr(u,"space",o),hr(u,o,"space",s,r),M("add",`space-${i}`,l[1],typeof q.space[s][o].title=="function"?q.space[s][o].title():q.space[s][o].title),B(`pop${q.space[s][o].id}`,$(`
              ${c}
              `))}})}),Object.keys(q.starDock).forEach(function(s){if(s!=="info"&&(!q.starDock[s].hasOwnProperty("wiki")||q.starDock[s].wiki)&&(!q.starDock[s].hasOwnProperty("path")||q.starDock[s].path.includes(r))){let n=q.starDock[s].id.split("-"),c=$(`
              `);a.append(c),qa(c,q.starDock[s],`${t("space_gas_star_dock_title")}`,!0),pr(c,"starDock",s),hr(c,s,"starDock",!1,r),M("add",`space-${i}`,n[1],typeof q.starDock[s].title=="function"?q.starDock[s].title():q.starDock[s].title),B(`pop${q.starDock[s].id}`,$(`
              ${t("space_gas_star_dock_wiki")}
              `))}})}function z_(a){Object.keys(q.interstellar).forEach(function(r){let i=typeof q.interstellar[r].info.name=="string"?q.interstellar[r].info.name:q.interstellar[r].info.name(),s=typeof q.interstellar[r].info.desc=="string"?q.interstellar[r].info.desc:q.interstellar[r].info.desc();Object.keys(q.interstellar[r]).forEach(function(n){if(n!=="info"&&(!q.interstellar[r][n].hasOwnProperty("wiki")||q.interstellar[r][n].wiki)){let c=q.interstellar[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.interstellar[r][n],`${i}`,!0),pr(o,"interstellar",n),hr(o,n,"interstellar",r),M("add","interstellar-structures",c[1],typeof q.interstellar[r][n].title=="function"?q.interstellar[r][n].title():q.interstellar[r][n].title),B(`pop${q.interstellar[r][n].id}`,$(`
              ${s}
              `))}})})}function A_(a){Object.keys(q.galaxy).forEach(function(r){let i=typeof q.galaxy[r].info.name=="string"?q.galaxy[r].info.name:q.galaxy[r].info.name(),s=typeof q.galaxy[r].info.desc=="string"?q.galaxy[r].info.desc:q.galaxy[r].info.desc();Object.keys(q.galaxy[r]).forEach(function(n){if(n!=="info"&&(!q.galaxy[r][n].hasOwnProperty("wiki")||q.galaxy[r][n].wiki)){let c=q.galaxy[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.galaxy[r][n],`${i}`,!0),pr(o,"intergalactic",n),hr(o,n,"intergalactic",r),M("add","intergalactic-structures",c[1],typeof q.galaxy[r][n].title=="function"?q.galaxy[r][n].title():q.galaxy[r][n].title),B(`pop${q.galaxy[r][n].id}`,$(`
              ${s}
              `))}})})}function T_(a){Object.keys(q.portal).forEach(function(r){let i=typeof q.portal[r].info.name=="string"?q.portal[r].info.name:q.portal[r].info.name(),s=typeof q.portal[r].info.desc=="string"?q.portal[r].info.desc:q.portal[r].info.desc();Object.keys(q.portal[r]).forEach(function(n){if(n!=="info"&&(!q.portal[r][n].hasOwnProperty("wiki")||q.portal[r][n].wiki)){let c=q.portal[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.portal[r][n],`${i}`,!0),pr(o,"hell",n),hr(o,n,"hell",r),M("add","hell-structures",c[1],typeof q.portal[r][n].title=="function"?q.portal[r][n].title():q.portal[r][n].title),B(`pop${q.portal[r][n].id}`,$(`
              ${s}
              `))}})})}function I_(a){Object.keys(q.tauceti).forEach(function(r){let i=typeof q.tauceti[r].info.name=="string"?q.tauceti[r].info.name:q.tauceti[r].info.name(),s=typeof q.tauceti[r].info.desc=="string"?q.tauceti[r].info.desc:q.tauceti[r].info.desc();Object.keys(q.tauceti[r]).forEach(function(n){if(n!=="info"&&(!q.tauceti[r][n].hasOwnProperty("wiki")||q.tauceti[r][n].wiki)){let c=q.tauceti[r][n].id.split("-"),o=$(`
              `);a.append(o),qa(o,q.tauceti[r][n],`${i}`,!0),pr(o,"tauceti",n),hr(o,n,"tauceti",r),M("add","tauceti-structures",c[1],typeof q.tauceti[r][n].title=="function"?q.tauceti[r][n].title():q.tauceti[r][n].title),B(`pop${q.tauceti[r][n].id}`,$(`
              ${s}
              `))}})})}var Ho=oa(),Qo=Li("standard"),Jo=Li("truepath"),tc={club:e.race.soul_eater?[t("wiki_tech_resource_unlock",[t("resource_Souls_name")])]:[t("wiki_tech_club"),t("wiki_tech_resource_unlock",[t("resource_Food_name")])],bone_tools:e.race.smoldering?[t("wiki_tech_bone_tools_alt"),t("wiki_tech_resource_unlock",[t("resource_Chrysotile_name")])]:[t("wiki_tech_bone_tools"),t("wiki_tech_resource_unlock",[t("resource_Stone_name")])],wooden_tools:[t("wiki_tech_bone_tools"),t("wiki_tech_resource_unlock",[t("resource_Stone_name")])],sundial:[t("wiki_tech_sundial1"),t("wiki_tech_sundial2"),t("wiki_tech_sundial3"),t("wiki_tech_sundial4"),t("wiki_tech_sundial5")],housing:[t("wiki_tech_building_unlock",[$e("small")])],cottage:[t("wiki_tech_building_unlock",[$e("medium")])],apartment:[t("wiki_tech_building_unlock",[$e("large")])],arcology:[t("wiki_tech_building_unlock",[t("portal_arcology_title")])],steel_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],mythril_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],neutronium_walls:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],bolognium_alloy_beams:[t("wiki_tech_steel_beams",[$e("small"),$e("medium")])],aphrodisiac:[t("wiki_tech_aphrodisiac")],fertility_clinic:[t("wiki_tech_fertility_clinic")],smokehouse:[t("wiki_tech_building_unlock",[t("city_smokehouse")])],lodge:[t("wiki_tech_building_unlock",[t("city_lodge")])],alt_lodge:[t("wiki_tech_building_unlock",[t("city_lodge")])],soul_well:[t("wiki_tech_building_unlock",[t("city_soul_well")])],compost:[t("wiki_tech_building_unlock",[t("city_compost_heap")])],hot_compost:[t("wiki_tech_hot_compost",[100])],mulching:[t("wiki_tech_hot_compost",[50])],adv_mulching:[t("wiki_tech_hot_compost",[33.33])],agriculture:[t("wiki_tech_building_unlock",[t("city_farm")])],farm_house:[t("wiki_tech_farm_house")],irrigation:[t("wiki_tech_irrigation")],silo:[t("wiki_tech_building_unlock",[t("city_silo")])],mill:[t("wiki_tech_building_unlock",[t("city_mill_title1")])],windmill:[t("wiki_tech_windmill1"),t("wiki_tech_windmill2")],windturbine:[t("wiki_tech_windturbine")],wind_plant:[t("wiki_tech_building_unlock",[t("city_mill_title2")])],evil_wind_plant:[t("wiki_tech_building_unlock",[t("city_mill_title2")])],gmfood:[t("wiki_tech_gmfood")],foundry:[t("wiki_tech_building_unlock",[t("city_foundry")])],artisans:[t("wiki_tech_artisans")],apprentices:[t("wiki_tech_apprentices")],carpentry:[t("wiki_tech_carpentry")],demonic_craftsman:[t("wiki_tech_master_craftsman")],master_craftsman:[t("wiki_tech_master_craftsman")],brickworks:[t("wiki_tech_brickworks")],machinery:[t("wiki_tech_machinery")],cnc_machine:[t("wiki_tech_cnc_machine")],vocational_training:[t("wiki_tech_vocational_training")],stellar_forge:[t("wiki_tech_building_unlock",[t("interstellar_stellar_forge_title")])],stellar_smelting:[t("wiki_tech_stellar_smelting"),t("wiki_tech_fuel_unlock",[t("star")])],assembly_line:[t("wiki_tech_factory_upgrade1",[50]),t("wiki_tech_factory_upgrade2",[50])],automation:[t("wiki_tech_factory_upgrade1",[33]),t("wiki_tech_factory_upgrade2",[33])],laser_cutters:[t("wiki_tech_factory_upgrade1",[25]),t("wiki_tech_factory_upgrade2",[25])],high_tech_factories:[t("wiki_tech_factory_upgrade1",[20]),t("wiki_tech_factory_upgrade2",[20])],theatre:[t("wiki_tech_building_unlock",[t("city_amphitheatre")])],playwright:[t("wiki_tech_entertain1",[2])],magic:[t("wiki_tech_entertain1",[3])],superstars:[t("wiki_tech_entertain2",[1])],radio:[t("wiki_tech_entertain3",[1])],tv:[t("wiki_tech_entertain3",[2])],vr_center:[t("wiki_tech_building_unlock",[t("space_red_vr_center_title")]),t("wiki_tech_entertain3",[3])],zoo:[t("wiki_tech_building_unlock",[t("tech_zoo")])],casino:[t("wiki_tech_building_unlock",[t("city_casino")])],dazzle:[t("wiki_tech_dazzle",[50])],casino_vault:[t("wiki_tech_casino_vault",[4e4,6e4])],otb:[t("wiki_tech_otb")],online_gambling:[t("wiki_tech_dazzle",[33.33]),t("wiki_tech_casino_vault",[6e4,12e4])],bolognium_vaults:[t("wiki_tech_casino_vault",[12e4,24e4])],mining:[t("wiki_tech_building_unlock",[t("city_rock_quarry")])],bayer_process:[t("wiki_tech_building_unlock",[t("city_metal_refinery")])],elysis_process:[t("wiki_tech_elysis_process")],smelting:[t("wiki_tech_building_unlock",[t("city_smelter")])],steel:[t("wiki_tech_steel")],blast_furnace:[t("wiki_tech_smelt_boost1",[t("resource_Iron_name")])],bessemer_process:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],oxygen_converter:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],electric_arc_furnace:[t("wiki_tech_smelt_boost1",[t("resource_Steel_name")])],hellfire_furnace:[t("wiki_tech_smelt_boost2")],infernium_fuel:[t("wiki_tech_fuel_unlock",[t("modal_smelter_inferno")])],iridium_smelting_perk:[t("wiki_tech_iridium_smelting")],rotary_kiln:[t("wiki_tech_rotary_kiln")],metal_working:[t("wiki_tech_building_unlock",[t("city_mine")])],iron_mining:[t("wiki_tech_iron_mining"),t("wiki_tech_resource_unlock",[t("resource_Iron_name")])],coal_mining:[t("wiki_tech_building_unlock",[t("city_coal_mine")]),t("wiki_tech_resource_unlock",[t("resource_Coal_name")])],storage:[t("wiki_tech_building_unlock",[t("city_shed_title1")])],reinforced_shed:[t("wiki_tech_store_upgrade",[t("city_shed_title1"),125])],barns:[t("wiki_tech_name_change",[t("city_shed_title1"),t("city_shed_title2")]),t("wiki_tech_store_upgrade",[t("city_shed_title2"),133])],warehouse:[t("wiki_tech_name_change",[t("city_shed_title2"),t("city_shed_title3")]),t("wiki_tech_store_upgrade",[t("city_shed_title3"),171])],cameras:[t("wiki_tech_store_upgrade",[t("city_shed_title3"),26])],pocket_dimensions:[t("wiki_tech_store_upgrade",[t("city_shed_title3"),21]),t("wiki_tech_pocket_dimensions")],ai_logistics:[t("wiki_tech_ai_logistics")],containerization:[t("wiki_tech_building_unlock",[t("city_storage_yard")])],reinforced_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),500,300])],cranes:[t("wiki_tech_cranes",[t("city_storage_yard"),t("resource_Crates_name")])],titanium_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),750,500])],mythril_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1e3,750])],infernite_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1500,1e3])],graphene_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),2200,1500])],bolognium_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),6200,2200])],steel_containers:[t("wiki_tech_building_unlock",[t("city_warehouse")])],gantry_crane:[t("wiki_tech_cranes",[t("city_warehouse"),t("resource_Containers_name")])],alloy_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),1200,800])],mythril_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),1600,1200])],adamantite_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),2200,1600])],aerogel_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),3200,2200])],bolognium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),9700,3200])],nanoweave_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),17700,9700])],evil_planning:[t("wiki_tech_urban_planning")],urban_planning:[t("wiki_tech_urban_planning")],zoning_permits:[t("wiki_tech_zoning_permits",[2])],urbanization:[t("wiki_tech_zoning_permits",[3])],assistant:[t("wiki_tech_assistant")],government:[t("wiki_tech_government")],theocracy:[t("wiki_tech_gov_unlock",[t("govern_theocracy")])],republic:[t("wiki_tech_gov_unlock",[t("govern_republic")])],socialist:[t("wiki_tech_gov_unlock",[t("govern_socialist")])],corpocracy:[t("wiki_tech_gov_unlock",[t("govern_corpocracy")])],technocracy:[t("wiki_tech_gov_unlock",[t("govern_technocracy")])],federation:[t("wiki_tech_gov_unlock",[t("govern_federation")])],magocracy:[t("wiki_tech_gov_unlock",[t("govern_magocracy")])],governor:[t("wiki_tech_governor")],spy:[t("wiki_tech_spy")],espionage:[t("wiki_tech_espionage")],spy_training:[t("wiki_tech_spy_training")],spy_gadgets:[t("wiki_tech_spy_gadgets")],code_breakers:[t("wiki_tech_code_breakers")],currency:[t("wiki_tech_resource_unlock",[t("resource_Money_name")])],market:[t("wiki_tech_subtab_unlock",[t("tab_market"),t("tab_resources")])],tax_rates:[t("wiki_tech_tax_rates")],large_trades:[t("wiki_tech_large_trades",[5e3,100])],corruption:[t("wiki_tech_corruption")],massive_trades:[t("wiki_tech_large_trades",[1e6,1e6])],trade:[t("wiki_tech_building_unlock",[t("city_trade")])],diplomacy:[t("wiki_tech_diplomacy")],freight:[t("wiki_tech_freight")],wharf:[t("wiki_tech_building_unlock",[t("city_wharf")])],banking:[t("wiki_tech_building_unlock",[t("city_bank")])],investing:[t("wiki_tech_job_unlock",[t("job_banker")])],vault:[t("wiki_tech_vault",[1800,4e3])],bonds:[t("wiki_tech_bonds",[250])],steel_vault:[t("wiki_tech_vault",[4e3,9e3])],eebonds:[t("wiki_tech_bonds",[600])],swiss_banking:[t("wiki_tech_swiss_banking")],safety_deposit:[t("wiki_tech_safety_deposit")],stock_market:[t("wiki_tech_project_unlock",[t("arpa_projects_stock_exchange_title")])],hedge_funds:[t("wiki_tech_hedge_funds")],four_oh_one:[t("wiki_tech_bonds",[1e3])],exchange:[t("wiki_tech_building_unlock",[t("interstellar_exchange_title")])],foreign_investment:[t("wiki_tech_foreign_investment",[t("galaxy_freighter"),3]),t("wiki_tech_foreign_investment",[t("galaxy_super_freighter"),8])],mythril_vault:[t("wiki_tech_vault",[9e3,15e3])],neutronium_vault:[t("wiki_tech_vault",[15e3,22500])],adamantite_vault:[t("wiki_tech_vault",[22500,3e4])],graphene_vault:[t("wiki_tech_vault",[3e4,37500])],home_safe:[t("wiki_tech_home_safe",[$e("medium"),1e3]),t("wiki_tech_home_safe",[$e("large"),2e3])],fire_proof_safe:[t("wiki_tech_home_safe",[$e("medium"),2e3]),t("wiki_tech_home_safe",[$e("large"),5e3])],tamper_proof_safe:[t("wiki_tech_home_safe",[$e("medium"),5e3]),t("wiki_tech_home_safe",[$e("large"),1e4])],monument:[t("wiki_tech_project_unlock",[t("arpa_project_monument_title")])],tourism:[t("wiki_tech_building_unlock",[t("city_tourist_center")])],xeno_tourism:[t("wiki_tech_xeno_tourism")],science:[t("wiki_tech_building_unlock",[t("city_university")])],library:[t("wiki_tech_building_unlock",[t("city_library")])],thesis:[t("wiki_tech_thesis")],research_grant:[t("wiki_tech_research_grant")],scientific_journal:[t("wiki_tech_scientific_journal")],adjunct_professor:[t("wiki_tech_adjunct_professor")],tesla_coil:[t("wiki_tech_tesla_coil")],internet:[t("wiki_tech_internet",[t("city_university")]),t("wiki_tech_internet",[t("city_library")])],observatory:[t("wiki_tech_building_unlock",[t("space_moon_observatory_title")])],world_collider:[t("wiki_tech_building_unlock",[t("space_dwarf_collider_title")])],laboratory:[t("wiki_tech_building_unlock",[t("interstellar_laboratory_title")])],virtual_assistant:[t("wiki_tech_virtual_assistant")],dimensional_readings:[t("wiki_tech_dimensional_readings1"),t("wiki_tech_dimensional_readings2",[t("city_university")]),t("wiki_tech_dimensional_readings2",[t("city_biolab")])],quantum_entanglement:[t("wiki_tech_quantum_entanglement")],expedition:[t("wiki_tech_expedition")],subspace_sensors:[t("wiki_tech_subspace_sensors")],orichalcum_capacitor:[t("wiki_tech_orichalcum_capacitor")],advanced_biotech:[t("wiki_tech_advanced_biotech")],codex_infinium:[t("wiki_tech_codex_infinium")],hell_oven:[t("wiki_tech_building_unlock",[t("portal_oven_title")])],preparation_methods:[t("wiki_tech_building_unlock",[t("portal_dish_soul_steeper_title")]),t("wiki_tech_building_unlock",[t("portal_dish_life_infuser_title")])],final_ingredient:[t("wiki_tech_final_ingredient")],bioscience:[t("wiki_tech_building_unlock",[t("city_biolab")])],genetics:[t("wiki_tech_subtab_unlock",[t("tab_arpa_genetics"),t("tech_arpa")])],crispr:[t("wiki_tech_subtab_unlock",[t("tab_arpa_crispr"),t("tech_arpa")])],shotgun_sequencing:[t("wiki_tech_shotgun_sequencing")],de_novo_sequencing:[t("wiki_tech_de_novo_sequencing")],dna_sequencer:[t("wiki_tech_dna_sequencer")],rapid_sequencing:[t("wiki_tech_rapid_sequencing")],mad_science:[t("wiki_tech_building_unlock",[t("city_wardenclyffe")]),t("wiki_tech_gov_time")],electricity:[t("wiki_tech_building_unlock",[t("city_coal_power")]),t("wiki_tech_subtab_unlock",[t("tab_power_grid"),t("tab_civics")]),t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")])],industrialization:[t("wiki_tech_resource_unlock",[t("resource_Titanium_name")]),t("wiki_tech_building_unlock",[t("city_factory")]),t("wiki_tech_gov_time")],fission:[t("wiki_tech_building_unlock",[t("city_fission_power")])],arpa:[t("wiki_tech_tab_unlock",[t("tech_arpa")]),t("wiki_tech_subtab_unlock",[t("tab_arpa_projects"),t("tech_arpa")]),t("wiki_tech_project_unlock",[t("arpa_projects_lhc_title")]),t("wiki_tech_gov_time")],rocketry:[t("wiki_tech_project_unlock",[t("arpa_projects_launch_facility_title")])],quantum_computing:[t("wiki_tech_quantum_computing")],virtual_reality:[t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")]),t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],shields:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_neutron_name")]),t("interstellar_neutron_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_blackhole_name")]),t("interstellar_blackhole_name")])],ai_core:[t("wiki_tech_building_unlock",[t("interstellar_citadel_title")])],metaphysics:[t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],cybernetics:[t("wiki_tech_cybernetics")],blood_pact:[t("wiki_tech_subtab_unlock",[t("tab_arpa_blood"),t("tech_arpa")])],purify:[t("wiki_tech_purify")],waygate:[t("wiki_tech_building_unlock",[t("portal_waygate_title")])],demonic_infusion:[t("wiki_tech_demonic_infusion")],dark_bomb:[t("wiki_tech_dark_bomb"),t("wiki_tech_dark_bomb2"),t("wiki_tech_dark_bomb3")],gate_key:[t("wiki_tech_building_unlock",[t("portal_west_tower")]),t("wiki_tech_building_unlock",[t("portal_east_tower")])],gate_turret:[t("wiki_tech_building_unlock",[t("portal_gate_turret_title")])],infernite_mine:[t("wiki_tech_building_unlock",[t("portal_infernite_mine_title")])],hell_search:[t("wiki_tech_destination_unlock",[t("portal_ruins_mission_title"),t("portal_ruins_name")]),t("wiki_tech_hell_search"),t("wiki_tech_building_unlock",[t("portal_guard_post_title")])],lake_threat:[t("wiki_tech_building_unlock",[t("portal_bireme_title")])],lake_transport:[t("wiki_tech_building_unlock",[t("portal_transport_title")])],cooling_tower:[t("wiki_tech_building_unlock",[t("portal_cooling_tower_title")])],miasma:[t("wiki_tech_building_unlock",[t("portal_port_title")])],tech_ascension:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_sirius_name")]),t("interstellar_sirius_b_name")])],cement_processing:[t("wiki_tech_cement_processing")],adamantite_processing:[t("wiki_tech_adamantite_processing")],graphene_processing:[t("wiki_tech_graphene_processing")],fusion_power:[t("wiki_tech_building_unlock",[t("interstellar_fusion_title")])],infernium_power:[t("wiki_tech_building_unlock",[t("portal_inferno_power_title")])],thermomechanics:[t("wiki_tech_thermomechanics")],quantum_manufacturing:[t("wiki_tech_quantum_manufacturing")],worker_drone:[t("wiki_tech_building_unlock",[t("space_gas_moon_drone_title")])],uranium:[t("wiki_tech_resource_unlock",[t("resource_Uranium_name")])],uranium_storage:[t("wiki_tech_uranium_storage")],uranium_ash:[t("wiki_tech_uranium_ash")],breeder_reactor:[t("wiki_tech_breeder_reactor")],mine_conveyor:[t("wiki_tech_power_upgrade",[t("city_rock_quarry"),1]),t("wiki_tech_power_upgrade",[t("city_mine"),1]),t("wiki_tech_power_upgrade",[t("city_coal_mine"),1])],oil_well:[t("wiki_tech_building_unlock",[t("city_oil_well")])],oil_depot:[t("wiki_tech_building_unlock",[t("city_oil_depot")])],oil_power:[t("wiki_tech_building_unlock",[t("city_oil_power")])],titanium_drills:[t("wiki_tech_titanium_drills")],alloy_drills:[t("wiki_tech_alloy_drills")],fracking:[t("wiki_tech_fracking")],mythril_drills:[t("wiki_tech_mythril_drills")],mass_driver:[t("wiki_tech_building_unlock",[t("city_mass_driver")])],orichalcum_driver:[t("wiki_tech_orichalcum_driver1"),t("wiki_tech_orichalcum_driver2")],polymer:[t("wiki_tech_resource_unlock",[t("resource_Polymer_name")]),t("wiki_tech_factory_unlock",[t("resource_Polymer_name")])],fluidized_bed_reactor:[t("wiki_tech_fluidized_bed_reactor")],synthetic_fur:[t("wiki_tech_factory_unlock",[t("resource_Furs_name")])],nanoweave:[t("wiki_tech_resource_unlock",[t("resource_Nanoweave_name")])],stanene:[t("wiki_tech_resource_unlock",[t("resource_Stanene_name")]),t("wiki_tech_factory_unlock",[t("resource_Stanene_name")])],nano_tubes:[t("wiki_tech_resource_unlock",[t("resource_Nano_Tube_name")]),t("wiki_tech_factory_unlock",[t("resource_Nano_Tube_name")])],scarletite:[t("wiki_tech_resource_unlock",[t("resource_Scarletite_name")]),t("wiki_tech_building_unlock",[t("portal_hell_forge_title")])],pillars:[t("wiki_tech_pillars")],reclaimer:[t("wiki_tech_job_unlock",[t("job_reclaimer")]),t("wiki_tech_building_unlock",[t("city_graveyard")])],shovel:[t("wiki_tech_shovel",[40])],iron_shovel:[t("wiki_tech_shovel",[80])],steel_shovel:[t("wiki_tech_shovel",[120])],titanium_shovel:[t("wiki_tech_shovel",[160])],alloy_shovel:[t("wiki_tech_shovel",[200])],mythril_shovel:[t("wiki_tech_shovel",[240])],adamantite_shovel:[t("wiki_tech_shovel",[280])],stone_axe:[t("wiki_tech_building_unlock",[t("city_lumber_yard")])],copper_axes:[t("wiki_tech_copper_axes",[35])],iron_saw:[t("wiki_tech_building_unlock",[t("city_sawmill")])],steel_saw:[t("wiki_tech_steel_saw")],iron_axes:[t("wiki_tech_copper_axes",[70])],steel_axes:[t("wiki_tech_copper_axes",[105])],titanium_axes:[t("wiki_tech_copper_axes",[140])],chainsaws:[t("wiki_tech_copper_axes",[175])],copper_sledgehammer:[t("wiki_tech_copper_sledgehammer",[40])],iron_sledgehammer:[t("wiki_tech_copper_sledgehammer",[80])],steel_sledgehammer:[t("wiki_tech_copper_sledgehammer",[120])],titanium_sledgehammer:[t("wiki_tech_copper_sledgehammer",[160])],copper_pickaxe:[t("wiki_tech_copper_pickaxe1",[15]),t("wiki_tech_copper_pickaxe2",[12])],iron_pickaxe:[t("wiki_tech_copper_pickaxe1",[30]),t("wiki_tech_copper_pickaxe2",[24])],steel_pickaxe:[t("wiki_tech_copper_pickaxe1",[45]),t("wiki_tech_copper_pickaxe2",[36])],jackhammer:[t("wiki_tech_copper_pickaxe1",[60]),t("wiki_tech_copper_pickaxe2",[48])],jackhammer_mk2:[t("wiki_tech_copper_pickaxe1",[75]),t("wiki_tech_copper_pickaxe2",[60])],adamantite_hammer:[t("wiki_tech_copper_pickaxe1",[90]),t("wiki_tech_copper_pickaxe2",[72])],copper_hoe:[t("wiki_tech_copper_hoe",[33.33])],iron_hoe:[t("wiki_tech_copper_hoe",[66.67])],steel_hoe:[t("wiki_tech_copper_hoe",[100])],titanium_hoe:[t("wiki_tech_copper_hoe",[133.33])],adamantite_hoe:[t("wiki_tech_copper_hoe",[166.67])],cyber_limbs:[t("wiki_tech_cyber_limbs")],slave_pens:[t("wiki_tech_building_unlock",[t("city_slave_pen")])],slave_market:[t("wiki_tech_slave_market")],ceremonial_dagger:[t("wiki_tech_ceremonial_dagger",[600,1500])],last_rites:[t("wiki_tech_ceremonial_dagger",[1800,3600])],ancient_infusion:[t("wiki_tech_ceremonial_dagger",[5400,16200])],garrison:[t("wiki_tech_building_unlock",[t("city_garrison")])],mercs:[t("wiki_tech_mercs")],signing_bonus:[t("wiki_tech_signing_bonus")],hospital:[t("wiki_tech_building_unlock",[t("city_hospital")])],bac_tanks:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),10])],boot_camp:[t("wiki_tech_building_unlock",[t("city_boot_camp")])],vr_training:[t("wiki_tech_vr_training",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("city_boot_camp")])],bows:[t("wiki_tech_bows",[100])],flintlock_rifle:[t("wiki_tech_bows",[200])],machine_gun:[t("wiki_tech_bows",[300])],bunk_beds:[t("wiki_tech_bunk_beds")],rail_guns:[t("wiki_tech_bows",[400])],laser_rifles:[t("wiki_tech_bows",[500])],plasma_rifles:[t("wiki_tech_bows",[600])],disruptor_rifles:[t("wiki_tech_bows",[700])],gauss_rifles:[t("wiki_tech_bows",[800])],cyborg_soldiers:[t("wiki_tech_bows",[900])],space_marines:[t("wiki_tech_building_unlock",[t("space_red_space_barracks_title")])],hammocks:[t("wiki_tech_hammocks",[2,t("space_red_space_barracks_title")]),t("wiki_tech_hammocks",[3,t("galaxy_starbase")])],cruiser:[t("wiki_tech_building_unlock",[t("interstellar_cruiser_title")])],armor:[t("wiki_tech_armor",[1])],plate_armor:[t("wiki_tech_armor",[2])],kevlar:[t("wiki_tech_armor",[3])],nanoweave_vest:[t("wiki_tech_armor",[4])],laser_turret:[t("wiki_tech_name_change",[t("portal_turret_title1"),t("portal_turret_title2")]),t("wiki_tech_laser_turret",[50])],plasma_turret:[t("wiki_tech_name_change",[t("portal_turret_title2"),t("portal_turret_title3")]),t("wiki_tech_laser_turret",[70])],dynamite:[t("wiki_tech_dynamite1",[50]),t("wiki_tech_dynamite2",[25]),t("wiki_tech_dynamite3",[25])],anfo:[t("wiki_tech_dynamite1",[75]),t("wiki_tech_dynamite2",[40]),t("wiki_tech_dynamite3",[40])],mad:[t("wiki_tech_mad")],cement:[t("wiki_tech_building_unlock",[t("city_cement_plant")])],rebar:[t("wiki_tech_rebar",[10])],steel_rebar:[t("wiki_tech_rebar",[20])],portland_cement:[t("wiki_tech_portland_cement")],screw_conveyor:[t("wiki_tech_power_upgrade",[t("city_cement_plant"),2]),t("wiki_tech_screw_conveyor",[5])],adamantite_screws:[t("wiki_tech_screw_conveyor",[8])],hunter_process:[t("wiki_tech_hunter_process",[t("resource_Steel_name"),25])],kroll_process:[t("wiki_tech_kroll_process",[t("resource_Iron_name"),25])],cambridge_process:[t("wiki_tech_hunter_process",[t("resource_Steel_name"),10]),t("wiki_tech_kroll_process",[t("resource_Iron_name"),10])],matter_compression:[t("wiki_tech_matter_compression",[t("resource_Crates_name"),t("city_storage_yard")]),t("wiki_tech_matter_compression",[t("resource_Containers_name"),t("city_warehouse")])],higgs_boson:[t("wiki_tech_higgs_boson")],dimensional_compression:[t("wiki_tech_dimensional_compression")],theology:[t("wiki_tech_building_unlock",[t("city_temple")])],fanaticism:[t("wiki_tech_fanaticism")],alt_fanaticism:[t("wiki_tech_fanaticism")],ancient_theology:[t("wiki_tech_building_unlock",[t("space_red_ziggurat_title")])],study:[t("wiki_tech_study")],encoding:[t("wiki_tech_encoding")],deify:[t("wiki_tech_deify")],infusion:[t("wiki_tech_infusion")],indoctrination:[e.race.no_plasmid?t("wiki_tech_indoctrination2"):t("wiki_tech_indoctrination1")],missionary:[t("wiki_tech_missionary")],zealotry:[t("wiki_tech_zealotry")],anthropology:[e.race.no_plasmid?t("wiki_tech_anthropology2"):t("wiki_tech_anthropology1")],alt_anthropology:[e.race.no_plasmid?t("wiki_tech_anthropology2"):t("wiki_tech_anthropology1")],mythology:[t("wiki_tech_mythology")],archaeology:[t("wiki_tech_archaeology")],merchandising:[t("wiki_tech_merchandising")],astrophysics:[t("wiki_tech_building_unlock",[t("space_home_propellant_depot_title")])],rover:[t("wiki_tech_destination_unlock",[t("space_moon_mission_title"),t("space_moon_info_name")])],probes:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("red")]),ee("red")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("hell")]),ee("hell")]),t("wiki_tech_gov_time")],starcharts:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_sun_info_name")]),t("space_sun_info_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("gas")]),ee("gas")])],colonization:[t("wiki_tech_building_unlock",[e.race.soul_eater?t("space_red_asphodel_title"):t("space_red_biodome_title")])],red_tower:[t("wiki_tech_building_unlock",[t("space_red_tower_title")])],space_manufacturing:[t("wiki_tech_space_manufacturing",[ee("red")])],exotic_lab:[t("wiki_tech_building_unlock",[t("space_red_exotic_lab_title")])],hydroponics:[t("wiki_tech_hydroponics")],dyson_swarm:[t("wiki_tech_building_unlock",[t("space_sun_swarm_control_title")]),t("wiki_tech_building_unlock",[t("space_sun_swarm_satellite_title")])],swarm_plant:[t("wiki_tech_building_unlock",[t("space_hell_swarm_plant_title")])],space_sourced:[t("wiki_tech_space_sourced")],swarm_plant_ai:[t("wiki_tech_swarm_plant_ai")],swarm_control_ai:[t("wiki_tech_swarm_control_ai")],quantum_swarm:[t("wiki_tech_quantum_swarm")],perovskite_cell:[t("wiki_tech_perovskite_cell",[.5])],swarm_convection:[t("wiki_tech_perovskite_cell",[.65])],orichalcum_panels:[t("wiki_tech_perovskite_cell",[.8])],dyson_net:[t("wiki_tech_building_unlock",[t("interstellar_dyson_title")])],dyson_sphere2:[t("wiki_tech_name_change",[t("interstellar_dyson_title"),t("interstellar_dyson_sphere_title")]),t("wiki_tech_dyson_sphere2")],orichalcum_sphere:[t("wiki_tech_dyson_sphere2")],gps:[t("wiki_tech_building_unlock",[t("space_home_gps_title")])],nav_beacon:[t("wiki_tech_building_unlock",[t("space_home_nav_beacon_title")])],subspace_signal:[t("wiki_tech_subspace_signal",[ee("red")])],atmospheric_mining:[t("wiki_tech_building_unlock",[t("space_gas_mining_title")]),t("wiki_tech_building_unlock",[t("space_gas_storage_title",[ee("gas")])])],helium_attractor:[t("wiki_tech_helium_attractor")],ram_scoops:[t("wiki_tech_ram_scoops")],elerium_prospecting:[t("wiki_tech_building_unlock",[t("interstellar_elerium_prospector_title")])],zero_g_mining:[t("wiki_tech_building_unlock",[t("space_belt_station_title")]),t("wiki_tech_building_unlock",[t("space_belt_iridium_ship_title")]),t("wiki_tech_building_unlock",[t("space_belt_iron_ship_title")])],elerium_mining:[t("wiki_tech_building_unlock",[t("space_belt_elerium_ship_title")]),t("wiki_tech_elerium_mining")],laser_mining:[t("wiki_tech_laser_mining",[t("space_belt_elerium_ship_title"),.0075,.005]),t("wiki_tech_laser_mining",[t("space_belt_iridium_ship_title"),.08,.055]),t("wiki_tech_laser_mining",[t("space_belt_iron_ship_title"),3,2])],plasma_mining:[t("wiki_tech_laser_mining",[t("space_belt_elerium_ship_title"),.009,.0075]),t("wiki_tech_laser_mining",[t("space_belt_iridium_ship_title"),.1,.08]),t("wiki_tech_laser_mining",[t("space_belt_iron_ship_title"),4,3])],elerium_tech:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("dwarf")]),ee("dwarf")])],elerium_reactor:[t("wiki_tech_building_unlock",[t("space_dwarf_reactor_title")])],neutronium_housing:[t("wiki_tech_neutronium_housing")],unification2:[t("wiki_tech_unification2a"),t("wiki_tech_unification2b"),t("wiki_tech_unification2c"),t("wiki_tech_unification2d"),t("wiki_tech_unification2e"),t("wiki_tech_unification2f",[ee("gas")]),t("wiki_tech_unification2g"),t("wiki_tech_unification2h"),t("wiki_tech_unification2i")],unite:[t("wiki_tech_rival_unlock"),t("wiki_tech_unite_a"),t("wiki_tech_unification2b"),t("wiki_tech_unite_b"),t("wiki_tech_unification2d"),t("wiki_tech_unification2e"),t("wiki_tech_unite_c"),t("wiki_tech_unite_d"),t("wiki_tech_unite_e")],star_dock:[t("wiki_tech_building_unlock",[t("space_gas_star_dock_title")])],interstellar:[t("wiki_tech_interstellar")],genesis_ship:[t("wiki_tech_genesis_ship")],genetic_decay:[t("wiki_tech_genetic_decay")],stabilize_decay:[t("wiki_tech_stabilize_decay")],warp_drive:[t("wiki_tech_subtab_unlock",[t("tab_interstellar"),t("tab_civil")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("interstellar_alpha_name")]),t("interstellar_alpha_name")])],habitat:[t("wiki_tech_building_unlock",[t("interstellar_habitat_title")])],graphene:[t("wiki_tech_building_unlock",[t("interstellar_g_factory_title")])],aerogel:[t("wiki_tech_resource_unlock",[t("resource_Aerogel_name")])],mega_manufacturing:[t("wiki_tech_building_unlock",[t("interstellar_int_factory_title")])],luxury_condo:[t("wiki_tech_building_unlock",[t("tech_luxury_condo")])],stellar_engine:[t("wiki_tech_building_unlock",[t("interstellar_stellar_engine")])],mass_ejector:[t("wiki_tech_building_unlock",[t("interstellar_mass_ejector")])],asteroid_redirect:[t("wiki_tech_project_unlock",[t("arpa_projects_roid_eject_title",[t("arpa_projects_roid_eject_asteroid")])])],exotic_infusion:[t("wiki_tech_confirmation")],infusion_check:[t("wiki_tech_confirmation")],infusion_confirm:[t("wiki_tech_infusion_confirm")],stabilize_blackhole:[t("wiki_tech_stabilize_blackhole1"),t("wiki_tech_stabilize_blackhole2"),t("wiki_tech_stabilize_blackhole3")],mana_syphon:[t("wiki_tech_project_unlock",[t("arpa_syphon_title")])],gravity_convection:[t("wiki_tech_gravitational_convection")],wormholes:[t("wiki_tech_building_unlock",[t("interstellar_jump_ship")])],fortifications:[t("wiki_tech_subtab_unlock",[t("tab_portal"),t("tab_civil")]),t("wiki_tech_fortifications"),t("wiki_tech_building_unlock",[t("portal_turret_title1")]),t("wiki_tech_building_unlock",[t("portal_carport_title")])],war_drones:[t("wiki_tech_building_unlock",[t("portal_war_drone_title")])],demon_attractor:[t("wiki_tech_building_unlock",[t("portal_attractor_title")])],combat_droids:[t("wiki_tech_building_unlock",[t("portal_war_droid_title")])],repair_droids:[t("wiki_tech_building_unlock",[t("portal_repair_droid_title")])],advanced_predators:[t("wiki_tech_advanced_predators")],enhanced_droids:[t("wiki_tech_enhanced_droids")],sensor_drone:[t("wiki_tech_building_unlock",[t("portal_sensor_drone_title")])],map_terrain:[t("wiki_tech_map_terrain")],calibrated_sensors:[t("wiki_tech_calibrated_sensors",[20])],shield_generator:[t("wiki_tech_shield_generator")],enhanced_sensors:[t("wiki_tech_enhanced_sensors1"),t("wiki_tech_calibrated_sensors",[50])],xeno_linguistics:[t("wiki_tech_destination_unlock",[t("galaxy_gorddon_mission"),t("galaxy_gorddon")])],xeno_culture:[t("wiki_tech_building_unlock",[t("galaxy_embassy")])],cultural_exchange:[t("wiki_tech_building_unlock",[t("galaxy_dormitory")]),t("wiki_tech_building_unlock",[t("galaxy_symposium")])],shore_leave:[t("wiki_tech_shore_leave")],xeno_gift:[t("wiki_tech_xeno_gift",[e.galaxy.alien1?x[e.galaxy.alien1.id].name:t("galaxy_alien1_proxy")]),t("wiki_tech_building_unlock",[t("galaxy_consulate")])],industrial_partnership:[t("wiki_tech_building_unlock",[t("galaxy_vitreloy_plant")])],embassy_housing:[t("wiki_tech_embassy_housing")],advanced_telemetry:[t("wiki_tech_advanced_telemetry")],defense_platform:[t("wiki_tech_building_unlock",[t("galaxy_defense_platform")])],scout_ship:[t("wiki_tech_building_unlock",[t("galaxy_scout_ship")])],corvette_ship:[t("wiki_tech_building_unlock",[t("galaxy_corvette_ship")])],frigate_ship:[t("wiki_tech_building_unlock",[t("galaxy_frigate_ship")])],cruiser_ship:[t("wiki_tech_building_unlock",[t("galaxy_cruiser_ship")]),t("wiki_tech_destination_unlock",[t("galaxy_alien2_mission",[e.galaxy.alien2?x[e.galaxy.alien2.id].name:t("galaxy_alien2_proxy")]),t("galaxy_alien",[e.galaxy.alien2?x[e.galaxy.alien2.id].name:t("galaxy_alien2_proxy")])])],dreadnought:[t("wiki_tech_building_unlock",[t("galaxy_dreadnought")])],ship_dock:[t("wiki_tech_building_unlock",[t("galaxy_ship_dock")])],ore_processor:[t("wiki_tech_building_unlock",[t("galaxy_ore_processor")])],scavenger:[t("wiki_tech_building_unlock",[t("galaxy_scavenger")])],coordinates:[t("wiki_tech_destination_unlock",[t("galaxy_alien2_mission",[t("galaxy_chthonian")]),t("galaxy_chthonian")])],chthonian_survey:[t("wiki_tech_resource_unlock",[t("resource_Orichalcum_name")]),t("wiki_tech_building_unlock",[t("galaxy_excavator")]),t("wiki_tech_building_unlock",[t("galaxy_raider")])],gateway_depot:[t("wiki_tech_building_unlock",[t("galaxy_gateway_depot")])],soul_forge:[t("wiki_tech_building_unlock",[t("portal_soul_forge_title")])],soul_attractor:[t("wiki_tech_building_unlock",[t("portal_soul_attractor_title")])],soul_absorption:[t("wiki_tech_soul_absorption")],soul_link:[t("wiki_tech_soul_link1"),t("wiki_tech_soul_link2")],gun_emplacement:[t("wiki_tech_building_unlock",[t("portal_gun_emplacement_title")])],advanced_emplacement:[t("wiki_tech_advanced_emplacement1"),t("wiki_tech_advanced_emplacement2"),t("wiki_tech_advanced_emplacement3")],mana:[t("wiki_tech_resource_unlock",[t("resource_Mana_name")]),t("wiki_tech_resource_unlock",[t("resource_Crystal_name")]),t("wiki_tech_job_unlock",[t("job_crystal_miner")])],ley_lines:[t("wiki_tech_building_unlock",[e.race.cataclysm||e.race.orbit_decayed?t("space_red_pylon"):t("city_pylon")])],rituals:[t("wiki_tech_rituals")],crafting_ritual:[t("wiki_tech_crafting_ritual")],mana_nexus:[t("wiki_tech_project_unlock",[t("tech_mana_nexus")])],clerics:[t("wiki_tech_clerics")],conjuring:[t("wiki_tech_conjuring",Ho.active?[t("city_trick"),t("city_trick_conjure")]:[t("city_food"),t("city_food_conjure")])],res_conjuring:[t("wiki_tech_conjuring",Ho.active?[t("city_dig"),t("city_dig_conjour")]:[t("city_lumber"),t("city_lumber_conjure")]),t("wiki_tech_conjuring",e.race.sappy?[t("city_amber"),t("city_amber_conjour")]:[t("city_stone"),t("city_stone_conjour")])],alchemy:[t("wiki_tech_subtab_unlock",[t("tab_alchemy"),t("tab_resources")])],transmutation:[t("wiki_tech_transmutation1"),t("wiki_tech_transmutation2")],bribe_sphinx:[t("wiki_tech_bribe_sphinx")],alien_biotech:[t("wiki_tech_alien_biotech")],zero_g_lab:[t("wiki_tech_building_unlock",[t("tech_zero_g_lab")])],operating_base:[t("wiki_tech_building_unlock",[t("tech_operating_base")])],munitions_depot:[t("wiki_tech_building_unlock",[t("tech_munitions_depot")])],fob:[t("wiki_tech_building_unlock",[t("space_fob_title")])],bac_tanks_tp:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),10])],medkit:[t("wiki_tech_bac_tanks",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital"),15])],sam_site:[t("wiki_tech_building_unlock",[t("space_sam_title")])],data_cracker:[t("wiki_tech_building_unlock",[t("space_decoder_title")])],ai_core_tp:[t("wiki_tech_building_unlock",[t("space_ai_core")])],ai_optimizations:[t("wiki_tech_ai_optimizations")],synthetic_life:[t("wiki_tech_building_unlock",[t("space_ai_colonist_title")])],protocol66a:[t("wiki_tech_protocol66a")],quantium:[t("wiki_tech_resource_unlock",[t("resource_Quantium_name")]),t("wiki_tech_quantium")],anitgrav_bunk:[t("wiki_tech_hammocks",[2,t("space_red_space_barracks_title")])],higgs_boson_tp:[t("wiki_tech_higgs_boson")],strange_signal:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("triton")]),ee("triton")])],data_analysis:[t("wiki_tech_data_analysis",[ee("triton")]),t("wiki_tech_syndicate_increase",[ee("titan"),1e3,500]),t("wiki_tech_syndicate_increase",[ee("enceladus"),500,250]),t("wiki_tech_syndicate_increase",[ee("triton"),2e3,1e3])],mass_relay:[t("wiki_tech_building_unlock",[t("space_dwarf_mass_relay_title")])],nav_data:[t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("eris")]),ee("eris")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_kuiper_title")]),t("space_kuiper_title")])],dronewar:[t("wiki_tech_building_unlock",[t("space_drone_control",[ee("eris")])]),t("wiki_tech_building_unlock",[t("space_shock_trooper_title")]),t("wiki_tech_control_unlock",[t("space_digsite_title")])],drone_tank:[t("wiki_tech_building_unlock",[t("space_tank_title")])],stanene_tp:[t("wiki_tech_resource_unlock",[t("resource_Stanene_name")]),t("wiki_tech_factory_unlock",[t("resource_Stanene_name")])],graphene_tp:[t("wiki_tech_building_unlock",[t("interstellar_g_factory_title")])],virtual_reality_tp:[t("wiki_tech_gov_upgrade",[t("govern_autocracy")]),t("wiki_tech_gov_upgrade",[t("govern_democracy")]),t("wiki_tech_gov_upgrade",[t("govern_oligarchy")]),t("wiki_tech_gov_upgrade",[t("govern_theocracy")]),t("wiki_tech_gov_upgrade",[t("govern_republic")]),t("wiki_tech_gov_upgrade",[t("govern_socialist")]),t("wiki_tech_gov_upgrade",[t("govern_corpocracy")]),t("wiki_tech_gov_upgrade",[t("govern_technocracy")]),t("wiki_tech_gov_upgrade",[t("govern_federation")]),t("wiki_tech_gov_upgrade",[t("govern_magocracy")])],electrolysis:[t("wiki_tech_building_unlock",[t("space_electrolysis_title")])],storehouse:[t("wiki_tech_building_unlock",[t("space_storehouse_title")])],adamantite_vault_tp:[t("wiki_tech_vault",[22500,3e4])],titan_bank:[t("wiki_tech_building_unlock",[t("city_bank")])],hydrogen_plant:[t("wiki_tech_building_unlock",[t("space_hydrogen_plant_title")])],water_mining:[t("wiki_tech_building_unlock",[t("space_water_freighter_title")])],mercury_smelting:[t("wiki_tech_building_unlock",[t("space_hell_smelter_title",[ee("hell")])])],iridium_smelting:[t("wiki_tech_iridium_smelting")],adamantite_crates:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),1500,1e3])],bolognium_crates_tp:[t("wiki_tech_containerized_upgrade",[t("resource_Crates_name"),6200,2200])],adamantite_containers_tp:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),2200,1600])],quantium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),3200,2200])],unobtainium_containers:[t("wiki_tech_containerized_upgrade",[t("resource_Containers_name"),9700,3200])],reinforced_shelving:[t("wiki_tech_reinforced_shelving")],garage_shelving:[t("wiki_tech_garage_shelving")],warehouse_shelving:[t("wiki_tech_warehouse_shelving1"),t("wiki_tech_warehouse_shelving2")],elerium_extraction:[t("wiki_tech_building_unlock",[t("space_kuiper_mine",[e.resource.Elerium.name])])],orichalcum_panels_tp:[t("wiki_tech_perovskite_cell",[.8])],shipyard:[t("wiki_tech_building_unlock",[t("outer_shipyard_title")])],ship_lasers:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_laser")])],pulse_lasers:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_p_laser")])],ship_plasma:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_plasma")])],ship_phaser:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_phaser")])],ship_disruptor:[t("wiki_tech_ship_weapon_unlock",[t("outer_shipyard_weapon_disruptor")])],destroyer_ship:[t("wiki_tech_building_unlock",[t("outer_shipyard_class_destroyer")])],cruiser_ship_tp:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_cruiser")])],h_cruiser_ship:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_battlecruiser")])],dreadnought_ship:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_dreadnought")])],pulse_engine:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_pulse")])],photon_engine:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_photon")])],vacuum_drive:[t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_vacuum")])],ship_fusion:[t("wiki_tech_ship_power_unlock",[t("outer_shipyard_power_fusion")])],ship_elerium:[t("wiki_tech_ship_power_unlock",[t("outer_shipyard_power_elerium")])],quantum_signatures:[t("wiki_tech_ship_sensor_unlock",[t("outer_shipyard_sensor_quantum")])],interstellar_drive:[t("wiki_tech_ship_class_unlock",[t("outer_shipyard_class_explorer")]),t("wiki_tech_ship_engine_unlock",[t("outer_shipyard_engine_emdrive")])],alien_outpost:[t("wiki_tech_building_unlock",[t("tech_alien_outpost")])],jumpgates:[t("wiki_tech_building_unlock",[t("tau_jump_gate")]),t("wiki_tech_building_unlock",[t("tau_jump_gate")])],system_survey:[t("wiki_tech_destination_unlock",[t("tau_gas_contest_title"),t("tau_gas_title")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[t("tau_roid_title")]),t("tau_roid_title")])],repository:[t("wiki_tech_building_unlock",[t("tech_repository")])],fusion_generator:[t("wiki_tech_building_unlock",[t("tech_fusion_generator")])],tau_cultivation:[t("wiki_tech_building_unlock",[t("tau_home_tau_farm")])],tau_manufacturing:[t("wiki_tech_building_unlock",[t("tau_home_tau_factory")])],jeff:[t("wiki_tech_jeff")],womling_fun:[t("wiki_tech_building_unlock",[t("wiki_tech_multi_unlock",[t("wiki_tech_multi_unlock",[t("tau_red_womling_fun1"),t("tau_red_womling_fun2")]),t("tau_red_womling_fun3")])])],womling_lab:[t("wiki_tech_building_unlock",[t("interstellar_laboratory_title")]),t("wiki_tech_womling_lab")],womling_mining:[t("wiki_tech_womling_mining",[15,t("wiki_tech_tree_womling_mining")])],womling_firstaid:[t("wiki_tech_womling_firstaid")],womling_logistics:[t("wiki_tech_womling_logistics")],womling_repulser:[t("wiki_tech_womling_repulser")],womling_farming:[t("wiki_tech_womling_farming1"),t("wiki_tech_womling_farming2")],womling_housing:[t("wiki_tech_womling_housing")],womling_support:[t("wiki_tech_building_unlock",[t("tau_gas_womling_station_title")])],womling_recycling:[t("wiki_tech_womling_recycling")],belt_mining:[t("wiki_tech_building_unlock",[t("tau_gas_ore_refinery_title")])],adv_belt_mining:[t("wiki_tech_adv_belt_mining")],space_whaling:[t("wiki_tech_building_unlock",[t("tau_gas_whaling_station_title")])],infectious_disease_lab:[t("wiki_tech_building_unlock",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")])],isolation_protocol:[t("wiki_tech_isolation_protocol1"),t("wiki_tech_isolation_protocol2")],decode_virus:[t("wiki_tech_decode_virus",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")])],vaccine_campaign:[t("wiki_tech_vaccine_campaign1",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vaccine_campaign2",[x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")])],vax_strat1:[t("wiki_tech_vax_strat",["250",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")])],vax_strat2:[t("wiki_tech_vax_strat",["25",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["-50%"])],vax_strat3:[t("wiki_tech_vax_strat",["390",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["+20%"])],vax_strat4:[t("wiki_tech_vax_strat",["125",x[e.race.species].type==="synthetic"?t("city_boot_camp_art"):t("tech_hospital")]),t("wiki_tech_vax_morale",["-10%"])],cloning:[t("wiki_tech_building_unlock",[t("tau_home_cloning")])],ringworld:[t("wiki_tech_destination_unlock2",[t("tab_tauceti")]),t("wiki_tech_building_unlock",[t("tau_star_ringworld")])],iso_gambling:[t("wiki_tech_iso_gambling")],outpost_boost:[t("wiki_tech_outpost_boost")],cultural_center:[t("wiki_tech_building_unlock",[t("tech_cultural_center")])],outer_tau_survey:[t("wiki_tech_destination_unlock",[t("tau_gas2_contest_title"),t("tau_gas2_title")])],alien_research:[t("wiki_tech_alien_research")],womling_gene_therapy:[t("wiki_tech_womling_gene_therapy1"),t("wiki_tech_womling_gene_therapy2"),t("wiki_tech_womling_gene_therapy3"),t("wiki_tech_womling_gene_therapy4",[t("tau_gas_title")])],food_culture:[t("wiki_tech_food_culture")],advanced_refinery:[t("wiki_tech_advanced_refinery")],advanced_pit_mining:[t("wiki_tech_advanced_pit_mining")],useless_junk:[t("wiki_tech_useless_junk")],advanced_asteroid_mining:[t("wiki_tech_advanced_asteroid_mining")],matrioshka_brain:[t("wiki_tech_building_unlock",[t("tech_matrioshka_brain")])],ignition_device:[t("wiki_tech_building_unlock",[t("tech_ignition_device")])],replicator:[t("wiki_tech_replicator")],womling_unlock:[t("wiki_tech_destination_unlock2",[t("tau_planet",[ee("red")])]),t("wiki_tech_building_unlock",[t("tau_red_orbital_platform")]),t("wiki_tech_womling_unlock")],garden_of_eden:[t("wiki_tech_building_unlock",[t("tau_star_goe_facility")])],geck:[t("wiki_tech_geck")]},ac={rocketry:[t("wiki_tech_project_unlock",[t("arpa_projects_launch_facility_title")]),t("wiki_tech_rival_unlock")],merchandising:[t("tech_merchandising_effect_tp")],starcharts:[t("wiki_tech_destination_unlock",[t("space_mission_title",[t("space_sun_info_name")]),t("space_sun_info_name")]),t("wiki_tech_destination_unlock",[t("space_mission_title",[ee("gas")]),ee("gas")]),t("wiki_tech_subtab_unlock",[t("outer_sol_system",[ee("home")]),t("tab_civil")])]},rc={theology1:{title:t("wiki_tech_req_theology1"),link:"wiki.html#resets-prestige-intro"},genetics3:{title:t("wiki_tech_req_genetics3")},supercollider1:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),1]),link:"wiki.html#projects-arpa-lhc"},supercollider2:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),2]),link:"wiki.html#projects-arpa-lhc"},supercollider3:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),3]),link:"wiki.html#projects-arpa-lhc"},supercollider10:{title:t("wiki_tech_req_arpa",[t("arpa_projects_lhc_title"),10]),link:"wiki.html#projects-arpa-lhc"},stock_exchange1:{title:t("wiki_tech_req_arpa",[t("arpa_projects_stock_exchange_title"),1]),link:"wiki.html#projects-arpa-stock_exchange"},monuments2:{title:t("wiki_tech_req_arpa",[t("arpa_project_monument_title"),2]),link:"wiki.html#projects-arpa-monument"},monuments10:{title:t("wiki_tech_req_arpa",[t("arpa_project_monument_title"),10]),link:"wiki.html#projects-arpa-monument"},space2:{title:t("wiki_tech_req_mission",[t("space_home_test_launch_title")]),link:"wiki.html#space-structures-test_launch"},space3:{title:t("wiki_tech_req_mission",[t("space_moon_mission_title")]),link:"wiki.html#space-structures-moon_mission"},space4:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("red")])]),link:"wiki.html#space-structures-red_mission"},space5:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("gas")])]),link:"wiki.html#space-structures-gas_mission"},luna1:{title:t("wiki_tech_req_building",[t("space_moon_base_title")]),link:"wiki.html#space-structures-moon_base"},mars1:{title:t("wiki_tech_req_building",[t("space_red_spaceport_title")]),link:"wiki.html#space-structures-spaceport"},hell1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("hell")])]),link:"wiki.html#space-structures-hell_mission"},solar1:{title:t("wiki_tech_req_mission",[t("space_sun_mission_title")]),link:"wiki.html#space-structures-sun_mission"},gas_moon1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("gas_moon")])]),link:"wiki.html#space-structures-gas_moon_mission"},asteroid1:{title:t("wiki_tech_req_mission",[t("space_belt_mission_title")]),link:"wiki.html#space-structures-belt_mission"},asteroid3:{title:t("wiki_tech_req_building",[t("space_belt_station_title")]),link:"wiki.html#space-structures-space_station"},asteroid4:{title:t("wiki_tech_req_asteroid4"),link:"wiki.html#progress-events-elerium"},dwarf1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("dwarf")])]),link:"wiki.html#space-structures-dwarf_mission"},science11:{title:t("wiki_tech_req_megabuilding",[t("space_dwarf_collider_title")]),link:"wiki.html#space-structures-world_collider"},wsc1:{title:t("wiki_tech_req_wsc1"),link:"wiki.html#space-structures-world_collider"},alpha2:{title:t("wiki_tech_req_building",[t("interstellar_alpha_starport_title")]),link:"wiki.html#interstellar-structures-starport"},droids1:{title:t("wiki_tech_req_building",[t("interstellar_mining_droid_title")]),link:"wiki.html#interstellar-structures-mining_droid"},proxima2:{title:t("wiki_tech_req_building",[t("interstellar_xfer_station_title")]),link:"wiki.html#interstellar-structures-xfer_station"},nebula2:{title:t("wiki_tech_req_building",[t("interstellar_nexus_title")]),link:"wiki.html#interstellar-structures-nexus"},neutron1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("interstellar_neutron_name")])]),link:"wiki.html#interstellar-structures-neutron_mission"},blackhole2:{title:t("wiki_tech_req_building",[t("interstellar_far_reach")]),link:"wiki.html#interstellar-structures-far_reach"},blackhole4:{title:t("wiki_tech_req_megabuilding",[t("interstellar_stellar_engine")]),link:"wiki.html#interstellar-structures-stellar_engine"},whitehole1:{title:t("wiki_tech_req_whitehole1")},gateway3:{title:t("wiki_tech_req_building",[t("galaxy_starbase")]),link:"wiki.html#intergalactic-structures-starbase"},stargate5:{title:t("wiki_tech_req_building",[t("galaxy_gateway_station")]),link:"wiki.html#intergalactic-structures-gateway_station"},xeno1:{title:t("wiki_tech_req_xeno1"),link:"wiki.html#progress-events-alien_encounter"},xeno3:{title:t("wiki_tech_req_mission",[t("galaxy_gorddon_mission")]),link:"wiki.html#intergalactic-structures-gorddon_mission"},xeno5:{title:t("wiki_tech_req_building",[t("galaxy_embassy")]),link:"wiki.html#intergalactic-structures-embassy"},xeno9:{title:t("wiki_tech_req_building",[t("galaxy_consulate")]),link:"wiki.html#intergalactic-structures-consulate"},piracy1:{title:t("wiki_tech_req_piracy1"),link:"wiki.html#progress-events-piracy"},conflict2:{title:t("wiki_tech_req_building",[t("galaxy_foothold")]),link:"wiki.html#intergalactic-structures-foothold"},conflict5:{title:t("wiki_tech_req_conflict5"),link:"wiki.html#progress-events-alien_database"},chthonian2:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("galaxy_chthonian")])]),link:"wiki.html#intergalactic-structures-chthonian_mission"},infernite1:{title:t("wiki_tech_req_building",[t("portal_carport_title")]),link:"wiki.html#hell-structures-carport"},hell_pit3:{title:t("wiki_tech_req_mission",[t("portal_assault_forge_title")]),link:"wiki.html#hell-structures-assault_forge"},corrupt1:{title:t("wiki_tech_req_corrupt1"),link:"wiki.html#progress-events-corrupt_gem"},hell_ruins2:{title:t("wiki_tech_req_mission",[t("portal_ruins_mission_title")]),link:"wiki.html#hell-structures-ruins_mission"},hell_ruins3:{title:t("wiki_tech_req_hell_ruins3")},hell_gate1:{title:t("wiki_tech_req_mission",[t("portal_gate_mission_title")]),link:"wiki.html#hell-structures-gate_mission"},hell_lake2:{title:t("wiki_tech_req_mission",[t("portal_lake_mission_title")]),link:"wiki.html#hell-structures-lake_mission"},hell_spire2:{title:t("wiki_tech_req_mission",[t("portal_spire_mission_title")]),link:"wiki.html#hell-structures-spire_mission"},hell_spire8:{title:t("wiki_tech_req_hell_spire8"),link:"wiki.html#hell-structures-sphinx"},hell_spire10:{title:t("wiki_tech_req_hell_spire10")},b_stone1:{title:t("wiki_tech_req_b_stone1")},waygate2:{title:t("wiki_tech_req_megabuilding",[t("portal_waygate_title")]),link:"wiki.html#hell-structures-waygate"},waygate3:{title:t("wiki_tech_req_waygate3"),link:"wiki.html#mechanics-gameplay-dlord"},titan_ai_core1:{title:t("wiki_tech_req_megabuilding",[t("space_ai_core")]),link:"wiki.html#space-tp_structures-ai_core"},syard_class2:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_armor3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_weapon1:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_engine2:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_power3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syard_sensor3:{title:t("wiki_tech_req_building",[t("outer_shipyard_title")]),link:"wiki.html#space-tp_structures-shipyard"},syndicate1:{title:t("wiki_tech_req_syndicate1")},outer3:{title:t("wiki_tech_req_outer3"),link:"wiki.html#space-tp_structures-crashed_ship"},outer6:{title:t("wiki_tech_req_megabuilding",[t("space_dwarf_mass_relay_title")]),link:"wiki.html#space-tp_structures-mass_relay"},titan1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("titan")])]),link:"wiki.html#space-tp_structures-titan_mission"},titan2:{title:t("wiki_tech_req_building",[t("space_red_spaceport_title")]),link:"wiki.html#space-tp_structures-titan_spaceport"},titan4:{title:t("wiki_tech_req_building",[t("space_electrolysis_title")]),link:"wiki.html#space-tp_structures-electrolysis"},enceladus1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("enceladus")])]),link:"wiki.html#space-tp_structures-enceladus_mission"},triton1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[ee("triton")])]),link:"wiki.html#space-tp_structures-triton_mission"},kuiper1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("space_kuiper_title")])]),link:"wiki.html#space-tp_structures-kuiper_mission"},eris2:{title:t("wiki_tech_req_eris2",[ee("eris")])},dig_control1:{title:t("wiki_tech_req_dig_control1"),link:"wiki.html#space-tp_structures-digsite"},corrupted_ai1:{title:t("wiki_tech_req_corrupted_ai1")},tauceti2:{title:t("wiki_tech_req_tauceti2")},tauceti4:{title:t("wiki_tech_req_tauceti4"),link:"wiki.html#space-tp_structures-jump_gate"},tau_home3:{title:t("wiki_tech_req_task",[t("tau_home_excavate")]),link:"wiki.html#tauceti-structures-excavate"},tau_red2:{title:t("wiki_tech_req_building",[t("tau_red_orbital_platform")]),link:"wiki.html#tauceti-structures-orbital_platform"},tau_gas3:{title:t("wiki_tech_req_building",[t("tau_gas_refueling_station_title")]),link:"wiki.html#tauceti-structures-refueling_station"},tau_gas25:{title:t("wiki_tech_req_megabuilding",[t("tau_gas2_alien_station")]),link:"wiki.html#tauceti-structures-alien_station"},tau_roid1:{title:t("wiki_tech_req_mission",[t("space_mission_title",[t("tau_roid_title")])]),link:"wiki.html#tauceti-structures-roid_mission"},tau_roid4:{title:t("wiki_tech_req_building",[t("tau_gas_ore_refinery_title")]),link:"wiki.html#tauceti-structures-ore_refinery"},womling_tech1:{title:t("wiki_tech_req_womling_tech",[1]),link:"wiki.html#tauceti-structures-jeff"},womling_tech2:{title:t("wiki_tech_req_womling_tech",[2]),link:"wiki.html#tauceti-structures-jeff"},womling_tech3:{title:t("wiki_tech_req_womling_tech",[3]),link:"wiki.html#tauceti-structures-jeff"},womling_tech4:{title:t("wiki_tech_req_womling_tech",[4]),link:"wiki.html#tauceti-structures-jeff"},womling_tech5:{title:t("wiki_tech_req_womling_tech",[5]),link:"wiki.html#tauceti-structures-jeff"},womling_tech6:{title:t("wiki_tech_req_womling_tech",[6]),link:"wiki.html#tauceti-structures-jeff"},womling_tech7:{title:t("wiki_tech_req_womling_tech",[7]),link:"wiki.html#tauceti-structures-jeff"},womling_tech8:{title:t("wiki_tech_req_womling_tech",[8]),link:"wiki.html#tauceti-structures-jeff"},plague2:{title:t("wiki_tech_req_plague",[2]),link:"wiki.html#progress-events-plague"},plague5:{title:t("wiki_tech_req_plague5"),link:"wiki.html#tauceti-tp_tech-isolation_protocol"},disease2:{title:t("wiki_tech_req_building",[e.tech.isolation?t("tech_infectious_disease_lab_alt"):t(e.race.artifical?"tech_infectious_disease_lab_s":"tech_infectious_disease_lab")]),link:"wiki.html#tauceti-structures-infectious_disease_lab"},focus_cure3:{title:t("wiki_tech_req_focus_cure3")},focus_cure5:{title:t("wiki_tech_req_focus_cure",[25])},focus_cure7:{title:t("wiki_tech_req_focus_cure",[100])},alien_data1:{title:t("wiki_tech_req_alien_data",[10]),link:"wiki.html#tauceti-structures-alien_station"},alien_data2:{title:t("wiki_tech_req_alien_data",[20]),link:"wiki.html#tauceti-structures-alien_station"},alien_data3:{title:t("wiki_tech_req_alien_data",[30]),link:"wiki.html#tauceti-structures-alien_station"},alien_data4:{title:t("wiki_tech_req_alien_data",[48]),link:"wiki.html#tauceti-structures-alien_station"},alien_data5:{title:t("wiki_tech_req_alien_data",[60]),link:"wiki.html#tauceti-structures-alien_station"},alien_data6:{title:t("wiki_tech_req_alien_data",[100]),link:"wiki.html#tauceti-structures-alien_station"},eden1:{title:t("wiki_tech_req_megabuilding",[t("tau_star_ringworld")]),link:"wiki.html#tauceti-structures-ringworld"},decay1:{title:t("wiki_tech_req_decay1"),link:"wiki.html#mechanics-gameplay-genome_decay"},locked1:{title:t("unavailable_content")}},Vo={bone_tools:[{category:"unique",subreqs:[{title:t("wiki_tech_special_trait",[t("trait_evil_name")]),color:!!e.race.evil,link:"wiki.html#traits-species-genus_evil"},{title:t("wiki_tech_special_trait_not",[t("trait_soul_eater_name")]),color:!e.race.soul_eater,link:"wiki.html#traits-species-special_soul_eater"}]}],wooden_tools:[{category:"trait",not:!0,subreqs:[{name:"evil"}]},{category:"trait",subreqs:[{name:"soul_eater"}]}],smokehouse:[{category:"trait",subreqs:[{name:"carnivore"}]}],lodge:[{category:"trait",subreqs:[{name:"carnivore"}]}],alt_lodge:[{category:"unique",subreqs:[{title:t("wiki_tech_special_species",[t("race_wendigo")]),color:e.race.species==="wendigo",link:"wiki.html#races-species-wendigo"},{title:t("wiki_tech_special_trait",[t("trait_detritivore_name")]),color:!!e.race.detritivore,link:"wiki.html#traits-species-genus_detritivore"}]}],soul_well:[{category:"trait",subreqs:[{name:"soul_eater"}]}],compost:[{category:"trait",subreqs:[{name:"detritivore"}]}],hot_compost:[{category:"trait",subreqs:[{name:"detritivore"}]}],mulching:[{category:"trait",subreqs:[{name:"detritivore"}]}],adv_mulching:[{category:"trait",subreqs:[{name:"detritivore"}]}],agriculture:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],farm_house:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],irrigation:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],silo:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],mill:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],windmill:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],windturbine:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],wind_plant:[{category:"trait",subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],gmfood:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iridium_smelting_perk:[{category:"achieve",subreqs:[{name:"pathfinder",val:3}]}],republic:[{category:"unique",subreqs:[{title:t("wiki_tech_special_tech",[t("tech_diplomacy")]),color:e.tech.trade&&e.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:t("wiki_tech_special_trait",[t("trait_terrifying_name")]),color:!!e.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],socialist:[{category:"unique",subreqs:[{title:t("wiki_tech_special_tech",[t("tech_diplomacy")]),color:e.tech.trade&&e.tech.trade>=2,link:"wiki.html#discovery-tech-diplomacy"},{title:t("wiki_tech_special_trait",[t("trait_terrifying_name")]),color:!!e.race.terrifying,link:"wiki.html#traits-species-major_terrifying"}]}],federation:[{category:"unique",subreqs:[{title:t("wiki_tech_special_occupy"),color:Ua(),link:"wiki.html#mechanics-gameplay-occupying"}]}],magocracy:[{category:"universe",subreqs:[{name:"magic"}]}],governor:[{category:"crispr",subreqs:[{name:"governance",tree:"governor",val:1}]},{category:"government",not:!0,subreqs:[{name:"anarchy"}]}],market:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],tax_rates:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],large_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],corruption:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"noble"}]}],massive_trades:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],trade:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],diplomacy:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],freight:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],wharf:[{category:"trait",not:!0,subreqs:[{name:"terrifying"},{name:"thalassophobia"}]}],reclaimer:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],iron_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],steel_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],titanium_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],alloy_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],mythril_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],adamantite_shovel:[{category:"universe",subreqs:[{name:"evil"}]},{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"}]},{category:"genus",not:!0,subreqs:[{name:"angelic"},{name:"demonic"}]}],stone_axe:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_saw:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],iron_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],steel_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],titanium_axes:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],chainsaws:[{category:"trait",not:!0,subreqs:[{name:"kindling_kindred"},{name:"smoldering"},{name:"evil"}]}],copper_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],iron_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],steel_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],titanium_sledgehammer:[{category:"trait",not:!0,subreqs:[{name:"sappy"}]}],copper_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],iron_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],steel_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],titanium_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],adamantite_hoe:[{category:"trait",not:!0,subreqs:[{name:"carnivore"},{name:"soul_eater"},{name:"detritivore"}]}],slave_pens:[{category:"trait",subreqs:[{name:"slaver"}]}],slave_market:[{category:"trait",subreqs:[{name:"slaver"}]}],ceremonial_dagger:[{category:"trait",subreqs:[{name:"cannibalize"}]}],last_rites:[{category:"trait",subreqs:[{name:"cannibalize"}]}],ancient_infusion:[{category:"trait",subreqs:[{name:"cannibalize"}]}],armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],plate_armor:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],kevlar:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],nanoweave_vest:[{category:"trait",not:!0,subreqs:[{name:"apex_predator"}]}],mad:[{truepath:!0,category:"unique",subreqs:[{title:t("wiki_tech_special_unify"),color:!!e.tech.world_control,link:"wiki.html#globalized-tp_tech-unite"}]}],ancient_theology:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],study:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],encoding:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],deify:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],infusion:[{category:"crispr",subreqs:[{name:"ancients",tree:"ancients",val:1}]}],gps:[{category:"trait",not:!0,subreqs:[{name:"terrifying"}]}],genesis:[{category:"unique",subreqs:[{title:t("wiki_tech_special_genesis"),color:e.race.deterioration>=1}]}],veil:[{category:"universe",subreqs:[{name:"magic"}]}],mana_syphon:[{category:"universe",subreqs:[{name:"magic"}]}],mana:[{category:"universe",subreqs:[{name:"magic"}]}],ley_lines:[{category:"universe",subreqs:[{name:"magic"}]}],rituals:[{category:"universe",subreqs:[{name:"magic"}]}],crafting_ritual:[{category:"universe",subreqs:[{name:"magic"}]}],mana_nexus:[{category:"universe",subreqs:[{name:"magic"}]}],clerics:[{category:"universe",subreqs:[{name:"magic"}]},{category:"crispr",subreqs:[{name:"faith",tree:"ancients",val:2}]}],conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],res_conjuring:[{category:"universe",subreqs:[{name:"magic"}]},{category:"scenario",not:!0,subreqs:[{name:"cataclysm"}]}],alchemy:[{category:"universe",subreqs:[{name:"magic"}]}],transmutation:[{category:"universe",subreqs:[{name:"magic"}]}],dark_bomb:[{category:"unique",subreqs:[{title:t("wiki_tech_special_demon_lord"),color:e.stats.hasOwnProperty("spire")&&e.stats.spire.hasOwnProperty(ue())&&e.stats.spire[ue()].hasOwnProperty("dlstr")&&e.stats.spire[ue()].dlstr>0,link:"wiki.html#mechanics-gameplay-dlord"}]}],terraforming:[{category:"challenge",subreqs:[{name:"orbitdecay"}]}],geck:[{category:"achieve",subreqs:[{name:"lamentis",val:5}]}],womling_fun:[{category:"unique",subreqs:[{title:t("tau_red_contact"),color:!!e.race.womling_friend,link:"wiki.html#tauceti-structures-contact"},{title:t("tau_red_introduce"),color:!!e.race.womling_god,link:"wiki.html#tauceti-structures-introduce"},{title:t("tau_red_subjugate"),color:!!e.race.womling_lord,link:"wiki.html#tauceti-structures-subjugate"}]}],isolation_protocol:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],focus_cure:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],decode_virus:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vaccine_campaign:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat1:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat2:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat3:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],vax_strat4:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],cloning:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],clone_degredation:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],digital_paradise:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ringworld:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],matrioshka_brain:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],ignition_device:[{category:"scenario",not:!0,subreqs:[{name:"lone_survivor"}]}],replicator:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],womling_unlock:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],garden_of_eden:[{category:"scenario",subreqs:[{name:"lone_survivor"}]}],wheel:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],wagon:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],steam_engine:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],combustion_engine:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],hover_cart:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],osha:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],blackmarket:[{category:"challenge",subreqs:[{name:"gravity_well"}]}],pipelines:[{category:"challenge",subreqs:[{name:"gravity_well"}]}]},Uo={unification2:"unification",conjuring:"ley_lines",res_conjuring:"conjuring",bribe_sphinx:"miasma"};function E_(a){let r={};return Object.keys(a==="truepath"?Jo:Qo).forEach(function(s){let n=q.tech[s];r[n.grant[0]]||(r[n.grant[0]]={});let c=typeof q.tech[s].title=="string"?q.tech[s].title:q.tech[s].title();r[n.grant[0]][n.grant[1]]=[{name:s,title:c,era:q.tech[s].era}]}),r.primitive[2]=[{name:"bone_tools",title:t("tech_bone_tools"),era:"primitive"},{name:"wooden_tools",title:t("tech_wooden_tools"),era:"primitive"}],r.theology[3]=[{name:q.tech.fanaticism.wiki?"fanaticism":"alt_fanaticism",title:t("tech_fanaticism"),era:"civilized"},{name:q.tech.anthropology.wiki?"anthropology":"alt_anthropology",title:t("tech_anthropology"),era:"civilized"}],r.theology[5]=[{name:"deify",title:t("tech_deify"),era:"early_space"},{name:"study",title:t("tech_study"),era:"early_space"}],r.ancient_study[1]=[{name:"study",title:t("tech_study"),era:"early_space"}],r.ancient_deify[1]=[{name:"deify",title:t("tech_deify"),era:"early_space"}],a==="truepath"&&(r.unify[1]=[{name:"arpa",title:t("tech_arpa"),era:"globalized"}],r.isolation={},r.isolation[1]=[{name:"isolation_protocol",title:t("tech_isolation_protocol"),era:"tauceti"}],r.focus_cure={},r.focus_cure[1]=[{name:"focus_cure",title:t("tech_focus_cure"),era:"tauceti"}]),r}function L_(a,r,i){let s=$('
              ');if(a.append(s),ac.hasOwnProperty(r)&&i==="truepath")for(let n=0;n${ac[r][n]}`);else if(tc.hasOwnProperty(r))for(let n=0;n${tc[r][n]}`);else s.append(`
              ${t("wiki_tech_empty")}
              `)}function D_(a,r,i,s){let n=E_(s);if(Object.keys(r.reqs).length>0){let c={},o={};if(Object.keys(r.reqs).forEach(function(l){let u=e.tech[l]&&e.tech[l]>=r.reqs[l]?"success":"danger",d=l+r.reqs[l];n[l]&&n[l][r.reqs[l]]?(c[d]=[],n[l][r.reqs[l]].forEach(function(p){c[d].push({name:p.name,title:p.title,era:p.era,color:u})})):rc[d]&&(o[d]={title:rc[d].title,link:rc[d].link,color:u})}),Object.keys(c).length>0){let l=!1,u=$(`
              ${t("wiki_tech_req_tech")}
              `);a.append(u),Object.keys(c).forEach(function(d){let h="",p=!1,f=!1;c[d].forEach(function(g){let w=`${g.title}`;f=g.color,p?h=t("wiki_tech_req_or",[h,w]):(p=!0,h=w)}),u.append(`${l?", ":""}${h}`),l=!0})}if(Object.keys(o).length>0){let l=!1,u=$(`
              ${t("wiki_tech_req_other")}
              `);a.append(u),Object.keys(o).forEach(function(d){let h=o[d].link;h&&s==="truepath"&&(h=h.replace("-structures-","-tp_structures-"));let p=h?`${o[d].title}`:o[d].title;u.append(`${l?", ":""}${p}`),l=!0})}}if(Vo.hasOwnProperty(i)){let c=!1,o=$(`
              ${t("wiki_tech_req_special")}
              `),l=!1;Vo[i].forEach(function(u){if(u.truepath&&s!=="truepath")return;l=!0;let d=!1,h=!1,p="";u.subreqs.forEach(function(f){let g="",w=!1,v=!1;switch(u.category){case"species":g=t(`race_${f.name}`),w=`wiki.html#races-species-${f.name}`,v=e.race.species===f.name;break;case"genus":g=t(`genelab_genus_${f.name}`),v=x[e.race.species].type===f.name;break;case"trait":g=t(`trait_${f.name}_name`),w=`wiki.html#traits-species-${b[f.name].type}_${f.name}`,v=e.race[f.name];break;case"tech":g=typeof q.tech[f.name].title=="string"?q.tech[f.name].title:q.tech[f.name].title(),w=`wiki.html#${q.tech[f.name].era}-tech-${f.name}`,v=e.tech[f.tree]&&e.genes[f.tree]>=f.val;break;case"universe":g=t(`universe_${f.name}`),w=`wiki.html#universes-gameplay-${f.name}`,v=e.race.universe===f.name;break;case"crispr":g=t(`arpa_genepool_${f.name}_title`),w=`wiki.html#crispr-prestige-${f.name}`,v=e.genes[f.tree]&&e.genes[f.tree]>=f.val;break;case"achieve":g=f.val+` ${Zt("star")} `+t(`achieve_${f.name}_name`),w=`wiki.html#perks-prestige-${f.name}`,v=e.stats.achieve[f.name]&&e.stats.achieve[f.name].l>=f.val;break;case"government":g=t(`govern_${f.name}`),w=`wiki.html#government-gameplay-${f.name}`,v=e.civic.govern&&e.civic.govern.type&&e.civic.govern.type===f.name;break;case"scenario":g=t(`wiki_challenges_scenarios_${f.name}`),w=`wiki.html#challenges-gameplay-scenarios_${f.name}`,v=e.race[f.name];break;case"challenge":g=t(`wiki_challenges_modes_${f.name}`),w=`wiki.html#challenges-gameplay-modes_${f.name}`,v=e.race[f.name];break;case"unique":g=f.title,w=f.link,v=f.color;break}w&&s==="truepath"&&(w=w.replace("-tech-","-tp_tech-")),h=h||v,u.not&&(v=!v),v=v?"success":"danger",w?g=`${g}`:g=`${g}`,d?p=t("wiki_tech_req_or",[p,g]):(d=!0,p=g)}),u.not&&(h=!h),h=h?"success":"danger",u.category!=="unique"&&(p=t(`wiki_tech_special_${u.category}${u.not?"_not":""}`,[p])),o.append(`${c?", ":""}${p}`),c=!0}),l&&a.append(o)}}var B_={solar:"interstellar"},Wo={interstellar:"solar"};function Ue(a,r){let i=M("create"),s=[],n=[],c=r==="truepath"?Jo:Qo,o=r==="truepath"?"tp_tech":"tech";if(Object.keys(c).forEach(function(l){let u=c[l];if(u.hasOwnProperty("era")&&(u.era===a||u.era===B_[a])&&(!u.hasOwnProperty("wiki")||u.wiki)){let d=c[l].id.split("-"),h=$(`
              `);if(qa(h,u),L_(h,l,r),D_(h,u,l,r),u.cost.Knowledge)if(s.length===0)s[0]=[u,h];else{let p=u.cost.Knowledge(),f=s.length-1;for(;f>=0&&s[f][0].cost.Knowledge()>p;)s[f+1]=s[f],f--;s[f+1]=[u,h]}else n.push([u,h])}}),n.length>0)for(let l=0;l - `;i.append(s),C({el:"#filtering",methods:{universeSwap(o){Cr(o,r)},filterSwap(o){Cr(a,o)}}});let n=le(a||"standard"),c={};Object.keys(ze).forEach(function(o){if(!a||!Zo[o]||Zo[o].indexOf(a)>-1){if(r==="missing"&&e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>0||r==="obtained"&&!(e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>0)||r==="incomplete"&&a&&e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>4||r==="completed"&&a&&!(e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>4))return;if((r==="incomplete"||r==="completed")&&!a){let l=ze[o].type==="universe"?10:30;if(o==="whitehole"&&(l=5),e.stats.achieve[o]&&Object.keys(e.stats.achieve[o]).forEach(u=>l-=e.stats.achieve[o][u]),r==="incomplete"&&l<=0||r==="completed"&&l>0)return}c.hasOwnProperty(ze[o].type)?c[ze[o].type].push(o):c[ze[o].type]=[o]}}),Object.keys(c).forEach(function(o){i.append($(`

              ${t(`wiki_achieve_${o}`)}

              `));let l=$('
              ');i.append(l),c[o].forEach(function(u){let d=$('
              ');l.append(d);let h=e.stats.achieve[u]&&e.stats.achieve[u][n]&&e.stats.achieve[u][n]>0?"warning":"fade";d.append(`${ze[u].name}`);let p=Ne(u,16,!1,!1,a);d.append(`${p}`),K_(u,h==="warning",a)})})}function Ni(){let a=$("#content");A(a);let r=$('
              ');a.append(r),Object.keys(Yt).forEach(function(i){let s=$('
              ');r.append(s);let n=e.stats.feat[i]&&e.stats.feat[i]>0?"warning":"fade",c=Mr(i,"feat"),o=e.stats.feat[i]>1?`

              ${Zt(c)}

              `:"";s.append(`${Yt[i].name}${o}`),G_(i,n==="warning")})}function K_(a,r,i){let s=le(i||"standard"),n=r?`
              ${ze[a].flair}
              `:"";if(a==="mass_extinction"||a==="vigilante"){let c='
              ';Object.keys(x).sort(function(o,l){return x[o].hasOwnProperty("name")&&x[l].hasOwnProperty("name")?x[o].name.localeCompare(x[l].name):0}).forEach(function(o){o!=="protoplasm"&&(o!=="custom"||o==="custom"&&e.stats.achieve.ascended)&&(e.stats.achieve[`extinct_${o}`]&&(a==="mass_extinction"?e.stats.achieve[`extinct_${o}`][s]>=0:e.stats.achieve[`extinct_${o}`].hasOwnProperty("e")&&e.stats.achieve[`extinct_${o}`].e>=0)?c=c+`${x[o].name}`:c=c+`${x[o].name}`)}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`),{wide:!0})}else if(a==="explorer"){let c='
              ';Object.keys(he).sort((o,l)=>he[o].label.localeCompare(he[l].label)).forEach(function(o){(!i||o!=="hellscape"&&o!=="eden"||o==="hellscape"&&i!=="evil"||o==="eden"&&i==="evil")&&(e.stats.achieve[`biome_${o}`]&&e.stats.achieve[`biome_${o}`][s]>=0?c=c+`${he[o].label}`:c=c+`${he[o].label}`)}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="creator"||a==="heavyweight"){let c='
              ';Object.keys(vt).sort().forEach(function(o){let l=["carnivore","herbivore","omnivore"].includes(o)?t(`evo_${o}_title`):t(`genelab_genus_${o}`);(a==="creator"?e.stats.achieve[`genus_${o}`]&&e.stats.achieve[`genus_${o}`][s]>=0:e.stats.achieve[`genus_${o}`]&&e.stats.achieve[`genus_${o}`].h>=0)?c=c+`${l}`:c=c+`${l}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="enlightenment"){let c={};e.pillars&&Object.keys(e.pillars).forEach(function(l){x[l]&&(!c[x[l].type]||e.pillars[l]>c[x[l].type])&&(c[x[l].type]=e.pillars[l])});let o='
              ';Object.keys(vt).sort().forEach(function(l){let u=["carnivore","herbivore","omnivore"].includes(l)?t(`evo_${l}_title`):t(`genelab_genus_${l}`);c[l]&&c[l]>=1?o=o+`${u}`:o=o+`${u}`}),o=o+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${o}${n}`))}else if(a==="gladiator"){let c='
              ',o={};e.stats.spire&&Object.keys(e.stats.spire).forEach(function(l){(!i||s===l)&&Object.keys(e.stats.spire[l]).forEach(function(u){jt[u]&&(!o.hasOwnProperty(u)||o[u]0?c=c+`${t(`portal_mech_boss_${l}`)}`:c=c+`${t(`portal_mech_boss_${l}`)}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`),{wide:!0})}else if(a==="banana"){let c='
              ';c=c+`
              ${t("wiki_achieve_banana1")}
              `,c=c+`
              ${t("wiki_achieve_banana2")}
              `,c=c+`
              ${t("wiki_achieve_banana3")}
              `,c=c+`
              ${t("wiki_achieve_banana4",[500])}
              `,c=c+`
              ${t("wiki_achieve_banana5",[50])}
              `,c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="endless_hunger"){let c='
              ';c=c+`
              ${t("wiki_achieve_endless_hunger1")}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger2")}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger3",[80])}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger4",[1200])}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger5")}
              `,c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="pathfinder"){let c='
              ';["ashanddust","exodus","obsolete","bluepill","retired"].forEach(function(o){let l=t(`achieve_${o}_name`);e.stats.achieve[o]&&e.stats.achieve[o][s]>=5?c=c+`${l}`:c=c+`${l}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="overlord"){let c='
              ',o={subjugate:"lord",contact:"friend",introduced:"god"},l=le(i||"standard");Object.keys(o).forEach(function(u){e.stats.womling[o[u]]&&e.stats.womling[o[u]][l]>0?c=c+`${t(`wiki_achieve_overlord_${u}`)}`:c=c+`${t(`wiki_achieve_overlord_${u}`)}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a.includes("extinct_")&&a.substring(8)!=="custom"){let c=a.substring(8);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_extinct_race",[t(`race_${c}`)])}
              ${n}`))}else if(a.includes("genus_")){let c=a.substring(6);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_genus_type",[t(`genelab_genus_${c}`)])}
              ${n}`))}else if(a.includes("biome_")||a.includes("atmo_")){let c=a.substring(a.indexOf("_")+1);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_planet_type",[a.substring(0,1)==="b"?t(`biome_${c}_name`):t(`planet_${c}`)])}
              ${n}`))}else{let c=Xo[a]?t(`wiki_achieve_${a}`,Xo[a]):t(`wiki_achieve_${a}`);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${c}
              ${n}`))}}function G_(a,r){let i=r?`
              ${Yt[a].flair}
              `:"";if(a==="egghunt"){let n=new Date().getFullYear(),c=`
              ${t("wiki_feat_egghunt_found")}
              `;for(let o=1;o<=18;o++){let l=e.special.egg[n][`egg${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_egghunt_num",[o])}`}c=c+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${c}${i}`))}else if(a==="trickortreat"){let n=new Date().getFullYear(),c=`
              ${t("wiki_feat_trickortreat_found")}
              `;for(let o=1;o<=7;o++){let l=e.special.trick[n][`treat${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_treat_num",[o])}`}for(let o=1;o<=7;o++){let l=e.special.trick[n][`trick${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_trick_num",[o])}`}c=c+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${c}${i}`))}else if(a==="equilibrium"){let s={};e.pillars&&Object.keys(e.pillars).forEach(function(c){x[c]&&(s[c]=e.pillars[c])});let n='
              ';Object.keys(x).sort(function(c,o){return x[c].hasOwnProperty("name")&&x[o].hasOwnProperty("name")?(x[c].name||"Zombie").localeCompare(x[o].name):0}).forEach(function(c){c!=="protoplasm"&&(c!=="custom"||c==="custom"&&e.stats.achieve.ascended)&&(s[c]&&s[c]>=1?n=n+`${x[c].name}`:n=n+`${x[c].name}`)}),n=n+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${n}${i}`),{wide:!0})}else B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${i}`))}function ni(a){y(a,{name:"start",template:"basics",paragraphs:2,h_level:2}),y(a,{name:"prehistoric",template:"basics",paragraphs:14,break:[2,6,13],h_level:2,para_data:{3:[t("resource_RNA_name"),t("resource_DNA_name")],4:[t("evo_organelles_title"),t("resource_RNA_name"),t("evo_nucleus_title"),t("resource_DNA_name")],5:[t("evo_membrane_title"),t("evo_eukaryotic_title"),t("evo_mitochondria_title")],7:[t("genelab_genus")],8:[3],13:[t("evo_sentience_title")]},data_link:{7:["wiki.html#races-species"]}}),y(a,{name:"civilization",template:"basics",paragraphs:14,break:[2,8,13],h_level:2,para_data:{3:[t("tab_civics")],4:[t("resource_Food_name"),t("job_farmer"),t("job_hunter")],5:["*"],8:[t("resource_Food_name")],9:[t("resource_Food_name"),t("hunger")],10:[t("resource_Food_name")],11:[t("resource_Food_name")],12:[t("resource_Food_name")],13:[t("resource_Knowledge_name")],14:[t("resource_Knowledge_name"),t("city_university")]}}),y(a,{name:"government",template:"basics",paragraphs:8,break:[4],h_level:2,para_data:{1:[t("tech_government"),t("tab_civics"),t("govern_anarchy")],2:[t("tech_government"),t("govern_anarchy")],3:[t("tech_government")],4:[t("morale")],5:[t("morale")],6:[t("morale"),t("job_entertainer"),t("morale_stress")],7:[t("morale_tax"),t("morale")],8:[25,100]}}),y(a,{name:"mad",template:"basics",paragraphs:4,h_level:2,para_data:{1:[t("wiki_resets_mad")],2:[t("wiki_basics_mad_reset"),t("tab_civics"),t("tab_military")],3:[t("tab_space")]},data_link:{2:["wiki.html#resets-prestige"]}})}function js(a){let r=M("create",a);y(r,{name:"save",template:"mechanics",label:t("wiki_mechanics_save"),paragraphs:8,break:[3,5],h_level:2,para_data:{1:["~5"],3:[t("wiki_mechanics_save_export")],4:[t("export")],5:[t("restore")],8:[t("restore")]}}),M("add","mechanics-gameplay","save",t("wiki_mechanics_save")),y(r,{name:"atime",template:"mechanics",label:t("wiki_mechanics_atime"),paragraphs:6,break:[4,6],h_level:2,para_data:{1:[t("wiki_mechanics_atime")],2:[2,t("wiki_mechanics_atime")],3:["2x",t("wiki_mechanics_atime")],4:[t("wiki_mechanics_atime"),8],5:[12,8,t("wiki_mechanics_atime")],6:[t("wiki_mechanics_atime")]}}),M("add","mechanics-gameplay","atime",t("wiki_mechanics_atime")),y(r,{name:"spack",template:"mechanics",label:t("wiki_mechanics_spack"),paragraphs:10,break:[4,6,7,8,9,10],h_level:2,para_data:{1:["UTF-8","JSON",".txt"],4:[`${t("wiki_mechanics_spack_para4_note")}`],6:[t("resource_Food_name"),t("wiki_mechanics_spack_para6_note1"),t("city_biolab"),t("wiki_mechanics_spack_para6_note2")]}}),M("add","mechanics-gameplay","spack",t("wiki_mechanics_spack")),y(r,{name:"job",template:"mechanics",label:t("wiki_mechanics_job"),paragraphs:9,break:[5],h_level:2,para_data:{1:[t("wiki_mechanics_job")],2:["*"],3:[t("wiki_mechanics_job")]}}),M("add","mechanics-gameplay","job",t("wiki_mechanics_job"));{let i=y(r,{name:"job_stress",template:"mechanics",label:t("wiki_mechanics_job_stress"),paragraphs:7,break:[3,5,6,7],h_level:2,para_data:{2:[t("job_unemployed"),t("trait_content_name")],3:[t("wiki_calc_job_stress_divisor"),1],4:[t("trait_freespirit_name"),t("trait_content_name"),t("planet_mellow")],6:[t("trait_optimistic_name"),t("trait_pessimistic_name"),t("morale_stress"),t("morale")],7:[t("civics_garrison_annex")]},data_link:{2:[!1,"wiki.html#traits-species-minor_content"],4:["wiki.html#traits-species-major_freespirit","wiki.html#traits-species-minor_content","wiki.html#planets-gameplay-mellow"],6:["wiki.html#traits-species-major_optimistic","wiki.html#traits-species-major_pessimistic"]}}),s=ne(i,"mechanics","job_stress",t("wiki_mechanics_job_stress"));N_(s),M("add","mechanics-gameplay","job_stress",t("wiki_mechanics_job_stress"))}y(r,{name:"multiplier",template:"mechanics",label:t("wiki_mechanics_multiplier"),paragraphs:5,break:[4],h_level:2,para_data:{1:[t("wiki_mechanics_multiplier")],2:["10x",e.settings.keyMap.x10,"25x",e.settings.keyMap.x25,"100x",e.settings.keyMap.x100],4:[t("wiki_mechanics_multiplier")],5:[t("wiki_mechanics_multiplier")]},data_color:{2:["warning","caution","warning","caution","warning","caution"]}}),M("add","mechanics-gameplay","multiplier",t("wiki_mechanics_multiplier")),y(r,{name:"cost_creep",template:"mechanics",label:t("wiki_mechanics_cost_creep"),paragraphs:7,break:[4,7],h_level:2,para_data:{2:[t("resource_Lumber_name"),200,1.3,"200*1.3=260","200*1.3^2=338"],3:[t("wiki_menu_arpa")],5:[t("tech_steel_beams"),t("trait_large_name"),t("tab_arpa_crispr"),t("wiki_arpa_crispr_creep")],6:[t("trait_creative_name"),t("wiki_menu_arpa")],7:[1.005]},data_link:{3:["wiki.html#projects-arpa"],5:["wiki.html#discovery-tech-steel_beams","wiki.html#traits-species-genus_large",!1,"wiki.html#crispr-prestige-genetic_memory"],6:["wiki.html#traits-species-major_creative"]}}),M("add","mechanics-gameplay","cost_creep",t("wiki_mechanics_cost_creep")),y(r,{name:"queue",template:"mechanics",label:t("wiki_mechanics_queue"),paragraphs:13,break:[4,6,9,10,11,13],h_level:2,para_data:{1:[t("wiki_mechanics_queue"),t("tech_urban_planning")],2:[t("building_queue")],4:[t("wiki_mechanics_queue_research"),t("tech_assistant")],7:[t("q_key"),e.settings.keyMap.q],8:[t("q_key")],10:[t("q_any")],12:[t("q_merge")]},data_color:{7:["warning","caution"]}}),M("add","mechanics-gameplay","queue",t("wiki_mechanics_queue"));{let i=y(r,{name:"multipliers",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:1,h_level:2});y(i,{name:"multipliers_prod",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:4,break:[3,4],h_level:!1,para_data:{3:[t("wiki_mechanics_multipliers_struct"),t("wiki_mechanics_multipliers_bonus")]}}).append('
              '),y(i,{name:"multipliers_dis",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:7,break:[3,4],h_level:!1,para_data:{3:[t("wiki_mechanics_multipliers_base"),t("wiki_mechanics_multipliers_discount"),t("wiki_mechanics_multipliers_struct")],5:[t("city_mass_driver")],6:[100,t("city_mass_driver"),"5%",95,35.84],7:[100,.95,20,35.84]},data_link:{5:["wiki.html#planetary-structures-mass_driver"]}}),i.append(`
              ${t("wiki_mechanics_multipliers_exception")}
              `),M("add","mechanics-gameplay","multipliers",t("wiki_mechanics_multipliers"))}y(r,{name:"blocking",template:"mechanics",label:t("wiki_mechanics_blocking"),paragraphs:6,break:[4,6],h_level:2,para_data:{2:[t("color_red")],3:[t("color_orange")],5:[t("color_red")]},data_color:{2:["danger"],3:["caution"],5:["danger"]}}).append('
              '),M("add","mechanics-gameplay","blocking",t("wiki_mechanics_blocking")),y(r,{name:"astro",template:"mechanics",label:t("wiki_mechanics_astro"),paragraphs:15,break:[3,4,5,6,7,8,9,10,11,12,13,14,15],h_level:2,para_data:{2:[12],3:[t("sign_aries"),t("sign_aries_symbol"),zt("aries")[0]+"%"],4:[t("sign_taurus"),t("sign_taurus_symbol"),zt("taurus")[0]+"%"],5:[t("sign_gemini"),t("sign_gemini_symbol"),zt("gemini")[0]+"%"],6:[t("sign_cancer"),t("sign_cancer_symbol"),zt("cancer")[0]],7:[t("sign_leo"),t("sign_leo_symbol"),zt("leo")[0]+"%"],8:[t("sign_virgo"),t("sign_virgo_symbol"),zt("virgo")[0]+"%"],9:[t("sign_libra"),t("sign_libra_symbol"),zt("libra")[0]+"%"],10:[t("sign_scorpio"),t("sign_scorpio_symbol"),zt("scorpio")[0]+"%"],11:[t("sign_sagittarius"),t("sign_sagittarius_symbol"),zt("sagittarius")[0]+"%"],12:[t("sign_capricorn"),t("sign_capricorn_symbol"),zt("capricorn")[0]+"%"],13:[t("sign_aquarius"),t("sign_aquarius_symbol"),zt("aquarius")[0]+"%"],14:[t("sign_pisces"),t("sign_pisces_symbol")],15:[t(`sign_${xr()}`)]},data_color:{3:["warning","caution","warning"],4:["warning","caution","warning"],5:["warning","caution","warning"],6:["warning","caution","warning"],7:["warning","caution","warning"],8:["warning","caution","warning"],9:["warning","caution","warning"],10:["warning","caution","warning"],11:["warning","caution","warning"],12:["warning","caution","warning"],13:["warning","caution","warning"],14:["warning","caution"],15:["caution"]}}),M("add","mechanics-gameplay","astro",t("wiki_mechanics_astro")),y(r,{name:"bank_vault",template:"mechanics",label:t("wiki_mechanics_bank_vault"),paragraphs:2,h_level:2,para_data:{1:[t("city_bank"),t("interstellar_exchange_title"),t("portal_arcology_title"),t("resource_Money_name"),t("wiki_mechanics_bank_vault"),t("space_red_spaceport_title"),t("wiki_challenges_scenarios_cataclysm")],2:[t("resource_Money_name"),t("city_bank"),t("tech_adamantite_vault"),t("governor_entrepreneur"),t("trait_paranoid_name"),t("tech_stock_market"),t("tech_unification"),t("wiki_challenges_modes_inflation")]},data_link:{1:["wiki.html#planetary-structures-bank","wiki.html#interstellar-structures-exchange","wiki.html#hell-structures-arcology",!1,!1,"wiki.html#space-structures-spaceport","wiki.html#challenges-gameplay-scenarios_cataclysm"],2:[!1,!1,"wiki.html#interstellar-tech-adamantite_vault","wiki.html#governor-gameplay-entrepreneur","wiki.html#traits-species-major_paranoid","wiki.html#projects-arpa-stock_exchange","wiki.html#early_space-tech-unification2","wiki.html#challenges-gameplay-modes_inflation"]}}),M("add","mechanics-gameplay","bank_vault",t("wiki_mechanics_bank_vault")),y(r,{name:"homeless",template:"mechanics",label:t("wiki_mechanics_homeless"),paragraphs:4,break:[3],h_level:2,para_data:{3:[t("arpa_projects_railway_title")]},data_link:{3:["wiki.html#projects-arpa-railway"]}}),M("add","mechanics-gameplay","homeless",t("wiki_mechanics_homeless"));{let i=y(r,{name:"warmonger",template:"mechanics",label:t("wiki_mechanics_warmonger"),paragraphs:8,break:[4],h_level:2,para_data:{2:[t("trait_immoral_name")],3:[t("govern_autocracy"),t("trait_blood_thirst_name")],4:[t("wiki_calc_warmonger_fatigue"),t("wiki_calc_warmonger_protest")],5:[t("achieve_warmonger_name")],6:[t("wiki_calc_warmonger_fatigue"),1,t("wiki_calc_warmonger_protest")],7:[t("wiki_calc_warmonger_fatigue"),t("wiki_calc_warmonger_protest"),1,0],8:[`log2(${t("wiki_calc_warmonger_fatigue")} + ${t("wiki_calc_warmonger_protest")})`]},data_link:{2:["wiki.html#traits-species-genus_immoral"],3:["wiki.html#government-gameplay-autocracy","wiki.html#traits-species-major_blood_thirst"]}}),s=ne(i,"mechanics","warmonger",t("wiki_mechanics_warmonger"));R_(s),M("add","mechanics-gameplay","warmonger",t("wiki_mechanics_warmonger"))}{let i=y(r,{name:"spy",template:"mechanics",label:t("wiki_mechanics_spy"),paragraphs:9,break:[3,4,5,6,7,9],h_level:2,para_data:{1:[t("tech_spy")],4:[1,t("civics_gov_relations"),t("civics_gov_mil_rate")],5:[2,t("civics_gov_mil_rate"),t("civics_gov_eco_rate")],6:[3,t("civics_gov_eco_rate"),t("civics_gov_unrest")],7:[4,t("civics_gov_unrest")],8:[4],9:[t("tech_espionage")]},data_link:{1:["wiki.html#civilized-tech-spy"],9:["wiki.html#civilized-tech-espionage"]}}),s=ne(i,"mechanics","spy_cost");H_(s),M("add","mechanics-gameplay","spy",t("wiki_mechanics_spy"))}{let i=y(r,{name:"occupying",template:"mechanics",label:t("wiki_mechanics_occupying"),paragraphs:20,break:[3,8,12,16,18,19,20],h_level:2,para_data:{1:[t("civics_foreign"),t("civics_garrison_tactic_siege"),t("civics_spy_annex"),t("civics_spy_purchase")],2:["+5%","+8%",t("govern_federation")],3:[t("civics_garrison_tactic_siege"),20],5:[t("civics_garrison"),t("civics_garrison_tactic_siege")],6:[t("civics_garrison_unoccupy"),t("tech_unification")],7:[t("govern_federation"),15],8:["50%",t("civics_gov_relations"),"50%",t("civics_gov_unrest"),`(300 - ${t("civics_gov_relations")} - ${t("civics_gov_unrest")})`,t("morale")],9:["50%",t("civics_gov_relations"),"50%",t("civics_gov_unrest"),t("civics_spy_annex")],10:[t("morale"),t("civics_spy_annex")],11:[t("morale_stress"),"1.1x",t("govern_federation")],12:[t("resource_Money_name")],13:[3,t("tech_spy"),t("civics_spy_purchase")],14:[t("wiki_mechanics_occupying_para14_note1",[t("civics_gov_eco_rate"),t("civics_gov_relations"),t("civics_gov_unrest")]),t("resource_Money_name"),t("civics_spy_purchase")],15:[t("civics_garrison_purchase"),t("resource_Money_name"),t("morale_tax"),"20%",t("govern_federation")],16:[t("tech_unification")],17:[t("civics_garrison_occupy")],18:[t("achieve_world_domination_name")],19:[t("achieve_illuminati_name")],20:[t("achieve_syndicate_name")]},data_link:{2:[!1,!1,"wiki.html#government-gameplay-federation"],6:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#government-gameplay-federation"],11:[!1,!1,"wiki.html#government-gameplay-federation"],15:[!1,!1,!1,!1,"wiki.html#government-gameplay-federation"],16:["wiki.html#early_space-tech-unification2"]}}),s=ne(i,"mechanics","occupation");V_(s),M("add","mechanics-gameplay","occupying",t("wiki_mechanics_occupying"))}y(r,{name:"religion",template:"mechanics",label:t("wiki_mechanics_religion"),paragraphs:20,break:[3,6,8,15,20],h_level:2,para_data:{1:[t("wiki_mechanics_religion")],3:[t("city_temple")],4:[t("city_temple"),t("resource_Plasmid_plural_name")],5:[t("evo_challenge_plasmid"),t("faith")],6:[t("tech_fanaticism"),t("tech_anthropology")],8:[t("tech_fanaticism"),t("tech_indoctrination"),t("tech_missionary"),t("tech_zealotry")],9:[t("tech_fanaticism")],10:[t("wiki_menu_species")],11:[5],12:[t("tech_indoctrination")],13:[t("tech_missionary")],14:[t("tech_zealotry")],15:[t("tech_anthropology"),t("tech_mythology"),t("tech_archaeology"),t("tech_merchandising")],16:[t("tech_anthropology")],17:[t("tech_mythology")],18:[t("tech_archaeology")],19:[t("tech_merchandising")],20:[t("tab_arpa_crispr"),t("wiki_arpa_crispr_transcendence")]},data_link:{10:["wiki.html#races-species"],20:["wiki.html#crispr-prestige","wiki.html#crispr-prestige-transcendence"]}}),M("add","mechanics-gameplay","religion",t("wiki_mechanics_religion"));{let i=`${Zt("star")}`,s=`${Zt("star")}`,n=`${Zt("star")}`,c=`${Zt("star")}`;y(r,{name:"challenge",template:"mechanics",label:t("wiki_mechanics_challenge"),paragraphs:15,break:[4,8,14],h_level:2,para_data:{1:[t("wiki_mechanics_challenge"),t("wiki_menu_prehistoric"),t("tab_arpa_crispr"),t("arpa_genepool_hardened_genes_title")],2:[4,t("evo_challenge_plasmid"),t("evo_challenge_trade"),t("evo_challenge_craft"),t("evo_challenge_crispr")],4:[t("evo_challenge_plasmid"),t("resource_Plasmid_plural_name")],5:[t("evo_challenge_trade")],6:[t("evo_challenge_craft")],7:[t("evo_challenge_crispr"),t("wiki_arpa_crispr_creep"),"20%"],8:[t("wiki_mechanics_challenge")],9:[1,i,t("plain"),"5%"],10:[2,s,t("bronze"),"12%"],11:[3,n,t("silver"),"25%"],12:[4,c,t("gold"),"45%"],14:[t("wiki_mechanics_challenge"),i]},data_color:{2:["caution","warning","warning","warning","warning"],7:["warning","warning","caution"],9:["caution",!1,"warning","warning"],10:["caution",!1,"warning","warning"],11:["caution",!1,"warning","warning"],12:["caution",!1,"warning","warning"]},data_link:{1:[!1,!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-hardened_genes"],7:[!1,"wiki.html#crispr-prestige-genetic_memory",!1]}}),M("add","mechanics-gameplay","challenge",t("wiki_mechanics_challenge"))}y(r,{name:"mastery",template:"mechanics",label:t("mastery"),paragraphs:15,break:[3,8,10,13],h_level:2,para_data:{1:[t("mastery"),t("tab_arpa_crispr"),t("arpa_genepool_unlocked_title")],2:[t("mastery"),t("tab_achieve")],4:["0.15%","0.10%"],5:[1],6:[1,5],7:["1.25%"],9:[t("standard"),"0.25%"],10:[t("arpa_genepool_universal_title"),t("arpa_genepool_standard_title")],11:[t("arpa_genepool_universal_title"),"0.05%","0.10%","0.15%"],12:["0.30%","1.50%"],13:[t("arpa_genepool_standard_title"),"0.05%"],15:[t("arpa_genepool_standard_title"),"0.20%","0.10%"]},data_color:{4:["caution","caution"],5:["caution"],6:["caution","caution"],7:["caution"],9:[!1,"caution"],11:["warning","caution","caution","caution"],12:["caution","caution"],13:["warning","caution"],15:["warning","caution","caution"]},data_link:{1:[!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-unlocked"],9:["wiki.html#universes-gameplay"],10:["wiki.html#crispr-prestige-universal","wiki.html#crispr-prestige-standard"]}}),M("add","mechanics-gameplay","mastery",t("mastery"));{let i=y(r,{name:"genome_decay",template:"mechanics",label:t("wiki_mechanics_genome_decay"),paragraphs:4,break:[3],h_level:2,para_data:{1:[t("wiki_mechanics_genome_decay_para1_note1",[t("wiki_calc_g_decay_mutations")]),t("wiki_mechanics_genome_decay")],2:["2-3"],3:[t("wiki_mechanics_genome_decay"),t("resource_Plasmid_name"),"+0%"],4:[t("tech_genetic_decay"),t("trait_fortify_name"),t("wiki_mechanics_genome_decay"),t("resource_Plasmid_name"),"+0%"]},data_link:{4:["wiki.html#early_space-tech-genetic_decay","wiki.html#traits-species-special_fortify"]}}),s=ne(i,"mechanics","g_decay",t("wiki_mechanics_genome_decay"));U_(s),M("add","mechanics-gameplay","genome_decay",t("wiki_mechanics_genome_decay"))}{let i=y(r,{name:"crispr_mutation",template:"mechanics",label:t("wiki_mechanics_crispr_mutation"),paragraphs:5,break:[3],h_level:2,para_data:{1:[t("tab_arpa_crispr"),t("arpa_genepool_mutation_title"),t("resource_Plasmid_plural_name")],3:[t("tech_arpa"),t("tab_arpa_genetics")],4:["5x",t("wiki_mechanics_crispr_mutation_para4_note1")],5:[t("wiki_mechanics_custom"),t("race_sludge"),"10x"]},data_link:{1:[!1,"wiki.html#crispr-prestige-mutation","wiki.html#resources-prestige-plasmids"],4:[!1,"wiki.html#traits-species"],5:["wiki.html#custom-species","wiki.html#races-species-sludge"]}});M("add","mechanics-gameplay","crispr_mutation",t("wiki_mechanics_crispr_mutation"))}{let i=y(r,{name:"planet",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});y(r,{name:"geology",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},i),y(r,{name:"seeother",template:"planet",label:t("wiki_menu_planets"),paragraphs:1,h_level:2,para_data:{1:[t("wiki_menu_planets")]},data_link:{1:["wiki.html#planets-gameplay"]}},i),M("add","mechanics-gameplay","planet",t("wiki_menu_planets"))}y(r,{name:"soul_gem",template:"hell",label:t("wiki_hell_soul_gem"),paragraphs:4,h_level:2,para_data:{1:[t("wiki_hell_soul_gem"),t("tab_portal")],3:[t("tech_demon_attractor")]}}),M("add","mechanics-gameplay","soul_gem",t("wiki_hell_soul_gem"));{let i=y(r,{name:"quantum",template:"mechanics",label:t("wiki_mechanics_quantum"),paragraphs:4,h_level:2,para_data:{1:[t("wiki_mechanics_quantum")],2:[t("tech_quantum_computing")],4:[t("interstellar_citadel_title")]},data_link:{2:["wiki.html#deep_space-tech-quantum_computing"],4:["wiki.html#interstellar-structures-citadel"]}}),s=ne(i,"mechanics","quantum_level",t("wiki_mechanics_quantum"));W_(s),M("add","mechanics-gameplay","quantum",t("wiki_mechanics_quantum")),y(i,{name:"quantum_swarm_ai",template:"mechanics",label:t("tech_swarm_control_ai"),paragraphs:2,h_level:2,para_data:{1:[t("tech_quantum_computing"),t("space_sun_swarm_satellite_title"),t("space_sun_swarm_control_title")],2:[t("space_sun_swarm_control_title"),11,t("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#deep_space-tech-swarm_control_ai","wiki.html#space-structures-swarm_satellite","wiki.html#space-structures-swarm_control"]}}),y(i,{name:"quantum_swarm",template:"mechanics",label:t("tech_quantum_swarm"),paragraphs:3,h_level:2,para_data:{1:[t("tech_quantum_swarm"),t("space_hell_swarm_plant_title")],2:["1%"],3:["95%"]},data_link:{1:["wiki.html#deep_space-tech-quantum_swarm","wiki.html#space-structures-swarm_plant"]}}),y(i,{name:"quantum_manufacture",template:"mechanics",label:t("tech_quantum_manufacturing"),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[t("tech_quantum_manufacturing"),t("city_factory"),t("wiki_mechanics_quantum")],2:[t("modal_factory_lux")],3:[t("resource_Furs_name"),"(Q Level - 1) * 12.5"],4:["(Q Level - 1) * 50"]},data_link:{1:["wiki.html#deep_space-tech-quantum_manufacturing","wiki.html#planetary-structures-factory",!1]}}),y(i,{name:"quantum_cement_processing",template:"mechanics",label:t("tech_cement_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[t("tech_cement_processing"),t("interstellar_citadel_title")],2:["(Q Level / 1.75) %"]},data_link:{1:["wiki.html#interstellar-tech-cement_processing","wiki.html#interstellar-structures-citadel"]}}),y(i,{name:"quantum_graph_processing",template:"mechanics",label:t("tech_graphene_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[t("tech_graphene_processing"),t("interstellar_citadel_title")],2:["(Q Level / 5) %"]},data_link:{1:["wiki.html#intergalactic-tech-graphene_processing","wiki.html#interstellar-structures-citadel"]}}),y(i,{name:"quantum_ai_logistics",template:"mechanics",label:t("tech_ai_logistics"),paragraphs:3,break:[3],h_level:2,para_data:{1:[t("tech_ai_logistics"),t("interstellar_cargo_yard_title"),t("city_shed_title3")],2:[t("city_shed_title3")],3:[t("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#interstellar-tech-ai_logistics","wiki.html#interstellar-structures-cargo_yard","wiki.html#interstellar-structures-warehouse"]}}),y(i,{name:"quantum_arcology",template:"mechanics",label:t("portal_arcology_title"),paragraphs:1,h_level:2,para_data:{1:[t("portal_arcology_title"),10]},data_link:{1:["wiki.html#hell-structures-arcology",!1]}})}{let i=y(r,{name:"mass",template:"mechanics",label:t("wiki_mechanics_mass"),paragraphs:11,break:[5,9],h_level:2,para_data:{1:[t("tab_interstellar")],2:[t("tech_mass_ejector"),t("interstellar_mass_ejector"),t("tab_ejector")],4:[1e10.toLocaleString()],5:[t("universe_magic"),t("resource_Infernite_name"),t("resource_Elerium_name")],6:[.025,t("tech_stabilize_blackhole"),t("tech_exotic_infusion")],7:[t("tech_stabilize_blackhole"),0,40,t("tech_exotic_infusion"),t("wiki_resets_blackhole")],8:[t("tech_stabilize_blackhole"),.025],9:[t("interstellar_stellar_engine"),20,8],10:[1,7.5,t("interstellar_stellar_engine"),13.5,t("tech_gravity_convection")],11:[10]},data_link:{2:["wiki.html#interstellar-tech-mass_ejector","wiki.html#interstellar-structures-mass_ejector"],6:[!1,"wiki.html#interstellar-tech-stabilize_blackhole","wiki.html#interstellar-tech-infusion_confirm"],7:["wiki.html#interstellar-tech-stabilize_blackhole",!1,!1,"wiki.html#interstellar-tech-infusion_confirm","wiki.html#resets-prestige-blackhole"],8:["wiki.html#interstellar-tech-stabilize_blackhole"],9:["wiki.html#interstellar-structures-stellar_engine"],10:[!1,!1,"wiki.html#interstellar-structures-stellar_engine",!1,"wiki.html#interstellar-tech-gravity_convection"]}}),s=ne(i,"eject","mass");Q_(s),M("add","mechanics-gameplay","mass",t("wiki_mechanics_mass"))}{let i=y(r,{name:"piracy",template:"mechanics",label:t("galaxy_piracy"),paragraphs:6,break:[4],h_level:2,para_data:{1:[t("galaxy_piracy"),t("wiki_menu_intergalactic")],2:[t("galaxy_embassy")],4:[t("tab_galactic"),t("galaxy_piracy"),t("galaxy_stargate")],5:[t("interstellar_stargate")]}});y(r,{name:"pirate_ramp",template:"mechanics",label:t("galaxy_piracy"),paragraphs:3,h_level:2,para_data:{1:[t("galaxy_stargate"),t("galaxy_gateway")],2:[t("tab_galactic")],3:[t("galaxy_embassy"),t("tech_xeno_gift"),t("galaxy_alien2_mission",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])]}},i),y(r,{name:"pirate_threat",template:"mechanics",label:t("galaxy_piracy"),paragraphs:7,break:[2,3,4,5,6,7],h_level:2,para_data:{1:[t("galaxy_armada")],2:[t("galaxy_gateway"),100,250,500],3:[t("galaxy_stargate"),100,250,500],4:[t("galaxy_gorddon"),800],5:[t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home]),1e3],6:[t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red]),2500],7:[t("galaxy_chthonian"),7500]},data_color:{2:["caution","warning","warning","warning"],3:["caution","warning","warning","warning"],4:["caution","warning"],5:["caution","warning"],6:["caution","warning"],7:["caution","warning"]}},i),M("add","mechanics-gameplay","piracy",t("galaxy_piracy"))}{let i=y(r,{name:"custom",template:"mechanics",label:t("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],h_level:2,para_data:{1:[t("wiki_resets_ascension")],2:[t("wiki_resets_ascension")],5:[t("resource_Genes_name")],6:[t("resource_Genes_name")],7:[2],8:[t("achieve_technophobe_name"),5,7],9:[t("tech_fanaticism"),t("tech_deify")],11:[0,t("resource_Genes_name")],12:[t("resource_Genes_name"),t("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[e.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}}),s=ne(i,"mechanics","untapped",t("trait_untapped_name"));J_(s),M("add","mechanics-gameplay","custom",t("wiki_mechanics_custom"))}{let i=y(r,{name:"pillar",template:"hell",label:t("wiki_mechanics_pillar"),paragraphs:5,h_level:2,para_data:{1:[t("portal_ruins_name")],2:["1%",t("harmonic")],3:["3%"],4:[t("harmonic"),"2%","6%"],5:[t("wiki_hell_pillar_para5d1"),12]},data_link:{5:["wiki.html#hell-structures-west_tower"]}});y(r,{name:"pillar",template:"mechanics",label:t("wiki_mechanics_pillar"),paragraphs:10,break:[4,6,8],h_level:2,para_data:{1:[t("tech_pillars"),t("resource_Harmony_name"),t("resource_Scarletite_name")],2:[t("resource_Scarletite_name"),1e6.toLocaleString(),125e3.toLocaleString()],3:[t("universe_micro")],4:[t("evo_challenge_genes"),t("harmonic")],5:[t("tech_scarletite"),t("evo_challenge_genes")],6:[t("achieve_resonance_name")],7:[t("achieve_resonance_name"),t("tech_scarletite")],8:[t("race_junker"),t("wiki_mechanics_custom"),t("achieve_enlightenment_name"),t("race_sludge")],9:[t("wiki_mechanics_custom")],10:[t("race_junker"),t("genelab_genus_humanoid"),t("race_sludge")]},data_link:{1:["wiki.html#dimensional-tech-pillars"],3:["wiki.html#universes-gameplay-micro"],5:["wiki.html#dimensional-tech-scarletite"],7:[!1,"wiki.html#dimensional-tech-scarletite"],8:["wiki.html#races-species-junker","wiki.html#mechanics-gameplay-custom",!1,"wiki.html#races-species-sludge"],9:["wiki.html#mechanics-gameplay-custom"],10:["wiki.html#races-species-junker",!1,"wiki.html#races-species-sludge"]}},i),M("add","mechanics-gameplay","pillar",t("wiki_mechanics_pillar"))}{let i=y(r,{name:"dlord",template:"mechanics",label:t("wiki_mechanics_dlord"),paragraphs:5,h_level:2,para_data:{1:[t("portal_waygate_title")],2:[t("resource_Demonic_Essence_name"),t("wiki_resets_infusion")],3:[t("wiki_resets_infusion"),"+1"],4:["+25%",t("wiki_resets_infusion")],5:[t("tech_dark_bomb"),t("wiki_resets_infusion")]},data_link:{1:["wiki.html#hell-structures-waygate"],2:[!1,"wiki.html#resets-prestige-infusion"],3:["wiki.html#resets-prestige-infusion"],4:[!1,"wiki.html#resets-prestige-infusion"],5:["wiki.html#dimensional-tech-dark_bomb","wiki.html#resets-prestige-infusion"]}});i.append(` + `;i.append(s),C({el:"#filtering",methods:{universeSwap(o){Cr(o,r)},filterSwap(o){Cr(a,o)}}});let n=ue(a||"standard"),c={};Object.keys(ze).forEach(function(o){if(!a||!Zo[o]||Zo[o].indexOf(a)>-1){if(r==="missing"&&e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>0||r==="obtained"&&!(e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>0)||r==="incomplete"&&a&&e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>4||r==="completed"&&a&&!(e.stats.achieve[o]&&e.stats.achieve[o][n]&&e.stats.achieve[o][n]>4))return;if((r==="incomplete"||r==="completed")&&!a){let l=ze[o].type==="universe"?10:30;if(o==="whitehole"&&(l=5),e.stats.achieve[o]&&Object.keys(e.stats.achieve[o]).forEach(u=>l-=e.stats.achieve[o][u]),r==="incomplete"&&l<=0||r==="completed"&&l>0)return}c.hasOwnProperty(ze[o].type)?c[ze[o].type].push(o):c[ze[o].type]=[o]}}),Object.keys(c).forEach(function(o){i.append($(`

              ${t(`wiki_achieve_${o}`)}

              `));let l=$('
              ');i.append(l),c[o].forEach(function(u){let d=$('
              ');l.append(d);let h=e.stats.achieve[u]&&e.stats.achieve[u][n]&&e.stats.achieve[u][n]>0?"warning":"fade";d.append(`${ze[u].name}`);let p=Ne(u,16,!1,!1,a);d.append(`${p}`),K_(u,h==="warning",a)})})}function Ni(){let a=$("#content");A(a);let r=$('
              ');a.append(r),Object.keys(Yt).forEach(function(i){let s=$('
              ');r.append(s);let n=e.stats.feat[i]&&e.stats.feat[i]>0?"warning":"fade",c=Mr(i,"feat"),o=e.stats.feat[i]>1?`

              ${Zt(c)}

              `:"";s.append(`${Yt[i].name}${o}`),G_(i,n==="warning")})}function K_(a,r,i){let s=ue(i||"standard"),n=r?`
              ${ze[a].flair}
              `:"";if(a==="mass_extinction"||a==="vigilante"){let c='
              ';Object.keys(x).sort(function(o,l){return x[o].hasOwnProperty("name")&&x[l].hasOwnProperty("name")?x[o].name.localeCompare(x[l].name):0}).forEach(function(o){o!=="protoplasm"&&(o!=="custom"||o==="custom"&&e.stats.achieve.ascended)&&(e.stats.achieve[`extinct_${o}`]&&(a==="mass_extinction"?e.stats.achieve[`extinct_${o}`][s]>=0:e.stats.achieve[`extinct_${o}`].hasOwnProperty("e")&&e.stats.achieve[`extinct_${o}`].e>=0)?c=c+`${x[o].name}`:c=c+`${x[o].name}`)}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`),{wide:!0})}else if(a==="explorer"){let c='
              ';Object.keys(he).sort((o,l)=>he[o].label.localeCompare(he[l].label)).forEach(function(o){(!i||o!=="hellscape"&&o!=="eden"||o==="hellscape"&&i!=="evil"||o==="eden"&&i==="evil")&&(e.stats.achieve[`biome_${o}`]&&e.stats.achieve[`biome_${o}`][s]>=0?c=c+`${he[o].label}`:c=c+`${he[o].label}`)}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="creator"||a==="heavyweight"){let c='
              ';Object.keys(vt).sort().forEach(function(o){let l=["carnivore","herbivore","omnivore"].includes(o)?t(`evo_${o}_title`):t(`genelab_genus_${o}`);(a==="creator"?e.stats.achieve[`genus_${o}`]&&e.stats.achieve[`genus_${o}`][s]>=0:e.stats.achieve[`genus_${o}`]&&e.stats.achieve[`genus_${o}`].h>=0)?c=c+`${l}`:c=c+`${l}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="enlightenment"){let c={};e.pillars&&Object.keys(e.pillars).forEach(function(l){x[l]&&(!c[x[l].type]||e.pillars[l]>c[x[l].type])&&(c[x[l].type]=e.pillars[l])});let o='
              ';Object.keys(vt).sort().forEach(function(l){let u=["carnivore","herbivore","omnivore"].includes(l)?t(`evo_${l}_title`):t(`genelab_genus_${l}`);c[l]&&c[l]>=1?o=o+`${u}`:o=o+`${u}`}),o=o+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${o}${n}`))}else if(a==="gladiator"){let c='
              ',o={};e.stats.spire&&Object.keys(e.stats.spire).forEach(function(l){(!i||s===l)&&Object.keys(e.stats.spire[l]).forEach(function(u){jt[u]&&(!o.hasOwnProperty(u)||o[u]0?c=c+`${t(`portal_mech_boss_${l}`)}`:c=c+`${t(`portal_mech_boss_${l}`)}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`),{wide:!0})}else if(a==="banana"){let c='
              ';c=c+`
              ${t("wiki_achieve_banana1")}
              `,c=c+`
              ${t("wiki_achieve_banana2")}
              `,c=c+`
              ${t("wiki_achieve_banana3")}
              `,c=c+`
              ${t("wiki_achieve_banana4",[500])}
              `,c=c+`
              ${t("wiki_achieve_banana5",[50])}
              `,c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="endless_hunger"){let c='
              ';c=c+`
              ${t("wiki_achieve_endless_hunger1")}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger2")}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger3",[80])}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger4",[1200])}
              `,c=c+`
              ${t("wiki_achieve_endless_hunger5")}
              `,c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="pathfinder"){let c='
              ';["ashanddust","exodus","obsolete","bluepill","retired"].forEach(function(o){let l=t(`achieve_${o}_name`);e.stats.achieve[o]&&e.stats.achieve[o][s]>=5?c=c+`${l}`:c=c+`${l}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a==="overlord"){let c='
              ',o={subjugate:"lord",contact:"friend",introduced:"god"},l=ue(i||"standard");Object.keys(o).forEach(function(u){e.stats.womling[o[u]]&&e.stats.womling[o[u]][l]>0?c=c+`${t(`wiki_achieve_overlord_${u}`)}`:c=c+`${t(`wiki_achieve_overlord_${u}`)}`}),c=c+"
              ",B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t(`wiki_achieve_${a}`)}
              ${c}${n}`))}else if(a.includes("extinct_")&&a.substring(8)!=="custom"){let c=a.substring(8);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_extinct_race",[t(`race_${c}`)])}
              ${n}`))}else if(a.includes("genus_")){let c=a.substring(6);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_genus_type",[t(`genelab_genus_${c}`)])}
              ${n}`))}else if(a.includes("biome_")||a.includes("atmo_")){let c=a.substring(a.indexOf("_")+1);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${t("wiki_achieve_planet_type",[a.substring(0,1)==="b"?t(`biome_${c}_name`):t(`planet_${c}`)])}
              ${n}`))}else{let c=Xo[a]?t(`wiki_achieve_${a}`,Xo[a]):t(`wiki_achieve_${a}`);B(`a-${a}`,$(`
              ${ze[a].desc}
              ${c}
              ${n}`))}}function G_(a,r){let i=r?`
              ${Yt[a].flair}
              `:"";if(a==="egghunt"){let n=new Date().getFullYear(),c=`
              ${t("wiki_feat_egghunt_found")}
              `;for(let o=1;o<=18;o++){let l=e.special.egg[n][`egg${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_egghunt_num",[o])}`}c=c+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${c}${i}`))}else if(a==="trickortreat"){let n=new Date().getFullYear(),c=`
              ${t("wiki_feat_trickortreat_found")}
              `;for(let o=1;o<=7;o++){let l=e.special.trick[n][`treat${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_treat_num",[o])}`}for(let o=1;o<=7;o++){let l=e.special.trick[n][`trick${o}`]?"has-text-success":"has-text-danger";c=c+`${t("wiki_feat_trick_num",[o])}`}c=c+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${c}${i}`))}else if(a==="equilibrium"){let s={};e.pillars&&Object.keys(e.pillars).forEach(function(c){x[c]&&(s[c]=e.pillars[c])});let n='
              ';Object.keys(x).sort(function(c,o){return x[c].hasOwnProperty("name")&&x[o].hasOwnProperty("name")?(x[c].name||"Zombie").localeCompare(x[o].name):0}).forEach(function(c){c!=="protoplasm"&&(c!=="custom"||c==="custom"&&e.stats.achieve.ascended)&&(s[c]&&s[c]>=1?n=n+`${x[c].name}`:n=n+`${x[c].name}`)}),n=n+"
              ",B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${n}${i}`),{wide:!0})}else B(`f-${a}`,$(`
              ${Yt[a].desc}
              ${t(`wiki_feat_${a}`)}
              ${i}`))}function ni(a){y(a,{name:"start",template:"basics",paragraphs:2,h_level:2}),y(a,{name:"prehistoric",template:"basics",paragraphs:14,break:[2,6,13],h_level:2,para_data:{3:[t("resource_RNA_name"),t("resource_DNA_name")],4:[t("evo_organelles_title"),t("resource_RNA_name"),t("evo_nucleus_title"),t("resource_DNA_name")],5:[t("evo_membrane_title"),t("evo_eukaryotic_title"),t("evo_mitochondria_title")],7:[t("genelab_genus")],8:[3],13:[t("evo_sentience_title")]},data_link:{7:["wiki.html#races-species"]}}),y(a,{name:"civilization",template:"basics",paragraphs:14,break:[2,8,13],h_level:2,para_data:{3:[t("tab_civics")],4:[t("resource_Food_name"),t("job_farmer"),t("job_hunter")],5:["*"],8:[t("resource_Food_name")],9:[t("resource_Food_name"),t("hunger")],10:[t("resource_Food_name")],11:[t("resource_Food_name")],12:[t("resource_Food_name")],13:[t("resource_Knowledge_name")],14:[t("resource_Knowledge_name"),t("city_university")]}}),y(a,{name:"government",template:"basics",paragraphs:8,break:[4],h_level:2,para_data:{1:[t("tech_government"),t("tab_civics"),t("govern_anarchy")],2:[t("tech_government"),t("govern_anarchy")],3:[t("tech_government")],4:[t("morale")],5:[t("morale")],6:[t("morale"),t("job_entertainer"),t("morale_stress")],7:[t("morale_tax"),t("morale")],8:[25,100]}}),y(a,{name:"mad",template:"basics",paragraphs:4,h_level:2,para_data:{1:[t("wiki_resets_mad")],2:[t("wiki_basics_mad_reset"),t("tab_civics"),t("tab_military")],3:[t("tab_space")]},data_link:{2:["wiki.html#resets-prestige"]}})}function js(a){let r=M("create",a);y(r,{name:"save",template:"mechanics",label:t("wiki_mechanics_save"),paragraphs:8,break:[3,5],h_level:2,para_data:{1:["~5"],3:[t("wiki_mechanics_save_export")],4:[t("export")],5:[t("restore")],8:[t("restore")]}}),M("add","mechanics-gameplay","save",t("wiki_mechanics_save")),y(r,{name:"atime",template:"mechanics",label:t("wiki_mechanics_atime"),paragraphs:6,break:[4,6],h_level:2,para_data:{1:[t("wiki_mechanics_atime")],2:[2,t("wiki_mechanics_atime")],3:["2x",t("wiki_mechanics_atime")],4:[t("wiki_mechanics_atime"),8],5:[12,8,t("wiki_mechanics_atime")],6:[t("wiki_mechanics_atime")]}}),M("add","mechanics-gameplay","atime",t("wiki_mechanics_atime")),y(r,{name:"spack",template:"mechanics",label:t("wiki_mechanics_spack"),paragraphs:10,break:[4,6,7,8,9,10],h_level:2,para_data:{1:["UTF-8","JSON",".txt"],4:[`${t("wiki_mechanics_spack_para4_note")}`],6:[t("resource_Food_name"),t("wiki_mechanics_spack_para6_note1"),t("city_biolab"),t("wiki_mechanics_spack_para6_note2")]}}),M("add","mechanics-gameplay","spack",t("wiki_mechanics_spack")),y(r,{name:"job",template:"mechanics",label:t("wiki_mechanics_job"),paragraphs:9,break:[5],h_level:2,para_data:{1:[t("wiki_mechanics_job")],2:["*"],3:[t("wiki_mechanics_job")]}}),M("add","mechanics-gameplay","job",t("wiki_mechanics_job"));{let i=y(r,{name:"job_stress",template:"mechanics",label:t("wiki_mechanics_job_stress"),paragraphs:7,break:[3,5,6,7],h_level:2,para_data:{2:[t("job_unemployed"),t("trait_content_name")],3:[t("wiki_calc_job_stress_divisor"),1],4:[t("trait_freespirit_name"),t("trait_content_name"),t("planet_mellow")],6:[t("trait_optimistic_name"),t("trait_pessimistic_name"),t("morale_stress"),t("morale")],7:[t("civics_garrison_annex")]},data_link:{2:[!1,"wiki.html#traits-species-minor_content"],4:["wiki.html#traits-species-major_freespirit","wiki.html#traits-species-minor_content","wiki.html#planets-gameplay-mellow"],6:["wiki.html#traits-species-major_optimistic","wiki.html#traits-species-major_pessimistic"]}}),s=ne(i,"mechanics","job_stress",t("wiki_mechanics_job_stress"));N_(s),M("add","mechanics-gameplay","job_stress",t("wiki_mechanics_job_stress"))}y(r,{name:"multiplier",template:"mechanics",label:t("wiki_mechanics_multiplier"),paragraphs:5,break:[4],h_level:2,para_data:{1:[t("wiki_mechanics_multiplier")],2:["10x",e.settings.keyMap.x10,"25x",e.settings.keyMap.x25,"100x",e.settings.keyMap.x100],4:[t("wiki_mechanics_multiplier")],5:[t("wiki_mechanics_multiplier")]},data_color:{2:["warning","caution","warning","caution","warning","caution"]}}),M("add","mechanics-gameplay","multiplier",t("wiki_mechanics_multiplier")),y(r,{name:"cost_creep",template:"mechanics",label:t("wiki_mechanics_cost_creep"),paragraphs:7,break:[4,7],h_level:2,para_data:{2:[t("resource_Lumber_name"),200,1.3,"200*1.3=260","200*1.3^2=338"],3:[t("wiki_menu_arpa")],5:[t("tech_steel_beams"),t("trait_large_name"),t("tab_arpa_crispr"),t("wiki_arpa_crispr_creep")],6:[t("trait_creative_name"),t("wiki_menu_arpa")],7:[1.005]},data_link:{3:["wiki.html#projects-arpa"],5:["wiki.html#discovery-tech-steel_beams","wiki.html#traits-species-genus_large",!1,"wiki.html#crispr-prestige-genetic_memory"],6:["wiki.html#traits-species-major_creative"]}}),M("add","mechanics-gameplay","cost_creep",t("wiki_mechanics_cost_creep")),y(r,{name:"queue",template:"mechanics",label:t("wiki_mechanics_queue"),paragraphs:13,break:[4,6,9,10,11,13],h_level:2,para_data:{1:[t("wiki_mechanics_queue"),t("tech_urban_planning")],2:[t("building_queue")],4:[t("wiki_mechanics_queue_research"),t("tech_assistant")],7:[t("q_key"),e.settings.keyMap.q],8:[t("q_key")],10:[t("q_any")],12:[t("q_merge")]},data_color:{7:["warning","caution"]}}),M("add","mechanics-gameplay","queue",t("wiki_mechanics_queue"));{let i=y(r,{name:"multipliers",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:1,h_level:2});y(i,{name:"multipliers_prod",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:4,break:[3,4],h_level:!1,para_data:{3:[t("wiki_mechanics_multipliers_struct"),t("wiki_mechanics_multipliers_bonus")]}}).append('
              '),y(i,{name:"multipliers_dis",template:"mechanics",label:t("wiki_mechanics_multipliers"),paragraphs:7,break:[3,4],h_level:!1,para_data:{3:[t("wiki_mechanics_multipliers_base"),t("wiki_mechanics_multipliers_discount"),t("wiki_mechanics_multipliers_struct")],5:[t("city_mass_driver")],6:[100,t("city_mass_driver"),"5%",95,35.84],7:[100,.95,20,35.84]},data_link:{5:["wiki.html#planetary-structures-mass_driver"]}}),i.append(`
              ${t("wiki_mechanics_multipliers_exception")}
              `),M("add","mechanics-gameplay","multipliers",t("wiki_mechanics_multipliers"))}y(r,{name:"blocking",template:"mechanics",label:t("wiki_mechanics_blocking"),paragraphs:6,break:[4,6],h_level:2,para_data:{2:[t("color_red")],3:[t("color_orange")],5:[t("color_red")]},data_color:{2:["danger"],3:["caution"],5:["danger"]}}).append('
              '),M("add","mechanics-gameplay","blocking",t("wiki_mechanics_blocking")),y(r,{name:"astro",template:"mechanics",label:t("wiki_mechanics_astro"),paragraphs:15,break:[3,4,5,6,7,8,9,10,11,12,13,14,15],h_level:2,para_data:{2:[12],3:[t("sign_aries"),t("sign_aries_symbol"),zt("aries")[0]+"%"],4:[t("sign_taurus"),t("sign_taurus_symbol"),zt("taurus")[0]+"%"],5:[t("sign_gemini"),t("sign_gemini_symbol"),zt("gemini")[0]+"%"],6:[t("sign_cancer"),t("sign_cancer_symbol"),zt("cancer")[0]],7:[t("sign_leo"),t("sign_leo_symbol"),zt("leo")[0]+"%"],8:[t("sign_virgo"),t("sign_virgo_symbol"),zt("virgo")[0]+"%"],9:[t("sign_libra"),t("sign_libra_symbol"),zt("libra")[0]+"%"],10:[t("sign_scorpio"),t("sign_scorpio_symbol"),zt("scorpio")[0]+"%"],11:[t("sign_sagittarius"),t("sign_sagittarius_symbol"),zt("sagittarius")[0]+"%"],12:[t("sign_capricorn"),t("sign_capricorn_symbol"),zt("capricorn")[0]+"%"],13:[t("sign_aquarius"),t("sign_aquarius_symbol"),zt("aquarius")[0]+"%"],14:[t("sign_pisces"),t("sign_pisces_symbol")],15:[t(`sign_${xr()}`)]},data_color:{3:["warning","caution","warning"],4:["warning","caution","warning"],5:["warning","caution","warning"],6:["warning","caution","warning"],7:["warning","caution","warning"],8:["warning","caution","warning"],9:["warning","caution","warning"],10:["warning","caution","warning"],11:["warning","caution","warning"],12:["warning","caution","warning"],13:["warning","caution","warning"],14:["warning","caution"],15:["caution"]}}),M("add","mechanics-gameplay","astro",t("wiki_mechanics_astro")),y(r,{name:"bank_vault",template:"mechanics",label:t("wiki_mechanics_bank_vault"),paragraphs:2,h_level:2,para_data:{1:[t("city_bank"),t("interstellar_exchange_title"),t("portal_arcology_title"),t("resource_Money_name"),t("wiki_mechanics_bank_vault"),t("space_red_spaceport_title"),t("wiki_challenges_scenarios_cataclysm")],2:[t("resource_Money_name"),t("city_bank"),t("tech_adamantite_vault"),t("governor_entrepreneur"),t("trait_paranoid_name"),t("tech_stock_market"),t("tech_unification"),t("wiki_challenges_modes_inflation")]},data_link:{1:["wiki.html#planetary-structures-bank","wiki.html#interstellar-structures-exchange","wiki.html#hell-structures-arcology",!1,!1,"wiki.html#space-structures-spaceport","wiki.html#challenges-gameplay-scenarios_cataclysm"],2:[!1,!1,"wiki.html#interstellar-tech-adamantite_vault","wiki.html#governor-gameplay-entrepreneur","wiki.html#traits-species-major_paranoid","wiki.html#projects-arpa-stock_exchange","wiki.html#early_space-tech-unification2","wiki.html#challenges-gameplay-modes_inflation"]}}),M("add","mechanics-gameplay","bank_vault",t("wiki_mechanics_bank_vault")),y(r,{name:"homeless",template:"mechanics",label:t("wiki_mechanics_homeless"),paragraphs:4,break:[3],h_level:2,para_data:{3:[t("arpa_projects_railway_title")]},data_link:{3:["wiki.html#projects-arpa-railway"]}}),M("add","mechanics-gameplay","homeless",t("wiki_mechanics_homeless"));{let i=y(r,{name:"warmonger",template:"mechanics",label:t("wiki_mechanics_warmonger"),paragraphs:8,break:[4],h_level:2,para_data:{2:[t("trait_immoral_name")],3:[t("govern_autocracy"),t("trait_blood_thirst_name")],4:[t("wiki_calc_warmonger_fatigue"),t("wiki_calc_warmonger_protest")],5:[t("achieve_warmonger_name")],6:[t("wiki_calc_warmonger_fatigue"),1,t("wiki_calc_warmonger_protest")],7:[t("wiki_calc_warmonger_fatigue"),t("wiki_calc_warmonger_protest"),1,0],8:[`log2(${t("wiki_calc_warmonger_fatigue")} + ${t("wiki_calc_warmonger_protest")})`]},data_link:{2:["wiki.html#traits-species-genus_immoral"],3:["wiki.html#government-gameplay-autocracy","wiki.html#traits-species-major_blood_thirst"]}}),s=ne(i,"mechanics","warmonger",t("wiki_mechanics_warmonger"));R_(s),M("add","mechanics-gameplay","warmonger",t("wiki_mechanics_warmonger"))}{let i=y(r,{name:"spy",template:"mechanics",label:t("wiki_mechanics_spy"),paragraphs:9,break:[3,4,5,6,7,9],h_level:2,para_data:{1:[t("tech_spy")],4:[1,t("civics_gov_relations"),t("civics_gov_mil_rate")],5:[2,t("civics_gov_mil_rate"),t("civics_gov_eco_rate")],6:[3,t("civics_gov_eco_rate"),t("civics_gov_unrest")],7:[4,t("civics_gov_unrest")],8:[4],9:[t("tech_espionage")]},data_link:{1:["wiki.html#civilized-tech-spy"],9:["wiki.html#civilized-tech-espionage"]}}),s=ne(i,"mechanics","spy_cost");H_(s),M("add","mechanics-gameplay","spy",t("wiki_mechanics_spy"))}{let i=y(r,{name:"occupying",template:"mechanics",label:t("wiki_mechanics_occupying"),paragraphs:20,break:[3,8,12,16,18,19,20],h_level:2,para_data:{1:[t("civics_foreign"),t("civics_garrison_tactic_siege"),t("civics_spy_annex"),t("civics_spy_purchase")],2:["+5%","+8%",t("govern_federation")],3:[t("civics_garrison_tactic_siege"),20],5:[t("civics_garrison"),t("civics_garrison_tactic_siege")],6:[t("civics_garrison_unoccupy"),t("tech_unification")],7:[t("govern_federation"),15],8:["50%",t("civics_gov_relations"),"50%",t("civics_gov_unrest"),`(300 - ${t("civics_gov_relations")} - ${t("civics_gov_unrest")})`,t("morale")],9:["50%",t("civics_gov_relations"),"50%",t("civics_gov_unrest"),t("civics_spy_annex")],10:[t("morale"),t("civics_spy_annex")],11:[t("morale_stress"),"1.1x",t("govern_federation")],12:[t("resource_Money_name")],13:[3,t("tech_spy"),t("civics_spy_purchase")],14:[t("wiki_mechanics_occupying_para14_note1",[t("civics_gov_eco_rate"),t("civics_gov_relations"),t("civics_gov_unrest")]),t("resource_Money_name"),t("civics_spy_purchase")],15:[t("civics_garrison_purchase"),t("resource_Money_name"),t("morale_tax"),"20%",t("govern_federation")],16:[t("tech_unification")],17:[t("civics_garrison_occupy")],18:[t("achieve_world_domination_name")],19:[t("achieve_illuminati_name")],20:[t("achieve_syndicate_name")]},data_link:{2:[!1,!1,"wiki.html#government-gameplay-federation"],6:[!1,"wiki.html#early_space-tech-unification2"],7:["wiki.html#government-gameplay-federation"],11:[!1,!1,"wiki.html#government-gameplay-federation"],15:[!1,!1,!1,!1,"wiki.html#government-gameplay-federation"],16:["wiki.html#early_space-tech-unification2"]}}),s=ne(i,"mechanics","occupation");V_(s),M("add","mechanics-gameplay","occupying",t("wiki_mechanics_occupying"))}y(r,{name:"religion",template:"mechanics",label:t("wiki_mechanics_religion"),paragraphs:20,break:[3,6,8,15,20],h_level:2,para_data:{1:[t("wiki_mechanics_religion")],3:[t("city_temple")],4:[t("city_temple"),t("resource_Plasmid_plural_name")],5:[t("evo_challenge_plasmid"),t("faith")],6:[t("tech_fanaticism"),t("tech_anthropology")],8:[t("tech_fanaticism"),t("tech_indoctrination"),t("tech_missionary"),t("tech_zealotry")],9:[t("tech_fanaticism")],10:[t("wiki_menu_species")],11:[5],12:[t("tech_indoctrination")],13:[t("tech_missionary")],14:[t("tech_zealotry")],15:[t("tech_anthropology"),t("tech_mythology"),t("tech_archaeology"),t("tech_merchandising")],16:[t("tech_anthropology")],17:[t("tech_mythology")],18:[t("tech_archaeology")],19:[t("tech_merchandising")],20:[t("tab_arpa_crispr"),t("wiki_arpa_crispr_transcendence")]},data_link:{10:["wiki.html#races-species"],20:["wiki.html#crispr-prestige","wiki.html#crispr-prestige-transcendence"]}}),M("add","mechanics-gameplay","religion",t("wiki_mechanics_religion"));{let i=`${Zt("star")}`,s=`${Zt("star")}`,n=`${Zt("star")}`,c=`${Zt("star")}`;y(r,{name:"challenge",template:"mechanics",label:t("wiki_mechanics_challenge"),paragraphs:15,break:[4,8,14],h_level:2,para_data:{1:[t("wiki_mechanics_challenge"),t("wiki_menu_prehistoric"),t("tab_arpa_crispr"),t("arpa_genepool_hardened_genes_title")],2:[4,t("evo_challenge_plasmid"),t("evo_challenge_trade"),t("evo_challenge_craft"),t("evo_challenge_crispr")],4:[t("evo_challenge_plasmid"),t("resource_Plasmid_plural_name")],5:[t("evo_challenge_trade")],6:[t("evo_challenge_craft")],7:[t("evo_challenge_crispr"),t("wiki_arpa_crispr_creep"),"20%"],8:[t("wiki_mechanics_challenge")],9:[1,i,t("plain"),"5%"],10:[2,s,t("bronze"),"12%"],11:[3,n,t("silver"),"25%"],12:[4,c,t("gold"),"45%"],14:[t("wiki_mechanics_challenge"),i]},data_color:{2:["caution","warning","warning","warning","warning"],7:["warning","warning","caution"],9:["caution",!1,"warning","warning"],10:["caution",!1,"warning","warning"],11:["caution",!1,"warning","warning"],12:["caution",!1,"warning","warning"]},data_link:{1:[!1,!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-hardened_genes"],7:[!1,"wiki.html#crispr-prestige-genetic_memory",!1]}}),M("add","mechanics-gameplay","challenge",t("wiki_mechanics_challenge"))}y(r,{name:"mastery",template:"mechanics",label:t("mastery"),paragraphs:15,break:[3,8,10,13],h_level:2,para_data:{1:[t("mastery"),t("tab_arpa_crispr"),t("arpa_genepool_unlocked_title")],2:[t("mastery"),t("tab_achieve")],4:["0.15%","0.10%"],5:[1],6:[1,5],7:["1.25%"],9:[t("standard"),"0.25%"],10:[t("arpa_genepool_universal_title"),t("arpa_genepool_standard_title")],11:[t("arpa_genepool_universal_title"),"0.05%","0.10%","0.15%"],12:["0.30%","1.50%"],13:[t("arpa_genepool_standard_title"),"0.05%"],15:[t("arpa_genepool_standard_title"),"0.20%","0.10%"]},data_color:{4:["caution","caution"],5:["caution"],6:["caution","caution"],7:["caution"],9:[!1,"caution"],11:["warning","caution","caution","caution"],12:["caution","caution"],13:["warning","caution"],15:["warning","caution","caution"]},data_link:{1:[!1,"wiki.html#crispr-prestige","wiki.html#crispr-prestige-unlocked"],9:["wiki.html#universes-gameplay"],10:["wiki.html#crispr-prestige-universal","wiki.html#crispr-prestige-standard"]}}),M("add","mechanics-gameplay","mastery",t("mastery"));{let i=y(r,{name:"genome_decay",template:"mechanics",label:t("wiki_mechanics_genome_decay"),paragraphs:4,break:[3],h_level:2,para_data:{1:[t("wiki_mechanics_genome_decay_para1_note1",[t("wiki_calc_g_decay_mutations")]),t("wiki_mechanics_genome_decay")],2:["2-3"],3:[t("wiki_mechanics_genome_decay"),t("resource_Plasmid_name"),"+0%"],4:[t("tech_genetic_decay"),t("trait_fortify_name"),t("wiki_mechanics_genome_decay"),t("resource_Plasmid_name"),"+0%"]},data_link:{4:["wiki.html#early_space-tech-genetic_decay","wiki.html#traits-species-special_fortify"]}}),s=ne(i,"mechanics","g_decay",t("wiki_mechanics_genome_decay"));U_(s),M("add","mechanics-gameplay","genome_decay",t("wiki_mechanics_genome_decay"))}{let i=y(r,{name:"crispr_mutation",template:"mechanics",label:t("wiki_mechanics_crispr_mutation"),paragraphs:5,break:[3],h_level:2,para_data:{1:[t("tab_arpa_crispr"),t("arpa_genepool_mutation_title"),t("resource_Plasmid_plural_name")],3:[t("tech_arpa"),t("tab_arpa_genetics")],4:["5x",t("wiki_mechanics_crispr_mutation_para4_note1")],5:[t("wiki_mechanics_custom"),t("race_sludge"),"10x"]},data_link:{1:[!1,"wiki.html#crispr-prestige-mutation","wiki.html#resources-prestige-plasmids"],4:[!1,"wiki.html#traits-species"],5:["wiki.html#custom-species","wiki.html#races-species-sludge"]}});M("add","mechanics-gameplay","crispr_mutation",t("wiki_mechanics_crispr_mutation"))}{let i=y(r,{name:"planet",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[365,"25%"],3:[4],4:["200-600"]}});y(r,{name:"geology",template:"planet",label:t("wiki_menu_planets"),paragraphs:4,h_level:2,para_data:{2:[2],3:["-10%","+19%"],4:[7,"+44%"]}},i),y(r,{name:"seeother",template:"planet",label:t("wiki_menu_planets"),paragraphs:1,h_level:2,para_data:{1:[t("wiki_menu_planets")]},data_link:{1:["wiki.html#planets-gameplay"]}},i),M("add","mechanics-gameplay","planet",t("wiki_menu_planets"))}y(r,{name:"soul_gem",template:"hell",label:t("wiki_hell_soul_gem"),paragraphs:4,h_level:2,para_data:{1:[t("wiki_hell_soul_gem"),t("tab_portal")],3:[t("tech_demon_attractor")]}}),M("add","mechanics-gameplay","soul_gem",t("wiki_hell_soul_gem"));{let i=y(r,{name:"quantum",template:"mechanics",label:t("wiki_mechanics_quantum"),paragraphs:4,h_level:2,para_data:{1:[t("wiki_mechanics_quantum")],2:[t("tech_quantum_computing")],4:[t("interstellar_citadel_title")]},data_link:{2:["wiki.html#deep_space-tech-quantum_computing"],4:["wiki.html#interstellar-structures-citadel"]}}),s=ne(i,"mechanics","quantum_level",t("wiki_mechanics_quantum"));W_(s),M("add","mechanics-gameplay","quantum",t("wiki_mechanics_quantum")),y(i,{name:"quantum_swarm_ai",template:"mechanics",label:t("tech_swarm_control_ai"),paragraphs:2,h_level:2,para_data:{1:[t("tech_quantum_computing"),t("space_sun_swarm_satellite_title"),t("space_sun_swarm_control_title")],2:[t("space_sun_swarm_control_title"),11,t("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#deep_space-tech-swarm_control_ai","wiki.html#space-structures-swarm_satellite","wiki.html#space-structures-swarm_control"]}}),y(i,{name:"quantum_swarm",template:"mechanics",label:t("tech_quantum_swarm"),paragraphs:3,h_level:2,para_data:{1:[t("tech_quantum_swarm"),t("space_hell_swarm_plant_title")],2:["1%"],3:["95%"]},data_link:{1:["wiki.html#deep_space-tech-quantum_swarm","wiki.html#space-structures-swarm_plant"]}}),y(i,{name:"quantum_manufacture",template:"mechanics",label:t("tech_quantum_manufacturing"),paragraphs:4,break:[2,3,4],h_level:2,para_data:{1:[t("tech_quantum_manufacturing"),t("city_factory"),t("wiki_mechanics_quantum")],2:[t("modal_factory_lux")],3:[t("resource_Furs_name"),"(Q Level - 1) * 12.5"],4:["(Q Level - 1) * 50"]},data_link:{1:["wiki.html#deep_space-tech-quantum_manufacturing","wiki.html#planetary-structures-factory",!1]}}),y(i,{name:"quantum_cement_processing",template:"mechanics",label:t("tech_cement_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[t("tech_cement_processing"),t("interstellar_citadel_title")],2:["(Q Level / 1.75) %"]},data_link:{1:["wiki.html#interstellar-tech-cement_processing","wiki.html#interstellar-structures-citadel"]}}),y(i,{name:"quantum_graph_processing",template:"mechanics",label:t("tech_graphene_processing"),paragraphs:2,break:[2],h_level:2,para_data:{1:[t("tech_graphene_processing"),t("interstellar_citadel_title")],2:["(Q Level / 5) %"]},data_link:{1:["wiki.html#intergalactic-tech-graphene_processing","wiki.html#interstellar-structures-citadel"]}}),y(i,{name:"quantum_ai_logistics",template:"mechanics",label:t("tech_ai_logistics"),paragraphs:3,break:[3],h_level:2,para_data:{1:[t("tech_ai_logistics"),t("interstellar_cargo_yard_title"),t("city_shed_title3")],2:[t("city_shed_title3")],3:[t("wiki_mechanics_quantum")]},data_link:{1:["wiki.html#interstellar-tech-ai_logistics","wiki.html#interstellar-structures-cargo_yard","wiki.html#interstellar-structures-warehouse"]}}),y(i,{name:"quantum_arcology",template:"mechanics",label:t("portal_arcology_title"),paragraphs:1,h_level:2,para_data:{1:[t("portal_arcology_title"),10]},data_link:{1:["wiki.html#hell-structures-arcology",!1]}})}{let i=y(r,{name:"mass",template:"mechanics",label:t("wiki_mechanics_mass"),paragraphs:11,break:[5,9],h_level:2,para_data:{1:[t("tab_interstellar")],2:[t("tech_mass_ejector"),t("interstellar_mass_ejector"),t("tab_ejector")],4:[1e10.toLocaleString()],5:[t("universe_magic"),t("resource_Infernite_name"),t("resource_Elerium_name")],6:[.025,t("tech_stabilize_blackhole"),t("tech_exotic_infusion")],7:[t("tech_stabilize_blackhole"),0,40,t("tech_exotic_infusion"),t("wiki_resets_blackhole")],8:[t("tech_stabilize_blackhole"),.025],9:[t("interstellar_stellar_engine"),20,8],10:[1,7.5,t("interstellar_stellar_engine"),13.5,t("tech_gravity_convection")],11:[10]},data_link:{2:["wiki.html#interstellar-tech-mass_ejector","wiki.html#interstellar-structures-mass_ejector"],6:[!1,"wiki.html#interstellar-tech-stabilize_blackhole","wiki.html#interstellar-tech-infusion_confirm"],7:["wiki.html#interstellar-tech-stabilize_blackhole",!1,!1,"wiki.html#interstellar-tech-infusion_confirm","wiki.html#resets-prestige-blackhole"],8:["wiki.html#interstellar-tech-stabilize_blackhole"],9:["wiki.html#interstellar-structures-stellar_engine"],10:[!1,!1,"wiki.html#interstellar-structures-stellar_engine",!1,"wiki.html#interstellar-tech-gravity_convection"]}}),s=ne(i,"eject","mass");Q_(s),M("add","mechanics-gameplay","mass",t("wiki_mechanics_mass"))}{let i=y(r,{name:"piracy",template:"mechanics",label:t("galaxy_piracy"),paragraphs:6,break:[4],h_level:2,para_data:{1:[t("galaxy_piracy"),t("wiki_menu_intergalactic")],2:[t("galaxy_embassy")],4:[t("tab_galactic"),t("galaxy_piracy"),t("galaxy_stargate")],5:[t("interstellar_stargate")]}});y(r,{name:"pirate_ramp",template:"mechanics",label:t("galaxy_piracy"),paragraphs:3,h_level:2,para_data:{1:[t("galaxy_stargate"),t("galaxy_gateway")],2:[t("tab_galactic")],3:[t("galaxy_embassy"),t("tech_xeno_gift"),t("galaxy_alien2_mission",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red])]}},i),y(r,{name:"pirate_threat",template:"mechanics",label:t("galaxy_piracy"),paragraphs:7,break:[2,3,4,5,6,7],h_level:2,para_data:{1:[t("galaxy_armada")],2:[t("galaxy_gateway"),100,250,500],3:[t("galaxy_stargate"),100,250,500],4:[t("galaxy_gorddon"),800],5:[t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien1")?e.galaxy.alien1.id:e.race.species].home]),1e3],6:[t("galaxy_alien",[x[e.galaxy.hasOwnProperty("alien2")?e.galaxy.alien2.id:e.race.species].solar.red]),2500],7:[t("galaxy_chthonian"),7500]},data_color:{2:["caution","warning","warning","warning"],3:["caution","warning","warning","warning"],4:["caution","warning"],5:["caution","warning"],6:["caution","warning"],7:["caution","warning"]}},i),M("add","mechanics-gameplay","piracy",t("galaxy_piracy"))}{let i=y(r,{name:"custom",template:"mechanics",label:t("wiki_mechanics_custom"),paragraphs:12,break:[3,5,9,11],h_level:2,para_data:{1:[t("wiki_resets_ascension")],2:[t("wiki_resets_ascension")],5:[t("resource_Genes_name")],6:[t("resource_Genes_name")],7:[2],8:[t("achieve_technophobe_name"),5,7],9:[t("tech_fanaticism"),t("tech_deify")],11:[0,t("resource_Genes_name")],12:[t("resource_Genes_name"),t("trait_untapped_name")]},data_link:{1:["wiki.html#resets-prestige-ascension"],2:["wiki.html#resets-prestige-ascension"],8:["wiki.html#perks-prestige-technophobe"],9:[e.genes.transcendence?"wiki.html#civilized-tech-alt_fanaticism":"wiki.html#civilized-tech-fanaticism","wiki.html#early_space-tech-deify"]}}),s=ne(i,"mechanics","untapped",t("trait_untapped_name"));J_(s),M("add","mechanics-gameplay","custom",t("wiki_mechanics_custom"))}{let i=y(r,{name:"pillar",template:"hell",label:t("wiki_mechanics_pillar"),paragraphs:5,h_level:2,para_data:{1:[t("portal_ruins_name")],2:["1%",t("harmonic")],3:["3%"],4:[t("harmonic"),"2%","6%"],5:[t("wiki_hell_pillar_para5d1"),12]},data_link:{5:["wiki.html#hell-structures-west_tower"]}});y(r,{name:"pillar",template:"mechanics",label:t("wiki_mechanics_pillar"),paragraphs:10,break:[4,6,8],h_level:2,para_data:{1:[t("tech_pillars"),t("resource_Harmony_name"),t("resource_Scarletite_name")],2:[t("resource_Scarletite_name"),1e6.toLocaleString(),125e3.toLocaleString()],3:[t("universe_micro")],4:[t("evo_challenge_genes"),t("harmonic")],5:[t("tech_scarletite"),t("evo_challenge_genes")],6:[t("achieve_resonance_name")],7:[t("achieve_resonance_name"),t("tech_scarletite")],8:[t("race_junker"),t("wiki_mechanics_custom"),t("achieve_enlightenment_name"),t("race_sludge")],9:[t("wiki_mechanics_custom")],10:[t("race_junker"),t("genelab_genus_humanoid"),t("race_sludge")]},data_link:{1:["wiki.html#dimensional-tech-pillars"],3:["wiki.html#universes-gameplay-micro"],5:["wiki.html#dimensional-tech-scarletite"],7:[!1,"wiki.html#dimensional-tech-scarletite"],8:["wiki.html#races-species-junker","wiki.html#mechanics-gameplay-custom",!1,"wiki.html#races-species-sludge"],9:["wiki.html#mechanics-gameplay-custom"],10:["wiki.html#races-species-junker",!1,"wiki.html#races-species-sludge"]}},i),M("add","mechanics-gameplay","pillar",t("wiki_mechanics_pillar"))}{let i=y(r,{name:"dlord",template:"mechanics",label:t("wiki_mechanics_dlord"),paragraphs:5,h_level:2,para_data:{1:[t("portal_waygate_title")],2:[t("resource_Demonic_Essence_name"),t("wiki_resets_infusion")],3:[t("wiki_resets_infusion"),"+1"],4:["+25%",t("wiki_resets_infusion")],5:[t("tech_dark_bomb"),t("wiki_resets_infusion")]},data_link:{1:["wiki.html#hell-structures-waygate"],2:[!1,"wiki.html#resets-prestige-infusion"],3:["wiki.html#resets-prestige-infusion"],4:[!1,"wiki.html#resets-prestige-infusion"],5:["wiki.html#dimensional-tech-dark_bomb","wiki.html#resets-prestige-infusion"]}});i.append(`

              ${t("wiki_mechanics_dlord_str")}

              - `),Object.keys(ma).forEach(function(s){let n=e.stats.spire[le(s)]&&e.stats.spire[le(s)].dlstr?t("wiki_mechanics_dlord_str_empowered",[e.stats.spire[le(s)].dlstr]):t("wiki_mechanics_dlord_str_not_empowered");i.append(` + `),Object.keys(ma).forEach(function(s){let n=e.stats.spire[ue(s)]&&e.stats.spire[ue(s)].dlstr?t("wiki_mechanics_dlord_str_empowered",[e.stats.spire[ue(s)].dlstr]):t("wiki_mechanics_dlord_str_not_empowered");i.append(`
              ${t("universe_"+s)}: ${n}
              @@ -1535,7 +1535,7 @@ - `),C({el:"#darkBonusCalc",data:{i:c,s:o},methods:{val(l){c[l].val&&c[l].val<0?c[l].val=0:l==="sludge"&&c.sludge.val&&c.sludge.val>5&&(c.sludge.val=5)},pickUniverse(l){o[c.uni.val].vis=!1,c.uni.val=l,o[l].vis=!0},resetInputs(){c.dark.val=void 0,c.harmony.val=void 0,c.sludge.val=void 0,o[c.uni.val].vis=!1,c.uni.val="standard",o.standard.vis=!0},importInputs(){c.dark.val=e.prestige.Dark.count,c.harmony.val=e.prestige.Harmony.count,e.race.universe!=="bigbang"&&(o[c.uni.val].vis=!1,c.uni.val=e.race.universe,o[c.uni.val].vis=!0),c.sludge.val=e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[le(c.uni.val)]?e.stats.achieve.extinct_sludge[le(c.uni.val)]:0}},filters:{generic(l,u){return l!==void 0?l:t("wiki_p_res_"+u)},sludgeLabel(l){return l!==void 0?l:t("wiki_calc_sludge_level")},uniLabel(l){return l?t("universe_"+l):t("wiki_calc_universe")},calc(l,u,d){if(l===c.uni.val){if(u)return l==="heavy"?(o[l][`val${d}`]*100).toFixed(3):(o[l].val*100).toFixed(3);if(o[l].result=c.dark.val!==void 0&&c.harmony.val!==void 0,o[l].result)switch(l){case"standard":case"evil":case"antimatter":case"magic":return o[l].val=+(fe(l,!1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val})-1).toFixed(6),o[l].val;case"micro":return o[l][`val${d}`]=fe(l,d===1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val}),o[l][`val${d}`];case"heavy":let h=fe(l,!1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val});return d===1?h=.25+.5*h:h=.2+.3*h,o[l][`val${d}`]=h.toFixed(5),o[l][`val${d}`]}}}}})}function od(a){let r=$('
              ');a.append(r),r.append(`

              ${t("wiki_calc_creep_reduction",[t("resource_Harmony_name")])}

              `);let i=$("
              "),s=$("
              ");r.append(i),r.append(s);let n={harmony:{val:void 0},ascended:{val:void 0},uni:{val:"undefined"}},c={result:{vis:!1,val:0}};i.append(` + `),C({el:"#darkBonusCalc",data:{i:c,s:o},methods:{val(l){c[l].val&&c[l].val<0?c[l].val=0:l==="sludge"&&c.sludge.val&&c.sludge.val>5&&(c.sludge.val=5)},pickUniverse(l){o[c.uni.val].vis=!1,c.uni.val=l,o[l].vis=!0},resetInputs(){c.dark.val=void 0,c.harmony.val=void 0,c.sludge.val=void 0,o[c.uni.val].vis=!1,c.uni.val="standard",o.standard.vis=!0},importInputs(){c.dark.val=e.prestige.Dark.count,c.harmony.val=e.prestige.Harmony.count,e.race.universe!=="bigbang"&&(o[c.uni.val].vis=!1,c.uni.val=e.race.universe,o[c.uni.val].vis=!0),c.sludge.val=e.stats.achieve.extinct_sludge&&e.stats.achieve.extinct_sludge[ue(c.uni.val)]?e.stats.achieve.extinct_sludge[ue(c.uni.val)]:0}},filters:{generic(l,u){return l!==void 0?l:t("wiki_p_res_"+u)},sludgeLabel(l){return l!==void 0?l:t("wiki_calc_sludge_level")},uniLabel(l){return l?t("universe_"+l):t("wiki_calc_universe")},calc(l,u,d){if(l===c.uni.val){if(u)return l==="heavy"?(o[l][`val${d}`]*100).toFixed(3):(o[l].val*100).toFixed(3);if(o[l].result=c.dark.val!==void 0&&c.harmony.val!==void 0,o[l].result)switch(l){case"standard":case"evil":case"antimatter":case"magic":return o[l].val=+(fe(l,!1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val})-1).toFixed(6),o[l].val;case"micro":return o[l][`val${d}`]=fe(l,d===1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val}),o[l][`val${d}`];case"heavy":let h=fe(l,!1,!0,{dark:c.dark.val,harmony:c.harmony.val,sludge:c.sludge.val});return d===1?h=.25+.5*h:h=.2+.3*h,o[l][`val${d}`]=h.toFixed(5),o[l][`val${d}`]}}}}})}function od(a){let r=$('
              ');a.append(r),r.append(`

              ${t("wiki_calc_creep_reduction",[t("resource_Harmony_name")])}

              `);let i=$("
              "),s=$("
              ");r.append(i),r.append(s);let n={harmony:{val:void 0},ascended:{val:void 0},uni:{val:"undefined"}},c={result:{vis:!1,val:0}};i.append(`
              (ln(50 + ({{ i.harmony.val, 'harmony' | generic }} * {{ i.ascended.val | ascendedLabel }})) - 3.912023005428146) * 0.01 = {{ | calc }}
              @@ -1548,7 +1548,7 @@ - `),C({el:"#harmonyCreepCalc",data:{i:n,s:c},methods:{val(o){n[o].val&&n[o].val<0?n[o].val=0:o==="ascended"&&n.ascended.val&&n.ascended.val>5&&(n.ascended.val=5)},resetInputs(){n.harmony.val=void 0,n.ascended.val=void 0},importInputs(){n.harmony.val=e.prestige.Harmony.count,n.ascended.val=e.stats.achieve.ascended&&e.stats.achieve.ascended[le(e.race.universe||"standard")]?e.stats.achieve.ascended[le(e.race.universe||"standard")]:0}},filters:{generic(o,l){return o!==void 0?o:t("wiki_p_res_"+l)},ascendedLabel(o){return o!==void 0?o:t("wiki_calc_ascended_level")},calc(){if(c.result.vis=n.harmony.val!==void 0&&n.ascended.val!==void 0,c.result.vis)return c.result.val=+((Math.log(50+n.harmony.val*n.ascended.val)-3.912023005428146)*.01).toFixed(5),c.result.val}}})}function ld(a){let r=$('
              ');a.append(r),r.append(`

              ${t("wiki_calc_core_quantum")}

              `);let i=$("
              "),s=$("
              ");r.append(i),r.append(s);let n={cores:{val:void 0}},c={result:{vis:!1,val:0}};i.append(` + `),C({el:"#harmonyCreepCalc",data:{i:n,s:c},methods:{val(o){n[o].val&&n[o].val<0?n[o].val=0:o==="ascended"&&n.ascended.val&&n.ascended.val>5&&(n.ascended.val=5)},resetInputs(){n.harmony.val=void 0,n.ascended.val=void 0},importInputs(){n.harmony.val=e.prestige.Harmony.count,n.ascended.val=e.stats.achieve.ascended&&e.stats.achieve.ascended[ue(e.race.universe||"standard")]?e.stats.achieve.ascended[ue(e.race.universe||"standard")]:0}},filters:{generic(o,l){return o!==void 0?o:t("wiki_p_res_"+l)},ascendedLabel(o){return o!==void 0?o:t("wiki_calc_ascended_level")},calc(){if(c.result.vis=n.harmony.val!==void 0&&n.ascended.val!==void 0,c.result.vis)return c.result.val=+((Math.log(50+n.harmony.val*n.ascended.val)-3.912023005428146)*.01).toFixed(5),c.result.val}}})}function ld(a){let r=$('
              ');a.append(r),r.append(`

              ${t("wiki_calc_core_quantum")}

              `);let i=$("
              "),s=$("
              ");r.append(i),r.append(s);let n={cores:{val:void 0}},c={result:{vis:!1,val:0}};i.append(`
              1 - (0.99^{{ i.cores.val, 'cores' | generic }}) = {{ false | calc }} = +{{ true | calc }}%